apeiros changed the topic of #ruby to: Ruby 2.0.0-p247: http://ruby-lang.org (Ruby 1.9.3-p448) || Paste >3 lines of text on http://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
threesome has joined #ruby
<bnagy> imho if you want to run ruby stuff as root, install it properly from source
mmitchell has joined #ruby
<socialmage> oky doky
<RubyPanther> sudo sanitizes your env in most cases, would be the probable reason
BRMatt has quit [Ping timeout: 248 seconds]
tjsousa has quit [Ping timeout: 246 seconds]
ewnd9 has joined #ruby
Mars` has quit [Ping timeout: 240 seconds]
mrsolo has quit [Quit: This computer has gone to sleep]
mmitchell has quit [Ping timeout: 260 seconds]
c0rn has quit [Quit: Computer has gone to sleep.]
ehc has quit [Quit: ehc]
butblack has joined #ruby
blackmesa has joined #ruby
dankest has quit [Quit: dankest]
mikeric has quit []
quoin has joined #ruby
kvirani_ has quit [Remote host closed the connection]
funburn has joined #ruby
dankest has joined #ruby
kvirani has joined #ruby
snovak has joined #ruby
Mars` has joined #ruby
tabolario has joined #ruby
i_s has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 240 seconds]
mercwithamouth has quit [Ping timeout: 245 seconds]
sectionme has joined #ruby
kvirani has quit [Ping timeout: 248 seconds]
io_syl has joined #ruby
kaosx has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
mercwithamouth has joined #ruby
ssvo_ has quit [Ping timeout: 245 seconds]
brianpWins has quit [Quit: brianpWins]
sectionme has quit [Ping timeout: 240 seconds]
snovak has quit [Ping timeout: 252 seconds]
justsee has quit [Ping timeout: 260 seconds]
mmitchell has joined #ruby
heidi has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
Soda has joined #ruby
mansi has joined #ruby
kofno has joined #ruby
quoin has quit [Ping timeout: 240 seconds]
ADot has quit [Quit: Leaving.]
simplyaubs has quit [Quit: simplyaubs]
i_s has joined #ruby
Soda has quit [Read error: Operation timed out]
havenwood has joined #ruby
Soda has joined #ruby
simplyaubs has joined #ruby
socialmage has quit [Remote host closed the connection]
jlast has quit [Remote host closed the connection]
mmitchell has quit [Remote host closed the connection]
jonathanwallace has quit [Quit: WeeChat 0.4.1]
Aryasam has quit [Read error: Connection reset by peer]
Aryasam has joined #ruby
danman has joined #ruby
Lewix has joined #ruby
Lewix has quit [Changing host]
Lewix has joined #ruby
amsi has quit [Quit: Leaving]
tjbiddle has quit [Ping timeout: 240 seconds]
soheil has quit [Remote host closed the connection]
soheil has joined #ruby
soheil has quit [Remote host closed the connection]
soheil has joined #ruby
mrsolo has joined #ruby
Mars` has quit [Remote host closed the connection]
justsee has left #ruby [#ruby]
saarinen has quit [Quit: saarinen]
kpshek has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
fuhgeddaboudit has quit [Ping timeout: 252 seconds]
tatsuya_o has joined #ruby
ericmathison has quit [Ping timeout: 248 seconds]
ewnd9 has quit [Ping timeout: 246 seconds]
hogeo has joined #ruby
DonRichie has quit [Ping timeout: 248 seconds]
DonRichie has joined #ruby
lukec has quit [Quit: lukec]
ericmathison has joined #ruby
funburn has quit [Quit: funburn]
kpshek has quit [Ping timeout: 245 seconds]
tatsuya_o has quit [Remote host closed the connection]
sarlalian has quit [Quit: WeeChat 0.4.1]
iamjarvo has joined #ruby
butblack has quit [Quit: butblack]
randomnick_ has quit [Quit: Leaving]
ocnam has quit [Quit: Quit: Textual IRC Client: http://www.textualapp.com/]
Aryasam_ has joined #ruby
<udoprog> Hey, I'm trying to create an rbenv that I can move around (i.e. build in one place, and distribute in an archive), however I am facing two issues related to library path. 1) the build path is compiled into the ruby interpreter, 2) the gem binstubs use the absolute path of the interpreter. Has anyone found a way to work around this?
Aryasam has quit [Read error: Connection reset by peer]
drumsrgr8forn8_ has quit [Quit: Konversation terminated!]
nik_-_ has quit [Quit: nik_-_]
endash has quit [Ping timeout: 240 seconds]
iamjarvo has quit [Remote host closed the connection]
iamjarvo has joined #ruby
kadoo has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Jetchisel has quit [Quit: Unfortunately time is always against us -- *Morpheus*]
Stalkr has joined #ruby
funburn has joined #ruby
<udoprog> To core issue is that the build server uses a non-deterministic build directory which is not suitable as a LOAD_PATH on my target machines
Deele has quit [Ping timeout: 260 seconds]
Valesk has joined #ruby
i_s has quit [Remote host closed the connection]
ericmathison has quit [Quit: leaving]
<siezer> udoprog check out opscode's omnibus
Aryasam_ has quit [Ping timeout: 252 seconds]
Aryasam has joined #ruby
iamjarvo has quit [Ping timeout: 240 seconds]
dankest has quit [Quit: Peace]
Stalkr has quit [Ping timeout: 245 seconds]
Aryasam has quit [Read error: Connection reset by peer]
xcv has joined #ruby
Aryasam has joined #ruby
Aryasam has quit [Read error: Connection reset by peer]
Aryasam_ has joined #ruby
danman has quit [Quit: danman]
<udoprog> siezer: will look, thanks
Davey has quit [Quit: Computer has gone to sleep.]
julweber has quit [Remote host closed the connection]
nik_-_ has joined #ruby
kadoo has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
Stalkr has joined #ruby
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Jdubs has quit [Remote host closed the connection]
Aryasam_ has quit [Ping timeout: 252 seconds]
asteros has quit [Quit: asteros]
axl_ has joined #ruby
zastern has quit [Ping timeout: 256 seconds]
zastern has joined #ruby
devoldmx has joined #ruby
Stalkr has quit [Ping timeout: 240 seconds]
iliketurtles has quit [Quit: zzzzz…..]
asteros has joined #ruby
tkuchiki has joined #ruby
baroquebobcat has joined #ruby
Zeeraw has joined #ruby
nik_-_ has quit [Quit: nik_-_]
DrOwl has quit [Ping timeout: 264 seconds]
Inside has joined #ruby
twoism has quit [Remote host closed the connection]
superscott[8] has quit [Quit: superscott[8]]
pwh has joined #ruby
Davey has joined #ruby
snovak has joined #ruby
fenicks has quit [Remote host closed the connection]
epta has quit [Ping timeout: 264 seconds]
Senjai has joined #ruby
Senjai has joined #ruby
iliketurtles has joined #ruby
popl has joined #ruby
popl has quit [Changing host]
popl has joined #ruby
tatsuya_o has joined #ruby
havenwood has quit [Remote host closed the connection]
dodosan has joined #ruby
snovak has quit [Ping timeout: 240 seconds]
lukec has joined #ruby
vishal has joined #ruby
dhruvasagar has joined #ruby
doritostains has quit [Quit: Leaving...]
DrOwl has joined #ruby
Aryasam has joined #ruby
lfox has joined #ruby
das3in has joined #ruby
quoin has joined #ruby
Senjai has quit [Ping timeout: 245 seconds]
lfox has quit [Client Quit]
Ivo has left #ruby ["WeeChat 0.4.1"]
<das3in> This is probably an odd question, but is there a site that offers… tutoring of sorts for Ruby? A place besides IRC where I can just ask someone, preferably the same person questions when they (frequently) come up
platzhirsch1 has joined #ruby
<platzhirsch1> I wish I could connect to a ruby process with pry at any point without binding.pry :|
tatsuya_o has quit [Ping timeout: 240 seconds]
kadoo has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sevenseacat has joined #ruby
fijimunkii has joined #ruby
Tarential has quit [Excess Flood]
amacgregor has joined #ruby
platzhirsch1 is now known as platzhirsch
Tarential has joined #ruby
mmm has quit [Read error: Connection reset by peer]
peregrine81 has quit []
Cyrus has joined #ruby
amacgregor_ has quit [Read error: Operation timed out]
amacgregor_ has joined #ruby
peregrine81 has joined #ruby
peregrine81 has quit [Client Quit]
mmm has joined #ruby
adoming has quit [Ping timeout: 252 seconds]
ADot has joined #ruby
tabolario has quit [Quit: Textual IRC Client: www.textualapp.com]
simplyaubs has quit [Quit: simplyaubs]
zz_tsykoduk is now known as tsykoduk
amacgregor has quit [Ping timeout: 245 seconds]
osvico has quit [Ping timeout: 240 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
zz_dbRenaud is now known as dbrenaud
Alina-malina has quit [Read error: Connection reset by peer]
Alina-malina has joined #ruby
tabolario has joined #ruby
tabolario has quit [Client Quit]
fijimunkii has quit [Ping timeout: 240 seconds]
ADot has quit [Ping timeout: 240 seconds]
baroquebobcat has joined #ruby
tabolario has joined #ruby
mweshi has quit [Remote host closed the connection]
soheil has quit [Remote host closed the connection]
mweshi has joined #ruby
quoin has quit [Ping timeout: 260 seconds]
baroquebobcat has quit [Client Quit]
i_s has joined #ruby
faoiseamh has joined #ruby
<faoiseamh> I have two strings that i'm sure are the same, but they must be in different encodings (chinese characters). Any way I can convert + compare them in such a way that I can tell if they are really the same?
baroquebobcat has joined #ruby
mrsolo has joined #ruby
smashwilson has quit [Quit: Leaving.]
<w33dWizard[420]> you mean ensure their translations are the same?
Xaitec has joined #ruby
<faoiseamh> not sure exactly what you mean by that
<faoiseamh> the strings look identical visually
agjacome has quit [Quit: leaving]
<w33dWizard[420]> so how are they different?
<faoiseamh> but are not equal - they must be encoded with different unicode encodings or somethings
<w33dWizard[420]> oh
<faoiseamh> i'm positive they should be the same
<faoiseamh> not sure what steps to take to determine what the differences are and how to convert them in such a way to compare
<faoiseamh> i've tried doing various string.encode's on them
<faoiseamh> and if i do an invalid one, ruby will tell me what it thinks the encoding is (i.e. code converter not found (GBK to gb))
<bnagy> use inspect?
<bnagy> if that doesn't work then use each_byte.to_a and inspect that
fuhgeddaboudit has joined #ruby
<faoiseamh> interestingly .inspect shows "'s on either side of it
<faoiseamh> for example:
<faoiseamh> irb(main):004:0> "2010月饼家族盒.dds".inspect
<faoiseamh> => "\"2010月饼家族盒.dds\""
BSaboia has joined #ruby
<udoprog> das3in: most questions have been asked and answered on SO
<das3in> Yeah I've looked on SO but there are some pretty specific things I have trouble with that aren't there
<bnagy> faoiseamh: that's normal
<bnagy> >> "손실".each_byte.to_a
<eval-in> bnagy => [236, 134, 144, 236, 139, 164] (https://eval.in/52144)
<udoprog> das3in: what kind of things?
zastern has quit [Remote host closed the connection]
<das3in> For example, I have an array of objects. I want to copy the array, and move them 2 at a time into new, dynamically created arrays until the cloned array is empty
<bnagy> das3in: we did this yesterday
<das3in> I know that
<das3in> but it didn't work
Hanmac1 has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
<das3in> the chunk method on enumerables is nice, but doesn't let me control the new arrays
<bnagy> instead of saying 'it didn't work' try saying "I did X and expected Y but instead got Z"
mlpinit has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
jonr22 has quit [Ping timeout: 240 seconds]
<das3in> I'm trying to build a tournament management system. And I have an array of players, and each round I need to create a number of matches based on that number of players
<das3in> match1 << players(0,1) match2 << players(2,3) etc etc
Hanmac has quit [Ping timeout: 240 seconds]
<bnagy> where do these variable names come from?
<das3in> That's part of the problem, I need to dynamically create them
<bnagy> don't do that.
<das3in> based on the number of players
<bnagy> it comes up every so often, it's a blind spot people have
Aryasam_ has joined #ruby
Voodoofish430 has quit [Quit: Leaving.]
<bnagy> just use another array called matches or something, then you can get your match by matches[0] etc
rickmasta has joined #ruby
Stalkr has joined #ruby
scarolan_ has joined #ruby
Aryasam has quit [Ping timeout: 240 seconds]
cjs226 has joined #ruby
<das3in> So create an empty array of matches, (matches = []) and then push 2 players at a time into new arrays in matches array?
<bnagy> dynamically creating variables is basically always wrong
<das3in> hmm I didn't know that
<bnagy> yeah, although that would just look like matches = players.each_slice(2).to_a
Xaitec has quit [Remote host closed the connection]
scarolan has quit [Ping timeout: 264 seconds]
yourmysin has joined #ruby
<das3in> wow that worked perfectly
<das3in> and makes a lot more sense, thanks a lot!
<das3in> on a purely educational level, why is dynamically created variables generally bad
Aryasam has joined #ruby
<bnagy> cause if you know which variable you're looking for you know everything you need to find that data in a bigger collection
phantasm66 has joined #ruby
ADot has joined #ruby
Stalkr has quit [Ping timeout: 240 seconds]
ADot has quit [Max SendQ exceeded]
phantasm66 has quit [Client Quit]
Aryasam has quit [Read error: Connection reset by peer]
forced_request has quit [Ping timeout: 260 seconds]
ADot has joined #ruby
<das3in> that makes sense. I guess the only 'benefit' to dynamically creating variables is naming convention
ADot has quit [Max SendQ exceeded]
<das3in> thanks bnagy
ADot has joined #ruby
Domon has joined #ruby
ADot has quit [Max SendQ exceeded]
Aryasam_ has quit [Ping timeout: 264 seconds]
ADot has joined #ruby
asteros has quit [Quit: asteros]
Aryasam has joined #ruby
<bnagy> no worries
<udoprog> das3in: another way to think about it; if you are effectively trying to store a 'list of something', you should probably use a list
bricker`1A has quit [Remote host closed the connection]
quoin has joined #ruby
Domon has quit [Remote host closed the connection]
Domon has joined #ruby
narcan has joined #ruby
mikeric has joined #ruby
sectionme has joined #ruby
Domon__ has joined #ruby
phutchins has quit [Ping timeout: 240 seconds]
Domon has quit [Read error: Connection reset by peer]
kadoo has joined #ruby
simplyaubs has joined #ruby
ADot has quit [Ping timeout: 252 seconds]
kemist has quit [Ping timeout: 248 seconds]
helloworld has quit [Ping timeout: 245 seconds]
Aryasam has quit [Ping timeout: 264 seconds]
krz has joined #ruby
v0n has joined #ruby
sectionme has quit [Ping timeout: 245 seconds]
kadoo has quit [Client Quit]
tsykoduk is now known as zz_tsykoduk
axl_ has quit [Quit: axl_]
whunt has quit [Quit: Computer has gone to sleep.]
chrisja has quit [Quit: leaving]
dmiller__ has quit [Remote host closed the connection]
havenwood has joined #ruby
fgh has quit [Ping timeout: 252 seconds]
varfoo has joined #ruby
fuhgeddaboudit has quit [Ping timeout: 252 seconds]
das3in has quit [Quit: Leaving]
<krz> a class extends a module. is it possible for the module to access instance variables in the class?
snovak has joined #ruby
aspires has quit [Quit: aspires]
<krz> it wouldnt right? since the object is not an instance of the class
<bnagy> correct
<bnagy> you could access class instance variables though
mayorga has joined #ruby
quoin has quit [Ping timeout: 240 seconds]
mercwithamouth has quit [Ping timeout: 248 seconds]
havenwood has quit [Ping timeout: 246 seconds]
mercwithamouth has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
devoldmx3 has joined #ruby
snovak has quit [Ping timeout: 264 seconds]
<krz> i could?
<krz> but it would be wrong? is that what you are trying to say bnagy ?
jwicked has joined #ruby
<bnagy> class ivar != ivar
cj3kim_ has joined #ruby
devoldmx3 has quit [Read error: Connection reset by peer]
ehc has joined #ruby
ehc has quit [Client Quit]
Es0teric has quit [Quit: Computer has gone to sleep.]
renanoronfle has joined #ruby
cjs226 has quit []
baroquebobcat has joined #ruby
adeponte has quit [Ping timeout: 240 seconds]
vpretzel has quit [Remote host closed the connection]
nanoxd has quit [Ping timeout: 252 seconds]
ce_afk is now known as cescalante
vpretzel_ has joined #ruby
vpretzel_ is now known as vpretzel
mercwithamouth has quit [Ping timeout: 264 seconds]
radic has joined #ruby
baroquebobcat has quit [Client Quit]
cj3kim_ has quit [Remote host closed the connection]
ehc has joined #ruby
nanoxd has joined #ruby
Aryasam has joined #ruby
tjad has joined #ruby
radic_ has quit [Ping timeout: 240 seconds]
cyber-criminal has joined #ruby
<cyber-criminal> ruby is shit
<cyber-criminal> radar nigger
benlieb has joined #ruby
rezzack has quit [Ping timeout: 252 seconds]
Mars` has joined #ruby
<sevenseacat> mute him in one channel, he goes to another
mercwithamouth has joined #ruby
<cyber-criminal> aha
<cyber-criminal> bitch
b00stfr3ak has joined #ruby
b00stfr3ak has quit [Changing host]
b00stfr3ak has joined #ruby
ADot has joined #ruby
ADot has quit [Max SendQ exceeded]
baroquebobcat has joined #ruby
ADot has joined #ruby
ADot has quit [Max SendQ exceeded]
ADot has joined #ruby
ADot has quit [Max SendQ exceeded]
ADot has joined #ruby
ADot has quit [Max SendQ exceeded]
cyber-criminal is now known as big_a
big_a is now known as biggie
lewtds has joined #ruby
ADot has joined #ruby
ADot has quit [Max SendQ exceeded]
ADot has joined #ruby
ADot has quit [Max SendQ exceeded]
ADot has joined #ruby
ADot has quit [Max SendQ exceeded]
diegoviola has joined #ruby
<biggie> fackin ruby shit
ADot has joined #ruby
ADot has quit [Max SendQ exceeded]
ADot has joined #ruby
ADot has quit [Max SendQ exceeded]
ADot has joined #ruby
mlpinit has quit [Remote host closed the connection]
freezey has joined #ruby
mlpinit has joined #ruby
biggie has left #ruby [#ruby]
vim_shim has joined #ruby
platzhirsch has left #ruby [#ruby]
Aryasam has quit [Read error: Connection reset by peer]
Aryasam has joined #ruby
DrOwl has quit [Ping timeout: 245 seconds]
yourmysin has quit [Read error: Connection reset by peer]
havenwood has joined #ruby
mercwithamouth has quit [Ping timeout: 253 seconds]
kizzx2 has joined #ruby
Aryasam has quit [Read error: Connection reset by peer]
iliketurtles has joined #ruby
Aryasam has joined #ruby
mweshi has quit [Quit: mweshi]
DrOwl has joined #ruby
mlpinit_ has joined #ruby
mweshi has joined #ruby
ADot has quit [Quit: Leaving.]
kvirani has joined #ruby
fridim_ has quit [Ping timeout: 240 seconds]
soheil has joined #ruby
cescalante is now known as ce_afk
mlpinit_ has quit [Remote host closed the connection]
rickmasta has quit [Quit: Leaving...]
havenwood has quit [Ping timeout: 240 seconds]
mlpinit has quit [Ping timeout: 256 seconds]
mercwithamouth has joined #ruby
nik_-_ has joined #ruby
nik_-_ has quit [Client Quit]
Jdubs has joined #ruby
mary5030 has joined #ruby
Stalkr has joined #ruby
nisstyre has joined #ruby
freezey has quit [Remote host closed the connection]
alvaro_o has quit [Quit: Ex-Chat]
Aryasam has quit [Read error: Connection reset by peer]
Aryasam_ has joined #ruby
jonr22 has joined #ruby
IceDragon has quit [Quit: Space~~~]
eka has quit [Quit: Computer has gone to sleep.]
soheil has quit [Ping timeout: 260 seconds]
ehc has quit [Quit: ehc]
ehc has joined #ruby
Stalkr has quit [Ping timeout: 260 seconds]
zeade has joined #ruby
fuhgeddaboudit has joined #ruby
i_s has quit [Remote host closed the connection]
voodoofish has quit [Quit: Leaving]
cj3kim_ has joined #ruby
Aryasam_ has quit [Read error: Connection reset by peer]
Stalkr has joined #ruby
narcan has quit [Ping timeout: 264 seconds]
niklasb has quit [Read error: Operation timed out]
roadt_ has joined #ruby
kadoo has joined #ruby
cj3kim_ has quit [Read error: Connection reset by peer]
kadoo has quit [Client Quit]
Stalkr has quit [Ping timeout: 246 seconds]
kevinykchan has joined #ruby
rickmasta has joined #ruby
aspires has joined #ruby
duracrisis has quit [Quit: Good bye!]
jonr22 has quit [Ping timeout: 248 seconds]
asteros has joined #ruby
quoin has joined #ruby
Aryasam has joined #ruby
rainbyte16 has joined #ruby
BSaboia has quit [Quit: Leaving]
simplyaubs has quit [Quit: simplyaubs]
snovak has joined #ruby
Aryasam_ has joined #ruby
Aryasam has quit [Read error: Connection reset by peer]
rainbyte16 has left #ruby [#ruby]
simplyaubs has joined #ruby
snovak has quit [Ping timeout: 260 seconds]
intuxicated has quit [Ping timeout: 252 seconds]
postmodern has quit [Quit: Leaving]
jonahR has joined #ruby
ukd1 has quit [Remote host closed the connection]
ukd1 has joined #ruby
fijimunkii has joined #ruby
choobie has left #ruby [#ruby]
quoin has quit [Ping timeout: 240 seconds]
vim_shim has quit [Ping timeout: 256 seconds]
Bira has quit [Remote host closed the connection]
jwicked has quit [Read error: Operation timed out]
ukd1 has quit [Ping timeout: 248 seconds]
huoxito has quit [Quit: Leaving]
pwh has quit []
threesome has quit [Ping timeout: 264 seconds]
Es0teric has joined #ruby
sarmiena_ has quit [Quit: sarmiena_]
serp` has joined #ruby
kadoo has joined #ruby
kvirani has quit [Remote host closed the connection]
Aryasam_ has quit [Ping timeout: 260 seconds]
pwh has joined #ruby
kvirani has joined #ruby
adeponte has joined #ruby
mercwithamouth has quit [Ping timeout: 252 seconds]
Es0teric has quit [Client Quit]
mercwithamouth has joined #ruby
dhruvasagar has quit [Ping timeout: 245 seconds]
mrsolo has quit [Quit: This computer has gone to sleep]
cj3kim_ has joined #ruby
conner has joined #ruby
Aryasam has joined #ruby
kadoo has quit [Client Quit]
benlieb has quit [Quit: benlieb]
cj3kim_ has quit [Read error: Connection reset by peer]
kvirani has quit [Ping timeout: 248 seconds]
Mars` has quit [Remote host closed the connection]
vxxr has joined #ruby
adamxlowe has joined #ruby
roadt_ has quit [Ping timeout: 245 seconds]
aspires has quit [Quit: aspires]
adamxlowe has left #ruby [#ruby]
adeponte has quit [Ping timeout: 260 seconds]
Alina-malina has quit [Ping timeout: 240 seconds]
gja has joined #ruby
havenwood has joined #ruby
brennanMKE has quit [Remote host closed the connection]
brennanMKE has joined #ruby
gja has quit [Client Quit]
zz_tsykoduk is now known as tsykoduk
ADot has joined #ruby
dcunit3d has quit [Ping timeout: 264 seconds]
mxweas has joined #ruby
renanoronfle has quit [Quit: This computer has gone to sleep]
serp` has quit [Quit: serp`]
havenwood has quit [Ping timeout: 264 seconds]
vim_shim has joined #ruby
T_T has quit [Remote host closed the connection]
ADot has quit [Ping timeout: 240 seconds]
<w33dWizard[420]> um
<w33dWizard[420]> can someone debug something simple for me?
gcds has quit [Ping timeout: 248 seconds]
ehc has quit [Quit: ehc]
cj3kim_ has joined #ruby
brennanMKE has quit [Remote host closed the connection]
brennanMKE has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
ixti has joined #ruby
ehc has joined #ruby
ukd1 has joined #ruby
Aryasam has quit [Ping timeout: 248 seconds]
baroquebobcat has joined #ruby
Aryasam has joined #ruby
Jdubs has quit [Remote host closed the connection]
Stalkr has joined #ruby
ce_afk is now known as cescalante
mrsolo has joined #ruby
mlpinit has joined #ruby
asteros has quit [Quit: asteros]
ukd1 has quit [Ping timeout: 240 seconds]
baroquebobcat has quit [Client Quit]
Stalkr has quit [Ping timeout: 246 seconds]
mlpinit has quit [Ping timeout: 260 seconds]
gcds has joined #ruby
Zeeraw has quit [Quit: Computer has gone to sleep.]
<krz> When i call Foo.new, it returns the instance variables that were defined in the initialize method. how do I return a custom message instead?
<krz> return=output
<sevenseacat> i would presume it would return whatever your initialize method returns
dcunit3d has joined #ruby
<krz> sevenseacat: im trying to output something similar to User.new
<krz> i.e. => #<User id: nil, admin: false, first_name: nil
<krz> User = AR object
<sevenseacat> well thats just the object you're creating
mikeric has quit []
cescalante is now known as ce_afk
vxxr has quit [Quit: leaving]
<sevenseacat> u = User.new, it returns the user instance
kemist has joined #ruby
Mars` has joined #ruby
<sevenseacat> and it just outputs u.inspect
simplyaubs has quit [Quit: simplyaubs]
Jdubs has joined #ruby
<krz> sevenseacat: i want the same output with my custom ruby objects. what should go in the initalizer?
tsykoduk is now known as zz_tsykoduk
<krz> initializer*
<sevenseacat> nothing
i_s has joined #ruby
<sevenseacat> redefine inspect for pretty output
pwh has quit []
funburn has quit [Quit: funburn]
postmodern has joined #ruby
zz_tsykoduk is now known as tsykoduk
<krz> ah
<krz> thanks
kemist has quit [Ping timeout: 248 seconds]
Mars` has quit [Ping timeout: 240 seconds]
i_s has quit [Ping timeout: 246 seconds]
pwh has joined #ruby
Jdubs_ has joined #ruby
Inside has quit [Ping timeout: 260 seconds]
adeponte has joined #ruby
polaco is now known as polaco_zZz
snovak has joined #ruby
cj3kim_ has quit [Remote host closed the connection]
DanKnox is now known as DanKnox_away
doritostains has joined #ruby
Jdubs has quit [Ping timeout: 252 seconds]
brianpWins has joined #ruby
<krz> if a class includes a module. and that module includes another module. the 2nd module sets a variable that needs to be accessed by the first module. how should i go about this?
snovak has quit [Ping timeout: 246 seconds]
Aryasam has quit [Ping timeout: 248 seconds]
Xiti has joined #ruby
ianderson has joined #ruby
kadoo has joined #ruby
quoin has joined #ruby
ukd1 has joined #ruby
mayorga has quit [Ping timeout: 256 seconds]
kadoo has quit [Client Quit]
Jdubs_ has quit [Remote host closed the connection]
ldnunes has quit [Quit: Leaving]
Aryasam has joined #ruby
kreeves has quit [Ping timeout: 256 seconds]
Jdubs has joined #ruby
kilophoton has quit [Ping timeout: 245 seconds]
vim_shim has quit [Ping timeout: 240 seconds]
nari has joined #ruby
kizzx2 has quit [Quit: Leaving.]
funburn has joined #ruby
rezzack has joined #ruby
soba has joined #ruby
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
Aryasam has quit [Ping timeout: 264 seconds]
<krz> k better question. if a module sets some data. now can i make this data accessible by the class or other modules?
<krz> what should i look into?
ukd1 has quit [Read error: Connection reset by peer]
ukd1 has joined #ruby
cj3kim_ has joined #ruby
ukd1_ has joined #ruby
quoin has quit [Ping timeout: 240 seconds]
Aryasam has joined #ruby
cj3kim_ has quit [Remote host closed the connection]
Aryasam_ has joined #ruby
Aryasam_ has quit [Read error: Connection reset by peer]
ianderson has quit [Quit: ZNC - http://znc.in]
osvico has joined #ruby
Aryasam_ has joined #ruby
ukd1 has quit [Ping timeout: 246 seconds]
flagg0204 has joined #ruby
flagg0204 has quit [Remote host closed the connection]
pwh has quit []
flagg0204 has joined #ruby
Aryasam has quit [Ping timeout: 264 seconds]
classix has quit [Ping timeout: 240 seconds]
<krz> class_attribute ?
larissa has quit [Quit: Leaving]
havenwood has joined #ruby
ElCapitanMarklar has joined #ruby
nanoxd has quit [Quit: nanoxd]
ElCapitanMarklar has quit [Client Quit]
cj3kim_ has joined #ruby
Aryasam has joined #ruby
ADot has joined #ruby
ehc has quit [Quit: ehc]
Aryasam_ has quit [Read error: Connection reset by peer]
v0n has quit [Ping timeout: 240 seconds]
flagg0204 has quit [Remote host closed the connection]
pwh has joined #ruby
havenwood has quit [Ping timeout: 264 seconds]
flagg0204 has joined #ruby
Domon__ has quit [Remote host closed the connection]
Stalkr has joined #ruby
Domon has joined #ruby
Stalkr has quit [Read error: Connection reset by peer]
Stalkr has joined #ruby
ADot has quit [Ping timeout: 245 seconds]
v0n has joined #ruby
tomzx_mac has quit [Ping timeout: 246 seconds]
jhn has joined #ruby
classix has joined #ruby
dhruvasagar has joined #ruby
cj3kim_ has quit [Remote host closed the connection]
kizzx2 has joined #ruby
Mars` has joined #ruby
Stalkr has quit [Ping timeout: 245 seconds]
Jetchisel has joined #ruby
Domon has quit [Ping timeout: 264 seconds]
Macaveli has quit [Remote host closed the connection]
rrichardsr3 has joined #ruby
tsykoduk is now known as zz_tsykoduk
butblack has joined #ruby
Aryasam has quit [Ping timeout: 256 seconds]
dcunit3d has quit [Ping timeout: 241 seconds]
Macaveli has joined #ruby
Aryasam has joined #ruby
julweber has joined #ruby
kevinykchan has quit [Quit: Computer has gone to sleep.]
sarmiena_ has joined #ruby
lukec has quit [Quit: lukec]
Macaveli has quit [Client Quit]
T_T has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
zeade has quit [Quit: Leaving.]
julweber has quit [Ping timeout: 240 seconds]
coderhs has joined #ruby
Clooth has quit [Quit: Leaving...]
dhruvasagar has quit [Read error: Connection reset by peer]
lewtds has quit [Ping timeout: 240 seconds]
baroquebobcat has joined #ruby
dhruvasagar has joined #ruby
mansi has quit [Remote host closed the connection]
mansi has joined #ruby
<krz> how can i get this to work: https://gist.github.com/6805245
diegoviola has quit [Read error: No route to host]
<krz> at the moment, it returns nil
codecop has joined #ruby
voidPirate has joined #ruby
<voidPirate> so day 3 with ruby, and this language rocks!
robbyoconnor has joined #ruby
<voidPirate> why the 'F' would anyone learn PHP, biggest mistake of my life shit
mansi has quit [Ping timeout: 256 seconds]
<jrobeson> voidPirate, because it lets them build useful applications? or they ahve to work with php apps :)
schaerli has joined #ruby
<krz> anyone?
snovak has joined #ruby
gja has joined #ruby
<voidPirate> jrobeson: I suppose, I mean all the jobs around me are php dev jobs ;)
yacks has quit [Quit: Leaving]
<voidPirate> they syntax of ruby is a bitch to learn coming from php or js
schaerli has quit [Remote host closed the connection]
<jrobeson> hmm ? anything in particular you had a problem with?
<voidPirate> it is so simple, so it takes some time to get used ot
dhruvasagar has quit [Read error: Connection reset by peer]
<jrobeson> php was my first language i actually wrote a lot of stuff in.. but i had tried a few others first for random things.. so differing syntax is rarely a problem for me .. except stuff like ternary order..
dhruvasagar has joined #ruby
Mars` has quit [Remote host closed the connection]
Monie has joined #ruby
<voidPirate> what is the difference from a hash map and an array?
<jrobeson> that's too easy to forget if it's something that won't cause a parser error right away and you're switch back and forth a lot
Mars` has joined #ruby
<jrobeson> voidPirate, in most popular languages other than php.. hashes and arrays are seperate
snovak has quit [Ping timeout: 240 seconds]
<voidPirate> hashes seem very similiar to objects
<voidPirate> the syntax atleast
<jrobeson> try doing an associative array php style in ruby with an Array
<jrobeson> and then as a Hash, you'll see the difference
<voidPirate> ok, let me try
<jrobeson> voidPirate, you should consider running through these : http://rubykoans.com/
v0n has quit [Ping timeout: 248 seconds]
aagdbl has joined #ruby
<voidPirate> awesome thanks ;)
nemesit|znc has quit [Ping timeout: 256 seconds]
<jrobeson> oh.. and something a bit fun also http://tryruby.org/levels/1/challenges/0
<jrobeson> err better as http://tryruby.org
DaZ has quit [Read error: Operation timed out]
amacgregor has joined #ruby
schaerli has joined #ruby
Mars` has quit [Ping timeout: 264 seconds]
serp` has joined #ruby
amacgregor_ has quit [Ping timeout: 252 seconds]
<voidPirate> I'm reading through this book actually and going through the examples, quite useful: http://www.amazon.com/Programming-Ruby-1-9-2-0-Programmers/dp/1937785491
boeyc has joined #ruby
robbyoconnor has quit [Max SendQ exceeded]
<boeyc> <boeyc> hello my irb is giving the following and im not sure what this means. I created a new folder test, to play around with making classes and methods.
schaerli has quit [Remote host closed the connection]
Mars` has joined #ruby
<voidPirate> what is is giving you?
<boeyc> 1.9.3-p194 :001 > require 'dwemthy'
<boeyc> LoadError: cannot load such file -- dwemthy
<boeyc> from /home/boeyc/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:53:in `require'
fgh has joined #ruby
<voidPirate> do you have the command line tools installed?
<jhn> boeyc: is that a gem?
<boeyc> perhaps not, no im playing with poignants guide, one of their games
<jhn> try: require './dwemthy'
<boeyc> its a rb file
DaZ_ has joined #ruby
<boeyc> jhn, Thanks!
osvico has quit [Ping timeout: 240 seconds]
<w33dWizard[420]> with this method: http://pastie.org/8373891
<w33dWizard[420]> when i call word_unscrambler("cat", ["tic", "toc", "tac", "toe"])
baroquebobcat has quit [Quit: baroquebobcat]
<w33dWizard[420]> why does it return ["tac", "toc"] ?
<w33dWizard[420]> how does "toc" get in there?
robbyoconnor has joined #ruby
quoin has joined #ruby
kilophoton has joined #ruby
vishal_ has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
dodosan has quit [Remote host closed the connection]
vishal has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
aagdbl has quit [Quit: Leaving.]
Domon has joined #ruby
kilophoton has quit [Ping timeout: 240 seconds]
scottstamp is now known as zz_scottstamp
tagrudev has joined #ruby
havenwood has joined #ruby
dcunit3d has joined #ruby
Stalkr has joined #ruby
Aryasam has quit [Ping timeout: 260 seconds]
ukd1_ has quit [Remote host closed the connection]
lemonsparrow has left #ruby [#ruby]
nemesit|znc has joined #ruby
ukd1 has joined #ruby
Aryasam has joined #ruby
<bnagy> it's not a great idea to modify an array while you're iterating over it
ADot has joined #ruby
quoin has quit [Ping timeout: 264 seconds]
havenwood has quit [Ping timeout: 256 seconds]
dhruvasagar has quit [Read error: Connection reset by peer]
aagdbl has joined #ruby
dhruvasagar has joined #ruby
cj3kim has joined #ruby
cads has joined #ruby
zz_michael_mbp is now known as michael_mbp
Stalkr has quit [Ping timeout: 256 seconds]
ukd1 has quit [Ping timeout: 264 seconds]
aagdbl1 has joined #ruby
apeiros has quit [Read error: Connection reset by peer]
apeiros has joined #ruby
aagdbl has quit [Disconnected by services]
aagdbl1 is now known as aagdbl
ADot has quit [Ping timeout: 240 seconds]
<bnagy> >> search='cat';["tic", "toc", "tac", "toe"].select {|s| search.chars.to_a.permutation.include? s.chars.to_a}
<eval-in> bnagy => ["tac"] (https://eval.in/52182)
nutella has joined #ruby
mengu has joined #ruby
Mars` has quit [Remote host closed the connection]
malcolmva has quit [Ping timeout: 260 seconds]
nutella is now known as Guest16626
jbpros has joined #ruby
Mars` has joined #ruby
Mars` has quit [Read error: Connection reset by peer]
Mars` has joined #ruby
<bnagy> >> ["tic", "toc", "tac", "toe"] & 'cat'.chars.to_a.permutation.map(&:join)
<eval-in> bnagy => ["tac"] (https://eval.in/52183)
<bnagy> that's kinda funny too :P
jbpros has quit [Client Quit]
jbpros has joined #ruby
<bnagy> if horribly inefficient
Guest16626 has quit [Ping timeout: 240 seconds]
<Hanmac1> hm bnagy on newer ruby chars returns an array not an enum, so you dont need to_a
Hanmac1 is now known as Hanmac
serp` has quit [Quit: serp`]
<bnagy> really? I'm still on 1.9 in my irb
<bnagy> >> ["tic", "toc", "tac", "toe"] & 'cat'.chars.permutation.map(&:join)
<eval-in> bnagy => ["tac"] (https://eval.in/52184)
<bnagy> sweet
antuirno has joined #ruby
<jhn> w33dWizard[420]: the reason it's doing that is that the elements get shifted over every time you delete in place.
<bnagy> I still prefer the lazy permutation.include? though
robbyoconnor has quit [Quit: Konversation terminated!]
<jhn> since you delete tic, toc becomes the new element at the 0th position (tac becomes 1st, toe 2nd), but each has already seen the 0th position, so it moves on to the 1st position, which is now tac.
kadoo has joined #ruby
<jhn> so basically you skipped toe because you shifted the elements.
apeiros has quit [Remote host closed the connection]
<jhn> sorry, 'toc', not 'toe''
brennanMKE has quit [Remote host closed the connection]
<voidPirate> is their a way on github to now explore repos recently created, or modified, like old times?
<Hanmac> hm imo i would put "search.chars.to_a.permutation" outside of the loop it might be better ... but yeah i would also use include? ...
<voidPirate> I can only find "trending" as an option
ananthakumaran has joined #ruby
Mathieu_ has joined #ruby
Monie has quit [Ping timeout: 260 seconds]
Mathieu_ is now known as Mathieu
sandelius has joined #ruby
butblack has quit [Quit: butblack]
<bnagy> Hanmac: till unlikely to be as fast as doing it as a seive, but way more expressive :P
DaZ_ is now known as DaZ
Monie has joined #ruby
pwh has quit []
antuirno has quit [Quit: Leaving]
kemist has joined #ruby
mweshi has quit [Quit: mweshi]
diegoviola has joined #ruby
vishal_ has quit [Read error: Connection reset by peer]
vishal has joined #ruby
io_syl has quit []
amacgregor_ has joined #ruby
kadoo has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<bnagy> >> a=["tic", "toc", "tac", "toe"];'cat'.chars.each {|c| a.select! {|s| s.include? c}};a
<eval-in> bnagy => ["tac"] (https://eval.in/52185)
amacgregor__ has joined #ruby
io_syl has joined #ruby
amacgregor has quit [Read error: Connection reset by peer]
zoee has joined #ruby
kemist has quit [Ping timeout: 248 seconds]
JPascal has quit [Ping timeout: 245 seconds]
haxrbyte has joined #ruby
JPascal has joined #ruby
caveat- has quit [Ping timeout: 256 seconds]
<w33dWizard[420]> okay, thank you jhn that makes sense
brennanMKE has joined #ruby
<w33dWizard[420]> not sure why i didn't think of that
amacgregor_ has quit [Ping timeout: 256 seconds]
vim_shim has joined #ruby
T_T has quit [Remote host closed the connection]
tjad has quit [Read error: Operation timed out]
kadoo has joined #ruby
intuxicated has joined #ruby
snovak has joined #ruby
coderhs has quit [Quit: Leaving]
tonni has quit [Remote host closed the connection]
kadoo has quit [Client Quit]
anotherwise has joined #ruby
anotherwise has left #ruby [#ruby]
dhruvasagar has quit [Read error: Connection reset by peer]
Buuyo has joined #ruby
dhruvasagar has joined #ruby
snovak has quit [Ping timeout: 252 seconds]
lessless- has quit [Remote host closed the connection]
Elhu has joined #ruby
brianpWins has quit [Quit: brianpWins]
dhruvasagar has quit [Read error: Connection reset by peer]
haxrbyte has quit [Remote host closed the connection]
vpretzel has quit [Remote host closed the connection]
<krz> how can i get https://gist.github.com/6805245 to work
Jdubs has quit [Remote host closed the connection]
vince_prignano has joined #ruby
vpretzel has joined #ruby
brianpWins has joined #ruby
<popl> define work
dhruvasagar has joined #ruby
noop has joined #ruby
<popl> What about it isn't working?
<Hanmac> krz: you cant get it to work today because its holiday in some countries :P
<krz> popl: should return 'baz'
haxrbyte has joined #ruby
<krz> instead, it returns NameError: uninitialized class variable @@baz in Bar::ClassMethods
intuxicated has quit [Ping timeout: 264 seconds]
<Hanmac> krz use @ not @@
<krz> ah figured it out
<Hanmac> (but this does also not work ... because still in the wrong instance)
<krz> works now wit latest gist
<krz> yeap i moved the class/module variable into ClassMethod
cj3kim has quit [Remote host closed the connection]
dhruvasagar has quit [Read error: Connection reset by peer]
bricker`LA has joined #ruby
tatsuya_o has joined #ruby
Bry8Star{T2 has quit [Remote host closed the connection]
vpretzel has quit [Ping timeout: 252 seconds]
freerobby has quit [Quit: Leaving.]
dhruvasagar has joined #ruby
voidPirate has quit [Remote host closed the connection]
Bry8Star{T2 has joined #ruby
Domon has quit [Remote host closed the connection]
Domon has joined #ruby
cj3kim has joined #ruby
intuxicated has joined #ruby
cj3kim has quit [Remote host closed the connection]
Domon__ has joined #ruby
Domon has quit [Read error: Connection reset by peer]
cj3kim has joined #ruby
rrichardsr3 has quit [Quit: -- I'm getting very tired --]
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
Stalkr^ has joined #ruby
DrCode has quit [Remote host closed the connection]
Stalkr^ has quit [Client Quit]
ixti has quit [Ping timeout: 252 seconds]
dhruvasagar has quit [Read error: Connection reset by peer]
kizzx2 has quit [Read error: Connection reset by peer]
kizzx2 has joined #ruby
kizzx2 has quit [Max SendQ exceeded]
kizzx2 has joined #ruby
dagobah has joined #ruby
rahulkmr has joined #ruby
dhruvasagar has joined #ruby
havenwood has joined #ruby
quoin has joined #ruby
michael_mbp is now known as zz_michael_mbp
cj3kim has quit [Remote host closed the connection]
tjad has joined #ruby
Macaveli has joined #ruby
lkba has quit [Read error: Connection reset by peer]
lkba has joined #ruby
ADot has joined #ruby
dodosan has joined #ruby
havenwood has quit [Ping timeout: 264 seconds]
cj3kim has joined #ruby
sectionme has joined #ruby
cj3kim has quit [Read error: Connection reset by peer]
cj3kim has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
admin0 has joined #ruby
sandelius has quit [Quit: Computer has gone to sleep.]
Elhu has quit [Quit: Computer has gone to sleep.]
dodosan has quit [Ping timeout: 248 seconds]
ADot has quit [Ping timeout: 264 seconds]
<krz> ok how do i get User.new.attributes to return the class variable @@assigned_attributes: https://gist.github.com/6805245
sandelius has joined #ruby
<krz> currently returns NameError: uninitialized class variable @@assigned_attributes in Attribute
jbpros has quit [Quit: jbpros]
Matriks has joined #ruby
ayaz has joined #ruby
DanKnox_away is now known as DanKnox
quoin has quit [Ping timeout: 245 seconds]
vpretzel has joined #ruby
jonahR has quit [Ping timeout: 252 seconds]
buibex has joined #ruby
jonahR has joined #ruby
tziOm has quit [Remote host closed the connection]
aganov has joined #ruby
freerobby has joined #ruby
jwicked has joined #ruby
filipe has joined #ruby
io_syl has quit []
wallerdev has quit [Quit: wallerdev]
bartj3 has quit [Quit: quit]
vpretzel has quit [Ping timeout: 256 seconds]
dangerousdave has joined #ruby
conner has quit [Ping timeout: 240 seconds]
h_kon has joined #ruby
rrichardsr3 has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
wallerdev has joined #ruby
lessless_ has joined #ruby
Macaveli has quit [Read error: Connection reset by peer]
<sarmiena_> krz: i think it's because assigned_attributes is a class method
<sarmiena_> and you're trying to call it on an instance
bartj3 has joined #ruby
<krz> sarmiena_: this seems to work: https://gist.github.com/6805245
<sarmiena_> nm, i see the top now
<sarmiena_> yeah that looks fine to me. that works?
bartj3 has quit [Client Quit]
freerobby has quit [Ping timeout: 246 seconds]
gja has joined #ruby
bartj3 has joined #ruby
cj3kim has quit [Remote host closed the connection]
<krz> sarmiena_: yep
<sarmiena_> nice
jonahR has quit [Quit: jonahR]
mansi has joined #ruby
coderhs has joined #ruby
atno has joined #ruby
pellenation has joined #ruby
zz_michael_mbp is now known as michael_mbp
dhruvasagar has quit [Read error: Connection reset by peer]
<airtonix> why does ruby have so much brackets and stuff in wierd places?
gyzmodo has joined #ruby
<airtonix> kinda breaks the idea that it's supposed to be more humanised language and stuff
<sevenseacat> to resolve syntax ambiguities :)
dhruvasagar has joined #ruby
wallerdev has quit [Quit: wallerdev]
<airtonix> how?
<canton7> it has far fewer brackets than most languages I know :P
<airtonix> i think it creates more
<sevenseacat> what canton7 said
tonni has joined #ruby
<sevenseacat> airtonix: got an example?
<airtonix> it's not the presence of brackets that is causing me confusion
<airtonix> it's the use of them and the placement
<tobiasvl> airtonix: why shouldn't it have brackets? what's your point here? what's a "humanised language"
<canton7> agan, got an example?
<canton7> *again
b00stfr3ak has quit [Ping timeout: 240 seconds]
<airtonix> well when i say brackets, i really mean these: {}[]|:
<canton7> it might be some really poorly-written code, who knows?
Stalkr has joined #ruby
<airtonix> oh so most ruby projects are poorly written?
<canton7> ruby shares those with quite a lot of languages
<sevenseacat> i guess thats a no to the example
<canton7> ok, so you're talking about a lot of code you've seen? cool
<sarmiena_> can't tell if feeding troll
<airtonix> well for example, how you write lambdas
<canton7> I wondered if you might be looking at a particular confusing example
cj3kim has joined #ruby
<airtonix> canton7: perhaps, because someone did show me some nice and clean ruby the other day
<canton7> sarmiena_, I'm going to see if there's something constructive after the initial rant :P
<airtonix> canton7: well i doubt ruby will change so probably not.
mansi has quit [Ping timeout: 256 seconds]
<krz> hmmm doesnt seem to work in rails console though
<sarmiena_> canton7: yeah. might be someone attempting to cross over from some other language and getting the typical brain fightback of "why do i need to learn this shit? it sucks! i like what i know"
<krz> trying to figure out what the diff is
<canton7> it might be an education thing? ruby's certainly not unique in its array and hash syntax, roughly
<sevenseacat> you know theres more than one way to write lambdas, right
<tobiasvl> airtonix: are you a troll? what's your point?
<sevenseacat> when we want an example, we mean an actual code example
<airtonix> tobiasvl: you'd like it to be a simple case of "i'm a troll" but no. i want to learn it, but it's just so obtuse ruby seems so different from python
jwicked has quit [Ping timeout: 252 seconds]
<tobiasvl> it is
<sevenseacat> well it is a different language yes
snovak has joined #ruby
<tobiasvl> it is different from python
<popl> ruby is different
<popl> what's your point airtonix?
<sevenseacat> if the syntax was the same, they wouldnt be separate languages
<airtonix> but it seems to be different just for the sake of being different
<canton7> but python has a ton of brackets too... about as many, I'd say
tonni has quit [Ping timeout: 248 seconds]
Macaveli has joined #ruby
<popl> it's a fucking different language dude
<tobiasvl> airtonix: ruby is inspired by perl
<popl> now I'm pretty sure you're trolling
<airtonix> canton7: again, it's not the presence of brackets, but how they are used.
<tobiasvl> airtonix: ruby is perl-like. that's "different for the sake of being different"?
<airtonix> tobiasvl: oh well that would explain why it's so weird
<canton7> airtonix, the examples you posted - {}[] - are used in much the same way, most of the time
<tobiasvl> airtonix: exactly
<canton7> except that python uses more [] (list comprehensions) and ruby uses more {} (blocks)
<canton7> both have roughly the same syntax for arrays and dicts/hashes
<tobiasvl> canton7: and {} can be swapped out for do…end if the brackets are the problem
<canton7> aye, they're normally reserved for one-line blocks
<airtonix> i think the other thing is that "principle of least surprise" applies to ruby quite a bit... or maybe this is just rails.
<popl> airtonix: don't you have anything better to do?
Aryasam has quit [Read error: Connection reset by peer]
<airtonix> popl: you don't have to participate
ephemerian has joined #ruby
<tobiasvl> canton7: yes, but not syntactically ;)
<canton7> indeed
lewtds has joined #ruby
<tobiasvl> airtonix: well you took over the entire channel with your weird discussion
ItSANgo__ has quit [Quit: Leaving...]
<canton7> meh, nothing else was going on. people are obviously bored
<popl> but you're here, blabbing in the channel. you're filling up my logs with shit. I could ignore you but then I'd have to participate to ignore you.
<canton7> but hey, let's welcome the python guy :) he'll see the light yet
<airtonix> canton7: i think it's more about understanding "ruby done right"
<tobiasvl> airtonix has just discovered a 20 year old language with perl-like syntax. he doesn't like the syntax. it's not like this is surprising to any of us ;)
<airtonix> canton7: is there a pep8 type thing for ruby?
funburn has quit [Quit: funburn]
Aryasam has joined #ruby
<airtonix> a style guide?
<canton7> there are a few ad-hoc ones. the github one is pretty popular
<airtonix> oh nice
Aryasam has quit [Read error: Connection reset by peer]
snovak has quit [Ping timeout: 248 seconds]
Aryasam has joined #ruby
<airtonix> why "don't program defensively" ?
<airtonix> tobiasvl: that article you linked says that.
<canton7> did you see the link?
<canton7> did you read that?
<airtonix> yes. and I don't agree with it. why should I trust the inputs?
<canton7> the linked article basically says "... except at the boundaries"
<canton7> but that styleguide is just someone's opinion - don't take it as gospel
axsuul has joined #ruby
<airtonix> understood. but it helps when there is a canonical reference
ahawkins has joined #ruby
<canton7> like I say, the one I linked to is pretty popular
<airtonix> ok, what about the equiv of pythons *args, **kwargs for ruby?
mrsolo has quit [Quit: This computer has gone to sleep]
dangerousdave has quit [Read error: Connection reset by peer]
<airtonix> oh having kwargs is frowned upon in ruby?
funburn has joined #ruby
dangerousdave has joined #ruby
Macaveli has quit [Read error: Connection reset by peer]
<canton7> *args is the same, for **kwargs we normally just use a hash (though I believe ruby 2.1 is getting proper support here?)
tonni has joined #ruby
<canton7> so e.g. foo(foo: 'bar', one: 'two') is syntactically the same as foo({foo: 'bar', one: 'two'}), and foo can have the signature 'def foo(kwargs)'
funburn has quit [Client Quit]
<airtonix> oh nice
leonidlm has joined #ruby
<sevenseacat> why do people still insist on 80-character lines in 2013 (sorry, just reading style guide)
<canton7> that does have disadvantages to "real" keyword args, which is why we're finally getting proper support :)
tatsuya_o has quit [Remote host closed the connection]
<airtonix> sevenseacat: because not everyone has massive screens
<airtonix> sevenseacat: and reading code in various containers makes that easier.
<canton7> sevenseacat, the best reason I've seen is that people like to have multiple terms up on one screen
buibex has quit [Remote host closed the connection]
<canton7> though that doesn't stop me coding to 120 chars :P
<sevenseacat> also, i love the term SCREAMING_SNAKE_CASE
user258467 has joined #ruby
<airtonix> canton7: see I just have a hard time wrapping my head around ruby (and rails), i'm not a computer science graduate.
<canton7> airtonix, leave rails until you've grasped ruby - it's a whole beast untu itself
<sevenseacat> 120 sounds like a good compromise
<canton7> *unto
<airtonix> canton7: i hear ya
Monie has quit [Ping timeout: 256 seconds]
<canton7> ruby itself is really nice if you give it a few days. imo blocks > list comprehensions, and have some other neat uses
<Hanmac> canton7 hm **kwargs are already in 2.0 as i know but 2.1 get "required keyword args"
<sevenseacat> ruby is an amazing language
<canton7> I moved from python to ruby, so I sympathise with your viewpoint
buibex has joined #ruby
funburn has joined #ruby
<canton7> Hanmac, gotcha. I misread the announcement :$
<airtonix> is coffeescript inspired by ruby syntax?
<canton7> airtonix, there we go, both *args and **kwargs
DrCode has joined #ruby
zarubin has joined #ruby
<canton7> airtonix, maybe a bit? it's not particularly similar though
<sevenseacat> airtonix: yes
<airtonix> canton7: oh and what about class based mixins. with django I like to use those alot.
vpretzel has joined #ruby
<canton7> airtonix, ruby has mixins. we use them all the freaking time
<Hanmac> airtonix: https://www.ruby-forum.com/topic/4416563#1119372 << there is a list of all possible parameter types of a method
Elhu has joined #ruby
cj3kim has quit [Remote host closed the connection]
<canton7> airtonix, right I need to go to work. Good luck with ruby!
h_kon has quit [Remote host closed the connection]
<airtonix> canton7: thanks for the support :)
Monie has joined #ruby
noop has quit [Ping timeout: 264 seconds]
kemist has joined #ruby
freerobby has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
h_kon has joined #ruby
tonni has quit [Read error: Connection reset by peer]
caveat- has joined #ruby
DrCode has quit [Ping timeout: 240 seconds]
skaflem has joined #ruby
cj3kim has joined #ruby
siwica has joined #ruby
DrCode has joined #ruby
oddraisin has quit [Ping timeout: 240 seconds]
cj3kim has quit [Remote host closed the connection]
joonty has joined #ruby
freerobby has quit [Ping timeout: 240 seconds]
kemist has quit [Ping timeout: 248 seconds]
havenwood has joined #ruby
funburn has quit [Quit: funburn]
Macaveli has joined #ruby
leonidlm has quit [Ping timeout: 245 seconds]
arturaz has joined #ruby
workmad3 has joined #ruby
DanKnox is now known as DanKnox_away
Macaveli has quit [Remote host closed the connection]
havenwood has quit [Ping timeout: 256 seconds]
ADot has joined #ruby
oddraisin has joined #ruby
Aryasam_ has joined #ruby
claymore has joined #ruby
threesome has joined #ruby
boeyc has quit [Remote host closed the connection]
Macaveli has joined #ruby
Jetchisel has quit [Quit: Unfortunately time is always against us -- *Morpheus*]
ADot has quit [Ping timeout: 248 seconds]
senayar has joined #ruby
Aryasam has quit [Ping timeout: 252 seconds]
quoin has joined #ruby
senayar has quit [Remote host closed the connection]
tonni has joined #ruby
senayar has joined #ruby
Aryasam_ has quit [Ping timeout: 246 seconds]
Stalkr^ has joined #ruby
Stalkr has quit [Read error: Connection reset by peer]
zarubin has quit [Ping timeout: 260 seconds]
Stalkr^ has quit [Read error: Connection reset by peer]
Stalkr has joined #ruby
Aryasam has joined #ruby
mneorr has joined #ruby
<krz> whats an efficient way to determine whether any elements in array 2 dont exist in array 1?
<krz> i could use include? but that means iterating all elements of an array
<sevenseacat> check if the diff is empty?
mxweas has quit [Ping timeout: 240 seconds]
leonidlm has joined #ruby
<krz> sounds good
jprovazn has joined #ruby
Stalkr has quit [Read error: Connection reset by peer]
tonni has quit [Read error: Connection reset by peer]
relix has joined #ruby
Coffers has joined #ruby
<krz> hmm that wont work if the 2nd array is bigger than the first
<krz> the first array is always correct. i need to check if any elements in the second array out black goats
<sevenseacat> isnt that what you wanted?
<krz> out=are
Domon__ has quit [Remote host closed the connection]
<sevenseacat> so array2 - array1
<sevenseacat> i dont see the problem?
Domon has joined #ruby
dangerousdave has quit [Quit: Leaving...]
<krz> yea thatll do
<tobiasvl> array2 != (array2 - array1)
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
brianpWins has quit [Quit: brianpWins]
hamakn has quit [Read error: Connection reset by peer]
Zai00 has joined #ruby
hamakn has joined #ruby
alup has joined #ruby
quoin has quit [Ping timeout: 248 seconds]
aapzak has quit [Read error: Connection reset by peer]
Domon has quit [Ping timeout: 246 seconds]
obs has joined #ruby
leonidlm has quit [Read error: Operation timed out]
ehaliewicz has quit [Ping timeout: 264 seconds]
freerobby has joined #ruby
zarubin has joined #ruby
Aryasam has quit [Ping timeout: 246 seconds]
aryaching has joined #ruby
thetristan has quit [Quit: thetristan]
kevinykchan has joined #ruby
h_kon has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
Aryasam has joined #ruby
funburn has joined #ruby
aapzak has joined #ruby
mansi has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
freerobby has quit [Ping timeout: 248 seconds]
pellenation has quit [Quit: Leaving.]
dhruvasagar has joined #ruby
Domon has joined #ruby
einarj has joined #ruby
tonni has joined #ruby
mansi has quit [Ping timeout: 264 seconds]
Aryasam has quit [Read error: Connection reset by peer]
Aryasam has joined #ruby
mneorr has quit [Remote host closed the connection]
snovak has joined #ruby
funburn has quit [Quit: funburn]
Aryasam_ has joined #ruby
Aryasam has quit [Read error: Connection reset by peer]
canton7 has quit [Remote host closed the connection]
canton7 has joined #ruby
Guest88749 is now known as karlfreeman_
Lewix has quit [Ping timeout: 240 seconds]
Aryasam has joined #ruby
karlfreeman_ is now known as karlfreeman
karlfreeman is now known as Guest98448
Aryasam_ has quit [Read error: Connection reset by peer]
snovak has quit [Ping timeout: 248 seconds]
leonidlm has joined #ruby
schaerli has joined #ruby
rrichardsr3 has quit [Quit: -- I'm getting very tired --]
buibex has quit [Remote host closed the connection]
AndChat|87561 has joined #ruby
zeel has joined #ruby
buibex has joined #ruby
hamakn has quit [Read error: Connection reset by peer]
hamakn has joined #ruby
kevinykchan has quit [Quit: Computer has gone to sleep.]
gcds has quit [Ping timeout: 260 seconds]
AndChat|87561 has quit [Quit: Bye]
gcds has joined #ruby
carraroj has joined #ruby
leonidlm has quit [Read error: Operation timed out]
elaptics`away is now known as elaptics
amacgregor__ is now known as amacgregor
Aryasam has quit [Read error: Connection reset by peer]
Aryasam has joined #ruby
allsystemsarego has joined #ruby
allsystemsarego has quit [Changing host]
allsystemsarego has joined #ruby
blastDAbLast has joined #ruby
varfoo has quit [Read error: Connection reset by peer]
lewtds has quit [Quit: Leaving.]
noop has joined #ruby
<blastDAbLast> hello
<blastDAbLast> lets say i have an array called arr
codecop has quit [Read error: Connection reset by peer]
<tobiasvl> okay
shaunbaker has joined #ruby
<tobiasvl> the premise is laid out
Jetchisel has joined #ruby
<blastDAbLast> when i do arr.each {|x y| do stuff here}
<blastDAbLast> lets say i have arr.size == 10
xk_id has joined #ruby
<blastDAbLast> does x and y get the first and second item respectively?
ItSANgo has joined #ruby
blackmesa has joined #ruby
varfoo has joined #ruby
rrichardsr3 has joined #ruby
<Hanmac> blastDAbLast: 1) it would be |x,y| 2) it depends on the array elements
<blastDAbLast> oh yes you're correct, lol i was typing too fast
diegoviola has quit [Quit: WeeChat 0.4.1]
freerobby has joined #ruby
<blastDAbLast> is just an array of integers
<Hanmac> its because if the array elements are arrays too, they will be automaticlly opened
<blastDAbLast> it's*
zoee has quit [Read error: Connection reset by peer]
Aryasam has quit [Read error: Connection reset by peer]
Aryasam has joined #ruby
persand has joined #ruby
<Hanmac> when the array is an array of arrays, then |x,y| is similar to |(x,y)| ... wich means that the inner array is opened
<Hanmac> when the array is an array of non-array objects, then |x,y| x will be the element and y will be nil
lewis_ has joined #ruby
<Hanmac> when you want that both x and y are elements of the array, you need each_cons or each_slice ... depending how they should be grouped ...
<Hanmac> >> "abcde".chars.each_slice(2).to_a
<eval-in> Hanmac => [["a", "b"], ["c", "d"], ["e"]] (https://eval.in/52196)
<Hanmac> >> "abcde".chars.each_cons(2).to_a
<eval-in> Hanmac => [["a", "b"], ["b", "c"], ["c", "d"], ["d", "e"]] (https://eval.in/52197)
jlebrech has joined #ruby
carraroj has quit [Ping timeout: 246 seconds]
havenwood has joined #ruby
carraroj has joined #ruby
freerobby has quit [Ping timeout: 252 seconds]
Bosox20051 has joined #ruby
nbrosnahan has joined #ruby
zerun0 has quit [Ping timeout: 248 seconds]
<blastDAbLast> Hanmac, Ahhh that makes so much sense, thats for the clarification, yah my program goes buggy if i change the |x| to |x, y|, |x| just works fine ty for the tip :D
nbrosnahan has quit [Max SendQ exceeded]
kaspergrubbe has joined #ruby
<blastDAbLast> s/thats/thanks/
nbrosnahan has joined #ruby
havenwood has quit [Read error: Connection reset by peer]
yacks has joined #ruby
havenwood has joined #ruby
ADot has joined #ruby
leonidlm has joined #ruby
xk_id has quit [Quit:
havenwood has quit [Ping timeout: 240 seconds]
zoee has joined #ruby
rdark has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
Mars` has quit [Remote host closed the connection]
Mars` has joined #ruby
ADot has quit [Ping timeout: 248 seconds]
ewnd9 has joined #ruby
<krz> {eval(foo) => 'bar'} better way to do this
<krz> foo is a string
popl has quit [Quit: We must make an idol of our fear, and call it God.]
zerun0 has joined #ruby
Kar- has joined #ruby
rrichardsr3 has quit [Quit: -- I'm getting very tired --]
emergion has joined #ruby
Mars` has quit [Ping timeout: 245 seconds]
<canton7> a string containing what?
<Hanmac> krz obj.send(foo) or obj.public_send(foo)
quoin has joined #ruby
emergion has quit [Read error: Connection reset by peer]
ElderFain has joined #ruby
quoin_ has joined #ruby
quoin has quit [Ping timeout: 245 seconds]
jhn has quit [Ping timeout: 252 seconds]
leonidlm has quit [Ping timeout: 240 seconds]
dcunit3d has quit [Ping timeout: 240 seconds]
dhruvasagar has quit [Read error: Connection reset by peer]
<workmad3> Hanmac: that's only good if 'foo' is just an argument-less method name
dhruvasagar has joined #ruby
doritostains has quit [Quit: Leaving...]
michael_mbp is now known as zz_michael_mbp
sevenseacat has quit [Quit: Leaving.]
blackmesa has joined #ruby
<lewis_> Hanmac: why do you use 'abcde'.chars
lewis_ is now known as Lewix
Lewix has quit [Changing host]
Lewix has joined #ruby
Guest77028 has joined #ruby
<Hanmac> Lewix: yeah each_char would work too
freerobby has joined #ruby
Aryasam has quit [Ping timeout: 246 seconds]
TMM has joined #ruby
<Lewix> Hanmac: I see, I didn't know chars
<TMM> hello! I was wondering if you guys know if there was generic support for URNs in ruby or an external gem
atno has quit [Quit: Leaving]
<TMM> due to the genericity of 'ruby' and 'urn' and 'gem' my google foo is failing me
<Hanmac> chars and each_char was the same (both return enumerators) but chars was changed later so it returns an array ... the same is for lines, bytes, and codepoints
dangerousdave has joined #ruby
tatsuya_o has joined #ruby
Guest77028 has quit [Ping timeout: 264 seconds]
<mikecmpbll> this is just a exercise of curiosity
antix has joined #ruby
<mikecmpbll> i'd like to turn an unbound method to a proc
freerobby has quit [Ping timeout: 245 seconds]
antix is now known as Guest37222
<mikecmpbll> nvm ignore me.
jibi has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
buibex has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
lkba has quit [Ping timeout: 252 seconds]
dcunit3d has joined #ruby
<Hanmac> TMM hm what is "URN" ?
sarmiena_ has quit [Quit: sarmiena_]
nanoxd has joined #ruby
leonidlm has joined #ruby
snovak has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
Guest37222 has quit [Ping timeout: 245 seconds]
<mikecmpbll> uniform resource name
nfk has joined #ruby
nfk has quit [Changing host]
nfk has joined #ruby
antix_ has joined #ruby
buibex has joined #ruby
Guest64968 has joined #ruby
tjsousa has joined #ruby
dhruvasagar has joined #ruby
<Hanmac> hm there are gems for UUID ... for "Universally unique identifier" ... isnt that similar enough?
filipe has quit [Read error: Operation timed out]
klaut has joined #ruby
snovak has quit [Ping timeout: 246 seconds]
julweber has joined #ruby
kevinykchan has joined #ruby
antix_ has quit [Ping timeout: 248 seconds]
antix_ has joined #ruby
klaas_ is now known as klaas
leonidlm has quit [Read error: Operation timed out]
dhruvasagar has quit [Read error: Connection reset by peer]
kevinykchan has quit [Client Quit]
dhruvasagar has joined #ruby
Targen_ has joined #ruby
postmodern has quit [Quit: Leaving]
Targen has quit [Ping timeout: 240 seconds]
<workmad3> Hanmac: UUIDs are different from URNs ;)
<workmad3> Hanmac: also, you don't need a gem for UUIDs
<workmad3> >> require "securerandom"; SecureRandom.uuid
<eval-in> workmad3 => "07b96674-5c8e-4372-965b-52e52b24f024" (https://eval.in/52204)
<Hanmac> oh i didnt know about that :D thats nice
Mrdarknezz has joined #ruby
<Hanmac> (i only see some uuid gems, i think that was before it was part of ruby)
<Mrdarknezz> How do you check if a bash cmd has support for an arguement?
brennanMKE has quit [Remote host closed the connection]
antix_ has quit [Ping timeout: 260 seconds]
antix_ has joined #ruby
antix_ has joined #ruby
antix_ has quit [Changing host]
vim_shim has quit [Ping timeout: 245 seconds]
<workmad3> TMM: there's the ruby stdlib URI class
<workmad3> TMM: that probably handles a lot of URN stuff (seeing as URNs are a type of URI ;) )
mengu_ has joined #ruby
<jokke> hello
<jokke> i'm trying to write a weechat plugin which uses drb. when i want to connect to the server (which is started by the plugin) i get the error DRb::DRbServerNotFound
<TMM> workmad3, I'll have a look at that
<jokke> any ideas where this is coming from?
<jokke> thats the server code
kizzx2 has quit [Read error: Connection reset by peer]
kizzx2 has joined #ruby
filipe has joined #ruby
kizzx2 has quit [Max SendQ exceeded]
noop has quit [Ping timeout: 245 seconds]
kizzx2 has joined #ruby
kizzx2 has quit [Max SendQ exceeded]
kizzx2 has joined #ruby
aryaching has quit [Read error: Connection reset by peer]
kizzx2 has quit [Max SendQ exceeded]
antix_ has quit [Ping timeout: 240 seconds]
Sander^work has quit [Read error: Connection reset by peer]
kizzx2 has joined #ruby
kizzx2 has quit [Max SendQ exceeded]
aryaching has joined #ruby
Sander^work has joined #ruby
kizzx2 has joined #ruby
kizzx2 has quit [Max SendQ exceeded]
kizzx2 has joined #ruby
zets has quit [Ping timeout: 260 seconds]
freerobby has joined #ruby
<TMM> workmad3, hmm, there's no real support for urns in the URI class
kizzx2 has quit [Client Quit]
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
agent_white has quit [Quit: leaving]
carraroj has quit [Ping timeout: 245 seconds]
sandelius has quit [Quit: Computer has gone to sleep.]
dhruvasagar has quit [Read error: Connection reset by peer]
<TMM> I'll just roll my own I guess
<TMM> it's not exactly rocket science
<TMM> ty
havenwood has joined #ruby
dhruvasagar has joined #ruby
<workmad3> TMM: guess it depends on what support you want
freerobby has quit [Ping timeout: 240 seconds]
aryaching has quit [Ping timeout: 256 seconds]
zz_michael_mbp is now known as michael_mbp
leonidlm has joined #ruby
funburn has joined #ruby
antix_ has quit [Ping timeout: 248 seconds]
<TMM> workmad3, well... all urilib currently does is functionally equivalent to .split("urn:")[1]
<TMM> it'd be nice to extract at least the namespace :P
<workmad3> true :)
havenwood has quit [Ping timeout: 240 seconds]
antix_ has joined #ruby
ADot has joined #ruby
jbpros has joined #ruby
noop has joined #ruby
aryaching has joined #ruby
nanoxd has quit [Quit: nanoxd]
dcunit3d has quit [Quit: leaving]
crazedpsyc has quit [Read error: Operation timed out]
tagrudev has quit [Read error: Operation timed out]
antix_ has quit [Ping timeout: 260 seconds]
crazedpsyc has joined #ruby
tonni_ has joined #ruby
ADot has quit [Ping timeout: 252 seconds]
leonidlm has quit [Read error: Operation timed out]
jso has quit [Read error: Operation timed out]
antix_ has joined #ruby
jso has joined #ruby
airtonix has quit [Read error: Connection reset by peer]
airtonix has joined #ruby
jgrevich has quit [Read error: Operation timed out]
<TMM> workmad3, "This page is taking way too long to load." aaaaaa
jgrevich has joined #ruby
swingha has joined #ruby
tonni has quit [Ping timeout: 256 seconds]
nbrosnahan has quit [Read error: Operation timed out]
nbrosnahan has joined #ruby
<workmad3> TMM: github seems to be having some issues atm :(
Lewix has quit [Remote host closed the connection]
antix_ has quit [Ping timeout: 246 seconds]
Rollabunna has joined #ruby
antix_ has joined #ruby
antix_ has joined #ruby
antix_ has quit [Changing host]
dhruvasagar has quit [Read error: Connection reset by peer]
AntelopeSalad has quit [Read error: Connection reset by peer]
Speed has joined #ruby
dhruvasagar has joined #ruby
AntelopeSalad has joined #ruby
nemesit|znc has quit [Ping timeout: 256 seconds]
Mars` has joined #ruby
brennanMKE has joined #ruby
mneorr has joined #ruby
jrhe has quit [Quit: jrhe]
ewnd9 has quit [Ping timeout: 248 seconds]
antix_ has quit [Ping timeout: 240 seconds]
mneorr_ has joined #ruby
Mars` has quit [Ping timeout: 245 seconds]
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
mneorr has quit [Ping timeout: 240 seconds]
tagrudev has joined #ruby
Macaveli has quit [Read error: Connection reset by peer]
leonidlm has joined #ruby
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
khushildep has joined #ruby
freerobby has joined #ruby
brennanMKE has quit [Ping timeout: 256 seconds]
mansi has joined #ruby
antix_ has quit [Ping timeout: 256 seconds]
epta has joined #ruby
obs has quit [Quit: Bye]
mneorr_ has quit [Remote host closed the connection]
obs has joined #ruby
sandelius has joined #ruby
antix has joined #ruby
mneorr has joined #ruby
antix is now known as Guest50480
freerobby has quit [Ping timeout: 264 seconds]
mansi has quit [Ping timeout: 256 seconds]
Nahra_ has quit [Quit: Lost terminal]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gja has quit [Quit: This computer has gone to sleep]
snovak has joined #ruby
leonidlm has quit [Ping timeout: 246 seconds]
schaerli has quit [Remote host closed the connection]
Guest50480 has quit [Ping timeout: 256 seconds]
sarkie has joined #ruby
BRMatt has joined #ruby
mneorr has quit [Ping timeout: 245 seconds]
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
gyre007 has joined #ruby
nemesit|znc has joined #ruby
<sarkie> Hi guys, looking for a bit of advice, I have been tasked to build a system that has certain "rules" based on a user, "if the users basket has item 123" "and the user is from uk" "and the date is xyz" then do something, I'd like to show these rules in 'english' and parse them, I have seen rules engine, nlp, others, do you think this is over kill and should just do a regex approach?
Xeago has joined #ruby
lkba has joined #ruby
mikecmpbll has joined #ruby
VTLob has joined #ruby
swingha has quit [Quit: Bye]
kaspergrubbe has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
snovak has quit [Ping timeout: 260 seconds]
<canton7> sarkie, I'd write a little DSL, but certainly not a full-blown rules parser
<sarkie> canton7, that's what I'm thinking and how about parsing it, just regex match a rule, and split the dsl into parts and find a rule which matches each part? "the basket has {thing}" "user is" ... ?
antix_ has quit [Ping timeout: 240 seconds]
antix_ has joined #ruby
<canton7> sarkie, no, as in something like this: http://pastie.org/8374364
aryaching has quit []
zarubin has quit [Ping timeout: 240 seconds]
<sarkie> canton7, ah, its just the item, country, date etc are defined by the user and it needs to be stored as a string somewhere. so maybe http://pastie.org/8374368 ?
<canton7> sarkie, hmm? I'm meaning the user writes the contents of my pastie, as their way of configuring the rule
<sarkie> canton7, ah!
schaerli has joined #ruby
<sarkie> canton7, that may work indeed. thanks that's deffo something to think about. thanks
mengu has quit [Remote host closed the connection]
fearoffish has quit [Excess Flood]
antix_ has quit [Ping timeout: 256 seconds]
fearoffish has joined #ruby
<canton7> sarkie, the advantage of dsls is they're dead easy to write, and syntax checking is done by the rule parser
fearoffish has quit [Excess Flood]
gja has joined #ruby
mengu has joined #ruby
fearoffish has joined #ruby
fearoffish has quit [Excess Flood]
antix_ has joined #ruby
<sarkie> canton7, yeah, was just trying to think of the best way to write the dsl and parse it by "something"
leonidlm has joined #ruby
fearoffish has joined #ruby
<canton7> http://pastie.org/8374374 for example. Untested - I might have skipped a & somewhere
ismlages has joined #ruby
julweber has quit [Remote host closed the connection]
<sarkie> canton7, the user will be creating the rule on a site, then running but (thanks for the example, perfect) I kept seeing the instance_eval and didn't quite 'get it' till now, this is exactly what I need.
<canton7> cool, obviously that approach might not be right for you, but it's food for thought
<canton7> if it's website-based, I'd be tempted to do it entirely graphically
<canton7> click the "Add condition" link, select the condition from a drop-down, condition options appear, fill in the right values etc
jbpros has quit [Quit: jbpros]
<sarkie> my idea, was, the web creates the rules, using ddl, creating a string dsl 'thing' and then a RoR apps picks it up and runs the rules, it also needs to work with a js script currently using nodejs that I might replace if I can.
mengu has quit [Ping timeout: 264 seconds]
quoin_ has quit [Remote host closed the connection]
quoin has joined #ruby
antix_ has quit [Ping timeout: 264 seconds]
Stygia has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
<sarkie> using http://jsonselect.org/#tryit to validate a json object if the user passes a trigger then the ruby rules engine to update something, I'd love to combine them but deffo food for thought.
ahawkins_ has joined #ruby
dhruvasagar has joined #ruby
starfox21 has joined #ruby
antix_ has joined #ruby
freerobby has joined #ruby
leonidlm has quit [Ping timeout: 240 seconds]
havenwood has joined #ruby
apeiros has joined #ruby
ahawkins has quit [Ping timeout: 252 seconds]
vishal has quit [Remote host closed the connection]
helloworld has joined #ruby
Advocation has joined #ruby
freerobby has quit [Ping timeout: 240 seconds]
Sander^work has quit [Read error: Connection timed out]
antix_ has quit [Ping timeout: 248 seconds]
havenwood has quit [Ping timeout: 240 seconds]
quoin has quit [Ping timeout: 256 seconds]
antix_ has joined #ruby
codecop has joined #ruby
dbrenaud is now known as dbRenaud
r0bgl33s0n has quit [Ping timeout: 248 seconds]
ADot has joined #ruby
quoin has joined #ruby
Macaveli has joined #ruby
Guest98448 is now known as karlfreeman
ADot has quit [Ping timeout: 240 seconds]
joonty has quit [Ping timeout: 240 seconds]
antix_ has quit [Ping timeout: 256 seconds]
funburn has quit [Remote host closed the connection]
kaspergrubbe has joined #ruby
funburn has joined #ruby
antix_ has joined #ruby
kevinykchan has joined #ruby
blackmes1 has joined #ruby
leonidlm has joined #ruby
sectionme has quit [Ping timeout: 246 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
nfk has quit [Quit: yawn]
antix_ has quit [Ping timeout: 252 seconds]
relix has joined #ruby
nari has quit [Ping timeout: 246 seconds]
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
kaspergrubbe has quit [Ping timeout: 245 seconds]
dhruvasagar has quit [Read error: Connection reset by peer]
julweber has joined #ruby
dhruvasagar has joined #ruby
mengu has joined #ruby
evenix_ has quit [Remote host closed the connection]
evenix has quit [Remote host closed the connection]
mengu has quit [Remote host closed the connection]
evenix has joined #ruby
evenix_ has joined #ruby
mengu has joined #ruby
nomenkun has joined #ruby
tonni_ has quit [Remote host closed the connection]
kaspergrubbe has joined #ruby
mengu_ has quit [Quit: This computer has gone to sleep]
antix_ has quit [Ping timeout: 240 seconds]
fijimunkii has quit [Ping timeout: 248 seconds]
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
leonidlm has quit [Read error: Operation timed out]
butblack has joined #ruby
ry4nn_ has quit [Remote host closed the connection]
relix has quit [Quit: Textual IRC Client: www.textualapp.com]
freerobby has joined #ruby
Xeago has joined #ruby
relix has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
buibex has quit [Remote host closed the connection]
antix_ has quit [Ping timeout: 260 seconds]
freerobby has quit [Ping timeout: 245 seconds]
Deele has joined #ruby
antix has joined #ruby
antix has quit [Changing host]
antix has joined #ruby
antix is now known as Guest89684
<krz> i got the following structure: {foo: { type: 'a', b: 'b' }, bar: { type: 'a', b: 'b' }}. how can i turn it into this: {foo: nil, bar: nil}
<krz> i can do this in a few lines of code. however looking for a one liner
<jokke> is there a more elegant way of doing sth like `echo #{input} | cmd`
<jokke> with IO.pipe maybe?
fixl has joined #ruby
<tobiasvl> krz: h.each {|k, _| a[k] = nil }
<tobiasvl> ?
<krz> this is what i have so far hash = {}; h.keys.each { |key| hash.merge!({ key => nil }) }
<tobiasvl> i don't understand what you want
Kabaka has quit [Write error: Connection reset by peer]
DrCode has quit [Write error: Broken pipe]
Bry8Star{T2 has quit [Remote host closed the connection]
blackmes1 has quit [Write error: Connection reset by peer]
Boohbah has quit [Write error: Connection reset by peer]
Domon has quit [Remote host closed the connection]
julweber has quit [Remote host closed the connection]
<tobiasvl> h.keys.each { |key| h[key] = nil }
<krz> tobiasvl: your code returns: TypeError: no implicit conversion of Symbol into Integer
Guest89684 has quit [Ping timeout: 240 seconds]
Domon has joined #ruby
Xeago has quit [Remote host closed the connection]
<tobiasvl> really. it works here, but then again i use 1.8
<tobiasvl> >> h = {foo: { type: 'a', b: 'b' }, bar: { type: 'a', b: 'b' }}; h.keys.each { |key| h[key] = nil }
<eval-in> tobiasvl => [:foo, :bar] (https://eval.in/52217)
<tobiasvl> haha
<tobiasvl> >> h = {foo: { type: 'a', b: 'b' }, bar: { type: 'a', b: 'b' }}; h.each {|k, _| a[k] = nil }
<eval-in> tobiasvl => undefined local variable or method `a' for main:Object (NameError) ... (https://eval.in/52218)
tonni has joined #ruby
<tobiasvl> >> h = {foo: { type: 'a', b: 'b' }, bar: { type: 'a', b: 'b' }}; h.each {|k, _| h[k] = nil }
<eval-in> tobiasvl => {:foo=>nil, :bar=>nil} (https://eval.in/52219)
<tobiasvl> 18>> h = {foo: { type: 'a', b: 'b' }, bar: { type: 'a', b: 'b' }}; h.each {|k, _| h[k] = nil }
<eval-in> tobiasvl => /tmp/execpad-68e48fcf4519/source-68e48fcf4519:2: odd number list for Hash ... (https://eval.in/52220)
Boohbah has joined #ruby
antix_ has joined #ruby
mlpinit has joined #ruby
<tobiasvl> 18>> h = {:foo => { :type => 'a', :b => 'b' }, :bar => { :type => 'a', :b => 'b' }}; h.each {|k, _| h[k] = nil }
<eval-in> tobiasvl => {:bar=>nil, :foo=>nil} (https://eval.in/52221)
buibex has joined #ruby
ewnd9 has joined #ruby
<tobiasvl> if you ignore the two silly and wrong examples, what's wrong with that approach?
DrCode has joined #ruby
Bry8Star{T2 has joined #ruby
nbrosnahan has quit [Ping timeout: 240 seconds]
joonty has joined #ruby
rahulkmr1 has joined #ruby
leonidlm has joined #ruby
butblack has quit [Quit: butblack]
Domon has quit [Ping timeout: 252 seconds]
jprovazn has quit [Quit: Leaving]
<krz> thanks tobiasvl
aagdbl has quit [Quit: Leaving.]
rahulkmr has quit [Ping timeout: 252 seconds]
decoponio has joined #ruby
buibex has quit [Remote host closed the connection]
antix_ has quit [Ping timeout: 264 seconds]
aagdbl has joined #ruby
antix_ has joined #ruby
julweber has joined #ruby
Ferr has joined #ruby
<Ferr> Use a while-loop only to loop forever, and that means probably never. This only applies to Ruby, other
<Ferr> languages are different
<Ferr> . Could anyone please have a comment on this?
<apeiros> ferr: uh, context?
<Ferr> I'm reading a book "Learn ruby the hard way" and in the section "Rules for Loops" I found this
<apeiros> `loop do …end` is to loop forever (and my CS prof would say that no such thing exists, that you failed to phrase the exit condition properly)
jibi has quit [Quit: .]
buibex has joined #ruby
bpgoldsb has joined #ruby
<Ferr> I see but what I would like to know why the author prefers for-loop to while-loop
nbrosnahan has joined #ruby
<apeiros> ferr: that's not written in what you pasted
<apeiros> for-loop isn't even mentioned. did you leave out the relevant part?
Xeago has joined #ruby
<Ferr> sec
vlad_starkov has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
<bpgoldsb> I want to temporarily update my logger formatter with a prefix. My current idea is to save the original formatter, change the formatter, then reset to the original. How would I get the current formatter to save it? Or does someone else have a better idea?
<apeiros> ferr: not inferable from that piece.
<apeiros> generally `for` loops are frowned upon in ruby
antix_ has quit [Ping timeout: 245 seconds]
dangerousdave has joined #ruby
<canton7> (we prefer #each, for some very good reasons)
<apeiros> and `while` loops are a rare sight (IMO less rare in idiomatic ruby than for-loops)
KobraKao has joined #ruby
<apeiros> I only have one good reason, but that one good reason is good enough to me :)
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
Mathieu has quit []
<apeiros> the reason being: `for` is syntax, which is not very discoverable and not very flexible. `each` is a method, which is discoverable and flexible.
<apeiros> (ok, 2 reasons)
<canton7> I'd use `while` when I'm not iterating over a fixed-length collection, e.g. `while stack.count > 0`
dhruvasagar has quit [Read error: Connection reset by peer]
<apeiros> yeah, or until input.empty?
<apeiros> (until is while !())
<canton7> yeah, I was trying to keep with the `while` theme
<apeiros> I think I actually use until more often than while
<Ferr> Ok
<Ferr> I think I'll get it over the practise
<Ferr> Thank you for your answers
<apeiros> probably
<apeiros> odd, I thought zed wrote idiomatic ruby
renanoronfle has joined #ruby
dhruvasagar has joined #ruby
<apeiros> (zed being the author of lrthw)
leonidlm has quit [Ping timeout: 240 seconds]
<canton7> `for` doesn't introduce a new scope, instead it mutates the loop variable. very bad when you're capturing the loop variable in a lambda or somethign
<Hanmac> apeiros for does work with other stuff too : P
<Hanmac> >> for i in 4.times; p i; end
<eval-in> Hanmac => 0 ... (https://eval.in/52224)
kevinfagan has quit [Read error: Operation timed out]
vadviktor_ has quit [Read error: Operation timed out]
vadviktor has quit [Read error: Operation timed out]
<apeiros> Hanmac: that's not the point I meant with "flexible"
<Hanmac> i know i only want to show it ;P
<apeiros> I'm fully aware that for can use .each and .succ
<apeiros> the one advantage for has over each is performance
havenwood has joined #ruby
artmann has quit [Quit: No Ping reply in 180 seconds.]
artmann_ has joined #ruby
vadviktor has joined #ruby
vadviktor_ has joined #ruby
antix_ has quit [Ping timeout: 248 seconds]
Mrdarknezz has left #ruby [#ruby]
freerobby has joined #ruby
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
huoxito has joined #ruby
varfoo has quit [Ping timeout: 260 seconds]
Elhu has quit [Quit: Computer has gone to sleep.]
kevinfagan has joined #ruby
havenwood has quit [Ping timeout: 256 seconds]
sectionme has joined #ruby
freerobby has quit [Ping timeout: 252 seconds]
sandelius has quit [Quit: Computer has gone to sleep.]
puppeh has joined #ruby
antix_ has quit [Ping timeout: 240 seconds]
jprovazn has joined #ruby
snovak has joined #ruby
_maes_ has joined #ruby
antix_ has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
jkamenik has joined #ruby
gja has quit [Ping timeout: 256 seconds]
Ferr has quit [Ping timeout: 245 seconds]
snovak has quit [Ping timeout: 240 seconds]
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
_maes_ has joined #ruby
leonidlm has joined #ruby
krz has quit [Quit: krz]
EspenA has joined #ruby
antix_ has quit [Ping timeout: 260 seconds]
sjltaylor has joined #ruby
<EspenA> running rubygems v2.1.2. trying to update but says it is latest version. Trying to install any gem: SSL certificate verify failed. Any ideas?
antix_ has joined #ruby
puppeh has left #ruby ["bb"]
nouitfvf has joined #ruby
Elhu has joined #ruby
obs has quit [Quit: Bye]
yalue has joined #ruby
mlpinit_ has joined #ruby
obs has joined #ruby
funburn has quit [Quit: funburn]
KobraKao has quit [Quit: Saindo]
antix_ has quit [Ping timeout: 240 seconds]
blackratdog has joined #ruby
eka has joined #ruby
leonidlm has quit [Read error: Operation timed out]
zoee has quit [Quit: zoee]
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
nfk has joined #ruby
nfk has quit [Changing host]
nfk has joined #ruby
mlpinit has quit [Ping timeout: 240 seconds]
ahawkins_ has quit [Quit: leaving]
ahawkins has joined #ruby
roadt_ has joined #ruby
sandelius has joined #ruby
fijimunkii has joined #ruby
IceyEC has joined #ruby
antix_ has quit [Ping timeout: 240 seconds]
ewnd9 has quit [Read error: Operation timed out]
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
freerobby has joined #ruby
fijimunkii has quit [Ping timeout: 241 seconds]
dbRenaud has quit [Changing host]
dbRenaud has joined #ruby
Matriks has quit [Remote host closed the connection]
Guest64968 has quit [Ping timeout: 264 seconds]
nfk has quit [Remote host closed the connection]
zoee has joined #ruby
it_tard has joined #ruby
sectionme has quit [Ping timeout: 240 seconds]
<TwinkleHood> Hey having trouble with threads. https://gist.github.com/kholbekj/9d902ac7a94b1a5a29fb My methods doesn't seem able to access the 'client' variable, but if i make it instance, I'm affraid it'll thread-collide.
sectionme has joined #ruby
freerobby has quit [Ping timeout: 248 seconds]
blastDAbLast has quit [Quit: Leaving]
framling_ is now known as framling
antix_ has quit [Ping timeout: 240 seconds]
levin has joined #ruby
levin is now known as Guest47789
dhruvasagar has quit [Ping timeout: 240 seconds]
ldnunes has joined #ruby
EspenA has quit [Remote host closed the connection]
renanoronfle_ has joined #ruby
axsuul has quit [Ping timeout: 260 seconds]
renanoronfle has quit [Ping timeout: 260 seconds]
antix has joined #ruby
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
antix is now known as Guest1256
Macaveli has quit [Read error: Connection reset by peer]
leonidlm has joined #ruby
braoru has joined #ruby
_maes_ has joined #ruby
WillAmes has quit [Remote host closed the connection]
WillAmes has joined #ruby
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
breakingthings has joined #ruby
Macaveli has joined #ruby
fixl has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
it_tard has quit [Ping timeout: 260 seconds]
nutella has joined #ruby
Guest1256 has quit [Ping timeout: 256 seconds]
nutella is now known as Guest65970
antix_ has joined #ruby
Macaveli_ has joined #ruby
Macaveli has quit [Ping timeout: 240 seconds]
julweber has quit [Remote host closed the connection]
mark_locklear has joined #ruby
leonidlm has quit [Ping timeout: 252 seconds]
tonni has quit [Read error: Connection reset by peer]
vpretzel has quit [Remote host closed the connection]
vpretzel has joined #ruby
antix_ has quit [Ping timeout: 252 seconds]
drumsrgr8forn8 has joined #ruby
blackratdog has quit [Quit: This computer has gone to sleep]
tjsousa has quit [Remote host closed the connection]
antix_ has joined #ruby
workmad3 has joined #ruby
burlyscudd has joined #ruby
dr_bob has joined #ruby
mikecmpbll has joined #ruby
burlyscudd has quit [Client Quit]
nanoxd has joined #ruby
burlyscudd has joined #ruby
sandelius has quit [Quit: Computer has gone to sleep.]
antix_ has quit [Ping timeout: 264 seconds]
mlpinit_ has quit [Remote host closed the connection]
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
msuszczy has quit [Quit: Lost terminal]
mary5030 has quit [Remote host closed the connection]
blackratdog has joined #ruby
mlpinit has joined #ruby
lfox has joined #ruby
rainbyte16 has joined #ruby
havenwood has joined #ruby
yfeldblum has quit [Ping timeout: 248 seconds]
schaerli has quit [Remote host closed the connection]
JeanMertz has joined #ruby
freerobby has joined #ruby
leonidlm has joined #ruby
julweber has joined #ruby
antix_ has quit [Ping timeout: 248 seconds]
ArchBeOS has quit [Quit: Peace Out, jerks!]
havenwood has quit [Ping timeout: 246 seconds]
Sander^work has joined #ruby
antix_ has joined #ruby
julweber has quit [Remote host closed the connection]
r0bgl33s0n has joined #ruby
Ferr has joined #ruby
vince_prignano has quit [Remote host closed the connection]
julweber has joined #ruby
pellenation has joined #ruby
headius has joined #ruby
jprovazn has quit [Quit: Leaving]
schaerli has joined #ruby
freerobby has quit [Ping timeout: 260 seconds]
Xeago has quit [Remote host closed the connection]
RORgasm has joined #ruby
snovak has joined #ruby
freerobby has joined #ruby
antix_ has quit [Ping timeout: 256 seconds]
kaldrenon has joined #ruby
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
pellenation has quit [Quit: Leaving.]
snovak has quit [Ping timeout: 260 seconds]
leonidlm has quit [Ping timeout: 240 seconds]
antix_ has quit [Ping timeout: 248 seconds]
DrCode has quit [Remote host closed the connection]
sailias has joined #ruby
tonni has joined #ruby
<jokke> i need to read and write files in $SAFE = 1. How can i achieve this?
<jokke> can i define some directory that is safe?
antix_ has joined #ruby
antix_ has joined #ruby
antix_ has quit [Changing host]
<dr_bob> Usually you create a separate thread to do the reading and set $SAFE there.
ewnd9 has joined #ruby
tomzx_mac has joined #ruby
mklappstuhl has joined #ruby
fijimunkii has joined #ruby
DrCode has joined #ruby
<jokke> tried to downgrade safe level from 1 to 0 (SecurityError)
<jokke> dr_bob: can you give me an example?
mlpinit has quit [Remote host closed the connection]
antix_ has quit [Ping timeout: 252 seconds]
arturas_ has joined #ruby
angusiguess has joined #ruby
sergicles has joined #ruby
fuhgeddaboudit has quit [Ping timeout: 245 seconds]
julweber has quit [Remote host closed the connection]
arturaz has quit [Ping timeout: 246 seconds]
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
xk_id has joined #ruby
BizarreCake has joined #ruby
svector has joined #ruby
<dr_bob> data = Thread.new { init...; $SAFE = 1; read file }.value
<dr_bob> The error you are seeing is the reason for the thread.
mayday_jay has joined #ruby
<jokke> what is init...
<dr_bob> Anything you need.
<jokke> ok
<jokke> hm
<jokke> but $SAFE is already set to 1
xk_id has quit [Client Quit]
<dr_bob> Then I probably do not understand your problem.
mklappstuhl has quit [Remote host closed the connection]
jprovazn has joined #ruby
<Hanmac> dr_bob: his global $SAFE is to high
<jokke> yup
<jokke> because it's drb code
<jokke> or rather code run in drb
Beoran_ has joined #ruby
<jokke> that'd be quite a drawback if one couldn't read files in drb...
antix_ has quit [Ping timeout: 240 seconds]
soba has quit [Ping timeout: 260 seconds]
<Ferr> who could advise me how to could comfortable in general? I am making a game similar to this https://gist.github.com/anonymous/6809544 but with lots of rooms and other options
<Ferr> *code
krawchyk has joined #ruby
mlpinit has joined #ruby
leonidlm has joined #ruby
sandelius has joined #ruby
antix has joined #ruby
antix is now known as Guest77147
Beoran__ has quit [Ping timeout: 248 seconds]
Squarepy has joined #ruby
Targen_ has quit [Ping timeout: 240 seconds]
Zeeraw has joined #ruby
tkuchiki has quit [Remote host closed the connection]
sjltaylor has quit [Ping timeout: 240 seconds]
Guest77147 has quit [Ping timeout: 245 seconds]
larissa has joined #ruby
tkuchiki has joined #ruby
polaco_zZz is now known as polaco
mklappstuhl has joined #ruby
<Hanmac> ferr: you can make Action Objects with procs for the with the code ... that would be like bear_room = Room.new(:bear); bear_room.add_action("taunt bear") {|r| r.bear_moved? ? ... : ... }
antix_ has joined #ruby
antix_ has joined #ruby
xk_id has joined #ruby
Guest65970 has quit [Ping timeout: 240 seconds]
T_T has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
pushpak has joined #ruby
bean__ has joined #ruby
elplatt has joined #ruby
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
michael_mbp is now known as zz_michael_mbp
|Frederik has joined #ruby
<Ferr> Hanmac, what should I google for the official documentation of action objects?
<Hanmac> ferr: there no one ... that was a silly sample ... oyu need to make it your self (with storing the procs )
yfeldblum has joined #ruby
<Ferr> lol
<Ferr> thank you anyways
<|Frederik> I'm getting this syntax error in an erb file: https://paste.debian.net/49474/ Any suggestion about what could be wrong?
tkuchiki has quit [Remote host closed the connection]
antix_ has quit [Ping timeout: 240 seconds]
snovak has joined #ruby
T_T has quit [Remote host closed the connection]
nari has joined #ruby
shaunbaker has quit [Remote host closed the connection]
wmoxam has joined #ruby
<bean__> |Frederik: i'd probably have to see the whole erb file to know
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
jerius has joined #ruby
mfilipe has left #ruby [#ruby]
peregrine81 has joined #ruby
MisutoWolf has joined #ruby
pellenation has joined #ruby
khushildep_ has joined #ruby
theRoUS has joined #ruby
MrThePlague has joined #ruby
MrThePlague has quit [Changing host]
MrThePlague has joined #ruby
leonidlm has quit [Ping timeout: 240 seconds]
khushildep has quit [Read error: Operation timed out]
khushildep_ is now known as khushildep
Lorn_ is now known as Lorn
Lorn has quit [Changing host]
Lorn has joined #ruby
<|Frederik> bean__: I think I found it. I needed escaping some <% in that file.
<bean__> ah
* bean__ likes chef better anyways ;)
zoee has quit [Quit: zoee]
<MisutoWolf> Hello! I have a bit of a question I'm trying to work out. I'm pretty new to ruby, and I'm attempting to screw around with sockets and stuff.
xk_id has quit [Quit:
niklasb has joined #ruby
<MisutoWolf> Anyway, I'm working with the Source Engine (HL2, CS, etc.) protocol, and I'm trying to figure out how to get the last 4 bytes of the response that getchallenge() gives me
antix_ has quit [Ping timeout: 252 seconds]
<MisutoWolf> When I run my little test script, the response I get is something like this: Challenge Response: ["ffffffff4195e1dc0d"]
<MisutoWolf> And I don't really know how to get at the end of the response, since it seems to not be so much a string as something in an Array
vishal has joined #ruby
antix_ has joined #ruby
jbpros has joined #ruby
<MisutoWolf> All I need from that response is "95e1dc0d".
<tobiasvl> so the response you pasted above is output where in that test script exactly?
<tobiasvl> is that string the contents of @response ?
<tobiasvl> that is, the entire string, 'Challenge Response: ["ffffffff4195e1dc0d"]'
jb41 has joined #ruby
<MisutoWolf> The test script i used is here: yeah
<MisutoWolf> woops, mistyped
ewnd9 has quit [Read error: Connection reset by peer]
g0bl1n has joined #ruby
kindjal has joined #ruby
<MisutoWolf> @response is ["fff...."]
kevinykchan has quit [Quit: Computer has gone to sleep.]
<tobiasvl> okay, good
<tobiasvl> that makes a bit more sense
<MisutoWolf> yeah
trollface has quit [Ping timeout: 245 seconds]
havenwood has joined #ruby
Zeeraw has quit [Quit: Computer has gone to sleep.]
freezey has joined #ruby
ewnd9 has joined #ruby
<tobiasvl> to understand what you're looking at here, the key is the unpack method
<tobiasvl> becuase @response is set to the return value of unpack
nutella has joined #ruby
tjad_ has joined #ruby
<tobiasvl> so yeah, it's an array with a string in it
nutella is now known as Guest9873
tjad has quit [Ping timeout: 240 seconds]
<MisutoWolf> ah
kevinykchan has joined #ruby
khushildep has quit [Quit: khushildep]
<MisutoWolf> so it returns an array with just the string...if I want to manipulate the string, i'd need to deal with like
freezey has quit [Remote host closed the connection]
<MisutoWolf> unpack(stuff)[0]?
codecop has quit [Remote host closed the connection]
bean__ has quit [Ping timeout: 240 seconds]
<tobiasvl> that gived you the entire string, yeah
elplatt has quit [Quit: elplatt]
<tobiasvl> but if you just want the last four bytes you can tell that to unpack
antix_ has quit [Ping timeout: 264 seconds]
bean__ has joined #ruby
<tobiasvl> (i think)
bean__ has quit [Client Quit]
<tobiasvl> but yeah, you can probably do what you said, and then just index the string
khushildep has joined #ruby
xk_id has joined #ruby
<MisutoWolf> awesome. This is really my first experience with the language, I'm sure I'll figure out this stuff over time. I have to say, I love it so far. It's pretty neat. :D
alyi has joined #ruby
antix_ has joined #ruby
alyi has quit [Remote host closed the connection]
havenwood has quit [Ping timeout: 240 seconds]
freezey has joined #ruby
<banisterfiend> waxjar happy leiden day
joofsh has joined #ruby
<banisterfiend> (what's this day called btw?0
<waxjar> most people just call it 3 oktober
<tobiasvl> MisutoWolf:
<tobiasvl> >> "ffffffff4195e1dc0d"[-8..-1]
<eval-in> tobiasvl => "95e1dc0d" (https://eval.in/52338)
sambao21 has joined #ruby
<waxjar> did you get to sleep yesterday banisterfiend ? :p
schaerli has quit [Remote host closed the connection]
chorn has joined #ruby
<MisutoWolf> :D
<chorn> wow there's a lot of people here
schaerli has joined #ruby
burlyscudd has quit [Quit: Leaving.]
<banisterfiend> waxjar not until 5am :)
dhruvasagar has joined #ruby
<banisterfiend> waxjar u doing anything big 2nite?
<chorn> so is there a bad thing that happened in the ruby community that reasonable people are unhappy about?
<waxjar> lol. damn.
noname001__ has joined #ruby
<waxjar> nah, i went to a party yesterday. gonna make it early tonight
<chorn> I missed some important part of the tweets
khushildep_ has joined #ruby
noname001__ is now known as noname001
schaerli has quit [Remote host closed the connection]
<banisterfiend> waxjar is tonight bigger than last night?
zz_michael_mbp is now known as michael_mbp
freerobby has quit [Quit: Leaving.]
khushildep has quit [Ping timeout: 256 seconds]
khushildep_ is now known as khushildep
<waxjar> nah, most people have a day off today, so they go out on the 2nd
antix_ has quit [Ping timeout: 260 seconds]
bean__ has joined #ruby
shaunbaker has joined #ruby
leonidlm has joined #ruby
coderhs has quit [Ping timeout: 260 seconds]
kindjal has quit [Quit: Computer has gone to sleep.]
antix_ has joined #ruby
schaerli has joined #ruby
shaunbak_ has joined #ruby
tomzx_mac has quit [Ping timeout: 240 seconds]
carraroj has joined #ruby
fuhgeddaboudit has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
interactionjaxsn has joined #ruby
shaunbaker has quit [Ping timeout: 248 seconds]
Rollabunna has quit [Remote host closed the connection]
maligree has joined #ruby
BlakeRG has joined #ruby
antix_ has quit [Ping timeout: 264 seconds]
Hganavak has quit [Read error: Connection reset by peer]
<Ferr> which method do I use to run the function itself? self.method_name
<BlakeRG> would it be fair to say that someone could be well versed in rails but not know ruby very well?
maroloccio has quit [Quit: WeeChat 0.4.0]
<krawchyk> BlakeRG: i am
<krawchyk> BlakeRG: i prefer js, i dont spend enough time with ruby
carraroj has quit [Client Quit]
<chorn> BlakeRG, I felt like I was complete rubbish at rails until I could write ruby that looked like ruby to me.
ehc has joined #ruby
<chorn> which technically means I could still be rubbish.
iamjarvo has joined #ruby
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
leonidlm has quit [Ping timeout: 264 seconds]
iamjarvo has quit [Remote host closed the connection]
kindjal has joined #ruby
iamjarvo has joined #ruby
pellenation has quit [Quit: Leaving.]
jlast has joined #ruby
aagdbl has quit [Quit: Leaving.]
burlyscudd has joined #ruby
xk_id has quit [Quit:
antix_ has quit [Ping timeout: 240 seconds]
thetristan has joined #ruby
jbynum has joined #ruby
renanoronfle_ has quit [Quit: This computer has gone to sleep]
<MisutoWolf> This ended up working, too.
lukec has joined #ruby
freerobby has joined #ruby
antix_ has joined #ruby
pef has joined #ruby
pef has quit [Client Quit]
marcgg has joined #ruby
Mathieu has joined #ruby
kvirani has joined #ruby
renanoronfle has joined #ruby
mklappst_ has joined #ruby
mklappstuhl has quit [Ping timeout: 248 seconds]
funburn has joined #ruby
funburn has quit [Client Quit]
xcv has quit [Remote host closed the connection]
Targen has joined #ruby
maroloccio has joined #ruby
leonidlm has joined #ruby
v0n has joined #ruby
burlyscudd has quit [Quit: Leaving.]
svector has quit [Ping timeout: 248 seconds]
fijimunkii has quit [Quit: leaving]
fuhgeddaboudit has quit [Ping timeout: 264 seconds]
iamjarvo_ has joined #ruby
coaster has quit [Ping timeout: 248 seconds]
antix_ has quit [Ping timeout: 252 seconds]
vim_shim has joined #ruby
iamjarvo has quit [Ping timeout: 240 seconds]
sandelius has quit [Quit: Computer has gone to sleep.]
leonidlm has quit [Read error: Connection reset by peer]
duggiefresh has joined #ruby
iamjarvo_ has quit [Remote host closed the connection]
rahulkmr1 has quit [Read error: Connection reset by peer]
kpshek has joined #ruby
iamjarvo has joined #ruby
mmitchell has joined #ruby
rahulkmr has joined #ruby
rahulkmr has quit [Max SendQ exceeded]
sectionme has quit [Ping timeout: 256 seconds]
taptapdan has joined #ruby
rahulkmr has joined #ruby
jlast has quit [Remote host closed the connection]
jlast has joined #ruby
mercwithamouth has quit [Ping timeout: 252 seconds]
kevinykchan has quit [Quit: Computer has gone to sleep.]
burlyscudd has joined #ruby
antix has joined #ruby
antix has quit [Changing host]
antix has joined #ruby
antix is now known as Guest50873
b00stfr3ak has joined #ruby
b00stfr3ak has joined #ruby
b00stfr3ak has quit [Changing host]
quoin has quit [Remote host closed the connection]
Kar- has quit [Ping timeout: 252 seconds]
quoin has joined #ruby
dangerousdave has quit [Quit: Leaving...]
sepp2k has joined #ruby
tagrudev has quit [Remote host closed the connection]
lessless_ has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
jlast has quit [Ping timeout: 245 seconds]
cody-- has joined #ruby
sevenseacat has joined #ruby
indigo is now known as dfndigo
mklappst_ has quit [Remote host closed the connection]
quoin has quit [Ping timeout: 260 seconds]
gemmy has joined #ruby
Guest50873 has quit [Ping timeout: 245 seconds]
Alina-malina has joined #ruby
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
baordog_ has joined #ruby
mikecmpbll has joined #ruby
wyclif has quit [Ping timeout: 240 seconds]
zets has joined #ruby
failshell has joined #ruby
phantasm66 has joined #ruby
phantasm66 has joined #ruby
phantasm66 has quit [Changing host]
zz_scottstamp is now known as scottstamp
kilophoton has joined #ruby
antix_ has joined #ruby
xibalba has left #ruby ["Leaving"]
mansi has joined #ruby
shaunbak_ has quit [Remote host closed the connection]
leonidlm has joined #ruby
ahawkins has quit [Quit: leaving]
lkba has quit [Ping timeout: 256 seconds]
dodosan has joined #ruby
havenwood has joined #ruby
krawchyk_ has joined #ruby
Deele has quit [Ping timeout: 260 seconds]
freerobby has quit [Quit: Leaving.]
ukd1 has joined #ruby
mary5030 has joined #ruby
dangerousdave has joined #ruby
antix_ has quit [Ping timeout: 246 seconds]
freerobby has joined #ruby
rhys_ has joined #ruby
dfndigo is now known as indigo
dodosan has quit [Remote host closed the connection]
<TwinkleHood> Hey having trouble with threads. https://gist.github.com/kholbekj/9d902ac7a94b1a5a29fb My methods doesn't seem able to access the 'client' variable, but if i make it instance, I'm affraid it'll thread-collide.
antix_ has joined #ruby
<TwinkleHood> Using Thread.current["client"] from the method definition doesn't seem to work either.
krawchyk has quit [Ping timeout: 246 seconds]
jlast has joined #ruby
xcv has joined #ruby
sandelius has joined #ruby
ce_afk is now known as cescalante
sandelius has quit [Client Quit]
zets has quit []
<Hanmac> apeiros & shevy what do you guys think about this? http://bugs.ruby-lang.org/issues/8976 file scope directive: "# freeze_string: true"
mgorbach has quit [Read error: Connection reset by peer]
ananthakumaran has joined #ruby
kadoo has joined #ruby
shaunbaker has joined #ruby
leonidlm has quit [Ping timeout: 264 seconds]
Aryasam has joined #ruby
antix_ has quit [Ping timeout: 246 seconds]
leehambley has quit [Ping timeout: 260 seconds]
Cyrus has quit [Quit: Cyrus.sleep()]
<shevy> dunno, I am biased
<shevy> I hate frozen things
<shevy> but
antix_ has joined #ruby
<shevy> I don't mind additional information in a .rb file put behind a # comment
shaunbaker has quit [Remote host closed the connection]
ayaz has quit [Quit: Textual IRC Client: www.textualapp.com]
mgorbach has joined #ruby
krz has joined #ruby
dhamidi has joined #ruby
<shevy> I think what ruby really needs is a dedicated team improving its documentation
brennanMKE has joined #ruby
enebo has joined #ruby
Aryasam has quit [Ping timeout: 251 seconds]
leehambley has joined #ruby
<shevy> BlakeRG I think you could actually get away learning only a subset of ruby
<shevy> BlakeRG but it's very much a niche to confine ruby solely to the www
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
antix_ has quit [Ping timeout: 241 seconds]
shaunbaker has joined #ruby
shaunbaker has quit [Remote host closed the connection]
coaster has joined #ruby
<BlakeRG> shevy: i guess it's possible, there are a ton of wordpress and drupal people in PHP land who don't know the language well but get away with a lot of things
scarolan has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
<shevy> I think ruby is more complex than php as a language though
<shevy> so the gap may be wider
antix_ has joined #ruby
<shevy> like ask a newcomer to rails, what is yield, what is lambda, when should he use a module, when a class, how can he mixin class methods from modules into classes, how to use hook events, how to use respond_to? and method_missing, what is caller() etc...
<shevy> php tried to simplify things
maletor has joined #ruby
<shevy> function FOO()
khoury has joined #ruby
<shevy> one data structure array for hashes and arrays
GeissT has quit [Quit: MillBroChat AdIRC User]
julweber has joined #ruby
hogeo has quit [Remote host closed the connection]
<burlyscudd> PHP is a language like scrapple is a meat
<bean__> I recently saw a talk from a guy at facebook called "Taking PHP Seriously"
<bean__> its pretty neat to see what FB is doing with php
hogeo has joined #ruby
ffranz2 has joined #ruby
nbrosnahan has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
scarolan_ has quit [Ping timeout: 268 seconds]
kpshek has quit []
<shevy> quote: " I don't see the point, especially for something like PHP where most of the scripts will be rather simple and in most cases written by non-programmers who want a language with a basic logical syntax that doesn't have too high a learning curve."
<shevy> so at least someone has had the idea that the language should be simple
codezomb has joined #ruby
<shevy> somehow, something failed someday ... :\
khoury has left #ruby [#ruby]
nfk has joined #ruby
nfk has quit [Changing host]
nfk has joined #ruby
<shevy> burlyscudd hopefully I will never accidentally eat scrapple
<workmad3> shevy: personally, I think that PHP went too simple
buibex has quit [Ping timeout: 240 seconds]
<workmad3> shevy: it also went pretty ugly, but that's a side-issue :)
<bean__> $FB has "hack lang" and "hip hop vm" that does a lot of awesome stuff w/r/t type checking in php now
<bean__> its pretty cool
seich- has quit [Ping timeout: 260 seconds]
<waxjar> if they went for simple the std lib wouldn't be such a mess :P
sambao21 has quit [Quit: Computer has gone to sleep.]
antix_ has quit [Ping timeout: 246 seconds]
tatsuya__ has joined #ruby
<workmad3> waxjar: don't confuse 'simple' with 'easy to use' ;)
leonidlm has joined #ruby
Aryasam has joined #ruby
hogeo has quit [Ping timeout: 252 seconds]
io_syl has joined #ruby
kpshek has joined #ruby
gemmy has quit [Ping timeout: 240 seconds]
Aryasam has quit [Read error: Connection reset by peer]
Aryasam has joined #ruby
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
Rollabunna has joined #ruby
Matriks has joined #ruby
lkba has joined #ruby
ananthakumaran1 has joined #ruby
ananthakumaran1 has quit [Max SendQ exceeded]
geggam has joined #ruby
ananthakumaran1 has joined #ruby
ananthakumaran1 has quit [Max SendQ exceeded]
tatsuya_o has quit [Ping timeout: 245 seconds]
ananthakumaran1 has joined #ruby
ananthakumaran1 has quit [Max SendQ exceeded]
ukd1 has quit [Remote host closed the connection]
ananthakumaran1 has joined #ruby
ukd1 has joined #ruby
ananthakumaran has quit [Ping timeout: 240 seconds]
robert___ has joined #ruby
robert___ has quit [Changing host]
robert___ has joined #ruby
tkuchiki has joined #ruby
julweber has quit [Remote host closed the connection]
plotter has quit [Remote host closed the connection]
joesavage has joined #ruby
robert_ has quit [Ping timeout: 260 seconds]
nisstyre has quit [Quit: Leaving]
<joesavage> If I use "File.open" to create a new file on my server in Ruby with user X, what permissions will the new file have? (And presumably the owner of that file will be the user running the ruby script?)
<heftig> depends on the umask
ravster has joined #ruby
gcds has quit [Quit: gcds]
ukd1 has quit [Ping timeout: 240 seconds]
rdark has quit [Ping timeout: 240 seconds]
antix_ has quit [Ping timeout: 264 seconds]
dhruvasagar has quit [Ping timeout: 264 seconds]
burlyscudd has quit [Quit: Leaving.]
intuxicated has quit [Remote host closed the connection]
kaspergrubbe has quit [Read error: Connection reset by peer]
<heftig> by default File.open uses 0666, and a typical umask would be 0022; so the permissions would be 0666 & ~0022 = 0644
leonidlm has quit [Ping timeout: 248 seconds]
antix_ has joined #ruby
ffranz2 is now known as ffranz
barts_ has joined #ruby
Jetchisel has quit [Quit: Unfortunately time is always against us -- *Morpheus*]
kaspergrubbe has joined #ruby
rdark has joined #ruby
plotter has joined #ruby
ukd1 has joined #ruby
wallerdev has joined #ruby
robert___ is now known as robert_
<krz> what does it mean when one gets: (Object doesn't support #inspect)
maletor has quit [Quit: Computer has gone to sleep.]
nari has quit [Ping timeout: 248 seconds]
<krz> its self explanatory. but why is it happening?
bluOxigen has joined #ruby
barts_ has quit [Client Quit]
christian has joined #ruby
<workmad3> krz: did you inherit from BasicObject for something?
christian is now known as Guest22083
<Guest22083> I don't understand inhertance in Ruby in terms of class variables: https://gist.github.com/trinibago/6811508
pel_daniel has joined #ruby
<krz> workmad3: no, but i can put a quick gist up
<krz> its actually kind of strange
<workmad3> Guest22083: there's only one copy of a class var within the entire hierarchy
antix_ has quit [Ping timeout: 246 seconds]
noop has quit [Ping timeout: 240 seconds]
<workmad3> (unless you're careful in order of definition... at which point things annoying, fiddly and even more confusing :) )
joesavage has quit [Quit: joesavage]
JeanMertz has quit [Ping timeout: 264 seconds]
drumsrgr8forn8 has quit [Ping timeout: 240 seconds]
<Hanmac> Guest22083: you want "class instance variables"
ananthakumaran1 has quit [Read error: No route to host]
<apeiros> krz: maybe your #inspect raises
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
<apeiros> or does not return a string
Aryasam has quit [Ping timeout: 240 seconds]
ananthakumaran has joined #ruby
SHyx0rmZ has joined #ruby
mklappstuhl has joined #ruby
jprovazn has quit [Quit: Leaving]
Aryasam has joined #ruby
antix has joined #ruby
antix is now known as Guest43556
buibex has joined #ruby
kindjal has quit [Quit: Computer has gone to sleep.]
Aryasam has quit [Read error: Connection reset by peer]
julweber has joined #ruby
Aryasam has joined #ruby
julweber has quit [Remote host closed the connection]
vince_prignano has joined #ruby
<krz> workmad3: apeiros https://gist.github.com/6811634
pwh has joined #ruby
siwica has quit [Ping timeout: 260 seconds]
burlyscudd has joined #ruby
<krz> run User.new and you get (Object doesn't support #inspect)
<apeiros> gah! PEOPLE STAAAAHP!
<apeiros> don't abuse self.included.
<apeiros> srsly
Soda has quit [Read error: Connection reset by peer]
<krz> apeiros: whats the alternative? active concern?
Aryasam has quit [Read error: Connection reset by peer]
<apeiros> proper ruby
Aryasam has joined #ruby
<apeiros> you don't have to use callback magic. just be explicit.
mklappstuhl has quit [Ping timeout: 245 seconds]
BlakeRG has left #ruby [#ruby]
<apeiros> just pretend self.included wouldn't exist.
havenwood has quit [Remote host closed the connection]
alex__c2022 has joined #ruby
lfox has quit [Quit: ZZZzzz…]
BSaboia has joined #ruby
ADot has joined #ruby
ADot has quit [Max SendQ exceeded]
<krz> apeiros: how would you extend a module from within a module without self.included?
havenwood has joined #ruby
ADot has joined #ruby
ukd1 has quit [Remote host closed the connection]
ADot has quit [Max SendQ exceeded]
Guest43556 has quit [Ping timeout: 264 seconds]
ADot has joined #ruby
ADot has quit [Max SendQ exceeded]
ukd1 has joined #ruby
<apeiros> krz: why do you think you need self.included just to do extend?
ADot has joined #ruby
ADot has quit [Max SendQ exceeded]
threesome has quit [Ping timeout: 240 seconds]
admin0 has quit [Read error: Connection reset by peer]
leonidlm has joined #ruby
ADot has joined #ruby
ADot has quit [Max SendQ exceeded]
<krz> apeiros: because im ignorant and out of alternatives :P
clov3r has joined #ruby
antix_ has joined #ruby
ADot has joined #ruby
maligree has quit [Quit: I've had it with you.]
antix_ has quit [Changing host]
antix_ has joined #ruby
ADot has quit [Max SendQ exceeded]
Macaveli_ has quit [Quit: Computer has gone to sleep.]
<apeiros> krz: how about just calling extend?
hanoi has quit [Ping timeout: 241 seconds]
ADot has joined #ruby
ADot has quit [Max SendQ exceeded]
user258467 has quit [Quit: Quitte]
hanoi has joined #ruby
<apeiros> and if you really want to hold the users's hand because he can't be arsed to do an include and and extend himself, provide a method.
mrsolo has joined #ruby
siwica has joined #ruby
ADot has joined #ruby
ADot has quit [Max SendQ exceeded]
<apeiros> -spelink mistaakes
himsin has joined #ruby
ADot has joined #ruby
platzhirsch has joined #ruby
ADot has quit [Max SendQ exceeded]
ADot has joined #ruby
ADot has quit [Max SendQ exceeded]
<krz> k, ill try that after i fix the issuw with the inspect
mklappstuhl has joined #ruby
<krz> any ideas?
ADot has joined #ruby
havenwood has quit [Ping timeout: 245 seconds]
ADot has quit [Max SendQ exceeded]
obs has quit [Quit: Bye]
<platzhirsch> Importing a 3 GB JSON file to MongoDB sucks, allocates 12 GB virtual memory and then the process gets killed. Even with streamed JSON processing.. not feasible *sigh*
krawchyk_ has quit [Remote host closed the connection]
ADot has joined #ruby
obs has joined #ruby
krawchyk has joined #ruby
baroquebobcat has joined #ruby
persand has quit [Quit: persand]
antix_ has quit [Ping timeout: 240 seconds]
Kar- has joined #ruby
intuxicated has joined #ruby
zz_tsykoduk is now known as tsykoduk
mengu has quit [Remote host closed the connection]
kadoo has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nemesit|znc has quit [Ping timeout: 264 seconds]
nemesit|znc has joined #ruby
badquanta has joined #ruby
siwica has quit [Ping timeout: 264 seconds]
quoin has joined #ruby
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sectionme has joined #ruby
MisutoWolf has quit [Quit: Leaving]
Coffers has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mansi has quit [Remote host closed the connection]
mansi has joined #ruby
rhys_ has quit [Ping timeout: 252 seconds]
Lewix has joined #ruby
siwica has joined #ruby
arturas_ has quit [Ping timeout: 252 seconds]
rdark has quit [Ping timeout: 248 seconds]
antix_ has joined #ruby
rhys_ has joined #ruby
rdark has joined #ruby
quoin has quit [Ping timeout: 256 seconds]
<platzhirsch> Does it still make sense to invoke GC manually?
burlyscudd has quit [Quit: Leaving.]
aganov has quit [Remote host closed the connection]
jbpros has quit [Quit: jbpros]
mansi has quit [Ping timeout: 260 seconds]
niklasb has quit [Ping timeout: 260 seconds]
jefflyne has joined #ruby
whunt has joined #ruby
tsykoduk is now known as zz_tsykoduk
jefflyne has quit [Quit: WeeChat 0.4.1]
jefflyne has joined #ruby
vince_prignano has quit [Remote host closed the connection]
<Guest22083> workmad3, Hanmac thank you guys! read an article about class instance variables and got. :)
iamjarvo has quit [Remote host closed the connection]
siwica has quit [Ping timeout: 264 seconds]
tjad_ has quit [Ping timeout: 240 seconds]
sambao21 has joined #ruby
chorn has left #ruby ["."]
iamjarvo has joined #ruby
antix_ has quit [Ping timeout: 252 seconds]
vince_prignano has joined #ruby
TMM has quit [Quit: Ex-Chat]
mansi has joined #ruby
nbrosnahan has joined #ruby
Aryasam has quit [Read error: Connection reset by peer]
Aryasam has joined #ruby
siwica has joined #ruby
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
kindjal has joined #ruby
rezzack has quit [Quit: Leaving.]
alup has quit [Quit: Leaving]
iamjarvo has quit [Ping timeout: 240 seconds]
leonidlm has quit [Ping timeout: 248 seconds]
sevenseacat has quit [Quit: Leaving.]
mansi has quit [Read error: Connection reset by peer]
iamjarvo has joined #ruby
Matix has joined #ruby
<Matix> Hi
<Matix> can you think of any way to .map an array and use both the value and the keys?
mansi has joined #ruby
<Matix> ["4","5","6"].map_with_keys {|k,v| v.to_i+k} -> [4,6,8]
<Matix> for example
Zeeraw has joined #ruby
dodosan has joined #ruby
elplatt has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
antix_ has quit [Ping timeout: 260 seconds]
preller has quit [Read error: Connection reset by peer]
<Hanmac> Matix: map.with_index
kaspergrubbe has joined #ruby
antix_ has joined #ruby
antix_ has joined #ruby
antix_ has quit [Changing host]
jb41 has quit [Ping timeout: 260 seconds]
gja has joined #ruby
Valesk_ has joined #ruby
scottstamp is now known as zz_scottstamp
<workmad3> Matix: an array doesn't have keys, it only has position indexes
<Matix> I thought map was a method
siwica has quit [Ping timeout: 264 seconds]
<Matix> I mean, it is, but it returns an enumerator
<Matix> cool
sarkie_ has joined #ruby
sarkie_ has quit [Changing host]
sarkie_ has joined #ruby
dodosan has quit [Ping timeout: 245 seconds]
Aryasam has quit [Read error: Connection reset by peer]
kaspergrubbe has quit [Read error: Connection reset by peer]
<heftig> >> [4,5,6].map.with_index {|v,i| v.to_i+i}
<eval-in> heftig => [4, 6, 8] (https://eval.in/52349)
Aryasam has joined #ruby
zz_scottstamp is now known as scottstamp
kaspergrubbe has joined #ruby
<Matix> can you do the same with .inject? that would be great
<Matix> there doesn't seem to be a .with_index
siwica has joined #ruby
sarkie has quit [Ping timeout: 248 seconds]
<workmad3> >> [4,5,6].each.with_index.inject(0){|sum,(v,i)| sum += v + i}
<eval-in> workmad3 => 18 (https://eval.in/52350)
<bline79> I'm trying to remove the last two characters from a variable, but am getting " can't convert Range into Integer (TypeError)" http://pastie.org/8375153
<heftig> >> [4,5,6].each_with_index.inject("") {|s,(v,i)| [s,"#{v},#{i}"].join " "}
<eval-in> heftig => " 4,0 5,1 6,2" (https://eval.in/52351)
pwh has quit []
<heftig> er, whoops
<bean__> bline79: as in removing the last 2 chars from a string/
<bean__> or from the name of the var
<heftig> >> [4,5,6].each_with_index.inject("") {|s,(v,i)| s + " #{v},#{i}"}
<eval-in> heftig => " 4,0 5,1 6,2" (https://eval.in/52352)
<Matix> >> "01:02:03".split(":").map.with_index {|s, i| s.to_i * 60**(2-i)}.inject(:+)
<eval-in> Matix => 3723 (https://eval.in/52353)
<bline79> bean__: yes... removing the last two characters from the timestamp there
antix_ has quit [Ping timeout: 256 seconds]
<Matix> I bet there's a more sane way to do that
freezey has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
<bean__> >> my_string = "my string"; string[0..-3]
<eval-in> bean__ => undefined local variable or method `string' for main:Object (NameError) ... (https://eval.in/52354)
ssvo has joined #ruby
<b00stfr3ak> I have a question about openssl
<bean__> >> my_string = "my string"; my_string[0..-3]
<eval-in> bean__ => "my stri" (https://eval.in/52355)
<heftig> >> "01:02:03".split(":").inject(0) { |a,v| a * 60 + v.to_i }
<eval-in> heftig => 3723 (https://eval.in/52356)
<b00stfr3ak> I am trying to encrypt something but keep getting a bunch of carriage returns
antix_ has joined #ruby
antix_ has joined #ruby
antix_ has quit [Changing host]
<b00stfr3ak> I need it on one line but strip,chomp putting it into an array nothing works
<heftig> Matix: ^
<heftig> no exponentiation necessary
freezey has joined #ruby
<bean__> >> my_string = "my string"; my_string[0, my_string.length - 2]
<eval-in> bean__ => "my stri" (https://eval.in/52357)
<bean__> bline79: 2 diff ways i posted here :)
braoru has quit [Read error: Connection reset by peer]
zz_tsykoduk is now known as tsykoduk
seejohnrun has joined #ruby
schaerli has quit [Remote host closed the connection]
pellenation has joined #ruby
raar has quit [Ping timeout: 248 seconds]
schaerli has joined #ruby
3JTAAC96U has joined #ruby
IceyEC has quit [Quit: IceyEC]
havenwood has joined #ruby
<heftig> >> "43301".each_char.inject(0) { |a,v| a * 10 + (v.ord - 48) }
<eval-in> heftig => 43301 (https://eval.in/52358)
<krz> apeiros: so any ideas why this happens (Object doesn't support #inspect)
<heftig> look ma, a crappy to_i
<b00stfr3ak> it looks like each line is 60 char before it creates a new one
<b00stfr3ak> using aes-256-cfb
iamjarvo has quit [Remote host closed the connection]
DanBoy has joined #ruby
cads has quit [Read error: Operation timed out]
quoin has joined #ruby
<krz> for the record: end
Aryasam has quit [Ping timeout: 240 seconds]
nemesit|znc has quit [Ping timeout: 256 seconds]
schaerli has quit [Remote host closed the connection]
Monie has joined #ruby
iamjarvo has joined #ruby
<bline79> thank you bean__
raar has joined #ruby
<bline79> what would my_string be in this case bean__ ?
kadoo has joined #ruby
<Hanmac> heftig: if you use ord you can also use each_codepoint
<bean__> bline79: ? it's a string that contains "my string"
himsin has quit [Quit: himsin]
antix_ has quit [Ping timeout: 248 seconds]
raar is now known as Guest63811
<Matix> >> (Time.parse("01:02:03")-Time.parse('00:00:00')).to_i
<eval-in> Matix => undefined method `parse' for Time:Class (NoMethodError) ... (https://eval.in/52360)
<bline79> ok
<Matix> if you include time it works
<Hanmac> krz: line 26 ... inspect need to be a string
<Matix> :P
<Matix> >> require 'time'; (Time.parse("01:02:03")-Time.parse('00:00:00')).to_i
<eval-in> Matix => 3723 (https://eval.in/52361)
<Hanmac> >> require "date"; (Time.parse("01:02:03")-Time.parse('00:00:00')).to_i
<eval-in> Hanmac => undefined method `parse' for Time:Class (NoMethodError) ... (https://eval.in/52362)
einarj has quit [Remote host closed the connection]
kpshek has quit []
Voodoofish430 has joined #ruby
<krz> Hanmac: line 25 i presume?
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
snovak has quit [Remote host closed the connection]
peregrine81 has quit []
<Hanmac> krz L22-L27
siwica has quit [Ping timeout: 264 seconds]
filipe has quit [Read error: Connection reset by peer]
snovak has joined #ruby
<bline79> bean__: I'm still a little confused with what "my string" is in the context of my_string = "my string"; my_string[0, my_string.length - 2
zarubin has joined #ruby
<bean__> bline79: i'm not sure how you're confused… it's a string.
<Hanmac> krz: when i do: p User.new i got: " NoMethodError: undefined method `[]' for nil:NilClassfrom (irb):47:in `block in inspect'"
<bean__> its just a place holer.
sectionme has quit [Ping timeout: 252 seconds]
iamjarvo has quit [Ping timeout: 240 seconds]
pen has joined #ruby
burlyscudd has joined #ruby
<krz> Hanmac: what version of ruby?
lfox has joined #ruby
<bean__> bline79: so, its analogous to the variable holding your timestamp.
<bline79> thank you
<bline79> so I can put in the variable stamp there
<krz> if i comment line 25. the inspect outputs fine
<Hanmac> krz: hm no its other lines: h.each { |k, _| h[k] = h[k][:default] || nil } # << this line is it that raises the error
kaspergrubbe has quit [Remote host closed the connection]
<krz> its just line 25
<krz> Hanmac: yea
<krz> but why?
<heftig> b00stfr3ak: i just tested openssl, and i don't see any linebreaks
<Hanmac> 25 has an error because something is nil
kaspergrubbe has joined #ruby
<heftig> b00stfr3ak: well, at least not any regular ones. it's just all binary data
kpshek has joined #ruby
dagobah has quit [Remote host closed the connection]
<b00stfr3ak> how do you do the name thing?
<heftig> b00stfr3ak: name thing?
Coolhand is now known as help
<workmad3> b00stfr3ak: you mean 'b<tab>'?
help is now known as Guest85322
Guest85322 is now known as nharvey
T_T has joined #ruby
obs has quit [Remote host closed the connection]
<b00stfr3ak> workmad3: maybe?
io_syl has quit []
<b00stfr3ak> workmad3: if that is how it works?
snovak has quit [Ping timeout: 256 seconds]
antix_ has quit [Ping timeout: 240 seconds]
<heftig> >> require 'openssl'
<eval-in> heftig => true (https://eval.in/52364)
<Hanmac> krz: h[k] << this one is nil thats why h[k][:default] raises an error
<b00stfr3ak> heftig: I don't see any line breaks either but if you print it shows them
siwica has joined #ruby
nari has joined #ruby
duggiefresh has quit [Remote host closed the connection]
3JTAAC96U has quit [Ping timeout: 240 seconds]
duggiefresh has joined #ruby
<heftig> >> require 'openssl'; cipher = OpenSSL::Cipher.new("aes-256-cfb").encrypt; key = cipher.random_key; iv = cipher.random_iv; cipher.update("stuff to encrypt") + cipher.final
<eval-in> heftig => ":\xD9\xBD\x16\x9A\xFF\xD8\b\x98M\r\xEF\xF9oa\xCA" (https://eval.in/52365)
mklappstuhl has quit [Read error: Connection reset by peer]
<krz> Hanmac: but how can h[k] be nil. its clearly defined
quoin has quit [Ping timeout: 264 seconds]
mklappstuhl has joined #ruby
kaspergr_ has joined #ruby
antix has joined #ruby
antix has quit [Changing host]
antix has joined #ruby
kaspergrubbe has quit [Read error: Connection reset by peer]
<krz> puts h, always returns a value
<heftig> b00stfr3ak: why would you print binary data?
antix is now known as Guest6551
<b00stfr3ak> heftig: I base64 encode it also
<b00stfr3ak> it does look like that is the issue when
Guest22083 has quit [Read error: Operation timed out]
<Hanmac> krz: h is the hash, h[k] is one of them, but none of the entires in the hash is an hash too
<Hanmac> krz: thats the hash for me: {:first_name=>{}, :last_name=>{}, :age=>{}}
<Hanmac> ops wrong one
<heftig> b00stfr3ak: that's Base64, not OpenSSL
<Hanmac> this one is the one i get: {:first_name=>nil, :last_name=>nil, :age=>nil}
dhamidi has quit [Ping timeout: 256 seconds]
<heftig> b00stfr3ak: anyway, if you look at the docs you might find Base64.strict_encode
starfox21 has quit [Ping timeout: 240 seconds]
joofsh has quit [Remote host closed the connection]
<Hanmac> krz: its the problem because the instances does overwrite the class hashes ...
maletor has joined #ruby
<heftig> er, strict_encode64
<krz> Hanmac: yea thats the hash (h). h[k] would be the keys
mgorbach has quit [Read error: Connection reset by peer]
evenix_ has quit [Remote host closed the connection]
evenix has quit [Remote host closed the connection]
<Hanmac> krz: you need to understand how class variables work... in your usecase, class variables are WRONG!
brennanMKE has quit [Remote host closed the connection]
duggiefresh has quit [Ping timeout: 260 seconds]
ADot has quit [Quit: Leaving.]
<b00stfr3ak> heftig: thanks! something so simple and I couldn't figure it out.
jbynum has quit [Quit: Computer has gone to sleep.]
<krz> Hanmac: what should be used then?
<krz> if not class variables
MTen has quit [Ping timeout: 264 seconds]
RichardBaker has joined #ruby
* Hanmac spells the magic words: "class instance variables"
vince_prignano has quit [Ping timeout: 252 seconds]
Guest6551 has quit [Ping timeout: 260 seconds]
xk_id has joined #ruby
jokke has quit [Quit: WeeChat 0.4.1]
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
adeponte has quit [Remote host closed the connection]
vince_prignano has joined #ruby
jokke has joined #ruby
<krz> Hanmac: https://gist.github.com/krzkrzkrz/6811634 updated. line 26 doesnt cause any problems. i think its something in line 25
<krz> not h[k]
rippa has joined #ruby
adeponte has joined #ruby
funburn has joined #ruby
freezey has quit [Remote host closed the connection]
aspires has joined #ruby
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
jokke has quit [Remote host closed the connection]
mgorbach has joined #ruby
jokke has joined #ruby
<Hanmac> krz: works for me now, you need to restart irb
jokke1 has joined #ruby
pwh has joined #ruby
x1337807x has joined #ruby
jokke1 has quit [Client Quit]
jokke has quit [Client Quit]
<bline79> bean__: https://eval.in/52370 this doesn't work :( I get error: can't convert Range into Integer (TypeError)
ghr has quit [Quit: Computer has gone to sleep.]
jokke has joined #ruby
<krz> Hanmac: clearly the issue is with h.each { |k, _| h[k] = h[k][:type] || nil }
jokke has quit [Remote host closed the connection]
kpshek has quit []
<apeiros> krz: as said like hours ago - inspect must return a string
<apeiros> h.each will NOT return a string.
jonathanwallace has joined #ruby
himsin has joined #ruby
<apeiros> pry is nice and won't fail with a misbehaving #inspect, though
cody-- has quit [Quit: derp]
funburn has quit [Ping timeout: 245 seconds]
adeponte has quit [Ping timeout: 260 seconds]
Advocation has quit [Quit: Advocation]
pellenation has quit [Quit: Leaving.]
soheil has joined #ruby
nemesit|znc has joined #ruby
<bean__> bline79: works for me...
<apeiros> though, irb seems to only give that specific output when inspect is indeed undefined
<bean__> >> stamp = Time.now.to_i
<eval-in> bean__ => 1380818207 (https://eval.in/52371)
<Hanmac> apeiros: the problem is not direct inspect ... but irb does not show the error message when there is a bug in inspect
sarlalian has joined #ruby
<bline79> ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
<Hanmac> krz: do : p User.new to look at the error message
<krz> apeiros: hash works with inspect
<bean__> >> stamp = Time.now.to_i; hostname = "#{stamp}"; hostname[0, hostname.length-2]
<eval-in> bean__ => "13808182" (https://eval.in/52372)
<apeiros> krz: definitively not the contract of inspect
blackratdog has quit [Quit: This computer has gone to sleep]
<krz> apeiros: https://gist.github.com/6811634 line 30 no issues
<Hanmac> >> Time.now.to_i.to_s[0..-2]
<eval-in> Hanmac => "138081827" (https://eval.in/52373)
<krz> clearly a hash type
tsykoduk is now known as zz_tsykoduk
<Hanmac> >> Time.now.to_i.to_s[0..-3]
<eval-in> Hanmac => "13808182" (https://eval.in/52374)
dhruvasagar has joined #ruby
antix_ has quit [Ping timeout: 240 seconds]
Trudko has joined #ruby
vince_prignano has quit [Ping timeout: 260 seconds]
vishal has quit [Remote host closed the connection]
msuszczy has joined #ruby
<bean__> bline79: ^^
<Hanmac> apeiros & krz i think this is the culpit: https://gist.github.com/krzkrzkrz/6811634#file-foo-rb-L53
<workmad3> Hanmac: you want the last 3 digits removed?
<bean__> last 2
<bean__> :)
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<workmad3> >> Time.now.to_i / 100
<eval-in> workmad3 => 13808183 (https://eval.in/52375)
raphaelivan has joined #ruby
<bean__> that also works.
<Hanmac> workmad3: -3 means last 2 digits removed ;P
pen has quit [Remote host closed the connection]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<workmad3> Hanmac: I missed that it was .. not ... ;)
<bline79> I got it :D Thanks again for your help guys
<bline79> :D :D
<workmad3> Hanmac: [0...-3] would be last 3 digits
ColKurtz has joined #ruby
julweber has joined #ruby
duggiefresh has joined #ruby
<Trudko> Guys I am using $. to display number of line in file (part of code => http://pastie.org/8375241), sometimes it gives me some hight number like 1534 eventhough file has 4 line do I miss something obvious?
nemesit|znc has quit [Ping timeout: 248 seconds]
antix_ has joined #ruby
jonathanwallace has quit [Quit: WeeChat 0.4.1]
Monie has joined #ruby
<krz> Hanmac: yea i think i see the issue
colonolGron has joined #ruby
<krz> thanks for clearing that up
<Hanmac> Trudko: i think you need __LINE__
<Hanmac> Trudko: or do you want the line of inside the csv file?
whunt has quit [Quit: Computer has gone to sleep.]
stkowski has joined #ruby
<Trudko> yes because I want to tell user on which line he made some mistake
zeade has joined #ruby
<Hanmac> Trudko: try .with_index i dont know if it fixed or not ...
Nisstyre-laptop has joined #ruby
nari has quit [Ping timeout: 245 seconds]
michael_mbp is now known as zz_michael_mbp
<Trudko> I found $INPUT_LINE_NUMBER
antix_ has quit [Ping timeout: 240 seconds]
seejohnrun has quit [Quit: leaving]
<Trudko> seems like that might do a trick
<Hanmac> hm i dont think that is what you want
a1ph4g33k has joined #ruby
Stygia has quit [Quit: Leaving]
<a1ph4g33k> Good morning folks.
starfox21 has joined #ruby
conner has joined #ruby
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
taion809 is now known as zzz_taion809
Elhu has quit [Quit: Computer has gone to sleep.]
tvw has joined #ruby
noop has joined #ruby
ItSANgo has quit [Read error: Connection reset by peer]
Mathieu has quit []
dankest has joined #ruby
ItSANgo has joined #ruby
<Trudko> Hanmac: why do you think so? I found it here http://stackoverflow.com/questions/12407035/ruby-csv-get-current-line-row-number
darrik has quit [Ping timeout: 264 seconds]
antix_ has quit [Ping timeout: 240 seconds]
renanoronfle has quit [Quit: This computer has gone to sleep]
jefflyne has quit [Ping timeout: 245 seconds]
<Hanmac> normaly i would recomernt this: CSV.foreach('test.csv').with_index { |csv,i| p i } but the foreach method is still broken
noname001 has quit [Ping timeout: 240 seconds]
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
<Hanmac> Trudko: what about this? CSV.to_enum(:foreach,'test.csv').with_index { |csv,i| p i } :D
<Trudko> heh might work i guess, but what is wrong with input line number?
vishal has joined #ruby
<Hanmac> http://www.ruby-doc.org/core-2.0.0/doc/globals_rdoc.html << there is " $. : The current input line number of the last file that was read. " but in 99.9% of the cases i do not trust global variables ...
Vivekananda has joined #ruby
elaptics is now known as elaptics`away
iliketurtles has joined #ruby
zz_tsykoduk is now known as tsykoduk
deception has joined #ruby
BSaboia has quit [Ping timeout: 245 seconds]
kadoo has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
antix_ has quit [Ping timeout: 240 seconds]
kaspergr_ has quit [Remote host closed the connection]
jrhorn424 has joined #ruby
Matriks has quit [Remote host closed the connection]
kaspergrubbe has joined #ruby
Guest9873 has quit [Ping timeout: 245 seconds]
brennanMKE has joined #ruby
geggam has quit [Ping timeout: 240 seconds]
kadoo has joined #ruby
Matriks has joined #ruby
kadoo has quit [Max SendQ exceeded]
smoothbutta has joined #ruby
geggam has joined #ruby
nemesit|znc has joined #ruby
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
pwh has quit []
xk_id has quit [Quit:
kadoo has joined #ruby
<Trudko> fair enought will take a closer look at that
codecop has joined #ruby
mikepack has joined #ruby
<Trudko> anyway thanks
kaldrenon has quit [Remote host closed the connection]
kaspergrubbe has quit [Ping timeout: 248 seconds]
gja has quit [Quit: This computer has gone to sleep]
i_s has joined #ruby
darrik has joined #ruby
Matriks has quit [Remote host closed the connection]
shadoi has joined #ruby
shadoi1 has quit [Ping timeout: 252 seconds]
adeponte has joined #ruby
RichardBaker has quit [Quit: RichardBaker]
antix_ has quit [Ping timeout: 260 seconds]
colonolGron has quit [Ping timeout: 256 seconds]
tsykoduk is now known as zz_tsykoduk
RichardBaker has joined #ruby
apeiros has quit [Remote host closed the connection]
antix_ has joined #ruby
antix_ has joined #ruby
antix_ has quit [Changing host]
pygospa has quit [Read error: Operation timed out]
pygospa has joined #ruby
jrhorn424 has quit [Quit: Textual IRC Client: www.textualapp.com]
sambao21 has quit [Quit: Computer has gone to sleep.]
Kabaka has joined #ruby
Nogbit has joined #ruby
buibex has quit [Remote host closed the connection]
RichardBaker has quit [Client Quit]
moted has quit [Quit: moted]
moted has joined #ruby
kaspergrubbe has joined #ruby
zz_michael_mbp is now known as michael_mbp
antix_ has quit [Ping timeout: 252 seconds]
sambao21 has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
<krz> ah so as apeiros was saying. should inspect, by standard, return a string?
Bry8Star{T2 has quit [Remote host closed the connection]
zeel has quit [Remote host closed the connection]
pwh has joined #ruby
jbpros has joined #ruby
<Hanmac> krz i would recomend that
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
St_Marx has joined #ruby
iamjarvo has joined #ruby
c0rn has joined #ruby
nemesit|znc has quit [Ping timeout: 240 seconds]
<krz> kk
DanKnox_away is now known as DanKnox
iamjarvo_ has joined #ruby
ace_striker has joined #ruby
Bry8Star{T2 has joined #ruby
<krz> Hanmac: where does it indicate that though? http://ruby-doc.org/core-2.0.0/Object.html#method-i-inspect ?
JeanMertz has joined #ruby
supergeek has joined #ruby
nemesit|znc has joined #ruby
Ferr has quit [Ping timeout: 245 seconds]
St_Marx has quit [Client Quit]
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dhruvasagar has quit [Ping timeout: 240 seconds]
dodosan has joined #ruby
kaldrenon has joined #ruby
burlyscudd has quit [Quit: Leaving.]
nomenkun has quit [Ping timeout: 245 seconds]
whunt has joined #ruby
quoin has joined #ruby
iamjarvo has quit [Ping timeout: 260 seconds]
synfin has joined #ruby
iamjarvo_ has quit [Ping timeout: 248 seconds]
<sarkie_> is it possible to pass a paramater to a method with a block ?
klaut has quit [Remote host closed the connection]
tabolario has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lfox has quit [Ping timeout: 240 seconds]
<sarkie_> def test(a, &b) ?
antix_ has quit [Ping timeout: 246 seconds]
mklappstuhl has quit [Remote host closed the connection]
supergeek has quit [Quit: Leaving]
arturas_ has joined #ruby
cody-- has joined #ruby
buibex has joined #ruby
dodosan has quit [Ping timeout: 248 seconds]
antix has joined #ruby
antix has joined #ruby
antix has quit [Changing host]
quoin has quit [Ping timeout: 245 seconds]
iliketurtles has quit [Quit: zzzzz…..]
antix is now known as Guest26183
supergeek has joined #ruby
lfox has joined #ruby
Monie has joined #ruby
io_syl has joined #ruby
heidi has quit [Quit: Leaving.]
zz_tsykoduk is now known as tsykoduk
buibex has quit [Remote host closed the connection]
b00stfr3ak has quit [Ping timeout: 240 seconds]
supergeek has quit [Client Quit]
Es0teric has joined #ruby
ADot has joined #ruby
dhruvasagar has joined #ruby
chrisja has joined #ruby
ADot has quit [Max SendQ exceeded]
heidi has joined #ruby
b00stfr3ak has joined #ruby
iamjarvo has joined #ruby
krz has quit [Quit: krz]
ADot has joined #ruby
supergeek has joined #ruby
supergeek has quit [Max SendQ exceeded]
ADot has quit [Max SendQ exceeded]
Guest26183 has quit [Ping timeout: 245 seconds]
iliketurtles has joined #ruby
ADot has joined #ruby
ADot has quit [Max SendQ exceeded]
reset has joined #ruby
snovak has joined #ruby
ADot has joined #ruby
ADot has quit [Max SendQ exceeded]
<sarkie_> Hanmac, sorry we are still trying to understand that.
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
burlyscudd has joined #ruby
<platzhirsch> so, maybe that's obvious, but for me it was not. If you plan to run your application on JRuby, plan it early :D
ADot1 has joined #ruby
ADot1 has quit [Max SendQ exceeded]
funburn has joined #ruby
ADot1 has joined #ruby
IceDragon has joined #ruby
ADot1 has quit [Max SendQ exceeded]
senayar has quit [Ping timeout: 245 seconds]
<Morrolan> sarkie_: The answer is "yes". Those posts to which he linked you just serve to show what kind of parameterers you can use. (All at once, if you want to.)
xk_id has joined #ruby
ADot1 has joined #ruby
jaynewst_ has joined #ruby
ADot1 has quit [Max SendQ exceeded]
supergeek has joined #ruby
jaynewstrom has quit [Read error: Connection reset by peer]
dkamioka has joined #ruby
ADot1 has joined #ruby
huoxito has quit [Ping timeout: 246 seconds]
<Hanmac> sarkie_: look at this:
<Hanmac> >> def m(a=nil,&b);[a,b]; end; o= proc {}; [m(o), m(&o)]
<eval-in> Hanmac => [[#<Proc:0x42080ec0@/tmp/execpad-4879ed0be5f9/source-4879ed0be5f9:2>, nil], [nil, #<Proc:0x42080ec0@/tmp/execpad-4879ed0be5f9/source-4879ed0be5f9:2>]] (https://eval.in/52381)
xcv has quit [Remote host closed the connection]
wyclif has joined #ruby
jokke has joined #ruby
mark_locklear has quit [Ping timeout: 240 seconds]
xcv has joined #ruby
sectionme has joined #ruby
<dkamioka> you can input code here?
<dkamioka> nice
<dkamioka> >> puts "test"
<eval-in> dkamioka => test ... (https://eval.in/52385)
<dkamioka> awesome.
supergeek has quit [Quit: Leaving]
supergeek has joined #ruby
funburn has quit [Ping timeout: 240 seconds]
<dkamioka> Hanmac: maaan... that &thingie is awesome too...
St_Marx has joined #ruby
supergeek has quit [Read error: Connection reset by peer]
antix_ has quit [Ping timeout: 240 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
tatsuya__ has quit [Remote host closed the connection]
supergeek has joined #ruby
jokke has quit [Client Quit]
wildroman has joined #ruby
DrShoggoth has joined #ruby
ADot1 has quit [Ping timeout: 264 seconds]
jokke has joined #ruby
jokke has quit [Client Quit]
xcv_ has joined #ruby
DaZ has quit [Ping timeout: 264 seconds]
<sarkie_> Morrolan, hmm, ok thank you.
hadees has joined #ruby
jokke has joined #ruby
antix_ has joined #ruby
sectionme has quit [Ping timeout: 248 seconds]
Es0teric has quit [Quit: Computer has gone to sleep.]
SJr has quit [Excess Flood]
rdark has quit [Quit: leaving]
Bosox20051 has quit [Remote host closed the connection]
Es0teric has joined #ruby
SJr has joined #ruby
brennanMKE has quit [Remote host closed the connection]
fgh2 has joined #ruby
mdst has joined #ruby
jonathanwallace has joined #ruby
lrfurtado has joined #ruby
Ferr has joined #ruby
funburn has joined #ruby
xcv has quit [Ping timeout: 245 seconds]
platzhirsch has left #ruby [#ruby]
ADot has joined #ruby
ADot has quit [Max SendQ exceeded]
ADot has joined #ruby
ADot has quit [Max SendQ exceeded]
ADot has joined #ruby
jokke has quit [Client Quit]
ADot has quit [Max SendQ exceeded]
ADot has joined #ruby
krz has joined #ruby
ADot has left #ruby [#ruby]
DaZ has joined #ruby
fgh has quit [Ping timeout: 246 seconds]
antix_ has quit [Ping timeout: 256 seconds]
lrfurtado has quit [Client Quit]
<krz> when apeiros said dont abuse def self.included(base)
<krz> how else should this be implemented?
<krz> he mentioned using just extend
<krz> but in what context?
antix_ has joined #ruby
funburn has quit [Ping timeout: 260 seconds]
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
huoxito has joined #ruby
aspires has quit [Quit: aspires]
Nisstyre-laptop has quit [Ping timeout: 248 seconds]
jonathanwallace has quit [Quit: WeeChat 0.4.1]
kaspergrubbe has quit [Remote host closed the connection]
lfox has quit [Ping timeout: 240 seconds]
awkisopen has quit [Remote host closed the connection]
kaspergrubbe has joined #ruby
MrZYX|off is now known as MrZYX
brennanMKE has joined #ruby
christian has joined #ruby
jonathanwallace has joined #ruby
christian is now known as Guest65368
jokke has joined #ruby
jokke has quit [Client Quit]
rezzack has joined #ruby
jokke has joined #ruby
aspires has joined #ruby
zarubin has quit [Ping timeout: 252 seconds]
jokke has quit [Client Quit]
jokke has joined #ruby
jokke has quit [Client Quit]
Monie has joined #ruby
tvw has quit []
tvw has joined #ruby
jonathanwallace has quit [Client Quit]
awkisopen has joined #ruby
<sarkie_> Hanmac, Morrolan cheers, seem to have fixed it... by doing exactly the same but on the site. odd. cheers though. all sorted!
hukl has joined #ruby
antix_ has quit [Ping timeout: 245 seconds]
brianpWins has joined #ruby
apeiros has joined #ruby
kaspergrubbe has quit [Ping timeout: 264 seconds]
colonolGron has joined #ruby
pipecloud is now known as pipework
antix_ has joined #ruby
mando has joined #ruby
saarinen has joined #ruby
kindjal has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
jokke has joined #ruby
jokke has quit [Client Quit]
jonathanwallace has joined #ruby
jokke has joined #ruby
ananthakumaran has joined #ruby
mercwithamouth has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
ananthakumaran has joined #ruby
antix_ has quit [Ping timeout: 240 seconds]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
havenwood has quit [Remote host closed the connection]
wallerdev has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
wallerdev has quit [Client Quit]
<Guest65368> I'm a little confused: https://gist.github.com/trinibago/6811508
wallerdev has joined #ruby
antix_ has joined #ruby
Senjai has joined #ruby
jonathanwallace has quit [Client Quit]
xk_id has quit [Quit:
schaerli has joined #ruby
starfox21 has quit [Quit: starfox21]
verto has joined #ruby
malcolmva has joined #ruby
snovak_ has joined #ruby
carraroj has joined #ruby
Mars` has joined #ruby
fflush has quit [Quit: leaving]
x1337807x has joined #ruby
xcv_ has quit [Remote host closed the connection]
mklappstuhl has joined #ruby
asteros has joined #ruby
raphaelivan has quit [Read error: Connection reset by peer]
xcv has joined #ruby
raphaelivan has joined #ruby
jonathanwallace has joined #ruby
dr_bob has quit [Quit: Tune in next week when you'll hear Dr. Bob say...]
lukec has quit [Quit: lukec]
asteros has quit [Client Quit]
antix_ has quit [Ping timeout: 246 seconds]
snovak has quit [Ping timeout: 248 seconds]
freezey has joined #ruby
pavilionXP has joined #ruby
miskander has joined #ruby
antix_ has joined #ruby
jokke has quit [Quit: WeeChat 0.4.1]
popl has joined #ruby
popl has joined #ruby
elux has joined #ruby
jokke has joined #ruby
supergeek has quit [Quit: Goodbye, cruel world.]
lfox has joined #ruby
allsystemsarego has quit [Quit: Leaving]
jonathanwallace has quit [Quit: WeeChat 0.4.1]
bean__ has quit [Quit: Computer has gone to sleep.]
asteros has joined #ruby
<Guest65368> can someone explain, why this doesn't work: https://gist.github.com/trinibago/6811508
Jdubs has joined #ruby
Mars` has quit [Remote host closed the connection]
Nisstyre-laptop has joined #ruby
<apeiros> Guest65368: a) @name in line 3 is in the wrong context, b) ivars aren't inherited
Mars` has joined #ruby
antix_ has quit [Ping timeout: 260 seconds]
<apeiros> you want @name in the class body, i.e. after line 1
<Hanmac> Guest65368: remove the "class << self" because currently you define singleton methods inside the singleton class ... that is duplicated ;P
Mars` has quit [Read error: Connection reset by peer]
kemist has joined #ruby
<apeiros> aaand that
Mars` has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
<apeiros> or actually, that alone suffices
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
krz has quit [Quit: krz]
<Guest65368> apeiros, you mean that? https://gist.github.com/trinibago/6811508/edit
Es0teric has quit [Quit: Computer has gone to sleep.]
nbrosnahan has quit [Quit: Textual IRC Client: www.textualapp.com]
nbrosnahan has joined #ruby
<apeiros> Guest65368: yes, but what Hanmac says remains
<Guest65368> the class variable stuff is a little tricky in Ruby
<apeiros> you can simply drop the class << self part
nbrosnahan has quit [Max SendQ exceeded]
verto has quit [Ping timeout: 252 seconds]
<apeiros> Guest65368: not really, no. but it helps if you understand the idea behind it.
<Guest65368> apeiros, that's what I try to.
nbrosnahan has joined #ruby
nbrosnahan has quit [Max SendQ exceeded]
<apeiros> Guest65368: you should get yourself a nick…
kemist has quit [Ping timeout: 248 seconds]
<Guest65368> apeiros, working on it.
soheil has quit [Read error: Connection timed out]
<apeiros> Guest65368: `class << some_obj; def foo; … ; end; end` is the same as `def some_obj.foo; … ; end`
pettsson has joined #ruby
Guest65368 has quit [Quit: Verlassend]
<apeiros> and @ivars belong to a single object (objects are "an instance" -> hence instance variables). they always belong to the object referenced by `self` in the same context.
soheil has joined #ruby
<apeiros> within `class …; end`, self refers to the class which is opened
<apeiros> e.g. `class Foo; self; end` => Foo
<apeiros> and: `class << Foo; self; end == Foo.singleton_class` # => true
rrichardsr3 has joined #ruby
<jokke> hey
quoin has joined #ruby
<jokke> following little program: https://paste.xinu.at/OTw/
antix_ has quit [Ping timeout: 264 seconds]
shadoi has quit [Quit: Leaving.]
tobago has joined #ruby
conner has quit [Ping timeout: 260 seconds]
<jokke> it doesn't work because apparently i can't pass blocks to methods
<jokke> because they can't be marshalled
<tobago> apeiros, https://gist.github.com/trinibago/6811508 is still not working.
Guest47789 has quit [Remote host closed the connection]
<jokke> is there any other way i could do this without having a client poll the server at intervalls?
<apeiros> tobago: class A should now work. class B doesn't work because of what I told you: @ivars are NOT inherited
antix_ has joined #ruby
shadoi has joined #ruby
<apeiros> tobago: you could add this in class A: `def self.inherited(subclass); subclass.instance_variable_set(:@name, @name.dup); end`
Macaveli has joined #ruby
<jokke> never mind
<jokke> i'll just loop on the client
wildroman has quit [Remote host closed the connection]
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kadoo has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Mars` has quit [Remote host closed the connection]
bean__ has joined #ruby
pettsson has quit [Read error: Connection reset by peer]
fgo has joined #ruby
Mars` has joined #ruby
jokke has quit [Quit: WeeChat 0.4.1]
workmad3 has quit [Ping timeout: 252 seconds]
quoin has quit [Ping timeout: 260 seconds]
tobago has quit [Client Quit]
jokke has joined #ruby
<Hanmac> apeiros & tobago : def self.name ; @name || super; end
tobago has joined #ruby
kadoo has joined #ruby
xcv_ has joined #ruby
wildroman has joined #ruby
<Hanmac> and the other one: def self.configure options={}; (@name ||= super.dup).merge!(options); end
Nahra has joined #ruby
Nahra has quit [Changing host]
Nahra has joined #ruby
lukec has joined #ruby
jokke has quit [Client Quit]
jokke has joined #ruby
antix_ has quit [Ping timeout: 245 seconds]
xcv has quit [Read error: Connection reset by peer]
fflush has joined #ruby
jefflyne has joined #ruby
jokke has quit [Client Quit]
cescalante is now known as ce_afk
Mars` has quit [Ping timeout: 260 seconds]
antix has joined #ruby
<apeiros> Hanmac: super in configure?
kaspergrubbe has joined #ruby
pavilionXP has quit [Quit: dead 2 the ladies 1st...]
<Hanmac> apeiros: ah yeah i was wrong
antix is now known as Guest20299
sambao21 has joined #ruby
BRMatt has quit [Ping timeout: 260 seconds]
buibex has joined #ruby
MTen has joined #ruby
<Hanmac> apeiros: hm this better? def self.configure options={}; (@name ||= name.dup).merge!(options); end
<apeiros> I think so
dangerousdave has quit [Quit: Leaving...]
khushildep has quit [Ping timeout: 245 seconds]
tatsuya_o has joined #ruby
derekv2 has joined #ruby
jaynewst_ has quit [Remote host closed the connection]
dangerousdave has joined #ruby
doritostains has joined #ruby
jaynewstrom has joined #ruby
vishal has quit [Remote host closed the connection]
kazuuu has joined #ruby
ghr has joined #ruby
pwh has quit []
DrCode has quit [Ping timeout: 240 seconds]
Guest20299 has quit [Ping timeout: 251 seconds]
<derekv2> I need to call mehtods out of a module. I'm in irb currently, i used require, and I can do Module::Nested.public_instance_methods and see the methods, but I can't evoke one
renanoronfle has joined #ruby
<derekv2> I get NoMethodError (Undefined)
<apeiros> derekv2: instance methods of a module need an instance to be called on
gyre007 has quit [Remote host closed the connection]
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
<apeiros> derekv2: i.e., you either need to include the module into a class, instantiate it and call the method on that instance
<Hanmac> derekv2 an module or a class cant call its own instance methods ... (the only exception would be the class Class and the class Module)
graft_ has joined #ruby
RichardBaker has joined #ruby
<apeiros> derekv2: or you have an object, call extend on it with the module, and then call the method on that object
<derekv2> ok let me see if I can figure that out
<apeiros> it's the same as with classes. when you do `class X; def foo; …; end; end`, you can't do `X.foo` either.
<graft_> does anyone know the complexity of array subtraction? Like [ :a, :b, :c, :d ] - [ :a, :d ]
<apeiros> graft_: O(n)
jbynum has joined #ruby
* Hanmac is very complex today
<graft_> apeiros: any idea how it works?
xcv_ has quit [Remote host closed the connection]
<apeiros> graft_: it converts them into a hash
<Hanmac> with magic?
<apeiros> the values being the keys in the hash
clov3r has quit [Remote host closed the connection]
<graft_> apeiros: ok, makes sense, thanks :)
<derekv2> I understand for classes... but I guess I was thinking that Module was like a namespace, and I was looking at examples
buibex has quit [Remote host closed the connection]
<Hanmac> derekv2: there is "module_function"
c0rn has quit [Quit: Computer has gone to sleep.]
<apeiros> derekv2: it is. but that doesn't mean it works differently for methods.
antix_ has quit [Ping timeout: 240 seconds]
<derekv2> here's what I got going on... I added a method to this file and reinstalled the gem locally https://github.com/calabash/calabash-android/blob/master/ruby-gem/lib/calabash-android/operations.rb
funburn has joined #ruby
DrCode has joined #ruby
carraroj has quit [Quit: Konversation terminated!]
funburn has quit [Client Quit]
yfeldblum has joined #ruby
iamjarvo has quit [Remote host closed the connection]
interactionjaxsn has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
<derekv2> Now when you use this calabash on your project, it copies some files out of skeleton. here's the one i'm trying to modify https://github.com/calabash/calabash-android/blob/master/ruby-gem/features-skeleton/support/app_life_cycle_hooks.rb
iamjarvo has joined #ruby
antix_ has joined #ruby
<derekv2> It seems like it is calling methods right rom operations.rb
<derekv2> but if I ad my own method with def, it can't find it
carraroj has joined #ruby
carraroj has quit [Changing host]
carraroj has joined #ruby
Nisstyre-laptop has quit [Ping timeout: 252 seconds]
joofsh has joined #ruby
Nisstyre-laptop has joined #ruby
zastern has joined #ruby
brennanMKE has quit [Remote host closed the connection]
<derekv2> so how is it legal to call start_test_server_in_background from app_life_cycle_hooks.rb but I can't call the method I added
b00stfr3ak has quit [Read error: Connection reset by peer]
<derekv2> so confused, thanks for the help btw
nomenkun has joined #ruby
ssvo_ has joined #ruby
iamjarvo has quit [Ping timeout: 245 seconds]
xk_id has joined #ruby
pwh has joined #ruby
antix_ has quit [Ping timeout: 245 seconds]
elplatt_ has joined #ruby
elplatt_ has quit [Client Quit]
ssvo has quit [Ping timeout: 252 seconds]
Nisstyre-laptop has quit [Read error: Connection reset by peer]
jefflyne has quit [Ping timeout: 240 seconds]
nisstyre has joined #ruby
antix_ has joined #ruby
iamjarvo has joined #ruby
jonathanwallace has joined #ruby
elplatt_ has joined #ruby
Mars` has joined #ruby
jefflyne has joined #ruby
elplatt has quit [Ping timeout: 240 seconds]
elplatt_ is now known as elplatt
jonathanwallace has quit [Client Quit]
raphaelivan has quit [Quit: Leaving.]
tsykoduk is now known as zz_tsykoduk
alvaro_o has joined #ruby
antix_ has quit [Ping timeout: 245 seconds]
iamjarvo has quit [Remote host closed the connection]
tkuchiki has quit [Remote host closed the connection]
mansi has quit [Remote host closed the connection]
pairup has joined #ruby
tkuchiki has joined #ruby
pairup has left #ruby [#ruby]
iamjarvo has joined #ruby
<derekv2> I think, this hooks file is not a normal ruby file somehow
mansi has joined #ruby
<derekv2> i'm trying to figure out how it is loaded
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
tonini_ has joined #ruby
kindjal has joined #ruby
headius has quit [Quit: headius]
pairup has joined #ruby
jonathanwallace has joined #ruby
jokke has joined #ruby
jonathanwallace has quit [Client Quit]
pairup has left #ruby [#ruby]
taptapdan has quit [Quit: taptapdan]
mansi has quit [Ping timeout: 245 seconds]
tkuchiki has quit [Ping timeout: 240 seconds]
adrian has joined #ruby
brennanMKE has joined #ruby
doritostains has quit [Read error: Connection reset by peer]
havenwood has joined #ruby
elplatt has quit [Quit: elplatt]
iamjarvo_ has joined #ruby
zastern_ has joined #ruby
antix_ has quit [Ping timeout: 248 seconds]
ewnd9 has quit [Ping timeout: 240 seconds]
jokke has quit [Client Quit]
jokke has joined #ruby
adrian has quit [Remote host closed the connection]
headius has joined #ruby
doritostains has joined #ruby
elplatt has joined #ruby
jokke has quit [Client Quit]
zz_tsykoduk is now known as tsykoduk
antix_ has joined #ruby
Squarepy has quit [Quit: Leaving]
zastern__ has joined #ruby
zastern has quit [Ping timeout: 248 seconds]
duggiefr_ has joined #ruby
zastern_ has quit [Read error: Connection reset by peer]
iamjarvo has quit [Ping timeout: 248 seconds]
adeponte has quit [Remote host closed the connection]
jokke has joined #ruby
adeponte has joined #ruby
jokke has quit [Client Quit]
duggiefresh has quit [Ping timeout: 264 seconds]
jonathanwallace has joined #ruby
mansi has joined #ruby
zastern__ has quit [Remote host closed the connection]
mansi has quit [Read error: Connection reset by peer]
zastern has joined #ruby
mansi has joined #ruby
jokke has joined #ruby
antix_ has quit [Ping timeout: 248 seconds]
jokke has quit [Client Quit]
jlast_ has joined #ruby
jbpros has quit [Ping timeout: 252 seconds]
Ahti333 has joined #ruby
antix_ has joined #ruby
ahawkins has joined #ruby
nwertman has quit [Read error: Connection reset by peer]
Lewix has quit [Remote host closed the connection]
jlast has quit [Ping timeout: 264 seconds]
iamjarvo_ has quit [Ping timeout: 240 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
Amnesia has left #ruby [#ruby]
jokke has joined #ruby
headius has quit [Quit: headius]
carraroj has quit [Quit: Konversation terminated!]
<derekv2> is at_exit hook a standard ruby thing?
jokke has quit [Client Quit]
carraroj has joined #ruby
jokke has joined #ruby
mneorr has joined #ruby
antix_ has quit [Ping timeout: 246 seconds]
soheil has quit [Read error: Connection timed out]
soheil has joined #ruby
burlyscudd has quit [Quit: Leaving.]
i_s has quit [Remote host closed the connection]
<jtperreault> anyone else experiencing issues installing gems? https://gist.github.com/jtperreault/d956db795baa27cf6626
antix_ has joined #ruby
mengu has joined #ruby
RichardBaker has quit [Quit: RichardBaker]
quoin has joined #ruby
BizarreCake has quit [Ping timeout: 264 seconds]
Lewix has joined #ruby
niklasb has joined #ruby
tjbiddle has joined #ruby
sectionme has joined #ruby
<Morrolan> Proxy with self-signed certificate between you and amazon aws?
ananthakumaran has quit [Quit: Leaving.]
randomnick_ has joined #ruby
headius has joined #ruby
mneorr has quit [Read error: Connection reset by peer]
<derekv2> I see. How can I evoke a method defined in this file https://github.com/calabash/calabash-android/blob/master/ruby-gem/lib/calabash-android/operations.rb from inside an at_exit hook?
<derekv2> any examples I find are clear enough, except it won't work
<jtperreault> Morrolan: that could work. is it just me though?
theRoUS has quit [Read error: Operation timed out]
Jdubs has quit [Read error: Connection reset by peer]
<Morrolan> I issued a `gem install` a few minutes ago, it's still pending. :P
<Morrolan> AWS seems slow today.
<jtperreault> Morrolan: kk, thanks
<Morrolan> Ah, there we go. And nope, worked fine.
nwertman has joined #ruby
mengu_ has joined #ruby
julweber has quit [Remote host closed the connection]
quoin has quit [Ping timeout: 264 seconds]
Jdubs has joined #ruby
mneorr has joined #ruby
decoponio has quit [Quit: Leaving...]
antix_ has quit [Ping timeout: 260 seconds]
burlyscudd has joined #ruby
sectionme has quit [Ping timeout: 260 seconds]
Jdubs has quit [Read error: Connection reset by peer]
mengu__ has joined #ruby
kadoo has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
atno has joined #ruby
antix has joined #ruby
antix has quit [Changing host]
antix has joined #ruby
mengu has quit [Ping timeout: 248 seconds]
antix is now known as Guest92509
Jdubs has joined #ruby
miskander has quit [Quit: miskander]
mlpinit has quit [Remote host closed the connection]
b00stfr3ak has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rahulkmr has quit [Read error: Connection reset by peer]
rahulkmr has joined #ruby
rahulkmr has quit [Max SendQ exceeded]
nwertman1 has joined #ruby
ce_afk is now known as cescalante
mengu_ has quit [Ping timeout: 248 seconds]
mengu has joined #ruby
rahulkmr has joined #ruby
fmcgeough has joined #ruby
rahulkmr has quit [Max SendQ exceeded]
sambao21 has quit [Quit: Computer has gone to sleep.]
i_s has joined #ruby
rahulkmr has joined #ruby
rahulkmr has quit [Max SendQ exceeded]
tobago has quit [Read error: Connection reset by peer]
mengu__ has quit [Ping timeout: 246 seconds]
rahulkmr has joined #ruby
jokke has quit [Quit: WeeChat 0.4.1]
rahulkmr has quit [Max SendQ exceeded]
Mars` has quit [Ping timeout: 245 seconds]
Ferr has quit []
x1337807x has joined #ruby
jokke has joined #ruby
Advocation has joined #ruby
Guest92509 has quit [Ping timeout: 248 seconds]
rahulkmr has joined #ruby
rahulkmr has quit [Max SendQ exceeded]
tjad has joined #ruby
jokke has quit [Client Quit]
rahulkmr has joined #ruby
rahulkmr has quit [Max SendQ exceeded]
jokke has joined #ruby
nwertman1 has quit [Ping timeout: 248 seconds]
antix_ has joined #ruby
axl_ has joined #ruby
rahulkmr has joined #ruby
Nogbit has quit [Read error: Operation timed out]
rahulkmr has quit [Max SendQ exceeded]
rahulkmr has joined #ruby
mlpinit has joined #ruby
rahulkmr has quit [Max SendQ exceeded]
rahulkmr has joined #ruby
rahulkmr has quit [Max SendQ exceeded]
rahulkmr has joined #ruby
rahulkmr has quit [Max SendQ exceeded]
_whitelogger has joined #ruby
reset has quit [Quit: Leaving...]
jokke has joined #ruby
Mars` has joined #ruby
julweber has quit [Read error: Connection reset by peer]
s2013 has joined #ruby
garbagecollectio has joined #ruby
<s2013> how do you call a module in a class?
<garbagecollectio> anyone used jasmine?
<s2013> ive used it briefly garbagecollectio
<garbagecollectio> i added jasmine-jquery so i could use jquery
<garbagecollectio> make things easier
<garbagecollectio> but its trying to "clean up" fixtures
<garbagecollectio> that aren't there
<garbagecollectio> cause i don't have any
<garbagecollectio> and then all my tests fail
asteros has quit [Quit: asteros]
<garbagecollectio> its in my folder where everything gets called in before
rahulkmr has joined #ruby
jlast has quit [Ping timeout: 256 seconds]
rahulkmr has quit [Max SendQ exceeded]
rahulkmr has joined #ruby
rahulkmr has quit [Max SendQ exceeded]
Xeago has joined #ruby
rahulkmr has joined #ruby
rahulkmr has quit [Max SendQ exceeded]
sniffingcats has joined #ruby
rahulkmr has joined #ruby
rahulkmr has quit [Max SendQ exceeded]
rahulkmr has joined #ruby
[Rickmasta] has joined #ruby
rahulkmr has quit [Max SendQ exceeded]
rickmasta has quit [Read error: Connection reset by peer]
antix_ has quit [Ping timeout: 240 seconds]
rahulkmr has joined #ruby
rahulkmr has quit [Max SendQ exceeded]
rahulkmr has joined #ruby
rahulkmr has quit [Max SendQ exceeded]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
c0rn has joined #ruby
rahulkmr has joined #ruby
rahulkmr has quit [Max SendQ exceeded]
nwertman has quit [Read error: Connection reset by peer]
nwertman has joined #ruby
rahulkmr has joined #ruby
mengu_ has joined #ruby
rahulkmr has quit [Max SendQ exceeded]
antix_ has joined #ruby
rahulkmr has joined #ruby
rahulkmr has quit [Max SendQ exceeded]
Nogbit has joined #ruby
cody-- has quit [Quit: derp]
robustus has quit [Ping timeout: 264 seconds]
nemesit|znc has quit [Ping timeout: 246 seconds]
pwh has quit []
nemesit|znc has joined #ruby
rahulkmr has joined #ruby
RichardBaker has quit [Quit: RichardBaker]
rahulkmr has quit [Max SendQ exceeded]
rahulkmr has joined #ruby
rahulkmr has quit [Max SendQ exceeded]
rahulkmr has joined #ruby
rahulkmr has quit [Max SendQ exceeded]
robustus has joined #ruby
twoism has joined #ruby
robbyoconnor has joined #ruby
twoism has quit [Read error: Connection reset by peer]
antix_ has quit [Ping timeout: 245 seconds]
himsin has joined #ruby
rahulkmr has joined #ruby
twoism has joined #ruby
rahulkmr has quit [Max SendQ exceeded]
axl_ has quit [Ping timeout: 245 seconds]
Jdubs has quit [Read error: Connection reset by peer]
rahulkmr has joined #ruby
rahulkmr has quit [Max SendQ exceeded]
rahulkmr has joined #ruby
rahulkmr has quit [Max SendQ exceeded]
antix_ has joined #ruby
antix_ has joined #ruby
antix_ has quit [Changing host]
Jdubs has joined #ruby
tjbiddle has quit [Ping timeout: 240 seconds]
blahwoop has joined #ruby
rahulkmr has joined #ruby
<blahwoop> good afternoon
rahulkmr has quit [Max SendQ exceeded]
rahulkmr has joined #ruby
kay_ has quit [Remote host closed the connection]
rahulkmr has quit [Max SendQ exceeded]
rahulkmr has joined #ruby
rahulkmr has quit [Max SendQ exceeded]
iliketurtles has joined #ruby
rahulkmr has joined #ruby
rahulkmr has quit [Max SendQ exceeded]
blueOxigen has joined #ruby
tjbiddle has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
asteros has joined #ruby
asteros has quit [Client Quit]
rahulkmr has joined #ruby
rahulkmr has quit [Max SendQ exceeded]
scla has joined #ruby
antix_ has quit [Ping timeout: 245 seconds]
Ahti333 has quit [Ping timeout: 245 seconds]
wildroman has quit [Remote host closed the connection]
jlast has joined #ruby
rahulkmr has joined #ruby
rahulkmr has quit [Max SendQ exceeded]
jlast has quit [Remote host closed the connection]
scla has quit []
jlast has joined #ruby
rahulkmr has joined #ruby
antix_ has joined #ruby
rahulkmr has quit [Max SendQ exceeded]
Zeeraw has quit [Quit: Computer has gone to sleep.]
bluOxigen has quit [Ping timeout: 240 seconds]
sambao21 has joined #ruby
rahulkmr has joined #ruby
rahulkmr has quit [Max SendQ exceeded]
Advocation has quit [Quit: Advocation]
rahulkmr has joined #ruby
mando has joined #ruby
nutella has joined #ruby
nutella is now known as Guest8562
RichardBaker has joined #ruby
mlpinit has quit [Remote host closed the connection]
staafl has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
Jdubs has quit [Read error: Connection reset by peer]
antix_ has quit [Ping timeout: 264 seconds]
Jdubs has joined #ruby
iamjarvo has joined #ruby
gyzmodo has quit [Ping timeout: 240 seconds]
antix_ has joined #ruby
reset has joined #ruby
gcds has quit [Quit: gcds]
xaq has joined #ruby
yalue has quit [Quit: Leaving]
threesome has joined #ruby
pellenation has joined #ruby
Elinos has joined #ruby
aspires has quit [Quit: aspires]
Macaveli has quit [Quit: Computer has gone to sleep.]
himsin has quit [Quit: himsin]
Paradox has joined #ruby
antix_ has quit [Ping timeout: 260 seconds]
himsin has joined #ruby
reset has quit [Ping timeout: 240 seconds]
rrichardsr3 has quit [Quit: -- I'm getting very tired --]
quoin has joined #ruby
Jdubs has quit [Read error: Connection reset by peer]
antix_ has joined #ruby
dkamioka has quit [Remote host closed the connection]
<bnagy> matter of opinion / timezone
bluOxigen has joined #ruby
Jdubs has joined #ruby
jokke has quit [Quit: WeeChat 0.4.1]
jokke has joined #ruby
simplyaubs has joined #ruby
burlyscudd has joined #ruby
blueOxigen has quit [Ping timeout: 256 seconds]
BlakeRG has joined #ruby
sikachu has joined #ruby
<BlakeRG> is there something like httpie but written in ruby?
x1337807x has joined #ruby
quoin has quit [Ping timeout: 252 seconds]
jokke has quit [Client Quit]
jokke has joined #ruby
x1337807x has quit [Client Quit]
jokke has quit [Client Quit]
Jdubs has quit [Read error: Connection reset by peer]
<bnagy> what's httpie?
jokke has joined #ruby
<Hanmac> http for hippies? ;D
mengu_ has quit [Quit: This computer has gone to sleep]
antix_ has quit [Ping timeout: 240 seconds]
<bnagy> http _is_ for hippies
iamjarvo has quit [Ping timeout: 260 seconds]
gadgetoid has quit [Ping timeout: 260 seconds]
<sikachu> not that i know of. it's CLI anyway
Jdubs has joined #ruby
<sikachu> (re: httpie)
jkamenik has quit [Quit: Leaving.]
jokke has quit [Client Quit]
<sikachu> so you should be able just to install it using pip?
kadoo has joined #ruby
jokke has joined #ruby
kadoo has quit [Max SendQ exceeded]
<BlakeRG> yeah but i hate dealing with pip
jokke has quit [Client Quit]
<cout> install it once and you're done
<cout> bam
jokke has joined #ruby
antix has joined #ruby
kadoo has joined #ruby
antix is now known as Guest58984
cody-- has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
JeanMertz has quit []
robbyoconnor has quit [Ping timeout: 248 seconds]
ehc has quit [Quit: ehc]
skaflem has quit [Quit: Leaving]
alekst has joined #ruby
bluOxigen has quit [Ping timeout: 252 seconds]
Jdubs has quit [Read error: Connection reset by peer]
bluOxigen has joined #ruby
bluOxigen has quit [Changing host]
bluOxigen has joined #ruby
freezey has quit [Remote host closed the connection]
Jdubs has joined #ruby
gadgetoid has joined #ruby
brennanMKE has quit [Remote host closed the connection]
doritostains has quit [Quit: Leaving...]
ninegrid has joined #ruby
c0rn has joined #ruby
Guest58984 has quit [Ping timeout: 241 seconds]
mlpinit has joined #ruby
kadoo has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
robbyoconnor has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
blueOxigen has joined #ruby
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
kaspergrubbe has joined #ruby
Ahti333 has joined #ruby
bluOxigen has quit [Ping timeout: 245 seconds]
freezey has joined #ruby
schaerli has quit [Remote host closed the connection]
schaerli has joined #ruby
schaerli has quit [Remote host closed the connection]
x1337807x has joined #ruby
schaerli has joined #ruby
schaerli has quit [Remote host closed the connection]
kaspergrubbe has quit [Ping timeout: 240 seconds]
aspires has joined #ruby
schaerli has joined #ruby
robbyoconnor has quit [Ping timeout: 252 seconds]
gcds has joined #ruby
krainboltgreene has joined #ruby
antix_ has quit [Ping timeout: 260 seconds]
bluOxigen has joined #ruby
elplatt has quit [Remote host closed the connection]
iamjarvo has joined #ruby
elplatt has joined #ruby
iamjarvo has quit [Remote host closed the connection]
antix_ has joined #ruby
antix_ has joined #ruby
antix_ has quit [Changing host]
iamjarvo has joined #ruby
blueOxigen has quit [Ping timeout: 240 seconds]
soheil has quit [Remote host closed the connection]
kilophoton has quit [Ping timeout: 240 seconds]
blueOxigen has joined #ruby
blahwoop has quit [Remote host closed the connection]
schaerli has quit [Ping timeout: 245 seconds]
robbyoconnor has joined #ruby
mneorr has quit [Remote host closed the connection]
bluOxigen has quit [Ping timeout: 246 seconds]
funburn has joined #ruby
freerobby has quit [Quit: Leaving.]
pellenation has quit [Quit: Leaving.]
kane77 has joined #ruby
mayorga has joined #ruby
deception has quit [Quit: Goodbye]
ehc has joined #ruby
pushpak has quit [Ping timeout: 256 seconds]
carraroj has quit [Quit: Konversation terminated!]
shadoi1 has joined #ruby
Jdubs has quit [Read error: Connection reset by peer]
noop has quit [Ping timeout: 240 seconds]
shadoi has quit [Ping timeout: 245 seconds]
Jdubs has joined #ruby
antix_ has quit [Ping timeout: 248 seconds]
Ahti333_ has joined #ruby
kadoo has joined #ruby
dangerousdave has quit [Quit: Linkinus - http://linkinus.com]
reset has joined #ruby
dv_ has quit [Read error: Operation timed out]
dv_ has joined #ruby
antix_ has joined #ruby
Mars` has quit [Remote host closed the connection]
xaq has quit [Remote host closed the connection]
Ahti333 has quit [Ping timeout: 248 seconds]
Ahti333_ is now known as Ahti333
axl_ has joined #ruby
jbynum has quit [Quit: Computer has gone to sleep.]
Guest8562 has quit [Ping timeout: 252 seconds]
dorei has joined #ruby
jonathanwallace has quit [Ping timeout: 240 seconds]
lrfurtado has joined #ruby
iamjarvo has quit [Read error: Connection reset by peer]
lrfurtado has quit [Client Quit]
iamjarvo has joined #ruby
krawchyk has quit [Remote host closed the connection]
nutella_ has joined #ruby
fflush has quit [Quit: leaving]
lrfurtado has joined #ruby
antix_ has quit [Ping timeout: 240 seconds]
phantasm66 has quit [Quit: *sleeeep….]
lrfurtado has quit [Client Quit]
Jdubs has quit [Read error: Connection reset by peer]
blueOxigen has quit [Ping timeout: 240 seconds]
freerobby has joined #ruby
kindjal has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
visof has joined #ruby
Jdubs has joined #ruby
visof has quit [Read error: Connection reset by peer]
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
michael_mbp is now known as zz_michael_mbp
Nogbit has quit [Ping timeout: 240 seconds]
volty has joined #ruby
snovak_ has quit [Remote host closed the connection]
soheil has joined #ruby
Xanderby has quit [Quit: Xanderby]
fflush has joined #ruby
snovak has joined #ruby
fflush has quit [Client Quit]
robbyoconnor has quit [Ping timeout: 252 seconds]
jerius has quit [Ping timeout: 248 seconds]
fflush has joined #ruby
fflush has quit [Client Quit]
sailias has quit [Quit: Leaving.]
snovak_ has joined #ruby
PragCypher has joined #ruby
synfin has quit [Read error: Operation timed out]
snovak_ has quit [Remote host closed the connection]
jokke has quit [Quit: WeeChat 0.4.1]
petey has joined #ruby
jokke has joined #ruby
fflush has joined #ruby
snovak_ has joined #ruby
fflush has quit [Changing host]
fflush has joined #ruby
codecop has quit [Remote host closed the connection]
robbyoconnor has joined #ruby
snovak has quit [Ping timeout: 245 seconds]
mayday_jay has quit [Ping timeout: 248 seconds]
angusiguess has quit [Ping timeout: 245 seconds]
antix_ has quit [Ping timeout: 264 seconds]
snovak has joined #ruby
dhruvasagar has quit [Ping timeout: 256 seconds]
jokke has quit [Client Quit]
jokke has joined #ruby
antix_ has joined #ruby
antix_ has joined #ruby
antix_ has quit [Changing host]
forced_request has joined #ruby
snovak_ has quit [Ping timeout: 248 seconds]
mneorr has joined #ruby
voidPirate has joined #ruby
Mars` has joined #ruby
fuhgeddaboudit has joined #ruby
sectionme has joined #ruby
snovak has quit [Ping timeout: 252 seconds]
apeiros has quit [Remote host closed the connection]
robbyoconnor has quit [Ping timeout: 245 seconds]
reset has quit [Quit: Leaving...]
Mars` has quit [Remote host closed the connection]
apeiros has joined #ruby
Mars` has joined #ruby
antix_ has quit [Ping timeout: 248 seconds]
burlyscudd has quit [Quit: Leaving.]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Nogbit has joined #ruby
kaldrenon has quit [Remote host closed the connection]
endash has joined #ruby
Ox6abe has joined #ruby
kaldrenon has joined #ruby
freerobby has quit [Quit: Leaving.]
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
Kar- has quit [Ping timeout: 240 seconds]
sectionme has quit [Ping timeout: 252 seconds]
freerobby has joined #ruby
nemesit|znc has quit [Ping timeout: 245 seconds]
nutella_ has quit [Ping timeout: 240 seconds]
gyre007 has joined #ruby
codezomb has quit [Ping timeout: 240 seconds]
Mars` has quit [Ping timeout: 240 seconds]
sniffingcats has quit [Quit: Til rivido Idisti!]
kaldrenon has quit [Ping timeout: 264 seconds]
x1337807x has joined #ruby
funburn has quit [Read error: Connection reset by peer]
antix_ has quit [Ping timeout: 264 seconds]
axl_ has quit [Quit: axl_]
twoism has quit [Ping timeout: 240 seconds]
funburn has joined #ruby
mayday_jay has joined #ruby
<graft_> i would find Array#bsearch so much more useful if it gave you the damn index of the element instead of the element itself
<graft_> maybe i will file a bug
Mars` has joined #ruby
<graft_> anyone know how to do that?
breakingthings has quit []
ldnunes has quit [Quit: Leaving]
antix_ has joined #ruby
quoin has joined #ruby
joofsh has quit [Remote host closed the connection]
<popl> I don't think that's a bug.
elplatt has quit [Quit: elplatt]
<graft_> feature request
joofsh has joined #ruby
jblack has quit [Quit: Lost terminal]
<Hanmac> count the legs, if it has 6 its a bug, if it has 8 its a spider ,P
<graft_> no, that's an insect... bug is a supercategory including both spiders and insects
mneorr has quit [Remote host closed the connection]
rainbyte16 has quit [Quit: Leaving]
<popl> pedant harder
<popl> there are true bugs (Hemiptera) but people don't ever really mean that
Zeeraw has joined #ruby
<canton7> graft_, the ruby-doc examples do (0...ary.size).bsearch{ |i| ary[i] ... }, which seems like a reasonable workaround
<graft_> also it depends on metamorphic stage, since many insects have more legs in larval stages
<graft_> (how's that?)
Zeeraw has quit [Client Quit]
<graft_> true bugs are also a kind of insect
headius has quit [Quit: headius]
<popl> that's not the point of contention, though :P
<graft_> canton7: guh, that's so obvious
Es0teric has joined #ruby
quoin has quit [Ping timeout: 245 seconds]
derekv2 has quit [Ping timeout: 250 seconds]
PragCypher has quit [Remote host closed the connection]
Es0teric has quit [Max SendQ exceeded]
joofsh has quit [Ping timeout: 246 seconds]
antix_ has quit [Ping timeout: 240 seconds]
workmad3 has joined #ruby
iamjarvo has quit [Remote host closed the connection]
iamjarvo has joined #ruby
Vivekananda has quit [Remote host closed the connection]
<volty> ary.each_with_index.bsearch ?
antix has joined #ruby
antix has quit [Changing host]
antix has joined #ruby
antix is now known as Guest83217
<Hanmac> volty: does not work i tested it
<canton7> yeah, Enumerable doesn't have bsearch defined on it
<volty> ... { |el, i| el > 4 }
<graft_> you can probably do like to_enum on it to get it to work
<canton7> the whole point of bsearch is it's on a collection which has O(1) access
jb41 has joined #ruby
gnnr has joined #ruby
<graft_> canton7's way seems relatively inexpensive, although you do have to create an array from the range
PragCypher has joined #ruby
<Xeago> kinda beats the point..
<volty> ary.each_with_index.to_a.bsearch ?
Xeago has quit [Remote host closed the connection]
__main__ has quit [Read error: Connection reset by peer]
<graft_> but mapping the array to array+index was what i was trying to avoid
<canton7> (an enumerable is something you can iterate over, rather than something you can access at will)
interactionjaxsn has quit [Remote host closed the connection]
<canton7> volty, you might as well not use bsearch then - you're iterating over the whole array
tonini_ has quit [Ping timeout: 248 seconds]
<canton7> graft_, do you create an array from the range? Range has bsearch defined on it, so I assume it's clever
interactionjaxsn has joined #ruby
iamjarvo has quit [Ping timeout: 240 seconds]
<graft_> hmm, maybe not
__main__ has joined #ruby
<bnagy> _that_ would be a bug
failshell has quit [Remote host closed the connection]
c0rn has quit [Quit: Computer has gone to sleep.]
<volty> not necessarily -- depends on implementation
<volty> i do not know how it's implemented
staafl has quit [Ping timeout: 240 seconds]
<canton7> the only thing the methods on Enumerable know about the collection is that it defines #each. The Enumerable methods can only walk through the collection
<graft_> looks like not
<graft_> from my cursory reading of the source code
<volty> i agree with graft_: in my methods dealing with lists, especially those of widgets, i always return [index, item]
Guest83217 has quit [Ping timeout: 240 seconds]
<canton7> graft_, yeah, it does look sensible, I agree
adeponte has quit [Remote host closed the connection]
<graft_> cool, so this seems like the way to go
<bnagy> Range knows start and end, making an array to binary search would be nuts++ :)
<canton7> sweet!
adeponte has joined #ruby
funburn has quit [Quit: funburn]
<bnagy> graft_: out of interest, why do you want the index and not the element?
<shevy> because he is a LIBRARIAN!!!
<shevy> he has no interest for the content of the books! he just wants the index... indici!
antix_ has joined #ruby
<volty> one can always benchmark, or monitor memory use
snovak has joined #ruby
<bnagy> imho 'find the element matching t is the 'normal' semantic?
<bnagy> *this
interactionjaxsn has quit [Ping timeout: 252 seconds]
nemesit|znc has joined #ruby
tvw has quit []
riceandbeans has joined #ruby
soheil has quit [Read error: Operation timed out]
<graft_> bnagy: because sometimes i don't want the element, i want its neighbor
BlakeRG has left #ruby [#ruby]
Zeeraw has joined #ruby
<riceandbeans> in ruby 1.9, if I make a custom class, how do I call on it
<volty> bnagy, the world is nice because iit's all different, our world will be very poor if we, all of us, use 'normal semantics'
soheil has joined #ruby
<volty> s/will/would/
<riceandbeans> in ruby 1.8 I could make a file in the same directory called class.rb and have in there class Class, and then in the mail file, require Class and then var = class.new
<riceandbeans> not in 1.9 though
<bnagy> graft_: hm, yeah ok.
<volty> given that 'normal semantics' has any semantical meaning
<shevy> riceandbeans depends
<shevy> riceandbeans a way that will work on both versions is to let ruby install things into SITE_DIR
<shevy> then you can use plain old require
<shevy> like how gems do, too
<riceandbeans> I don't want ruby installing anything
<shevy> if you dont want to install into SITE_DIR, you may have to append to $: or use require_relative
<riceandbeans> I want this to be a small self contained thing
<shevy> awww a shame
<bnagy> shevy, riceandbeans this could just be a require_relative issue? no '.' in load patrh anymore etc
adeponte has quit [Ping timeout: 256 seconds]
<shevy> I always install stuff like a project
<Hanmac> riceandbeans: use always require_relative if possible
<riceandbeans> if I do require_relative, will it be cross compatible with 1.8?
<shevy> bnagy yeah probably
mlpinit has quit [Remote host closed the connection]
<shevy> require_relative is new since 1.9.x
<Hanmac> riceandbeans: who cares? 1.8 is dead
<riceandbeans> Hanmac: no it's not
<shevy> so if you use it, your code won't run on 1.8
MrThePlague has quit [Remote host closed the connection]
<shevy> but you could make conditional requires
<riceandbeans> Hanmac: anything running any redhat family runs 1.8 only
Ox6abe has quit [Remote host closed the connection]
<shevy> if RUBY_VERSION < '1.8'
<shevy> else
<shevy> end
<Hanmac> riceandbeans: offical 1.8 died this sommer
<bnagy> or just require './xxx'
<shevy> yeah try that ^^^ too riceandbeans
Ox6abe has joined #ruby
<bnagy> or $:.unshift '.' but that's disgusting
antix_ has quit [Ping timeout: 260 seconds]
<Hanmac> its not rubys fault when redhat does not use current software ... even ubuntu has newer ruby now
<riceandbeans> Hanmac: I don't blame redhat
<riceandbeans> err
<riceandbeans> I don't blame ruby
<riceandbeans> I blame redhat, which is a terrible company putting out terrible products
<riceandbeans> I'm just saying, the latest redhat products have 1.8.5
<Hanmac> oOOOO that is even WORSE!! ...
<bnagy> dit five??
<riceandbeans> 1.9.1 won't be accepted until like 2 years from now
<bnagy> *dot
<volty> redhat is @ companies
<riceandbeans> bnagy: no, dit 5
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
<graft_> the latest redhat has 1.8.5? i can't believe that
<Hanmac> 1.8.5 i so dead ... 1.8.7 is more important ... because 1.8.7 and 1.9.3 are API compatible ... 1,8.5 is not
tommyblu` has quit [Ping timeout: 256 seconds]
vpretzel has quit [Remote host closed the connection]
<volty> and companies need very stable software, not the last hypes
<graft_> that's horseshit
<shevy> hmmm
karupa64 has quit [Ping timeout: 256 seconds]
<shevy> 1.8.5 that sucks man
St_Marx has quit [Ping timeout: 240 seconds]
VTLob has quit [Quit: VTLob]
<graft_> not keeping up with bugfixes is not the same as 'very stable software'
<shevy> riceandbeans you should at least get latest 1.8.x
snovak has quit [Ping timeout: 248 seconds]
<graft_> they're just conservative because it's easy, not because it's better
<shevy> one day those distributions will all have died
senayar has joined #ruby
<shevy> which will be a happy day for mankind
<volty> they do the calculus -- for the customers, and for them
<shevy> yeah
<Hanmac> yeah ... using such "stable" software and then whining when the software does not have the latest "security patches" ...
closer has quit [Ping timeout: 256 seconds]
<shevy> like a service company, where they have less incentive to provide the latest... even many years after
Ox6abe has quit [Ping timeout: 240 seconds]
<riceandbeans> I retract my statement, they are on 1.8.7 now
<shevy> yippie!
<Hanmac> puh ... that is a tiny bit better
<volty> you cannot have everything, especially when you have to monitor what is stable and what is not
<graft_> anyway, this is what rvm/rbenv is for
<shevy> hmm
<shevy> ruby-1.8.7p370.tar.xz
<volty> never mind, don't want to start a flame defending redhat, with which i have nothing to do
<shevy> well almost latest patchset
<Hanmac> dam i hate centos ...
niklasb has quit [Ping timeout: 245 seconds]
<graft_> ^^^^
<shevy> volty DEBIAN FOREVER!!!
matchaw has joined #ruby
<riceandbeans> I run debian so flame all you want
<workmad3> WINDOWS FTW
* workmad3 hides
<volty> i'm fine on kubunut, after gentoo
<shevy> hmmmm
mohawkjohn has joined #ruby
<riceandbeans> my company uses redhat crap
<shevy> you run both debian and centos?
<bnagy> centos kernel versioning makes me stabby
<shevy> ah I see
aedorn has quit [Ping timeout: 260 seconds]
<riceandbeans> shevy: I personally use debian
kaspergrubbe has joined #ruby
<riceandbeans> shevy: I also run dragonflybsd
<Hanmac> centos minimal system for a VM ... installing git ... but you can not run git --help because centos does not have "man" installed by default oO
ahawkins has quit [Ping timeout: 240 seconds]
<shevy> I tried to get into the BSDs
<mohawkjohn> Does anyone know where I can find rules on when to declare Ruby VALUEs volatile in C code? Posted an SO question here: http://stackoverflow.com/questions/19169694/when-is-it-necessary-to-declare-volatile-values-in-ruby-c-extensions
twoism has joined #ruby
<shevy> but I failed at hd-install :(
c0rn has joined #ruby
<shevy> those slices are damn confusing compared to cfdisk
matchaw_ has quit [Ping timeout: 264 seconds]
niklasb has joined #ruby
<shevy> oh... actually I did not fail the second time there, but at external USB hdd...
<shevy> "fdisk -l" did not work!
robert_ has quit [Excess Flood]
<shevy> I googled and somehow found the right command, but I was fed up at that time
<riceandbeans> shevy: you have to get used to BSD userland vs GNU userland for things too
<shevy> :(
<riceandbeans> sometimes the same commands have totally different flags
antix_ has quit [Ping timeout: 240 seconds]
zz_karupa64 has joined #ruby
tommyblue has joined #ruby
<shevy> well
closer has joined #ruby
colonolGron has quit [Quit: Lost terminal]
<shevy> one day I am gonna have one command to rule them all
<bnagy> shevy: just buy a mac, then you can ease into it slowly :)
doritostains has joined #ruby
<shevy> and ruby running the show
<riceandbeans> Hanmac: I can run debian on a VM with 64MB ram happily
senayar has quit [Ping timeout: 252 seconds]
<shevy> so many people use a mac
<shevy> I never had one myself
ehaliewicz has joined #ruby
Jetchisel has joined #ruby
<bnagy> it's because of that sweet sweet bsd userland, man, and ports
<bnagy> .. ok that might not be true
<Hanmac> shevy: mac is ... bah ... last time i searched but it seems it doesnt have a char table installed oO
robert_ has joined #ruby
<shevy> but it has nice GUIs does it not?
antix_ has joined #ruby
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
kaspergrubbe has quit [Read error: Operation timed out]
<bnagy> well.. usable
<bnagy> ie better than gnome kde or windows
<volty> mohawkjohn: nothing's volatile till you try to access ruby side without its interface
Vivekananda has joined #ruby
elux has quit [Quit: Leaving...]
<Hanmac> hm not so much ... it seems you cant enable the monitor blocking with an button, no you need to make it in the deep of the config in some file and then you make it with a corner activate ... but you cant do it with a button
<shevy> on linux I like combine separate things... bluefish as editor (gtk2 based), firefox browser (gtk? I think...), kde konsole... okular as pdf viewer... libreoffice for documents... mplayer+ffmpeg mostly for audio + video stuff... I think that is about 95% of what I use
<mohawkjohn> volty: i'm not sure i understand.
<riceandbeans> bnagy: mac's BSD userland is an OLD userland
<Hanmac> mohawkjohn: i dont use volatile in my C++ ext because in the most cases i hook around the GC so the C++ forces the ruby object to stay alive (i dont know if volatile can do something for me)
<riceandbeans> also, I don't like Aque
<riceandbeans> Aqua
<shevy> but I wonder if it should not be "Hey, I will use KDE, I will use only KDE stuff and nothing else"... but most KDE things just suck...
superscott[8] has joined #ruby
<shevy> and it's the same with gnome :(
<riceandbeans> also, Mac's cost WAY too much
<bnagy> riceandbeans: as opposed to this vibrant, new BSD all the cool kids are using?
<riceandbeans> also, I only use Openbox
<riceandbeans> bnagy: their userland is like 10 years old
<mohawkjohn> Hanmac: So, having them as C++ class members accomplishes the same thing as volatile -- but what about in regular functions?
<shevy> riceandbeans I am on xfce right now, it's not as shiny as gnome or kde but it is somewhat ok, I hope they will improve on it steadily...
matchaw_ has joined #ruby
byprdct has joined #ruby
<volty> mohawkjohn: references are not volatile
workmad3 has quit [Ping timeout: 264 seconds]
<riceandbeans> shevy: I used to use xfce
byprdct has quit [Max SendQ exceeded]
ace_striker has quit [Ping timeout: 250 seconds]
<riceandbeans> but after gnome3 became more commonplace I abandoned it and went minimal
<riceandbeans> haven't looked back since
<riceandbeans> I'm a lot happier with openbox
<graft_> pretty much the only thing that i am regularly unhappy with is office document stuff, like libreoffice
matchaw has quit [Ping timeout: 264 seconds]
<bnagy> I'm on xfce too, for the virtually never that I have to use linux on the desktop
<volty> volatile is about static stuff
<shevy> I tried to get into minimal WMs but somehow, I settled for konsole + tabs, and after that I don't care so much whether it is a WM or a DE since I use separate non-DE specific apps mostly anyway
<graft_> also the spreadsheet/charting stuff is meh... gnumeric is okay but pretty weak in the grand scheme of things
<shevy> bnagy hehe cool
<bnagy> mainly cause of the short "time to make it not completely suck"
<riceandbeans> I don't own a windows computer
<shevy> yeah
<shevy> like this unity stuff
<shevy> you probably need the right brains for it and I dont have them
<bnagy> if I ever went back to linux (shudder) I'm sure I'd use something more minimal though :/
byprdct has joined #ruby
byprdct has quit [Max SendQ exceeded]
bean__ has quit [Quit: Computer has gone to sleep.]
<shevy> graft_ I know that feeling, we had to use ms office, for excel .xls files, and I had troubles finding some things, especially "solver" stuff ... my charts never looked as fancy as what others who did not use libreoffice used
claymore has quit [Quit: Leaving]
<shevy> (I was one of the few using libreoffice there)
antix_ has quit [Ping timeout: 240 seconds]
vpretzel has joined #ruby
<Hanmac> mohawkjohn: i do this: i put the C++ object into an Ruby VALUE, then i store the VALUE in a holder object with i store in the C++ object (so that each can access each other)
<Hanmac> then while the C++ object lives, the holder lives too and the VALUE is inside an ruby hash which is marked as global value (so the GC does not touch the hash)
<Hanmac> when the C++ dies, it kills the holder and then the VALUE is freed from the ruby hash ... (and can be GC'd)
<Hanmac> look at https://github.com/Hanmac/rwx/tree/master/ext << look in main for RubyClientData
<shevy> that reminds me, I need to find out whether ruby can create .xls files including formulas
byprdct has joined #ruby
<riceandbeans> shevy: the ONLY thing libreofice can't do is VBscript from MS excel
mohawkjohn has quit [Quit: This computer has gone to sleep]
<riceandbeans> shevy: it can
<shevy> hmmm
<riceandbeans> shevy: just don't hope for VBscript
<graft_> riceandbeans: it sucks for doing presentations... i usually stick to inkscape for that
<volty> another one, not so interested (moha...)
<volty> s/so/enough/
antix_ has joined #ruby
bean__ has joined #ruby
AxisOfEval has joined #ruby
AxisOfEval has left #ruby [#ruby]
sikachu has quit [Quit: sikachu]
<bnagy> riceandbeans: nobody hopes for vbscript
St_Marx has joined #ruby
SilverKey has joined #ruby
nisstyre has quit [Quit: Leaving]
bean__ has quit [Client Quit]
tabolario has joined #ruby
b00stfr3ak has quit [Ping timeout: 264 seconds]
petey has quit [Remote host closed the connection]
<riceandbeans> shevy: do you use debian or ubuntu, talking about unity
Morrolan has quit [Ping timeout: 245 seconds]
<shevy> riceandbeans nope
postmodern has joined #ruby
petey has joined #ruby
<shevy> I had it installed like ... a year ago or so
xcv has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
<shevy> but these days I really dont use much of any distribution. I am on slackware right now but I compiled about 95% of it from source with ruby scripts (not glibc though, glibc hates me... )
jonathanwallace has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mklappstuhl has joined #ruby
soheil has quit [Read error: Connection timed out]
x1337807x has joined #ruby
soheil has joined #ruby
antix_ has quit [Ping timeout: 248 seconds]
Mars` has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
MTene has joined #ruby
<shevy> one day someone will teach me how to update glibc safely
Mars` has joined #ruby
mmitchell has quit [Ping timeout: 240 seconds]
antix_ has joined #ruby
antix_ has joined #ruby
antix_ has quit [Changing host]
mohawkjohn has joined #ruby
robbyoconnor has joined #ruby
petey has quit [Ping timeout: 240 seconds]
<mohawkjohn> Hanmac: That seems like an expensive way to track memory.
deception has joined #ruby
<volty> shevy: start with learning how to work in a chroot environment -> safe, you can copy, exercise, change, fix, check -> and make it final
MTen has quit [Read error: Operation timed out]
<riceandbeans> slackware
<riceandbeans> that's not a common one these days
rhys_ has quit [Quit: Leaving]
<riceandbeans> so, I don't why why this isn't working...
<riceandbeans> data_var has stuff in it
mklappstuhl has quit [Ping timeout: 252 seconds]
jonathanwallace has quit [Ping timeout: 240 seconds]
<shevy> volty hmm
<riceandbeans> newvar = /(regex)/.match(data_var)[0]
Mars`_ has joined #ruby
<riceandbeans> undefined method `[]' for nil:NilClass (NoMethodError)
Mars` has quit [Read error: Connection reset by peer]
<shevy> odd way to use that
<bnagy> riceandbeans: grouping an entire regex is odd
<bnagy> well, in match, at least
Bosox20051 has joined #ruby
<bnagy> >> /(foo)/.match 'foo'
<eval-in> bnagy => #<MatchData "foo" 1:"foo"> (https://eval.in/52424)
<shevy> >> /(.)(.)(.)/.match("abc")[2] # => "b"
<eval-in> shevy => "b" (https://eval.in/52425)
<bnagy> no matchdata 0
<volty> ok, mohawkjohn: when a compiler compiles it makes some assumptions, ok? // so, when a static variable is public and the app is closed , you have to declare a static variable volatile if some external process can change its value, ok? // when the compiler compiles to an object file (.o) or lib (.so) it automatically assumes that some routine can change its value
Ox6abe has joined #ruby
<Hanmac> mohawkjohn: there isnt any better way as far as i know ... the ruby object does need to stay alive, but i cant let it live longer than the C++ object
<riceandbeans> do I need to chomp before I do that?
<volty> so volatile is not necessary
<bnagy> riceandbeans: is the result you want in matchdata[1] ?
<shevy> hehe
<shevy> where is the result!
kilophoton has joined #ruby
butblack has joined #ruby
<Hanmac> mohawkjohn: there is also some kind of refcount included so that you can use the ruby object more than once ... and one dying does not kill the object as long there are other refs
mayorga has quit [Read error: Connection reset by peer]
antix_ has quit [Ping timeout: 264 seconds]
<riceandbeans> shevy: using rubular.com I built the regex around the data and mapped the matchgroups
Spami has joined #ruby
<riceandbeans> I know what matchgroups they are
<riceandbeans> there are several
nemesit|znc has quit [Ping timeout: 240 seconds]
<mohawkjohn> volty: the issue here, I think, is that the compiler optimizes out certain pass-by-values and treats them as references
Senjai has quit [Ping timeout: 264 seconds]
<riceandbeans> but it's taking the [#] a the end and calling it a method rather than an array reference
kadoo has quit [Ping timeout: 260 seconds]
mengu has quit [Remote host closed the connection]
<volty> though Hanmac's good (and useful) explanations &advices have nothing to to with the 'volatile' keyword
Ox6abe has quit [Ping timeout: 246 seconds]
enebo has quit [Quit: enebo]
antix_ has joined #ruby
<bnagy> riceandbeans: match return a matchdata or nil
Davey has quit [Quit: Computer has gone to sleep.]
alekst has quit [Quit: Computer has gone to sleep.]
<volty> the compiler can make optimizations, assuming that no other can change a value when 1) closed program 2) private static variables (no access possible)
<bnagy> so undefined [] for nil just means you failed to match
BRMatt has joined #ruby
cody-- has quit [Quit: derp]
<graft_> riceandbeans: use a block
<a1ph4g33k> *yawn*
axl_ has joined #ruby
mando has quit [Remote host closed the connection]
freerobby has joined #ruby
<graft_> i also like doing string.scan(regexp).flatten.first or some such
sea6ear has joined #ruby
<bnagy> or use NotRegexes
nari has joined #ruby
<volty> grouping the entire regex is not odd, especially in the phase of develpment, mandatory in the case of negative regexp
robbyoconnor has quit [Ping timeout: 252 seconds]
mrsolo has quit [Quit: This computer has gone to sleep]
<Lewix> graft_: good tip
mengu has joined #ruby
<mohawkjohn> volty: I think you're mistaken about why we're using volatile. But maybe I'm misunderstanding your argument.
freezey has quit [Remote host closed the connection]
adeponte has joined #ruby
<graft_> why bother grouping the entire regex? MatchData[0] is the whole match string anyway
pwh has joined #ruby
mikepack has joined #ruby
stewart_ has joined #ruby
popl has quit [Quit: We must make an idol of our fear, and call it God.]
antix_ has quit [Ping timeout: 264 seconds]
kadoo has joined #ruby
freerobby has quit [Client Quit]
<volty> mohawkjohn: everything is possible :)
antix_ has joined #ruby
<riceandbeans> bnagy: you were right...it didn't match...
<riceandbeans> somehow my regex match most lines but not the FIRST line
<riceandbeans> wtf
Mars`_ has quit [Read error: Connection reset by peer]
<volty> only Our Lord has very clear ideas what to match and how to group :)
Mars` has joined #ruby
<bnagy> I don't know what you're parsing, but srsly, see if you can do it with split etc - or at least _mostly_
<bnagy> any regexp longer than 6 chars is the first step on the road to insanity
<volty> paste just a piece, right here
bigkevmcd has quit [Quit: Ex-Chat]
hukl has quit [Quit: Linkinus - http://linkinus.com]
lfox has quit [Quit: ZZZzzz…]
quoin has joined #ruby
<riceandbeans> I can paste the regex minus the domains I'm scanning for
<riceandbeans> one sec
duggiefr_ has quit [Remote host closed the connection]
Guest15226 is now known as mephux
mephux has quit [Changing host]
mephux has joined #ruby
duggiefresh has joined #ruby
<riceandbeans> msgid = /(\w+?\s+\d+)?\s+(\d{2}:\d{2}:\d{2}).+:\s+(\w+).+from=<(.*?@(.*?(domain3|sub1.*?\.sub2\.domain1|domain2)\.(com|COM))).+size=(\d+)/.match(line)[3]
nomenkun has quit [Remote host closed the connection]
<bnagy> :|
emergion has joined #ruby
<riceandbeans> parse through a postfix log and define matchgroups for all essential email parts
<riceandbeans> works fine in rubular, but the first lock failed me
<volty> spammer ? :)
<riceandbeans> but I see why now
MTene has quit [Ping timeout: 248 seconds]
<riceandbeans> I took out a line for testing that filtered for this regex line
<riceandbeans> volty: had a spam issue, trying to scrape logs and go after the sources
<bnagy> I urgently recommend that you refactor that to use tokenising instead
ravster has quit [Quit: Leaving.]
antix_ has quit [Ping timeout: 240 seconds]
<riceandbeans> I urgently recommend you tell me what that means
jokke has quit [Quit: WeeChat 0.4.1]
lfox has joined #ruby
<bnagy> :) split the bits up based on tokens not regex
jokke has joined #ruby
<riceandbeans> what tokens?
<graft_> yeah seems like you can just split on :
tatsuya_o has quit [Remote host closed the connection]
<riceandbeans> I made a class for the email data
<bnagy> like you could split on 'from' then split the email on '@', then split the domain on '.' etc
<riceandbeans> why would I do it that way
<volty> splitting is all the same, the way arround to get crazy all the same
garbagecollectio has quit [Ping timeout: 240 seconds]
<bnagy> still requires some postprocessing, but each part is a lot easier to debug
<graft_> because you don't have to write a crazy regexp
<graft_> and it will be faster
antix_ has joined #ruby
<riceandbeans> graft_: but that regex is fine, I took out the filter line before it, which was my fault
axl_ has quit [Quit: axl_]
quoin has quit [Ping timeout: 260 seconds]
<graft_> it's illegible
<volty> I'll give the recipe: go incremental, write a piece for the first, then for repetitions, the the second, then sum them etc
duggiefr_ has joined #ruby
<graft_> therefore it is not fine
duggiefresh has quit [Remote host closed the connection]
drumsrgr8forn8 has joined #ruby
MTene has joined #ruby
zzz_taion809 is now known as taion809
<volty> (you know you can sum the regexps?)
brockfredin has joined #ruby
<riceandbeans> what?
Davey has joined #ruby
mrsolo has joined #ruby
<volty> e.g /(\w+?\s+\d+)?\s+(\d{2}:\d{2}:\d{2})/ (btw, you had a dot behind the parenthesis)
brennanMKE has joined #ruby
mengu has quit [Read error: Connection reset by peer]
<volty> match that, then add .{1, 20} (if appropriate), then go on, step by step
<bnagy> riceandbeans: "it's a one off tool" and "nobody else will have to read it" are ok excuses, but honestly, you if you'd started with tokenising you'd probably already have it working now
<graft_> also, inevitably, you will come back to read it later
tatsuya_o has joined #ruby
<graft_> and be like, oh god why my eyes
kadoo has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<riceandbeans> the dot after parenthesis was intentional, I didn't want to match it
krainboltgreene has quit []
kilophoton has quit [Ping timeout: 245 seconds]
vpretzel has quit [Remote host closed the connection]
antix_ has quit [Ping timeout: 240 seconds]
sea6ear has left #ruby ["Killed buffer"]
vpretzel has joined #ruby
<volty> you cannot have \w+?
kadoo has joined #ruby
<graft_> can you paste an example of this file somewhere?
baordog_ has quit [Remote host closed the connection]
<volty> or + or ? // there should be a question mark after \w+ ?
duggiefr_ has quit [Remote host closed the connection]
<volty> (in the text)
antix has joined #ruby
<riceandbeans> Sep 29 08:24:02 mx postfix/qmgr[1661]: 34D35653: from=<root@example.com>, size=1203, nrcpt=1 (queue active)
duggiefresh has joined #ruby
antix is now known as Guest91343
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Zerogrifter has joined #ruby
<volty> yap, your question mark is wrong -- to begin with
valesk has quit [Ping timeout: 264 seconds]
Zerogrifter has quit [Max SendQ exceeded]
<volty> i'll check though...
vpretzel has quit [Ping timeout: 240 seconds]
snovak has joined #ruby
MTen has joined #ruby
MTene has quit [Read error: Connection reset by peer]
alex__c2022 has quit [Quit: alex__c2022]
vim_shim has quit [Ping timeout: 240 seconds]
mlpinit has joined #ruby
<riceandbeans> the question mark makes it not greedy
<volty> can be there but cannot see the sense
<riceandbeans> safety
xk_id has quit [Quit:
duggiefresh has quit [Ping timeout: 245 seconds]
<volty> thanks
kreeves has joined #ruby
kreeves has quit [Changing host]
kreeves has joined #ruby
c0rn has quit [Read error: Operation timed out]
Trudko has quit [Read error: Connection reset by peer]
<voidPirate> how do I append text to a variable? Like if I have a variable called something = "This is something" and I want to add this text to the end "some more text"
Guest91343 has quit [Ping timeout: 240 seconds]
<MrZYX> +=
<bnagy> <<
sambao21 has quit [Quit: Computer has gone to sleep.]
nemesit|znc has joined #ruby
<bnagy> nooo += is bad and wrong
mlpinit has quit [Remote host closed the connection]
<voidPirate> hmm I tried += in ruby 2 and it bitched
<voidPirate> I will try <<
<bnagy> well.. not on the seven deadly sins scale, but wrong :P
cnrk has joined #ruby
<MrZYX> :P
<riceandbeans> bnagy: it's two different things
<graft_> riceandbeans: break this up for readability, at least, like /#{DATE} #{FILE} #{FROM}, size/
<bnagy> voidPirate: += creates a new string, << modifies the receiver
<riceandbeans> += an <<
<riceandbeans> one adds to the same object, one makes a new object from the first-
antix_ has joined #ruby
<bnagy> which is pretty much never what you want if you're appending
<graft_> riceandbeans: where DATE = /(\w+\s\d{2}:etc/
fgo has quit [Remote host closed the connection]
vpretzel has joined #ruby
snovak has quit [Ping timeout: 264 seconds]
<voidPirate> oh I see, thanks for the clarification
<riceandbeans> I feel like as a sysadmin it's my moral obligation to sit aroud reading slashdot all day
<riceandbeans> graft_: that actually looks like a decent idea...
<riceandbeans> the token thing sounded a bit weird
c0rn has joined #ruby
<riceandbeans> I don't like all caps variables though...
<graft_> your regexps are probably constants, so why not?
<riceandbeans> true
<riceandbeans> ok
<riceandbeans> fine
<volty> but += creating a new var is an implementation shortcoming // should be equivalent, for containers, to <<
mary5030 has quit [Ping timeout: 240 seconds]
stewart_ has quit [Quit: Linkinus - http://linkinus.com]
tabolario has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mayday_jay has quit [Ping timeout: 264 seconds]
peregrine81 has joined #ruby
<peregrine81> how come klass = Kernel.const_get("Class"); klass == Class => true
<bnagy> no
<peregrine81> but not in a case statement?
jb41 has quit [Quit: leaving]
antix_ has quit [Ping timeout: 246 seconds]
doritostains has quit [Quit: Leaving...]
<bnagy> volty: consider a="foo"; b=a then look at += and <<
<graft_> peregrine81: like case klass; when Class?
<peregrine81> graft_ yep
<peregrine81> well my_sym = case klass; when Class then :symbol
<MrZYX> peregrine81: case uses === with the argument to when on the lefthand side (important, since it's actually a method call)
<graft_> works for me
antix_ has joined #ruby
<riceandbeans> it's not chomping :((((((
<peregrine81> in my case my_sym is always empty
mayday_jay has joined #ruby
<riceandbeans> I want ONE line at a time and ruby is throwing 5 lines at it and the regex doesn't work
kay has joined #ruby
<bnagy> lol regex
RichardBaker has quit [Quit: RichardBaker]
<peregrine81> MrZYX anyway to get passed this? maybe .class
kay is now known as Guest27353
<graft_> still works for me
<volty> bnagy, so ? what has that to do with what I said?
<MrZYX> there's no way to cheat case/when (I've tried)
<MrZYX> peregrine81: you still need to provide us a way to reproduce your issue ;)
<peregrine81> sigh one sec
<bnagy> volty: it shouldn't be equivalent. It's not an implementation shortcoming.
<graft_> peregrine81: are you const_getting something other than Class?
<graft_> peregrine81: maybe you're comparing two different classes?
<peregrine81> yea
niklasb has quit [Ping timeout: 240 seconds]
<volty> bnagy: everything is opinable, but your example has nothing to do with it
<graft_> Kernel.const_get("Blah") might not be the same as Blah
<graft_> if, for example, you have Module::Blah, it might barf
vpretzel has quit [Remote host closed the connection]
<graft_> in that case you would need to do Module.const_get("Blah")
<graft_> or compare to Module::Blah
Morrolan has joined #ruby
<graft_> err, where Module is some actual module name, not Module
<graft_> (which is also a module name, but you get what i mean hopefully)
emergion has quit [Quit: Computer has gone to sleep.]
<bnagy> volty: how does it not have anything to do with it? You said "<< should be equivalent to += for containers" which is wrong, and the example demonstrates why
<bnagy> seriously, either you're a troll or just mentally retarded
<MrZYX> woah, calm down
<graft_> hey, bnagy, don't be mean...
<graft_> remember: no matter where you go, there you are
<bnagy> he has been like this in here for weeks, it's not OK anymore
<bnagy> this is not an isolated incident
<volty> the example didn't demonstrated anything, when you assign b to a you know that you have the reference to the same variable, when you do += you want to add to that same reference and not create another variable? So difiicult?
gyre007 has quit [Ping timeout: 264 seconds]
<MrZYX> bnagy: sort that out with him in a query or with an OP, but don't start publicly insulting people
sepp2k has quit [Read error: Connection reset by peer]
antix_ has quit [Ping timeout: 264 seconds]
deception has quit [Quit: Goodbye]
emergion has joined #ruby
pwh has quit []
St_Marx has quit [Ping timeout: 240 seconds]
Zai00 has quit [Quit: Zai00]
nemesit|znc has quit [Ping timeout: 264 seconds]
jefflyne has quit [Ping timeout: 240 seconds]
antix_ has joined #ruby
<graft_> riceandbeans: what about other tlds, by the way? why only com?
sambao21 has joined #ruby
<riceandbeans> because that's all we have here to match
St_Marx has joined #ruby
<MrZYX> hah, TLD matching gonna get fun in 2014
<riceandbeans> ultimately, it's going to be a negative regex
<volty> bnagy: i WAS just arguing my legiitimate opinion. DOT
zz_michael_mbp is now known as michael_mbp
tabolario has joined #ruby
<bnagy> it's not an opinion. You just randomly make stupid arguments when people say things, then troll
<riceandbeans> I have a series of allowed domains, if it DOESN'T match that criteria, then I need to capture the information to report back on it
<riceandbeans> MrZYX: why?
<bnagy> << and += should be equivalent. Ruby implementers are STUPID how did they MISS that??
threesome has quit [Ping timeout: 245 seconds]
<riceandbeans> bnagy: they have different use cases
<volty> we are not all equal
emergion has quit [Client Quit]
<volty> :)
<MrZYX> riceandbeans: because of the new gTLDs and IDN TLDs? ;)
<riceandbeans> MrZYX: ?
<riceandbeans> bnagy: like variable.method vs variable.method!
RichardBaker has joined #ruby
<riceandbeans> anyway
<riceandbeans> why is ruby not working...
sectionme has joined #ruby
<riceandbeans> .each do |line|, should have it doing ONE LINE AT A TIME
<riceandbeans> I even chomp it
<riceandbeans> seriously
<riceandbeans> it spits out 5 lines
<riceandbeans> what kind of crap is that
<bnagy> that sounds kind of impossible
<riceandbeans> let me show you
<riceandbeans> without the domains
<riceandbeans> one sec...
ravster has joined #ruby
<volty> it must depend on the field/line separator
michael_mbp is now known as zz_michael_mbp
<MrZYX> riceandbeans: http://newgtlds.icann.org
nemesit|znc has joined #ruby
antix_ has quit [Ping timeout: 248 seconds]
<MrZYX> first round will probably go live 2014
MTene has joined #ruby
MTene has quit [Max SendQ exceeded]
MTene has joined #ruby
antix_ has joined #ruby
MTene has quit [Max SendQ exceeded]
MTene has joined #ruby
sectionme has quit [Ping timeout: 260 seconds]
MTen has quit [Read error: Operation timed out]
xcv has quit [Remote host closed the connection]
duggiefresh has joined #ruby
pel_daniel has left #ruby [#ruby]
gcds has quit [Quit: gcds]
<Eiam> oh haskell
antix_ has quit [Ping timeout: 246 seconds]
<Eiam> tempted to just redo this in ruby
b00stfr3ak has joined #ruby
St_Marx has quit [Ping timeout: 240 seconds]
antix_ has joined #ruby
brennanMKE has quit [Remote host closed the connection]
funburn has joined #ruby
Ox6abe has joined #ruby
nari has quit [Ping timeout: 245 seconds]
aspires has quit [Quit: aspires]
duggiefresh has quit [Ping timeout: 260 seconds]
Lewix has quit [Remote host closed the connection]
aspires has joined #ruby
Valesk_ has quit [Ping timeout: 248 seconds]
kvirani has quit [Remote host closed the connection]
<riceandbeans> I've always hated ruby not having an incremental operator by design
<sam113101> like i++?
kvirani has joined #ruby
<riceandbeans> I'm sure dennis ritchie worked really hard to put that into C
<banisterfiend> riceandbeans the primary use for that in other languages is in loops
<riceandbeans> sam113101: yes
antix_ has quit [Ping timeout: 252 seconds]
<riceandbeans> banisterfiend: because ruby doesn't have loops
<banisterfiend> riceandbeans and ruby doesn't need loops most of the time
<sam113101> i+=1 is not much longer
<banisterfiend> riceandbeans ruby does have loops, we just don't need them really
<riceandbeans> sam113101: I know but that's more a kludge
<volty> you do not need that in ruby
<banisterfiend> riceandbeans so the number of use cases i++ would be useful is very very small
mando has joined #ruby
mjc__ is now known as mjc_
Ox6abe has quit [Remote host closed the connection]
<riceandbeans> banisterfiend: if you're tracking variable positioning in loops it can help for debugging if not used in the values themselves
<riceandbeans> and tons of things in ruby loop
<Eiam> I've used -= 1 time
<riceandbeans> .each is a loop
Ox6abe has joined #ruby
<Eiam> and its to stop an infinite loop in begin/rescue/retry
<riceandbeans> .each is a for loop
<riceandbeans> without an explicit incremental condition
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
<banisterfiend> riceandbeans that's not what i meant :) i meant we have constructs like that instead of explicit for(int i = 0; i < 10; i++) type loops
mansi has quit [Read error: Connection reset by peer]
<volty> each is a loop over a collection, it is not a 'for'
rahulkmr has quit [Quit: Leaving.]
kazuuu has quit [Remote host closed the connection]
rahulkmr has joined #ruby
rahulkmr has quit [Max SendQ exceeded]
mansi has joined #ruby
<riceandbeans> array.each do | stuff | end
rahulkmr has joined #ruby
<banisterfiend> riceandbeans outside for for(int i = 0; i < 10; i++) situations, or in while(cond) { blah; i++; } situations, i++ isn't used that often
rahulkmr has quit [Max SendQ exceeded]
niklasb has joined #ruby
St_Marx has joined #ruby
mansi has quit [Remote host closed the connection]
rahulkmr has joined #ruby
<riceandbeans> is the same as foreach my $line (@array) { }
fgh2 has quit [Ping timeout: 248 seconds]
<riceandbeans> in perl
rahulkmr has quit [Max SendQ exceeded]
<riceandbeans> it's a for loop
jbrechtel has quit [Ping timeout: 260 seconds]
rahulkmr has joined #ruby
Tearan has joined #ruby
mansi has joined #ruby
<banisterfiend> riceandbeans ok, let's not debate over what is/what is not a loop, the point is that with ruby's huge variety of internal iterators the number of cases where an i++ would be useful is really reduced
kane77 has quit [Quit: Leaving]
emmanuelux has joined #ruby
rahulkmr1 has joined #ruby
rahulkmr has quit [Read error: Connection reset by peer]
kvirani has quit [Ping timeout: 248 seconds]
rahulkmr1 has quit [Read error: Connection reset by peer]
rahulkmr has joined #ruby
<riceandbeans> I just don't like you have to kludge it in to use it
<volty> and, btw, with the new libraries with containers, especially boost, also c++ is abandoning for constructs
rahulkmr has quit [Max SendQ exceeded]
<volty> (for with i++)
<riceandbeans> I mean I know ruby was made to be monkey patched but with everything?
<banisterfiend> riceandbeans kludge what in? can you give a specific example what the heck you're talking about?
rahulkmr has joined #ruby
rahulkmr has quit [Max SendQ exceeded]
<riceandbeans> i += 1 instead of i++
<banisterfiend> riceandbeans that's not a kludge, C supports i += 1 too
rahulkmr has joined #ruby
Ox6abe has quit [Ping timeout: 248 seconds]
rahulkmr has quit [Client Quit]
rahulkmr1 has joined #ruby
drumsrgr8forn8 has quit [Ping timeout: 240 seconds]
mansi has quit [Ping timeout: 240 seconds]
antix_ has quit [Ping timeout: 240 seconds]
Cyrus has joined #ruby
clov3r has joined #ruby
quoin has joined #ruby
siwica has quit [Ping timeout: 240 seconds]
Ahti333 has quit [Ping timeout: 240 seconds]
antix_ has joined #ruby
gyre007 has joined #ruby
hadees has quit [Quit: hadees]
rahulkmr1 has quit [Ping timeout: 252 seconds]
siwica has joined #ruby
<Matix> >> a = 1; foo = [a]; a = 2; foo
<eval-in> Matix => [1] (https://eval.in/52429)
<Matix> is there any way to get 2?
nari has joined #ruby
<volty> get 2 out of what?
robbyoconnor has joined #ruby
<Matix> out of foo
<volty> no way this way
kadoo has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Ahti333 has joined #ruby
<volty> a = [1], foo = [a]; a = [2]
<Matix> >> a = [1], foo = [a]; a = [2]
<eval-in> Matix => [2] (https://eval.in/52430)
<volty> you need references for doing something like that
quoin has quit [Ping timeout: 260 seconds]
<riceandbeans> how can I make a multidimensional array in ruby
<MrZYX> just do it? Arrays can take arbitrary objects, so arrays too
<Matix> hmn, I'll have to change the whole code of the lib to make it work like that
<Matix> :|
mando has quit [Remote host closed the connection]
gwb3 has quit [Quit: leaving]
Davey has quit [Quit: Computer has gone to sleep.]
antix_ has quit [Ping timeout: 264 seconds]
gwb3 has joined #ruby
<volty> if you have single vars, and do not want arrays, you have to wrap the numbers (that are immediate objects) into a class
<volty> that way you can avoid going to type [] 's
Sc0rp10n has joined #ruby
s2013 has quit [Quit: Leaving]
nanoxd has quit [Quit: nanoxd]
<Sc0rp10n> hey everyone
antix has joined #ruby
<Sc0rp10n> I have a simple question
Zerogrifter has joined #ruby
MTene has quit [Ping timeout: 240 seconds]
St_Marx has quit [Ping timeout: 240 seconds]
<Matix> volty, they're not even numbers, they're strings
<volty> could be tricky, depending on how you access those vars
antix is now known as Guest48316
jonahR has joined #ruby
<Sc0rp10n> is there a way to reset/restart a loop once an if condition in met inside it?
<banisterfiend> riceandbeans a = Array.new(2) { Array.new(2) { "a" } }
<MrZYX> Matix: if they're strings, have a look at the .replace method
Zerogrifter has quit [Max SendQ exceeded]
<banisterfiend> >> Array.new(2) { Array.new(2) { "a" } }
<eval-in> banisterfiend => [["a", "a"], ["a", "a"]] (https://eval.in/52431)
<Matix> the problem is that the lirbary is saving some strings into an array
Zerogrifter has joined #ruby
<volty> MrZYX: excellent !
<Matix> something like [["key", "value1"], ["key", "value2"], ...]
<Matix> but at that point I don't know the correct value for "key"
Zerogrifter has quit [Max SendQ exceeded]
jefflyne has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
<Matix> I don't know it in advance
<volty> matrixise: try with what MrZYX said, use replace instead of =
funburn has quit [Ping timeout: 248 seconds]
Zerogrifter has joined #ruby
funburn_ has joined #ruby
jonahR has quit [Client Quit]
<riceandbeans> can I do array = [][]
<MrZYX> no, but [[]]
<MrZYX> and array[x][y]
Jetchisel has quit [Quit: Unfortunately time is always against us -- *Morpheus*]
predator217 has joined #ruby
<Matix> MrZYX, how is replace going to help?
<riceandbeans> is there a way to split a line across multiple?
nomenkun has joined #ruby
<riceandbeans> for instance, my regex that's incredibly long
<volty> replace acts on the same object
<MrZYX> >> a = "1"; b = [a]; a.replace("2"); b
<eval-in> MrZYX => ["2"] (https://eval.in/52432)
<riceandbeans> actually, I'm going to scroll up and do what that guy mentioned earlier for parts...
<Matix> WHAT!?
<Matix> O.o
<Matix> ahh, I see
<Matix> so = creates a new object?
cnrk has quit [Quit: cnrk]
<Matix> it makes sense, it should be immutable
<volty> >> a='1'; puts a.object_id; a = '2'; puts a.object_id
<eval-in> volty => 551962770 ... (https://eval.in/52433)
Guest27353 has quit [Remote host closed the connection]
<MrZYX> "2", creates a new object, = changes the reference hold in the variable
<Matix> ok ok, I see
<Matix> thank you
<Matix> I think that could help
Guest48316 has quit [Ping timeout: 240 seconds]
<volty> >> a='1'; puts a.object_id; a.replace( '2'); puts a.object_id
<eval-in> volty => 549341320 ... (https://eval.in/52434)
snovak has joined #ruby
<MrZYX> = is syntax, .replace is a method called on an object
<Matix> = is syntax? I thought it was a method in some object
antix_ has joined #ruby
antix_ has joined #ruby
antix_ has quit [Changing host]
<Matix> like in class String def =(foo) ..
predator117 has quit [Ping timeout: 260 seconds]
fuhgeddaboudit has quit [Ping timeout: 264 seconds]
<MrZYX> riceandbeans: ruby is fairly liberal about newlines, if nothing helps you can "escape" the newline by adding a \ at the end of a line
<Nilium> There is no = method unless it's like def x=(y)
<MrZYX> never tried that in regex literals though
<volty> = creates a new object (for String and other classes) -- unless redefined
<MrZYX> = isn't creating anything, it's assigning
nomenkun has quit [Ping timeout: 240 seconds]
<MrZYX> a = nil
brennanMKE has joined #ruby
ephemerian has left #ruby [#ruby]
<MrZYX> = doesn't create nil, it's there already
sambao21 has quit [Quit: Computer has gone to sleep.]
<volty> s = "string" is creating a new String object
<MrZYX> yes, "string" is too
nanoxd has joined #ruby
johnmilton has joined #ruby
KobraKao has joined #ruby
<MrZYX> >> a = ObjectSpace.each_object.to_a.size; "foo"; b = ObjectSpace.each_object.to_a.size; b-a
<eval-in> MrZYX => 3 (https://eval.in/52435)
snovak has quit [Ping timeout: 260 seconds]
<Matix> just in case, is there anything like replace for any object?
<banisterfiend> Matix no
<bnagy> 3?
<MrZYX> two arrays and a string
<volty> MrZYX: do not confuse memory size with object creation
<bnagy> >> a = ObjectSpace.each_object.to_a; "foo"; b = ObjectSpace.each_object.to_a; b-a
<volty> a ruby object gets created and assigned an object_id, whether pointing to "foo" or not
siwica has quit [Quit: siwica]
<MrZYX> hm, or maybe the numbers
antix_ has quit [Ping timeout: 248 seconds]
<bnagy> lame I have jruby, no ObjectSpace locally :.
<volty> the size of object space gives you the size of YOUR, RUBY, OBJECT SPACE (the exposed one) not on the internals
<MrZYX> volty: you're changing topic. You said = is creating objects. It's not
Aryasam has joined #ruby
<MrZYX> volty: ObjectSpace.each_object gives you all objects
<volty> yes, it is creating objects that point to some memory and have object_id's
dankest has quit [Quit: Peace]
<MrZYX> to_a makes an array of it
<bnagy> also said you can redefine it - you can't
<MrZYX> size counts the items
Es0teric has joined #ruby
antix_ has joined #ruby
<MrZYX> I don't see where you see anything about memory consumption
<volty> you have to study ruby implementation internals for the effective memory assignment
<volty> at least an integer for the storing the new object_id , + the name of the variable etc etc etc
<bnagy> MrZYX: see? this is why I am frustrated
<MrZYX> bnagy: sure, still no excuse to get rude ;)
Popple has joined #ruby
<volty> bnagy: just argue in a civilized way if you can :)
RichardBaker has quit [Quit: RichardBaker]
<MrZYX> volty: just stop trying to be right all the time
Aryasam has quit [Read error: Connection reset by peer]
Aryasam_ has joined #ruby
brennanMKE has quit [Ping timeout: 245 seconds]
St_Marx has joined #ruby
<volty> the question is what you intend for created object? memory space?
tomzx_mac has joined #ruby
nari has quit [Ping timeout: 252 seconds]
<MrZYX> total number of objects known to the interpreter
twoism has quit [Remote host closed the connection]
<volty> >> s = 'hi'; puts s.object_id; s = 'hi'; puts s.object_id
<eval-in> volty => 549669040 ... (https://eval.in/52437)
Soda has joined #ruby
_Minos_ has joined #ruby
<volty> and you are saying that = does not create new objects ?
<bnagy> yes
<volty> probably we do not understand each other
<bnagy> 'hi' created the object
JMcAfreak has quit [Quit: Dang it, Moon Moon!]
<MrZYX> >> p 'hi'.object_id; p 'hi'.object_id
<eval-in> MrZYX => 554158290 ... (https://eval.in/52438)
<MrZYX> same result, not using =
Davey has joined #ruby
<volty> MrZYX: we were talking about '='
<volty> do not mix-max please
antix_ has quit [Ping timeout: 246 seconds]
<MrZYX> well the mix is that you confuse objects and variables
<volty> i said that =, in context of String assignment, creates new objects, that's all // not that i want to be (always) right
<MrZYX> and therefore object creation and variable assignment
vpretzel has joined #ruby
<bnagy> what is "String assignment" ?
<MrZYX> s ='foo'; b=s; # Two assignments, only one object created
<volty> you hope to take me by exhausting ? :)
antix_ has joined #ruby
<MrZYX> do you?
Rollabunna has quit [Remote host closed the connection]
<volty> that's a point
<volty> but, pity, a special case
<MrZYX> not at all
fgo has joined #ruby
<volty> very special
<MrZYX> I guess s = :bla; b = :bla; is a special case too then
<MrZYX> or s = 5; b = 5;
<volty> yes, another one
<MrZYX> or s = []; b=s;
<volty> nothings to do with foo's
<MrZYX> or s = Object.new; b=s;
<volty> String context
<volty> bye
<MrZYX> strings are just objects in ruby too
<MrZYX> one of the few types with literals, but just objects
<volty> as you please :)
fbernier has quit [Read error: Connection reset by peer]
<volty> i said what I had to say, right or wrong
Matip has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fbernier has joined #ruby
vpretzel has quit [Ping timeout: 241 seconds]
<bnagy> it's not 'right or wrong' or 'opinion' or 'a debate'
jbrechtel has joined #ruby
<bnagy> everything in the statement was demonstrably wrong
<volty> there was Matrix, we were talking about his string assignments, i said that the new objects got created, and now you are bla bla bla -ing
<volty> s/that then new/that new/
tatsuya_o has quit [Remote host closed the connection]
fgo has quit [Ping timeout: 240 seconds]
<MrZYX> you said = would create objects. That's plainly a false statement
<bnagy> 07:29 < volty> = creates a new object (for String and other classes) -- unless redefined
<bnagy> 1. it doesn't 2. you can't
mansi has joined #ruby
<volty> we were talking in context of Matrix's (user) assignments of literal strings
antix_ has quit [Ping timeout: 260 seconds]
heidi has quit [Quit: Leaving.]
Cyrus has quit [Quit: Cyrus.sleep()]
<volty> (and then you said I want to be right !!! ??? )
<bnagy> does the context make that statement less completely wrong?
<volty> everything has a context, bnagy, I fear that you will remain enclosed in your context for all your life
Aryasam has joined #ruby
Aryasam_ has quit [Read error: Connection reset by peer]
Matix has quit [Ping timeout: 245 seconds]
antix_ has joined #ruby
BRMatt has quit [Ping timeout: 245 seconds]
<banisterfiend> volty u r cute when u turn aggressive
<volty> :)
jonr22 has joined #ruby
<volty> not aggressive, this is my "original" style
Rollabunna has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
<banisterfiend> volty r u a dom
upd has joined #ruby
KobraKao has quit [Quit: Saindo]
<volty> i use it rarely here because i want to be kind with people // you know, behind a screen & keyboard, you can't see the smile, the eyes etc etc - - people could get it wrongly
<volty> banisterfiend: I do not understand your q
doritostains has joined #ruby
<banisterfiend> volty a Dom: http://en.wikipedia.org/wiki/Dominatrix
<volty> ahahah
mansi has quit [Ping timeout: 240 seconds]
<bnagy> MrZYX: oh, maybe an encoding object or something? ( back re why object count increased by 3 )
funburn_ has quit [Ping timeout: 240 seconds]
sambao21 has joined #ruby
Rollabunna has quit [Remote host closed the connection]
<MrZYX> I'm pretty sure it's one array and one number by now
Morrolan has quit [Read error: Operation timed out]
Jdubs has quit [Read error: Connection reset by peer]
<banisterfiend> wow
<MrZYX> it's to_a(1), .size(2), "foo"(3) count again
<banisterfiend> all of a sudden, in a matter of 1-2 seconds it's now gone from completely dry to pouring with rain
Jdubs has joined #ruby
antix_ has quit [Ping timeout: 264 seconds]
nerdy has joined #ruby
antix_ has joined #ruby
antix_ has quit [Changing host]
antix_ has joined #ruby
kadoo has joined #ruby
mjs2600 has joined #ruby