havenwood changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.2.3; 2.1.7; 2.0.0-p647: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
<vnk> jhass: let me rewrite something and then come back brb
<jhass> vnk: so largest is always equal to x is what we learned, right? now can largest > x on the next line ever be true?
<Radar> vnk: I'd recommend scrapping the whole method and going with what al2o3-cr says
<jhass> well, that's the solution to apply of course
nertzy has quit [Quit: This computer has gone to sleep]
<havenwood> >> [5, 1, 3, 2, 4].max_by 2, &:angle
<ruboto> havenwood # => [5, 3] (https://eval.in/473970)
<jhass> but it's still worthwile to understand the issue in the code you wrote
<doddok> max(2) loooks so stupid
<doddok> should be take_max
<Radar> doddok: patches welcome
sulky has quit [Ping timeout: 272 seconds]
sulky has joined #ruby
doodleha_ has quit [Remote host closed the connection]
<vnk> jhass: yeah, basicly when I remove that line 10 I get biggest element correctly, but there is problem with second largest. I understund what is problem. problem is when I input for example 2,5,1 array largest one will be set to 2, then largest will be set to 5, and then at the end largest will be larger then 1 and it will set second_largest to 1 but it should be 2.. now I am thinking how I can fix that
norc has quit [Ping timeout: 246 seconds]
SCHAAP137 has quit [Quit: Leaving]
Lytol has quit [Quit: Lytol]
<Radar> vnk: Why aren't you using max(2) yet?
<al2o3-cr> it might be a learning exercise
<vnk> Radar: trying to make this method work, of course I will rewrite whole method with max(2) at the end bescause its much cleaner. but I just want to practice a bit logical thinking :)
Spami has quit [Quit: This computer has gone to sleep]
<jhass> vnk: well, think about when you found the second largest element _so far_, at which point does that happen?
<jhass> what other condition might be present at the same time?
<vnk> jhass: yeah, I found out. I didnt even needed else :P http://pastie.org/10574878
nertzy has joined #ruby
Kabaka has quit [Changing host]
Kabaka has joined #ruby
<jhass> yup
<vnk> jhass: now I going to rewrite it with max. :)
<jhass> good
<jhass> probbaly not even worth to keep your own method btw, just replace the calls
Kabaka has quit [Quit: WeeChat 1.3]
<jhass> >> a, b = [1].max(2)
<ruboto> jhass # => [1] (https://eval.in/473971)
<jhass> er
<jhass> >> a, b = [1].max(2); [a, b]
<ruboto> jhass # => [1, nil] (https://eval.in/473972)
Kabaka has joined #ruby
tekacs has quit [Ping timeout: 276 seconds]
stannard has quit [Ping timeout: 250 seconds]
tekacs has joined #ruby
<doddok> newbies should start from clojure, clojure the best
<doddok> vnk
djbkd has joined #ruby
<vnk> doddok: clojure language?
<jhass> doddok: I'm starting to wonder if you're a net benefit to the channel
<Radar> ^
<vnk> doddok: to be honest I dont see point, ruby is not THAT hard.. its pretty nice language with clean syntax
<doddok> jhass, dont worry, ruby nice but clojure a the best, imho
diegoaguilar has quit [Remote host closed the connection]
<jhass> doddok: I don't care. What I do care about is you confusing newbies with bullshit
<doddok> lol
maloik has joined #ruby
digneety has quit [Ping timeout: 265 seconds]
kiki_lam1 is now known as kiki_lamb
<doddok> чувак, допилишь свой кристал тогда будешь пыхтеть тут
<doddok> :)
<Radar> !mute doddok
djbkd has quit [Ping timeout: 240 seconds]
<jhass> I threw it into google translate, but it doesn't make any sense :/
bersimoes has joined #ruby
<Radar> Same. I'm assuming he's being a smartass still so on goes the mute.
<Radar> I don't want to have to babysit
<al2o3-cr> roughly translates to "Dude, your dopiliš′ Crystal then shalt Pant here"
Mojo_Nixon has quit [Read error: Connection reset by peer]
EllisTAA has joined #ruby
newbie1 has joined #ruby
maloik has quit [Ping timeout: 246 seconds]
<EllisTAA> do i have to do anything like include something to use ARGF?
Mojo_Nixon has joined #ruby
<Radar> no
ta has quit [Read error: Connection reset by peer]
<jhass> al2o3-cr: dopilis?
<EllisTAA> Radar: but i’m getting uninitialized constant ARGF
ta has joined #ruby
<Radar> >> ARGF
<ruboto> Radar # => ARGF (https://eval.in/473973)
<shevy> al2o3-cr cool so doddok is writing in crystal!
<Radar> Works for me, works for ruboto;
yqt has quit [Read error: Connection reset by peer]
<Radar> EllisTAA: Steps to reproduce problem kthxbye
<jhass> 18>> ARGF
<ruboto> jhass # => ARGF (https://eval.in/473974)
<vnk> .max(2) show 2 largest elements in array, correct? I thought at first that it shows second largest element.
<jhass> no idea how you did that really
<jhass> vnk: yes
<al2o3-cr> jhass: from bing translate, google translates to "man, finished his crystal then you will immediately puff"
<Radar> jhass: EllisTAA has superpowers
_stu_ has joined #ruby
<shevy> good old babelfish comedy
<jhass> al2o3-cr: thanks that I did myself, I'm saying I don't understand it
<EllisTAA> so i run ‘ruby interpreter.rb input.rb’ & in interpreter.rb all i have is AGRF.lines {| line| puts line}
<Radar> EllisTAA: AGRF?
<Radar> EllisTAA: Did you not copy and paste the error message?
<droptone> All Good Radar, Fix
ta has quit [Read error: Connection reset by peer]
JazzyVariable227 has quit [Remote host closed the connection]
ta has joined #ruby
<jhass> EllisTAA: make a screenshot of running cat interpreter.rb && ruby interpreter.rb input.rb
build22 has quit [Remote host closed the connection]
<al2o3-cr> EllisTAA: use #each_line
<al2o3-cr> .each_line
saddad has quit [Ping timeout: 250 seconds]
bryanray has joined #ruby
<shevy> yeah make a screenshot of a running cat
build22 has joined #ruby
<vnk> anyone got good tutorial for regex?
akem has quit [Quit: Bye]
<bougyman> how much do you want to learn them?
<bougyman> if you're serious, get the o'reilly Mastering Regular Expressions.
<shevy> I read a perl book once, one chapter was about regexes; I guess your second best option other than a book is a webtutorial vnk
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
doddok has quit [Quit: Leaving]
EllisTAA has quit [Quit: EllisTAA]
<jhass> vnk: http://regexcrossword.com/ is good training material
<vnk> jhass: awesome, thanks.
<jhass> gets you into the right thinking
<blubjr> im folding over an array where each element is an array of two elements, where both of those is an array of two elements. is there a way to destructure that into four arguments in the blocks arglist
<shevy> vnk this seemed ok http://www.regular-expressions.info/ but the best is actually http://rubular.com/ I use it a lot to test regexes
<jhass> vnk: then http://regular-expressions.info/ is pretty comprehensive
waka has joined #ruby
hashpuppy has joined #ruby
<vnk> cool :) I will take a look now
<jhass> vnk: and http://regexper.com makes nices graphes
build22 has quit [Ping timeout: 240 seconds]
axsuul has joined #ruby
yfeldblum has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
_blizzy_ has joined #ruby
dome22xl has joined #ruby
<havenwood> >> [[[1, 2], [3, 4]], [[5, 6], [7, 8]]].map { |(a, b), (c, d)| [a, d, b, d] }
<ruboto> havenwood # => [[1, 4, 2, 4], [5, 8, 6, 8]] (https://eval.in/473977)
<havenwood> blubjr: ^
bersimoes has quit [Remote host closed the connection]
finisherr has joined #ruby
arooni has quit [Ping timeout: 246 seconds]
Xiti has quit [Quit: Xiti]
juddey has joined #ruby
<blubjr> oh perfect, thank you
Xiti has joined #ruby
arooni has joined #ruby
millerti_ has joined #ruby
millerti has quit [Read error: Connection reset by peer]
dome22xl has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
nettoweb has joined #ruby
ta has quit [Read error: Connection reset by peer]
saddad has joined #ruby
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cwong_on_irc has quit [Quit: Leaving.]
ta has joined #ruby
JazzyVariable227 has joined #ruby
freerobby has joined #ruby
maloik has joined #ruby
poguez_ has quit [Quit: Connection closed for inactivity]
JazzyVariable227 has quit [Remote host closed the connection]
RobertBirnie has joined #ruby
griffindy has joined #ruby
maloik has quit [Ping timeout: 250 seconds]
tulak has quit [Remote host closed the connection]
marr has quit [Ping timeout: 272 seconds]
yoongkang has quit [Remote host closed the connection]
millerti_ has quit [Read error: Connection reset by peer]
doodleha_ has joined #ruby
bds has joined #ruby
eminencehc has joined #ruby
doodleha_ has quit [Remote host closed the connection]
axsuul has quit [Ping timeout: 240 seconds]
vnk has quit [Read error: Connection reset by peer]
<bds> Does anyone use the stdlib debug.rb? I would like to use a standard tool but there seems to very limited documentation - can someone recommend something that is similar? Pry itself seems like a lot - just need something to set break/watchpoints and step through the call stack
<jhass> bds: pry-byebug
<bds> jhass: ty :)
wilsonc91 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sulky has quit [Ping timeout: 272 seconds]
finisherr has quit [Quit: finisherr]
tref has quit [Quit: tref]
_blizzy_ has quit [Quit: Leaving]
Ropeney has joined #ruby
baweaver has quit [Remote host closed the connection]
millerti has joined #ruby
_stu_ has quit [Quit: _stu_]
newbie1 has quit [Ping timeout: 265 seconds]
djbkd has joined #ruby
yqt has joined #ruby
symm- has quit [Ping timeout: 250 seconds]
_stu_ has joined #ruby
mattwildig has quit [Remote host closed the connection]
mattwildig has joined #ruby
fedexo has quit [Ping timeout: 272 seconds]
ismaelga has quit [Remote host closed the connection]
ismaelga has joined #ruby
djbkd has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
mattwildig has quit [Ping timeout: 252 seconds]
howdoicomputer has quit [Read error: Connection reset by peer]
karapetyan has joined #ruby
JazzyVariable227 has joined #ruby
howdoicomputer has joined #ruby
aspiers_ has joined #ruby
maloik has joined #ruby
build22 has joined #ruby
eminencehc has quit [Remote host closed the connection]
karapetyan has quit [Ping timeout: 264 seconds]
hashpuppy has quit [Quit: Textual IRC Client: www.textualapp.com]
aspiers has quit [Ping timeout: 250 seconds]
millerti has quit [Quit: Textual IRC Client: www.textualapp.com]
millerti has joined #ruby
amirpro_ has quit [Quit: Connection closed for inactivity]
mary5030 has joined #ruby
maloik has quit [Ping timeout: 265 seconds]
Paradox has joined #ruby
build22 has quit [Ping timeout: 264 seconds]
DurstBurger has joined #ruby
JazzyVariable227 has quit [Remote host closed the connection]
Yzguy has joined #ruby
<jackcom> ruby is easy language?
<al2o3-cr> Can anyone help me get the the reply from a ping request, it just hangs?
djbkd has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
freerobby has quit [Quit: Leaving.]
<al2o3-cr> I can see the request/reply in wireshark so it's definitely send a reply
<al2o3-cr> Here's what I've done: https://gist.github.com/anonymous/36afed57eb2b45e339c5 can someone see where i've gone wrong?
bds has quit [Ping timeout: 260 seconds]
<al2o3-cr> I can't understand why it just hangs (confused.com)!
moeabdol has quit [Ping timeout: 272 seconds]
hotpancakes has quit [Remote host closed the connection]
nertzy has quit [Quit: This computer has gone to sleep]
Guest44916 has quit [Quit: Leaving]
krz has joined #ruby
quarters has joined #ruby
_stu_ has quit [Quit: _stu_]
nofxx has quit [Remote host closed the connection]
nofxx has joined #ruby
nofxx has quit [Changing host]
nofxx has joined #ruby
Mon_Ouie has quit [Ping timeout: 272 seconds]
<al2o3-cr> I want to make a ping program using the Ruby socket library, any help will be much appreciated!
<quarters> hello. I was trying to access an octopress page running on a linux server with (rake preview) on a windows client, but while I see activity on the tcpdump, the windows browser doesn't connect, whereas I can run the page on the server's browser
<quarters> I know that octopress is run using jekyll and rack gems, but wasn't sure if the issue is one of configuration
dorei has quit []
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
maloik has joined #ruby
zenguy_pc has quit [Read error: No route to host]
hotpancakes has joined #ruby
mooe has joined #ruby
maloik has quit [Ping timeout: 260 seconds]
jordanm has quit [Quit: Konversation terminated!]
ismaelga has quit [Read error: Connection reset by peer]
ismaelga has joined #ruby
yoongkang has joined #ruby
nofxx has quit [Remote host closed the connection]
nofxx has joined #ruby
JazzyVariable227 has joined #ruby
JazzyVariable227 has quit [Remote host closed the connection]
yoongkang has quit [Ping timeout: 255 seconds]
DurstBurger has quit [Ping timeout: 240 seconds]
axsuul has joined #ruby
wilsonc91 has joined #ruby
mattwildig has joined #ruby
pwnd_nsfw has quit [Ping timeout: 246 seconds]
Bellthoven has quit []
<jackcom> 1, 0, ‘’, are all true?
maloik has joined #ruby
babblebre has joined #ruby
mary5030 has quit [Remote host closed the connection]
zenguy_pc has joined #ruby
<jackcom> :(
<al2o3-cr> jackcom: yep, only nil and false are non truthy
zenguy_pc has quit [Read error: Connection reset by peer]
<jackcom> thanks al2o3-cr
<al2o3-cr> jackcom: np :)
<jackcom> i know that 0 is false in c
<jackcom> al2o3-cr:
<al2o3-cr> jackcom: you'll soon pick ruby up :)
<jackcom> ok thanks
Mon_Ouie has joined #ruby
maloik has quit [Ping timeout: 264 seconds]
kies has joined #ruby
stannard has joined #ruby
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hotpancakes has quit [Remote host closed the connection]
baweaver has joined #ruby
goodcodeguy has joined #ruby
arahael has joined #ruby
<arahael> Ruby novice here. WHat's the quickest and easiest way for me to do a 'gem install jekyll' into a local directory? (Ie, I can't pollute the system)
pwnd_nsfw has joined #ruby
<Radar> arahael: Best long term solution is to install Ruby with ruby-install (which'll install Ruby into your home dir) and then use chruby to switch into that Ruby.
<Radar> arahael: From there, gem install jekyll will install into a dir inside your home directory.
hotpancakes has joined #ruby
baweaver has quit [Ping timeout: 276 seconds]
<arahael> Radar: Hmm, so using brew's ruby is a somewhat similar approach?
<Radar> arahael: If it's writable by the user, then sure.
hotpancakes has quit [Remote host closed the connection]
zenguy_pc has joined #ruby
<Radar> The standard Ruby that comes with OS X is not writable by the user.
<arahael> Radar: brew's ruby is, yes. Ok, I'll check out that guide.
rgrmatt has quit [Remote host closed the connection]
<arahael> Looks like that while brew's ruby will work for me, your approach is much more flexible.
<Radar> Yes, you can install multiple versions of Ruby.
jeffreylevesque has joined #ruby
<jeffreylevesque> anyone know how to lint puppet templates (i.e. erb) files? Should i use ruby's "rubocop", or is there some command built into puppet?
<jhass> arahael: that said to answer your actual question, install the bundler gem globally, create a Gemfile in your directory (bundle init) and add `gem "jekyll"` to it, then run bundle install --path vendor
<jhass> arahael: and bundle exec jekyll to run it
devyn has quit [Remote host closed the connection]
zacts has quit [Ping timeout: 246 seconds]
chipotle has quit [Quit: cheerio]
iyan has joined #ruby
hotpancakes has joined #ruby
<arahael> jhass: I like that answer better, as I don't actually need multiple rubies yet.
maloik has joined #ruby
<Radar> Sorry, I've got my head stuck in "people will develop on more than one Ruby project" land
<arahael> Radar: No, that's a perfectly reasonable space to be in.
mary5030 has joined #ruby
RobertBirnie has joined #ruby
chipotle has joined #ruby
<arahael> jhass: Works like a charm. A few extra steps were required, but the tool's error messages talked me through it.
build22 has joined #ruby
<Radar> \o./
maloik has quit [Ping timeout: 272 seconds]
platzhirsch has joined #ruby
<platzhirsch> How would you check in an ordered array if one item is bigger than its successor?
<arahael> platzhirsch: What's "bigger"?
howdoicomputer has quit [Ping timeout: 272 seconds]
ellismarte has joined #ruby
<jhass> ordered how?
<platzhirsch> arahael: strictly greater than >
<platzhirsch> this would hold true for example for [1, 2, 3]
<jhass> ?xy
<ruboto> it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
<arahael> platzhirsch: Well, that doesn't make sense. If it's an ordered array, then surely the answer is very, very trivial/
driftig has quit [Changing host]
driftig has joined #ruby
<platzhirsch> probably.. let me think..
<jhass> platzhirsch: so you simply want true for [1, 2, 3] but false for [1, 1, 2, 3] ?
<platzhirsch> yeah..
build22 has quit [Ping timeout: 272 seconds]
symm- has joined #ruby
<platzhirsch> although I already invoke unique on them.. so
<jhass> .size == .uniq.size if you don't mind the allocation
<platzhirsch> ah compare it with sorted maybe or so
<jhass> well, uniq.sort will guarantee that property already
<arahael> I assume, given that he does NOT have an "ordered array", that he also wants [1, 3, 2] to be false.
<jhass> the initial question said it's ordered
cashnguns has joined #ruby
<platzhirsch> yeah true,.. it doens't really make sense
<jhass> maybe he should actually answer to my "ordered how?"
<platzhirsch> my apologizes, was stuck for 8h on an aiport :D now trying to write code in the train,.. sort and uniq are already enough to solve my problem
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<platzhirsch> apologies
<arahael> platzhirsch: I'm intrigued though - what was the original problem?
<platzhirsch> arahael: Input are two times, start time t1, end time t2. Then I loop from t1 -> t2 in 10minute steps and create instances with a bit of data for each
<platzhirsch> in my spec I wanted to test that the loop actually works
symm- has quit [Quit: Leaving...]
<platzhirsch> and that there is a series of continuous intervals
<platzhirsch> would also be nice to see, that the distance is always 10 minutes
hotpancakes has quit [Remote host closed the connection]
maloik has joined #ruby
<jhass> platzhirsch: .each_cons(2).all? {|t1, t2| t2-t1 == 10.minutes }
beauby has quit [Ping timeout: 276 seconds]
<platzhirsch> oh.. each_cons was actually what I was looking for
<arahael> platzhirsch: I'd probably compuate a sequence of 10 minute times, and then the least-squares difference between those and your actual times, and pass the test if the delta is sufficiently small.
<jhass> platzhirsch: and that's why I triggered ?xy earlier ;)
<platzhirsch> jhass: fair enough
blueOxigen has joined #ruby
Melpaws has quit [Quit: Leaving.]
bluOxigen has quit [Ping timeout: 260 seconds]
JazzyVariable227 has joined #ruby
ellismarte has quit [Quit: ellismarte]
fbidu has joined #ruby
maloik has quit [Ping timeout: 260 seconds]
tmtwd has joined #ruby
maloik has joined #ruby
m3_del has quit [Remote host closed the connection]
stannard has quit [Remote host closed the connection]
ellismarte has joined #ruby
<ellismarte> is there a way to turn a string into ruby syntax? like “steve = User.new” becomes steve = User.new
<jhass> ellismarte: yes, but we should solve your problem differently. What are you trying to achive?
<arahael> ellismarte: That string already looks like ruby syntax.
<platzhirsch> eval? But it's dangerous
<jhass> ^ please don't just use it
JazzyVariable227 has quit [Remote host closed the connection]
bluOxigen has joined #ruby
<platzhirsch> sorry
<platzhirsch> don't use eval!
<ellismarte> jhass: i’m writing a language that takes a sentence like “create a new user called steve” and then it makes a class out of it by parsing the sentence and outputting to a new file
blueOxigen has quit [Ping timeout: 265 seconds]
exadeci has joined #ruby
<jhass> ellismarte: look at gherkin/cucumber
<ellismarte> ok
<ellismarte> jhass: are you saying look @ how they did it?
yqt has quit [Ping timeout: 265 seconds]
<jhass> I'm saying it sounds like you're reinventing it
<pontiki> it sounds like he's parsing natural language and turning it into ruby code
<ellismarte> jhass: yes but i want it to be domain inspecific language
maloik has quit [Ping timeout: 260 seconds]
<jhass> how is gherkin/cucumber domain specific?
<arahael> ellismarte: You always have a domain.
platzhirsch has left #ruby [#ruby]
<ellismarte> jhass: isn’t it made for testing?
<eam> ellismarte: just say you're doing it for fun / for practice and they'll leave you alone ;)
<ellismarte> eam: lol yeah it’s for fun
<jhass> that might be it's primary application, which of course feeds back into the available integrations and its development, but I wouldn't say it's technically limited to that
<pontiki> so if you're writing a file of ruby code, is there any reason you can't or shouldn't run ruby on it?
JazzyVariable227 has joined #ruby
<pontiki> like concerns about malicious code, etc
<eam> everyone's right that it's a bad idea to implement stuff like this from scratch for a production application -- but it's a fantastic thing to do as a project for learning
<pontiki> there are ruby parsers, for example. not sure what the end result your looking for is
yoongkang has joined #ruby
dkphenom has joined #ruby
lessless has joined #ruby
<pontiki> writing a grammar and parser is a cool thing, and using it generate ruby code is even cooler
<ellismarte> can’t figure out how to get rid of the strings … maybe use chomp … and whatever method slices off the first character …
stannard has joined #ruby
mary5030 has quit [Remote host closed the connection]
yoongkang has quit [Ping timeout: 252 seconds]
baweaver has joined #ruby
fbidu has quit [Quit: Leaving]
<arahael> ellismarte: First, I'll clearly and strongly suggest you find an existing, production system. gherkin/cucumber is probably a perfect match. However, for learning purposes I suggest learning how to write that ruby string to a file, and execute it using ruby as a subprocess.
<pontiki> you mean the quotes, ellismarte ?
<ellismarte> pontiki: yes
<ellismarte> arahael: thanks
ismaelga has quit [Remote host closed the connection]
Melpaws has joined #ruby
<pontiki> ellismarte: i'm curious how they're getting written in the file in the first place...
<ellismarte> gtg though bbl
djbkd has quit [Remote host closed the connection]
maloik has joined #ruby
<arahael> Heh, "I-lang". :)
<eam> ellismarte: try something like treetop
<ellismarte> eam: cool illl check that out
<pontiki> lol, great commit message, ellismarte :)
<ja> interesting project (and great commit message, indeed!), ellismarte :D the best of luck to you
tubuliferous_ has joined #ruby
Gnut has joined #ruby
stannard has quit [Remote host closed the connection]
DLSteve has quit [Quit: Textual IRC Client: www.textualapp.com]
maloik has quit [Ping timeout: 265 seconds]
fbidu has joined #ruby
fbidu has quit [Max SendQ exceeded]
hahuang61 has joined #ruby
quarters has quit [Ping timeout: 246 seconds]
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s2013 has joined #ruby
djbkd has joined #ruby
krz has quit [Ping timeout: 260 seconds]
ellismarte has quit [Quit: ellismarte]
hotpancakes has joined #ruby
shellie_ has quit [Quit: Lost terminal]
millerti has quit [Ping timeout: 252 seconds]
millerti has joined #ruby
maloik has joined #ruby
millerti has quit [Max SendQ exceeded]
favadi has joined #ruby
iso has joined #ruby
iso has left #ruby [#ruby]
iso has joined #ruby
iso has left #ruby [#ruby]
mary5030 has joined #ruby
chouchen has joined #ruby
minimalism has quit [Quit: leaving]
maloik has quit [Ping timeout: 276 seconds]
build22 has joined #ruby
chouchen_ has joined #ruby
millerti has joined #ruby
saddad has quit [Quit: WeeChat 1.4-dev]
stannard has joined #ruby
chouchen_ has quit [Client Quit]
chouchen has quit [Ping timeout: 260 seconds]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ellismarte has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
build22 has quit [Ping timeout: 255 seconds]
eminencehc has joined #ruby
s2013 has joined #ruby
saddad has joined #ruby
bkxd has quit [Ping timeout: 250 seconds]
hahuang61 has quit [Ping timeout: 250 seconds]
akira has joined #ruby
akira is now known as Guest40201
maloik has joined #ruby
akira__ has quit [Ping timeout: 272 seconds]
howdoicomputer has joined #ruby
Mojo_Nixon has quit [Quit: Textual IRC Client: www.textualapp.com]
juddey has quit [Remote host closed the connection]
saddad has quit [Quit: WeeChat 1.4-dev]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bkxd has joined #ruby
maloik has quit [Ping timeout: 265 seconds]
maloik has joined #ruby
sulky has joined #ruby
VeryBewitching has quit [Quit: Konversation terminated!]
JazzyVariable227 has quit [Remote host closed the connection]
sulky has quit [Read error: Connection reset by peer]
tildes has joined #ruby
PaulCape_ has quit [Quit: .]
maloik has quit [Ping timeout: 250 seconds]
quazimodo has quit [Read error: Connection reset by peer]
PaulCapestany has joined #ruby
bryanray has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
m3_del has joined #ruby
sulky has joined #ruby
pwnd_nsfw has quit [Ping timeout: 246 seconds]
cleopatra has joined #ruby
grill has joined #ruby
safe has quit [Read error: Connection reset by peer]
CodingWolf has quit [Ping timeout: 265 seconds]
JazzyVariable227 has joined #ruby
zast has joined #ruby
safe has joined #ruby
mooe has quit [Quit: Connection closed for inactivity]
braincrash has quit [Quit: bye bye]
tildes has quit [Ping timeout: 240 seconds]
<cleopatra> hello people
<zast> hello
<cleopatra> how are you zast
<zast> good, im trying to learn ruby :D
<zast> just started yesterday
maloik has joined #ruby
<cleopatra> nice :)
<cleopatra> welcome to ruby world's
<zast> hehe thnx
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
hahuang61 has joined #ruby
<cleopatra> hello people someone has made a make.rb to compile a program in c++ (visual studio)
<Radar> zast: welcome :)
<arahael> cleopatra: I'm sure someone has. :)
braincrash has joined #ruby
<cleopatra> Radar, :) hello friend
<Radar> cleopatra: hello
maloik has quit [Ping timeout: 244 seconds]
<cleopatra> arahael, I've seen one in Phython, but I would like to do in ruby
<zast> is learn ruby the hard way a good website to learn from?
<arahael> cleopatra: You've seen one of /what/ in "Phython" (What's that?)
pwnd_nsfw has joined #ruby
babblebre has quit [Quit: Connection closed for inactivity]
tmtwd has quit [Ping timeout: 252 seconds]
lookingeast has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zast has quit [Remote host closed the connection]
s2013 has joined #ruby
<cleopatra> arahael, one make.py file to compile a program in c ++ (visual studio)
<lookingeast> anyone request a document on working with stdin and stdout in ruby
<cleopatra> I thought someone might have some sample code here
ecksit has joined #ruby
<arahael> cleopatra: What you want is to write a ruby script to compile a C++ solution?
<arahael> cleopatra: And by "phython" you must mean "python"?
<cleopatra> yes arahael
<arahael> cleopatra: I suggest you refer to ruby rake.
ItSANgo has joined #ruby
<Radar> lookingeast: that question doesn't make any sense to me
zast has joined #ruby
<arahael> cleopatra: http://rake.rubyforge.org/
<Radar> ?xy
<ruboto> it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
<Radar> cleopatra: ^
<cleopatra> sorry for the grammar, my English no is good arahael
<arahael> cleopatra: The english isn't really the issue here.
<cleopatra> let me know not to make the mistake again
<arahael> cleopatra: Learn about the "XY" problem.
<Radar> cleopatra: read this http://meta.stackexchange.com/a/66378
<cleopatra> (kiss) you guys
braincra- has joined #ruby
<lookingeast> Radar: i want to use a ruby program in place of a shell script. but with ruby it seems like i need to use File.open(), i'm trying to find out if there's a way to get a ruby program to just use command line io redirection, like program.rb < items.txt > output.txt
<Radar> ?gist lookingeast
<ruboto> lookingeast, https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
<Radar> show us your code
iyan has quit [Quit: iyan]
<cleopatra> Thank you arahael, Radar :)
braincrash has quit [Ping timeout: 264 seconds]
maloik has joined #ruby
stannard has quit [Remote host closed the connection]
axsuul has quit [Ping timeout: 246 seconds]
axsuul has joined #ruby
<Radar> quick responses are appreciated, lookingeast.
Axy has joined #ruby
kobain has quit [Ping timeout: 240 seconds]
maloik has quit [Ping timeout: 255 seconds]
Mia has quit [Ping timeout: 276 seconds]
JazzyVariable227 has quit [Remote host closed the connection]
build22 has joined #ruby
mary5030 has quit [Remote host closed the connection]
al2o3-cr1 has joined #ruby
al2o3-cr has quit [Ping timeout: 240 seconds]
mattwildig has quit [Remote host closed the connection]
eminencehc has quit [Remote host closed the connection]
al2o3-cr1 has quit [Client Quit]
al2o3-cr has joined #ruby
al2o3-cr has quit [Client Quit]
build22 has quit [Ping timeout: 260 seconds]
al2o3-cr has joined #ruby
bds has joined #ruby
maloik has joined #ruby
patdohere has joined #ruby
ur5us has quit [Remote host closed the connection]
hotpancakes has quit [Remote host closed the connection]
maikowblue has quit [Quit: .]
davedev2_ has joined #ruby
davedev24 has quit [Ping timeout: 240 seconds]
maloik has quit [Ping timeout: 240 seconds]
bds has quit [Ping timeout: 250 seconds]
Rickmasta has joined #ruby
gix has quit [Ping timeout: 240 seconds]
psy_ has joined #ruby
patdohere has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kalz has quit [Quit: exit]
kalzz has quit [Quit: exit]
cashnguns has quit [Remote host closed the connection]
nofxx has quit [Remote host closed the connection]
nofxx has joined #ruby
gix has joined #ruby
hotpancakes has joined #ruby
kalz has joined #ruby
kalzz has joined #ruby
mary5030 has joined #ruby
arup_r has joined #ruby
maloik has joined #ruby
arup_r is now known as Guest20066
hotpancakes has quit [Ping timeout: 272 seconds]
lurch_ has quit [Quit: lurch_]
tmtwd has joined #ruby
maloik has quit [Ping timeout: 260 seconds]
dkphenom has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yoongkang has joined #ruby
NeverDie has quit [Quit: http://radiux.io/]
dkphenom has joined #ruby
yoongkang has quit [Ping timeout: 255 seconds]
ellismarte has quit [Quit: ellismarte]
satoryu has joined #ruby
Gnut has quit [Ping timeout: 272 seconds]
Guest20066 is now known as arup_r
<jhass> &ri ARGF Kernel#puts Kernel#print @lookingeast
m3_del has quit [Remote host closed the connection]
agit0 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
m3_del has joined #ruby
wilsonc91 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
maloik has joined #ruby
djbkd has quit [Remote host closed the connection]
sarkis_ has quit [Ping timeout: 260 seconds]
m3_del has quit [Ping timeout: 255 seconds]
s00pcan has quit [Ping timeout: 260 seconds]
maloik has quit [Ping timeout: 240 seconds]
saddad has joined #ruby
wildtype has joined #ruby
DurstBurger has joined #ruby
wildtype has left #ruby [#ruby]
arup_r has quit [Quit: Leaving]
darkf has joined #ruby
arup_r has joined #ruby
tildes has joined #ruby
dimasg has joined #ruby
marsjaninzmarsa has quit [Quit: ZNC 1.7.x-git-438-e879203 - http://znc.in]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
marsjaninzmarsa has joined #ruby
sarkis_ has joined #ruby
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
marsjaninzmarsa has quit [Client Quit]
marsjaninzmarsa has joined #ruby
davedev2_ has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
ruby-lang971 has joined #ruby
bds has joined #ruby
yes`r has joined #ruby
Yzguy has quit [Quit: Zzz...]
sarkis_ has quit [Ping timeout: 260 seconds]
djbkd has joined #ruby
mary5030 has joined #ruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
yfeldblum has quit [Ping timeout: 272 seconds]
grill has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bds has quit [Ping timeout: 264 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
satoryu has quit []
m3_del has joined #ruby
sarkis_ has joined #ruby
AlphaAtom has quit [Quit: Textual IRC Client: www.textualapp.com]
Bugboy1028 has quit [Ping timeout: 240 seconds]
maloik has joined #ruby
s1kx has joined #ruby
Bugboy1028 has joined #ruby
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
St1gma has joined #ruby
hotpancakes has joined #ruby
naftilos76 has joined #ruby
zapata has joined #ruby
build22 has joined #ruby
maloik has quit [Ping timeout: 276 seconds]
bds has joined #ruby
dimasg has quit [Ping timeout: 264 seconds]
arooni has quit [Ping timeout: 272 seconds]
ruby-lang971 has quit [Ping timeout: 246 seconds]
build22 has quit [Ping timeout: 264 seconds]
bds has quit [Ping timeout: 260 seconds]
dikaio has quit [Quit: ........]
dlitvak has quit [Remote host closed the connection]
ecksit has quit [Quit: Textual IRC Client: www.textualapp.com]
maloik has joined #ruby
skade has joined #ruby
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby
marsjaninzmarsa has quit [Quit: ZNC 1.7.x-git-487-cbf5c38 - http://znc.in]
maloik has quit [Ping timeout: 260 seconds]
marsjaninzmarsa has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
favadi has joined #ruby
m3_del has quit [Remote host closed the connection]
sarkis_ has quit [Ping timeout: 252 seconds]
m3_del has joined #ruby
djbkd has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
m3_del has quit [Read error: Connection reset by peer]
lololo has joined #ruby
m3_del has joined #ruby
<lololo> hey ruby!
<al2o3-cr> hey!
SOLDIERz has joined #ruby
m3_del has quit [Remote host closed the connection]
marsjaninzmarsa has quit [Quit: ZNC 1.7.x-git-487-cbf5c38 - http://znc.in]
sarkis_ has joined #ruby
yoongkang has joined #ruby
trosborn has joined #ruby
hahuang61 has quit [Ping timeout: 264 seconds]
Rickmasta has joined #ruby
makenoise has joined #ruby
SOLDIERz has quit [Ping timeout: 240 seconds]
sarkis_ has quit [Ping timeout: 265 seconds]
CloCkWeRX has joined #ruby
yoongkang has quit [Ping timeout: 244 seconds]
makenoise has quit [Remote host closed the connection]
skweek has joined #ruby
djbkd has quit [Read error: Connection reset by peer]
bds has joined #ruby
sarkis_ has joined #ruby
djbkd has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
bds has quit [Ping timeout: 240 seconds]
dionysus69 has joined #ruby
sarkis_ has quit [Ping timeout: 244 seconds]
skweek has quit [Read error: Connection reset by peer]
skweek has joined #ruby
kp666 has joined #ruby
dlitvak has joined #ruby
kp666 has quit [Max SendQ exceeded]
safe has quit [Quit: Leaving]
kp666 has joined #ruby
tildes has quit [Ping timeout: 260 seconds]
kp666 has quit [Max SendQ exceeded]
kp666 has joined #ruby
sarkis_ has joined #ruby
kp666 has quit [Max SendQ exceeded]
psy_ has quit [Quit: Leaving]
kp666 has joined #ruby
cleopatra has quit [Quit: Saliendo]
kp666 has quit [Max SendQ exceeded]
kp666 has joined #ruby
User458764 has joined #ruby
kp666 has quit [Max SendQ exceeded]
dlitvak has quit [Ping timeout: 250 seconds]
skade has joined #ruby
kp666 has joined #ruby
kp666 has quit [Max SendQ exceeded]
djbkd has quit [Read error: Connection reset by peer]
kp666 has joined #ruby
djbkd has joined #ruby
sarkis_ has quit [Ping timeout: 244 seconds]
dhjondoh has joined #ruby
darkf has quit [Quit: Leaving]
myztic has joined #ruby
skade has quit [Ping timeout: 240 seconds]
yfeldblum has joined #ruby
krz has joined #ruby
sanjayu has joined #ruby
ta has quit [Remote host closed the connection]
IrishGringo has quit [Ping timeout: 246 seconds]
skweek has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
makenoise has joined #ruby
skweek has joined #ruby
build22 has joined #ruby
prosodyCagain is now known as prosody
mattwildig has joined #ruby
build22 has quit [Ping timeout: 260 seconds]
lurch_ has joined #ruby
lxsameer has joined #ruby
sarkis_ has joined #ruby
mattwildig has quit [Ping timeout: 252 seconds]
kp666_ has joined #ruby
axsuul has quit [Ping timeout: 240 seconds]
kp666 has quit [Ping timeout: 246 seconds]
sarkis_ has quit [Ping timeout: 244 seconds]
tagrudev has joined #ruby
solocshaw has quit [Ping timeout: 252 seconds]
agit0 has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
sjums has quit [Remote host closed the connection]
sarkis_ has joined #ruby
tmtwd has quit [Remote host closed the connection]
ur5us has joined #ruby
saddad has quit [Quit: WeeChat 1.4-dev]
sjums has joined #ruby
Trynemjoel has joined #ruby
Pupp3tm4st3r has joined #ruby
sarkis_ has quit [Ping timeout: 276 seconds]
hahuang61 has joined #ruby
bigkevmcd has joined #ruby
iateadonut has joined #ruby
crdpink has quit [Remote host closed the connection]
krz has quit [Read error: Connection reset by peer]
gambl0re has quit [Ping timeout: 260 seconds]
sarkis_ has joined #ruby
krz has joined #ruby
yoongkang has joined #ruby
DoubleMalt has joined #ruby
crdpink has joined #ruby
hahuang61 has quit [Ping timeout: 272 seconds]
cwong_on_irc has joined #ruby
trosborn has quit [Quit: trosborn]
sarkis_ has quit [Ping timeout: 276 seconds]
yoongkang has quit [Ping timeout: 260 seconds]
Xeago has joined #ruby
kp666 has joined #ruby
digneety has joined #ruby
DoubleMalt has quit [Ping timeout: 250 seconds]
kp666 has quit [Max SendQ exceeded]
ta has joined #ruby
kp666 has joined #ruby
sarkis_ has joined #ruby
kp666_ has quit [Ping timeout: 250 seconds]
anisha has joined #ruby
codecop has joined #ruby
Xeago has quit [Ping timeout: 244 seconds]
dlitvak has joined #ruby
Mon_Ouie has quit [Ping timeout: 255 seconds]
lsmola has joined #ruby
sarkis_ has quit [Ping timeout: 244 seconds]
CamonZ has quit [Quit: Textual IRC Client: www.textualapp.com]
dlitvak has quit [Ping timeout: 260 seconds]
duper has joined #ruby
trosborn has joined #ruby
bMalum has joined #ruby
makenoise has quit []
dopie has quit [Ping timeout: 240 seconds]
k3asd` has joined #ruby
cwong_on_irc has quit [Quit: Leaving.]
cwong_on_irc has joined #ruby
al2o3-cr has quit [Ping timeout: 264 seconds]
sarkis_ has joined #ruby
I has joined #ruby
trosborn has quit [Client Quit]
RobertBirnie has quit [Quit: Textual IRC Client: www.textualapp.com]
I is now known as Guest37493
Guest37493 has quit [Client Quit]
ta has quit [Remote host closed the connection]
DoubleMalt has joined #ruby
k3asd` has quit [Ping timeout: 260 seconds]
Xeago has joined #ruby
sarkis_ has quit [Ping timeout: 255 seconds]
Macaveli has joined #ruby
yardenbar has joined #ruby
gagrio has joined #ruby
Macaveli has quit [Client Quit]
djbkd has joined #ruby
haxrbyte has quit [Read error: Connection reset by peer]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nofxx has quit [Remote host closed the connection]
haxrbyte has joined #ruby
nofxx has joined #ruby
sarkis_ has joined #ruby
ohaibbq has quit [Quit: Leaving...]
skade has joined #ruby
build22 has joined #ruby
djbkd has quit [Ping timeout: 240 seconds]
Parko has quit [Quit: In a while, crocodile]
sarkis_ has quit [Ping timeout: 252 seconds]
reltihevoli has joined #ruby
<reltihevoli> hello
<reltihevoli> !ops
<ruboto> fflush, banisterfiend, apeiros, seanstickle, Mon_Ouie, zzak, Radar, Havenn, jhass, sevenseacat, Coraline, drbrain, miah, zenspider, workmad3, slyphon, rubyhacker1, Aria, ljarvis, baweaver, Adaedra
<baweaver> Happy to oblige
<reltihevoli> >> reltihevoli.reverse
<baweaver> !mute reltihevoli
<ruboto> reltihevoli # => undefined local variable or method `reltihevoli' for main:Object (NameError) ...check link for more (https://eval.in/474205)
toy has joined #ruby
aganov has joined #ruby
build22 has quit [Ping timeout: 265 seconds]
reltihevoli has left #ruby [#ruby]
motog2015 has joined #ruby
Feyn has joined #ruby
kies has quit [Ping timeout: 264 seconds]
adac has joined #ruby
sarkis_ has joined #ruby
zast has left #ruby [#ruby]
motog2015 has quit [Client Quit]
andikr has joined #ruby
djellemah has quit [Read error: Connection reset by peer]
stannard has joined #ruby
sarkis_ has quit [Ping timeout: 240 seconds]
timonv has joined #ruby
stannard has quit [Ping timeout: 246 seconds]
TomyWork has joined #ruby
skade has quit [Read error: Connection reset by peer]
sarkis_ has joined #ruby
<shevy> pretty interesting:
<shevy> unless defined?(Math.exp!)
<shevy> Object.instance_eval{remove_const :Math}
<shevy> never had the idea to use instance_eval like that :D
skade has joined #ruby
bMalum has quit [Ping timeout: 276 seconds]
darkf has joined #ruby
ta has joined #ruby
SOLDIERz has joined #ruby
sarkis_ has quit [Ping timeout: 260 seconds]
<jackcom> ruby is powerful language?
<shevy> yes
<shevy> strength 65
<jackcom> shevy: i can do hack with ruby
<shevy> nah
<jackcom> no?
<jackcom> :(
bMalum has joined #ruby
yoongkang has joined #ruby
digneety has quit [Ping timeout: 276 seconds]
sarkis_ has joined #ruby
tvw has joined #ruby
lxsameer has quit [Ping timeout: 252 seconds]
mary5030 has quit [Remote host closed the connection]
joonty has joined #ruby
chipotle has quit [Quit: cheerio]
yoongkang has quit [Ping timeout: 240 seconds]
dlitvak has joined #ruby
<jackcom> shevy: when you start learning ruby?
bb010g has quit [Quit: Connection closed for inactivity]
mark2 has joined #ruby
<shevy> jackcom hmm about 10 years ago or so
<jackcom> oh
<jackcom> what progrmming you made?
<jackcom> i don’t know what to to with ruby.
<jackcom> ?
digneety has joined #ruby
<shevy> dunno, mostly just whatever I have to work on with locally; right now I update my cookbooks so that I can be similar like this here http://www.linuxfromscratch.org/blfs/view/svn/general/libtiff.html
<jackcom> i don’t know what is it?
lxsameer has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
lxsameer has quit [Remote host closed the connection]
sarkis_ has quit [Ping timeout: 272 seconds]
<shevy> linux from scratch - allows you in principle to build your own custom linux from scratch and from source
kimegede has joined #ruby
<shevy> have a look at https://github.com/Homebrew/homebrew/commits/master/Library/Formula too - they also gather formulas
<jackcom> from web?
dlitvak has quit [Ping timeout: 255 seconds]
<shevy> well you have to compile it locally on your machine
arup_r has quit [Quit: Leaving]
<jackcom> puppy is yours?
<jackcom> i don’t know what is it. :(
scripore has joined #ruby
lubekpl has joined #ruby
vire has joined #ruby
lubekpl has quit [Client Quit]
lubekpl has joined #ruby
sarkis_ has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
<shevy> nah, puppy is that small distro right?
<jackcom> :(
<jackcom> i don’t know
<shevy> :\
skade has joined #ruby
scripore has quit [Client Quit]
<jackcom> shevy:
SCHAAP137 has joined #ruby
genpaku has quit [Remote host closed the connection]
sarkis_ has quit [Ping timeout: 276 seconds]
genpaku has joined #ruby
greenbigfrog has quit [Ping timeout: 264 seconds]
Xeago has joined #ruby
solars has joined #ruby
dionysus69 has quit [Quit: dionysus69]
lipoqil has joined #ruby
kp666_ has joined #ruby
DrShoggoth has quit [Quit: Leaving]
kp666_ has quit [Read error: Connection reset by peer]
<shevy> you gotta do something man
timonv has quit [Ping timeout: 246 seconds]
kp666 has quit [Ping timeout: 250 seconds]
sarkis_ has joined #ruby
genpaku has quit [Ping timeout: 264 seconds]
genpaku has joined #ruby
crayfishx has joined #ruby
aufi has joined #ruby
baweaver has quit [Remote host closed the connection]
sarkis_ has quit [Ping timeout: 276 seconds]
karapetyan has joined #ruby
djbkd has joined #ruby
sarkis_ has joined #ruby
build22 has joined #ruby
bds has joined #ruby
mattwildig has joined #ruby
djbkd has quit [Ping timeout: 255 seconds]
<jackcom> [1,2,3,4,5].map({ |i| i * 3 }) <—— why this occurs error? shevy
sarkis_ has quit [Ping timeout: 265 seconds]
greenbigfrog has joined #ruby
build22 has quit [Ping timeout: 264 seconds]
Xeago has quit [Remote host closed the connection]
marr has joined #ruby
bds has quit [Ping timeout: 272 seconds]
<jackcom> [1,2,3,4,5].map({ |i| i * 3 }) <—— why this occurs error? who know it?
mattwildig has quit [Ping timeout: 240 seconds]
axsuul has joined #ruby
<jackcom> shevy: help me
Emmanuel_Chanel has quit [Quit: Leaving]
<shevy> >> [1,2,3,4,5].map { |i| i * 3 }
<ruboto> shevy # => [3, 6, 9, 12, 15] (https://eval.in/474237)
<lookingeast> jackcom: remove the parenthesis
<jackcom> yeah but map is method lookingeast
aspiers_ is now known as aspiers
<shevy> you have to look up blocks in ruby jackcom: https://pine.fm/LearnToProgram/chap_10.html
sarkis_ has joined #ruby
<shevy> every method in ruby can optionally make use of blocks
<shevy> but you have to use either {} or do/end
<jackcom> ok thanks
<jackcom> shevy: :)
krz has quit [Read error: Connection reset by peer]
<shevy> I used to have difficulties with stuff such as: def foo(i, &block)
sarkis_ has quit [Ping timeout: 250 seconds]
krz has joined #ruby
sdfgsdfg has joined #ruby
teclator has joined #ruby
Xeago has joined #ruby
redlegion_ has quit [Ping timeout: 240 seconds]
hotpancakes has quit [Remote host closed the connection]
Emmanuel_Chanel has joined #ruby
Emmanuel_Chanel has quit [Max SendQ exceeded]
TDJACR has quit [Ping timeout: 240 seconds]
redlegion has joined #ruby
sarkis_ has joined #ruby
joonty has quit [Quit: joonty]
<skweek> https://slashdot.org/submission/5269067/lenovo-says-linux-voids-your-warrenty vote this up if you have a slashdot account
agent_wh1te has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
maloik has joined #ruby
<ja> skweek: That sounds ridiculous! Almost improbably so. Are you the one who posted it?
<skweek> ya
joonty has joined #ruby
sarkis_ has quit [Ping timeout: 240 seconds]
<skweek> I just got off o the phone, asked the rep to put a ticket to their complaints department
dlitvak has joined #ruby
yoongkang has joined #ruby
<ja> Jeez. I hope they get their shit together.
SCHAAP137 has quit [Read error: Connection reset by peer]
shredding has joined #ruby
<arahael> skweek: i'd reword that. the tone is awful.
dlitvak has quit [Ping timeout: 244 seconds]
<arahael> skweek: and try to get more evidence.
sarkis_ has joined #ruby
lookingeast has quit [Quit: leaving]
<ja> arahael: awful, really? only the very last sentence sounds tone-y to me
nettoweb has joined #ruby
agent_wh1te is now known as agent_white
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<arahael> ja: the last sentence is partivularly bad. the remainder is so-so.
yoongkang has quit [Ping timeout: 272 seconds]
* arahael grabs dinner.
<ja> arahael: bon appetit!
<adaedra> Bonjour
sarkis_ has quit [Ping timeout: 240 seconds]
TDJACR has joined #ruby
Hounddog has joined #ruby
Trynemjoel has quit [Ping timeout: 250 seconds]
htmldrum has quit [Ping timeout: 246 seconds]
hotpancakes has joined #ruby
SCHAAP137 has joined #ruby
bersimoes has joined #ruby
Trynemjoel has joined #ruby
skweek has quit [Remote host closed the connection]
sarkis_ has joined #ruby
<apeiros> moin adaedra
araujo has joined #ruby
araujo has joined #ruby
hotpancakes has quit [Ping timeout: 264 seconds]
sarkis_ has quit [Ping timeout: 246 seconds]
elaptics`away is now known as elaptics
moeabdol has joined #ruby
<jackcom> [1,3,5,4,6,7] <— how can i delete ‘5’?
<apeiros> jackcom: .delete(5)
<apeiros> jackcom: have you tried looking at the docs?
<jackcom> thanks apeiros :)
<jackcom> there is no solution apeiros
<jackcom> :(
<apeiros> I don't follow.
<canton7> "Try guessing the method you need to use to delete the element '5' from the array given below"
<jackcom> what you mean? apeiros
<apeiros> what do you mean, jackcom?
<jackcom> 8)
<jackcom> i don’t know
<apeiros> ok. then I can't help you.
Macaveli has joined #ruby
<jackcom> i am not normal now. i m ache on head.
<ja> jackcom: “Need a hint?”
<jackcom> [1,3,5,4,6,7].delete(5)
<jackcom> i do it already
<ja> :D
<apeiros> so what's your problem then?
<ja> I don't get how e.g. `a_longer_method_looks_kind_of_like_a_snake` looks like a snake, really, haha
<yorickpeterse> morning
digneety has quit [Ping timeout: 260 seconds]
<ja> happy morning to you, yorickpeterse
hotpancakes has joined #ruby
sarkis_ has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
<jackcom> Delete all the even numbers from the array given below. [1,2,3,4,5,6,7,8,9]
<jackcom> ?
<adaedra> &ri Array jackcom
tesuji has joined #ruby
<adaedra> Here are all the methods from Array, jackcom, look at them
senayar has joined #ruby
<jackcom> ok adaedra
<jackcom> :)
<adaedra> Mh, forgot the @.
ruurd has joined #ruby
<jackcom> delete([1,2,3,4,5,6,7,8,9])
<jackcom> :(
ismaelga has joined #ruby
<jackcom> ruby is too difficult to me.
<adaedra> why do you call delete like that
baweaver has joined #ruby
sarkis_ has quit [Ping timeout: 240 seconds]
<jackcom> how can i do? adaedra
karapetyan has quit [Remote host closed the connection]
<apeiros> jackcom: if you ask us for all solutions then you defeat the purpose of the exercise.
karapetyan has joined #ruby
<apeiros> jackcom: you will learn *nothing* that way.
<adaedra> jackcom: how do you call a method on an object?
<jackcom> [1,2,3,4,5,6,7,8,9].delete()
vikas027 has joined #ruby
<adaedra> that's better already
<adaedra> then, you need to tell it what to delete
<jackcom> what is solution? adaedra
<jackcom> all list
stan has joined #ruby
<adaedra> I won't gave you the solution all made, you'll have to scratch by yourself.
<jackcom> i m too young
<jackcom> heh
iateadonut has quit [Quit: Leaving.]
<adaedra> define "too young"
User458764 has joined #ruby
iateadonut has joined #ruby
<jackcom> i have no time
<adaedra> learning a programming language takes some time.
<jackcom> i want you give me solution adaedra
Hounddog has quit [Ping timeout: 272 seconds]
Hounddog has joined #ruby
<adaedra> You won
<adaedra> 't learn anything like that
<adaedra> grmbl, keyboard.
<ja> haha, “you won”
hotpancakes has quit [Ping timeout: 244 seconds]
<apeiros> is the grmbl, keyboard a good keyboard?
<ja> made me go “wat. he did? how?”
<adaedra> that's what I get for switching between EU and US keyboards. :/
<ja> oh wait, apeiros and adaedra are two different nicknames although they're the same length — I should really sleep soon… or try to wake up…
<adaedra> ahah
<apeiros> ja: ja, sind sie.
<adaedra> don't your client show nicks in different colours, ja?
<apeiros> colored nicks ftw (which I - of course - don't have)
ibouvousaime has joined #ruby
<ja> adaedra: it does not. I should get a plugin for that asap
<yorickpeterse> apeiros: peasant
baweaver has quit [Ping timeout: 272 seconds]
<apeiros> yorickpeterse: literate
sarkis_ has joined #ruby
<ja> apeiros: ik begrijpt niet, meneer, pardon
<apeiros> I wonder whether "wer lesen kann ist klar im vorteil" exists in english ("the one who can read clearly has an advantage")
build22 has joined #ruby
<ruurd> No it does not
<apeiros> ja: "ja" means "yes", so I said "yes, they are [different nicks]"
<apeiros> ruurd: tempted to make a snide comment on that :D
<ja> apeiros: ah, ja, dat makes zenz
Hounddog has quit [Read error: Connection reset by peer]
<ja> makts*
norc has joined #ruby
<norc> Hi folks.
<ja> hullo norc! :—3
<ruurd> apeiros the usual snideness or snidy snideness? :-)
duncannz has quit [Ping timeout: 276 seconds]
<apeiros> ruurd: the snidier snideness than usual
Hounddog has joined #ruby
al2o3-cr has joined #ruby
<ruurd> apeiros ok let me get my brother on the phone
<jackcom> i don’t know how can i delete all array?
<jackcom> help me
<jackcom> :(
<apeiros> jackcom: time you start learning on your own IMO.
blaxter has joined #ruby
<ruurd> Get Dash and look up array. Just create a new one over the old one. Duh.
colli5ion has joined #ruby
sarkis_ has quit [Ping timeout: 246 seconds]
build22 has quit [Ping timeout: 260 seconds]
<jackcom> [1,2,3,4,5,6,7,8,9].delete
<ja> jackcom: do you have irb?
<ja> jackcom: otherwise get irb
<jackcom> irb?
<apeiros> jackcom: do you know how to use documentation?
<jackcom> i don’t know
<ja> jackcom: and maybe try this: http://tryruby.org
<adaedra> do you know the basics of ruby?
<jackcom> i m reading it now
<apeiros> that's not documentation
<apeiros> that's a tutorial/course.
<ja> jackcom: irb is interactive ruby. a REPL. a Read-Eval-Print Loop. a “console” if you want to call it that. (like tryruby.org has too)
<apeiros> jackcom: 1) learn to use documentation, 2) learn to use irb or better yet: pry
<ja> jackcom: irb makes it very easy to experiment
dmolina1 has joined #ruby
thatkid_ has joined #ruby
Hounddog has quit [Ping timeout: 246 seconds]
Peg-leg has joined #ruby
<jackcom> i want learn monk
<jackcom> monk is easy
Hounddog has joined #ruby
<ja> jackcom: e.g. https://upl.io/n2f29f
<jackcom> and good web
<adaedra> jackcom: I gave you three different links yesterday to find Ruby documentation.
build22 has joined #ruby
<ja> (I should've named my array something other than `array` to make it less confusing, yeah. >.>)
<jackcom> i like monk site
<jackcom> monk is good for reading
<adaedra> It's a tutorial. You'll also need to read Ruby documentation, which is a different thing.
<adaedra> We don't tell you to stop using Monk, but to also have other things open.
sarkis_ has joined #ruby
skweek has joined #ruby
<norc> Anyone here using pry who can quickly reproduce a possible bug?
<adaedra> norc: go on
<norc> adaedra: try requiring an relative file from your current wd, and tab autocomplete it
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<jackcom> monk is automation web site. so i like it
<jackcom> adaedra:
<norc> like: require './<tab>
<adaedra> I feel like you're not even reading what we're telling you.
<ja> jackcom: you still need documentation. you will always need documentation.
<adaedra> norc: it removes my /.
* ja feels the same as adaedra
waka has quit [Remote host closed the connection]
build22 has quit [Remote host closed the connection]
<apeiros> jackcom: you want our help? how about starting to do as we tell you?
build22 has joined #ruby
waka has joined #ruby
<apeiros> jackcom: if you don't - please stop asking.
bersimoes has quit [Read error: Connection reset by peer]
<jackcom> :(
<norc> adaedra: Oh sorry, type in at least one character after the slash.
Hounddog has quit [Ping timeout: 272 seconds]
rdark has joined #ruby
<norc> [1] pry(main)> require './lError: uninitialized constant Pry::ObjectPath::StringScanner
<j416> norc: it explodes, yeah
<j416> I can reproduce
<apeiros> norc: doesn't happen for me
<adaedra> jackcom: learning a language takes time and dedication. It also goes through knowing how to look for things. We're happy to help with specific problems, but we are not specialized teachers, and are not here to do your own work. There's a part to do yourself, and you don't seem to do it.
<norc> apeiros: Which version are you using?
<adaedra> norc: it completes for me.
<adaedra> but not files.
<apeiros> norc: Pry::VERSION # => "0.10.3"
<j416> norc: Pry version 0.10.1 on Ruby 2.1.3
<apeiros> norc: on ruby 2.2.3
Spami has joined #ruby
<al2o3-cr> norc: I get error too like you
<j416> so it was fixed in 0.10.2 or 0.10.3, assumingly
sarkis_ has quit [Ping timeout: 250 seconds]
<norc> j416: Im getting it in 0.10.3
<adaedra> norc: {:pry=>"0.10.3", :ruby=>"2.2.3", :engine=>"ruby", :platform=>"x86_64-darwin14"} – completes, but wrongly
<j416> on Ruby ?
<norc> adaedra: Wrongly? How so
Hounddog has joined #ruby
<apeiros> norc: what happens when you require 'strscan'?
<adaedra> it completes methods, not files
<norc> j416: Yes. MRI 2.2.0 here
<j416> hum
<norc> adaedra: It's already loaded
<norc> err apeiros
bersimoes has joined #ruby
<apeiros> norc: ok. I thought because I might have it in my pryrc.
<norc> apeiros: Alright. Ill try it with 2.2.3
Juanchito has joined #ruby
digneety has joined #ruby
Kendos-Kenlen has joined #ruby
gustav_ has joined #ruby
Hounddog has quit [Read error: Connection reset by peer]
stephenh_ is now known as stephenh
jschmid has joined #ruby
Hounddog has joined #ruby
GarethAdams has joined #ruby
stephenh has quit [Changing host]
stephenh has joined #ruby
sarkis_ has joined #ruby
<norc> apeiros: It's still crashing. Can you pastie me your $LOADED_FEATURES ?
senayar has quit [Remote host closed the connection]
rodfersou has joined #ruby
<thatkid_> Beginner here, what does a redis client like redis.rb do? Can I use redis directly with ruby without using a client?
zotherstupidguy has quit [Quit: WeeChat 1.3]
htmldrum has joined #ruby
GarethAdams has quit [Client Quit]
rodfersou has quit [Client Quit]
<norc> apeiros: Wait what. Okay apparently the require 'strscan' fixes it indeed.
rodfersou has joined #ruby
<norc> It seems like it does something although it returns false.
GarethAdams has joined #ruby
suchness_ has joined #ruby
ur5us has quit [Remote host closed the connection]
<jackcom> adaedra: just one more time
<jackcom> i will never ask question to you
sarkis_ has quit [Ping timeout: 250 seconds]
<ja> jackcom: a question for you: have you ever opened the docs? even once?
<jackcom> yes ja
<ja> jackcom: good :3
<adaedra> the ruby docs?
<jackcom> yes
skweek has quit [Ping timeout: 246 seconds]
<jackcom> one more time plz
GarethAdams has quit [Client Quit]
Hounddog has quit [Ping timeout: 272 seconds]
<adaedra> what, one more time
Hounddog has joined #ruby
<jackcom> solution of delete all array
tulak has joined #ruby
<jackcom> adaedra:
<ja> jackcom: what do you even mean by “delete all array”?
<ja> you want to remove all the elements of an array?
<jackcom> no ja
<jackcom> delete array itself
<ja> then what?
<jackcom> ja:
<ja> there's no concept of deleting objects in Ruby, jackcom
yoongkang has joined #ruby
<jackcom> Delete all the even numbers from the array given below.[1,2,3,4,5,6,7,8,9]
<jackcom> ja:
<norc> ja: There is. But that is an entirely different story. :-)
<adaedra> That's totally different, jackcom
<ja> jackcom: yeah, they're talking about deleting/removing elements (the numbers) from the arary
sepp2k has joined #ruby
<jackcom> element
<jackcom> oh
<jackcom> ok
<ja> norc: really? ^_^ apart from the GC?
<adaedra> jackcom: you see the example code in your exercice
<adaedra> ?
nfk|laptop has joined #ruby
<norc> ja: For eduational purposes take a look at banister/free - note that this is not something you should want in your production code for most reasons. ;-)
<jackcom> [1,2,3,4,5,6,7,8,9].delete_if { |i| i/2 == 0 }
tulak has quit [Remote host closed the connection]
<jackcom> this is not correct?
<adaedra> try it?
<adaedra> you have an interactive lesson, use it
tulak has joined #ruby
sarkis_ has joined #ruby
vikas027 has quit [Read error: Connection reset by peer]
<jackcom> [1,2,3,4,5,6,7,8,9].delete_if { |i| i/2 == 0 } stdout:[2, 3, 4, 5, 6, 7, 8, 9]
<jackcom> what’s wrong?
<ja> norc: hah! that looks educationally interesting. thank you.
<agent_white> I'm helping a buddy learn ruby alongside me... just introduced him to the beauty that is pry. I think he crapped he shorts. ;)
Hounddog has quit [Ping timeout: 272 seconds]
<adaedra> jackcom: do you know what delete_if does?
<jackcom> yes
<adaedra> explain it to me
Hounddog has joined #ruby
senayar has joined #ruby
yoongkang has quit [Ping timeout: 272 seconds]
<maloik> oh hi
<norc> So who here with intimate knowledge can tell me what side effects a "require" has when a library already has been loaded.
<jackcom> if statement is true then delete it. adaedra
<adaedra> right.
<jackcom> :)
<adaedra> Now, when is your statement true?
blackmesa has joined #ruby
<jackcom> when it is even
<adaedra> are you sure?
<jackcom> yes
<norc> Because it *does* have side effects unless pry prepends before Kernel
axsuul has quit [Ping timeout: 250 seconds]
GarethAdams has joined #ruby
<adaedra> jackcom: what does i/2 gives for each one of the numbers between 1 and 9?
User458764 has joined #ruby
<jackcom> 1, 0, 3, 0, 5, 0, 7, 0, 9
digneety has quit [Changing host]
digneety has joined #ruby
<jackcom> heh
<adaedra> no it doesn't
<jackcom> then?
<ja> jackcom: … 1/2 = 0.5
<adaedra> ja: mathematically, yes, but here... :o)
lxsameer has joined #ruby
<jackcom> [1,2,3,4,5,6,7,8,9].delete_if { |i| i%2 == 0 }
<jackcom> i got it
kedare has joined #ruby
<al2o3-cr> yay!
<ja> adaedra: sorry. I'm really tired.
sarkis_ has quit [Ping timeout: 272 seconds]
ismaelga has quit [Remote host closed the connection]
ibouvousaime has quit [Ping timeout: 250 seconds]
<al2o3-cr> jackcom: did you check the hint by any chance?
hotpancakes has joined #ruby
vikas027 has joined #ruby
<jackcom> al2o3-cr: there is no hint
<adaedra> ja: inga problem.
<vikas027> Hello Everyone, How can I use a variable with quotes as an argument to the class ? I have this code https://dpaste.de/KhC7 where I am using LDAP filter which has few double quotes in it, but I am unable to use in Net::LDAP::Filter. I know it expects two variable, but the problem it is taking my variable isn't expanding there. If I do a `puts filter_all_users` anywhere in the code it works fine.
<jackcom> so i give a question
<al2o3-cr> jackcom: yep, there is
<ja> adaedra: åsch, skulle du villa ha en smörgås?
<adaedra> jackcom: there is a "Need a hint?" link.
<agent_white> Hey folks, looking for some advice on my factoid bot! Got 'er all working... but the code just doesn't seem pretty. https://github.com/jakenotjacob/vapebot/blob/master/lib/vapebot/bot.rb#L9 -- Any advice appreciated! Been pouring over other irc-bot code on github for ideas, and been looking at Event Queues, and the Command/Observer patterns for potential avenues of housekeeping.
FernandoBasso has joined #ruby
<adaedra> ja: inte nu, kanske senare.
<ja> adaedra: okej. bara säga när.
ibouvousaime has joined #ruby
<adaedra> agent_white: you've been writing an IRC bot from scratch? Why not use things like cinch or lita?
<agent_white> adaedra: Yup! And for learning purposes :)
<adaedra> 'k
hotpancakes has quit [Ping timeout: 240 seconds]
<ja> haha, I love when GitHub sporadically fails to indent a file and I go all “WTF, haven't they heard of indentation?! … oh, right, the GitHub indent bug…”
<agent_white> Same reason I wrote an IRC client in ncurses before this.
sarkis_ has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
hypnosb has quit [Ping timeout: 260 seconds]
<thatkid_> Offtopic, But I guess someone know it, How can I download videos from pluralsight ?
<norc> Oh darn. Byebug just explained to me that rubygems replaces Kernel#require - that probably explains it.
<vikas027> thatkid: there is a plugin in Mozilla called Download Helper
skade has joined #ruby
hypnosb has joined #ruby
skcin7 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
xcesariox has joined #ruby
Keltia has joined #ruby
sarkis_ has quit [Ping timeout: 240 seconds]
bds has joined #ruby
<al2o3-cr> vikas027: filter_all_users = ["sAMAccountName", "*"] and splat it
spiman has joined #ruby
shiru has joined #ruby
<adaedra> jackcom: also, you may be interested by this:
<jackcom> what? adaedra
<adaedra> &ri Integer#even?
moeabdol has quit [Ping timeout: 260 seconds]
<ja> Yeah, Integer#even? and Integer#odd? are great
alexherbo2 has joined #ruby
<adaedra> I've had a bad night of sleep, I need time to type today ;)
<vikas027> al2o3-cr: Thanks a ton for the hint. Worked like a charm. I am relatively new to Ruby. Thanks again
<jackcom> ok thanks adaedra :)
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
htmldrum has quit [Ping timeout: 272 seconds]
<al2o3-cr> vikas027: thats ok :)
roshanavand has joined #ruby
sarkis_ has joined #ruby
bds has quit [Ping timeout: 272 seconds]
<ja> vikas027: sorry, I'm simply curious: you're relatively new to Ruby, however you understood what “splat it” meant?
<ja> “SPLAT IT!” Aw, I love Ruby and its terminology.
* adaedra splats ja
<vikas027> ja: I am good at Google-ing :)
<adaedra> vikas027: good, that seems rare nowadays.
<vikas027> adaedra: :)
* ja dodges adaedra's splatting
* ja googles “splat”
* arahael maintains that google's crap these days.
<adaedra> how so?
<ja> “The Splat is a programming block that airs nightly on TeenNick. The block shows reruns of classic 1980s, 1990s and early-mid 2000s children's programming, mostly shows that aired on Nickelodeon during their original runs.” — uhuh
<ja> “programming block”! even sounds programming-related
<arahael> adaedra: If I search for the words "foo bar baz", I expect to see results that have the words "foo bar baz" in them.
<arahael> GOogle tries to guess too much what I mean.
<adaedra> That works for me
<ja> oh no, there're more?! adaedra, apeiros, arahael, what the hell are up with your nicknames?!
shiru has quit [Ping timeout: 246 seconds]
<ja> I need colors
Ilyes512 has joined #ruby
<adaedra> We're the A-team.
<arahael> ja: I was first.
<ja> LOL! Sweet.
<ja> arahael: how can you be so certain?
<norc> Good lord... If only I had never touched pry, I would have never figured out how bloated Rails is. :)
<adaedra> I love it when a code domes together!
<adaedra> comes*
sarkis_ has quit [Ping timeout: 240 seconds]
<arahael> ja: Do you doubt me?
<ja> arahael: not when you put it like that, no
<Cork> if i have a class that inherits from Hash, how to i "type cast" a hash into it?
<adaedra> Nick-registration-wise, you're the youngest, arahael.
<arahael> adaedra: I used to be "Arafangion".
<adaedra> Cork: you don't.
* arahael wonders if that's still registered.
arahael is now known as Arafangion
<Cork> adaedra: care to elaborate on that?
tulak_ has joined #ruby
<adaedra> You can ask NickServ directly.
<adaedra> Cork: you can't cast an object to something it isn't.
<Arafangion> adaedra: 2005, it seems.
<Arafangion> A decade ago.
djbkd has joined #ruby
<Cork> adaedra: ok, then how can i simplest convert a hash into a class MyHash < Hash; end ?
doddok has joined #ruby
<adaedra> Cork: you'll have to create a new MyHash object. Maybe with a constructor that takes a hash.
<Arafangion> adaedra: So, am I the oldest and youngest now?
sarkis_ has joined #ruby
<adaedra> Arafangion: let me check the exact date.
<adaedra> Ah yes, older than apeiros with this nick.
hotpancakes has joined #ruby
c355E3B has joined #ruby
tulak has quit [Ping timeout: 244 seconds]
ismaelga has joined #ruby
bds has joined #ruby
Macaveli has quit [Quit: Textual IRC Client: www.textualapp.com]
<ja> pretty cool to be both the youngest and oldest and the same time
mattwildig has joined #ruby
<adaedra> hehe.
<jackcom> hash means dictionary?
arup_r has joined #ruby
<adaedra> yeah
<jackcom> ok
<apeiros> ja: simple. there's 26 letters in the alphabet and 1k users
<Arafangion> Prior to Arafangion, I didn't register my nick.
<jackcom> i m good at dictionary
<jackcom> :)
ldnunes has joined #ruby
djbkd has quit [Ping timeout: 252 seconds]
futilegames has joined #ruby
suchness_ is now known as suchness
<apeiros> bah, only because I didn't register for ~4y
<ja> apeiros: wait wat
<apeiros> ja: not the oldest nick here starting with a
futilegames has quit [Client Quit]
<Arafangion> apeiros: Only amongst the a-team.
<Arafangion> apeiros: Did you seriously check out every a-nick?
<apeiros> Arafangion: do I look *this* crazy?
bds has quit [Ping timeout: 276 seconds]
sarkis_ has quit [Ping timeout: 246 seconds]
<ja> lol
<apeiros> but tbh, I pondered adding a bit of code to the updated ruboto to do that :D
skade has quit [Quit: Computer has gone to sleep.]
<apeiros> so yeah, maybe I am.
<ja> you a-people are crazy
mattwildig has quit [Ping timeout: 252 seconds]
<Arafangion> apeiros: Heh.
<Arafangion> ja: It's the normal people you have to watch out for.
<apeiros> ja: there's a reason "a" is in the midst of crAzy!
<adaedra> You can't write apeiros without ape.
<apeiros> says a dead ra
<adaedra> stop mixing letters.
bnizzle has quit [Ping timeout: 265 seconds]
<apeiros> the neutrals are the worst. you never know where they stand…
Ox0dea has joined #ruby
<adaedra> Welcome back, Ox0dea
<Ox0dea> Cork: https://eval.in/474333
<apeiros> -- captain zap brannigan
<adaedra> apeiros: says the swiss.
<ja> i better breakfast (yes, that actually is a verb (surprisingly)) before I choke on my you-people–induced laughter
<Cork> 0
<Ox0dea> 1
<apeiros> adaedra: probably the reason I love that quote so much :D
<Cork> opps Ox0dea i solved it with MyHash[*array]
<apeiros> lunch time for me. cya :D
<Cork> i was doing Hash[*....as_json.flatten] anyway
<apeiros> Ox0dea: sniper! ;-)
<Ox0dea> Cork: Sure, I was just showing you that your class can participate in "hashy" operations pretty seamlessly.
Rovanion_ has quit [Quit: WeeChat 0.4.2]
nso95- has joined #ruby
<apeiros> or "lurker" is actually more apt I guess
* apeiros afk
<Cork> Ox0dea: appreciated! and i'll save that, thx
<Cork> Ox0dea: actually... that is even better...
<Cork> will move to that :)
FernandoBasso has quit [Quit: Leaving]
trosborn has joined #ruby
<Cork> Ox0dea: thx!
krz has quit [Ping timeout: 260 seconds]
FernandoBasso has joined #ruby
bds has joined #ruby
<Ox0dea> Cork: Sure thing. :)
sarkis_ has joined #ruby
trosborn has quit [Client Quit]
jackcom has quit [Quit: jackcom]
<Ox0dea> ja: English verbs can't surprise me anymore. :P
EasyCo has quit [Quit: Connection closed for inactivity]
<Ox0dea> Pretty much every single one of the 25 most frequently used English verbs are all irregular.
bds has quit [Ping timeout: 252 seconds]
GarethAdams has quit [Quit: Leaving...]
arup_r has quit [Remote host closed the connection]
sarkis_ has quit [Ping timeout: 240 seconds]
<Arafangion> Ox0dea: That's only because nobody's regulated them yet.
skade has joined #ruby
ddv has quit [Ping timeout: 250 seconds]
<Ox0dea> Arafangion: Prescriptivism is for doctors.
BlackCoyote has joined #ruby
arup_r has joined #ruby
<Arafangion> Ox0dea: I wasn't prescribing.
hanmac has quit [Ping timeout: 240 seconds]
UtkarshRay has quit [Ping timeout: 240 seconds]
<Ox0dea> Arafangion: If I'm not much mistaken, we were both punning.
lipoqil has quit [Quit: Connection closed for inactivity]
<Ox0dea> That said, if you actually do think language should be "regulated", you are in fact a prescriptivist and should ask adaedra how well that's worked out.
UtkarshRay has joined #ruby
<adaedra> Plaît-il ?
<Arafangion> Ox0dea: I've always been bad at punning, and punning badly. I never mentioned that they should be 'regulated', only informing that they haven't, infact, been regulated as yet. A historian might say the same.
tubuliferous_ has quit [Ping timeout: 240 seconds]
sarkis_ has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
lurch_ has quit [Quit: lurch_]
ddv has joined #ruby
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
roshanavand has quit [Remote host closed the connection]
bnizzle has joined #ruby
spiman_ has joined #ruby
lurch_ has joined #ruby
roshanavand has joined #ruby
hotpancakes has quit [Remote host closed the connection]
<norc> Ox0dea - just the freak I need.
<Ox0dea> norc: At your service. :P
<norc> Apparently require 'strscan' # => false
spiman has quit [Ping timeout: 264 seconds]
<norc> Has a sideeffect.
<norc> Which?
sarkis_ has quit [Ping timeout: 246 seconds]
<Ox0dea> Arafangion: For what it's worth, "regularized" is probably the word you wanted, but the irregulars are such precisely because they've been with us for so long, and they're unlikely to disappear any time soon.
yoongkang has joined #ruby
<Arafangion> Ox0dea: Hmm, perhaps I might go with "regularised", but that's not a term I come across regularly.
ismaelga has quit [Read error: Connection reset by peer]
<shevy> norc pulling in files in ruby can always have sideeffects since every aspect of ruby can be changed at runtime
<Ox0dea> norc: Well, that'd be RubyGems' core extension, which does lots of spec validation and the like.
dlitvak has joined #ruby
ismaelga has joined #ruby
<norc> Ox0dea: That was my thinking as well, couldn't find any side effects in the MRI when returning false. ;-)
ddv has quit [Ping timeout: 250 seconds]
<norc> Really disgusting to have Kernel methods being monkey patched to change some intrinsic behavior.
platzhirsch has joined #ruby
<shevy> it's a feature at the same time
<norc> That particular part? I don't think so.
<shevy> yes it is
<norc> requiring an already loaded library changing constants?
<norc> How is that a feature.
<shevy> a "constant" is not a constant in ruby man
gustav_ has quit [Remote host closed the connection]
bartj3 has left #ruby ["Textual IRC Client: www.textualapp.com"]
<Ox0dea> norc: I mean, it's nice that gems can masquerade as "standard" libraries, no?
<Ox0dea> Not being able to tell the difference between a builtin and a custom construct is usually touted as a feature.
<shevy> the problem in regards to stdlib is that there is no way to restore the tabula rasa state again
<Ox0dea> Isn't there?
<Ox0dea> You could conceivably do a lot of heavy lifting in a `BEGIN` block to build up such a tablet.
<shevy> hack!
<Ox0dea> s/tablet/slate/, I guess.
<norc> Ox0dea: foo(); assert(require('some_lib') == false); foo()
<norc> I expect the behavior of foo() to not change.
yoongkang has quit [Ping timeout: 252 seconds]
<Ox0dea> norc: Wrong language. :P
<norc> You get the idea.
<Ox0dea> I do, but you're fighting the wrong battle.
<norc> If require tells me false it shouldn't define new constants behind the scenes in random libraries all over the place.
sarkis_ has joined #ruby
<norc> well
<shevy> require is a primitive way to add code
hanmac has joined #ruby
<norc> pry crashes on some file path tab expansion unless you explicitely require strscan, which however already is loaded to the features.
<shevy> how does import in python work? does it change core aspects of python? does python allow this actually?
<Ox0dea> norc: Yeah, that is pretty nasty. :/
<Ox0dea> Python's `import` provides considerably more granularity, but I can't say whether user code is allowed to change its semantics.
<norc> But then again, complaining about monkey patching core methods and using pry at the same time makes me a hypocrite.... :-)
ddv has joined #ruby
maloik has quit [Ping timeout: 252 seconds]
donske has joined #ruby
<Ox0dea> Ruby's near-infinite malleability is both a gift and a curse, to be sure.
<adaedra> monkey-patch no evil.
<shevy> monkeys need love and patches too
* adaedra patches shevy
<Ox0dea> $ gem install shevy -v 2.0
<shevy> adaedra the gorilla!
roshanavand has quit [Remote host closed the connection]
<adaedra> er no
adac has quit [Ping timeout: 244 seconds]
<shevy> ugh no?
<Arafangion> Ox0dea: I'm not sure they provide much more granulality in python.
roshanavand has joined #ruby
<Ox0dea> Arafangion: They do.
roshanavand has quit [Remote host closed the connection]
sarkis_ has quit [Ping timeout: 272 seconds]
roshanavand has joined #ruby
<Arafangion> Ox0dea: There is, strangely enough - less tradition of monkey-patching in python.
<Arafangion> Ox0dea: Could you give an example?
<shevy> python can swallow monkeys, I saw it on youtube
<norc> Ox0dea: To be fair the granular importing can be done in Ruby too, it's just that tons of gems only work by requiring some main library which autoloads everything.
<Ox0dea> Arafangion: Ruby's `require` is a file-based construct; Python's `import` lets you be much more specific about what you'd like to bring in.
<norc> Which makes it a developer issue. Not an issue with require.
gustav_ has joined #ruby
<Ox0dea> I disagree. `require` is only "granular" by dint of it being possible for a programmer to put each method in a separate file.
<Arafangion> Ox0dea: Well, yes, you could override the import machinery and import just /part/ of a file, or import something else, but that's not the default typcial behaviour. One typically imports a "module", whatever and however that module may be.
roshanavand has quit [Remote host closed the connection]
Rickmasta has joined #ruby
<Ox0dea> Arafangion: In Python?
<Arafangion> Ox0dea: Yes, in python
<Ox0dea> That's simply not true.
<Ox0dea> `from x import y, z` sees very wide usage.
maloik has joined #ruby
<Arafangion> Ox0dea: That imports all of 'x', but makes only y and z available.
<Arafangion> Ox0dea: Or rather, that executes all of 'x'.
<shevy> I'd like to have a more sophisticated inclusion way in ruby
User458764 has joined #ruby
<norc> shevy: We don't exclude you, don't worry.
Kendos-Kenlen has quit [Ping timeout: 240 seconds]
roshanavand has joined #ruby
roshanavand has quit [Remote host closed the connection]
sarkis_ has joined #ruby
<Ox0dea> Arafangion: The distinction isn't meaningless, of course, but I can't think of a better word than "granular" for that provision.
lxsameer has quit [Quit: Leaving]
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy> norc things such as pulling in stuff while giving it another namespace for instance
<Ox0dea> norc: Do you know about two-argument `load` yet? :P
<Ox0dea> It's probably going to make you angry.
<Arafangion> Ox0dea: Fair enough. G'night!
<Ox0dea> Au revoir.
maloik has quit [Ping timeout: 240 seconds]
<shevy> au la baguette!
akem has joined #ruby
<Ox0dea> Dominic Decoco!
nso95- has quit [Remote host closed the connection]
<norc> Ox0dea: Shoot
hotpancakes has joined #ruby
<Ox0dea> norc: You can tell it to execute the new code under an anonymous module, which is great, only it doesn't then *return* said module, which is retarded.
gguggi has quit [Ping timeout: 272 seconds]
<norc> So this is just a fancy way of forking... ?
sarkis_ has quit [Ping timeout: 252 seconds]
<norc> Brilliant.
<Ox0dea> More to do with namespacing?
<norc> What is the point?
<Ox0dea> Clobber prevention, for the most part.
<norc> If it does not return the module it's just a glorified monkey patch loader that doesn't clopper your NS
<norc> or am I misunderstanding something
GarethAdams has joined #ruby
doddok has quit [Ping timeout: 276 seconds]
<Ox0dea> norc: Well, it's not as if we can't get to that Module by way of ObjectSpace.
<norc> Was about to ask actually. :)
<Ox0dea> `load` is nice for hot-swapping, but I've done the requisite ObjectSpace dance at least twice now.
<shevy> ...
<shevy> this is why nobu does not offer you these things!
<shevy> you are just trying to break ruby
<Ox0dea> I try to shape it into exactly what I'd like it to be.
Spami has quit [Quit: This computer has gone to sleep]
<Ox0dea> There is simply no better Play-Doh for that purpose.
hotpancakes has quit [Ping timeout: 252 seconds]
<vikas027> Hello Everyone, My subtraction in array is not working fine https://dpaste.de/YMut Not sure, what I am missing as this https://dpaste.de/9iuV is working fine.
<shevy> tinkerdea
thatkid_ has quit [Ping timeout: 246 seconds]
<shevy> breakerdea
ibouvousaime has quit [Ping timeout: 260 seconds]
<shevy> >> %w( a b c ) - %w( b c )
<ruboto> shevy # => ["a"] (https://eval.in/474377)
<shevy> vikas027 so subtractions work fine, how do your arrays look like? do a p on the variable perhaps
<norc> vikas027: Array#- uses ==
ibouvousaime has joined #ruby
doddok has joined #ruby
<shevy> ah you did
<shevy> kumar? india? :)
<vikas027> shevy: yes from India but now in Australia :)
sarkis_ has joined #ruby
<shevy> >> %w( vkumar abcxyz hellome ) - %w( disabled_users abcxyz )
<ruboto> shevy # => ["vkumar", "hellome"] (https://eval.in/474378)
<shevy> well if your array have two strings that are same then this would work
prestorium has joined #ruby
<shevy> *arrays
<norc> vikas027: Im guessing that two ldap_objects representing the same object might not equal as you expect.
<shevy> vikas027 haha funny, my coworker's last name, last year at work, was kumar too :)
<vikas027> shevy: Yeah that's a common surname in North India
<Ox0dea> >> Foo = Class.new; Foo.new == Foo.new # vikas027
<ruboto> Ox0dea # => false (https://eval.in/474379)
maloik has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<Ox0dea> >> Foo = Class.new; [Foo.new] - [Foo.new] # more relevantly
<ruboto> Ox0dea # => [#<Foo:0x40504e58>] (https://eval.in/474380)
trosborn has joined #ruby
<shevy> you do like anonymous classes
sarkis_ has quit [Ping timeout: 255 seconds]
<Ox0dea> There are no anonymous classes there.
Coldblackice has quit [Ping timeout: 250 seconds]
<Ox0dea> >> Foo = Class.new; Foo.name
<ruboto> Ox0dea # => "Foo" (https://eval.in/474382)
marcoecc has joined #ruby
metalie has joined #ruby
bersimoes has quit [Read error: Connection reset by peer]
Spami has joined #ruby
Mon_Ouie has joined #ruby
kollapse has joined #ruby
<vikas027> shevy: I got the idea https://eval.in/474378 but how shall I expany my variables a and b here
glenny has quit [Quit: Konversation terminated!]
maloik has quit [Ping timeout: 260 seconds]
<vikas027> i am sorry, if that sounds too dumb
<norc> vikas027: Sorry I lied.
<norc> >> Foo = Class.new { def hash; 1; end; def eql?(o); true; end }; [Foo.new] - [Foo.new]
<ruboto> norc # => [] (https://eval.in/474383)
<kollapse> Hi. I'm making a ruby lib with about 10 tests in the tests/ directory. I know gemspec files permit s.test_files = ["tests/test_file1.rb"] but how can I make it select them all without having to manually write each one there ?
toy_ has joined #ruby
<shevy> vikas027 well, first make sure that you really have two arrays, with only strings there
<j416> kollapse: use something dynamic maybe
waka has quit [Remote host closed the connection]
waka has joined #ruby
<shevy> vikas027 I usually use pp for that
<Ox0dea> kollapse: s.test_files = Dir['test/**']
<shevy> vikas027 in your code, require 'pp'; pp c before you call .each
<j416> kollapse: I don't use test_files, but for files I tend to do s.files = `git ls-files`.split("\n")
bersimoes has joined #ruby
<j416> maybe what Ox0dea says is nicer.
<j416> dunno really
<Ox0dea> kollapse: Do you have a particular reason to be specifying your test files?
<shevy> vikas027 I reason that you can not have the above %w( vkumar abcxyz hellome ) - %w( disabled_users abcxyz ) because otherwise it would work; %w() just constructs an array so that is the same as ["disabled_users","abcxyz"]
<vikas027> shevy: I understand now, so this is a hash
blackmesa has quit [Ping timeout: 260 seconds]
<shevy> ok
yoongkang has joined #ruby
sarkis_ has joined #ruby
<shevy> you should be able to use .reject or .select to filter away the parts of the hash you want to have
<kollapse> Ox0dea, looks similar with what I was trying with Dir.glob(). Reason? Well not really, it's just what I've seen being done in the gemspec examples.
toy has quit [Ping timeout: 250 seconds]
<shevy> so in pseudo code "if the key is the same name, reject it" ... or merge ... you get the idea
<vikas027> shevy: Thanks for the hint, let me google that out
<shevy> \o/
bubbys has joined #ruby
<Ox0dea> kollapse: Aye, same thing, but j416 has the right of it in that just specifying all the files that comprise your gem is the more conventional approach.
<norc> shevy: No.. just no. :(
<norc> Just pry into the damn thing.
<Ox0dea> shevy: Yeah...
<norc> Those debug pp's floating all over ones code to debug what you are doing is so 1990.
<Ox0dea> vikas027: I'm pretty sure norc's diagnosis was correct.
<vikas027> Ox0dea: Yes, he was right
bkxd has quit [Ping timeout: 240 seconds]
<Ox0dea> vikas027: You do have Arrays, don't you?
<kollapse> Ox0dea, ok, will drop test_files :) thanks
millerti has joined #ruby
<norc> vikas027: The fix is simple. You probably consider two ldap objects equal if they have the same uid. That should give you enough to go from there. :)
<Ox0dea> kollapse: Sure thing. Be advised that you'll still want to specify them in, say, your Rakefile, where globbing is the right approach.
<norc> (Or more generally the same DN)
krz has joined #ruby
sarkis_ has quit [Ping timeout: 246 seconds]
<vikas027> norc: Yeah, trying that now
maloik has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
scripore has joined #ruby
bersimoes has quit [Read error: Connection reset by peer]
<shevy> norc simplicity works
trosborn has quit [Quit: trosborn]
krz has quit [Ping timeout: 260 seconds]
bersimoes has joined #ruby
sarkis_ has joined #ruby
skade has joined #ruby
moeabdol has joined #ruby
ismaelga has quit [Remote host closed the connection]
Neon has joined #ruby
sarkis_ has quit [Ping timeout: 240 seconds]
digneety has quit [Ping timeout: 252 seconds]
GarethAdams_ has quit [Ping timeout: 252 seconds]
avril14th has joined #ruby
stamina has joined #ruby
Pupp3tm4st3r has quit [Remote host closed the connection]
sarkis_ has joined #ruby
blackmesa has joined #ruby
GarethAdams_ has joined #ruby
CloCkWeRX has quit [Ping timeout: 240 seconds]
sarkis_ has quit [Ping timeout: 240 seconds]
Xeago has quit [Remote host closed the connection]
digneety has joined #ruby
freerobby has joined #ruby
bkxd has joined #ruby
ibouvousaime has quit [Ping timeout: 265 seconds]
benhuda has joined #ruby
Xeago has joined #ruby
gustav_ has quit [Remote host closed the connection]
ibouvousaime has joined #ruby
doddok has quit [Quit: Leaving]
Xeago has quit [Remote host closed the connection]
sarkis_ has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
Pupp3tm4st3r has joined #ruby
adac has joined #ruby
aryaching has joined #ruby
sarkis_ has quit [Ping timeout: 250 seconds]
<metalie> hi
doddok has joined #ruby
<metalie> im trying to use @user.update_attribute(:refers_counter, counter)
<metalie> but it just wont save it to DB
<metalie> anyone here can help?
<norc> metalie: Check for present errors.
<adaedra> rails?
<metalie> im new to ror, so what do you mean check for present errors? i tried to use @user.errors im getting undefind method
<apeiros> sounds like @user wasn't an AR::Base based model then…
<apeiros> ?rails metalie
<ruboto> metalie, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<apeiros> also ^
<metalie> if im using @user.update_attribute(:refers_counter, counter) , its comes out true and indeed the value is what counter sets it.. but when trying again its returing back to zero
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<vikas027> shevy, norc: I couldn't figure out how to use select, but created an array using push and then subtracted it ...which is workign fine :)
sarkis_ has joined #ruby
<norc> vikas027: I really recommend you figure out select though. Enumerable and its methods are one of the most common things in Ruby. :)
Kendos-Kenlen has joined #ruby
dmolina1 has quit [Quit: Leaving.]
dmolina has joined #ruby
lurch_ has quit [Quit: lurch_]
jackcom has joined #ruby
<vikas027> sure norc, I will do that tomorrow morning. Gotto hit the bed now, just have few hours to sleep. I am glad I could make few things work at least :)
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bersimoes has quit [Remote host closed the connection]
senayar has quit [Remote host closed the connection]
Ilyes512 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
senayar has joined #ruby
bryanray has joined #ruby
GarethAdams has quit [Quit: Leaving...]
lurch_ has joined #ruby
gustav_ has joined #ruby
sarkis_ has quit [Ping timeout: 272 seconds]
build22 has quit []
tubuliferous_ has joined #ruby
CloCkWeRX has joined #ruby
gustav_ has quit [Remote host closed the connection]
gustav_ has joined #ruby
hotpancakes has joined #ruby
sarkis_ has joined #ruby
atomical has joined #ruby
ibouvousaime has quit [Ping timeout: 250 seconds]
tater has quit [Remote host closed the connection]
xcesariox has joined #ruby
gustav_ has quit [Read error: Connection reset by peer]
gregf__ has quit [Quit: leaving]
gustav_ has joined #ruby
kobain has joined #ruby
rgrmatt has joined #ruby
gregf_ has joined #ruby
Melpaws has quit [Remote host closed the connection]
ibouvousaime has joined #ruby
hotpancakes has quit [Ping timeout: 265 seconds]
vikas027 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sarkis_ has quit [Ping timeout: 264 seconds]
atomical has quit [Ping timeout: 255 seconds]
JazzyVariable227 has joined #ruby
djbkd has joined #ruby
binaryplease has joined #ruby
mattwildig has joined #ruby
tater has joined #ruby
jeffreylevesque_ has joined #ruby
mbeasley has left #ruby ["WeeChat 0.4.2"]
badeball_ is now known as badeball
rethi has joined #ruby
jeffreylevesque has quit [Ping timeout: 240 seconds]
Macaveli has joined #ruby
djbkd has quit [Ping timeout: 264 seconds]
sarkis_ has joined #ruby
mattwildig has quit [Ping timeout: 255 seconds]
rgrmatt has quit []
tater has quit [Remote host closed the connection]
jeffreylevesque_ has quit [Ping timeout: 255 seconds]
BadBlock has joined #ruby
senayar has quit [Remote host closed the connection]
<BadBlock> Hi there
senayar has joined #ruby
senayar has quit [Changing host]
senayar has joined #ruby
tubuliferous_ has quit [Ping timeout: 252 seconds]
sarkis_ has quit [Ping timeout: 240 seconds]
sdothum has joined #ruby
darkxploit has joined #ruby
centrx has joined #ruby
<Ox0dea> Howdy, BadBlock.
<ja> Hullo
bersimoes has joined #ruby
<shevy> haha
<shevy> that nick... someone should use a nick called nein too
<shevy> then ja and nein can communicate with one another
tater has joined #ruby
tater has quit [Remote host closed the connection]
<ja> and “nej”
<ja> and “nee”
<ja> for danish & dutch
tater has joined #ruby
sarkis_ has joined #ruby
<ja> shevy: my host mask whatchamacallit is “unaffilated/nej” — doesn’t that count a bit?
tater has quit [Remote host closed the connection]
joonty has quit [Quit: joonty]
nfk|laptop has quit [Ping timeout: 246 seconds]
davedev24 has joined #ruby
<shevy> lol
<shevy> hejsan ja
c355E3B has quit [Quit: Connection closed for inactivity]
gagrio has quit [Ping timeout: 260 seconds]
<ja> halløjsa du, shevy
_blizzy_ has joined #ruby
aryaching has quit [Remote host closed the connection]
bersimoes has quit [Read error: Connection reset by peer]
bersimoe_ has joined #ruby
aryaching has joined #ruby
moeabdol has quit [Ping timeout: 272 seconds]
nfk|laptop has joined #ruby
binaryplease has quit [Ping timeout: 276 seconds]
sarkis_ has quit [Ping timeout: 250 seconds]
ibouvousaime has quit [Ping timeout: 272 seconds]
scripore has quit [Quit: This computer has gone to sleep]
tomaz_b has joined #ruby
gagrio has joined #ruby
gagrio is now known as gagrio|mtg
FernandoBasso has quit [Quit: Leaving]
Ropeney has joined #ruby
Ropeney has quit [Client Quit]
ibouvousaime has joined #ruby
bMalum has quit [Ping timeout: 246 seconds]
sarkis_ has joined #ruby
bMalum has joined #ruby
JazzyVariable227 has quit [Remote host closed the connection]
metalie has quit [Ping timeout: 246 seconds]
yes`r has quit [Ping timeout: 255 seconds]
bkxd has joined #ruby
Oli` has joined #ruby
sarkis_ has quit [Ping timeout: 240 seconds]
adac has quit [Ping timeout: 240 seconds]
synthroid has joined #ruby
Ox0dea has quit [Read error: Connection reset by peer]
platzhirsch has quit [Ping timeout: 276 seconds]
yfeldblum has quit [Ping timeout: 272 seconds]
g3funk is now known as braidn
aryaching has quit [Remote host closed the connection]
aryaching has joined #ruby
nertzy has joined #ruby
Tristan-Speccy has quit [Ping timeout: 240 seconds]
sarkis_ has joined #ruby
joonty has joined #ruby
bds has joined #ruby
moeabdol has joined #ruby
moeabdol has quit [Client Quit]
sgambino has joined #ruby
Ilyes512 has joined #ruby
yardenbar has quit [Ping timeout: 240 seconds]
gusTester has joined #ruby
sarkis_ has quit [Ping timeout: 250 seconds]
moeabdol has joined #ruby
roshanavand has joined #ruby
gusTester has left #ruby [#ruby]
bds has quit [Ping timeout: 264 seconds]
dlitvak has quit [Remote host closed the connection]
andikr has quit [Remote host closed the connection]
donske has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
wilsonc91 has joined #ruby
JazzyVariable227 has joined #ruby
benhuda has quit [Quit: Textual IRC Client: www.textualapp.com]
brendan- has joined #ruby
adac has joined #ruby
roshanavand has quit [Ping timeout: 264 seconds]
sarkis_ has joined #ruby
goodcodeguy has joined #ruby
blackmesa has quit [Ping timeout: 264 seconds]
JazzyVariable227 has quit [Remote host closed the connection]
mattwildig has joined #ruby
hotpancakes has joined #ruby
araujo_ has joined #ruby
Macaveli has quit [Quit: Textual IRC Client: www.textualapp.com]
Xeago has joined #ruby
Xeago has quit [Remote host closed the connection]
sarkis_ has quit [Ping timeout: 272 seconds]
voodo has joined #ruby
flori_ is now known as flori
kobain has quit [Ping timeout: 246 seconds]
GarethAdams has joined #ruby
araujo has quit [Ping timeout: 246 seconds]
GarethAdams has quit [Client Quit]
hotpancakes has quit [Ping timeout: 255 seconds]
stannard has joined #ruby
jrvlima has joined #ruby
krz has joined #ruby
Macaveli has joined #ruby
Macaveli has quit [Read error: Connection reset by peer]
roshanavand has joined #ruby
Macaveli has joined #ruby
sarkis_ has joined #ruby
ismaelga has joined #ruby
s2013 has joined #ruby
ismaelga has quit [Read error: Connection reset by peer]
ismaelga has joined #ruby
jrvlima has quit [Max SendQ exceeded]
ismael has joined #ruby
ismael is now known as Guest4871
ornerymoose has joined #ruby
yes`r has joined #ruby
krz has quit [Ping timeout: 265 seconds]
Xeago has joined #ruby
roshanavand has quit [Ping timeout: 252 seconds]
ismaelga has quit [Read error: Connection reset by peer]
Hounddog has quit [Remote host closed the connection]
djbkd has joined #ruby
sarkis_ has quit [Ping timeout: 276 seconds]
akem has quit [Remote host closed the connection]
atomical has joined #ruby
akem has joined #ruby
Xeago has quit [Remote host closed the connection]
Ilyes512 has quit [Ping timeout: 252 seconds]
Ilyes512_ has joined #ruby
ibouvousaime has quit [Ping timeout: 250 seconds]
sankaber has joined #ruby
djbkd has quit [Ping timeout: 250 seconds]
cwong_on_irc has quit [Quit: Leaving.]
nolic has joined #ruby
sarkis_ has joined #ruby
Xeago has joined #ruby
sankaber has quit [Remote host closed the connection]
sankaber has joined #ruby
Guest4871 has quit [Remote host closed the connection]
centrx has quit [Quit: If you meet the Buddha on the road, kill him.]
CodingWolf has joined #ruby
lurch_ has quit [Quit: lurch_]
Hounddog has joined #ruby
kobain has joined #ruby
bryanray has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Feyn has quit [Quit: Leaving]
lurch_ has joined #ruby
ismaelga has joined #ruby
sarkis_ has quit [Ping timeout: 264 seconds]
nertzy has quit [Quit: This computer has gone to sleep]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bryanray has joined #ruby
ibouvousaime has joined #ruby
jordanloky has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
s2013 has joined #ruby
sarkis_ has joined #ruby
Xeago has quit [Remote host closed the connection]
theRoUS has quit [Changing host]
theRoUS has joined #ruby
<jackcom> restaurant_menu.each do | item, price |
<jackcom> puts "#{item}: $#{price}"
<jackcom> end
<jackcom> is same : restaurant_menu.each { | item, price | puts "#{item}:$#{price} }"
sanjayu has quit [Remote host closed the connection]
<ja> heyy, see, jackcom, you're getting the hang of it now!
platzhirsch has joined #ruby
<jackcom> ?
<ja> !
<jackcom> what you mean? ja
<ja> I mean you're learning
<ja> It's good, jackcom!
<ja> :D
<jackcom> good
<jackcom> oh thanks
<jackcom> ja:
<ja> Good job
<jackcom> :)
sarkis_ has quit [Ping timeout: 246 seconds]
bMalum_ has joined #ruby
bMalum has quit [Ping timeout: 276 seconds]
bMalum_ is now known as bMalum
<ja> People: Do anyone actually write `private def` and `protected def`? On one line, i.e., so it looks like Java or whatever.
CodingWolf has quit [Ping timeout: 252 seconds]
<ja> (That's been possible since Ruby 2, am I wrong?)
CloCkWeRX has quit [Quit: Leaving.]
<ja> (As opposed to good old the `private\n\ndef …`)
<ja> order words can't even I
rdark has quit [Quit: leaving]
gagrio|mtg has quit [Ping timeout: 260 seconds]
<jhass> I think most people are used to writing it the old style
<ja> I think so too
<ja> though I kinda like the new style
<jhass> for what it's worth, all Crystal code uses the new style since the old style doesn't work there :P
zargos has joined #ruby
tomaz_b has quit [Quit: Leaving]
TomPeed has joined #ruby
<ja> oh, interesting! thanks, jhass
<ja> do you write in Crystal, jhass? ^_^
<ja> do people actually use it, generally, I wonder?
sarkis_ has joined #ruby
<jackcom> restaurant_menu = { "Ramen" => 3, "Dal Makhani" => 4, "Coffee" => 2 }
<jackcom> restaurant_menu.each { |item, price| restaurant_menu[item] = price * 1.1 }
<jackcom> puts restaurant_menu <— result: {"Ramen"=>3.3000000000000003, "Dal Makhani"=>4.4, "Coffee"=>2.2}
<jhass> some hobby projects
<jackcom> what’s wrong?
shlomo has joined #ruby
<jackcom> 3.30000000000000000003
<jackcom> ?
zargos has left #ruby [#ruby]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass> ja: pastebin, IRC bot, online code evaluation tool
<jackcom> ruby have big fault?
binaryplease has joined #ruby
<shevy> jackcom you and your fake stuff man :)
<jhass> jackcom: nope, you just entered the wonderful world of floating point arithmetic
<jackcom> 4.4 and 2.2 is normal
<jackcom> but 3.30000000000000000003 is abnormal? :(
<shevy> you can format them if you need a display of 3.3 only
Jardayn has joined #ruby
spiman_ has quit [Remote host closed the connection]
<maloik> jackcom: seeings as you're working with money/prices, you'll want to do it all in cents. Also, check out the money gem
adac has quit [Ping timeout: 265 seconds]
<jackcom> money gem?
<jackcom> :(
<jackcom> ruby have great fault. i think so
<maloik> the gem called money
<maloik> thats perfectly normal, because you know, computers
<maloik> the link shevy shared has the explanation for what you are seeing
sarkis_ has quit [Ping timeout: 244 seconds]
decoponio has joined #ruby
<shevy> jackcom it's a gem that makes money!
<shevy> first do:
<shevy> gem install money
yardenbar has joined #ruby
<shevy> then
<shevy> gem install richness
<shevy> etc...
<shevy> don't install the bitcoin gem though, I don't trust that one much at all
<jackcom> i don’t know :( anyway i will go next.
<sjums> ja, is it possible to define private methods per method?
<sjums> didn't even know :3
<ja> sjums: yeah, that's what I'm talking about
<ja> since Ruby 2, I think
nolic has quit [Quit: Lost terminal]
<shevy> sjums yeah should be possible
<sjums> Useful if you can't keep your code tidy and structure (aka useful for noobs like me)
<ja> `def foo; end` returns `:foo` and `private` and `protected` can take method names as symbols as arguments
<shevy> I think most people will still do a standalone "private"
gusTester has joined #ruby
<shevy> or, do it like the oldschool way and define it on a per-method basis :D
<ja> so it's really kind of a neat trick, I guess, with the symbol passing from def to private/protected ^_^
<ja> haha, yeah, you could do that, shevy :>
<shevy> what I did not like is that the:
<shevy> private def foo; puts 'foo!'; end
<shevy> or whatever it was... indents to the right
<ja> remember to mark all your public methods as public too ʘ‿ʘ
gusTester has left #ruby [#ruby]
<ja> what do you mean “indents to the right”?
rodfersou is now known as rodfersou|lunch
<shevy> Ox0dea showed some picture ... let me try to find it again
<ja> oh… like… in common editors?
toy_ has quit [Quit: Leaving...]
krz has joined #ruby
sarkis_ has joined #ruby
<shevy> I can't find it right now
<shevy> it were some rainbow colours - and pink
<ja> haha wot
<ja> so it was some editor that didn't support it properly?
treehug8_ has joined #ruby
treehug8_ has quit [Client Quit]
<shevy> aahh
<shevy> found it:
<ja> what the hell is up with that background in that screenshot? hahaha
araujo_ has quit [Ping timeout: 255 seconds]
tesuji has quit [Ping timeout: 255 seconds]
<ja> I think that looks pretty normal though, shevy, apart from `private` not being highlighted
CodingWolf has joined #ruby
<norc> What the heck is private.
araujo_ has joined #ruby
<norc> It does not look like a regular method mmm
<ja> ugh, I wish `def foo options = nil; options ||= {}; … end` could just be written as `def foo options = {}; … end` without it failing if you call foo with explicit nil…
<ja> norc: >> method :public # => #<Method: main.public>
<ja> >> method :private # => #<Method: main.private>
<ruboto> ja # => #<Method: main.private> (https://eval.in/474472)
bubbys has quit [Ping timeout: 260 seconds]
blackmesa has joined #ruby
<norc> ja: It is not a regular method.
wpp has joined #ruby
<ja> and then: >> method :protected # !> NameError: undefined method `protected' for class `Object' — wat!
sarkis_ has quit [Ping timeout: 272 seconds]
bubbys has joined #ruby
<norc> I just cannot figure out how it's implemented.
<ja> it seems pretty irregular, yeah
babblebre has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
adac has joined #ruby
<norc> All I know is that its not defined via rb_define_method
roshanavand has joined #ruby
IrishGringo has joined #ruby
linuxboytoo has joined #ruby
<ja> try rb_define_access_control_keyword ^__^
<ja> hurr hurr hurr
nettoweb has joined #ruby
rdark has joined #ruby
uri has joined #ruby
<ja> yorickpeterse: wtf!
Kendos-Kenlen_ has joined #ruby
<yorickpeterse> >> require 'date'; Date.parse('10 bottles of beer')
<ruboto> yorickpeterse # => #<Date: 2015-11-10 ((2457337j,0s,0n),+0s,2299161j)> (https://eval.in/474475)
<yorickpeterse> >> require 'date'; Date.parse('99 bottles of beer')
<ruboto> yorickpeterse # => invalid date (ArgumentError) ...check link for more (https://eval.in/474477)
<yorickpeterse> >> require 'date'; Date.parse('4 bottles of beer')
hotpancakes has joined #ruby
<ruboto> yorickpeterse # => invalid date (ArgumentError) ...check link for more (https://eval.in/474478)
<ja> srsly wat
<yorickpeterse> >> require 'date'; Date.parse('04 bottles of beer')
<ruboto> yorickpeterse # => #<Date: 2015-11-04 ((2457331j,0s,0n),+0s,2299161j)> (https://eval.in/474479)
<yorickpeterse> ah, that actually makes some sense
<yorickpeterse> it falls back to the current year/month when it can only find a day in a zero padded format
<maloik> so mr stuart just needs to lern2ruby and pad his 2 dogs date! :P
roshanavand has quit [Ping timeout: 240 seconds]
<yorickpeterse> yes
<yorickpeterse> what a scrub
Kendos-Kenlen has quit [Ping timeout: 250 seconds]
sarkis_ has joined #ruby
spiman has joined #ruby
roshanavand has joined #ruby
roshanavand has quit [Remote host closed the connection]
htmldrum has joined #ruby
kirun has joined #ruby
darkxploit has quit [Quit: Leaving]
dhjondoh has quit [Remote host closed the connection]
roshanavand has joined #ruby
<jackcom> i don’t know why method don’t need ‘()’ like keys?
haxrbyte has quit [Ping timeout: 250 seconds]
djcp has joined #ruby
stamina has quit [Quit: WeeChat 1.3]
hotpancakes has quit [Ping timeout: 260 seconds]
pzula has joined #ruby
<ruurd> >> require 'date'; Date.parse('04-10+2015 bottles of beer')
<jackcom> puts == p
<jackcom> ?
wilsonc91 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dmolina has quit [Read error: Connection reset by peer]
dmolina1 has joined #ruby
yes`r has quit [Ping timeout: 246 seconds]
<ja> jackcom: `p foo` is equivalent to `puts foo.inspect`
sarkis_ has quit [Ping timeout: 252 seconds]
<jackcom> inspect?
shredding has quit [Ping timeout: 272 seconds]
<Bish> insect?
wilsonc91 has joined #ruby
<ja> ja
<Bish> #jalives?
<ja> AFFIRMATORY
<norc> ja: use ap
<norc> :>
valetudo has joined #ruby
<ja> o yeah, the awesome_print!
<ja> I miss that
mattwildig has quit [Remote host closed the connection]
roshanavand has quit [Read error: Connection reset by peer]
roshanav_ has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
<norc> ja: Anyway I found it. It is a *private* method on main
<norc> And it is a very good thing that private is not a keyword but an actual method.
<norc> That means you can use it dynamically easily.
<ja> norc: Cool! What about `protected` though‽
skade has joined #ruby
sarkis_ has joined #ruby
rdavila has joined #ruby
<norc> ja: only used internally from what I can see.
Vile` has quit [Remote host closed the connection]
wilsonc91 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<norc> Correction
<Bish> can i actually define my own brackets in ruby?
Pumukel has joined #ruby
<norc> THey are all defined in http://ruby-doc.org/core-2.2.0/Module.html
<norc> Bish: Sure.
<jackcom> i don’t know why method don’t need ‘()’ like keys?
<Bish> i know about [], but could i write a method with works with <opening-char>something<closing-char>
<Bish> jackcom, because it's possible, that's all there is, you can do it as you like, but you will get problems if it's not well defined what you want to do
wilsonc91 has joined #ruby
BlackCoyote has quit [Remote host closed the connection]
<Bish> >> puts "hi"; puts("hi"); puts "same thing"
<ruboto> Bish # => hi ...check link for more (https://eval.in/474491)
<norc> Bish: If you want the bracket to be syntactically recognized, this is where you should start: https://github.com/ruby/ruby/blob/trunk/parse.y#L884-L889
<ja> jackcom: what do you mean “like keys”? { THIS_IS_A_KEY_IN_A_HASH: "and some value which happens to be a string } — I don’t see any “()” there… apart from the “{}”, but… yeah…
iyan has joined #ruby
<jackcom> thanks Bish :)
Vile` has joined #ruby
<ja> jackcom: like Bish said, the () are optional when calling methods
<norc> ja: Sometimes.
<ja> Yes
<ja> Sorry. Sometimes.
<ja> e.g. `request :get, @table, denormalize params` is a syntax error
wilsonc91 has quit [Client Quit]
<jackcom> Every Hash object has two methods: keys and values. <<—— ja
<norc> Most parser errors I have had were due to bizarre behavior of optional parens. :p
<ja> yeah, me too. or just, y'know… drinking on the job ^___^
sarkis_ has quit [Ping timeout: 250 seconds]
wilsonc91 has joined #ruby
NeverDie has joined #ruby
<ja> jackcom: yeah, Hash has `keys` and `values` methods for returning an array of just the keys or just the values.
<norc> Bish: But jokes aside, take an actual look at my link
<ja> s/has/have
<jackcom> yeah, ja ok
<jackcom> thanks :)
<norc> Bish: L859-L878 are the operators you can define. L879 is specific to the upcoming version and does not exist yet.
<ja> np, jackcom
dlitvak has joined #ruby
<Bish> ah, cool, but i can change these in runtime
<Bish> ?
<norc> Bish: Yes.
<ja> mmmm yacc files
dravine has joined #ruby
<Bish> cool.
<Bish> not that i will ever do that
<norc> Bish: Note that "unary+" just means +
<norc> Bish: There are plenty reasons to actually do it
<ja> norc: wat! how on earth would you change the parser at runtime?
<norc> ja: stubbing out methods for various reasons, testing, validations
<Bish> well i like prefix-calling-syntax actually
dorei has joined #ruby
<ja> norc: “how”, not “why”! :D
akem has quit [Read error: Connection reset by peer]
akem has joined #ruby
krz has quit [Read error: Connection reset by peer]
<norc> Bish: Let's ignore the fact that Ruby uses a VM under the hood, there is only runtime.
_stu_ has joined #ruby
<norc> Whether you require your libraries or have some event loop running - it's all runtime.
<Bish> ah now i get what you mean, since i found the lines, it's not what i meant
sarkis_ has joined #ruby
<norc> ja: How?
<ja> norc: I think I misunderstod. I thought you were talking about redefining the meaning of () or {}.
<Bish> what i meant was, if i was able to define stuff like "def method <open-char-defined-by-me>parameter<close-char-defined-by-me>"
<norc> Bish: Then you have to change the file I showed you.
<ja> yeah, but then it's not Ruby anymore
B1n4r10 has joined #ruby
<ja> then it's Bish's Ruby fork
<Bish> yeah, i got that.
<ja> BishRuby™ — has a nice ring to it
<ja> Buby? Maybe
<norc> Just make a pull request and convince nobu/matz - and then it will be trunk.
<Bish> BASICruby
<norc> :-)
closer has quit [Ping timeout: 272 seconds]
<shevy> ja I found that it visually displeases me ... my eyes have to jump to the right side, whereas normal def methods are aligned more to the left, as can be seen on the picture; although I am that kind of weird dude who actually does this craziness: def foo; new line here; end; then a ';' and a private :name_of_method_here
<ja> norc: how easily-convincible are nobu/matz? :3 eheheheh
<norc> ja: Depends on your Japanese.
_blizzy_ has quit [Ping timeout: 244 seconds]
<ja> shevy: lol, that *is* crazy! but yeah, I can understand how it can be visually displeasing
rippa has joined #ruby
<ja> norc: hai, hai! nihungoga wakarimas!
<norc> Anyone here on OSX? I think I managed to actually hang the Ruby process.
<norc> :-)
<ja> that was the worst japanese transliteration ever, I think
* ja @ OS X
<jackcom> how long it takes time to conquor ruby. i m studying hash part now.
<norc> ja: What Ruby version do you have?
<ja> norc: ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin15]
<Bish> Bishruby0.1
<ja> among others
<ja> haha yse
<norc> ja: StandardError.class.send(:define_method, :===) { |a| true }; raise StandardError
<ja> including bishruby 0.1
<norc> Run that against 2.2.3 please
Macaveli has joined #ruby
<norc> in irb
<adaedra> jackcom: depends on the person and the method.
gagrio|mtg has joined #ruby
lololo has quit [Quit: WeeChat 1.0.1]
<ja> roger wilco
crunk_bear has joined #ruby
<jackcom> method? adaedra what you mean?
<ja> haha, yeah, that hangs, norc
closer has joined #ruby
<norc> Interesting.
<adaedra> jackcom: how you learn it.
<Bish> >> StandardError.class.send(:define_method, :===) { |a| true }; raise StandardError
<ruboto> Bish # => StandardError (StandardError) ...check link for more (https://eval.in/474493)
sarkis_ has quit [Ping timeout: 265 seconds]
<Bish> HACKING IN PROGRESS...
<jackcom> adaedra: i learn it with monk
* adaedra hacks Bish
hotpancakes has joined #ruby
<ja> FBI: HACKED. ILLUMINATI: HACKED. BANKS: ALL HACKED.
<norc> ja: Well, it definitely is OSX specific. Under Linux flavors it just terminates irb
<Bish> hanks for me, too, im on linux.
<Bish> _.split.first.gsub(/k/,'g')
<ja> norc: odd. we need to try it on BeOS and HP-UX! ʘ‿ʘ
blueOxigen has joined #ruby
sarkis_ has joined #ruby
* ja hanks Bish
<Bish> it's also doing 100% cpu for me :D
<Ankhers> I just saw something like http://lpaste.net/145832 in a code base. From what I understand about the splat operator, that does nothing. Am I missing something?
<adaedra> > Redefines core methods
<adaedra> > Suprised things break
ta has quit [Remote host closed the connection]
tulak_ has quit [Ping timeout: 265 seconds]
<adaedra> >> [ [*1], [*[1]] ] # Ankhers
<ruboto> adaedra # => [[1], [1]] (https://eval.in/474498)
solocshaw has joined #ruby
bluOxigen has quit [Ping timeout: 272 seconds]
<jhass> adaedra: flatten is recursive
<jhass> er Ankhers ^
<ja> go a-team
<adaedra> Trouble with Tab, jhass?
pzula has quit [Ping timeout: 260 seconds]
<Ankhers> jhass: Sorry, I should have asked if bar.flatten! is the same thing as [*bar].flatten!
<adaedra> But yeah, followed by flatten makes little sense
subscope has joined #ruby
<adaedra> er yes it does
<jhass> depends on bar
sdfgsdfg has quit [Read error: Connection reset by peer]
<ja> hi subscope. cool nick.
<jackcom> normal[:zig] <—— i don’t know what is it?
<jhass> >> [*{a: :b}]
<ruboto> jhass # => [[:a, :b]] (https://eval.in/474501)
<Ankhers> jhass: It is an array.
<adaedra> but better would be def foo(*bar), no?
<ja> jhass: if `normal` is a Hash, that will return the value for the :zig key.
<ja> whoop.s
<ja> err, jackcom
* ja trouble tabs as well
<jackcom> error? ja
yoongkang has quit [Remote host closed the connection]
<ja> jackcom: if `normal` is a Hash, that will return the value for the :zig key. ^___^
hotpancakes has quit [Ping timeout: 265 seconds]
<adaedra> I tab complete on two keys, so for me ja is the person which gives me the most trouble :p
<adaedra> s/keys/letters/
krz has joined #ruby
Nahra has quit [Ping timeout: 240 seconds]
tagrudev has quit [Remote host closed the connection]
last_staff has joined #ruby
gagrio|mtg has quit [Quit: Leaving...]
centrx has joined #ruby
gagrio has joined #ruby
Nahra has joined #ruby
bluOxigen has joined #ruby
arup_r has quit [Remote host closed the connection]
blueOxigen has quit [Ping timeout: 255 seconds]
favadi has joined #ruby
dhollinger has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
favadi has quit [Client Quit]
norc has quit [Quit: Page closed]
Sp4rKy has quit [Changing host]
Sp4rKy has joined #ruby
dkphenom has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Bish> will windows ever get rubinius support? not that i use windows, just curious
<Bish> because i wrote my first script, that actually runs blazingly fast in comparison to MRI
User458764 has joined #ruby
kimegede has quit [Quit: Linkinus - http://linkinus.com]
maikowblue has joined #ruby
Xeago has joined #ruby
<yorickpeterse> Bish: unlikely to be added any time soon
mattwildig has joined #ruby
<yorickpeterse> we don't have any windows devs on board
<yorickpeterse> and there's a ton that would have to be done for proper Windows support
lurch_ has quit [Quit: lurch_]
<Bish> for example?
based_pdev has joined #ruby
chipotle has joined #ruby
<yorickpeterse> pretty much every stdlib that uses FFI
<yorickpeterse> (e.g. the Socket library)
<yorickpeterse> also I have doubts about the JIT working on Windows
<havenwood> Bish: Maybe try JRuby on Windows in the meanwhile.
chipotle has quit [Client Quit]
<yorickpeterse> and a lot of kernel code assumes POSIX
<Bish> i wasn't intending using windows at all, just curious
<jackcom> 1 is Fixnum or Integer?
<havenwood> jackcom: Ask it.
<Bish> >> 1.class
<ruboto> Bish # => Fixnum (https://eval.in/474514)
<yorickpeterse> There are random checks/sections that try to deal with Windows, but I doubt they've ever been tested properly
<havenwood> jackcom: Are you familiar with irb or pry?
<jackcom> irb or pry?
<yorickpeterse> jackcom: Fixnum inherits from Integer
<adaedra> >> 1.is_a? Integer
<jackcom> i never heard it. havenwood
<ruboto> adaedra # => true (https://eval.in/474515)
rdavila has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<adaedra> magic
<adaedra> jackcom: liar.
<yorickpeterse> Fixnum -> Integer -> Numeric -> Object
<jackcom> oh thanks yorickpeterse :)
<yorickpeterse> adaedra: don't be a cock
Trynemjoel has quit [Quit: Quitting]
<adaedra> yorickpeterse: what
<shevy> but what if adaedra is right
<Bish> yorickpeterse, do you have high hopes in rubinius, or does it's performance already make you happy?
<jackcom> ok i understand it.
<havenwood> jackcom: They are Read Eval Print Loops (REPLs). Ruby ships with irb and the pry gem is a popular alternative.
<yorickpeterse> Bish: there's a ton that needs to be improved
<havenwood> jackcom: You type your Ruby and it runs it and prints the results.
<jackcom> havenwood: too difficult.
<jackcom> anyway i will go next.
<jackcom> havenwood:
<shevy> lol
Ilyes512_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenwood> jackcom: In your terminal type: irb
<shevy> it's too difficult
<adaedra> jackcom: irb/pry are tools to help you experiment
<Bish> yorickpeterse, but you see potential it outranks all other implementations?
<jackcom> irb(main):001:0>
<adaedra> You can type ruby on it. Try: '1.class' then return
<Bish> jackcom, gratz!
<ja> jackcom: you really should get irb running as we suggested earlier ^__^
<havenwood> jackcom: To leave irb type: exit
<ja> whoops, I was scrolled up in my irc client
<jackcom> ok thanks
gustav_ has quit [Remote host closed the connection]
<jackcom> quit command work too.
<shevy> :D
<havenwood> jackcom: In irb try: 1.is_a? Integer
<havenwood> jackcom: And: 1.is_a? Fixnum
<jackcom> i will use script only
Trynemjoel has joined #ruby
<jackcom> ruby hello.rb
zeroDivisible has joined #ruby
<adaedra> why?
m3_del has joined #ruby
hostess_ is now known as hostess
<adaedra> irb is here to help you experiment
<jackcom> it is easy for me
<jackcom> i don’t like irb
<adaedra> you can try and see the result directly
<adaedra> it's great
tulak has joined #ruby
<jackcom> i will use script
<jackcom> ruby hello.rb
<havenwood> jackcom: You haven't tried irb long enough. :P
platzhirsch has quit [Ping timeout: 272 seconds]
<ja> irb is the best thing since unix
grill has joined #ruby
<adaedra> And then you have pry, which is even better than irb
<havenwood> ?pry
<ruboto> Pry, the better IRB. Includes easy object inspection via `ls`, `history`, docs view with `?`, source view with `$` and syntax highlighting, among other features (see `help` for more). It can also be used for easy debugging by putting `binding.pry` directly in your source code. Visit https://pryrepl.org/ or get it now with: gem install pry pry-doc
<yorickpeterse> yeah lets bury them in more stuff to learn
araujo_ has quit [Quit: Leaving]
teclator has quit [Ping timeout: 240 seconds]
<jackcom> -bash: pry: command not found
<Bish> hrhr
<havenwood> jackcom: If you `gem install pry` you can then type `pry` instead of `irb`.
<yorickpeterse> ^ that should give enough indications as to their experience level
<havenwood> jackcom: So first: gem install pry
<havenwood> jackcom: Then: pry
<jackcom> lol
<havenwood> jackcom: In Pry: ls 1
<Bish> yorickpeterse, didn't answer my question intentionally? :p?
<jackcom> i will use ruby only
<adaedra> yorickpeterse: don't worry, we'll repeat the same thing tomorrow anyway.
<yorickpeterse> Bish: oh, missed it
<havenwood> jackcom: irb ships with Ruby
<jackcom> ruby hello.rb
pandaant has joined #ruby
<yorickpeterse> Bish: outranking depends on your use case
<shevy> what is the content of hello.rb
<jackcom> i don’t like many thing
<yorickpeterse> startup time? Unlikely
<yorickpeterse> jackcom: not being so stubborn can be good at times
<Bish> well, hopefully all of them, who cares about startup time, bit annoying when doing rails with rbx
nertzy has joined #ruby
DoubleMalt has joined #ruby
<Bish> but that's about it.
<yorickpeterse> irb is pretty great to quickly try/explore things, don't bother with pry if you're not familiar with irb
<yorickpeterse> Bish: short startup time is kinda required for shell scripting needs
* Bish didn't know about pry
failshell has joined #ruby
avahey has joined #ruby
<yorickpeterse> so like I said, outranking depends on the use case
lurch_ has joined #ruby
momomomomo has joined #ruby
<ja> whoa, I should really use `ls` in Pry more…
<adaedra> pry is great.
<ja> it really is
<Bish> *_* pry
<ja> … irb too, if you aren't even using that… ^__^
<Bish> why didn't i know about this
momomomomo has quit [Client Quit]
<ja> s/you aren't/one isn't
<ja> Bish: Welcome, welcome!
<adaedra> Once you go pry, you can't go back :p
<ja> to the great world of Pry!
<ja> indeed, adaedra
<Bish> lol it even does less, when output is long
ismaelga has quit [Remote host closed the connection]
<Bish> yorickpeterse, well what about all other aspects?
<adaedra> There's completion also, for people who don't know,
ismaelga has joined #ruby
<adaedra> s/,\z/./
<yorickpeterse> If you want something that performs ok, supports POSIX, C extensions and concurrency, Rubinius is a good fit
jackcom has left #ruby [#ruby]
<yorickpeterse> As long as you're not already running Ruby 2.3 shit
<yorickpeterse> since our stdlib is pretty dated
* yorickpeterse is working on fixing that
<adaedra> ruby 2.3 _awesomeness_ you mean.
<yorickpeterse> To be more specific, if you can balance out some methods being slower with parallelism you should be fine
cwong_on_irc has joined #ruby
htmldrum has quit [Ping timeout: 240 seconds]
<yorickpeterse> if you're on BSD rbx might be a problem since our BSD support isn't that great I believe
<yorickpeterse> same goes for ARM
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<yorickpeterse> (ARM should work with the JIT disabled, but that's a bit pointless)
<Bish> but it will never outrun mri/jruby in method-calling-speed ?
Macaveli has joined #ruby
tubuliferous_ has joined #ruby
patdohere has joined #ruby
<yorickpeterse> It might at some point, depends on what we optimize
<yorickpeterse> e.g. last I checked fib() is already faster on Rbx :troll:
anisha has quit [Quit: Leaving]
<Bish> good to hear, because it's my favourite implementation
pzula has joined #ruby
krz has quit [Quit: WeeChat 1.2]
<Bish> i just had my first use case which could only be done faster in ruby, when using native threads
SOLDIERz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Bish> rubinius to the rescue, was a great experience
patdohere has quit [Max SendQ exceeded]
<yorickpeterse> oh, what was fact()
<yorickpeterse> not fib()
nfk|laptop has quit [Quit: yawn]
<Bish> fact is the prime example for jit, though, isn't it?
<yorickpeterse> oh lol, that dude now works for my old employer
<yorickpeterse> Bish: it's the prime example for everything
<yorickpeterse> gets very close to the metal
nsuke has quit [Read error: Connection reset by peer]
dimasg has joined #ruby
<Bish> in fact i already read that, only a few days ago
<yorickpeterse> heh
<Bish> in fact, hyuk hyuk
<yorickpeterse> zing
cdg has joined #ruby
rdavila has joined #ruby
<yorickpeterse> I hope to get GitLab running on rbx in a month or two or so
<yorickpeterse> it already boots and you can use the web UI, but didn't really test much more
platzhirsch has joined #ruby
<yorickpeterse> Though Racc segfaults at times, which will be fun to debug
<Bish> my first product will be running on rbx too, am i making a mistake :D?
<yorickpeterse> as long as it works, no?
<adaedra> yorickpeterse: then, will you use GitLab to host rbx? So you have rbx on GitLab on rbx?
rodfersou|lunch is now known as rodfersou
<Bish> well i don't know yet, im developing on mri, because of the mentioned startup times
<yorickpeterse> adaedra: rbx will stay on GitHub
jordanloky has quit [Ping timeout: 272 seconds]
<Bish> im using webmachine=>reel=>celluloid to make use of native threads, will i benefit from that? last question.
<yorickpeterse> at least we don't have any plans of moving any time soon
<Bish> sorry to annoy you
<yorickpeterse> Bish: np
arup_r has joined #ruby
<yorickpeterse> Bish: if Celluloid uses threads then yes, you should benefit from not having a GIL
<Bish> woo~
Rickmasta has joined #ruby
<yorickpeterse> last I checked Celluloid spawns 1 thread per actor, so you want to make sure you don't end up spawning tens of thousands in a loop
shredding has joined #ruby
<Bish> GIL can really looks like your computer is from 1998, when using threads, just experienced that, kinda fun to see
<Bish> can really make it look like your computer*
<yorickpeterse> it's a shame GILs are still employed in 2015
<adaedra> '98 was not a bad year, we won the world cup.
<Bish> like i knew who won the world cup '98. i don't even know who won last time.
<Bish> well shit i know.
jordanm has joined #ruby
spiman has quit []
<adaedra> I just happen to know for the '98 one, you know.
digneety has quit [Ping timeout: 272 seconds]
DoubleMalt has quit [Ping timeout: 250 seconds]
<Bish> yorickpeterse, yeah well, why did they? i mean, doesn't every programmer get pimples from implementing that?
tercenya has quit [Read error: Connection reset by peer]
darkxploit has joined #ruby
<adaedra> Legacy?
yqt has joined #ruby
<Bish> oO python has one, too
jordanloky has joined #ruby
<yorickpeterse> Bish: implementing a GIL makes things easier
skade has quit [Quit: Computer has gone to sleep.]
<yorickpeterse> it means not having to worry about making thread-safe APIs
<Bish> yeah, well, i figured, but why are they throwing away so much potential, when everything we do to make computers faster is too put more cpu-cores in it
chouhoulis has quit [Remote host closed the connection]
ldnunes has quit [Ping timeout: 272 seconds]
cornerma1 has joined #ruby
<yorickpeterse> wouldn't know
doddok has left #ruby [#ruby]
<Bish> but creating threads in ruby is so cool, changes are so small to make something multi-threaded
<Bish> jvm does not have native threads, right?
pzula has quit [Read error: Connection reset by peer]
<yorickpeterse> It does
<canton7> the jvm has native threads, sure
exadeci has quit [Quit: Connection closed for inactivity]
naftilos76 has quit [Ping timeout: 252 seconds]
eminencehc has joined #ruby
cornerman has quit [Ping timeout: 272 seconds]
blackmesa has quit [Ping timeout: 252 seconds]
cornerma1 is now known as cornerman
iyan has quit [Quit: iyan]
ldnunes has joined #ruby
<headius> yorickpeterse, Bish: fib is not faster in rbx than in jruby :-P
<headius> but I certainly hope that's not anyone's metric for which impl to use
djbkd has joined #ruby
<shevy> Bish python has pimples?
<yorickpeterse> headius: fib is totally a real world example
<yorickpeterse> everybody that's cool runs fib in the cloud using AWS lambda
<headius> nobody's capitalized on a hip fibonacci startup yet unfortunately :-(
mattarse has joined #ruby
<headius> FaaS
bMalum has quit [Quit: bMalum]
cwong_on_irc has quit [Quit: Leaving.]
m3_del has quit [Remote host closed the connection]
<headius> yorickpeterse: what a weird bug
<headius> "Why isn't rbx faster than it is right now"
djbkd has quit [Ping timeout: 260 seconds]
<yorickpeterse> heh
aryaching has quit [Ping timeout: 244 seconds]
aryaching has joined #ruby
karapetyan has quit [Remote host closed the connection]
vdamewood has joined #ruby
karapetyan has joined #ruby
millerti has joined #ruby
hotpancakes has joined #ruby
mattwildig has quit [Remote host closed the connection]
dfinninger has joined #ruby
darkxploit has quit [Quit: Leaving]
mary5030 has joined #ruby
chipotle has joined #ruby
karapetyan has quit [Ping timeout: 276 seconds]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
millerti has joined #ruby
hotpancakes has quit [Ping timeout: 272 seconds]
shinnya has quit [Ping timeout: 250 seconds]
yoongkang has joined #ruby
kies has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jen_ has joined #ruby
jen_ has left #ruby [#ruby]
Gnut has joined #ruby
Neon has quit [Ping timeout: 240 seconds]
agent_white has quit [Read error: Connection reset by peer]
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
binaryplease has quit [Ping timeout: 250 seconds]
roshanav_ has quit [Remote host closed the connection]
aganov has quit [Remote host closed the connection]
Pupp3tm4st3r has quit [Remote host closed the connection]
rubie has joined #ruby
agent_white has joined #ruby
yardenbar has quit [Ping timeout: 264 seconds]
yoongkang has quit [Ping timeout: 272 seconds]
roshanavand has joined #ruby
jonr22 has joined #ruby
DurstBurger has quit [Ping timeout: 246 seconds]
ibouvousaime has quit [Ping timeout: 272 seconds]
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
failshel_ has joined #ruby
lubekpl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
render___ has quit [Ping timeout: 240 seconds]
B1n4r10 has quit [Ping timeout: 264 seconds]
eminencehc has quit [Remote host closed the connection]
mary5030 has quit [Read error: Connection reset by peer]
eminencehc has joined #ruby
atmosx has joined #ruby
arthurix has quit [Remote host closed the connection]
failshell has quit [Ping timeout: 272 seconds]
blackmesa has joined #ruby
failshel_ is now known as failshell
dfinninger has quit [Remote host closed the connection]
mary5030 has joined #ruby
<shevy> they must use mruby!!!
araujo has joined #ruby
araujo has joined #ruby
dstarh has joined #ruby
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
s00pcan has joined #ruby
Rollabunna has quit [Quit: Leaving...]
linuxboytoo has quit [Remote host closed the connection]
Channel6 has joined #ruby
linuxboytoo has joined #ruby
bMalum has joined #ruby
blackmesa has quit [Ping timeout: 260 seconds]
aeontech has joined #ruby
linuxboytoo has quit [Read error: Connection reset by peer]
linuxboytoo has joined #ruby
akem has quit [Read error: No route to host]
|ifei5g00d has joined #ruby
|ifei5good has quit [Ping timeout: 272 seconds]
solars has quit [Quit: WeeChat 0.4.2]
digneety has joined #ruby
bzb has joined #ruby
ornerymoose has quit [Quit: ornerymoose]
skade has joined #ruby
bzb has quit [Remote host closed the connection]
jordanlo_ has joined #ruby
vire has quit [Ping timeout: 240 seconds]
aryaching has quit [Read error: Connection reset by peer]
momomomomo has joined #ruby
jordanloky has quit [Ping timeout: 276 seconds]
<shevy> "If you take this approach, your cats will die of cancer."
<shevy> hmm
urbanmonk has joined #ruby
wilsonc91 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aryaching has joined #ruby
blackmesa has joined #ruby
<headius> shevy: I don't see any mention ot Ruby in that Minecraft article
<headius> yorickpeterse: does oga do entity expansion?
<shevy> headius yeah unfortunately :(
<shevy> guess lua holds the foot in the door to games
hotpancakes has joined #ruby
<headius> there's a jruby plugin for Minecraft that lets you write plugins in Ruby
<headius> probably more direct than this Lua thing
<shevy> cool
wpp has quit [Quit: Textual IRC Client: www.textualapp.com]
<yorickpeterse> headius: No
<yorickpeterse> orr wait
<yorickpeterse> do you mean entities such as &nbsp;?
<headius> yorickpeterse: well, that's probably why you're not vulnerable to that CVE :-)
<yorickpeterse> Or entities defined in the doctype?
<yorickpeterse> doctypes are just parsed as is, nothing is evaluated
<yorickpeterse> the official XML/HTML entities are encoded/decoded
nettoweb has joined #ruby
<headius> oga doesn't support entities defined in the doctype then
cwong_on_irc has joined #ruby
weckl has joined #ruby
chouhoulis has joined #ruby
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
mark2 has quit [Remote host closed the connection]
SCHAAP137 has quit [Remote host closed the connection]
<yorickpeterse> correct
maloik has quit [Ping timeout: 240 seconds]
<headius> I suppose it's not surprising that oga isn't susceptible to a doctype entity expansion attack then :-)
<darix> headius: I already complained about the lack of custom entities.
<darix> he didnt want to listen.
<darix> :D
<yorickpeterse> They're not supported for that exact reason
antoniobeyah has joined #ruby
s2013 has joined #ruby
teclator has joined #ruby
TomyWork has quit [Remote host closed the connection]
<headius> yorickpeterse: well, it's nice that you can pick and choose which XML features to support then
Xiti has quit [Read error: Connection reset by peer]
<headius> but perhaps a bit disingenuous to talk about how oga's not vulnerable :-)
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
momomomomo has quit [Quit: momomomomo]
DurstBurger has joined #ruby
griffindy has joined #ruby
shlomo has quit [Quit: WeeChat 1.3]
digneety has quit [Ping timeout: 246 seconds]
CodingWolf has quit [Ping timeout: 240 seconds]
<yorickpeterse> well it's not vulnerable
sepp2k has quit [Quit: Leaving.]
CodingWolf has joined #ruby
<yorickpeterse> the underlying reason doesn't discredit that
momomomomo has joined #ruby
krajos has joined #ruby
bigkevmcd has quit [Ping timeout: 272 seconds]
s2013 has quit [Read error: Connection reset by peer]
elaptics is now known as elaptics`away
<headius> yorickpeterse: it's not vulnerable because it doesn't support the feature :-P
<headius> I imagine libyaml is not vulnerable to entity expansion attacks either
griffindy has quit [Client Quit]
<krajos> Can someone help my noob ass out? Why can't I get this regexp working: "if (string =~ /a.{0,2} z/)" ...what I'm trying to say is " From this string, let me know if there's a 'z', within three positions after an 'a'. Return true if so, false if not.
bigkevmcd has joined #ruby
<darix> headius: hmm cant you have blocks in yaml too? if i recall correctly there was this &foo thing to reference blocks
Kendos-Kenlen has joined #ruby
Kendos-Kenlen_ has quit [Read error: Connection reset by peer]
<headius> darix: that may be...you get my point though
arup___ has joined #ruby
Channel6 has quit [Ping timeout: 255 seconds]
Xiti has joined #ruby
subscope has quit [Quit: Textual IRC Client: www.textualapp.com]
svkurowski has quit [Ping timeout: 250 seconds]
arup_r has quit [Ping timeout: 240 seconds]
moted has quit [Ping timeout: 240 seconds]
psy_ has joined #ruby
<krajos> Hey everyone, I'm very new to ruby and I'm trying to get some help with regexp's... my expression is not working for some reason I can't pinpoint. Can someone please help me out? I want to find if a provided string has a 'z', within 3 chars after an 'a'. This is what I have: "if (string =~ /a.{0,2} z/)"
psy_ has quit [Max SendQ exceeded]
<krajos> But it's not working
<havenwood> krajos: note the space before the z
<havenwood> krajos: what's that space for?
varesa has quit [Ping timeout: 260 seconds]
svkurowski has joined #ruby
<krajos> my mistake, but it didn't work without the space either
hotpancakes has quit [Remote host closed the connection]
<havenwood> krajos: What's one example that doesn't work?
B1n4r10 has joined #ruby
<krajos> I stand corrected. It did work. I'm a dumbass.
Xeago has quit [Remote host closed the connection]
<krajos> Thanks!!
antoniobeyah has quit [Quit: antoniobeyah]
<havenwood> krajos: No prob, you're welcome.
gusrub has joined #ruby
aufi has quit [Quit: Konversation terminated!]
gusrub has quit [Client Quit]
<havenwood> krajos: Just an aside, but you can omit the `0` and just do `{,2}`.
<krajos> Ah, nice! Will do.
treehug88 has joined #ruby
<krajos> Stupid question but what is the ~ after the '=' for?
m_abdelfattah has joined #ruby
<m_abdelfattah> Hello, I've a question in Rails / ActiveAdmin... When I try to use rails date helper's distance_of_time_in_words inside activeadmin's collection_action, I get this error: undefined method `distance_of_time_in_words' for #<Admin::>.... So, how can I use rails helpers in activeadmin collection_action
<havenwood> krajos: =~ and !~ are the pattern match operators in Ruby
nofxx has quit [Remote host closed the connection]
nofxx has joined #ruby
nofxx has quit [Changing host]
nofxx has joined #ruby
<krajos> Ok great, now I know what to google. Thanks, Havenwood!
antoniobeyah has joined #ruby
B1n4r10 has quit [Ping timeout: 250 seconds]
<havenwood> krajos: "=~ is Ruby's basic pattern-matching operator."
minimalism has joined #ruby
<havenwood> krajos: That's ^ how it's said in the docs: http://ruby-doc.org/core/Regexp.html
dfinninger has joined #ruby
Kendos-Kenlen has quit [Quit: Konversation terminated!]
<krajos> Got it. So it returns nil if it doesn't match.. what if I want a straight false instead... could I use a plain ==? I'm gonna go try it out.
rdavila has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Xeago has joined #ruby
momomomomo has quit [Quit: momomomomo]
tulak has quit [Remote host closed the connection]
momomomomo has joined #ruby
<krajos> nope... can't use ==, =~ it is.
<krajos> Thanks again, have a good one.
krajos has quit [Quit: Leaving]
symm- has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
SenpaiSilver has joined #ruby
hotpancakes has joined #ruby
rdavila has joined #ruby
antoniobeyah has quit [Quit: antoniobeyah]
tercenya has joined #ruby
dimasg has quit [Ping timeout: 255 seconds]
momomomomo has quit [Ping timeout: 260 seconds]
antoniobeyah has joined #ruby
naftilos76 has joined #ruby
s2013 has joined #ruby
xcesariox has joined #ruby
antoniobeyah has quit [Client Quit]
s2013 has quit [Read error: Connection reset by peer]
shredding has quit [Ping timeout: 246 seconds]
SCHAAP137 has joined #ruby
bluOxigen has quit [Ping timeout: 272 seconds]
doddok has joined #ruby
tulak has joined #ruby
akem has joined #ruby
djstorm has joined #ruby
ir2ivps3 has joined #ruby
joonty has quit [Quit: joonty]
rejerson69 has joined #ruby
failshel_ has joined #ruby
solocshaw has quit [Ping timeout: 240 seconds]
dimasg has joined #ruby
Jardayn has quit [Quit: Leaving]
B1n4r10 has joined #ruby
failshell has quit [Ping timeout: 240 seconds]
stan has quit [Ping timeout: 272 seconds]
SCHAAP137 has quit [Ping timeout: 260 seconds]
senayar has quit []
Ilyes512 has joined #ruby
c0m0 has joined #ruby
<c0m0> programming in ruby, I need to use normal tabs or two spaces?
dmcp_ has joined #ruby
graffix__ is now known as graffix
<programmerq> c0m0: technically ruby supports both strategies, but I see the 2-space style much more commonly.
<c0m0> programmerq: Thanks
avahey has quit [Quit: Connection closed for inactivity]
<adaedra> convention is 2 spaces
pyon has quit [Ping timeout: 272 seconds]
rom has joined #ruby
momomomomo has joined #ruby
rom is now known as Guest32044
Guest32044 has quit [Client Quit]
urbanmonk has quit [Ping timeout: 250 seconds]
eminencehc has quit [Remote host closed the connection]
towski_ has joined #ruby
digneety has joined #ruby
yes`r has joined #ruby
troulouliou_div2 has joined #ruby
amclain has joined #ruby
<slash_nick> small convention
pyon has joined #ruby
dimasg has quit [Ping timeout: 272 seconds]
bds has joined #ruby
<nofxx> c0m0: also nice to mention is use a editor that eliminates white space, and covert tabs to spaces
teoric has joined #ruby
failshel_ has quit [Remote host closed the connection]
Peg-leg has quit [Quit: Leaving.]
SCHAAP137 has joined #ruby
<c0m0> I use vim with tabsize 2 space
digneety has quit [Ping timeout: 272 seconds]
<agent_white> >> module A; def self.included(klass); puts "included #{klass}"; end; end; class B; include A; end;
<ruboto> agent_white # => included B ...check link for more (https://eval.in/474575)
<agent_white> That is rad
* agent_white learns about included/extended
IrishGringo has quit [Ping timeout: 272 seconds]
hotpancakes has quit [Remote host closed the connection]
Vile` has quit [Remote host closed the connection]
<atmosx> c0m0: generally is not a good idea to use tabs. Better use spaces.
TomPeed has joined #ruby
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Vile` has joined #ruby
synthroid has quit [Remote host closed the connection]
ornerymoose has joined #ruby
nso95 has quit [Quit: nso95]
norc has joined #ruby
<agent_white> c0m0: Just add in "set expandtab" in your vimrc so it converts your tabs to spaces, and you can still spam your tab.
B1n4r10 has quit [Ping timeout: 240 seconds]
radgeRayden_ has quit [Ping timeout: 244 seconds]
<norc> Okay... So apparently I managed to crash Ruby into some form of uninterruptable infinite loop....
<bougyman> recursive method?
<norc> I dont know.
<norc> the cause lies in irb somewhere
<adaedra> norc: If ^C doesn't work, try ^\
<norc> All I do is throw an uncatchable exception
<norc> And then its gone until SIGKILL
Jardayn has joined #ruby
<agent_white> No! Let it go! We can power the infinite-energy machine!
<adaedra> we need a cat and buttered bread.
<norc> And it seema that my uncatchable exception had the complete opposite effect
<agent_white> adaedra: So... if we combine this, with catmachine, will it just hover?
<agent_white> And if so, can we ducktape it to a skateboard?
<norc> You need to watch back to the future again.
goodcodeguy has joined #ruby
_blizzy_ has joined #ruby
<adaedra> agent_white: http://i.imgur.com/aH3xCIR.gif
hahuang61 has joined #ruby
<agent_white> adaedra: Hahah I've seen that :D
<agent_white> So it's proven. If you ducktape two cats, back to back to each other, they will float.
<agent_white> Or buttered toast.
<adaedra> `cat | tac` ?
momomomomo has quit [Quit: momomomomo]
* agent_white runs and watches computer explode
rdavila has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Pumukel has quit [Ping timeout: 272 seconds]
aryaching has quit []
<slash_nick> they must be simulating 0-g
Xeago has quit [Remote host closed the connection]
hahuang61 has quit [Ping timeout: 246 seconds]
ismaelga has quit [Remote host closed the connection]
<agent_white> slash_nick: Theres tax dollars hard at work!
jaequery_ has joined #ruby
synthroid has joined #ruby
atmosx has quit [Quit: parting / quiting]
roshanav_ has joined #ruby
hotpanca_ has joined #ruby
hotpanc__ has joined #ruby
DroidBurgundy has joined #ruby
nofxx has quit [Remote host closed the connection]
hotpanca_ has quit [Remote host closed the connection]
adac has quit [Ping timeout: 255 seconds]
nofxx has joined #ruby
c0m0 has quit [Ping timeout: 276 seconds]
<agent_white> Is `class Foo; def Foo.method...` the same as `class Foo; def self.method...` ?
<jhass> agent_white: yes, since self inside class is Foo
karapetyan has joined #ruby
mrtomme has quit [Ping timeout: 260 seconds]
roshanavand has quit [Ping timeout: 272 seconds]
<jhass> that is both self inside class and the constant Foo point to the same object
<agent_white> jhass: Ah! Which syntax is preferred?
roshanav_ has quit [Read error: Connection reset by peer]
<jhass> self.
<agent_white> Okey doke!
<jhass> since then you can just rename the class
<agent_white> Thank you
yes`r has quit [Ping timeout: 276 seconds]
<agent_white> Ahhh
norc_ has joined #ruby
mrtomme has joined #ruby
yes`r has joined #ruby
<norc_> agent_white: For larger blocks you can also open the singleton class by using class << self
ismaelga has joined #ruby
<jhass> and for utility modules Module#module_function comes in handy
<norc_> Okay, so who here has debugging experience with Ruby? I need some pointers here, because I have no idea how to approach this bizarre bug.
mattwildig has joined #ruby
<agent_white> Good deal, I'll look into both of those!
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
cjbottaro has joined #ruby
_stu_ has quit [Quit: _stu_]
treehug88 has quit [Ping timeout: 240 seconds]
centrx has quit [Quit: If you meet the Buddha on the road, kill him.]
Xeago has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mattwildig has quit [Ping timeout: 240 seconds]
colli5ion has quit [Ping timeout: 276 seconds]
<norc_> Okay I think I figured it out. Was a mistake in my "uncatchable exception".
<agent_white> And also on that note... what are Class methods good for then, if they can't access instance vars/methods, but instance vars can use them? Just... scoping?
<norc_> Does Ruby disable its SIGINT handlers while handling exceptions?
nofxx has quit [Remote host closed the connection]
nofxx has joined #ruby
SteppenII has joined #ruby
<norc_> agent_white: Inheritance
<agent_white> norc_: Ah ok
<norc_> If you don't need that, chances are you will want to use a Mixin instead.
m_abdelfattah has quit [Ping timeout: 255 seconds]
<jhass> agent_white: constructing instances for example
<norc_> agent_white: And in reality there are no class methods.
<norc_> Well. In full truth there are ONLY class methods.
yoongkang has joined #ruby
<agent_white> norc_: A class is a module is a class is a module kinda thing? ;P
baweaver has joined #ruby
_stu_ has joined #ruby
dimasg has joined #ruby
<norc_> agent_white: What you call an "instance method" actually is a method of the class itseelf.
<norc_> agent_white: And what you call a "class method" is a method of the singleton class of that class.
<norc_> Only classes have methods.
naftilos76 has quit [Remote host closed the connection]
ChameleonSix has joined #ruby
<agent_white> Ohhhh
<ChameleonSix> ?
<norc_> >> def foo; end # even that is added to a class
<ruboto> norc_ # => :foo (https://eval.in/474594)
<norc_> Namely to the singleton class of the main object.
<ChameleonSix> Hmm
<norc_> Or.
dmolina1 has quit [Ping timeout: 240 seconds]
<ChameleonSix> Methods ?
teoric has quit [Quit: WeeChat 1.3-dev]
<norc_> Correction
<agent_white> Hm?
mattwildig has joined #ruby
<norc_> They get added to Object.
<norc_> That was my bad.
ismaelga has quit [Remote host closed the connection]
yoongkang has quit [Ping timeout: 272 seconds]
<ChameleonSix> What are you talking about
maloik has joined #ruby
bryanray has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<agent_white> norc_: Are you referencing the eval code you just showed?
<norc_> agent_white: No Im confused. Give me a moment Im talking nonsense here
<agent_white> :P
jordanlo_ has quit [Quit: Textual IRC Client: www.textualapp.com]
asas has joined #ruby
moeabdol has quit [Read error: Connection reset by peer]
<norc_> agent_white: Defining a function in top level namespace adds it as a private method of Objects singleton class.
<ChameleonSix> You are ruby experts ?
* agent_white eye's glaze over
moeabdol has joined #ruby
<norc_> God Im only talking nonsense today.
<norc_> >> def foo; end; Object.class.private_instance_methods(false).include?(:foo)
<ruboto> norc_ # => false (https://eval.in/474596)
<norc_> >> def foo; end; Object.private_instance_methods(false).include?(:foo)
<ruboto> norc_ # => true (https://eval.in/474597)
<norc_> There.
pzula has joined #ruby
<norc_> ChameleonSix: Evidently not.
<agent_white> Huh...
symm- has quit [Ping timeout: 255 seconds]
<agent_white> norc_: Ahhh I see. Nah that makes sense :)
ldnunes has quit [Quit: Leaving]
ldnunes has joined #ruby
<ChameleonSix> Lol
<norc_> Still wrapping my head around this. :-)
<ChameleonSix> ?
<ChameleonSix> What is it ?
tulak has quit [Remote host closed the connection]
lagweezle has left #ruby [#ruby]
Oatmeal has joined #ruby
moeabdol has quit [Read error: Connection reset by peer]
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
diegoaguilar has joined #ruby
moeabdol has joined #ruby
ChameleonSix has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
failshell has joined #ruby
eminencehc has joined #ruby
RegulationD has quit [Remote host closed the connection]
jonr22 has quit []
bds has quit [Quit: leaving]
mattwildig has quit [Remote host closed the connection]
roshanavand has joined #ruby
chouhoul_ has joined #ruby
goodcodeguy has joined #ruby
s1kx has quit [Ping timeout: 252 seconds]
chouhoulis has quit [Ping timeout: 272 seconds]
roshanavand has quit [Ping timeout: 240 seconds]
kollapse has quit [Quit: Out of sector]
failshell has quit []
[Butch] has joined #ruby
<agent_white> >> alias :top_hey; def hey; puts "heya"; end; class Foo; def top_hey; end; end; Foo.top_hey
<ruboto> agent_white # => /tmp/execpad-0e2ceabdc871/source-0e2ceabdc871:2: syntax error, unexpected ';' ...check link for more (https://eval.in/474616)
<agent_white> >> alias :top_hey :hey; def hey; puts "heya"; end; class Foo; def top_hey; end; end; Foo.top_hey
<ruboto> agent_white # => undefined method `hey' for class `Object' (NameError) ...check link for more (https://eval.in/474617)
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
<agent_white> >> def hey; puts "heya"; end; alias :top_hey :hey; class Foo; def top_hey; end; end; Thing.top_hey
<ruboto> agent_white # => uninitialized constant Thing (NameError) ...check link for more (https://eval.in/474618)
User458764 has joined #ruby
<agent_white> >> def hey; puts "heya"; end; alias :top_hey :hey; class Foo; def top_hey; end; end; Foo.top_hey
<ruboto> agent_white # => private method `top_hey' called for Foo:Class (NoMethodError) ...check link for more (https://eval.in/474619)
<agent_white> Hm damn.
digneety has joined #ruby
<agent_white> Works in pry for me.
arup___ has quit []
lurch_ has quit [Quit: lurch_]
pandaant has quit [Remote host closed the connection]
_stu_ has quit [Quit: _stu_]
voodo has quit [Quit: Leaving...]
karapetyan has quit [Ping timeout: 240 seconds]
Pumukel has joined #ruby
blackmesa has quit [Ping timeout: 260 seconds]
troulouliou_div2 has quit [Quit: Leaving]
i8igmac has joined #ruby
icemancast has joined #ruby
<i8igmac> >> 123.to_s(16)
<ruboto> i8igmac # => "7b" (https://eval.in/474623)
<i8igmac> I can't remember how to do the same thing with array
hotpanc__ has quit [Remote host closed the connection]
<i8igmac> arr.to_s(16)
hahuang61 has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
blaxter has quit [Ping timeout: 272 seconds]
<jhass> i8igmac: what would you expect back?
<i8igmac> arr=["1","2","3"]
<i8igmac> the same results as eval shows
<jhass> mmh, but you already have strings as the array elements?
icemancast has quit [Ping timeout: 264 seconds]
<jhass> >> ["1", "2", "3"].join.to_i.to_s(16) # but this operation looks really sill
<ruboto> jhass # => "7b" (https://eval.in/474627)
<jhass> silly
icemancast has joined #ruby
hahuang61 has quit [Ping timeout: 264 seconds]
nettoweb has joined #ruby
yeticry has quit [Read error: Connection reset by peer]
<i8igmac> it is silly, playing with my android phone...
yeticry has joined #ruby
<i8igmac> Ok, sorry but I made a mistake... the array will have a-z 0-9
<jhass> I don't get what you want
<jhass> ?xy
<ruboto> it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
mellor7 has joined #ruby
<i8igmac> I guess this is called radix. There is a gem for it
<i8igmac> but currently I don't have the gem installed on this phone
<jhass> you're only increasing my confusion over your goal
arooni has joined #ruby
<i8igmac> I'm trying to produce a progressive permutation using radix
jessemcgilallen has joined #ruby
<jhass> google gives me only 114 results for "progressive permutation". Are you sure it's a thing?
zacstewart has joined #ruby
<jhass> meh, statistics, I bail
<i8igmac> Sorry. Its more of a radix instead of a permutation
hotpancakes has joined #ruby
skcin7 has joined #ruby
pard has joined #ruby
futilegames has joined #ruby
<pard> greet
baweaver has quit [Remote host closed the connection]
mattwildig has joined #ruby
<pard> is there any way to have op-calls receive iters too?
BTRE has quit [Quit: Leaving]
<pard> i mean
<jhass> pard: that lacks 42 metric tons of context
<pard> can they be treated like any other call?
<pard> :)
<jhass> what do you call an "op-call" and an "iter"?
<pard> sorry
<jhass> those are not terms typically used in the Ruby community
<drbrain> pard: I'm guessing you mean: "Can `1 + 2` receive a block?"
<pard> yes sir
<drbrain> yes, if you call it like:
<drbrain> >> 1.+(2)
hotpancakes has quit [Ping timeout: 240 seconds]
<ruboto> drbrain # => 3 (https://eval.in/474644)
<pard> thanks :)
<pard> pardon me and the stupid way i asked in
rdavila has joined #ruby
digneety has quit [Ping timeout: 240 seconds]
hahuang61 has joined #ruby
<pard> if i have it corrctly, there can't be l % e do 12 end
ych has joined #ruby
hotpancakes has joined #ruby
<jhass> right
<pard> thanks :)
ych is now known as Guest23077
B1n4r10 has joined #ruby
mclee has quit [Ping timeout: 260 seconds]
pard has left #ruby ["Leaving"]
jessemcgilallen has quit [Read error: Connection reset by peer]
agit0 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jpfuentes2 has joined #ruby
<norc_> I just cannot figure out what Object#methods does... o_o
axsuul has joined #ruby
<norc_> Or rather how its useful.
<jhass> list all methods you can call on a particular object?
<norc_> Ah.
craysiii has joined #ruby
<norc_> So if I want to inspect methods on a class basis, I will have to use Module#instance_methods (and the other visbility types) I suppose
adac has joined #ruby
jessemcgilallen has joined #ruby
icemancast has quit [Quit: icemancast]
dfinninger has quit [Remote host closed the connection]
dmolina has joined #ruby
<drbrain> correct
shinnya has joined #ruby
dfinninger has joined #ruby
yalue has joined #ruby
FernandoBasso has joined #ruby
jordanm has quit [Quit: Konversation terminated!]
rdavila has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skcin7 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mellor has joined #ruby
moeabdol has quit [Read error: Connection reset by peer]
mellor7 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
nso95 has joined #ruby
digneety has joined #ruby
mellor is now known as tinyfeeshyfeesh
tinyfeeshyfeesh is now known as mellor7
moeabdol has joined #ruby
mellor7 is now known as ngraved
<norc_> drbrain: Okay. I just got horribly confused by the name of that method.
<norc_> But then again I keep mixing up RClass and Class concepts.
<drbrain> understandable
* drbrain nods
bMalum has quit [Quit: bMalum]
<drbrain> do you need clarification on anything?
NeverDie has quit [Quit: http://radiux.io/]
RegulationD has joined #ruby
tulak has joined #ruby
NeverDie has joined #ruby
ngraved is now known as mellor7
<pipework> drbrain: I have a riddle for you. How is a raven like a writing desk?
<drbrain> I care not for such dark things
jondot has joined #ruby
bryanray has joined #ruby
<pipework> It's not so bad, really. Edgar Allen Poe wrote on each of them.
digneety has quit [Ping timeout: 272 seconds]
kiez0rd has quit [Ping timeout: 240 seconds]
skweek has joined #ruby
futilegames has quit [Quit: futilegames]
RegulationD has quit [Ping timeout: 260 seconds]
Xiti has quit [Quit: Xiti]
dmolina has quit [Quit: Leaving.]
JazzyVariable227 has joined #ruby
mellor has joined #ruby
jbrhbr has joined #ruby
matp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
matp has joined #ruby
mellor7 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
zenguy_pc2 has joined #ruby
chipotle has quit [Quit: cheerio]
prestorium has quit [Quit: Leaving]
mellor7 has joined #ruby
mellor777 has joined #ruby
saddad has joined #ruby
mellor has quit [Client Quit]
eminencehc has quit [Remote host closed the connection]
symm- has joined #ruby
RegulationD has joined #ruby
mellor7 has quit [Client Quit]
mellor777 is now known as mellor7
nofxxx has joined #ruby
darkf has quit [Quit: Leaving]
icemancast has joined #ruby
moted has joined #ruby
digneety has joined #ruby
yfeldblum has joined #ruby
nofxx has quit [Ping timeout: 252 seconds]
alexherbo2 has quit [Quit: WeeChat 1.3]
tater has joined #ruby
BTRE has joined #ruby
dravine_ has joined #ruby
eminencehc has joined #ruby
<norc_> drbrain: Yes actually if you are still around
<drbrain> hi
rdavila has joined #ruby
dravine has quit [Ping timeout: 260 seconds]
dravine_ is now known as dravine
<drbrain> norc_: what's up?
based_pdev has quit [Read error: Connection reset by peer]
<norc_> drbrain: Okay, I have prepared something to see whether Im getting this right
maloik has quit [Ping timeout: 265 seconds]
nettoweb has quit [Excess Flood]
Xiti has joined #ruby
nettoweb has joined #ruby
nso95 has quit [Quit: nso95]
FernandoBasso has quit [Quit: Leaving]
maloik has joined #ruby
<norc_> drbrain: The basic assumption is I'm doing: Foo = Class.new(String)
<drbrain> ok
<drbrain> so, a subclass of String named Foo
reaVer has quit [Remote host closed the connection]
platzhirsch has left #ruby [#ruby]
Guest23077 has quit [Quit: Textual IRC Client: www.textualapp.com]
jessemcgilallen has quit [Ping timeout: 250 seconds]
ur5us has joined #ruby
norc has quit [Ping timeout: 260 seconds]
<norc_> So Im thinking the call would access the object behind the constant Class, resolving up until the singleton_class of the RClass Class
<norc_> call new which would probably construct a new RClass
<norc_> Then call the method of the RClass Class directly to construct a new class together with a singleton_class, and set that singleton_classes klass pointer to the newly created RClass
ur5us_ has joined #ruby
reaVer has joined #ruby
ur5us has quit [Read error: Connection reset by peer]
SCHAAP137 has quit [Quit: Leaving]
agit0 has joined #ruby
JazzyVariable227 has quit [Remote host closed the connection]
<drbrain> that sounds about right
arup_r has joined #ruby
<norc_> Alright nice.
<norc_> And that newly created RClasses singleton_class would have its klass pointer set to the String RClass of course.
dravine_ has joined #ruby
based_pdev has joined #ruby
last_staff has quit [Remote host closed the connection]
last_staff has joined #ruby
baweaver has joined #ruby
moeabdol has quit [Read error: Connection reset by peer]
SteppenII has quit [Quit: leaving]
bersimoe_ has quit [Remote host closed the connection]
dravine has quit [Ping timeout: 240 seconds]
dravine_ is now known as dravine
moeabdol has joined #ruby
pzula has quit [Read error: Connection reset by peer]
centrx has joined #ruby
<B1n4r10> win 4
last_staff has quit [Read error: Connection reset by peer]
gusTester has joined #ruby
reaVer has quit [Remote host closed the connection]
radgeRayden has joined #ruby
lurch_ has joined #ruby
diegoaguilar has quit [Read error: Connection reset by peer]
reaVer has joined #ruby
<drbrain> I'm not sure how the singleton_class get set up
last_staff has joined #ruby
<drbrain> but if you mean "Foo.some_method" will be looked up as "String.some_method" then "Class.some_method", then that sounds right
purplexed- has quit [Read error: Connection reset by peer]
<norc_> drbrain: Something is still dazzling me here.
karapetyan has joined #ruby
<norc_> We have to end up with an RObject for Foo, right?
m3_del has joined #ruby
bersimoes has joined #ruby
<drbrain> seems so
<drbrain> well, something with a `super` pointer and a `singleton_class` pointer
<norc_> no
<norc_> You only have one klass pointer
wilsonc91 has joined #ruby
ismaelga has joined #ruby
<drbrain> since Foo is a Class it needs a klass pointer ("I'm a class")
<drbrain> but it's also a Class object (struct RClass in internal.h) so it also has a "super" pointer
<norc_> Well. Foo firstly is a constant.
<agent_white> norc_: Have you taken a look at https://ruby-hacking-guide.github.io/object.html before? Had it in my bookmarks for awhile, but a bit too much for me tso I skipped it.
<norc_> Pointing towards an RObject
<drbrain> which is what instances use for method resolution
<drbrain> you're going to end up with a struct RClass, not a struct RObject from Class.new
SleepySensei has joined #ruby
futilegames has joined #ruby
<norc_> agent_white: Worse.
<norc_> I have had a dive into the MRI.
bersimoes has quit [Ping timeout: 240 seconds]
<norc_> 100 times the information and 1/100th the documentation.
JazzyVariable227 has joined #ruby
digneety has quit [Changing host]
digneety has joined #ruby
Mon_Ouie has quit [Ping timeout: 260 seconds]
<agent_white> norc_: Oh fun! :) Haha so I heard... riddled with dragons, eh?
<norc_> drbrain: Oh damn that is right, I was mixing klass and super together.
<norc_> drbrain: However, there is no singleton_class pointer
<norc_> There is just super.
<drbrain> the rb_classext_t holds the ivars for the class object, etc.
<drbrain> which is shared by modules, IIRC
lokulin has quit [Ping timeout: 272 seconds]
<norc_> uh lets leave modules out for now
MasterNayru has quit [Ping timeout: 240 seconds]
<drbrain> on trunk, it's right above sturct RClass in internal.h
<drbrain> sure
s00pcan has quit [Ping timeout: 240 seconds]
<norc_> I have to wonder whether my book is just outdated for 2.3 MRI
Mon_Ouie has joined #ruby
<drbrain> I haven't been following ruby-core mailing list, but I don't think there's anything new (like refinements or prepend) that's beyond what 2.2 has in terms of class construction, etc.
treehug88 has joined #ruby
ta has joined #ruby
lguardiola has joined #ruby
<norc_> Okay so there is two chains to consider
s00pcan has joined #ruby
<norc_> There is a super chain, and a klass chain
zacstewart has quit []
<norc_> Or Im getting too confused
<norc_> What is the super point. What is the klass pointer in RBasic
<drbrain> klass pointer is "what 'type' is this object"
<norc_> so both klass and super point at RClass
<drbrain> `"foo"` is an RObject of class String, so it's klass pointer points to the String class
<norc_> alright.
dopie has joined #ruby
<drbrain> well, probably RString, because there is one of those
<norc_> Yeah, but for the sake of the argument lets assume its not a generic
<drbrain> but a `"foo"` wouldn't have a super pointer because it is an instance
yardenbar has joined #ruby
<norc_> so when I call foo.class - ignoring the actual method dispatch - it just ends up resolving klass, showing the name of the RClass behind it
<drbrain> correct
adac has quit [Ping timeout: 252 seconds]
<norc_> Okay so when I create a new class, it creates an RObject with klass pointing to the RClass Class
roshanavand has joined #ruby
<norc_> Its super pointer will point at its singleton_class
skullcrasher has quit [Ping timeout: 260 seconds]
mellor7 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
solocshaw has joined #ruby
<norc_> Im guessing klass is also how singleton_classes are identified then
<drbrain> RClass, not RObject
<norc_> well both
<norc_> okay first the RClass
<norc_> and then an RObject
icemancast has quit [Quit: icemancast]
<norc_> Or...
<drbrain> no, just RClass, but the RClass shares all the fields of the RObject structure
<norc_> huh
<drbrain> (if indirectly through rb_classext_struct)
roshanavand has quit [Remote host closed the connection]
ldnunes has quit [Quit: Leaving]
tulak has quit [Remote host closed the connection]
SCHAAP137 has joined #ruby
<norc_> Okay so RObjects is the things that get created by Class#new
tulak has joined #ruby
<norc_> And RClasses get created by Class::new
s00pcan has quit [Ping timeout: 260 seconds]
s00pcan has joined #ruby
<drbrain> yes
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<norc_> Alright. Still dont see how RClass shares all the fields of the RObject structure.
kies^ has joined #ruby
trosborn has joined #ruby
<drbrain> they both have an RBasic
<drbrain> and RObject has that "as" union which encodes the instance variables
<drbrain> the RObject implementation is an optimization that can avoid mallocs of a separate table of instance variables
rdavila has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
futilegames has quit [Quit: futilegames]
jessemcgilallen has joined #ruby
<drbrain> the rb_classext_struct doesn't have any of that, it has the iv_tbl and iv_index_tbl which are not optimized
dikaio has joined #ruby
<norc_> drbrain: I have a feeling we are both looking at Ruby under a Microscope currently. :-)
baweaver has quit [Remote host closed the connection]
<norc_> Oh damn I misread the brackets on the union. No it makes sense now.
<norc_> So it is either a compact ary, or regular heap stuff
<drbrain> yes
<norc_> Im guessing it just uses the ary until its filled and then shuffles things around
<drbrain> yes
<drbrain> similar optimizations exist for RArray and RString
pzula has joined #ruby
lxsameer has joined #ruby
lxsameer has joined #ruby
iateadonut has quit [Quit: Leaving.]
<norc_> drbrain: Alright. Digging through the source code also revealed that whether a class is a singleton_class is placed into the flags in its RBasic
<norc_> (FL_SINGLETON)
rodfersou has quit [Quit: leaving]
dopie has quit [Quit: This computer has gone to sleep]
arup_r has quit [Ping timeout: 240 seconds]
<norc_> Which makes me wonder what klass actually points to
adac has joined #ruby
dopie has joined #ruby
pzula has quit [Ping timeout: 250 seconds]
<drbrain> I think the singleton class only gets created when you access it
reaVer has quit [Remote host closed the connection]
<drbrain> so ordinarily RString("my string")->klass == RClass(String)
<DurstBurger> when using sinatra, on a POST, how do i call a ruby script with the attached variable from the post and then return the output of the script to the page?
<drbrain> but if you access it then RString("my string")->klass
<drbrain> => RClass(singleton class of that string)->klass == RClass(String)
<drbrain> but it's been a while since I dug through that
<jhass> DurstBurger: ideally you would refactor your script into a class that you can just call
<drbrain> norc_: I need to eat some lunch now, but I should be back in about 90 minutes
<norc_> drbrain: Alright then. Enjoy and see you then. :)
SleepySensei has quit [Read error: Connection reset by peer]
rdavila has joined #ruby
<norc_> I shall spend the time to figure out how singleton classes come into existence.
reaVer has joined #ruby
m3_del has quit [Remote host closed the connection]
baweaver has joined #ruby
icemancast has joined #ruby
Channel6 has joined #ruby
atmosx has joined #ruby
afaris has joined #ruby
<norc_> Okay that was quick. Singleton classes get created automatically.
based_pdev_ has joined #ruby
reaVer has quit [Remote host closed the connection]
based_pdev has quit [Ping timeout: 240 seconds]
JazzyVariable227 has quit [Remote host closed the connection]
roshanavand has joined #ruby
millerti has joined #ruby
JazzyVariable227 has joined #ruby
reaVer has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
tercenya has quit [Read error: Connection reset by peer]
tercenya has joined #ruby
<atmosx> hello
atomical has quit [Max SendQ exceeded]
chouhoul_ has quit [Remote host closed the connection]
icemancast has quit [Quit: icemancast]
podman has joined #ruby
chouhoulis has joined #ruby
roshanavand has quit [Ping timeout: 250 seconds]
hotpancakes has quit [Remote host closed the connection]
JazzyVariable227 has quit [Ping timeout: 240 seconds]
allcentury has joined #ruby
eminencehc has quit [Remote host closed the connection]
atomical has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
mary5030 has quit [Remote host closed the connection]
MasterNayru has joined #ruby
icemancast has joined #ruby
roshanavand has joined #ruby
atomical has quit [Max SendQ exceeded]
<norc_> atmosx: Hello.
digneety has quit [Quit: WeeChat 1.3]
eminencehc has joined #ruby
themadcanudist has joined #ruby
themadcanudist has left #ruby [#ruby]
ayee has left #ruby [#ruby]
ccooke_ is now known as ccooke
yardenbar has quit [Ping timeout: 260 seconds]
whiteline has joined #ruby
justinweiss has joined #ruby
Marcon has joined #ruby
bkxd has quit [Ping timeout: 276 seconds]
platon has joined #ruby
B1n4r10 has quit [Ping timeout: 265 seconds]
Clockwerk has joined #ruby
RobertBirnie has joined #ruby
waka has quit [Remote host closed the connection]
yardenbar has joined #ruby
<Clockwerk> hi everyone, i'm not sure that this is the channel i need, sorry if it's so ) I have a problem with this script https://github.com/alfg/guildbit/blob/master/app/templates/server.html#L268 is it ruby language?
mary5030 has joined #ruby
jbrhbr has quit [Quit: Leaving.]
mary5030 has quit [Remote host closed the connection]
bkxd has joined #ruby
atomical has joined #ruby
mary5030 has joined #ruby
Pumukel has quit [Quit: ChatZilla 0.9.92 [Firefox 42.0/20151029151421]]
lokulin has joined #ruby
Success has joined #ruby
mattyohe has joined #ruby
<Success> How do you pass a scope link in javascript method.call(scope, arg1, arg2)
<Success> that way if function scope(){ var i = 7 } and method is function(){puts i} it would print 7
waka has joined #ruby
hotpancakes has joined #ruby
<centrx> Clockwerk, It looks like JavaScript and you didn't say what the problem is
tater has quit [Remote host closed the connection]
<shevy> Success wrong channel?
waka has quit [Remote host closed the connection]
<Success> like in javascript* I want a ruby equivalent
<Success> like haml and slim you can render self, &method or something seems to be very similar
<centrx> Success, Are you looking for a "Proc" or "lambda"
<Success> centrx: isn't the difference just syntax? (i'm new)
mclee has joined #ruby
wilsonc91 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<centrx> Success, There is a difference in how arguments are handled and how returns are handled
corserval has quit [Ping timeout: 260 seconds]
rdavila has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bkxd has quit [Ping timeout: 276 seconds]
hotpancakes has quit [Ping timeout: 240 seconds]
icemancast has quit [Quit: icemancast]
B1n4r10 has joined #ruby
tildes has joined #ruby
<Success> centrx: yeah i saw that, but how do i ... https://gist.github.com/Announcement/a8463151f9bccc86464a
<centrx> Success, Seems like you want to have a class(es)
ciege has joined #ruby
codecop has quit [Remote host closed the connection]
<Success> centrx: idk... basically i want to have a list of "Proc" 's and as I iterate them load them down with the same set of functions/variables that they share
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<centrx> I'm not sure I follow
<centrx> Proc#call is the right way to call a proc
<Success> yeah but its not perserving @http nor server
yoongkang has joined #ruby
jessemcgilallen has quit [Quit: jessemcgilallen]
icemancast has joined #ruby
lurch_ has quit [Quit: lurch_]
<centrx> Success, 'server' is a local variable, so it is only defined in the #parent method
<centrx> Success, Outside of the parent method, it is not defined, it is out of scope
hotpancakes has joined #ruby
<atmosx> Success: you might wanna change that code into a class and initialize variables
<Success> centrx: I want to move the scope like this: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/call except in ruby how can I implement it
<Success> i mean like sinatra, template engines, etc. do it
Contigi has joined #ruby
<Success> just no idea how unless they're parsing it as text and than eval...? which i sure hope not ;(
arescorpio has joined #ruby
<centrx> Success, Maybe you are looking for binding? - http://ruby-doc.org/core-2.2.0/Binding.html
adac has quit [Ping timeout: 260 seconds]
<Success> centrx: ahh now we're getting somewhere. i'll check that out:)
atomical has quit [Max SendQ exceeded]
<Success> almost there
shtirlic has quit [Ping timeout: 240 seconds]
<Success> not quite what i want tho
<Success> actually i have an idea thanks
Success has quit [Quit: Page closed]
atomical has joined #ruby
dfinninger has quit [Remote host closed the connection]
Marcon has quit [Quit: Verlassend]
Clockwerk has left #ruby [#ruby]
Marcon has joined #ruby
dimasg has quit [Ping timeout: 246 seconds]
platon has left #ruby [#ruby]
Marcon has quit [Client Quit]
`based_pdev` has joined #ruby
rwy has joined #ruby
PaulCape_ has joined #ruby
PaulCapestany has quit [Ping timeout: 244 seconds]
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
based_pdev_ has quit [Ping timeout: 240 seconds]
dfinninger has joined #ruby
themadcanudist has joined #ruby
freerobby has quit [Quit: Leaving.]
yoongkang has quit [Remote host closed the connection]
vikas027 has joined #ruby
tildes has quit [Ping timeout: 272 seconds]
rdavila has joined #ruby
scripore has joined #ruby
eminencehc has quit [Remote host closed the connection]
crunk_bear has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nso95 has joined #ruby
eminencehc has joined #ruby
blackmesa has joined #ruby
allcentury has quit [Ping timeout: 246 seconds]
tgandrews has joined #ruby
moeabdol has quit [Read error: Connection reset by peer]
yalue has quit [Quit: return 0;]
bryanray has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
atmosx has quit [Quit: Lost in trance]
moeabdol has joined #ruby
tildes has joined #ruby
decoponio has quit [Quit: Leaving...]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
nso95 has quit [Ping timeout: 272 seconds]
JazzyVariable227 has joined #ruby
nso95- has joined #ruby
nso95- has quit [Changing host]
nso95- has joined #ruby
joshi4 has joined #ruby
shtirlic has joined #ruby
sdothum has joined #ruby
solenoids has quit [Ping timeout: 250 seconds]
eminencehc has quit [Remote host closed the connection]
tildes has quit [Ping timeout: 252 seconds]
tildes has joined #ruby
ljt has joined #ruby
al2o3-cr has quit [Ping timeout: 250 seconds]
solocshaw has quit [Ping timeout: 246 seconds]
Xeago has joined #ruby
mrd_ has joined #ruby
<joshi4> I am installing version 1.5.0 of fog through chef and everything was working fine till yesterday. chef-client version is 11.16.4 and ruby version is 1.9.3. It seems that in the past couple of days there was a new dependency added to mime-types: mime-types-data-3.0 which has a hard requirement of ruby 2.0. Now the whole problem arises as fogs dependency of mime-types is mime-types >= 0 which goes in an pulls the latest version.
eminencehc has joined #ruby
solocshaw has joined #ruby
<joshi4> Would appreciate any ideas on how to get around the problem
JazzyVariable227 has quit [Ping timeout: 244 seconds]
dkphenom has joined #ruby
haxrbyte has joined #ruby
dimasg has joined #ruby
<Radar> joshi4: upgrade to Ruby 2.0.
<matti> ;)
haxrbyte has quit [Remote host closed the connection]
<Radar> joshi4: Where should I send my invoice?
<matti> Radar: Long time no seen
<Radar> o/ matti
<matti> o/
haxrbyte has joined #ruby
roshanavand has quit [Remote host closed the connection]
NeverDie has quit [Quit: http://radiux.io/]
roshanavand has joined #ruby
<Radar> joshi4: it took me many years of knowledge to learn that upgrading Ruby is the most easiest / sensible thing to do
<Radar> Don't fight the powah.
skullcrasher has joined #ruby
gustav_ has joined #ruby
tulak has quit [Remote host closed the connection]
<joshi4> Radar: I upgraded my chef-client version to 12.5.1 which has ruby 2.0 and that runs into a different dependency cycle. Also, while upgrading to ruby 2.0 will work for all new machines that are bootstrapped, it won't work for many existing nodes that we have
DroidBurgundy has quit [Ping timeout: 255 seconds]
_stu_ has joined #ruby
dimasg has quit [Ping timeout: 252 seconds]
<Radar> joshi4: Why are you still stick on 1.9.3? Seems like lazy devops
DroidBurgundy has joined #ruby
NeverDie has joined #ruby
rdark has quit [Ping timeout: 272 seconds]
ljt has quit [Read error: Connection reset by peer]
ljt has joined #ruby
ljt has quit [Read error: Connection reset by peer]
NeverDie has quit [Client Quit]
tildes has quit [Ping timeout: 250 seconds]
ljt has joined #ruby
lokulin has quit [Ping timeout: 244 seconds]
* Radar does not enjoy it when people treat IRC as if it were an async protocol :\
nso95- has quit [Ping timeout: 272 seconds]
nso95- has joined #ruby
nso95- has joined #ruby
TPBallbag has joined #ruby
IrishGringo has joined #ruby
allcentury has joined #ruby
solenoids has joined #ruby
MasterNayru has quit [Ping timeout: 272 seconds]
Contigi777 has joined #ruby
Contigi777 has quit [Remote host closed the connection]
moeabdol has quit [Read error: Connection reset by peer]
<agent_white> Heheh
uri has quit [Ping timeout: 250 seconds]
TPBallbag has quit [Client Quit]
adriancb_ has joined #ruby
centrx has quit [Quit: If you meet the Buddha on the road, kill him.]
jbrhbr has joined #ruby
TomPeed has joined #ruby
<Radar> joshi4: ping.
moeabdol has joined #ruby
ornerymoose has quit [Quit: ornerymoose]
pawnbox has joined #ruby
<norc_> agent_white: Alright, I had an excessive excursion to give you accurate information now.
<agent_white> norc_: \o/
dopamean_ has joined #ruby
<agent_white> norc_: How was it?!
<norc_> agent_white: defining a function in top level just adds it directly to the methods of Object (read "instance methods")
<norc_> Refreshing and clearing up much of the confusion.
<adaedra> 'evening
yfeldblum has joined #ruby
<norc_> Good evening adaedra.
weckl has quit [Remote host closed the connection]
<havenwood> allo
<blubjr> hi adaedra
<norc_> adaedra: By the way, turns out it was not a bug. I just bugged out a loop with exception handling, which incidentally was also entered on SIGINT.
PaulCape_ has quit [Quit: .]
eminencehc has quit [Remote host closed the connection]
Hounddog has quit [Remote host closed the connection]
<norc_> Redefining StandardError#=== really is not the wisest thing. :-)
<adaedra> I've a question (my turn!): You can match by classes in a when clause... can you match by respond_to? for duck typing?
PaulCapestany has joined #ruby
skade has joined #ruby
bkxd has joined #ruby
<adaedra> norc_: Redefining core classes is not often the good thing to do, I think.
themadcanudist has quit [Quit: Leaving.]
<jhass> adaedra: case/when calls #=== on the items in the when clause and passes it the item in the case clause
moeabdol has quit [Ping timeout: 246 seconds]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<adaedra> jhass: so I should understand it's "no"?
<Mon_Ouie> class Symbol; def ===(o); o.respond_to? self; end; end
<jhass> I'm not aware of any core implementation of #=== that delgates to respond_to
MasterNayru has joined #ruby
<jhass> but you could build yourself for example a proc that checks it
haxrbyte has quit [Quit: Leaving...]
pawnbox has quit [Remote host closed the connection]
<adaedra> Also
icemancast has quit [Quit: icemancast]
moeabdol has joined #ruby
<adaedra> >> :length.to_proc === ""
<ruboto> adaedra # => 0 (https://eval.in/474737)
<adaedra> why
quarters has joined #ruby
<agent_white> norc_: I see!
<adaedra> (Yeah, I tried)
eminencehc has joined #ruby
<adaedra> Or there's something on === I didn't understood
<norc_> agent_white: The reason this works is because the default receiver for VCALL is self, which in top level is just an instance of Object.
<jhass> Proc#=== is an alias for call
VeryBewitching has joined #ruby
<adaedra> oh
<adaedra> interesting then.
<VeryBewitching> G'day folks.
<adaedra> Hi VeryBewitching
<VeryBewitching> How's the day adaedra?
<adaedra> Danke schön, jhass
<adaedra> VeryBewitching: it should end soon, fortunately.
<norc_> agent_white: So when you type foo() it really does self.foo(), which calls the instance method foo() of whatever the class (Object) of self is.
<VeryBewitching> adaedra: One of those huh?
<adaedra> I slept really badly last night.
al2o3-cr has joined #ruby
B1n4r10 has quit [Ping timeout: 276 seconds]
<norc_> agent_white: Incidentally since almost every class has Object as one of their ancestors, this works everywhere, thus giving you the notion of a global function.
mary5030 has quit [Remote host closed the connection]
<norc_> agent_white: There you go, much clearer now. :-)
<agent_white> norc_: Ahhhh :D Hell yeah! Thank you!
<VeryBewitching> adaedra: Hope tonight's sleep goes better for ya.
<adaedra> Then we're two.
skade has quit [Quit: Computer has gone to sleep.]
MasterNayru has quit [Ping timeout: 272 seconds]
Xeago has quit [Remote host closed the connection]
<norc_> >> A = Struct.new(:e) { def ===(o); e.respond_to?(o); end }; a = A.new(""); case a; when :length then puts "foo"; end
<ruboto> norc_ # => nil (https://eval.in/474738)
<norc_> Mmm
arescorpio has quit [Quit: Leaving.]
skade has joined #ruby
<norc_> Ohh.
skade has quit [Client Quit]
IrishGringo has quit [Ping timeout: 240 seconds]
pawnbox has joined #ruby
SleepySensei has joined #ruby
donske has joined #ruby
<adaedra> when proc { |o| o.respond_to? :foo } # works nice, but feels a bit ugly.
donske has quit [Max SendQ exceeded]
lxsameer has quit [Quit: Leaving]
<jhass> well, wrap it into a method
<jhass> just can't come up with a nice name
<jhass> when responding_to(:foo)
ixti has joined #ruby
ixti has quit [Client Quit]
<adaedra> nice.
nofxxx has quit [Remote host closed the connection]
roshanavand has quit [Read error: Connection reset by peer]
roshanavand has joined #ruby
nofxx has joined #ruby
nofxx has joined #ruby
ixti has joined #ruby
<norc_> class Symbol; def ===(o); o.respond_to?(self); end; end; case "" when :length then puts "foo" end
<norc_> >> class Symbol; def ===(o); o.respond_to?(self); end; end; case "" when :length then puts "foo" end
<ruboto> norc_ # => foo ...check link for more (https://eval.in/474744)
skade has joined #ruby
<jhass> altering the default behavior is a very bad idea
skade has quit [Client Quit]
<norc_> Well you can always alias_method it forth and back around the code.
_seanc_ has joined #ruby
nso95- has quit [Ping timeout: 255 seconds]
ixti has quit [Client Quit]
pawnbox has quit [Ping timeout: 265 seconds]
<shevy> did not norc complain about monkey-patching a few hours ago :-)
<jhass> it's also about readability
Xeago has joined #ruby
<norc_> shevy: Shush.
mjuszczak has joined #ruby
synthroid has quit []
<shevy> what still trips me up are case statements without anything next to them
snockerton has joined #ruby
moeabdol has quit [Read error: Connection reset by peer]
roshanavand has quit [Ping timeout: 250 seconds]
mattwildig has quit [Remote host closed the connection]
<adaedra> I suppose it's bad to inject methods into Object from a library when it's not really the goal of the library.
<shevy> sometimes monkeys need love
<shevy> sometimes monkeys need injections
karapetyan has quit [Remote host closed the connection]
jondot has quit [Quit: Textual IRC Client: www.textualapp.com]
moeabdol has joined #ruby
karapetyan has joined #ruby
<norc_> >> T = Struct.new(:e) { def ===(o); o.respond_to?(e); end }; def t(o); T.new o; end; case "" when t(:length) then puts "foo" end
<ruboto> norc_ # => foo ...check link for more (https://eval.in/474747)
<norc_> jhass: Is that better?
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<norc_> Conceptually I mean
scripore has quit [Quit: This computer has gone to sleep]
mattwildig has joined #ruby
<adaedra> does not taint core object
bersimoes has joined #ruby
<jhass> what's wrong with def t(method); proc {|obj| obj.respond_to?(method) }; end ?
jessemcgilallen has joined #ruby
saddad has quit [Ping timeout: 252 seconds]
<adaedra> It's too amazing.
<norc_> Huh.
ICantCook has joined #ruby
moeabdol has quit [Client Quit]
<adaedra> This is perfect.
<norc_> Proc#=== does a call, how amazing is that.
ICantCook has quit [Client Quit]
<norc_> Sorry must have missed that
<kiki_lamb> given a block like this { x = calculate_x; nil }, is there a way of either #1. causing 'x = ' to act like 'self.x = ' or option #2. scraping the loal variable x out of the context somehow after executing the block?
<jhass> I don't think so
skade has joined #ruby
<jhass> why don't you just return the value from the block?
moeabdol has joined #ruby
skade has quit [Client Quit]
[Butch] has quit [Quit: I'm out . . .]
<kiki_lamb> i'm implementing a DSL, and in this DSL it would be convenient if the user of the DSL could pass blocks to objects that assign to their attributes without having to write self all over the place
bersimoes has quit [Ping timeout: 246 seconds]
<kiki_lamb> the DSL is for livecoding (performing music by editing the source code that's making it as it plays), so tersity is a paramount concern
<norc_> kiki_lamb: You could abuse method_missing? and just use x 'foo' syntax
<adaedra> Common usage is .foo { |o| o.a = 1; o.b = 2 } I guess
<kiki_lamb> norc_: yeah, I may end up using 'x! foo'.
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass> and that's why instance_exec yields self
<norc_> kiki_lamb: That is what FactoryGirl does
<norc_> afaik
hightower4 has joined #ruby
<kiki_lamb> jhass: yeah, these blocks are being instance eval-ed by the relevant objects
hotpancakes has quit []
<hightower4> Hey, how would I match words with two identical, repeating letters, like 'aa' or 'egg'?
last_staff has quit [Quit: last_staff]
<kiki_lamb> I'll either go with 'x!' for assignment or stick 'self.' on the front in the preprocessor, i suppose
<jhass> hightower4: what exactly do you need as result?
yoongkang has joined #ruby
<hightower4> kiki_lamb, just a match or no-match, so that I can remove those words from the list
<jhass> hightower4: so you have strings containing a single word?
DroidBurgundy has quit []
loc22 has joined #ruby
<kiki_lamb> hightower4: lookahead with a backreference, maybe?
scripore has joined #ruby
<jhass> >> %w(foo bar baz quuxC).reject {|word| word[/([a-z])\1/] }
<ruboto> jhass # => ["bar", "baz"] (https://eval.in/474748)
quaquaraqua has quit [Quit: quaquaraqua]
<norc_> >> /((\w)\2+)/.match("aab")
<ruboto> norc_ # => #<MatchData "aa" 1:"aa" 2:"a"> (https://eval.in/474749)
<jhass> the outer group is entirely redundant
<jhass> and I don't really see why the +
<norc_> Oh yeah.
moeabdol1 has joined #ruby
<norc_> >> "bbba" =~ /(\w)\1/
<ruboto> norc_ # => 0 (https://eval.in/474750)
dfinninger has quit [Remote host closed the connection]
<norc_> Just does fine. :)
<baweaver> double plus good
<jhass> note that \w includes _ too
moeabdol has quit [Ping timeout: 265 seconds]
<jhass> oh and numbers too actually
dikaio has quit [Quit: ........]
jessemcgilallen has quit [Quit: jessemcgilallen]
<hightower4> Right, that works, thanks
yoongkang has quit [Ping timeout: 240 seconds]
<baweaver> [:alpha:] ?
<norc_> [a-zA-Z]
<snockerton> why would a certain gem have different methods available in different environments?
<norc_> Is one character shorter to type. :p
_seanc_ has quit [Ping timeout: 252 seconds]
Xeago has quit [Remote host closed the connection]
reaVer has quit [Remote host closed the connection]
<snockerton> sometimes I can't instantiate a Beaneater.new()
<jhass> [:alpha:] is invalid actually, it's [[:alpha:]]
<norc_> snockerton: Because different operating systems may or may not have sufficient implementations for a given functionality.
dimasg has joined #ruby
<snockerton> NoMethodError: undefined method `new' for Beaneater:Module
* baweaver never uses those named groups
lokulin has joined #ruby
roshanavand has joined #ruby
jessemcgilallen has joined #ruby
reaVer has joined #ruby
jetpackjoe has joined #ruby
Everlost has joined #ruby
<Everlost> Hello #ruby!
jetpackjoe has quit [Max SendQ exceeded]
norc_ has quit [Ping timeout: 246 seconds]
<Everlost> I'm trying to install a package, using gem
<Everlost> on fedora
jetpackjoe has joined #ruby
_seanc_ has joined #ruby
<Everlost> the thing just crashes weirdly, error dump follows...
roshanavand has quit [Ping timeout: 240 seconds]
moeabdol1 has quit [Read error: Connection reset by peer]
xcesariox has joined #ruby
bersimoes has joined #ruby
Xeago has joined #ruby
<jhass> gem -v ?
moeabdol1 has joined #ruby
<jhass> could you share your gem env output?
<adaedra> ahah, fedora not providing json.
<Everlost> fedora is providing json higher than 1.8.3
MasterNayru has joined #ruby
<Everlost> we are not year 2003
<jhass> 1.8.3 was released june 1 this year
<adaedra> well, it's still a separate package, even if it seems pulled in by ruby package.
i8igmac has quit [Quit: Bye]
<jhass> Everlost: still waiting for your output of gem env
<Everlost> so I installed rubygems and rubygem-bundler and got another error
<Everlost> gem is 2.4.8
tulak has joined #ruby
<darix> jopenssl/load
<darix> is your gem maybe pointing to jruby or so?
kirun has quit [Quit: Client exiting]
SleepySensei has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ta has quit [Read error: Connection reset by peer]
<jhass> something's odd indeed, hence I'm asking for `gem env`
ta has joined #ruby
vikas027 has quit [Read error: Connection reset by peer]
<Everlost> I've got another error
<Everlost> oh hold on
al2o3-cr has quit [Quit: WeeChat 1.3]
<Everlost> and my current error : http://pastie.org/10576886
<adaedra> you're missing a package.
<Everlost> dev tools it seems
<Everlost> i'm on it
<adaedra> maybe libpcap-devel.
<Everlost> nope
<Everlost> same error
nso95 has joined #ruby
<adaedra> you may have more information in /usr/local/lib64/gems/ruby/pcaprub-0.12.0/
waka has joined #ruby
<Everlost> I checked the .out file. it contains the same thing as earlier stdout
<Everlost> can I get gem to be more talkative?
al2o3-cr has joined #ruby
al2o3-cr has quit [Client Quit]
<jhass> are you really sure it's the same error?
graffix has quit [Quit: graffix]
axsuul has quit [Ping timeout: 264 seconds]
<Everlost> these returns from gem, it seems like too much exception handling, no file, no line, no stack... You end up with "Could not create Makefile due to some reason"
al2o3-cr has joined #ruby
ChameleonSix has joined #ruby
<jhass> the relevant part of the last one was checking for pcap_open_live() in -lpcap... *** extconf.rb failed ***
<ChameleonSix> Hello
<adaedra> there's only one file in the directory? I though there were two files in those
bb010g has joined #ruby
<Everlost> last one : http://pastie.org/10576892
<Everlost> oh right there is a logfile hold on
ljt has quit [Read error: Connection reset by peer]
<adaedra> you lack ruby-devel
<Everlost> Le paquet ruby-devel-2.2.3-44.fc22.x86_64 est déjà installé, ignorer
<adaedra> étrange
<Everlost> oups
<Everlost> héhé
<adaedra> :)
<Everlost> "already installed"
<grill> does hash.delete(key) remove the key'd element from the original hash?
ismaelga has quit [Remote host closed the connection]
joshi4 has quit [Ping timeout: 246 seconds]
<grill> the documentation seems to indicate that it does, but i'm not seeing it in proactice
ismaelga has joined #ruby
<jhass> grill: you don't?
treehug88 has quit [Quit: Textual IRC Client: www.textualapp.com]
<grill> no. something else must be wrong
<ChameleonSix> ?
<jhass> ChameleonSix: if you have nothing to say just don't, please
<ChameleonSix> Lol
<ChameleonSix> About ?
<Everlost> what does this mean : checking for pcap_open_live() in -lpcap... *** extconf.rb failed ***
<Everlost> ,
<havenwood> !kick ChameleonSix The topic is Ruby
ChameleonSix was kicked from #ruby by ruboto [The topic is Ruby]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<darix> Everlost: libpcap-devel
ChameleonSix has joined #ruby
<ChameleonSix> ?
<jbrhbr> it's a packet capture library for stuff like ethernet monitoring etc i think?
<adaedra> oh
<Everlost> yes it is
<Everlost> Le paquet libpcap-devel-14:1.7.3-1.fc22.x86_64 est déjà installé, ignorer
hello9 has joined #ruby
<Everlost> oh really don't tell me I've got to install ubuntu
<hello9> heyyy, how/if can you put/print without quotes?
<jhass> hello9: how do you manage to do with them?
<jhass> that's actually harder
<adaedra> Everlost: that's you whole mkmf.log?
<hello9> a = "String"
<hello9> p a
<hello9> = "String"
<hello9> i want
<jhass> hello9: replace p with puts
<hello9> String
<hello9> @jhass haha
<hello9> wow
<Everlost> adaedra: just the tail
<hello9> ridiculous
<adaedra> Everlost: paste all. Also, do you have gcc installed?
<hello9> thanks
dhollinger has quit [Quit: WeeChat 1.3]
gusTester has quit [Quit: Leaving.]
zacstewart has joined #ruby
<Everlost> yes I have gcc
<adaedra> (I'm trying to get it on my Fedora, so I can repeat the steps)
hello9 has quit [Client Quit]
<jhass> hello9: but good that you found p, you want to use it if you want to look at a value
<Everlost> oh nevermind adaedra it was actually the full file
pepperbreath has quit [Read error: Connection reset by peer]
wilsonc91 has joined #ruby
<Everlost> adaedra: thank you a lot
<adaedra> That's strange you have no errors
<adaedra> Everlost: Fedora version/arch?
jetpackjoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Channel6 has quit [Ping timeout: 272 seconds]
pepperbreath has joined #ruby
<Everlost> Le paquet libpcap-devel-14:1.7.3-1.fc22.x86_64 est déjà installé, ignorer
<Everlost> oups
frem has joined #ruby
<jhass> Everlost: could you save the printed program to a file called conftest.c and run the command manually to see if there's any more output?
<adaedra> It installed.
<Everlost> # uname -a
<Everlost> Linux localhost.localdomain 4.0.4-301.fc22.x86_64 #1 SMP Thu May 21 13:10:33 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
<adaedra> So you're one version behind me.
<Everlost> how so jhass ?
<ChameleonSix> Sup ruby pros
<adaedra> copy paste the C snippet in a file, remove line numbers, then compile it with the provided command line.
<jhass> ChameleonSix: please join #ruby-offtopic if you want smalltalk
Coldblackice has joined #ruby
<ChameleonSix> I want to talk about ruby
<jhass> Everlost: what adaedra said
<jhass> ChameleonSix: no need for smalltalk here, go straight to your issue
<ChameleonSix> Ah ok
skade has joined #ruby
<ChameleonSix> I don't have any issues
jetpackjoe has joined #ruby
<adaedra> Then enjoy the ride.
<Everlost> adaedra: any leads on where to get the c snippet?
<adaedra> The one in the file you pasted
<adaedra> between /* begin */ and /* end */
<Everlost> hmm
<Everlost> alright
al2o3-cr has quit [Quit: WeeChat 1.3]
<adaedra> And name it config.c
<ChameleonSix> I just want to learn
<adaedra> no
<jhass> conftest.c
<Everlost> although really I can't see why returning 0 won't work.
<Everlost> give me a minute
<adaedra> thanks, jhass
<ChameleonSix> Anyway cya
<jhass> ChameleonSix: so don't waste your time here and go learn?
SCHAAP137 has quit [Quit: Leaving]
<ChameleonSix> Good advice
<ChameleonSix> :)
<ChameleonSix> Cya
ChameleonSix has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
grill has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tgandrews has quit [Remote host closed the connection]
freerobby has joined #ruby
d0nn1e has joined #ruby
Anthony_ has joined #ruby
trosborn has quit [Quit: trosborn]
<d0nn1e> Everlost ok what did I miss
pawnbox has joined #ruby
<Everlost> try and compile the c file manually
<Everlost> to get a better error report
<Everlost> you've got to cat your log file though
trosborn has joined #ruby
<Everlost> mine is : cat /usr/local/lib64/gems/ruby/pcaprub-0.12.0/mkmf.log
<Everlost> all info is in there
<adaedra> I'd have expected it to give more info.
jpfuentes2 has joined #ruby
al2o3-cr has joined #ruby
<Everlost> woops
<Everlost> I didn't reinstall gcc
<Everlost> I did on livecd, that why I thought I had it
<d0nn1e> I did install gcc though
_blizzy_ has quit [Ping timeout: 255 seconds]
<Everlost> ok
trosborn has quit [Client Quit]
<Everlost> gcc says nothing
<Everlost> not even a carriage return, just nothing.
<d0nn1e> Package gcc-5.1.1-4.fc23.x86_64 is already installed
<d0nn1e> huh
Anthony_ has quit [Client Quit]
<adaedra> Everlost: echo $?
kies has quit [Ping timeout: 272 seconds]
<Everlost> oh
chouhoulis has quit [Remote host closed the connection]
<Everlost> yay! bettercap installed
<Everlost> was just missing gcc
Xeago has quit [Remote host closed the connection]
<adaedra> >_>
<Everlost> hey guys please really, make your gem verbose
pawnbox has quit [Ping timeout: 240 seconds]
Xeago has joined #ruby
<adaedra> That's the building process, it's the same for all.
<Everlost> try installing packets with pip and it will tell you that you are missing gcc.
Xeago has quit [Remote host closed the connection]
<jhass> well, technically this is a mkmf and not a rubygems issue :P
<adaedra> Binary gems are weird.
<Everlost> d0nn1e: you've got it working?
<jhass> and yes, mkmf has .... issues
<marahin> Hello. I'm trying to make a plugin (a ruby newb here) for cinch bot, so that it gets some RSS and then puts it out. However, I am not really sure where to allocate a method which will continously download data every 10 minutes or so (I would like to create a Thread.new for it). I think the best idea would be to add it to initialize (so after class [plugin in this case] initializaiton it'll automatically run), however I am not sure how to /add/ a
<marahin> method to initialize without completely overriding the initialize() with only my method.
<Everlost> d0nn1e: I've installed a few other packets like ruby-devel, libpcap-devel
htmldrum has joined #ruby
<marahin> e.g.: is there any way in overriding intiialize so it remains as it was but only adding a method at the end, OR is there any other good way to make Object run a method after being initialized?
mooe has joined #ruby
<jhass> marahin: cinch has a Timer API to delay or periodically do stuff, I don't remember whether it has a nice point to define them though
<marahin> jhass, oh, I must have missed that
<marahin> thank you, I'll look it up
<adaedra> anyway, it's reaaaaally time for me to bed. Good night, Bonne nuit, Gute Nacht, God Natt, or whatever floats your boat.
<marahin> jhass, In Cinch, two ways for creating timers are available:
<marahin> The first way is by declaring them for a plugin, in which case they will start as soon as the bot connects to a server.
<Everlost> [E] undefined method `arp_opcode' for nil:NilClass
<marahin> seems perfectly crafted for me :-) thank you!
<jhass> yw
gustav_ has quit [Remote host closed the connection]
jessemcgilallen has quit [Quit: jessemcgilallen]
<d0nn1e> Everlost, Ill pm you
<Everlost> ah guys, your gem is mean, but your community is helpful, and bettercap rocks and is ruby powered. So all in all I'd vote your community up :p
icemancast has joined #ruby
dopie has quit [Quit: This computer has gone to sleep]
platzhirsch has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
symm- has quit [Ping timeout: 240 seconds]
I has joined #ruby
symm- has joined #ruby
I is now known as Guest19752
exadeci has joined #ruby
jessemcgilallen has joined #ruby
icemancast has left #ruby [#ruby]
<drbrain> ew, pcaprub (used by bettercap) doesn't release the GVL when waiting for packets
dimasg has quit [Ping timeout: 260 seconds]
<drbrain> so it blocks threaded processing
s2013 has joined #ruby
yoongkang has joined #ruby
Guest19752 has quit [Ping timeout: 240 seconds]
rdavila has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<drbrain> oh, worse, it sets non-blocking mode so you need to busy-loop
cryo28 has joined #ruby
<jhass> drbrain: bored? :P
adriancb_ has quit [Remote host closed the connection]
dopie has joined #ruby
<drbrain> given that I wrote my own libpcap wrapper, I'm interested in other people's work
<jhass> ah, hehe. PR yours to bettercap? :P
dimasg has joined #ruby
Oatmeal has quit [Ping timeout: 260 seconds]
yoongkang has quit [Ping timeout: 255 seconds]
skade has quit [Quit: Computer has gone to sleep.]
baweaver has quit [Remote host closed the connection]
wilsonc91 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
symm-_ has joined #ruby
symm- has quit [Ping timeout: 255 seconds]
mjuszczak has quit []
MarkRenton has joined #ruby
<darix> drbrain: is it on rubygems.org?
djstorm has quit [Ping timeout: 260 seconds]
s2013 has quit [Read error: Connection reset by peer]
<darix> packaging!
whiteline has quit [Remote host closed the connection]
<shevy> yay \o/
dopamean_ has quit [Ping timeout: 240 seconds]
<shevy> Package all the things.
DurstBurger has quit [Ping timeout: 244 seconds]
havenn has joined #ruby
loc22 has quit [Quit: Lingo: www.lingoirc.com]
pawnbox has joined #ruby
skade has joined #ruby
jetpackjoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Trynemjoel has quit [Ping timeout: 250 seconds]
mrd_ has quit [Ping timeout: 260 seconds]
dimasg has quit [Ping timeout: 250 seconds]
axsuul has joined #ruby
wilsonc91 has joined #ruby
dopamean_ has joined #ruby
pawnbox has quit [Ping timeout: 264 seconds]
B1n4r10 has joined #ruby
zack6849 has quit [Quit: Leaving]
ascarter has joined #ruby
diegoaguilar has joined #ruby
havenn has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby
havenwood has joined #ruby
Oatmeal has joined #ruby
dome22xl has joined #ruby
Trynemjoel has joined #ruby
Gi0 has joined #ruby
rwy has quit [Ping timeout: 246 seconds]
maloik has quit [Ping timeout: 246 seconds]
_seanc_ has quit [Ping timeout: 240 seconds]
bryanray has joined #ruby
m3_del has joined #ruby
gambl0re has joined #ruby
symm-_ has quit [Ping timeout: 276 seconds]
dome22xl has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
jetpackjoe has joined #ruby
marahin has quit [Quit: ZNC - http://znc.in]
jetpackjoe has quit [Max SendQ exceeded]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zacstewart has quit [Remote host closed the connection]
stannard has quit [Remote host closed the connection]
nomadic has quit [Ping timeout: 250 seconds]
jetpackjoe has joined #ruby
bersimoes has quit [Remote host closed the connection]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jetpackjoe has quit [Client Quit]