havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.4.1, 2.3.4 & 2.2.7: https://www.ruby-lang.org || Paste >3 lines of text to: https://gist.github.com || Rails questions? Ask in: #RubyOnRails || Logs: https://irclog.whitequark.org/ruby || Books: https://goo.gl/wpGhoQ
nankyokusei has quit [Ping timeout: 246 seconds]
amclain has quit [Quit: Leaving]
zenguy_pc has joined #ruby
RobertBi_ has quit [Quit: Textual IRC Client: www.textualapp.com]
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Trynemjoel has quit [Ping timeout: 264 seconds]
zipace has quit [Ping timeout: 245 seconds]
zenguy_pc has quit [Ping timeout: 240 seconds]
patr0clus has joined #ruby
zenguy_pc has joined #ruby
trampy has joined #ruby
cadillac_ has quit [Ping timeout: 240 seconds]
brent__ has joined #ruby
Trynemjoel has joined #ruby
brent__ has quit [Ping timeout: 255 seconds]
bkxd has joined #ruby
al2o3-cr is now known as kek
kek is now known as al2o3-cr
blackmesa has quit [Ping timeout: 240 seconds]
blackmesa has joined #ruby
mostlybadfly has joined #ruby
bkxd has quit [Ping timeout: 255 seconds]
frem has quit [Quit: Connection closed for inactivity]
trampy has quit [Ping timeout: 255 seconds]
blackmesa has quit [Ping timeout: 246 seconds]
JayGee has quit [Read error: Connection reset by peer]
olivi____ has joined #ruby
marr has quit [Ping timeout: 240 seconds]
rkazak_ has joined #ruby
nitric has quit [Ping timeout: 260 seconds]
knight33 has quit [Quit: Textual IRC Client: www.textualapp.com]
olivi____ has quit [Ping timeout: 246 seconds]
jameser has joined #ruby
spheric has quit [Ping timeout: 260 seconds]
perniciouscaffei has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sepp2k has quit [Quit: Leaving.]
jenrzzz has quit [Ping timeout: 240 seconds]
rikai_ has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
Tempesta has joined #ruby
rikai has joined #ruby
ecuanaso has joined #ruby
jgt3 has joined #ruby
rikai has quit [Client Quit]
rikai has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
jgt3 has quit [Ping timeout: 240 seconds]
nertzy has quit [Quit: This computer has gone to sleep]
marxarelli is now known as marxarelli|afk
rikai has quit [Ping timeout: 246 seconds]
duderono_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rikai has joined #ruby
charliesome has joined #ruby
gusrub has quit [Remote host closed the connection]
shinnya has quit [Ping timeout: 246 seconds]
<stormbytes> what does this phrase 'say' in Ruby terms: Application::Console.prompt.display
enterprisey has joined #ruby
<stormbytes> is Application a class with Console as a method or module?
<elomatreb> Application is a module, Console is (probably) a class, and prompt and display are methods
davidmichaelkarr has quit [Quit: Connection closed for inactivity]
<stormbytes> chained methods?
<elomatreb> Yes
<elomatreb> (Application::Console.prompt).display
<stormbytes> meaning... <execute>display and pass the output onto prompt
<elomatreb> No, it calls prompt on Console, and then .display on the return value of that
oliv_____ has joined #ruby
mitt3ns has joined #ruby
<stormbytes> Oh, i see.. ok. so, simplifying it a bit, assuming I'm not using a module... I would define a class called Console and some methods, and then I could just call them with Console::method without instantiating the class?
<ineb> like Human::Male.mouth.speak :)
<stormbytes> lol ineb well put
<bougyman> => :lies
<elomatreb> If you need to call the methods without instantiation you need to define them as such
<stormbytes> how is it you don't need to George = new Male
<elomatreb> `def method` vs. `def self.method`, where the latter is callable on the Class (that is without instantiation)
<stormbytes> elomatreb how do you do that?
<bougyman> ideally (imo), self.thing is just an alternate way to instantiate the class.
<havenwood> stormbytes: "Application is a #{Application.class} and Application::Console is a #{Application::Console.class} with a #{Application::Console.class.downcase} method ::prompt which returns a #{Application::Console.prompt.class}."
<stormbytes> havenwood wow.. that's a mouthful :)
<bougyman> for "helper" type methods I'd use a Module.method
<havenwood> stormbytes: Run it!
<stormbytes> run what?
Guest73587 has quit [Excess Flood]
agent_white has quit [Remote host closed the connection]
forgot has joined #ruby
<stormbytes> oh.. that?
<havenwood> stormbytes: That ^ string
jcao219 has quit [Ping timeout: 246 seconds]
<stormbytes> in... that eva thing?
<stormbytes> eval
<havenwood> irb or pry
<havenwood> ?pry
<ruby[bot]> Pry, the better IRB, provides easy object inspection `ls`, `history`, viewing docs `?`, viewing source `$`, syntax highlighting and other features (see `help` for more). Put `binding.pry` in your source code for easy debugging. Install Pry (https://pryrepl.org/): gem install pry pry-doc
<stormbytes> havenwood: NameError: uninitialized constant Application
<havenwood> stormbytes: require your code first
<stormbytes> i don't have any
<stormbytes> its pseudocode from an example
<havenwood> oh
hanmac has quit [Ping timeout: 246 seconds]
<stormbytes> i was trying to figure out what it was
<havenwood> stormbytes: Then nevermind!
<stormbytes> :)
<stormbytes> Pry vs IRB for simple stuff?
<havenwood> stormbytes: But if it was code, you can introspect thusly.
<havenwood> stormbytes: Either.
<havenwood> stormbytes: Most pry users solely use pry.
<havenwood> Unless pry isn't installed for whatever reason.
<stormbytes> i sometimes use irb to test out code
<stormbytes> seems to work well enough
<havenwood> stormbytes: There's no harm in starting with pry. It's probably more intuitive than irb.
<havenwood> stormbytes: gem install pry
<stormbytes> gem install pry
<stormbytes> heh
<stormbytes> why not
uZiel has joined #ruby
<stormbytes> nice color coding
poloych has quit [Remote host closed the connection]
s1kx has joined #ruby
<havenwood> stormbytes: If you'd like fancier colors: gem install pry-theme
<havenwood> stormbytes: In my ~/.pryrc I set: Pry.config.theme = 'railscasts'
<havenwood> Speaking of which, I should make a theme to match my editor.
<elomatreb> Depending on your terminal emulator you can change its colors too
<stormbytes> pretty cool :)
<stormbytes> i use mostly iterm2
poloych has joined #ruby
<stormbytes> its cool that you can look up the methods of anything and get color coded output
oliv_____ has quit [Ping timeout: 246 seconds]
patr0clus has quit [Quit: tempusfugit]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
TheHodge has quit [Quit: Connection closed for inactivity]
bruce_lee has quit [Ping timeout: 255 seconds]
jcao219 has joined #ruby
bruce_lee has joined #ruby
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
dc2 has quit [Ping timeout: 260 seconds]
DoubleMalt has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
d^sh has quit [Ping timeout: 240 seconds]
<stormbytes> what does this mean (the last part I get, its splitting a string on a delimiter) : command, *params = input.split /\s/
hanmac has joined #ruby
<stormbytes> this is preceded by input = gets.chomp
d^sh has joined #ruby
sleetdrop has quit [Quit: Computer has gone to sleep.]
al2o3-cr has quit [Quit: WeeChat 1.8]
poloych has quit [Remote host closed the connection]
cjhowe7 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mim1k has joined #ruby
cjhowe7 has joined #ruby
<havenwood> stormbytes: In irb or pry try: head, *tail = [1, 2, 3, 4]
<stormbytes> oh thats way cool
<havenwood> stormbytes: Or try: head, *body, tail = [1, 2, 3, 4]
KnownSyntax has quit [Ping timeout: 246 seconds]
<stormbytes> lets say i have a string and I want to test it for certain substrings and perform an action if one is found, would that be best served with case/when or if/elsif?
<havenwood> it depends
trampy has joined #ruby
<stormbytes> havenwood that's nuts.. so first one goes to the first var, then last elem to the last variabe, and everything else gets dumped into *body
mim1k has quit [Ping timeout: 246 seconds]
jcao219 has quit [Ping timeout: 260 seconds]
rkazak_ has quit [Quit: Sleep.....ing....]
enterprisey has quit [Remote host closed the connection]
KnownSyntax has joined #ruby
dc2 has joined #ruby
gizmore|2 has joined #ruby
gizmore has quit [Ping timeout: 246 seconds]
mim1k has joined #ruby
im0nde has quit [Ping timeout: 268 seconds]
mim1k has quit [Ping timeout: 255 seconds]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
czeq has joined #ruby
trampy has quit [Ping timeout: 260 seconds]
ascarter has joined #ruby
duderonomy has joined #ruby
GodFather has quit [Ping timeout: 260 seconds]
mrconfused has joined #ruby
mim1k has joined #ruby
mim1k has quit [Ping timeout: 260 seconds]
frem has joined #ruby
genpaku has quit [Remote host closed the connection]
uZiel has quit [Ping timeout: 248 seconds]
genpaku has joined #ruby
bkxd has joined #ruby
czeq has quit [Ping timeout: 260 seconds]
A124 has quit [Ping timeout: 255 seconds]
knight33 has joined #ruby
bkxd has quit [Ping timeout: 246 seconds]
A124 has joined #ruby
cschneid_ has joined #ruby
mim1k has joined #ruby
cschneid_ has quit [Ping timeout: 255 seconds]
sleetdrop has joined #ruby
jcao219 has joined #ruby
mim1k has quit [Ping timeout: 259 seconds]
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
HoierM has quit [Ping timeout: 246 seconds]
dc2 has quit [Ping timeout: 260 seconds]
jgt3 has joined #ruby
jgt3 has quit [Ping timeout: 258 seconds]
mim1k has joined #ruby
latemus has quit [Ping timeout: 240 seconds]
Ferdroid has quit [Ping timeout: 268 seconds]
Ferdroid has joined #ruby
mim1k has quit [Ping timeout: 246 seconds]
gusrub has joined #ruby
jackjackdripper has joined #ruby
Ferdroid has quit [Ping timeout: 240 seconds]
jackjackdripper has quit [Client Quit]
jackjackdripper has joined #ruby
gusrub has quit [Ping timeout: 246 seconds]
Ferdroid has joined #ruby
hashrocket has quit [Quit: Connection closed for inactivity]
gix has quit [Ping timeout: 255 seconds]
AnoHito_ has joined #ruby
gix has joined #ruby
AnoHito has quit [Ping timeout: 268 seconds]
cfec0b8d has joined #ruby
mitt3ns is now known as agent_white
jenrzzz has joined #ruby
jgnagy has joined #ruby
jgnagy has quit [Ping timeout: 246 seconds]
uZiel has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
Immune has joined #ruby
arescorpio has joined #ruby
perniciouscaffei has joined #ruby
uZiel has quit [Ping timeout: 248 seconds]
dasher00 has quit [Ping timeout: 246 seconds]
<stormbytes> is this illegal elsif input.include?("calories" || "calorie")?
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenwood> stormbytes: "calories" || *anything here* #=> "calories"
<lostapathy> "legal", yes. What you want, doubtful
<stormbytes> figured
<stormbytes> i can use a regex to append the optional 's'
mim1k has joined #ruby
<lostapathy> think about it from the inside of parenthesis out, like havenwood did
dasher00 has joined #ruby
<lostapathy> input.include?("calorie") probably does what you want in that case, since you aren't matching on anything else afterward - it allows the s or anything else
<stormbytes> so that becomes an if (foo) || do something else
<stormbytes> lostapathy good point
<stormbytes> didn't see that
mim1k has quit [Ping timeout: 240 seconds]
rohitpaulk has joined #ruby
nowhere_man has quit [Remote host closed the connection]
patarr has joined #ruby
nowhere_man has joined #ruby
Cohedrin has quit [Read error: Connection reset by peer]
Cohedrin has joined #ruby
renchan has joined #ruby
patarr has quit [Ping timeout: 268 seconds]
knight33 has joined #ruby
nofxxx has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jcao219 has quit [Ping timeout: 255 seconds]
AnoHito has joined #ruby
enterprisey has joined #ruby
nofxxxx has quit [Ping timeout: 246 seconds]
ascarter has joined #ruby
AnoHito_ has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
ascarter has quit [Ping timeout: 255 seconds]
ascarter has joined #ruby
AnoHito_ has joined #ruby
AnoHito has quit [Ping timeout: 240 seconds]
AnoHito has joined #ruby
ascarter_ has joined #ruby
jcao219 has joined #ruby
AnoHito_ has quit [Ping timeout: 245 seconds]
Bock has joined #ruby
skixlix has joined #ruby
<skixlix> Why is it that with the lcm method you would have 9.lcm(3) where 9 is the receiver and 3 is the argument, but for a self defined thing, like
<skixlix> def add_two_numbers(x, y)
<skixlix> x + y
<skixlix> end
<skixlix> you would have to use it without a receiver, and just use two arguments?
<skixlix> add_two_numbers(5, 2) would output 7, but why not have it be
<skixlix> 5.add_two_numbers(2)
<skixlix> I don't see any reason the 9 needs to be in front for the lcm, 3 and 9 are just two things needed right, nothing special about the 9
jenrzzz has joined #ruby
<arahael> skixlix: Because it doesn't scale. Why should "add_two_numbers" be a property of integers?
<arahael> skixlix: But sure, if you have a 10-line script, do it that way.
<arahael> skixlix: But where I am, I count lines of code in the millions.
ascarter has quit [Ping timeout: 240 seconds]
<skixlix> hmm
<skixlix> what do you mean "be a property of integers?"
<skixlix> both use integers, rite? the lcm and the adding numbers one
<skixlix> what is the point of the receiver vs the argument?
<arahael> skixlix: Ruby has single-dispatch.
<skixlix> the 9 in 9.lcm(3) is the receiver and the 3 is the argument, correct?
<arahael> skixlix: It determines which method you want to use by way of single dispatch - the reciever dictates which method is called.
<skixlix> oh interesting
<skixlix> I'm gonna read more about that
<arahael> skixlix: Generally speaking, most object oriented systems are single dispatch - only a very few support multiple dispatch.
<arahael> skixlix: So what you learn there is likely to be general.
<skixlix> so the receiver is just the 9, or the 9.lcm as a group
<skixlix> the lcm is the part that ensures the program knows which method I'm trying to use right
mitt3ns has joined #ruby
<arahael> skixlix: The receiver there is the 9. lcm is the name of the message you are sending to it, with the arguments.
Cohedrin has quit [Read error: Connection reset by peer]
<skixlix> ahh Isee
<skixlix> why is it they couldn't have done it
<skixlix> lcm(9, 3)
cschneid_ has joined #ruby
<arahael> skixlix: They could have done it that way. But I guess the writer decided that all integeres should support that.
jgt3 has joined #ruby
axsuul has joined #ruby
<arahael> skixlix: Though personally, I'd like to put it into some sort of math library, but the advantage of putting it into the integer class means that you can have a sorta-infix style of writing.
<arahael> skixlix: lcm(9, 3) <-- That's prefix. 9.lcm(3) <-- Sorta-infix.
agent_white has quit [Ping timeout: 246 seconds]
<arahael> And most people are more comfortable with infix style when doing maths.
<dminuoso> arahael: I would not call this infix style no matter how many beer I had.
<skixlix> wow ok thank you very much
<skixlix> I'm very new to ruby, sorry I sound like such a noob
<skixlix> thanks for the help though, you've given me some to read up on too :)
<arahael> dminuoso: Yeah. Even "sorta infix" style is pushing it. :(
Cohedrin has joined #ruby
<skixlix> I'm not sure what infix and prefix are referring to when talking about coding, I'm googling lol
ascarter_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dminuoso> skixlix: prefix: + 1 2
<dminuoso> postfix 1 2 +
<arahael> skixlix: It's not infix, however I was hoping to suggest that the way it's written is different. Google RPN notation, vs infix.
<dminuoso> infix 1 + 2
<dminuoso> function style: add(1, 2)
<skixlix> oh
<dminuoso> method style: 1.add(2)
cschneid_ has quit [Ping timeout: 246 seconds]
<dminuoso> or the more ruby-like variant
<skixlix> oh it has to do with the location of the operator
<arahael> skixlix: l-expr style: (+ 1 2)
<arahael> skixlix: m-expr style: +(1 2)
<dminuoso> 1.+(2)
jgt3 has quit [Ping timeout: 246 seconds]
<dminuoso> skixlix: Yeah. It's basically a parsing thing.
boombox_ has joined #ruby
<arahael> skixlix: Haskell infix style: 1 `add` 2
<dminuoso> skixlix: and some notations, like the Polish notation for mathematics, dont use infix.
<skixlix> so
<skixlix> 3.times do
hutch34 has joined #ruby
<arahael> skixlix: But in this particular case with ruby, it also becomes a code organisation thing.
<skixlix> does that have an infix postfix
<skixlix> type thing
jackjackdripper has quit [Quit: Leaving.]
<dminuoso> skixlix: no
<skixlix> or no because there's only a 3
<dminuoso> skixlix: it's method-style
<skixlix> ah
<skixlix> so in ruby it can change
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<skixlix> like I could define something as infix or otherwise
rohitpaulk has quit [Ping timeout: 246 seconds]
rohitpaulk has joined #ruby
<dminuoso> skixlix: no
<dminuoso> skixlix: infix operators are hardwired into the parser
<dminuoso> skixlix: but they are overloadable
<skixlix> oh ok
<arahael> skixlix: In other languages, any standalone function can be used infix style, but not in ruby.
<arahael> skixlix: (Eg, the backticks for the haskell version I gave)
<dminuoso> skixlix: And by overloadable I mean: you can take any class, define the method :+ on it, and then you can take two objects like car1 and car2 and do: result = car1 + car2
<skixlix> ah right
<arahael> Note, there, that in ruby, even that uses single-dispatch to resolve the operator.
oleo has quit [Quit: irc client terminated!]
<dminuoso> Or in some cases not even that. :-)
<skixlix> hmm ok ty
<dminuoso> arahael: Are you new around here? I distinctly remember seeing your name in the C++ channels
<dminuoso> And by here I mean #ruby
<skixlix> I'll brb thanks tho guys :D
hutch34 has quit [Ping timeout: 240 seconds]
boombox_ has quit [Remote host closed the connection]
aupadhye has joined #ruby
aupadhye has quit [Ping timeout: 268 seconds]
arescorpio has quit [Quit: Leaving.]
ascarter has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
skixlix is now known as skixlixxx
nimboo has joined #ruby
skixlixxx is now known as skixlix
harfangk has joined #ruby
<nimboo> hi
nalread has joined #ruby
nimboo has quit [Client Quit]
nimboo has joined #ruby
aupadhye has joined #ruby
skixlix is now known as skixlixx
skixlixx is now known as skixlix
nimboo has quit [Client Quit]
__Yiota has joined #ruby
uZiel has joined #ruby
__Yiota has quit [Ping timeout: 246 seconds]
szu has joined #ruby
aufi has joined #ruby
morfin has joined #ruby
<arahael> dminuoso: I come and go, but I suppose I am still relatively new to #ruby.
<morfin> returning to Random - seems like there is only uniform distribution
<dminuoso> morfin: What do you mean?
<morfin> did you see how many distributions has <random> in C++?
<dminuoso> Random is just your standard MT19337 PRNG
<dminuoso> Yes.
segmond has quit [Quit: l8r]
<morfin> uniform, discrete, gamma, bernoulli etc
<dminuoso> Oh well.
<dminuoso> morfin: Ruby is rarely used in scientific scenarios. It's kind of a devils circle I guess.
<morfin> :)
<dminuoso> morfin: Be glad that the OpenSSL support is plugged in so well. :-)
<arahael> morfin: I often see scientific circles using python.
<dminuoso> ^-
skixlix has quit []
<arahael> Though, Julia seems to be growing.
<dminuoso> Which again is yet another devils circle.
<morfin> hmm
<morfin> why so?
<morfin> poor perfomance for their purposes?
zenguy_pc has quit [Ping timeout: 255 seconds]
jcao219 has quit [Ping timeout: 260 seconds]
<arahael> morfin: On the contrary, it has pretty good performance. Together with tools such as ipython (know known as Jupyter), it's pretty good. The problem is that the toolchain is a bit of a mess.
<dminuoso> Jupyter? Really?
<dminuoso> That is such terrible naming..
pwnd_nsfw` has joined #ruby
<morfin> i think GCC is real mess: )
<dminuoso> morfin: GCC is old.
<morfin> i know
<arahael> GCC is very old.
<dminuoso> morfin: Most GNU projects are a mess because they have evolved from 20-30 years of development.
enterprisey has quit [Remote host closed the connection]
<morfin> and Python is not such mess
<dminuoso> Just look at autotools
<dminuoso> Its gross.
<morfin> eew
<dminuoso> GCC is completely harmless
<morfin> autotools is thing i avoid
<morfin> and m4
pwnd_nsfw has quit [Ping timeout: 260 seconds]
<arahael> dminuoso: It's a better name than "ipython". ;)
<morfin> well, most cases require uniform distribution
ur5us has quit [Remote host closed the connection]
zenguy_pc has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
rohitpaulk has quit [Ping timeout: 255 seconds]
<arahael> morfin: I'd be careful claiming that.
<arahael> morfin: The nature of the distribution tends to be quite significant. Gaming, vs encryption scenarios, for instance.
<arahael> When I am doing tests, I even like _predicably-random_ distributions.
<matthewd> morfin: I think SciRuby might cover that domain
Cohedrin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rohitpaulk has joined #ruby
<arahael> morfin: If you're looking at that, see if this works for you: https://github.com/SciRuby/iruby
anisha has joined #ruby
zenguy_pc has quit [Ping timeout: 260 seconds]
mitt3ns is now known as agent_white
gothicsouth has joined #ruby
jameser has quit [Ping timeout: 240 seconds]
zenguy_pc has joined #ruby
jameser has joined #ruby
Cohedrin has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
Mortomes|Work has joined #ruby
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
xall has joined #ruby
szu has quit [Quit: Leaving]
Bhootrk_ has joined #ruby
Bhootrk_ has quit [Max SendQ exceeded]
mim1k has joined #ruby
audy has joined #ruby
ascarter has joined #ruby
vali has joined #ruby
aufi has quit [Ping timeout: 255 seconds]
mim1k has quit [Ping timeout: 260 seconds]
ascarter has quit [Ping timeout: 246 seconds]
dionysus69 has joined #ruby
perniciouscaffei has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Pumukel has joined #ruby
saltsa has quit [Ping timeout: 240 seconds]
Pumukel has quit [Read error: Connection reset by peer]
Pumukel has joined #ruby
Pumukel has quit [Read error: Connection reset by peer]
Pumukel has joined #ruby
andikr has joined #ruby
yogg-saron has joined #ruby
sunrunner20 has quit [Read error: Connection reset by peer]
Pumukel has quit [Ping timeout: 260 seconds]
saltsa has joined #ruby
mim1k has joined #ruby
<morfin> i am not sure which distribution used in encryption - as example when you use OpenSSL for that
belmoussaoui has quit [Ping timeout: 240 seconds]
zenguy_pc has quit [Ping timeout: 246 seconds]
zenguy_pc has joined #ruby
rohitpaulk has quit [Ping timeout: 240 seconds]
rkazak has joined #ruby
rkazak has quit [Client Quit]
claw has joined #ruby
SeepingN has joined #ruby
jgt3 has joined #ruby
rohitpaulk has joined #ruby
<apeiros> moin
SeepingN has quit [Quit: The system is going down for reboot NOW!]
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
hanna has left #ruby ["WeeChat 1.9-dev"]
JoshS has quit [Read error: Connection reset by peer]
nanoz has joined #ruby
nanoz has joined #ruby
nanoz has quit [Changing host]
JoshS has joined #ruby
nowhere_man has quit [Remote host closed the connection]
blackwind_123 has quit [Quit: On the other hand, you have different fingers.]
HoloIRCUser1 has joined #ruby
mark_66 has joined #ruby
aufi has joined #ruby
Silthias1 has joined #ruby
Silthias has quit [Ping timeout: 255 seconds]
blackmesa has joined #ruby
zenguy_pc has quit [Ping timeout: 255 seconds]
Antiarc_ has quit [Ping timeout: 240 seconds]
rohitpaulk has quit [Ping timeout: 255 seconds]
zenguy_pc has joined #ruby
rohitpaulk has joined #ruby
patarr has joined #ruby
zipace has joined #ruby
jameser has quit [Read error: Connection reset by peer]
patarr has quit [Ping timeout: 240 seconds]
Burgestrand has joined #ruby
jgnagy has joined #ruby
psychicist__ has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jameser has joined #ruby
c00kiemon5ter has joined #ruby
<c00kiemon5ter> hi all
<c00kiemon5ter> is there any case where the following would evaluate to true?
<c00kiemon5ter> if octets.any? { |_| false }
glejeune has joined #ruby
aufi has quit [Ping timeout: 258 seconds]
jgnagy has quit [Ping timeout: 268 seconds]
rohitpaulk has quit [Ping timeout: 268 seconds]
<ljarvis> c00kiemon5ter: no
bkxd has joined #ruby
<c00kiemon5ter> thanks, my understanding is correct
blackwind_123 has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
c00kiemon5ter has left #ruby [#ruby]
blackmesa has quit [Quit: WeeChat 1.6]
z3uS has quit [Ping timeout: 255 seconds]
<apeiros> too bad they left, wanted to tell them that they could leave |_| away :)
z3uS has joined #ruby
charliesome has joined #ruby
mikecmpbll has joined #ruby
davic has joined #ruby
dn` has joined #ruby
hurricanehrndz has quit [Quit: Goodbye]
bkxd has quit [Ping timeout: 255 seconds]
hurricanehrndz has joined #ruby
nanoz] has joined #ruby
Antiarc has joined #ruby
workmad3 has joined #ruby
Burgestrand has quit [Read error: Connection reset by peer]
nanoz has quit [Ping timeout: 258 seconds]
<dminuoso> morfin: The problem is that encryption requires more than uniformity.
Burgestrand has joined #ruby
<dminuoso> or crypto rather.
<dminuoso> morfin: A simple sequence that overflows for example is a perfectly uniform distribution.
Burgestr_ has joined #ruby
Burgestrand has quit [Read error: Connection reset by peer]
<mikecmpbll> hello this splendid morning
<dminuoso> (i.e. golombs randomness postulates, maurers universal statistical test, etc)
<dminuoso> Uniformity just is not enough.
<dminuoso> ljarvis: I can see a case where it would evaluate to true.
nanoz] has quit [Ping timeout: 240 seconds]
<dminuoso> >> class F; def any; true; end; end; octets = F.new; puts octets.any? { |_| false }
<ruby[bot]> dminuoso: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<dminuoso> >> class F; def any; true; end; end; octets = F.new; puts octets.any? { |_| false }
* dminuoso kicks ruby[bot]
<ruby[bot]> dminuoso: I'm terribly sorry, I could not evaluate your code because of an error: OpenURI::HTTPError:500 Internal Server Error
* dminuoso punches ruby[bot]
<dminuoso> >> class F; def any; true; end; end; octets = F.new; puts octets.any? { |_| false }
<ruby[bot]> dminuoso: I'm terribly sorry, I could not evaluate your code because of an error: OpenURI::HTTPError:500 Internal Server Error
* dminuoso sighs
<ljarvis> your code is wrong anyway
<dminuoso> Oh.
<ljarvis> but yes, you pedant
<dminuoso> I was hoping to win a cookie
<dminuoso> and failed miserably at nitpicking.
<ljarvis> yep, no cookie for you
<dminuoso> :(
gusrub has joined #ruby
Cohedrin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rohitpaulk has joined #ruby
dennisvennink has joined #ruby
vali has quit [Remote host closed the connection]
gusrub has quit [Ping timeout: 240 seconds]
vali has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
PatrikasZvaigzde has quit [Ping timeout: 246 seconds]
Antiarc has quit [Ping timeout: 260 seconds]
mim1k has quit [Ping timeout: 246 seconds]
nanoz has joined #ruby
nanoz has joined #ruby
nanoz has quit [Changing host]
xall has quit [Ping timeout: 245 seconds]
mim1k has joined #ruby
PatrikasZvaigzde has joined #ruby
zenguy_pc has quit [Ping timeout: 246 seconds]
bvcosta has joined #ruby
<workmad3> oh, random distributions? fun :)
fxa90id has joined #ruby
fxa90id has joined #ruby
fxa90id has quit [Changing host]
zenguy_pc has joined #ruby
cjhowe7 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
HoloIRCUser1 has quit [Ping timeout: 246 seconds]
aufi has joined #ruby
jameser_ has joined #ruby
jameser has quit [Ping timeout: 240 seconds]
nalread has quit [Quit: Leaving]
CrazyEddy has quit [Remote host closed the connection]
jameser has joined #ruby
* dminuoso hides workmad3's cookies using a random distribution
<dminuoso> Good luck finding them.
nanoz has quit [Ping timeout: 246 seconds]
<universa1> pseudo random? ;)
jameser_ has quit [Ping timeout: 255 seconds]
HoloIRCUser2 has joined #ruby
xall has joined #ruby
<herwin> it's easy to find them: it were tracking cookies
Otti has joined #ruby
dionysus69 has quit [Ping timeout: 260 seconds]
zenguy_pc has quit [Ping timeout: 246 seconds]
Antiarc has joined #ruby
dionysus69 has joined #ruby
navycrosser has joined #ruby
zenguy_pc has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
minimalism has quit [Ping timeout: 255 seconds]
pandaant has joined #ruby
mim1k has quit [Ping timeout: 255 seconds]
jameser has joined #ruby
Pumukel has joined #ruby
mim1k has joined #ruby
Pumukel has quit [Read error: Connection reset by peer]
bvcosta has quit [Remote host closed the connection]
Pumukel has joined #ruby
bvcosta has joined #ruby
Pumukel has quit [Read error: Connection reset by peer]
Pumukel has joined #ruby
ur5us has joined #ruby
mikecmpbll has quit [Read error: Connection reset by peer]
mikecmpbll has joined #ruby
bvcosta has quit [Ping timeout: 246 seconds]
Pumukel has quit [Read error: Connection reset by peer]
Pumukel has joined #ruby
rohitpaulk has quit [Ping timeout: 260 seconds]
lxsameer has joined #ruby
Otti has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgr has joined #ruby
<dminuoso> herwin: In soviet russia cookies track you.
cschneid_ has joined #ruby
<apeiros> shouldn't that be the other way round?
<apeiros> since in the normal world, cookies track you, it'd be "In soviet russia, you track cookies"?
<herwin> Chuck Norris doesn't need breadcrumbs, he has tracking cookies
<workmad3> I wish I could track cookies... I'm hungry :(
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Pumukel has quit [Ping timeout: 260 seconds]
antgel has joined #ruby
<workmad3> also, I really need to uphold my culture better and start calling them 'tracking biscuits'
<dminuoso> apeiros: I turned it around since herwin implied already that a tracking cookie means you could track the cookie, thus making the cookies easy to find,
cschneid_ has quit [Ping timeout: 246 seconds]
<dminuoso> Though I admit Im kind of pulling a Sheldon there.
<workmad3> s/Im/I'm/ :P
<workmad3> (seriously, your pedantism is not kicking in fully today, is it? :) )
<dminuoso> Oh boy.
<dminuoso> You are right. I give up today.
<dminuoso> Opioid painkillers seem to have an impact on my brain.
<apeiros> can you give it to me? I'm still in need of a today.
<workmad3> heh :) well, that is kinda what they're meant to do
<dminuoso> Heh
<apeiros> oy? what are you on and why?
<workmad3> given he's able to type, I'm guessing codeine?
navycrosser has quit [Ping timeout: 240 seconds]
Terens has joined #ruby
<Terens> hello
marr has joined #ruby
vali has quit [Read error: Connection reset by peer]
mikecmpb_ has joined #ruby
mikecmpbll has quit [Ping timeout: 246 seconds]
xychix has quit [Ping timeout: 240 seconds]
tvw has joined #ruby
<apeiros> hi Terens
<Terens> I am using event-machine with HTTP. All I want to do is do periodic post requests. Adding periodic_timer how can I ensure that previous request has finisehd?
roshanavand has joined #ruby
jameser has joined #ruby
<universa1> Terens: set a status flag?
jameser has quit [Client Quit]
nowhere_man has joined #ruby
<Terens> this is how it looks now
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
mikecmpbll has joined #ruby
jgt4 has joined #ruby
mikecmpb_ has quit [Ping timeout: 240 seconds]
nowhereman has joined #ruby
Kug3lis has joined #ruby
<universa1> Terens: there is most likely a better solution for event machine, but this might work: https://gist.github.com/universal/bfcf6b7368801692198eeb0ab4d70ff4
nowhere_man has quit [Ping timeout: 260 seconds]
jgt3 has quit [Ping timeout: 255 seconds]
yogg-saron has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mikecmpb_ has joined #ruby
<dminuoso> workmad3: spot on
mikecmpbll has quit [Ping timeout: 240 seconds]
<dminuoso> apeiros: My doctor thinks that cutting into my foot and stitching it up might be painful.
<dminuoso> I disagree. I dont feel a think, should just stop taking the painkillers.
jameser has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
ur5us has quit [Remote host closed the connection]
<workmad3> Terens: https://gist.github.com/workmad3/694243fc7eeb0bad72be3832f41284ee is another possibility without using status flags
rohitpaulk has joined #ruby
mikecmpbll has joined #ruby
<Terens> thanks guys
zenspider_ has joined #ruby
<workmad3> Terens: minor difference is that this method will start another request 5s after the last one finished, rather than every 5s
<Terens> indeed
<canton7> (might be a good thing: you might not want requests overlapping)
mikecmpb_ has quit [Ping timeout: 246 seconds]
<Terens> I guess so
zenspider has quit [Read error: Connection reset by peer]
xall has quit [Ping timeout: 255 seconds]
<Terens> I should find a way to terminate this too
<workmad3> and if you have a status flag, you avoid overlapping requests, but you may have the next request trigger only a second or so after the last one finished
<dminuoso> workmad3: Codeine sucks though, I don't feel high. :(
* dminuoso needs to find another docto
<dminuoso> doctor.
tomphp has joined #ruby
<workmad3> dminuoso: yeah, it's the weakest of the opioid painkillers (to the point where you can get it over the counter in the UK when it's combined with paracetamol or ibuprofen)
jameser has quit [Ping timeout: 240 seconds]
<dminuoso> I wonder, why is there no HTTP version that requires proof-of-work client side?
<dminuoso> Email has it :A
anisha has quit [Ping timeout: 240 seconds]
sylario has joined #ruby
flying has joined #ruby
anisha has joined #ruby
<apeiros> dminuoso: I think you have it wrong regarding cause & effect ;-p
xall has joined #ruby
patarr has joined #ruby
PenguinHunterX3X has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
PenguinHunterX3X has left #ruby [#ruby]
xychix has joined #ruby
romank has joined #ruby
rohitpaulk has quit [Ping timeout: 255 seconds]
patarr has quit [Ping timeout: 246 seconds]
jgnagy has joined #ruby
nowhereman has quit [Ping timeout: 240 seconds]
zenspider_ is now known as zenspider
zenspider has quit [Changing host]
zenspider has joined #ruby
belmoussaoui has joined #ruby
ddffg has joined #ruby
zenguy_pc has quit [Ping timeout: 246 seconds]
rohitpaulk has joined #ruby
jgnagy has quit [Ping timeout: 260 seconds]
<Terens> should I have a single EM.run block at my app ?
sleetdrop has quit [Quit: Computer has gone to sleep.]
zenguy_pc has joined #ruby
patarr has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
<zenspider> >> %w[yes no].sample
<ruby[bot]> zenspider: # => "yes" (https://eval.in/813258)
<zenspider> Terens: ^^
<Terens> lol
<matthewd> That's one more EM.run block than I would recommend, but that's not an actually-helpful answer either ;)
<matthewd> I *think* the answer is yes.
sunrunner20 has joined #ruby
glejeune has quit [Ping timeout: 255 seconds]
xychix has quit [Ping timeout: 240 seconds]
patarr has quit [Ping timeout: 240 seconds]
xychix has joined #ruby
mtkd has quit [Ping timeout: 240 seconds]
<zenspider> no code runs faster than no code
nowhereman has joined #ruby
mtkd has joined #ruby
nicesignal has quit [Remote host closed the connection]
nicesignal has joined #ruby
jameser has joined #ruby
stamina has joined #ruby
ryzokuken has joined #ruby
gigetoo has quit [Ping timeout: 258 seconds]
glejeune has joined #ruby
Pumukel has joined #ruby
davic has quit [Quit: Connection closed for inactivity]
gigetoo has joined #ruby
ozzy3 has joined #ruby
<ozzy3> hey
arup_r has joined #ruby
<ozzy3> guys
rgr has quit [Remote host closed the connection]
<ozzy3> can u run ruby command on android
mim1k has quit [Ping timeout: 260 seconds]
HoloIRCUser1 has joined #ruby
<dminuoso> ozzy3, kind of.
jameser_ has joined #ruby
mim1k has joined #ruby
<dminuoso> ozzy3, are you talking about just REPL or real apps?
blackwind_123 has quit [Ping timeout: 246 seconds]
<dminuoso> ozzy3, Ruboto and RubyMotion are probably the two projects you should be looking at.
jameser has quit [Read error: Connection reset by peer]
ferr1 has joined #ruby
HoloIRCUser2 has quit [Ping timeout: 255 seconds]
<ozzy3> i talking about android terminal
<ozzy3> termux
arup_r has left #ruby [#ruby]
blackwind_123 has joined #ruby
jameser_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yogg-saron has joined #ruby
mim1k has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 255 seconds]
mim1k has joined #ruby
anisha has quit [Ping timeout: 260 seconds]
ur5us has joined #ruby
uZiel has quit [Ping timeout: 248 seconds]
anisha has joined #ruby
tomphp has joined #ruby
jgt4 has quit [Ping timeout: 255 seconds]
<Terens> should I have in my gem within
<Terens> bin/gemnamesomething require 'bundler/setup' ?
sleetdrop has joined #ruby
ozzy3 has quit [Ping timeout: 240 seconds]
tomphp has quit [Client Quit]
Sievers has joined #ruby
Sievers has quit []
cfec0b8d has quit [Remote host closed the connection]
cfec0b8d has joined #ruby
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jgt4 has joined #ruby
Kug3lis has joined #ruby
tomphp has joined #ruby
tomphp has quit [Client Quit]
cfec0b8d has quit [Remote host closed the connection]
<dminuoso> Terens: Any way you could phrase that less coherently?
psychicist__ has quit [Ping timeout: 240 seconds]
glejeune has quit [Ping timeout: 240 seconds]
anisha has quit [Quit: This computer has gone to sleep]
stormbytes has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
BSaboia has joined #ruby
BSAlb has quit [Ping timeout: 246 seconds]
xall has quit [Ping timeout: 268 seconds]
<Terens> I mean when developing a gem whether I should include require 'bundler/setup' within bin/ files
pandaant has quit [Remote host closed the connection]
<dminuoso> Terens: If you are writing a gem, you already have your Gem::Specification to declare dependencies
<Terens> yes
<dminuoso> Some folks in here have opinions wrt to gem and bundler and dependencies.
<dminuoso> Im not one of them.
<Terens> I am having some trouble now with requires
<Terens> files within my gem
<Terens> lib
anisha has joined #ruby
<Terens> ok it seems that I have to commit changes
anisha has quit [Client Quit]
<dminuoso> commit early, commit often. a tip for version control - not for relationships.
anisha has joined #ruby
MarkBilk__ has quit [Ping timeout: 246 seconds]
contradictioned has quit [Ping timeout: 255 seconds]
anisha_ has joined #ruby
mim1k has quit [Read error: Connection reset by peer]
<slima> Hello, I need script for parse this documment: https://hazard.mf.gov.pl/api/Register I like to use this: http://www.nokogiri.org/tutorials/searching_a_xml_html_document.html there is my code: https://gist.github.com/slima/389266e08065428564607fff7fbfd128 but I have no results, can you help me?
anisha has quit [Read error: Connection reset by peer]
mim1k has joined #ruby
aupadhye has quit [Ping timeout: 260 seconds]
glejeune has joined #ruby
sonOfRa has quit [Remote host closed the connection]
sonOfRa has joined #ruby
cfec0b8d has joined #ruby
rgr has joined #ruby
benjen has quit [Ping timeout: 260 seconds]
<canton7> slima, it's getting tripped up on the namespaces: .xpath('//xmlns:AdresDomeny') works
<canton7> (tested by checking .css('AdresDomeny'), which works, then by reading http://www.nokogiri.org/tutorials/searching_a_xml_html_document.html)
swills has quit [Ping timeout: 260 seconds]
<dminuoso> Indeed. Namespace bindings are a bitch.
<dminuoso> Just use .css
MarkBilk has joined #ruby
benjen has joined #ruby
Lord_of_Life has left #ruby ["Laa shay'a waqi'un moutlaq bale kouloun moumkine"]
<canton7> use .remove_namspaces! also does the trick
<dminuoso> Uh...
agent_white has quit [Quit: bai]
<dminuoso> If only I had a shotgun to threaten you with.
<canton7> (not that I'd necessarily recommend it, but that doc doesn't use namespaces at all, other than setting the default xmlns)
<dminuoso> I'd say just use css
<dminuoso> the interface is so much more usable
<canton7> yeah, it's not quite as powerful, but I don't need to go read the xpath docs every time I see one :P
nowhereman has quit [Ping timeout: 246 seconds]
cdg has joined #ruby
<dminuoso> canton7: In my humble experience it's grossly overpaid Senior Java Enterprice Architects that use lots of fancy XPath expressions where a 10 character regex would have sufficed.
<dminuoso> Not before constructing a singleton HelperFactoryAdapterPolicyPatternGeneratorFactory though
DTZUZU has quit [Ping timeout: 268 seconds]
brent__ has joined #ruby
rgr has quit [Quit: rgr]
<canton7> you'd use regex on xml?
<dminuoso> canton7: Yes.
<dminuoso> I have some production code that does it even.
<dminuoso> When you know your input it's quite safe to do this.
rohitpaulk has quit [Ping timeout: 255 seconds]
ldnunes has joined #ruby
marr has quit [Ping timeout: 240 seconds]
<canton7> yeah, but something like '/items/item[last()]' must be a PITA with regex, never things whitespace, attributes appearing in any order, self-closing vs closed tags, etc
brent__ has quit [Ping timeout: 240 seconds]
aupadhye has joined #ruby
Guest97009 has quit [Ping timeout: 240 seconds]
chouhoulis has joined #ruby
rohitpaulk has joined #ruby
cfec0b8d has quit [Read error: Connection reset by peer]
rgr has joined #ruby
chat_ has joined #ruby
kspencer has quit [Changing host]
kspencer has joined #ruby
rohitpaulk has quit [Ping timeout: 240 seconds]
HoierM has joined #ruby
<dminuoso> canton7: No it's easy!
oliv_____ has joined #ruby
<dminuoso> str.reverse =~ /<meti>(.*)<meti\/>/
<dminuoso> Clearly!
contradictioned has joined #ruby
<dminuoso> There may or may not be some mistake in that.
VladGh has quit [Remote host closed the connection]
<slima> canton7: thx!
VladGh has joined #ruby
<dminuoso> canton7: But as I said, when you know about the input it can be perfectly fine.
<slima> dminuoso: thx too
<dminuoso> canton7: In my case I apply regex to machine generated XML from embedded hardware we are operating.
im0nde has joined #ruby
mim1k has quit [Ping timeout: 260 seconds]
oliv_____ has quit [Remote host closed the connection]
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
davic has joined #ruby
oliv_____ has joined #ruby
nowhereman has joined #ruby
petruff has joined #ruby
oliv_____ has quit [Remote host closed the connection]
mrconfused has quit [Ping timeout: 260 seconds]
chouhoulis has quit [Remote host closed the connection]
MrBismuth has quit [Ping timeout: 246 seconds]
im0nde has quit [Ping timeout: 246 seconds]
stamina has quit [Quit: WeeChat 1.8]
cyphase has quit [Ping timeout: 240 seconds]
synthroid has joined #ruby
synthroi_ has joined #ruby
minimalism has joined #ruby
uZiel has joined #ruby
ur5us has quit [Remote host closed the connection]
gaurav has joined #ruby
ur5us has joined #ruby
oliv_____ has joined #ruby
Mortomes|Work has quit [Ping timeout: 260 seconds]
psychicist__ has joined #ruby
synthroid has quit [Ping timeout: 268 seconds]
<gaurav> Hi I am trying to append something to the end of a string. Where my string is "Bar" I want to append "0" to the end so it becomes "Bar0"
cfec0b8d has joined #ruby
<gaurav> 'Bar'.gsub('/\Z/', '0')
<gaurav> is what I am trying.
<gaurav> $,\$,\$/ also don't seem to work.
<tobiasvl> gaurav: well, can't you just do 'Bar' + '0' in that simple case? what do you want to do precisely?
uZiel has quit [Ping timeout: 248 seconds]
DTZUZU has joined #ruby
<universa1> or "Bar" << 0
HoloIRCUser1 has quit [Quit: HoloIRCUser1]
cfec0b8d has quit [Remote host closed the connection]
cyphase has joined #ruby
<gaurav> 'Bar' << 0 gives => "Bar\x00"
ur5us has quit [Ping timeout: 255 seconds]
<tobiasvl> 'Bar' << '0'
<universa1> and if you pass the regexp as an actual regexp, and not a string, it actually works.
<tobiasvl> haha, I missed that
<tobiasvl> >> 'Bar'.gsub(/\Z/, '0')
<ruby[bot]> tobiasvl: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<tobiasvl> what the
cdg_ has joined #ruby
cfec0b8d has joined #ruby
<gaurav> Thanks tobiasvl it seems like I just needed to remove my quotes from my matching regex. :)
cdg has quit [Ping timeout: 246 seconds]
sepp2k has joined #ruby
Fernando-Basso has joined #ruby
dennisvennink has quit [Quit: Textual IRC Client: www.textualapp.com]
im0nde has joined #ruby
doublemalt_ has joined #ruby
pupsicle has joined #ruby
<apeiros> tobiasvl: happens when eval.in returns an error (error in handling non-200 status codes)
DoubleMalt has quit [Ping timeout: 255 seconds]
<apeiros> and eval.in has been rather uppity the last few weeks
pupsicle has quit [Client Quit]
<apeiros> gaurav: << "0" is definitively the much better choice than gsub
<apeiros> gaurav: also pay attention to delimiters/identifying sigils. "0" and 0 are not the same. "/\Z/" and /\Z/ are not the same. etc.
oliv_____ has quit [Ping timeout: 255 seconds]
xall has joined #ruby
oliv_____ has joined #ruby
uZiel has joined #ruby
jameser has joined #ruby
<ineb> i wrote a little script which counts words from files from a dir: https://paste.xinu.at/5on4/ i made it with threads and was expecting performance gain but no matter what i pick as nr_threads, script runtime is always almost the same. did i made a mistake somewhere?
<dminuoso> apeiros, so here's just a silly thought but
<dminuoso> Why doesn't ruby[bot] have an error handler for that?
SaschaVoid has joined #ruby
<Burgestr_> ineb ruby's parallelism is (mostly) limited to IO operations, which means that your word-counting is only concurrent, which could be the cause
<ineb> Burgestr_: any way to make it parallel quickly?
<ytti> IO does not suffer from GIL?
<Burgestr_> ytti you can read and write in parallel on different threads
cfec0b8d has quit [Remote host closed the connection]
<Burgestr_> (for example)
<ytti> i did not know that, i assumed everything is GILd
<Burgestr_> ineb give JRuby a try to see if it makes a difference
jud^ has joined #ruby
<Burgestr_> ytti this also applies to networking operations, e.g. http calls or calling out to your database
Dry_Lips has joined #ruby
Dry_Lips has quit [Changing host]
Dry_Lips has joined #ruby
<Burgestr_> ineb what I mentioned is not necesarily *the* reason, perhaps your operations are simply not slow enough or context-switching in your case is perhaps expensive enough to outweigh the concurrency gains
Burgestr_ is now known as Burgestrand
<darix> ytti: good IO libraries release the GIL when waiting for data
<darix> and then signal back then they have their data
<Burgestrand> ytti in addition, C extensions can explicitly unlock the GIL during expensive operations, I believe Ruby's BigNum does this for maths with large numbers for example
<ytti> alright, live and learn, thanks
jud has quit [Ping timeout: 255 seconds]
<ineb> Burgestrand: i dont know, i have 52 files with 779600 words and my script almost always takes ~10s
Cavedog has joined #ruby
DoubleMalt has joined #ruby
cfec0b8d has joined #ruby
DoubleMalt has quit [Read error: Connection reset by peer]
doublemalt_ has quit [Read error: Connection reset by peer]
<ineb> more threads tend to be even slower. its depressing
<Burgestrand> ineb definitely try JRuby, if you see a performance gain that changes drastically with the numbers of threads (for the better) then you're likely seeing the effects of c-ruby's limited parallelism
<Burgestrand> ineb yeah, well, as you add more threads you also increase the time it takes to switch between them, which reduces the time you're doing the work you actually want to speed up :D
ben______ has quit [Ping timeout: 260 seconds]
andikr has quit [Remote host closed the connection]
<ineb> ok i tried jruby and now my system hangs at 100% cpu
<ineb> and i can turn off the heater
<ineb> haha. is my script rigged?
<ineb> Exception in thread "Ruby-0-Thread-51: wordCount.rb:1" java.lang.OutOfMemoryError: Java heap space
<dminuoso> Burgestrand, indeed. I think the main case where the GIL is unlocked though is syscalls.
Cavedog has quit []
Cavedog has joined #ruby
<dminuoso> Or GVL rather.
<Burgestrand> hehe
<Burgestrand> it has different names in the C source too as far as I can remember, not much need to be pedantic about it
<dminuoso> (Which I guess makes sense, since syscalls are kind of "expensive" since they almost always guarantee a context switch)
<Burgestrand> ineb that's surprising!
<Burgestrand> ineb I'm trying to find somewhere on my system where the run time is actually significant to test it out myself, but I have too few source files :o
duncellyjr has joined #ruby
<dminuoso> ytti, ^- btw think you might find that interesting.
<Burgestrand> Feels like I'm missing a bunch of files…
<dminuoso> At the end the whole point of the GVL is to protect the (thread-unsafe) internals of Ruby. At syscall thresholds all the Ruby invariants are held, so Ruby might as well release the GVL - this is quite great because the syscall will almost always invoke the OS scheduler.
pupsicle has joined #ruby
Cavedog has quit [Client Quit]
pupsicle has quit [Client Quit]
xall has quit [Quit: xall]
pupsicle2 has joined #ruby
<ineb> Burgestrand: great, thanks
pupsicle2 has quit [Client Quit]
pupsicle has joined #ruby
shinnya has joined #ruby
rohitpaulk has joined #ruby
pupsicle has quit [Client Quit]
pupsicle has joined #ruby
mim1k has joined #ruby
pupsicle has quit [Client Quit]
pupsicle has joined #ruby
duncellyjr has quit []
snath has joined #ruby
iomotoko has quit [Quit: leaving]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
snath has quit [Ping timeout: 246 seconds]
sleetdrop has quit [Quit: Computer has gone to sleep.]
im0nde has quit [Ping timeout: 240 seconds]
yogg-saron has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cadillac_ has joined #ruby
hutch34 has joined #ruby
anisha_ has quit [Quit: This computer has gone to sleep]
yogg-saron has joined #ruby
jordanm has joined #ruby
mrconfused has joined #ruby
cadillac_ has quit [Remote host closed the connection]
cadillac_ has joined #ruby
cdg has joined #ruby
snath has joined #ruby
ben_____ has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
cdg_ has quit [Ping timeout: 246 seconds]
snath has left #ruby [#ruby]
bvcosta has joined #ruby
cadillac_ has quit [Quit: ERC (IRC client for Emacs 25.1.1)]
mim1k has quit [Ping timeout: 246 seconds]
cadillac_ has joined #ruby
DLSteve has joined #ruby
ben_____ has quit [Ping timeout: 255 seconds]
djbkd has joined #ruby
jameser has joined #ruby
tomphp has joined #ruby
tomphp has quit [Client Quit]
swills has joined #ruby
biberu has joined #ruby
knight33 has joined #ruby
quobo has quit [Quit: Connection closed for inactivity]
mrconfused has quit [Ping timeout: 260 seconds]
hashrocket has joined #ruby
<apeiros> dminuoso: you have to read closely. it has. but that handler crashes.
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros> that you get a reply at all is because it has a failsafe around it all.
<dminuoso> apeiros: Ah well, I cant even remember where the repository is.
<dminuoso> I have so many git-"place" accounts...
mark_66 has left #ruby ["PART #elixir-lang :PART #crystal-lang :PONG :weber.freenode.net"]
<apeiros> hint, it starts with github.com/apeiros ;-)
<dminuoso> apeiros: Do you know how many github accounts I have?
<dminuoso> :|
<dminuoso> I have like 5 or 6..
oleo has joined #ruby
mim1k has joined #ruby
blackmesa has joined #ruby
borodin has joined #ruby
griffindy has joined #ruby
tomphp has joined #ruby
chouhoulis has joined #ruby
tomphp has quit [Client Quit]
<apeiros> dminuoso: well, that's kinda your problem :-p
<apeiros> I have 1
<apeiros> and for everything else, there's organisations
aaoiki has joined #ruby
oliv_____ has quit [Remote host closed the connection]
jgnagy has joined #ruby
oliv_____ has joined #ruby
aaoiki has quit [Client Quit]
jphase has joined #ruby
tomphp has joined #ruby
enterprisey has joined #ruby
cdg has quit [Ping timeout: 246 seconds]
tomphp has quit [Client Quit]
sleetdrop has joined #ruby
GinoMan has joined #ruby
__Yiota has joined #ruby
mim1k has quit [Ping timeout: 268 seconds]
djbkd has quit [Read error: Connection reset by peer]
jameser has joined #ruby
CrazyEddy has joined #ruby
Terens has quit []
ur5us has joined #ruby
ben__ has joined #ruby
antgel has quit [Ping timeout: 240 seconds]
jjaii9 has joined #ruby
psychicist__ has quit [Ping timeout: 255 seconds]
gusrub has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
rkazak has joined #ruby
rkazak has quit [Client Quit]
jameser_ has joined #ruby
jameser has quit [Ping timeout: 240 seconds]
ben__ has quit [Ping timeout: 240 seconds]
mrconfused has joined #ruby
gusrub has quit [Ping timeout: 246 seconds]
blackwind_123 has quit [Quit: Hard work pays off in the future, laziness pays off now]
renchan_ has joined #ruby
Ishido has joined #ruby
renchan has quit [Read error: Connection reset by peer]
charliesome has joined #ruby
mim1k has joined #ruby
cfec0b8d has quit [Quit: Leaving]
cfec0b8d has joined #ruby
cfec0b8d has quit [Remote host closed the connection]
charliesome has quit [Client Quit]
cfec0b8d has joined #ruby
rkazak has joined #ruby
gheegh has joined #ruby
marr has joined #ruby
rkazak has quit [Client Quit]
cadillac_ has quit [Ping timeout: 255 seconds]
charliesome has joined #ruby
clouvet has joined #ruby
blackmesa has quit [Quit: WeeChat 1.6]
rkazak has joined #ruby
arup_r has joined #ruby
antgel has joined #ruby
clouvet has quit [Client Quit]
oliv_____ has quit [Remote host closed the connection]
oliv_____ has joined #ruby
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ljarvis> wtf, people have more that 1 github account?
aupadhye has quit [Ping timeout: 245 seconds]
<arup_r> haha. to hide identity probably :)
blackwind_123 has joined #ruby
<arup_r> I saw people to ask question by sharing anonymous gist, again to hide their identity.. They feel shy to ask. :D :D
rohitpaulk has quit [Ping timeout: 246 seconds]
<dminuoso> No
<dminuoso> At some point I forgot my password and was too lazy to reset
<dminuoso> then I was forced to make a separate for the company
<dminuoso> And then there were other reasons
swills has quit [Ping timeout: 255 seconds]
<ljarvis> all very poor ones i see
<dminuoso> I think lazyness is a good one.
gothicsouth has joined #ruby
jgnagy has quit [Remote host closed the connection]
ferr1 has quit [Quit: WeeChat 1.8]
mim1k has quit [Read error: Connection reset by peer]
rohitpaulk has joined #ruby
<arup_r> dminuoso: you are different! :) I saw people .. like I said.. who also change their nickname ..
<dminuoso> Heh....
<dminuoso> I may have done that. :-)
LastWhisper____ has joined #ruby
<arup_r> I worked with a guy .. who hired me from #rubyonrails .. worked with him 4-5 months.. and then last month $2200 he didn't pay. Then he makes excuses.. I somehow managed $1300 from him.. now $900 remaining ... and it seems like he is trying to bluff it :) He comes there to ask questions, and keep changing his nicknames.. I caught him 2 times.. And he said he is trying.. :) But now I don't know in which nickname he is prese
<arup_r> nt.. I will see next 2 months, and then I will take him my way when I will see him online there.. ( Sorry I said this here to support why someone try to hide under name ) :D
<arup_r> sorry again for posting this offtopic thing.
vondruch has quit [Ping timeout: 246 seconds]
<apeiros> ?ot arup_r
<ruby[bot]> arup_r: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related topics. Thanks!
<dminuoso> This is what happens when you work without a contract.
<dminuoso> No liability whatsoever.
<arup_r> apeiros: yes you are right! I mentioned it.. I just put a reasoning :)
<apeiros> dminuoso: separate for the company? that's what organizations exist for :)
<apeiros> unless you chose an unsuitable username of course…
<dminuoso> apeiros: I was asked to not use my personal account for.. idk.
<dminuoso> Reasons.
<apeiros> reasons are the best
<arup_r> haha
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jphase has quit []
oliv_____ has quit [Remote host closed the connection]
olivi____ has joined #ruby
YOUR_NIC has joined #ruby
<bvcosta> What is the best way to do exception handling with ruby and puma? Should we bubble up the exception and have a global exception handler?
<dminuoso> bvcosta: Catch exceptions where you can handle them.
<dminuoso> !next
<dminuoso> ?next
<ruby[bot]> dminuoso: I don't know anything about next
* dminuoso kicks ruby[bot] with an apeiros
<bvcosta> Yes I know
YOUR_NIC has quit [Client Quit]
<bvcosta> rephasing the question, should we or should we not use global exception handling in ruby?
<bvcosta> I believe rails has it as well
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
DLSteve has quit [Ping timeout: 240 seconds]
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dminuoso> bvcosta: Indeed. If an uncaught exception bubbles up, it should not wreck the entire web server.
YOUR_NIC has joined #ruby
haylon has joined #ruby
<dminuoso> bvcosta: So it makes sense to have certain "catch all exception" handlers in sensible places.
<elomatreb> You're going to want to have a global handler, but you only want it to be called when there truly is an Exceptional condition
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
__Yiota has joined #ruby
<bvcosta> Yes, that makes totally sense
YOUR_NIC has quit [Client Quit]
<bvcosta> handling local exception, bubble up the ones that we cannot handle locally and have the global exception handler
<dminuoso> bcavileer: You might have multiple stages of "catch all" handlers though.
<elomatreb> Avoid using Exceptions for logic flow, but generally that's accurate
haylon has quit [Read error: Connection reset by peer]
haylon has joined #ruby
<bvcosta> do you recommend any opensource project to take a look at?
ledestin has joined #ruby
<apeiros> beware of `rescue Exception`, though. it'll rescue things like Interrupt and NoMemoryError
<bvcosta> I know
<bvcosta> that is the anti pattern in any language I believe :P
<dminuoso> apeiros: Interesting. Interrupt -> Ruby generates an Exception for that?
<apeiros> dminuoso: yupp
<dminuoso> That is.. weird at first glance.
<dminuoso> apeiros: What kind of interrupt are we talking about?
<dminuoso> SIGINT?
<apeiros> yes
<dminuoso> o_O
<apeiros> the default sigint handler is basically Thread.main.raise Interrupt
<dminuoso> I'd really like to know the reasoning behind this
<apeiros> or rather Interrupt.new
dionysus69 has quit [Ping timeout: 255 seconds]
<dminuoso> Or is it just a historical artifcat kept for sake of backward compatibility?
<apeiros> not sure
<apeiros> given that Interrupt < SignalException, I'd guess there's more :)
<apeiros> hm, wrong guess
<apeiros> >> ObjectSpace.each_object(SignalException.singleton_class).to_a
<ruby[bot]> apeiros: # => [Interrupt, SignalException] (https://eval.in/813508)
gothicsouth has joined #ruby
ledestin has quit [Ping timeout: 260 seconds]
jameser_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yogg-saron has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
patarr has joined #ruby
<dminuoso> >> class A; end; class B < A; end; class A; def self.m; end; end; B.m
<ruby[bot]> dminuoso: # => nil (https://eval.in/813515)
<dminuoso> Can someone tell me why this works?
<dminuoso> Singleton classes are created on demand, so how does Ruby find A::m in dispatch?
ujjain has joined #ruby
ujjain has joined #ruby
ujjain has quit [Changing host]
olivi____ has quit [Remote host closed the connection]
<apeiros> B.singleton_class < A.singleton_class
oliv_____ has joined #ruby
<apeiros> >> class A; end; class B < A; end; B.singleton_class < A.singleton_class
<ruby[bot]> apeiros: # => true (https://eval.in/813521)
yogg-saron has joined #ruby
arup_r has quit [Remote host closed the connection]
<dminuoso> apeiros: Except B has no singleton class in the code above.
<apeiros> not sure whether B.m causes ruby to create B's singleton class or whether dispatch just goes on
<dminuoso> apeiros: No it cant. Simple induction proves this.
<dminuoso> You could simply do : B.singleton_class.singleton_class.singleton_class.singleton_class.singleton_class.q
<apeiros> well, it might be either of A) the dispatcher skips nonexistent singleton classes or B) invoking a method constitutes demand, creating one
clouvet has joined #ruby
<dminuoso> Ruby cant create an infinite amount of singleton classes in anticipation of my weird days..
yogg-saron has quit [Client Quit]
clouvet has quit [Client Quit]
<dminuoso> apeiros: Oh oh oh oh!
<apeiros> that's not anticipation if you actually call a method
clouvet has joined #ruby
<dminuoso> So.
mim1k has joined #ruby
<dminuoso> My thought is: if klass does not exist, it could simply walk the super chain until an RClass with a klass ptr != null exists.
<dminuoso> But...
<dminuoso> no.
<dminuoso> This is really screwed up for when you do
cschneid_ has joined #ruby
ben__ has joined #ruby
<apeiros> I'm afraid, I don't know the C impl specifics
<apeiros> banisterfiend would probably know
<dminuoso> apeiros: Funny fact, did you know that internally "metaclass" is used for singleton classes of classes, and "singleton class" for singleton classes of objects?
clouvet has quit [Client Quit]
<apeiros> heh, no, didn't
<apeiros> I still think they should've gone with eigenclass
hobodave has joined #ruby
<dminuoso> Mmm.
jgnagy has joined #ruby
<dminuoso> Yeah, the lack of German words in todays inventions is really dissatisfying.
Fernando-Basso has quit [Quit: WeeChat 1.8]
rkazak has quit [Quit: Sleep.....ing....]
ben__ has quit [Ping timeout: 255 seconds]
rkazak has joined #ruby
Pumukel has quit [Ping timeout: 240 seconds]
mostlybadfly has quit [Quit: Connection closed for inactivity]
synthroi_ has quit [Remote host closed the connection]
brent__ has joined #ruby
roshanavand has quit [Quit: roshanavand]
bvcosta has quit [Remote host closed the connection]
rippa has joined #ruby
bvcosta has joined #ruby
synthroid has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
jackjackdripper has joined #ruby
yeticry has joined #ruby
swills has joined #ruby
yeticry_ has quit [Ping timeout: 255 seconds]
boombox_ has joined #ruby
amclain has joined #ruby
swills has quit [Ping timeout: 255 seconds]
ben__ has joined #ruby
Burgestrand has quit [Quit: Closing time!]
tvw has quit [Read error: Connection reset by peer]
duderonomy has quit [Ping timeout: 246 seconds]
enterprisey has quit [Remote host closed the connection]
ben__ has quit [Ping timeout: 246 seconds]
bkxd has joined #ruby
cdg has joined #ruby
gusrub has joined #ruby
vondruch has joined #ruby
bkxd has quit [Ping timeout: 255 seconds]
boombox_ has quit [Remote host closed the connection]
dasher00 has quit [Ping timeout: 255 seconds]
ur5us has joined #ruby
nowhereman has quit [Ping timeout: 260 seconds]
cadillac_ has joined #ruby
aufi has quit [Quit: Leaving]
Alex9 has joined #ruby
ur5us has quit [Ping timeout: 268 seconds]
cadillac__ has joined #ruby
quobo has joined #ruby
dasher00 has joined #ruby
cadillac_ has quit [Ping timeout: 246 seconds]
oliv_____ has quit [Remote host closed the connection]
t-recx has joined #ruby
oliv_____ has joined #ruby
mim1k has quit [Ping timeout: 255 seconds]
DLSteve has joined #ruby
DeeJayh has joined #ruby
ddffg has quit [Ping timeout: 240 seconds]
<Alex9> Do most people use Ruby for web applications?
chalkmonster has joined #ruby
mrconfused_ has joined #ruby
<dminuoso> Alex9: A fair share probably do.
mrconfused has quit [Remote host closed the connection]
<dminuoso> Alex9: However Ruby is also widely used in other environments like Chef or Puppet.
<Alex9> dminuoso That's great to know, I'm thinking of picking Ruby up as my next language. :)
oliv_____ has quit [Remote host closed the connection]
olivi____ has joined #ruby
olivi____ has quit [Remote host closed the connection]
jackjackdripper has quit [Quit: Leaving.]
olivi____ has joined #ruby
nanoz has joined #ruby
nanoz has joined #ruby
nanoz has quit [Changing host]
gusrub has quit [Remote host closed the connection]
gusrub has joined #ruby
gusrub has quit [Remote host closed the connection]
gusrub_ has joined #ruby
[Butch] has joined #ruby
Alex9 has quit [Quit: Textual IRC Client: www.textualapp.com]
Silthias1 has quit [Read error: Connection reset by peer]
ddffg has joined #ruby
yogg-saron has joined #ruby
yogg-saron has quit [Client Quit]
NeverTired has joined #ruby
marxarelli|afk is now known as marxarelli
nanoz has quit [Read error: Connection reset by peer]
mikecmpbll has quit [Ping timeout: 240 seconds]
stormbytes has joined #ruby
ben__ has joined #ruby
chalkmonster has quit [Quit: Daddy's flown, 'cross the ocean.]
muelleme has joined #ruby
cfec0b8d has quit [Read error: Connection reset by peer]
agentsmith has joined #ruby
agentsmith is now known as Guest99989
Ishido has quit [Ping timeout: 260 seconds]
chalkmonster has joined #ruby
ben__ has quit [Ping timeout: 245 seconds]
flying has quit []
muelleme has quit [Ping timeout: 260 seconds]
nowhereman has joined #ruby
ascarter has joined #ruby
gusrub_ has quit [Remote host closed the connection]
haylon has quit [Remote host closed the connection]
Pumukel has joined #ruby
lxsameer has quit [Quit: WeeChat 1.7]
djbkd has joined #ruby
jdsampayo has joined #ruby
<jdsampayo> Hi!
haylon has joined #ruby
GinoMan has quit [Ping timeout: 246 seconds]
Ishido has joined #ruby
jgt4 has quit [Ping timeout: 268 seconds]
mostlybadfly has joined #ruby
haylon has quit [Ping timeout: 255 seconds]
ascarter_ has joined #ruby
pwnd_nsfw` is now known as pwnd_nsfw
dances_with_taco has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
perniciouscaffei has joined #ruby
mrconfused_ has quit [Ping timeout: 246 seconds]
dances_with_taco has joined #ruby
<dminuoso> ?hi
<ruby[bot]> dminuoso: I don't know anything about hi
<dminuoso> Do I really have to socially interact with people to greet them back?
<dminuoso> apeiros?
<apeiros> yes, yes you have to :-p
<dminuoso> jdsampayo: Uh. I mean. Hi.
<dminuoso> Read it, learn it, love it.
psychicist__ has joined #ruby
<dminuoso> (Ruby does not do hierarchy based lookup for constants, it does nesting based lookup)
<jdsampayo> thanks! I think this does the magic: WRAPPERS.class_eval{ Account }
<dminuoso> jdsampayo: Ughhhhh....
<dminuoso> jdsampayo: Please no.
<dminuoso> Though I gotta admire the creativity..
<jdsampayo> D:
<dminuoso> jdsampayo: Let me stare at this for a while while you read up on nesting.
PaulCapestany has quit [Ping timeout: 255 seconds]
<dminuoso> jdsampayo: Am I right in assuming in lines 27 and 33 you meat Soap::V1::Actions rather than Soap::V1::Base ?
uZiel has quit [Ping timeout: 248 seconds]
PaulCapestany has joined #ruby
<jdsampayo> sure, you are right! error copying
Rodya_ has joined #ruby
<jdsampayo> I think I can also solve it if I could get the name of the includers inside of the concern, to decide if using one path or another
<dminuoso> jdsampayo: Once you have read and understood I will give you the answer (it's done, so whenever you are ready)
<dminuoso> jdsampayo: Much simpler than what you are thinking.
<dminuoso> There is a simple way to express exactly what you are doing with minimal change, but I'd like you to understand why your approach failed.
cjhowe7 has joined #ruby
ascarter_ has quit [Ping timeout: 255 seconds]
GinoMan has joined #ruby
mcafee has joined #ruby
duderonomy has joined #ruby
learningruby has joined #ruby
andrzejk_ has joined #ruby
<learningruby> Variables and method names are often referred in separate in Ruby books. But ain't a method name just a variable holding the method body?
<elomatreb> No, a method is a method and a variable is a variable. Technically completely different, just look similar in syntax
<dminuoso> learningruby: No.
<dminuoso> learningruby: Ruby has a mechanism by which it lexographically (think like "during parsing") it learns whether an identifier is either a variable or a method.
<dminuoso> learningruby: When it sees something like a = <something> it then treats "a" as a local variable for the rest of the scope.
<dminuoso> Otherwise it treats it as a method.
<elomatreb> But not `a()`
<jdsampayo> @dminuso my aproach failed because at the execution of included, I'm on a different scope:
<dminuoso> learningruby: and a method foo is basically self.send(:foo), whereas a variable is kind-of like local_variable_get(:foo)
<dminuoso> Except that last bit does not exist.
<dminuoso> jdsampayo: Not scope!
<dminuoso> jdsampayo: Though kind of. It's called nesting.
<jdsampayo> I will never find WRAPPERS value there
<dminuoso> &ri Module.const_get
<dminuoso> jdsampayo: ^- you can this to invoke a completely dynamic way of obtaining a const.
renchan_ has quit [Quit: Leaving...]
ascarter has quit [Read error: Connection reset by peer]
<dminuoso> This will bypass any nesting rules, and let you specify exactly where it should search.
ascarter has joined #ruby
<mcafee> Question: Is there a method one can call on an array that returns nil if the array is empty, otherwise it returns the array? I have a function that looks like arr = (...big function call...); arr.empty? ? nil : arr; and I wish I could turn it into a single expression.
glejeune has quit [Ping timeout: 258 seconds]
<havenwood> >> def meth; 42 end; var = 42; "meth is a #{defined? meth} and var is a #{defined? var}" # learningruby
<ruby[bot]> havenwood: # => "meth is a method and var is a local-variable" (https://eval.in/813576)
rgr_ has joined #ruby
<dminuoso> jdsampayo: A regular constant-lookup is basically nesting.each { |n| break n.const_get(:CONSTANT) if n.const_defined?(:CONSTANT) } (it's contrived, but conceptually it works)
<dminuoso> And if that returns nil, it starts to look for const_missing hooks, and if that fails, it throws an exception
<dminuoso> And there's no way you can resolve that in your situation.
<jdsampayo> @diminuso I think my problem now is that even I could get the const_get to dynamically load the class needed, the concern is not getting the constant of the includer, so I need to in someway pass a variable / attribute to the Concern
rgr has quit [Ping timeout: 246 seconds]
<dminuoso> jdsampayo: Im not really 100% certain about Rails concerns - I prefer to use raw Ruby modules because I consider concerns silly.
nitric has joined #ruby
<dminuoso> >> module M; Q = 1; end; class C; include M; puts const_get(:Q); end # jdsampayo
<ruby[bot]> dminuoso: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<dminuoso> There's network connections.
<havenwood> #=> 1
<dminuoso> This will return: #=> 1
<dminuoso> Thank you havenwood.
<havenwood> Actually I should be a better REPL:
<havenwood> #>> 1
<havenwood> #=> nil
<dminuoso> :)
BTRE has quit [Ping timeout: 240 seconds]
<dminuoso> jdsampayo: But Im fairly sure it should also work with Rails concerns.
Guest99989 has quit [Read error: Connection reset by peer]
<dminuoso> (They are just sugar coated ruby moduleS)
cfec0b8d has joined #ruby
ben__ has joined #ruby
djbkd has quit [Remote host closed the connection]
romank has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dminuoso> jdsampayo: Oh it just hit me. You will have to do const_get twice.
olivi____ has quit [Remote host closed the connection]
oliv_____ has joined #ruby
<dminuoso> Or might. Im not sure.
<DTZUZU> anyone hiring out there
shinnya has quit [Ping timeout: 260 seconds]
<dminuoso> havenwood>> module M; module N; Q = 1; end; end; end; class C; include M; puts const_get("N::Q"); end
gusrub has joined #ruby
<dminuoso> havenwood uses GraalVM - long warmup.
r8 has joined #ruby
ben__ has quit [Ping timeout: 268 seconds]
nchambers has quit [Changing host]
nchambers has joined #ruby
modin has quit [Ping timeout: 260 seconds]
<dminuoso> >> module M; Q = 1; end; module N; P = M; end; class C; include M; puts const_get("N::P::Q"); end # jdsampayo
<ruby[bot]> dminuoso: # => 1 ...check link for more (https://eval.in/813577)
<jdsampayo> @diminuoso following your example I think the problem I have is the inverse, try to get a constant defined in C inside N
<dminuoso> no this works fine.
nchambers has quit [Changing host]
<jdsampayo> I mean, the controller defines the Wrapper Path, after defining the constant include the Concern and make the Concern to use it in the included block
nchambers has joined #ruby
nchambers is now known as mewtwo
mcafee has quit [Quit: ERC (IRC client for Emacs 26.0.50)]
<jdsampayo> somewhat of "passing a variable to a concern", probably
<jdsampayo> but in the included block, the nesting does not know anything about the controller
Rodya_ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
antgel has quit [Ping timeout: 255 seconds]
mtkd has quit [Ping timeout: 246 seconds]
<learningruby> thanks diminuoso and havenwood for the answers : )
<dminuoso> jdsampayo: Too much abstract talk. Give me a test case.
<dminuoso> jdsampayo: use eval.in if you want.
mtkd has joined #ruby
<r8> If my program may be installed anywhere in the filesystem, how do I 'require' in a way that gets me the libraries I ship with it? I think require_relative is supposed to help with this?
<jdsampayo> sorry, let me try to make it less fuzzy
learningruby has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<dminuoso> r8: just a plain require
ikoma has joined #ruby
jjaii9 has quit []
ikoma has quit [Remote host closed the connection]
<r8> dminuoso: What if my app's libraries aren't in the $LOAD_PATH?
<dminuoso> r8: Use the RUBYLIB environment variable
<dminuoso> r8: And have the outside world deal with where it is. It's not your programs responsibility to figure out where a library is.
GinoMan has quit [Ping timeout: 246 seconds]
<r8> dminuoso: What's require_relative for?
Rodya_ has quit [Remote host closed the connection]
<dminuoso> r8: say you are inside a lib/car/engine/rotor.rb, and you need to get hold of lib/car/electronics.rb
<r8> dminuoso: So when I deliver my app to operations, I tell them they need to set their environment so they can run my program? Surely there's a way for the program or Ruby to figure out that the libraries are ../lib from the program itself?
gusrub has quit [Remote host closed the connection]
<dminuoso> r8: If the ruby libraries are not in the LOAD_PATH, you are out of luck unless there's some convention or way to guess where they might end up in.
<dminuoso> r8: Or you could search the entire filesystem.
<r8> ha
SaschaVoid has quit [Quit: die();]
<dminuoso> r8: The better solution would be to actually use gems properly.
<dminuoso> r8: Have some gem server set up that contains the libraries, and then you can use gemspec/bundler to pull in the dependencies as needed.
<dminuoso> (or if the libraries are not IP, upload them to rubygems.org)
<r8> dminuoso: My program and its libraries are basically a unit...
<dminuoso> r8: Oh so you ship the libraries yourself?
mewtwo is now known as nchambers
<r8> dminuoso: Yeah, sorry, should have clarified.
<dminuoso> r8: Just push things onto $LOAD_PATH :)
t-recx has quit [Quit: t-recx]
<dminuoso> And then require as usual
<jdsampayo> @dminuoso you are a genious, it worked! see:
Fysicus has joined #ruby
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
cdg has quit [Remote host closed the connection]
<r8> dminuoso: Something like get dir of my program, push "#{dir}/../lib" onto $LOAD_PATH?
<dminuoso> r8: Sure.
bmurt_ has joined #ruby
<dminuoso> r8: You can use Kernel#__dir__ to help you :)
<dminuoso> r8: Or use require_relative -> both options are fine. I would use the LOAD_PATH approach if you ever plan to extract the libraries into separate gems.
<jdsampayo> @diminuoso, this was the trick as you pointed out: soap_path.const_get("Account")
GinoMan has joined #ruby
<jdsampayo> @dminuoso, but it needs to be a String! as the documentation you sent me, not a Class like I was doing
<dminuoso> jdsampayo: Btw, use symbols for single constants without namespace qualifiers.
<dminuoso> Or.. Im not certain now. Let me check
<dminuoso> jdsampayo: Yes absolutely use a symbol! :)
<jdsampayo> @dminuoso thanks! it works also with the Symbol
<dminuoso> jdsampayo: Yeah only for immediate constants. I dont think it works with nested constants looking at the C code.
<dminuoso> >> module A; module B; end; end; const_get(:"A::B")
<ruby[bot]> dminuoso: # => undefined method `const_get' for main:Object (NoMethodError) ...check link for more (https://eval.in/813580)
<dminuoso> >> module A; module B; end; end; class C; include A; end; puts C.const_get(:"A::B")
<ruby[bot]> dminuoso: # => wrong constant name A::B (NameError) ...check link for more (https://eval.in/813581)
<dminuoso> >> module A; module B; end; end; class C; include A; end; puts C.const_get("A::B")
<ruby[bot]> dminuoso: # => A::B ...check link for more (https://eval.in/813582)
<dminuoso> jdsampayo: ^- yup.
<dminuoso> jdsampayo: The symbol approach is much faster. :)
workmad3 has quit [Ping timeout: 240 seconds]
<dminuoso> Crazy buttloads faster.
nowhereman has quit [Ping timeout: 260 seconds]
<jdsampayo> @dminuoso, lol, sure, keeping the symbol, this was exactly what I needed, thank you very much, you saved a project to duplicate LOT of files only to change a SOAP serializer response, hope you have a great day, will be around
<morfin> i can't just read Range from YAML?
tvw has joined #ruby
<morfin> foo: 10..1000 becomes {"foo" => "10..1000"}
rohitpaulk has quit [Ping timeout: 260 seconds]
ur5us has joined #ruby
<r8> dminuoso: I like your idea. I may do this: $LOAD_PATH.push(File.dirname(__FILE__) + '/../lib')
mrconfused has joined #ruby
petruff1 has joined #ruby
Rodya_ has joined #ruby
Cohedrin has joined #ruby
gusrub has joined #ruby
petruff has quit [Ping timeout: 260 seconds]
gothicsouth has joined #ruby
<r8> dminuoso: Or maybe $LOAD_PATH.insert(). Thanks for your help.
haylon has joined #ruby
<dminuoso> r8: Indeed. And if you don't want public access to that, you can remove that path after setting up your library again.
ben__ has joined #ruby
rohitpaulk has joined #ruby
ur5us has quit [Ping timeout: 255 seconds]
Rodya_ has quit [Remote host closed the connection]
mrconfused has quit [Ping timeout: 260 seconds]
ryzokuken has quit [Quit: Leaving]
oliv_____ has quit [Remote host closed the connection]
r8 has quit [Quit: Thanks!]
olivi____ has joined #ruby
<haylon> Has anyone had any luck with Microsoft Teams and making a bot using Ruby?
mrconfused has joined #ruby
ben__ has quit [Ping timeout: 246 seconds]
glejeune has joined #ruby
nchambers has quit [Changing host]
nchambers has joined #ruby
Rodya_ has joined #ruby
nchambers has quit [Changing host]
nchambers has joined #ruby
psychicist__ has quit [Quit: leaving]
psychicist__ has joined #ruby
chalkmonster has quit [Quit: Daddy's flown, 'cross the ocean.]
rohitpaulk has quit [Ping timeout: 255 seconds]
hutch34 has quit [Ping timeout: 255 seconds]
Cohedrin has quit [Read error: Connection reset by peer]
jdawgaz has joined #ruby
Bock has quit [Remote host closed the connection]
Cohedrin has joined #ruby
djbkd has joined #ruby
justizin has joined #ruby
mikecmpbll has joined #ruby
elcontrastador has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<justizin> getting this error that typically indicates xcode missing, when it's not (trying to gem install mysql2 on macos sierra) : "ld: library not found for -l-lpthread", anyone know anything else i might wanna check?
<justizin> i'm kinda wondering, is it possible i need to remove and install xcode command line tools fresh? not sure i've ever encountered that, but a first time for everything..
ben__ has joined #ruby
joevandyk has joined #ruby
GinoMan2440 has joined #ruby
ozzy3 has joined #ruby
andrzejk_ has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
muelleme has joined #ruby
jamesaxl has quit [Read error: Connection reset by peer]
GinoMan1423 has joined #ruby
SeepingN has joined #ruby
Rodya_ has quit [Ping timeout: 260 seconds]
<dminuoso> justizin: xcode?
<dminuoso> You are brave.
<havenwood> justizin: What do you get for?: xcode-select --version
<ozzy3> hello
<havenwood> ozzy3: hi
cfec0b8d has quit [Remote host closed the connection]
* dminuoso ended up custom patching a GCC because he got sick of this apple stuff
<justizin> havenwood: "xcode-select version 2347."
<havenwood> justizin: So you have the latest command line tools installed.
GinoMan1423 has quit [Client Quit]
<justizin> havenwood: but i'm thinking, maybe that install had a silent failure? it should provide pthread, yah?
GinoMan has quit [Ping timeout: 240 seconds]
cfec0b8d has joined #ruby
<havenwood> justizin: gcc --version #=> 8.1.0?
<ozzy3> how can i try ruby codes pc free
<justizin> havenwood: si
ben__ has quit [Ping timeout: 268 seconds]
<borodin> is there any way to convert a string into an attribute name? i.e. if varattr="size" then big_aray.varattr gives the size of big_array?
<havenwood> ozzy3: https://carc.in/#/rb
<justizin> dminuoso: yah, i support a largeish team and i try to get the least esoteric path working, if possible.
<borodin> I know there's a way but I can't remember
<havenwood> justizin: And mysql is installed?
<justizin> our devs use a vagrant box tho, i just need bundle install to run on my mac so i can 'bundle exec cap deploy' without all that
ascarter_ has joined #ruby
<justizin> havenwood: yah, it's failing on pthread, totally finds mysql-config and such
<ozzy3> @havenwood tnx
olivi____ has quit [Remote host closed the connection]
<havenwood> justizin: hrm
TheBrayn has quit [Read error: Connection reset by peer]
jamesaxl has joined #ruby
GinoMan2440 has quit [Ping timeout: 260 seconds]
oliv_____ has joined #ruby
<dminuoso> justizin: Does it really say -l-lpthread ?
<dminuoso> That looks quite.. wrong.
pupsicle has quit [Ping timeout: 255 seconds]
TheBrayn has joined #ruby
<morfin> huh?
ltem has joined #ruby
TheBrayn has quit [Read error: Connection reset by peer]
<justizin> dminuoso: yah, "ld: library not found for -l-lpthread"
oliv_____ has quit [Remote host closed the connection]
cfec0b8d has quit [Remote host closed the connection]
oliv_____ has joined #ruby
cfec0b8d has joined #ruby
<dminuoso> Shouldn't this just say -lpthread (or -pthread) ?
<justizin> maybe? i'm not sure..
<morfin> -pthread is something i saw
<dminuoso> justizin: I'd really like to see the config.log of that build.
<morfin> i heard it's same thing
<dminuoso> justizin: Can you poke around and figure out whether it's somewhere?
roshanavand has joined #ruby
pupsicle has joined #ruby
<dminuoso> morfin: no. -lpthread and -pthread are subtly different.
<justizin> dminuoso: happily
<morfin> -lpthread used for linking
<dminuoso> morfin: -pthread activates certain macros as well as linking
<morfin> oh
<dminuoso> so -pthread is kind of a mix of compiler and linker flags.
Rodya_ has joined #ruby
<dminuoso> whereas -lpthread is just the raw *link the pthread.EXTENSION*
<morfin> _REENTRANT thing?
<dminuoso> morfin: Im not sure whether that specific macro is controlled by that, but let's just say yeah.
<morfin> hmm i want to try build Ruby again with my Msys2 muhahahaa
nowhereman has joined #ruby
<morfin> Ruby do compile but something goes wrong after that(probably gems or something) and boom
<morfin> fail
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Rodya__ has joined #ruby
hutch34 has joined #ruby
jamesaxl has quit [Read error: Connection reset by peer]
Rodya_ has quit [Ping timeout: 240 seconds]
jamesaxl has joined #ruby
al2o3-cr has joined #ruby
ozzy3 has quit [Ping timeout: 260 seconds]
GinoMan has joined #ruby
Rodya__ has quit [Ping timeout: 258 seconds]
dviola has joined #ruby
Rodya_ has joined #ruby
<morfin> i just wanted to start project on my PC instead of slow gateway )
jgt4 has joined #ruby
jdawgaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bkxd has joined #ruby
itaipu has joined #ruby
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
<itaipu> what is the idiom to call system('echo #{msg}') if msg could have unescaped shell chars (such as '`, etc..)
jdsampayo has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
<dminuoso> itaipu: &ri Shellwords
<dminuoso> &ri Shellwords itaipu
<itaipu> what I'm actually doing is calling festival (text to speech) command line utility
<morfin> )
<manveru> itaipu: system('echo', msg)
<morfin> i used that with Asterisk
<dminuoso> Of course..
<dminuoso> Shellwords is kind of elaborate when you consider manveru's solution.
* dminuoso facepalms
<manveru> that just won't go through the shell, saving you the trouble :)
petruff1 has quit [Ping timeout: 246 seconds]
<morfin> shellescape
<morfin> hmm
<dminuoso> manveru: For about 4 seconds I was incredibly proud to link Shellwords!
<dminuoso> Then you ruined my evening.
<manveru> i'm so sorry man
<dminuoso> :(
<dminuoso> But man, this could be a really good interview question.
<manveru> i just get irritated everytime someone uses system and string interpolation for no reason ^^;
<itaipu> manveru: the problem is that I need to append &, because I want to run it async
<dminuoso> "So you say you are a Ruby expert. What did you say Shellwords was used for?"
<manveru> fork{ system('echo', msg) }
<itaipu> so system have to return immediately
<itaipu> manveru: hmmm thats better
<qmr> you're making me think of funny reddit comment dminuoso
<qmr> something about someone interviewing at google claiming to be python expert / wrote the book on python / whatever
<qmr> they pulled guido in to interview him and the candidate left a broken man
<dminuoso> If guido and me were in a room
<dminuoso> He would leave with a broken arm.
<manveru> itaipu: don't forget to Process.detach it, or you'll have zombies
<qmr> that's not nice because matz is nice dminuoso
<morfin> muhaha
<manveru> so the whole thing is like Process.detach(fork{ system('echo', msg) })
ben__ has joined #ruby
<dminuoso> manveru: Im starting to like Shellwords very suddenly..
<manveru> i assume you don't care about exit status in this case :)
<morfin> i write one program with Phantomjs
<morfin> and i had zombiew apocalypse today
<morfin> there was like 20 zombies of phantomjs )
<manveru> yeah...
<morfin> but i do not use just fork
zapata has quit [Ping timeout: 246 seconds]
bvcosta has quit [Remote host closed the connection]
<manveru> well, you either have to handle your childs or give the responsibility to your parent
ascarter_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<morfin> holy crap
workmad3 has joined #ruby
bkxd has quit [Ping timeout: 260 seconds]
<manveru> morfin: did you call .wait on it?
<morfin> hmm no
<manveru> oh looks like it's a private method
jackjackdripper has joined #ruby
<manveru> well, that's just irresponsible :P
<morfin> it happens when you ctrl+c out of byebug )
ozzy3 has joined #ruby
mim1k has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
<morfin> also there was some orphans
<morfin> still trying to write console
ben__ has quit [Ping timeout: 240 seconds]
harfangk has quit [Quit: Textual IRC Client: www.textualapp.com]
KnownSyntax has quit [Ping timeout: 260 seconds]
sspreitz has joined #ruby
patr0clus has joined #ruby
cdg has joined #ruby
bvcosta has joined #ruby
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
SaschaVoid has joined #ruby
tvw has quit []
hashrocket has quit [Quit: Connection closed for inactivity]
KeyJoo has joined #ruby
zapata has joined #ruby
Cohedrin has quit [Read error: Connection reset by peer]
<morfin> hmm
sagax has quit [Remote host closed the connection]
gusrub has quit [Remote host closed the connection]
milardovich has joined #ruby
<morfin> i changed directory to tmp dir created by rbenv and did make install should not that properly install whole thing?
jackjackdripper has quit [Quit: Leaving.]
Cohedrin has joined #ruby
jackjackdripper has joined #ruby
milardovich has quit [Remote host closed the connection]
mrconfused has quit [Ping timeout: 260 seconds]
gusrub has joined #ruby
bvcosta has quit [Remote host closed the connection]
jdawgaz has joined #ruby
bvcosta has joined #ruby
andrzejk_ has joined #ruby
mrconfused has joined #ruby
bvcosta has quit [Ping timeout: 260 seconds]
jgt4 has quit [Ping timeout: 246 seconds]
Rodya_ has quit [Remote host closed the connection]
raspado has joined #ruby
oliv_____ has quit [Remote host closed the connection]
oliv_____ has joined #ruby
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
cyclonis has quit [Quit: leaving]
jdsampayo has joined #ruby
arup_r has joined #ruby
AndChat|474201 has joined #ruby
AndChat|474201 has quit [Max SendQ exceeded]
patr0clus has quit [Read error: Connection reset by peer]
patr0clus has joined #ruby
patr0clus has quit [Max SendQ exceeded]
oliv_____ has quit [Remote host closed the connection]
oliv_____ has joined #ruby
jgt4 has joined #ruby
ltem has quit [Quit: Leaving]
belmoussaoui has quit [Read error: Connection reset by peer]
HoierM has quit [Ping timeout: 255 seconds]
dionysus69 has joined #ruby
belmoussaoui has joined #ruby
gusrub has quit [Remote host closed the connection]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
mtkd has quit [Ping timeout: 260 seconds]
mtkd has joined #ruby
jamesaxl has quit [Quit: WeeChat 1.7.1]
jgt4 has quit [Ping timeout: 240 seconds]
shinnya has joined #ruby
arup_r has quit [Remote host closed the connection]
ben__ has joined #ruby
synthroi_ has joined #ruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
ur5us has joined #ruby
synthroid has quit [Ping timeout: 246 seconds]
ben__ has quit [Ping timeout: 268 seconds]
djbkd has quit [Ping timeout: 268 seconds]
ur5us has quit [Ping timeout: 240 seconds]
synthroid has joined #ruby
polysics has joined #ruby
bvcosta has joined #ruby
synthroi_ has quit [Ping timeout: 258 seconds]
Kug3lis has joined #ruby
bvcosta has quit [Remote host closed the connection]
bvcosta has joined #ruby
Kug3lis has quit [Remote host closed the connection]
Kug3lis has joined #ruby
bvcosta has quit [Ping timeout: 255 seconds]
ozzy3 has quit [Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org]
ecuanaso has joined #ruby
DeeJayh has quit [Read error: Connection reset by peer]
mrconfused has quit [Ping timeout: 246 seconds]
<morfin> something is wrong with stderr
<morfin> i tried running command which do install stuff and seems like stderr printed before stdout oO
mrconfused has joined #ruby
tomphp has joined #ruby
modin has joined #ruby
<sonOfRa> morfin: stdout is buffered, stderr is generally not buffered
DeeJayh has joined #ruby
<sonOfRa> Generally stdout is line-buffered, so if a newline is encountered, the buffer is generally written, but stderr is generally written *immediately*
<morfin> ah i forgot
jdawgaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<morfin> my ruby-build fails for 2.2.0 with error ENOENT(but file exists) and 2.3.0 does nothing after install
Cohedrin has quit [Read error: Connection reset by peer]
<morfin> ruby can't work with not real path?
tomphp has quit [Ping timeout: 240 seconds]
jdawgaz has joined #ruby
<morfin> File.read(fake) # this fails with fake = "/tmp/ruby-build.20170608005404.5048/ruby-2.2.0/tools/fake.rb"
psychicist__ has quit [Ping timeout: 246 seconds]
Cohedrin has joined #ruby
<dminuoso> sonOfRa. I thought I knew your name from somewhere. :-)
* sonOfRa waves
<sonOfRa> I'm all over the place!
synthroi_ has joined #ruby
itaipu has quit [Ping timeout: 260 seconds]
<morfin> HAHAHAHAAHAHAH
synthroid has quit [Ping timeout: 246 seconds]
<morfin> fuck me
bmurt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<sonOfRa> I'd much rather not
<morfin> i found ruby 2.2.0 and 2.3.0 installed in D:/home
<dminuoso> sonOfRa: Since you only stated a preference, does that still make you open to the proposition?
<morfin> how the heck it's possible?
<dminuoso> I mean it was not a categorical no...
<morfin> how when i build inside of Msys2 in mingw64 session it resolve path to real /
ur5us has joined #ruby
oliv_____ has quit [Remote host closed the connection]
mim1k has quit [Ping timeout: 246 seconds]
<morfin> or that's just mintty detect path as /?
workmad3 has quit [Ping timeout: 255 seconds]
olivi____ has joined #ruby
<morfin> so outside of mintty / => D:/
<sonOfRa> dminuoso: I never ever make categorical statements!
bkxd has joined #ruby
itaipu has joined #ruby
<morfin> msys2 do some magic
<dminuoso> sonOfRa: I think the "ever" was over the top.
gusrub has joined #ruby
<sonOfRa> Maybe.
tomphp has joined #ruby
muelleme has quit [Ping timeout: 245 seconds]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
anomaly has joined #ruby
stephenh has joined #ruby
bkxd has quit [Ping timeout: 246 seconds]
<anomaly> I am taking two inputs. I can print the interpolated strings just fine. however I want to then also print "The count was " but neither assigning count = input.length or #{input.length} are working. What am I missing?
synthroi_ has quit []
nadir has quit [Quit: Connection closed for inactivity]
<morfin> guys, do you have any idea - is that miniruby issue?
<morfin> why it thinks it's out of box and use real directories
<elomatreb> anomaly: We'll need your code, preferrably on gist.github.com
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
dionysus69 has quit [Ping timeout: 268 seconds]
<morfin> ah screw that it's bedtime
<stephenh> Hi! I've been following the answer at https://stackoverflow.com/questions/3258518/ruby-get-available-disk-drives and I wondered how is it possible to view the methods of the drive variable if they are not known (or any other object?)
<morfin> at least i found out that installation of ruby succeded
<stephenh> I thought perhaps I could use .inspect, like at https://hastebin.com/evavebewot.rb, but that didn't work
morfin has quit []
<elomatreb> anomaly: Try and see what `puts` returns (e.g. in irb/pry)
<stephenh> normally at this point I would just look at the file in the gem, but thought I would ask if there was a way to, like, discover methods available on an object rather than always looking at the code itself
MrBismuth has joined #ruby
<elomatreb> stephenh: Almost all objects have #methods
<stephenh> awesome, that worked!
jenrzzz has quit [Ping timeout: 246 seconds]
<stephenh> mystery solved, thanks!
<elomatreb> If you pass it true as an argument it won't show inherited methods btw
<anomaly> `<main>': undefined method `length' for nil:NilClass (NoMethodError)
<anomaly> using puts
<elomatreb> anomaly: https://eval.in/813638
olivi____ has quit [Remote host closed the connection]
oliv_____ has joined #ruby
prubini87 has joined #ruby
ben__ has joined #ruby
<anomaly> elomatreb: pardon my not grasping the meaning. that was not interpolated strings. I can take a string like count = "this is a sentence".length puts count and it works. it seems the problem is with the interpolated strings.
dviola has quit [Quit: WeeChat 1.8]
polysics has quit []
<elomatreb> No, it's just that puts does not return its argument (the interpolated string), but rather nil
faelkle has joined #ruby
faelkle has joined #ruby
faelkle has quit [Changing host]
poloych has joined #ruby
spcmao has joined #ruby
jenrzzz has joined #ruby
faelkle has quit [Client Quit]
SCHAPiE has quit [Read error: Connection reset by peer]
ben__ has quit [Ping timeout: 260 seconds]
[Butch] has quit [Quit: I'm out . . .]
Qommand0r has joined #ruby
SCHAPiE has joined #ruby
cjhowe7 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duderonomy has quit [Ping timeout: 246 seconds]
boombox_ has joined #ruby
<dminuoso> elomatreb: You can also use havenwood, our new repl.
<elomatreb> ?
<dminuoso> Let's see if it works!
<dminuoso> >> a = puts 1
<ruby[bot]> dminuoso: # => 1 ...check link for more (https://eval.in/813640)
<dminuoso> havenwood>> a = puts 1
<havenwood> #>> 1
<havenwood> #=> nil
<dminuoso> elomatreb: ^_
<dminuoso> Much improved version as you can see.
<elomatreb> So the machines have claimed another victim
muslimgirl has joined #ruby
cschneid_ has quit [Remote host closed the connection]
jdawgaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 240 seconds]
GinoMan2440 has joined #ruby
biberu has quit []
ldnunes has quit [Quit: Leaving]
muslimgirl is now known as DaFloorIsBAKLAVA
Uranio has joined #ruby
DaFloorIsBAKLAVA is now known as Muslim_Girl
<anomaly> elomatreb: I took out puts from the variable name and now it works. thanks for the help.
Uranio has quit [Client Quit]
<anomaly> not from the variable name but from the variable content
whathappens has joined #ruby
<elomatreb> Yeah, that's exactly what I meant. puts prints the String you give it, and returns nil
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
GinoMan has quit [Ping timeout: 240 seconds]
<dminuoso> havenwood>> puts (puts(1)).nil?
GinoMan2440 has quit [Ping timeout: 240 seconds]
jdawgaz has joined #ruby
itaipu has quit [Ping timeout: 268 seconds]
<anomaly> elomatreb: I was not grasping your meaning. so rather than pester I kept tinkering until I figured it out.
<zenspider> `p` however, DOES return the value (now)
<elomatreb> Sorry. If you have questions, feel free to ask them
<dminuoso> zenspider: since when?
dasher00 has quit [Ping timeout: 260 seconds]
<zenspider> I think 2.0 but maybe I bit later
<stephenh> elomatreb: apparently I got ahead of myself... looking at https://hastebin.com/galekujoxo.rb I don't see #Drives but it is there..
MarkBilk_ has joined #ruby
<dminuoso> 19>> puts (p(42))
<ruby[bot]> dminuoso: # => 42 ...check link for more (https://eval.in/813643)
<dminuoso> 18>> puts (p(42))
<ruby[bot]> dminuoso: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<dminuoso> 18>> puts (p(42))
gains has joined #ruby
bkxd has joined #ruby
<elomatreb> stephenh: 1) Uppercase method name? 2) It may be using method_missing, check the source maybe?
<ruby[bot]> dminuoso: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
Muslim_Girl is now known as DaFloorIsBAKLAVA
aurelien` has joined #ruby
guidos_ has joined #ruby
ircmaxell_ has joined #ruby
chromis_ has joined #ruby
itaipu has joined #ruby
peteretep_ has joined #ruby
craysiii_ has joined #ruby
charles81__ has joined #ruby
hlmjr has joined #ruby
skmp_ has joined #ruby
t-recx has joined #ruby
caw_ has joined #ruby
boxrick1_ has joined #ruby
<stephenh> elomatreb: fair enough.. that's what I would do normally, thought maybe there was some trick people had to show all things callable
machty_ has joined #ruby
<SeepingN> >> puts (p(42))
<ruby[bot]> SeepingN: # => 42 ...check link for more (https://eval.in/813644)
<dminuoso> 18>> puts (p(42))
<SeepingN> why are you putting 18 before it
<ruby[bot]> dminuoso: # => /tmp/execpad-7898aceafbd4/source-7898aceafbd4:2: warning: don't put space before argument parenthese ...check link for more (https://eval.in/813645)
<dminuoso> SeepingN: It selects the Ruby version 1.8
<elomatreb> That's what #methods does, but since you can't predict what method_missing may do, those won't show up
<elomatreb> stephenh: ^
<SeepingN> ohhhh
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
<dminuoso> SeepingN: There's a handful of other modifiers
RazorX- has joined #ruby
Talltree_ has joined #ruby
<SeepingN> 18>>puts(p(42))
<ruby[bot]> SeepingN: # => 42 ...check link for more (https://eval.in/813646)
<dminuoso> ast>> puts 1 {}
<ruby[bot]> dminuoso: I have parsed your code, the result is at https://eval.in/813647
<elomatreb> You could write a method_missing that rolls a dice to check if a method does something or raises an error
justache has joined #ruby
<SeepingN> remove space, fix life
<dminuoso> asm>> puts 1 {}
<ruby[bot]> dminuoso: I have disassembled your code, the result is at https://eval.in/813648
Xeago_ has joined #ruby
rheddry has joined #ruby
<dminuoso> tok>> puts 1 {}
<SeepingN> neat
<ruby[bot]> dminuoso: I have tokenized your code, the result is at https://eval.in/813649
nyuszika7h has quit [Disconnected by services]
pleiosau1 has joined #ruby
dreamthese has joined #ruby
_DanN__ has joined #ruby
genpaku_ has joined #ruby
sebd_ has joined #ruby
mnem has joined #ruby
<dminuoso> SeepingN: Just be cary of the tokenization. As zenspider has pointed out the Ripper implementation is kind of rubbish
DaFloorIsBAKLAVA is now known as MuslimGirl
ColeHub has joined #ruby
nyuszika7h_ has joined #ruby
dasher00 has joined #ruby
bkxd has quit [Ping timeout: 246 seconds]
aredride- has joined #ruby
Iota- has joined #ruby
gix- has joined #ruby
gix has quit [Disconnected by services]
ntt_ has joined #ruby
Liothen- has joined #ruby
yasu_ has joined #ruby
DarkBushido_ has joined #ruby
eputnam has joined #ruby
arthurnn_ has joined #ruby
Pierreb|home has quit [Ping timeout: 240 seconds]
Xeago has quit [Ping timeout: 240 seconds]
eputnam_ has quit [Ping timeout: 240 seconds]
Fridtjof has quit [Ping timeout: 240 seconds]
csaunders has quit [Ping timeout: 240 seconds]
arthurnn has quit [Ping timeout: 240 seconds]
pragmatism has quit [Ping timeout: 240 seconds]
potatoe has quit [Ping timeout: 240 seconds]
tessi_zz has quit [Ping timeout: 240 seconds]
guidos has quit [Ping timeout: 240 seconds]
peteretep has quit [Ping timeout: 240 seconds]
boxrick1 has quit [Ping timeout: 240 seconds]
craysiii has quit [Ping timeout: 240 seconds]
chromis has quit [Ping timeout: 240 seconds]
skmp has quit [Ping timeout: 240 seconds]
machty has quit [Ping timeout: 240 seconds]
caw has quit [Ping timeout: 240 seconds]
ircmaxell has quit [Ping timeout: 240 seconds]
HalcyonicStorm has quit [Ping timeout: 240 seconds]
aredridel has quit [Ping timeout: 240 seconds]
levifig has quit [Ping timeout: 240 seconds]
ntt has quit [Ping timeout: 240 seconds]
yasu has quit [Ping timeout: 240 seconds]
nicesignal has quit [Ping timeout: 240 seconds]
genpaku has quit [Ping timeout: 240 seconds]
lpaste has quit [Ping timeout: 240 seconds]
octomancer has quit [Ping timeout: 240 seconds]
gsingh93 has quit [Ping timeout: 240 seconds]
boombox_ has quit [Ping timeout: 240 seconds]
bkutil has quit [Ping timeout: 240 seconds]
nemesit|znc has quit [Ping timeout: 240 seconds]
Drakevr has quit [Ping timeout: 240 seconds]
jwheare has quit [Ping timeout: 240 seconds]
_DanN_ has quit [Ping timeout: 240 seconds]
russt has quit [Ping timeout: 240 seconds]
sebd has quit [Ping timeout: 240 seconds]
Liothen has quit [Ping timeout: 240 seconds]
daxroc has quit [Ping timeout: 240 seconds]
kspencer has quit [Ping timeout: 240 seconds]
pleiosaur has quit [Ping timeout: 240 seconds]
snapcase has quit [Ping timeout: 240 seconds]
whathappens has quit [Ping timeout: 240 seconds]
mnemon has quit [Ping timeout: 240 seconds]
Kilobyte22 has quit [Ping timeout: 240 seconds]
Didac has quit [Ping timeout: 240 seconds]
RazorX has quit [Ping timeout: 240 seconds]
oz has quit [Ping timeout: 240 seconds]
nebiros has quit [Ping timeout: 240 seconds]
klaas has quit [Ping timeout: 240 seconds]
CustosLimen has quit [Ping timeout: 240 seconds]
MarkBilk has quit [Ping timeout: 240 seconds]
herbmillerjr has quit [Ping timeout: 240 seconds]
Talltree has quit [Ping timeout: 240 seconds]
aurelien has quit [Ping timeout: 240 seconds]
DarkBushido has quit [Ping timeout: 240 seconds]
charles81_ has quit [Ping timeout: 240 seconds]
arthurnn_ is now known as arthurnn
yasu_ is now known as yasu
craysiii_ is now known as craysiii
skmp_ is now known as skmp
guidos_ is now known as guidos
chromis_ is now known as chromis
ircmaxell_ is now known as ircmaxell
genpaku_ is now known as genpaku
nebiros_ has joined #ruby
pragmatism has joined #ruby
caw_ is now known as caw
<SeepingN> that's all beyond me anyway
Liothen- is now known as Liothen
russt has joined #ruby
Xeago_ is now known as Xeago
charles81__ is now known as charles81_
csaunders_ has joined #ruby
peteretep_ is now known as peteretep
DarkBushido_ is now known as DarkBushido
boxrick1_ is now known as boxrick1
machty_ is now known as machty
DarkBushido has quit [Changing host]
DarkBushido has joined #ruby
nemesit|znc has joined #ruby
tessi_zz has joined #ruby
CustosLimen has joined #ruby
oz has joined #ruby
Fridtjof has joined #ruby
jhill__ is now known as jhill
Kilo`byte has joined #ruby
Didac has joined #ruby
gsingh93 has joined #ruby
potatoe has joined #ruby
potatoe has joined #ruby
potatoe has quit [Changing host]
Didac has quit [Changing host]
Didac has joined #ruby
Iota- is now known as kspencer
itaipu has quit [Ping timeout: 255 seconds]
texasmynsted has quit [Ping timeout: 240 seconds]
hfp has quit [Ping timeout: 240 seconds]
SCHAPiE has quit [Ping timeout: 260 seconds]
<dminuoso> SeepingN: And then there's the havenwood modifier/
Drakevr has joined #ruby
spcmao has quit [Quit: leaving]
bokayio has quit [Ping timeout: 240 seconds]
Paradox has quit [Ping timeout: 240 seconds]
<stephenh> elomatreb: so essentially best it to look at source because otherwise you could miss stuff :) ?
<SeepingN> The Havenwood Modifier, in theaters this fall
jinie has quit [Ping timeout: 260 seconds]
<dminuoso> havenwood>> puts "hello world"; Kernel.dup
lpaste has joined #ruby
__Yiota has joined #ruby
<dminuoso> It doesn't work very reliably (yet) though. We are working on it.
<elomatreb> stephenh: Overusing method_missing's is considered bad practice for this reason
MuslimGirl is now known as DaFloorIsBAKLAVA
Kilo`byte has quit [Client Quit]
itaipu has joined #ruby
Kilo`byte has joined #ruby
oliv_____ has quit [Remote host closed the connection]
bokayio has joined #ruby
bkutil has joined #ruby
octomancer has joined #ruby
snapcase has joined #ruby
texasmynsted has joined #ruby
jinie has joined #ruby
Paradox has joined #ruby
ecuanaso has joined #ruby
oliv_____ has joined #ruby
hfp has joined #ruby
<dminuoso> SeepingN: Oh and then there's another modifier I forgot to mention
hobodave has quit [Quit: Computer has gone to sleep.]
<dminuoso> baweaver>> puts "hello world"; Kernel.dup
<baweaver> # => "screw off"
nebiros_ is now known as nebiros
nebiros has joined #ruby
nebiros has quit [Changing host]
nebiros has joined #ruby
nebiros has quit [Changing host]
Bhootrk_ has joined #ruby
Bhootrk_ has quit [Max SendQ exceeded]
<dminuoso> Behavior is kind of erradic and usually filled with (bad) puns.
<dminuoso> >> Kernel.pun
<ruby[bot]> dminuoso: # => undefined method `pun' for Kernel:Module ...check link for more (https://eval.in/813650)
<baweaver> # => "a good pun is its own reword"
jenrzzz has quit [Ping timeout: 260 seconds]
pupsicle has quit [Quit: Leaving]
SCHAPiE has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
daxroc has joined #ruby
marr123 has joined #ruby
marr has quit [Ping timeout: 260 seconds]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cschneid_ has joined #ruby
cschneid_ has quit [Remote host closed the connection]
cschneid_ has joined #ruby
haylon has quit []
muelleme has joined #ruby
HalcyonicStorm has joined #ruby
DaFloorIsBAKLAVA is now known as Hymen_Inspector
muelleme has quit [Ping timeout: 240 seconds]
andrzejk_ has quit [Quit: Textual IRC Client: www.textualapp.com]
marr123 is now known as marr
konsolebox has quit [Ping timeout: 260 seconds]
Hymen_Inspector is now known as muslimgirl
itaipu has quit [Ping timeout: 246 seconds]
GinoMan has joined #ruby
ben__ has joined #ruby
mrconfused has quit [Ping timeout: 260 seconds]
konsolebox has joined #ruby
evanleck has joined #ruby
dgs has left #ruby ["Leaving..."]
muslimgirl is now known as DaFloorIsBAKLAVA
hlmjr has quit [Quit: Konversation terminated!]
mrconfused has joined #ruby
KeyJoo has quit [Ping timeout: 260 seconds]
herbmillerjr has joined #ruby
jdawgaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ben__ has quit [Ping timeout: 240 seconds]
bkutil has quit [Ping timeout: 240 seconds]
snapcase has quit [Ping timeout: 240 seconds]
snapcase has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bkutil has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
Pumukel has quit [Ping timeout: 255 seconds]
jackjackdripper has joined #ruby
dviola has joined #ruby
firstdayonthejob has joined #ruby
anomaly has quit [Quit: Page closed]
npgm has joined #ruby
im0nde has joined #ruby
DaFloorIsBAKLAVA is now known as I_AM_EJACULATING
gothicsouth has joined #ruby
firstdayonthejob has quit [Quit: WeeChat 1.8]
HoierM has joined #ruby
mrconfused has quit [Ping timeout: 240 seconds]
mim1k has joined #ruby
sun[BEAM] has joined #ruby
<sun[BEAM]> Sup. Anyone interested in friendly talking, flirting and Love? Join our Server: irc.ladysclub-irc.net Port 6667 / SSL 6697 Main Room #Outlaws :) Flirt/Fun/Love :)
I_AM_EJACULATING is now known as DaFloorIsBAKLAVA
<baweaver> !spam sun[BEAM]
sun[BEAM] was kicked from #ruby by ruby[bot] [spamming is a bannable offense, see http://ruby-community.com/pages/user_rules]
* baweaver blows smoke off gun
<dminuoso> baweaver: Have you tried blowing off the torch off a blow torch?
<Radar> GOOD MORNING
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dminuoso> Good evening.
<baweaver> you're too late Radar. I've already won this round of whack-a-troll
<Radar> I saw :(
<jdsampayo> poor spammer, only wanted some love
<dminuoso> baweaver: I lost todays round in nitpicking.
<baweaver> dminuoso cookies--
bkutil has quit [*.net *.split]
snapcase has quit [*.net *.split]
chouhoulis has quit [Remote host closed the connection]
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
griffindy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
ben__ has joined #ruby
__Yiota has joined #ruby
__Yiota has quit [Client Quit]
__Yiota has joined #ruby
oliv_____ has quit [Remote host closed the connection]
oliv_____ has joined #ruby
ben__ has quit [Ping timeout: 246 seconds]
__Yiota has quit [Client Quit]
cdg_ has joined #ruby
MarkBilk_ has quit [Ping timeout: 246 seconds]
TTilus has quit [Ping timeout: 240 seconds]
DaFloorIsBAKLAVA has quit [Killed (Sigyn (Spam is off topic on freenode.))]
TTilus has joined #ruby
SpComb has quit [Ping timeout: 240 seconds]
SpComb has joined #ruby
cdg has quit [Ping timeout: 246 seconds]
prubini87 has quit [Read error: Connection reset by peer]
prubini87 has joined #ruby
cdg_ has quit [Ping timeout: 246 seconds]
SaschaVoid has quit [Ping timeout: 246 seconds]
GodFather has joined #ruby
blackwind_123 has quit [Ping timeout: 260 seconds]
muelleme has joined #ruby
HoierM has quit [Ping timeout: 240 seconds]
muelleme has quit [Ping timeout: 246 seconds]
MarkBilk has joined #ruby
ResidentBiscuit has quit [Ping timeout: 240 seconds]
prubini87 has quit [Read error: Connection reset by peer]
jdsampayo has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
snapcase has joined #ruby
bkutil has joined #ruby
jdawgaz has joined #ruby
prubini87 has joined #ruby
raspado has quit [Remote host closed the connection]
SaschaVoid has joined #ruby
cjhowe7 has joined #ruby
prubini87 has quit [Read error: Connection reset by peer]
prubini87 has joined #ruby
dlitvak has quit [Quit: Connection closed for inactivity]
poloych has quit [Remote host closed the connection]
glejeune has quit [Ping timeout: 255 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
Rodya_ has joined #ruby
PaulCapestany has quit [Remote host closed the connection]
jdawgaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
jdawgaz has joined #ruby
Cohedrin has quit [Read error: Connection reset by peer]
jdawgaz has quit [Client Quit]
gmoney has quit [Quit: Connection closed for inactivity]
ddffg has quit [Ping timeout: 255 seconds]
justizin has quit [Quit: Connection closed for inactivity]
prubini87 has quit []
Cohedrin has joined #ruby
nertzy has joined #ruby
hutch34 has quit [Ping timeout: 258 seconds]
jwheare has joined #ruby
gothicsouth has joined #ruby
balazs__ has joined #ruby
balazs_ has quit [Ping timeout: 260 seconds]
duderonomy has joined #ruby
SaschaVoid has quit [Ping timeout: 240 seconds]
SaschaVoid has joined #ruby
Ishido has quit [Remote host closed the connection]
rgr_ has quit [Ping timeout: 246 seconds]
hutch34 has joined #ruby
davidmichaelkarr has joined #ruby
patarr has quit [Ping timeout: 255 seconds]
SaschaVoid has quit [Quit: 'night]
hutch34 has quit [Ping timeout: 260 seconds]
brent__ has quit [Remote host closed the connection]
poloych has joined #ruby
muelleme has joined #ruby
Cohedrin has quit [Ping timeout: 258 seconds]
evanleck has quit [Quit: Textual IRC Client: www.textualapp.com]
alveric4 has joined #ruby
Cohedrin has joined #ruby
muelleme has quit [Ping timeout: 240 seconds]
alveric3 has quit [Ping timeout: 240 seconds]
ColeHub has quit [Quit: Bye.]
mim1k has quit [Ping timeout: 240 seconds]
Immune has quit [Quit: ZzzZZZzzzz]
<lucas__> hi, if I have a Hash 'students', that can contain either {}, { 'Class 1' => {} }, or { 'Class 1' => [ 'Alice' ] }
<lucas__> What's the simplest way to add another student in its class? I'd like to avoid doing it in two steps like:
<lucas__> students['Class 2'] ||= [] ; students['Class 2'] << 'Bob' (my real use case has more than two levels)