apeiros changed the topic of #ruby-lang to: Ruby 2.2.2; 2.1.6; 2.0.0-p645: https://ruby-lang.org || Paste code on https://gist.github.com
chouhoulis has quit []
bungoman has joined #ruby-lang
<weaksauce> badeball where.not works now.
<weaksauce> derp
<weaksauce> baweaver is gone
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chouhoulis has joined #ruby-lang
Ropeney has joined #ruby-lang
aaeron has quit [Quit: aaeron]
aaeron has joined #ruby-lang
bruno- has quit [Ping timeout: 250 seconds]
ruby-lang304 has joined #ruby-lang
wallerdev has joined #ruby-lang
joaomdmoura has quit [Remote host closed the connection]
jo__ has quit [Quit: Connection closed for inactivity]
cryptarium has quit [Ping timeout: 276 seconds]
aaeron has quit [Quit: aaeron]
joaomdmoura has joined #ruby-lang
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ascarter_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
aaeron has joined #ruby-lang
dorei has quit []
alestuber has quit [Remote host closed the connection]
sankaber has joined #ruby-lang
Fooster has joined #ruby-lang
joaomdmoura has quit [Read error: Connection reset by peer]
joaomdmoura has joined #ruby-lang
hahuang65 has quit [Ping timeout: 256 seconds]
Fooster has quit [Ping timeout: 272 seconds]
that1guy has quit [Ping timeout: 276 seconds]
that1guy has joined #ruby-lang
stardiviner has quit [Quit: Weird in coding now, or make love, only two things push me away from IRC.]
joaomdmoura has quit [Read error: Connection reset by peer]
stardiviner has joined #ruby-lang
joaomdmoura has joined #ruby-lang
charliesome has joined #ruby-lang
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
that1guy has quit [Ping timeout: 244 seconds]
rubyaw has joined #ruby-lang
joaomdmo_ has joined #ruby-lang
joaomdmoura has quit [Read error: Connection reset by peer]
joaomdmo_ has quit [Read error: Connection reset by peer]
joaomdmoura has joined #ruby-lang
rubyaw has quit [Quit: Leaving...]
baweaver has joined #ruby-lang
baweaver has quit [Remote host closed the connection]
baweaver has joined #ruby-lang
rubyaw has joined #ruby-lang
delongG__ has quit [Remote host closed the connection]
ascarter has joined #ruby-lang
joaomdmo_ has joined #ruby-lang
ascarter_ has joined #ruby-lang
joaomdmoura has quit [Ping timeout: 245 seconds]
yfeldblum has joined #ruby-lang
shinnya has quit [Ping timeout: 256 seconds]
wallerdev has quit [Ping timeout: 240 seconds]
crankharder has joined #ruby-lang
joaomdmo_ has quit [Read error: Connection reset by peer]
joaomdmoura has joined #ruby-lang
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rubyaw has quit [Quit: Leaving...]
bruno- has joined #ruby-lang
rubyaw has joined #ruby-lang
ruby-lang852 has joined #ruby-lang
ruby-lang852 has quit [Client Quit]
bruno- has quit [Ping timeout: 256 seconds]
programhappy has joined #ruby-lang
amclain has joined #ruby-lang
crankhar1er has joined #ruby-lang
programhappy has quit [Client Quit]
baweaver has quit [Read error: Connection reset by peer]
workmad3 has joined #ruby-lang
baweaver has joined #ruby-lang
unreal_ has joined #ruby-lang
unreal has quit [Ping timeout: 256 seconds]
ruby-lang061 has joined #ruby-lang
programhappy has joined #ruby-lang
workmad3 has quit [Ping timeout: 240 seconds]
baweaver has quit [Ping timeout: 244 seconds]
ruby-lang061 has quit [Client Quit]
crankhar1er has quit [Ping timeout: 272 seconds]
bungoman_ has joined #ruby-lang
hendranata_ has joined #ruby-lang
bungoman has quit [Ping timeout: 244 seconds]
that1guy has joined #ruby-lang
rubyaw has quit [Quit: Leaving...]
bungoman_ has quit [Ping timeout: 256 seconds]
ascarter_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
joaomdmoura has quit [Read error: Connection reset by peer]
joaomdmoura has joined #ruby-lang
ur5us has quit [Remote host closed the connection]
programhappy has quit [Quit: programhappy]
ur5us has joined #ruby-lang
fujimura has joined #ruby-lang
gix has quit [Ping timeout: 255 seconds]
symm- has quit [Ping timeout: 256 seconds]
gix has joined #ruby-lang
rubyaw has joined #ruby-lang
crankharder has quit [Quit: leaving]
crankharder has joined #ruby-lang
Agent604 has joined #ruby-lang
gambl0re has joined #ruby-lang
tkuchiki has joined #ruby-lang
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jacaballero has joined #ruby-lang
michaelfisher has joined #ruby-lang
chouhoulis has quit []
michaelfisher has quit [Client Quit]
mphfish_ has joined #ruby-lang
joaomdmoura has quit [Read error: Connection reset by peer]
joaomdmoura has joined #ruby-lang
mphfish_ has quit [Client Quit]
Namaste_ has quit [Quit: You're a LOSER, and your dad probably beat you when you were a kid... which was probably two weeks ago]
joaomdmoura has quit [Read error: Connection reset by peer]
joaomdmo_ has joined #ruby-lang
joaomdmo_ has quit [Remote host closed the connection]
joaomdmoura has joined #ruby-lang
joaomdmoura has quit [Remote host closed the connection]
auzty has joined #ruby-lang
ruby-lang304 has quit [Ping timeout: 246 seconds]
hahuang65 has joined #ruby-lang
sunaku has joined #ruby-lang
stardiviner has quit [Ping timeout: 256 seconds]
senor_jalapeno has joined #ruby-lang
harlen has joined #ruby-lang
kwd has quit [Remote host closed the connection]
bturker has joined #ruby-lang
dvlwrk has quit [Ping timeout: 256 seconds]
stardiviner has joined #ruby-lang
joaomdmoura has joined #ruby-lang
bruno- has joined #ruby-lang
bruno- has quit [Ping timeout: 240 seconds]
aaeron has quit [Quit: aaeron]
workmad3 has joined #ruby-lang
workmad3 has quit [Ping timeout: 240 seconds]
Jaood has joined #ruby-lang
fujimura has quit [Remote host closed the connection]
Jaood has left #ruby-lang [#ruby-lang]
rbowlby_ has joined #ruby-lang
that1guy has quit [Ping timeout: 265 seconds]
ruby-lang725 has joined #ruby-lang
senor_jalapeno has quit [Ping timeout: 245 seconds]
rbowlby_ has quit [Client Quit]
<ruby-lang725> hello rubyist, i'm on windows + ruby gems and when i run my NET::HTTP.post_form , I get "read server certificate B: certificate verify failed".
<ruby-lang725> im trying to POST a https url
charliesome has quit [Quit: zzz]
<ruby-lang725> How can i set the CA_PATH ? if i never initialize the HTTP object. I'm doing a one line call Net::HTTP.post_form(url, params)
charliesome has joined #ruby-lang
rbowlby has quit [Ping timeout: 265 seconds]
rbowlby has joined #ruby-lang
bungoman has joined #ruby-lang
conanza has joined #ruby-lang
conanza has quit [Client Quit]
rbowlby has quit [Client Quit]
hendranata_ has quit [Quit: Leaving]
bougyman has quit [Ping timeout: 256 seconds]
rubyaw has quit [Quit: Leaving...]
hendranata_ has joined #ruby-lang
that1guy has joined #ruby-lang
gix has quit [Ping timeout: 272 seconds]
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
gix has joined #ruby-lang
houhoulis has joined #ruby-lang
tkuchiki has quit [Ping timeout: 246 seconds]
michael_mbp has quit [Excess Flood]
tkuchiki has joined #ruby-lang
michael_mbp has joined #ruby-lang
tectonic has joined #ruby-lang
ruby-lang725 has quit [Ping timeout: 246 seconds]
Fooster has joined #ruby-lang
tkuchiki has quit [Remote host closed the connection]
Fooster has quit [Ping timeout: 264 seconds]
tkuchiki has joined #ruby-lang
tkuchiki has quit [Remote host closed the connection]
that1guy has quit [Ping timeout: 250 seconds]
tkuchiki has joined #ruby-lang
ogpastaling has joined #ruby-lang
fujimura has joined #ruby-lang
that1guy has joined #ruby-lang
fujimura has quit [Ping timeout: 256 seconds]
fujimura has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
duderonomy has joined #ruby-lang
tectonic has quit []
womble has quit [Excess Flood]
womble has joined #ruby-lang
houhoulis has quit [Remote host closed the connection]
charliesome has quit [Quit: zzz]
fedexo has joined #ruby-lang
ogpastaling has quit [Remote host closed the connection]
charliesome has joined #ruby-lang
dellavg_ has joined #ruby-lang
That1Guy_ has joined #ruby-lang
mikecmpbll has quit [Quit: ciao.]
philoserf has joined #ruby-lang
dellavg_ has quit [Ping timeout: 264 seconds]
philoserf has quit [Remote host closed the connection]
bungoman has quit [Remote host closed the connection]
That1Guy_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
That1Guy_ has joined #ruby-lang
That1Guy_ has quit [Client Quit]
sunaku has quit [Ping timeout: 272 seconds]
that1guy has quit [Ping timeout: 264 seconds]
joaomdmoura has quit [Remote host closed the connection]
riotjones has joined #ruby-lang
hahuang65 has quit [Ping timeout: 246 seconds]
allomov has joined #ruby-lang
riotjones has quit [Ping timeout: 252 seconds]
that1guy has joined #ruby-lang
him has joined #ruby-lang
|jemc|_ has quit [Ping timeout: 256 seconds]
jas02 has joined #ruby-lang
djbkd has joined #ruby-lang
that1guy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
haraoka has joined #ruby-lang
djbkd has quit [Ping timeout: 244 seconds]
him has quit [Ping timeout: 272 seconds]
hendranata_ has quit [Quit: Leaving]
djbkd has joined #ruby-lang
|jemc|_ has joined #ruby-lang
djellemah has joined #ruby-lang
Ropeney has quit [Ping timeout: 244 seconds]
jas02 has quit [Quit: jas02]
djbkd has quit [Ping timeout: 272 seconds]
allomov has quit [Remote host closed the connection]
hahuang65 has joined #ruby-lang
jas02 has joined #ruby-lang
JoshuaPaling has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
fedexo has quit [Ping timeout: 256 seconds]
allomov has joined #ruby-lang
t0rrieri has joined #ruby-lang
riotjones has joined #ruby-lang
Torrieri has quit [Ping timeout: 252 seconds]
hendranata_ has joined #ruby-lang
AlexAltea has joined #ruby-lang
jacaballero has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
|jemc|_ has quit [Ping timeout: 246 seconds]
ta has quit [Remote host closed the connection]
allomov has quit [Remote host closed the connection]
djbkd has joined #ruby-lang
ur5us has quit [Remote host closed the connection]
skade has joined #ruby-lang
bruno- has joined #ruby-lang
bruno- has quit [Ping timeout: 245 seconds]
allomov has joined #ruby-lang
ur5us has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
workmad3 has joined #ruby-lang
skade has joined #ruby-lang
amclain has quit [Quit: Leaving]
workmad3 has quit [Ping timeout: 252 seconds]
djbkd has quit []
rippa has joined #ruby-lang
bertocode has joined #ruby-lang
solars has joined #ruby-lang
kwd has joined #ruby-lang
jas02 has quit [Quit: jas02]
jas02 has joined #ruby-lang
hemanthsoni has joined #ruby-lang
<hemanthsoni> hey guys, i'm a newbie ruby dev trying one of the basic challenges on hackerrank and i cant seem to figure out what i'm doing wrong - is this a good place to ask for help?
bturker has quit [Remote host closed the connection]
<womble> hemanthsoni: Yes.
<hemanthsoni> http://h.soni.im/1FQTx0l <- here is the code i wrote to solve this challenge -> https://www.hackerrank.com/challenges/service-lane
<hemanthsoni> in one of the test cases, my code performs fine: http://h.soni.im/1FQTB0j
<hemanthsoni> but then in another test case, my code returns two every time, instead of the right answer: http://h.soni.im/1FQTDoR
<hemanthsoni> and i seriously have no idea why
ta has joined #ruby-lang
hendranata_ has quit [Ping timeout: 246 seconds]
futilegames has joined #ruby-lang
Iskarlar has joined #ruby-lang
kerunaru has joined #ruby-lang
<hemanthsoni> damn :(
leat3 has quit [Remote host closed the connection]
leat3 has joined #ruby-lang
ta has quit [Read error: Connection reset by peer]
stan has joined #ruby-lang
ta has joined #ruby-lang
leat3 has quit [Ping timeout: 246 seconds]
stan has quit [Client Quit]
jas02 has quit [Quit: jas02]
jas02 has joined #ruby-lang
leat3 has joined #ruby-lang
stan has joined #ruby-lang
sepp2k has joined #ruby-lang
futilegames has quit [Quit: futilegames]
Fooster has joined #ruby-lang
<harlen> that's a well presented quesiton. but which part of the ruby code are you having trouble with?
<hemanthsoni> harlen - what do you mean by presented question?
<harlen> i mean some people ask questions badkly without information. so that was good.
<hemanthsoni> and it's understanding what i'm doing wrong - from looking through and trying to debug step by step, i feel like i am doing everything right
<harlen> but are you having trouble with the algorithm, or are you confused about what the ruby code is doing?
<hemanthsoni> i'm confused by the algorithm
leat3 has quit [Remote host closed the connection]
leat3 has joined #ruby-lang
<hemanthsoni> so my code should be passing every digit in the range that the user inputs into a new array
<hemanthsoni> (line 17 to 19
<harlen> i'd write out why your code gave 2, and if you know or note why the expected output is 1.
<hemanthsoni> yeah thats the thing, my code should not be outputting 2 from my understanding
<hemanthsoni> the user inputs 1, 2, 2, 2, 1 as the original array
Fooster has quit [Ping timeout: 256 seconds]
<hemanthsoni> then i pass the numbers in the index 1 to 4 into a new array
<hemanthsoni> so those would be 2, 2, 2, and 1
<harlen> i mean. you're question is either: "I don't know why my code gave 2." or "I don't know why it is meant to be 1, when the input is 1,4" or "i know why it is meant to be 1, and I know why my code gives 2. I don't know how to solve the problem."
<harlen> which is it?
<hemanthsoni> then i use .min to find the lowest number, which is obviously 1, yet somehow my code is returning 2!
<hemanthsoni> ohhhh
<hemanthsoni> it's the first one - i don't know why my code gave 2
<harlen> gotchya. one sec i'll have a look.
<hemanthsoni> thanks so much, this is driving me nuts
<hemanthsoni> its 4am where i am, can't sleep till i understand what's wrong haha
marr has joined #ruby-lang
ledestin has joined #ruby-lang
sandelius has joined #ruby-lang
djbkd has joined #ruby-lang
stardiviner has quit [Ping timeout: 250 seconds]
djbkd has quit [Ping timeout: 256 seconds]
jas02 has quit [Quit: jas02]
Zen-Zen has quit [Ping timeout: 264 seconds]
kerunaru has quit [Ping timeout: 256 seconds]
znz_jp has quit [Quit: kill -QUIT $$]
<harlen> width[x]
<harlen> which element do you think that gets?
kfpratt has quit [Ping timeout: 244 seconds]
k3asd` has joined #ruby-lang
<ljarvis> moin
<hemanthsoni> width[x] gets whichever loop of the cycle i am
<hemanthsoni> so if they array has 5 items in it and i input that i want from 1 to 4
<hemanthsoni> it would give me the second, third, fourth, and fifth items in the array
<hemanthsoni> check out the question, they already account for the fact that you are entering 1 to n, but arrays go from 0 to n
kfpratt has joined #ruby-lang
<harlen> oh hey. i see it. you need to get the difference between .. and ...
znz_jp has joined #ruby-lang
<harlen> from the question: Note: Calvin has to pass through all segments from index i to index j (both inclusive).
<hemanthsoni> OH GOD DAMN
<hemanthsoni> OH MY GOD
<hemanthsoni> yes that's it, everything works now..
<hemanthsoni> literally a needle in a haystack of code haha
<harlen> haha
<hemanthsoni> thank you so much! now I can sleep in peace
<harlen> tonight was a window into the future of a career in programming.
charliesome has quit [Quit: zzz]
<hemanthsoni> haha i'm no stranger to this
<hemanthsoni> i've done web design or a long time
<hemanthsoni> but object oriented programming is a whole different beast
<harlen> css and scripting?
fujimura has quit [Remote host closed the connection]
fujimura has joined #ruby-lang
<hemanthsoni> yep, html+css, but mostly the graphic design side not the coding
<harlen> well if you've had to do cross browser manual css then i take it back you've seen the worst.
<harlen> anyway i'm outta here. gnight.
<hemanthsoni> i started back when maintaining IE compatibility was a concern, lost a lot of hair because of that
<hemanthsoni> now its all good, just throw up a warning
<hemanthsoni> gnite!
harlen has quit [Quit: Leaving.]
fujimura has quit [Ping timeout: 265 seconds]
jas02 has joined #ruby-lang
hemanthsoni has quit [Ping timeout: 246 seconds]
tomaz_b has joined #ruby-lang
symm- has joined #ruby-lang
fujimura has joined #ruby-lang
<yorickpeterse> morning
lloyd is now known as Lloyd
workmad3 has joined #ruby-lang
stardiviner has joined #ruby-lang
stardiviner has quit [Client Quit]
workmad3 has quit [Ping timeout: 272 seconds]
Le has joined #ruby-lang
Le is now known as Guest80063
Guest80063 has quit [Ping timeout: 246 seconds]
toretore has joined #ruby-lang
jack_ has joined #ruby-lang
charliesome has joined #ruby-lang
yfeldblum has quit [Read error: Connection reset by peer]
dzejrou has joined #ruby-lang
yfeldblum has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
mikecmpbll has joined #ruby-lang
t0rrieri_ has joined #ruby-lang
sarkyniin has joined #ruby-lang
t0rrieri has quit [Ping timeout: 272 seconds]
workmad3 has joined #ruby-lang
skade has joined #ruby-lang
nifoc has quit [Remote host closed the connection]
jack_ has quit [Remote host closed the connection]
yfeldblum has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby-lang
nifoc has joined #ruby-lang
robbyoconnor has joined #ruby-lang
bruno- has joined #ruby-lang
leat3 has quit [Remote host closed the connection]
leat3 has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
bruno- has quit [Ping timeout: 272 seconds]
sarkyniin has quit [Read error: Connection reset by peer]
sarkyniin has joined #ruby-lang
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
leat3 has quit [Ping timeout: 252 seconds]
leat3 has joined #ruby-lang
bruno- has joined #ruby-lang
leat3 has quit [Remote host closed the connection]
leat3 has joined #ruby-lang
cornerma1 has joined #ruby-lang
charliesome_ has joined #ruby-lang
cornerman has quit [Ping timeout: 250 seconds]
cornerma1 is now known as cornerman
apt-get_ has joined #ruby-lang
charliesome has quit [Ping timeout: 256 seconds]
lapide_viridi has joined #ruby-lang
sarkyniin has quit [Ping timeout: 240 seconds]
leat3 has quit [Remote host closed the connection]
leat3 has joined #ruby-lang
xcesariox has joined #ruby-lang
bruno- has quit [Quit: Lost terminal]
bruno- has joined #ruby-lang
sandelius has joined #ruby-lang
ArchRogem has joined #ruby-lang
haraoka has quit [Ping timeout: 264 seconds]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jhass has quit [Quit: Bye]
harly has joined #ruby-lang
sgambino has joined #ruby-lang
djbkd has joined #ruby-lang
jhass has joined #ruby-lang
djbkd has quit [Ping timeout: 256 seconds]
charliesome has joined #ruby-lang
charliesome_ has quit [Ping timeout: 256 seconds]
charliesome has quit [Ping timeout: 256 seconds]
lapide_viridi has quit [Quit: Leaving]
charliesome has joined #ruby-lang
mathie has quit [Quit: Quitting...]
symm- has quit [Ping timeout: 265 seconds]
mathie has joined #ruby-lang
ruby-lang065 has joined #ruby-lang
<ruby-lang065> hey guys
<ruby-lang065> can someone tell me what's wrong with my code?
<ruby-lang065> def alphabetize (arr, rev=false) arr.sort! if rev == true arr.reverse! end return arr end numbers = [5, 6, 8, 15, 66, 4] puts alphabetize (numbers, true)
<ruby-lang065> def alphabetize (arr, rev=false) arr.sort! if rev == true arr.reverse! end return arr end numbers = [5, 6, 8, 15, 66, 4] puts alphabetize (numbers, true)
<ljarvis> ruby-lang065: gist.github.com
<ljarvis> please don't paste into the channel
<ruby-lang065> okay
<ruby-lang065> thanks
<ljarvis> what's the problem?
<ruby-lang065> in this line
<ruby-lang065> puts alphabetize (numbers, true)
<ruby-lang065> it says
<ruby-lang065> (ruby):11: syntax error, unexpected ',', expecting ')' puts alphabetize (numbers, true) ^
<ljarvis> you should remove the whitespace before the opening parenthesis
<tobiasvl> why is there a space before the parenthesis?
<ljarvis> same thing for the method definition
<ruby-lang065> okay, will try
<ruby-lang065> wow, it worked! thanks guys
<ruby-lang065> a space just looked better i thought :p
<ljarvis> ruby-lang065: be careful when you use bang methods (!). Your method will mutate the original array so returning it makes no difference
<ruby-lang065> so return arr was uneccesary?
<ljarvis> also, `if rev == true` can just be `if rev`
<ljarvis> it's unecessary because numbers is mutated by the method, you probably won't want to do that
<ljarvis> so I would have your method create a new array and return that
<ljarvis> otherwise it could lead to confusion
<ruby-lang065> so, you mean like this? https://gist.github.com/anonymous/c35f1b8a7e500be94075
<ljarvis> yes that's better
<ruby-lang065> ah okay, seems unneccesary to me... but I appreciate you guys making me write beautiful code :)
<ruby-lang065> good habits are best learned early
charliesome has quit [Ping timeout: 256 seconds]
<ljarvis> ruby-lang065: imagine that this code is part of a bigger codebase. A couple of 100k lines. Now imagine `numbers` is passed around in many places. If a method in one place mutates the contents then it could lead to confusion in another place (imagine these places being far far apart)
<ljarvis> it's a bad hypothetical but you see my point
charliesome has joined #ruby-lang
<ruby-lang065> yes I understand
<ruby-lang065> Thank you for your help! I'll be back to codecademy
Fooster has joined #ruby-lang
fujimura has quit [Remote host closed the connection]
charliesome has quit [Ping timeout: 256 seconds]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sgambino has joined #ruby-lang
Fooster has quit [Ping timeout: 276 seconds]
sgambino has quit [Client Quit]
charliesome has joined #ruby-lang
sandelius has quit [Quit: Textual IRC Client: www.textualapp.com]
ldnunes has joined #ruby-lang
workmad3 has quit [Ping timeout: 272 seconds]
Tungki has joined #ruby-lang
yfeldblum has quit [Ping timeout: 265 seconds]
Fooster has joined #ruby-lang
dvlwrk has joined #ruby-lang
k3asd` has quit [Ping timeout: 252 seconds]
workmad3 has joined #ruby-lang
<ruby-lang065> is it common practice to mainly use symbols in hashes instead of strings?
auzty has quit [Quit: Leaving]
<tobiasvl> yes, very common as hash keys
dvlwrk has quit [Ping timeout: 240 seconds]
shinnya has joined #ruby-lang
ur5us has quit [Remote host closed the connection]
ledestin has joined #ruby-lang
Tungki has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
skade has joined #ruby-lang
postmodern has quit [Quit: Leaving]
JoshuaPaling has quit [Quit: Textual IRC Client: www.textualapp.com]
jas02 has quit [Quit: jas02]
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
bertocode has quit [Quit: Nettalk6 - www.ntalk.de]
<maloik> xpost from ror as no one seems to know as usual, but how do you invoke a rake task in rails console that requires the rails env? Rake::Task['foo'].invoke tells me it doesnt know how to build task 'environment'
AugustoCesar has joined #ruby-lang
tkuchiki has quit [Ping timeout: 255 seconds]
AugustoCesar has quit [Client Quit]
kr3ssh has joined #ruby-lang
<yorickpeterse> Unsure, but I'd argue it's dirty in the first place to call a Rake task from a console
<yorickpeterse> comic solution: `rake foo`
<maloik> I'm just trying to profile the task
<maloik> wanted to try to avoid the overhead of ``
<maloik> not that there'd be much but still
<maloik> it sort of baffled me I couldnt just invoke it
<maloik> Rails.application.load_tasks apparently
<maloik> lol
kr3ssh has quit [Ping timeout: 265 seconds]
kr3ssh has joined #ruby-lang
<yorickpeterse> meh, 25 lines of setup code for tests
<yorickpeterse> I guess that's what I get for running a DB query involving 6 tables
<yorickpeterse> said test is supposed to test the actual query
<maloik> :D
<maloik> I think we have one that's probably worse in terms of setup
<maloik> just under 2700 lines of code in it
<yorickpeterse> wat
<karma_> That is not the URL you were looking for *sweeps hand over channel*
<yorickpeterse> heh
fujimura has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
nofxx has quit [Ping timeout: 240 seconds]
harly has quit [Quit: Leaving]
skade has joined #ruby-lang
fujimura has quit [Ping timeout: 244 seconds]
kr3ssh has quit [Ping timeout: 264 seconds]
kr3ssh has joined #ruby-lang
symm- has joined #ruby-lang
<maloik> yorickpeterse: to be clear that's the entire test, not just setup
<maloik> still a terrible test to make changes to
<yorickpeterse> ah
<maloik> it basically forces you to write the feature, try it out by hand, then run the tests and adjust until they pass
<maloik> writing the test first is close to impossible because you can never be sure what you did is correct :(
dzejrou has quit [Read error: Connection reset by peer]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
imperator has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
rickrobs has joined #ruby-lang
rickrobs has quit [Remote host closed the connection]
rickrobs has joined #ruby-lang
DivineEntity has joined #ruby-lang
t0rrieri_ has quit [Read error: Connection reset by peer]
t0rrieri_ has joined #ruby-lang
workmad3 has quit [Ping timeout: 256 seconds]
sankaber has joined #ruby-lang
alestuber has joined #ruby-lang
alestuber has quit [Remote host closed the connection]
cryptarium has joined #ruby-lang
malconis has joined #ruby-lang
ridders has joined #ruby-lang
melter has quit [Quit: Client exiting]
allomov has quit [Remote host closed the connection]
cryptarium has quit [Quit: Leaving]
<ridders> Hi I have an array which the objects have been pushed to it from reading the lines of a file. I have duplicate objects and need a new array containing just the unique ones, however when I try .uniq i get returned exactly the same list
stef204 has joined #ruby-lang
<ridders> how can I resolve this?
<ljarvis> ridders: you want a set
<ljarvis> unless it's ordered I guess in which case that would make me question removing lines
<ljarvis> is it ordered?
<ridders> no not ordered. Only need the unique list for refering to to create a new file for each
<ljarvis> yeah I'd use a set then
apt-get__ has joined #ruby-lang
<ridders> thank you, I'll look this up :)
yalue has quit [Quit: return 0;]
jds has joined #ruby-lang
imperator2 has joined #ruby-lang
<ljarvis> ridders: something like this: https://gist.github.com/leejarvis/bef62138844da8e85b20 which ensures the file contents isn't slurped which should help memory. Here's the docs for Set: http://ruby-doc.org/stdlib-2.2.2/libdoc/set/rdoc/Set.html
<ljarvis> weird I thought there was a File.foreach
<ljarvis> maybe getting confused with CSV
<ljarvis> maloik: 2700 line setup file? wat
enebo has joined #ruby-lang
kr3ssh has quit [Ping timeout: 246 seconds]
apt-get_ has quit [Ping timeout: 252 seconds]
<maloik> no no, test file
<maloik> was just saying it had a lot of setup in there
<ljarvis> ah
<ljarvis> phew
skade has joined #ruby-lang
malconis has quit [Remote host closed the connection]
<ljarvis> speaking of files with lots of lines. this command is always interesting when checkout out rails apps
<ljarvis> wc -l app/models/*.rb | sort | tail -2 | head -1
malconis has joined #ruby-lang
alestuber has joined #ruby-lang
woodruffw has quit [Ping timeout: 276 seconds]
<yorickpeterse> heh, none of our Rails models are over 100 lines
<ljarvis> that's unreasonably small
<yorickpeterse> welcome to a competent dev team
<ljarvis> lol
fusillicode1 has quit [Quit: Leaving.]
<ruby-lang065> why is coding so tiring?
<ljarvis> small lines of code does not equal competence so I'll take your word instead
<ljarvis> ruby-lang065: because you need to know when to take a break
<ljarvis> which is now
fusillicode has joined #ruby-lang
bungoman has joined #ruby-lang
<yorickpeterse> longest file in our API thing is 99 lines
sunaku has joined #ruby-lang
<yorickpeterse> "got 99 problems" etc
<ljarvis> is that a mark of success?
<yorickpeterse> cloc lib
<yorickpeterse> SUM: 4483
<yorickpeterse> notbad.jpg
<yorickpeterse> lol: comment: 4724
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ljarvis> Ruby 432 3432 478 18186
skade has quit [Quit: Computer has gone to sleep.]
<ljarvis> files, blanks, comments, code
skade has joined #ruby-lang
<ruby-lang065> can you add another thing after a bang?
<yorickpeterse> No, method names can not be in the form of "foo!bar" for example
<yorickpeterse> wat
<jds> Nokogiri seems fairly heavy on my process's memory usage. Is there any sort of 'close' method that I'm supposed to be calling on the xml document?
<yorickpeterse> why is there 200k LOC of XML?
<flavorjones> jds: Can you provide an example?
fusillicode has quit [Quit: Leaving.]
<ljarvis> ^
<yorickpeterse> jds: No, that's simply due to how DOM parsing works
<ljarvis> yorickpeterse: the yaml and xml is related to fixtures
<yorickpeterse> If you need to parse large documents either use the pull parsing API or the SAX API
fusillicode has joined #ruby-lang
<yorickpeterse> ljarvis: ah
<yorickpeterse> I thought you went all enterprise there for a moment
<yorickpeterse> "oh those are just our WSDLs"
<ljarvis> they include them :(
<ljarvis> lots of soap
allomov has joined #ruby-lang
<yorickpeterse> sounds dirty
<jds> yorickpeterse: I'm finding (I think) that ruby's GC is reluctant to fully clean up the XML document after I've finished using it, I'm guessing because all the memory is held by libxml & so ruby doesn't think it's worth cleaning
<ljarvis> jds: can you show an example?
<jds> 1 sec
<flavorjones> jds: if you've really really stopped using any references to the document or things in the document, then things will get GCed
<flavorjones> but, for example, if you retain a reference to a node, then the entire document will still be resident in memory.
<yorickpeterse> jds: No, Nokogiri takes care of that
<yorickpeterse> Either you still have references to the XML document somewhere, or your input is simply big enough that it uses a lot of memory
<ridders> ljarvis: set is returning the objects like this <Set:0x25ba410>, I was under the impression that was a hash, and .to_s would resolve that and return it to a string, but it doesnt, why?
<ljarvis> ridders: what are you looking for exactly?
<ljarvis> you want a string?
<ridders> yeah I need to return the string not the hash
<ljarvis> are you writing this back out to another file or something?
<ridders> yeah
<ridders> will become filename
<ljarvis> so `cat foo | uniq > bar` wouldn't suffice?
<ljarvis> how big will the files be?
<ljarvis> if you just want the set as a string you need to convert it to an array, i.e lines.to_a.join("\n") -- but if you do just want to copy one file to another removing duplicate lines there are better ways to go about it
<ridders> the array didnt work when I needed to remove duplicates
<ljarvis> yes, so you have a set with unique results, you can then convert that to an array so you can do array stuff on it
<ridders> oh okay
<ljarvis> again, though, that isn't optimal if you just want to copy one file to another and remove duplicate lines
<ljarvis> (if you care about it being optimal)
workmad3 has joined #ruby-lang
izzimus has joined #ruby-lang
<ljarvis> you could do something like this if you do want to use ruby I guess *shrug* https://gist.github.com/leejarvis/3932e725af154111a112
kr3ssh has joined #ruby-lang
tomaz_b has quit [Ping timeout: 276 seconds]
GarethAdams has quit [Quit: So long, and thanks for all the fish!]
GarethAdams has joined #ruby-lang
michael_mbp has quit [Excess Flood]
michael_mbp has joined #ruby-lang
gambl0re has quit [Ping timeout: 255 seconds]
skade has quit [Quit: Computer has gone to sleep.]
apt-get_ has joined #ruby-lang
riotjones has quit [Remote host closed the connection]
alestuber has quit [Ping timeout: 272 seconds]
<ruby-lang065> x = gets.chomp.to_sym
<ruby-lang065> is this wise?
apt-get__ has quit [Ping timeout: 244 seconds]
<ljarvis> it's wise if you want a symbol from a string passed in from STDIN
<ruby-lang065> or should you use the to_sym further along in the program?
<ljarvis> it doesn't matter
<ruby-lang065> okay
<tobiasvl> ruby-lang065: depends what you want to use the symbol for, since it's user input, but sure otherwise it's fine
<ljarvis> my only argument would be that it's probably pointless
k3asd` has joined #ruby-lang
joaomdmoura has joined #ruby-lang
joaomdmoura has quit [Remote host closed the connection]
joaomdmoura has joined #ruby-lang
<apeiros> ruby-lang065: if you're using ruby <2.2, you should generally not to_sym user-input
joaomdmo_ has joined #ruby-lang
joaomdmoura has quit [Read error: Connection reset by peer]
alestuber has joined #ruby-lang
ridders has quit [Quit: Page closed]
<ruby-lang065> how do you state the value of a hash
<ruby-lang065> the key is my_hash[key]
<ruby-lang065> oh i get it
melter has joined #ruby-lang
joaomdmo_ has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 246 seconds]
caseypatrickdris has joined #ruby-lang
<tobiasvl> my_hash[key] returns the value
<tobiasvl> it's basically just a variable. it's like asking how, after doing `x = 1`, you state the value of x. you just write x
shazaum has joined #ruby-lang
senor_jalapeno has joined #ruby-lang
ta has quit [Remote host closed the connection]
ledestin has joined #ruby-lang
skade has joined #ruby-lang
agarie has joined #ruby-lang
sunaku has quit [Ping timeout: 240 seconds]
bruno- has joined #ruby-lang
alestuber has quit [Read error: Connection reset by peer]
ogpastaling has joined #ruby-lang
ogpastaling has quit [Remote host closed the connection]
ogpastaling has joined #ruby-lang
alestuber has joined #ruby-lang
kr3ssh has quit [Ping timeout: 276 seconds]
jas02 has joined #ruby-lang
joaomdmoura has joined #ruby-lang
skade has quit [Read error: Connection reset by peer]
skade has joined #ruby-lang
alestuber has quit [Ping timeout: 272 seconds]
alestuber has joined #ruby-lang
alestuber has quit [Remote host closed the connection]
whippythellama has joined #ruby-lang
caseypatrickdris has quit [Remote host closed the connection]
solars has quit [Ping timeout: 272 seconds]
|jemc| has joined #ruby-lang
caseypatrickdris has joined #ruby-lang
chadwtaylor has joined #ruby-lang
caseypatrickdris has quit [Remote host closed the connection]
Fooster has quit [Ping timeout: 255 seconds]
akkad has quit [Excess Flood]
workmad3 has quit [Ping timeout: 265 seconds]
araujo has joined #ruby-lang
araujo has quit [Max SendQ exceeded]
akkad has joined #ruby-lang
woodruffw has joined #ruby-lang
workmad3 has joined #ruby-lang
dorei has joined #ruby-lang
riotjones has joined #ruby-lang
jas02_ has joined #ruby-lang
jas02 has quit [Ping timeout: 240 seconds]
jas02_ is now known as jas02
akkad has quit [Excess Flood]
joaomdmoura has quit [Remote host closed the connection]
riotjones has quit [Ping timeout: 264 seconds]
joaomdmoura has joined #ruby-lang
jas02_ has joined #ruby-lang
jas02 has quit [Ping timeout: 252 seconds]
jas02_ is now known as jas02
charliesome has quit [Quit: zzz]
akkad has joined #ruby-lang
banister has joined #ruby-lang
dhjondoh has quit [Quit: dhjondoh]
Guest77951 has joined #ruby-lang
Guest77951 has quit [Changing host]
Guest77951 has joined #ruby-lang
Guest77951 is now known as bougyman
charliesome has joined #ruby-lang
tectonic has joined #ruby-lang
senor_jalapeno has quit [Quit: Leaving]
skade has quit [Quit: Computer has gone to sleep.]
atomical has quit [Ping timeout: 248 seconds]
atomical has joined #ruby-lang
rcvalle has joined #ruby-lang
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
Fooster has joined #ruby-lang
bungoman has quit [Remote host closed the connection]
atomical_ has joined #ruby-lang
ascarter has joined #ruby-lang
joaomdmoura has quit [Remote host closed the connection]
bungoman has joined #ruby-lang
ascarter has quit [Max SendQ exceeded]
ascarter has joined #ruby-lang
ascarter has quit [Max SendQ exceeded]
atomical has quit [Ping timeout: 248 seconds]
ascarter has joined #ruby-lang
allomov has quit [Remote host closed the connection]
ascarter has quit [Max SendQ exceeded]
ascarter has joined #ruby-lang
rippa has joined #ruby-lang
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ascarter has quit [Max SendQ exceeded]
ascarter has joined #ruby-lang
ascarter has quit [Max SendQ exceeded]
ascarter has joined #ruby-lang
ascarter has quit [Max SendQ exceeded]
ascarter has joined #ruby-lang
ascarter has quit [Max SendQ exceeded]
ascarter has joined #ruby-lang
ascarter has quit [Max SendQ exceeded]
ur5us has joined #ruby-lang
ascarter has joined #ruby-lang
ascarter has quit [Max SendQ exceeded]
ascarter has joined #ruby-lang
whippythellama has quit [Quit: whippythellama]
ascarter has quit [Max SendQ exceeded]
alestuber has joined #ruby-lang
that1guy has joined #ruby-lang
ascarter has joined #ruby-lang
him has joined #ruby-lang
ur5us has quit [Ping timeout: 245 seconds]
ascarter has quit [Max SendQ exceeded]
tectonic has quit []
ascarter has joined #ruby-lang
ascarter has quit [Max SendQ exceeded]
alestuber has quit [Ping timeout: 246 seconds]
ascarter has joined #ruby-lang
ascarter has quit [Max SendQ exceeded]
Astrologos_ has joined #ruby-lang
ascarter has joined #ruby-lang
elev has joined #ruby-lang
ascarter has quit [Max SendQ exceeded]
<elev> what is stdin.gets.chomp
<elev> difference between that and gets.chomp?
ascarter has joined #ruby-lang
dorei has quit [Ping timeout: 256 seconds]
__butch__ has joined #ruby-lang
dvlwrk has joined #ruby-lang
ascarter has quit [Max SendQ exceeded]
atomical_ has quit [Ping timeout: 248 seconds]
atomical has joined #ruby-lang
ascarter has joined #ruby-lang
<elev> someone on here?
elev has left #ruby-lang [#ruby-lang]
bruno- has quit [Ping timeout: 265 seconds]
ascarter has quit [Max SendQ exceeded]
gambl0re has joined #ruby-lang
ascarter has joined #ruby-lang
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sepp2k has quit [Quit: Leaving.]
chinmay_dd has joined #ruby-lang
skinny_much has quit [Quit: Ruh Roh...]
that1guy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ogpastaling has quit [Remote host closed the connection]
fusillicode1 has joined #ruby-lang
atomical_ has joined #ruby-lang
tkuchiki has joined #ruby-lang
delongG_ has joined #ruby-lang
k3asd` has quit [Ping timeout: 256 seconds]
skinny_much has joined #ruby-lang
him has quit [Ping timeout: 272 seconds]
fusillicode has quit [Ping timeout: 272 seconds]
stan has quit [Ping timeout: 256 seconds]
melter has quit [Remote host closed the connection]
atomical has quit [Ping timeout: 248 seconds]
whippythellama has joined #ruby-lang
alestuber has joined #ruby-lang
melter has joined #ruby-lang
jas02 has quit [Quit: jas02]
tkuchiki has quit [Ping timeout: 246 seconds]
that1guy has joined #ruby-lang
him has joined #ruby-lang
bungoman has quit [Remote host closed the connection]
ArchRogem has quit [Quit: Textual IRC Client: www.textualapp.com]
that1guy has left #ruby-lang [#ruby-lang]
bungoman has joined #ruby-lang
michaeldeol has joined #ruby-lang
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
allomov has joined #ruby-lang
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bturker has joined #ruby-lang
Zen-Zen has joined #ruby-lang
ascarter has joined #ruby-lang
ascarter has quit [Read error: Connection reset by peer]
mikecmpbll has quit [Ping timeout: 256 seconds]
syngress has joined #ruby-lang
<syngress> Hi, anyone can show me how to solve it in notworking_controller.rb ? https://gist.github.com/anonymous/e05ea73f762439d7880e thanks
leat3 has quit [Remote host closed the connection]
leat3 has joined #ruby-lang
ogpastaling has joined #ruby-lang
alestuber has quit [Ping timeout: 276 seconds]
marr has quit [Ping timeout: 276 seconds]
alestuber has joined #ruby-lang
dorei has joined #ruby-lang
Astrologos_ has quit [Ping timeout: 244 seconds]
leat3 has quit [Remote host closed the connection]
elev has joined #ruby-lang
leat3 has joined #ruby-lang
<elev> online someone?
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bruno- has joined #ruby-lang
victortyau has joined #ruby-lang
<him> yes
<agarie> yes
RobertBirnie has joined #ruby-lang
charliesome has quit [Quit: zzz]
djbkd has joined #ruby-lang
malconis has joined #ruby-lang
leat3 has quit [Remote host closed the connection]
leat3 has joined #ruby-lang
allomov has quit [Remote host closed the connection]
wallerdev has joined #ruby-lang
nertzy has joined #ruby-lang
agarie has quit []
leat3 has quit [Remote host closed the connection]
leat3 has joined #ruby-lang
alestuber has quit [Read error: Connection reset by peer]
bturker has quit [Ping timeout: 244 seconds]
yalue has joined #ruby-lang
elev has left #ruby-lang [#ruby-lang]
bruno- has quit [Read error: No route to host]
alestuber has joined #ruby-lang
futilegames has joined #ruby-lang
hahuang65 has quit [Ping timeout: 276 seconds]
him has quit [Quit: Leaving]
Missphoenix has quit [Quit: Leaving]
joaomdmoura has joined #ruby-lang
fumduq has quit [Quit: die()]
Lloyd is now known as lloyd
fumduq has joined #ruby-lang
<yorickpeterse> maybe
bturker_ has joined #ruby-lang
iamninja has joined #ruby-lang
marr has joined #ruby-lang
leat3 has quit [Remote host closed the connection]
leat3 has joined #ruby-lang
deg has joined #ruby-lang
aaeron has joined #ruby-lang
futilegames has quit [Quit: futilegames]
sunaku has joined #ruby-lang
delongG_ has quit [Remote host closed the connection]
Guest92559 has quit [Ping timeout: 245 seconds]
Iskarlar has joined #ruby-lang
nertzy has quit [Quit: This computer has gone to sleep]
postmodern has joined #ruby-lang
aaeron has quit [Quit: aaeron]
skade has joined #ruby-lang
yfeldblum has joined #ruby-lang
hahuang65 has joined #ruby-lang
joaomdmoura has quit [Read error: Connection reset by peer]
joaomdmoura has joined #ruby-lang
aaeron has joined #ruby-lang
aaeron has quit [Client Quit]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
aaeron has joined #ruby-lang
mikecmpbll has joined #ruby-lang
joaomdmoura has quit [Read error: Connection reset by peer]
joaomdmoura has joined #ruby-lang
delongG_ has joined #ruby-lang
hahuang65 has quit [Quit: WeeChat 1.1.1]
hahuang65 has joined #ruby-lang
delongG_ has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 244 seconds]
ta has joined #ruby-lang
that1guy has joined #ruby-lang
ogpastaling has quit [Remote host closed the connection]
ogpastaling has joined #ruby-lang
that1guy has left #ruby-lang [#ruby-lang]
delongG_ has joined #ruby-lang
ogpastaling has quit [Remote host closed the connection]
syngress has quit [Remote host closed the connection]
jhass has quit [Quit: Bye]
shazaum has quit [Changing host]
shazaum has joined #ruby-lang
yfeldblum has quit [Ping timeout: 265 seconds]
delongG_ has quit [Remote host closed the connection]
ogpastaling has joined #ruby-lang
bungoman has quit [Remote host closed the connection]
alestuber has quit [Read error: Connection reset by peer]
alestuber has joined #ruby-lang
baweaver has joined #ruby-lang
bungoman has joined #ruby-lang
jhass has joined #ruby-lang
kr3ssh has joined #ruby-lang
jhass has quit [Excess Flood]
jhass has joined #ruby-lang
delongG_ has joined #ruby-lang
xcesariox has joined #ruby-lang
djbkd has quit [Quit: My people need me...]
baweaver has quit [Ping timeout: 255 seconds]
unreal_ is now known as unreal
chinmay_dd has quit [Quit: Leaving]
baweaver has joined #ruby-lang
joaomdmoura has quit [Remote host closed the connection]
delongG_ has quit [Remote host closed the connection]
joaomdmoura has joined #ruby-lang
jhass has quit [Ping timeout: 272 seconds]
kr3ssh has quit [Ping timeout: 264 seconds]
jhass has joined #ruby-lang
delongG_ has joined #ruby-lang
alestuber has quit [Ping timeout: 264 seconds]
ta has quit [Remote host closed the connection]
alestuber has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
ta has joined #ruby-lang
skade has joined #ruby-lang
kr3ssh has joined #ruby-lang
thebastl has joined #ruby-lang
joaomdmoura has quit [Read error: Connection reset by peer]
joaomdmo_ has joined #ruby-lang
nofxx has joined #ruby-lang
yalue has quit [Read error: Connection reset by peer]
meekalpha has quit [Remote host closed the connection]
ash__ has quit [Remote host closed the connection]
djbkd has joined #ruby-lang
bruno- has joined #ruby-lang
thebastl has quit [Quit: Leaving...]
tdy has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
alestuber has quit [Ping timeout: 272 seconds]
ruby-lang065 has quit [Quit: Page closed]
alestuber has joined #ruby-lang
joaomdmo_ has quit [Read error: Connection reset by peer]
joaomdmoura has joined #ruby-lang
momomomomo has joined #ruby-lang
kr3ssh has quit [Ping timeout: 256 seconds]
yfeldblum has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
existensil has quit [Ping timeout: 255 seconds]
ecnalyr has joined #ruby-lang
chinmay_dd has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
alestuber has quit [Ping timeout: 245 seconds]
skade has quit [Quit: Computer has gone to sleep.]
alestuber has joined #ruby-lang
djbkd has joined #ruby-lang
danzilio has joined #ruby-lang
skade has joined #ruby-lang
existensil has joined #ruby-lang
skade has quit [Ping timeout: 244 seconds]
chinmay_dd has quit [Ping timeout: 244 seconds]
gix has quit [Ping timeout: 240 seconds]
dellavg_ has joined #ruby-lang
kadoppe has quit [Ping timeout: 250 seconds]
kadoppe has joined #ruby-lang
gix has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
jacaballero has joined #ruby-lang
henrikhodne has quit [Ping timeout: 272 seconds]
joaomdmoura has quit [Ping timeout: 246 seconds]
joaomdmoura has joined #ruby-lang
skade has joined #ruby-lang
sunaku has quit [Ping timeout: 256 seconds]
bungoman has quit [Remote host closed the connection]
faces has joined #ruby-lang
ledestin has joined #ruby-lang
yfeldblum has joined #ruby-lang
face has quit [Ping timeout: 272 seconds]
joaomdmo_ has joined #ruby-lang
joaomdmoura has quit [Read error: Connection reset by peer]
baweaver has joined #ruby-lang
benanne has joined #ruby-lang
djbkd has joined #ruby-lang
allomov has joined #ruby-lang
alestube_ has joined #ruby-lang
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
alestuber has quit [Ping timeout: 265 seconds]
alestube_ has quit [Ping timeout: 250 seconds]
alestuber has joined #ruby-lang
<headius> yorickpeterse: what's the latest with oga...I have some free cycles to look at perf
<headius> what with 9k and 1.7 releases out
ur5us has joined #ruby-lang
kr3ssh has joined #ruby-lang
jacaballero has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
leat4 has joined #ruby-lang
leat3 has quit [Remote host closed the connection]
moretti has joined #ruby-lang
ta has quit [Remote host closed the connection]
ta has joined #ruby-lang
<yorickpeterse> headius: I'm actually profiling the big 3 in the coming two weeks or so
<yorickpeterse> it's basically all that's left to do for 1.0
fusillicode1 has quit [Ping timeout: 252 seconds]
baweaver has quit [Remote host closed the connection]
<headius> got some benchmarks you can point me at?
<headius> I'm interested in comparing 1.7 and 9k too, so this is useful to us :-)
<yorickpeterse> The first one is used to benchmark the logic for matching XML nodes by name/namespace
<yorickpeterse> The second one simply measures the average runtime of an XPath query
<yorickpeterse> if you clone the repo, run `bundle install && rake fixtures generate`, then you can just run the benchmarks with `ruby`
leat4 has quit [Remote host closed the connection]
leat4 has joined #ruby-lang
<headius> ok
<headius> I'll poke at it a bit today
<yorickpeterse> Does jruby have a cache for respond_to? calls?
<headius> 1.7 does but I haven't done that for 9k yet
<yorickpeterse> hmm
<headius> it's complicated by respond_to_missing
<yorickpeterse> Some parts of this code use respond_to?, MRI doesn't seem to have a cache for this that I can find
__butch__ has quit [Quit: Leaving.]
<yorickpeterse> So removing it there (which breaks a bunch of things/expectations I can't really break) does make MRI a bit faster
<headius> does it seem to be a perf issue?
<headius> ah
<headius> hmmm
<headius> which bench shows that the most?
skade has quit [Quit: Computer has gone to sleep.]
<yorickpeterse> The big xml benchmark goes from ~1,9 to ~1,8 seconds, so it's not really worth breaking everything
ybathia has joined #ruby-lang
skade has joined #ruby-lang
<headius> no effect under jruby or rbx?
<yorickpeterse> Haven't tested jruby yet, running rbx atm
<yorickpeterse> hm, for rbx there's no significant difference
<yorickpeterse> considering it caches things that's not entirely surprising
skade has quit [Client Quit]
<headius> I don't remember if I ever saw improvement from respond_to caching because we have class-level caches too
<headius> so it only saves a couple lookups
dellavg_ has quit [Ping timeout: 264 seconds]
<yorickpeterse> well, in case of Oga it does a few million calls to respond_to?
<yorickpeterse> Basically one call for every XML node (elements, text, etc) in the document
<yorickpeterse> (at least in these benchmarks)
tubbo` has joined #ruby-lang
tubbo has quit [Read error: Connection reset by peer]
<headius> 9k with no extra flags looks to be about 2x MRI here
<headius> on node_matches anyway
<headius> going go try a couple other configurations
<headius> we still don't JIT blocks so that can weird up numbers a little
joaomdmo_ has quit [Remote host closed the connection]
bungoman has joined #ruby-lang
<yorickpeterse> For the xpath stuff there are also a ton of allocations happening, which I can only remove by rewriting substantial parts of it
joaomdmoura has joined #ruby-lang
<yorickpeterse> basically now every method has its own local stack passed in as an argument
<yorickpeterse> But often those objects aren't really used other than for iteration
<headius> preallocate? reuse?
<yorickpeterse> turning it into a proper stack based VM should reduce the amount of allocations quite heavily
<yorickpeterse> (right now it's a bit of an odd mix between an AST runner and a stack machine)
<yorickpeterse> But that's something for post 1.0 as it will take a few weeks to complete
allomov has quit [Remote host closed the connection]
<yorickpeterse> in such a case I probably have to write a compiler too, raw XPath ASTs are quite painful to walk through
<chrisseaton> yorickpeterse: can you JIT XPath to rbx bytecode from within an application running on rbx?
tubbo` has quit [Ping timeout: 244 seconds]
<headius> woo, more like 3x with invokedynamic on
howdoicomputer_ has quit [Quit: howdoicomputer_]
<yorickpeterse> chrisseaton: haha
<yorickpeterse> Probably not, but it would be a fun feature: "* built-in JIT that compiles XPath to JRuby/Rubinius bytecode"
baweaver has joined #ruby-lang
<|jemc|> sounds like a fun use for Module#dynamic_method :)
<chrisseaton> yorickpeterse: I think sprintf in rbx JITs to bytecode already
<|jemc|> pegleromyces uses that extensively
<headius> okeedokee...time for some allocation profiling
<chrisseaton> we're doing it for pack as well and it's great - we can inline and constant fold through it when it's been compiled
<yorickpeterse> chrisseaton: the problem is that xpath relies on some pretty specific logic of which there are no instructions present
<headius> I assume rbx bytecode is turing complete :-)
<|jemc|> heh
<yorickpeterse> might as well include inline x86 assembly then
<yorickpeterse> can't get closer to the bear metal
nofxx has quit [Ping timeout: 272 seconds]
<chrisseaton> yeah but my compiler can choose better instructions and scheduling than I can!
<chrisseaton> Snippets like V8 do are great, but they don't compose - two snippets in sequence may not be as good as something that was generated for both operations by a compiler
<chrisseaton> And your compiler can't constant fold inline assembly
<headius> so many strings
<yorickpeterse> headius: haha yeah
<yorickpeterse> 10mb of XML can produce quite the String allocations
<headius> I did a full alloc histo for node_matches
<yorickpeterse> huh that's interesting, node_matches itself is not supposed to allocate any Strings
<yorickpeterse> I specifically moved the only string allocations ("*") into a constant to combat that
<yorickpeterse> though maybe one of its callees allocates strings
<headius> odd
<headius> if ast_node.type == :type_test
<headius> that's the line for the first RubyString alloc
<yorickpeterse> huh, both are symbols
<yorickpeterse> that's odd
<headius> ah-ha
<headius> it ends up using default Comparable == behavior, which does <=>, which in JRuby converts Symbol to String to compare
<headius> I think
<yorickpeterse> hmm
<headius> Symbol#<=>
<|jemc|> time for #equal?, then
<headius> I'm not sure what ast_node.type is here
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<yorickpeterse> headius: it returns a symbol that describes the type of an AST node
<headius> hmm
<yorickpeterse> e.g. :type_test, :test, :call, etc
<|jemc|> I hit this optimization recently in myco as well - avoiding Symbol#== in a hot path
nertzy has joined #ruby-lang
<|jemc|> where Symbol#equal? would do
<yorickpeterse> lemme see if that makes any difference on MRI/rbx
<|jemc|> just a raw guess, but reversing the order may help it be inlined easier
<headius> |jemc|: weird... Symbol should just define #==
<headius> yup, MRI coerces to String too
<|jemc|> to where you are always calling #equal? on the symbol you are checking for
<headius> so it can use String#<=>
<yorickpeterse> heh, on MRI Symbol#equal? is actually slower
<headius> that is really strange
_rgn has joined #ruby-lang
_rgn has left #ruby-lang [#ruby-lang]
<yorickpeterse> but on rbx it seems to be way faster
<|jemc|> :)
<headius> jruby gets a boost as well
moretti has quit [Remote host closed the connection]
<yorickpeterse> as in, about 1,7x faster
<headius> looks like with indy that puts some of these at more like 4x MRI
woodruffw_ has joined #ruby-lang
<headius> a good start :-)
woodruffw has quit [Read error: Connection reset by peer]
<yorickpeterse> hm, perf on MRI seems to be a bit jumpy, so not sure if it's actually slower
<yorickpeterse> well, we'll go with Symbol#equal?
<|jemc|> yorickpeterse: curiosity: do you get a difference on rbx by using one order vs the other?
k3asd` has joined #ruby-lang
<|jemc|> for which of the symbols you actually call the method on
<yorickpeterse> eh haven't tried, but I'd be surprised
<yorickpeterse> also that would be so implementation specific I'm not sure if I'd event want it
<ybathia> Hi, How do I parse a hash and store it in a yaml file? Any examples or help?
woodruffw_ is now known as woodruffw
<headius> and |jemc|
<headius> I am guessing MRI has special logic for == call sites that could be influencing this
<yorickpeterse> hmm
<headius> oh wait a second
<headius> MRI DOES define its own Symbol#== now
lele is now known as Guest24
<|jemc|> headius: heh, but how would you know without a language spec?
<headius> |jemc|: how would you know with a language spec if the behavior was identical?
<yorickpeterse> headius: so to confirm, on JRuby Symbol#equal? is indeed faster than Symbol#==?
kr3ssh has quit [Ping timeout: 256 seconds]
<headius> yorickpeterse: yes
<headius> but it seems we need to impl == which would make that pointless
<|jemc|> it's not identical if you, for example, include a module into the Symbol class that defines that method
joaomdmoura has quit [Remote host closed the connection]
<yorickpeterse> headius: ah ok
* yorickpeterse changes all his projects to use Symbol#equal? for webscale
<|jemc|> in the previous behavior, your new #== would shadow the one defined in Comparable
<|jemc|> in the new behavior, your new #== is shadowed by the one defined in Symbol
<|jemc|> making you have to prepend
<headius> |jemc|: you could also just see if Symbol defines the method without checking parent classes
yfeldblum has quit [Remote host closed the connection]
sunaku has joined #ruby-lang
<yorickpeterse> \0/ big xml bench is now at 1.829 sec instead of 1.90something
yfeldblum has joined #ruby-lang
<yorickpeterse> a massive 80ms
benanne has quit [Quit: kbai]
<yorickpeterse> assuming that's not just my CPU juggling tasks around
<headius> that's rbx?
<yorickpeterse> No, MRI
momomomomo has quit [Quit: momomomomo]
<headius> ok, that's one thing fixed
<headius> I'll get an updated alloc profile
<headius> oh oops, that was java 7
<headius> 8 should do a little better
ldnunes has quit [Quit: Leaving]
<headius> ah, masgn is next up
<headius> ns, name = *ast_node.children
<headius> forcing children into an array there
<headius> and then throwing it away
<yorickpeterse> children returns an existing array
<yorickpeterse> I actually checked if simple index references were better, but at least on MRI/rbx I didn't really notice a difference
<yorickpeterse> that is: ns = ast_node.children[0]; ....
<headius> hmm
<yorickpeterse> That actually used to be *ast_node, ("ast_node" is an instance of AST::Node which defines "to_a" which just returns "children")
<headius> ah, we dup it for processing
<yorickpeterse> That however meant an extra method call, "slowing" things down
<headius> ok
Voker57 has joined #ruby-lang
nertzy has quit [Quit: This computer has gone to sleep]
<headius> hmm yeah hard to fix here because the splat is a separate instruction
<headius> might introduce a separate instruction for a throw-away splat
<headius> so if it's already an array it just returns it rather than preemptively duping
Asher has quit [Quit: Leaving.]
Asher has joined #ruby-lang
sunaku has quit [Ping timeout: 246 seconds]
yfeldblum has quit [Quit: Leaving...]
<headius> MRI and rbx both create a new array here too
<headius> masgn returning an array is such a hassle.
baweaver has quit [Remote host closed the connection]
<headius> woah, my jdk9 build is WAY faster
<headius> 6-7x MRI
<yorickpeterse> hmm...I'll re-run it when using index references instead of a splat
yfeldblum has joined #ruby-lang
bb010g has joined #ruby-lang
Astrologos_ has joined #ruby-lang
<yorickpeterse> hm, on rbx there's some difference but it's not very consistent
<headius> on JRuby it may decrease because [] sometimes needs $~
<headius> so we do more call overhead in here to handle it
<headius> .at avoids that, but obviously only on JRuby
<yorickpeterse> Not really a big difference on MRI either
dorei has quit [Ping timeout: 244 seconds]
<yorickpeterse> lemme try jruby
<yorickpeterse> hm, I still have 9k-pre1
<headius> don't use that
<headius> pre1 had almost no opto in the jit
<yorickpeterse> I'll download pre2
workmad3 has joined #ruby-lang
sunaku has joined #ruby-lang
<headius> that's what I have at the moment... second result is indexed with no masgn and using #at
<headius> MRI is indexed version too
<yorickpeterse> hmm
alestuber has quit [Ping timeout: 250 seconds]
Fooster has quit [Ping timeout: 272 seconds]
woodruffw has quit [Quit: And then he took off.]
<yorickpeterse> at least on MRI using [] shouldn't matter vs #at
woodruffw has joined #ruby-lang
<headius> strangely, [] is a bit faster
<yorickpeterse> since it delegates #[] to #at if the argument is a fixnum
<yorickpeterse> IIRC
<headius> actually it may be noise
<headius> next run was slower
momomomomo has joined #ruby-lang
<yorickpeterse> Yeah, running these benchmarks on a laptop/desktop doesn't always produce very accurate results
<yorickpeterse> I should probably spin up an EC2 instance for this this weekend
<headius> jruby doesn't suffer as much from [] as I expected, but it loses the gains
<darix> yorickpeterse: so you have even more background noise to make your results "useful" ?:)
<headius> so 15% forward, 15% back depending on impl
<yorickpeterse> e.g. one time this benchmark runs with 1.1m i/s
<yorickpeterse> then 756k i/s
<yorickpeterse> darix: hush, EC2's network and virtualization is flawless
<darix> yorickpeterse: turn off the cpu power mgmt maybe
<darix> for more reliable results
<yorickpeterse> I tend to still get jumps when I plug in my adapter
skade has joined #ruby-lang
alestuber has joined #ruby-lang
<yorickpeterse> headius: did pre2 optimize anything regarding bootup times? It seems a lot faster to boot than pre1
<headius> pre2 optimized many things
<yorickpeterse> e.g. I remember that the extension compilation process of Oga used to take forever under jruby
<headius> pre1 optimized very few things
<yorickpeterse> ah
baweaver has joined #ruby-lang
workmad3 has quit [Ping timeout: 276 seconds]
<headius> any pre1 numbers you have are likely way slower than they should be
<yorickpeterse> I get around 2M i/s on JRuby 9k-pre2 for the name only bench
<yorickpeterse> not bad
<headius> java 7 or 8?
<headius> oh, you probably didn't run with indy either
<yorickpeterse> 1.7
<yorickpeterse> No, just stock options
<yorickpeterse> interesting enough benchmark/xpath/evaluator/big_xml_average_bench.rb is actually about a second slower than MRI
<yorickpeterse> hm, I wonder if replacing java7 with java8 messes things up
<headius> something must be wrong with 1.7 for that bench
<headius> indy is definitely faster on 9k.pre2... on java 9 it's over 2x faster than non-indy
skade has quit [Read error: Connection reset by peer]
<yorickpeterse> allrighty, java8 installed
<headius> I'm not really interested in 1.7 perf anymore, but that's interesting
skade has joined #ruby-lang
<yorickpeterse> heh, using java8 it seems tue big XML benchmark is actually even slower
<yorickpeterse> lemme try using invoke dynamic & friends
<yorickpeterse> Ah, much better
<yorickpeterse> now it's actually faster than MRI
<yorickpeterse> That's using "jruby -Xcompile.invokedynamic=true -Xjit.threshold=0 benchmark/xpath/evaluator/big_xml_average_bench.rb"
<yorickpeterse> (I get around 1,3 sec on JRuby)
imperator has quit [Quit: This computer has gone to sleep]
<headius> nice
<yorickpeterse> it's around 1,8 on MRI 2.2
<headius> not faster enough for me :-)
<yorickpeterse> oh yeah, I somewhere hope to get this under 500ms
<yorickpeterse> but that will be quite difficult
<headius> let's have a look at that one
ecnalyr has quit [Remote host closed the connection]
<yorickpeterse> well, to achieve that I'd have to do some proper refactoring
<yorickpeterse> Right now xpath queries result in more allocations than really needed
<headius> after it warms up looks like about 6 young GCs per cycle
<yorickpeterse> Not surprising, a lot of the objects are short lived
<yorickpeterse> Rbx profiler output also shows most time being spent in the young GC
<headius> well, we're not spending any time there
<headius> 6 young GCs works out to under 0.1s
<yorickpeterse> (which IIRC is still stop-the-world-for-a-little-while)
<headius> probably under 0.05 because it runs 8 threads
imperator2 has quit [Quit: Valete!]
<headius> I'll try an alloc profile
joaomdmoura has joined #ruby-lang
<headius> yorickpeterse: 1.7.21 and 9k.next will have the Symbol#== fix, if you'd rather not use #equals? there
<yorickpeterse> Ah
<yorickpeterse> well, I'm signing off for the night, need to make a bigger battle plan for this xpath stuff tomorrow seeing how I'm running out of possible micro optimizations
<yorickpeterse> I really would like to just have a big red "MAKE WEBSCALE" button
<yorickpeterse> like one of those old turbo buttons
<headius> yorickpeterse: if I find anything that stands out in the big xml bench I'll let you know or file a PR
<headius> seems like there's some good opportunities here, at least from what I can see in JRuby
<yorickpeterse> oh yeah, I figure if somebody wants to benchmark their Ruby implementation they should run some Oga benchmarks
jacaballero has joined #ruby-lang
joaomdmoura has quit [Ping timeout: 240 seconds]
<yorickpeterse> anyway, thanks for the help
<headius> well, I've found two opportunities in JRuby already, so that's good :-)
<headius> do these benchmarks have an equivalent for nokogiri, to compare?
whippythellama has quit [Quit: whippythellama]
<yorickpeterse> headius: there's one which compares nokogiri, oga, ox and rexml
<yorickpeterse> which is...
<yorickpeterse> benchmark/xml/parser/comparing_gems_bench.rb
joaomdmoura has joined #ruby-lang
<yorickpeterse> you'll need to install ox/nokogiri manually though, they're not in the gemspeec
<yorickpeterse> * gemspec
<headius> ok no problem
<headius> I'm just curious now
<headius> considering how much faster jruby runs this than MRI
joaomdmoura has quit [Remote host closed the connection]
delongG_ has quit [Remote host closed the connection]
alestuber has quit [Ping timeout: 252 seconds]
<darix> headius: probably cheating!:p
<headius> ugh, lots of block overhead
<darix> that said ignore me. i am super tired.
<headius> darix: hah...no, we're just awesome
<darix> headius: so you say i should stop fighting with rbx packaging and do jruby?:p
delongG_ has joined #ruby-lang
alestuber has joined #ruby-lang
<headius> I would never say such a thing
baweaver has quit [Remote host closed the connection]
henrikhodne has joined #ruby-lang
jacaballero_ has joined #ruby-lang
joaomdmoura has joined #ruby-lang
shazaum has quit [Quit: This computer has gone to sleep]
JoshuaPaling has joined #ruby-lang
victortyau has quit [Quit: Leaving]
baweaver has joined #ruby-lang
jacaballero has quit [Ping timeout: 272 seconds]
<zenspider> headius: I'll say it. ;)
delongG_ has quit [Remote host closed the connection]
joaomdmoura has quit [Remote host closed the connection]
yfeldblu_ has joined #ruby-lang
caseypatrickdris has joined #ruby-lang
yfeldblum has quit [Ping timeout: 265 seconds]
<darix> zenspider: now that i learned that jruby now uses maven...
Astrologos_ has quit []
dorei has joined #ruby-lang
gambl0re has quit [Ping timeout: 256 seconds]
jacaballero_ has quit [Read error: Connection reset by peer]
VladGh has joined #ruby-lang
jacaballero has joined #ruby-lang
zendrix has joined #ruby-lang
alestuber has quit [Ping timeout: 256 seconds]
<zendrix> if I wanted to use gpg inside of a ruby script how would I go about doing so, without using a 3rd party library.
<zendrix> also can you see any drawbacks to doing this?
caseypatrickdris has quit [Remote host closed the connection]
delongG_ has joined #ruby-lang
alestuber has joined #ruby-lang
<darix> hmm most of the libraries wrapping the binary are really old
<zenspider> you or someone asked this exact same question last week
skade has quit [Ping timeout: 256 seconds]
<zendrix> zenspider: was not me
<zendrix> i am new to ruby but very familiar with python
<zendrix> is there a hacky way that I can work with stdin, stdout to use `gpg`
<darix> zendrix: https://rubygems.org/gems/gpgme - seems more maintained
<zendrix> emphasizing the backticks
<darix> zendrix: popen*() friends might be more helpful.
aaeron has quit [Quit: aaeron]
<darix> but you can also check gpgr and friends from https://rubygems.org/search?utf8=%E2%9C%93&query=gpg
<zendrix> darix: popen*() friends?
bungoman_ has joined #ruby-lang
<zendrix> popen1()
<zendrix> popen2()?
aewffwea has joined #ruby-lang
<darix> there is also popen4
<headius> zendrix: if FFI isn't too "3rd party" for you tou could call ito the C lib
<aewffwea> headius: Hey, does JRuby run ruby code on Java bytecode directly? or Ruby runs on JRuby which runs on java bytecode?
<headius> aewffwea: JRuby has an interpreter written in Java and a JIT that converts hot Ruby code into JVM bytecode
aaeron has joined #ruby-lang
<headius> so both, I guess
<aewffwea> headius: interesting... Do you know if any ruby code is elegible to be converted to bytecode? Or only a subset of ruby?
bungoman has quit [Ping timeout: 240 seconds]
<headius> all ruby code can eventually become JVM bytecode, but obviously with varying levels of optimization depending on what it's doing
<headius> the JIT only jits methods right now too, so if you save off a block and call it a bunch it might stay interpreted
<headius> miles of opportunity to improve perf in 9k
<aewffwea> headius: 9k?
duderonomy has quit [Ping timeout: 256 seconds]
<headius> JRuby 9.0.0.0
<aewffwea> ah, ok
<headius> 9th major release so we jumped from 1.x numbering
<aewffwea> thanks for your info!
<headius> any time
bungoman_ has quit [Ping timeout: 256 seconds]
atomical_ has quit [Ping timeout: 248 seconds]
nertzy has joined #ruby-lang
jacaballero has quit [Max SendQ exceeded]
<aewffwea> headius: BTW: Do you contribute to Ruby or JRuby by any chance?
<headius> aewffwea: both, in fact :-)
<bnagy> kek
<headius> but mostly JRuby
konr has joined #ruby-lang
delongG_ has quit [Remote host closed the connection]
bruno- has quit [Quit: Lost terminal]
<aewffwea> headius: Wouldn't it be cool to have a Ruby interpreter written on Ruby? For that to work you'll of course need a Ruby to ASM kind of pipeline... Then you could
zendrix has quit [Remote host closed the connection]
<aewffwea> end up having a completele Ruby IDE and environment written in ruby...
jacaballero has joined #ruby-lang
bruno- has joined #ruby-lang
delongG_ has joined #ruby-lang
<apeiros> aewffwea: rubinius tried that
<zenspider> heh
zendrix has joined #ruby-lang
<headius> meta-circular is fashion if you ask me
<aewffwea> apeiros: What happened?
<headius> none of the really good production-scale VMs are meta-circular
<bnagy> I still like rubinius
<bnagy> LLVM is the future man, people need to get onboard
<aewffwea> headius: There are different levels of "production-scale" xD
<darix> bnagy: it isnt fully ruby either :p
<zenspider> I really wish self had finished their rewrite before sun imploaded
<zenspider> imploded ? imploded
<apeiros> aewffwea: no idea. I didn't follow it closely.
<apeiros> zenspider: self, the language?
<headius> bnagy: llvm is nothing more than a code-generation library
<aewffwea> http://pharo.org/ is an okay VM, and it's meta-circular
<zenspider> apeiros: aye. they were working on self in self. it would have been a really good emonstration that you CAN have production-scale VMs that are meta-circular.
<headius> aewffwea: I'm sure the giant smalltalk community is happt to have it too :-)
<zenspider> bad timing business wise killed that project off
<headius> but I doubt it's faster than the non-meta smalltalks
<headius> I doubt it's even close
<aewffwea> headius: It will be eventually
<apeiros> self seemed to be pretty awesome in some regards. only read a paper on it. been a while, though.
<aewffwea> headius: To be honest, the Pharo thing is kind of a cheat...
<apeiros> didn't they get pretty close to C's perf with an interpreter?
<apeiros> or am I confusing languages again :D
<headius> yeah but unfortunately you had to write Self
<aewffwea> the way they implemented Pharo is by only using a very limited subset of Smalltalk that translates 1 to 1 to C code xD
alestuber has quit [Ping timeout: 256 seconds]
<headius> yeah
<aewffwea> you can't actually send messages in the VM implementation xD
<zenspider> headius: better self than java :P
<aewffwea> but well, it's still a lot better than C
stardiviner has joined #ruby-lang
<headius> certainly better than C :-)
<headius> I dunno, I guess I'm also not strongly on either side of dynamic/static debate
<aewffwea> headius: What's the dynamic/static debate?
<headius> static languages let me be more explicit in the code I right and have fewer perf gotchas
<headius> that seems like a damn good thing to have in a language runtime
alestuber has joined #ruby-lang
<headius> right=write
<apeiros> I'd like some syntax to make assertions on params. otherwise I'm quite happy with dynamic. but I don't have a particularly hard time living with static either.
sunaku has quit [Ping timeout: 255 seconds]
<aewffwea> headius: The problem with that debate, is that you actually don't need to choose...
<aewffwea> headius: It's completely doable to have a language that it's both "static" and "dynamic"
<apeiros> proper contracts in ruby would be awesome. due to lack of `old` you can't really build proper shims to do it
<headius> yeah, I'd like to see static typing contracts or full-on gradual typing as part of Ruby 3
<aewffwea> headius: You'll never get full mandatory static typing
<aewffwea> headius: But you might get optional type annotations, which could give you basically the same result
Ropeney has joined #ruby-lang
<aewffwea> headius: and a -force-types mode to force eveything to have type annotations
<headius> aewffwea: that would be interesting
<headius> I experimented with a statically-typed Ruby-like lang that also did dynamic dispatch
<headius> it is not a bad mix
<headius> Mirah
<headius> I'm not sure current versions have the dynamic dispatch but it would be easy to add back
* darix throws elixir into the mix
<aewffwea> headius: People should start creating environments where everything if possible, instead of thinking that features are either or
<zenspider> apeiros: you should see how racket is doing typed/racket and slowly folding it in and making it interop w/ untyped
<zenspider> it's kinda nice... even if I don't like static typing
chadwtaylor has quit [Remote host closed the connection]
<headius> yorickpeterse: allocation trace for big XML xpath evaluator bench is 1G of text, heh
delongG_ has quit [Remote host closed the connection]
jacaballero has quit [Ping timeout: 256 seconds]
tdy has joined #ruby-lang
skyrocker has quit [Read error: Connection reset by peer]
delongG_ has joined #ruby-lang
delongG_ has quit [Remote host closed the connection]
skyrocker has joined #ruby-lang
jacaballero has joined #ruby-lang
<headius> yorickpeterse: org.libll.Driver$2.call(Driver.java:230) is responsible for the top couple entries
<headius> creates an Array
jacaballero has quit [Client Quit]
bruno- has quit [Quit: Lost terminal]
bruno- has joined #ruby-lang
ecnalyr has joined #ruby-lang
apt-get_ has quit [Quit: Quit]
delongG_ has joined #ruby-lang
malconis has quit [Ping timeout: 264 seconds]
nertzy has quit [Quit: This computer has gone to sleep]
baweaver has quit [Remote host closed the connection]
Contigi777 has quit [Quit: Leaving]
joaomdmoura has joined #ruby-lang
cornerma1 has joined #ruby-lang
harlen has joined #ruby-lang
baweaver has joined #ruby-lang
cornerman has quit [Ping timeout: 250 seconds]
cornerma1 is now known as cornerman
ecnalyr has quit [Remote host closed the connection]
toretore has quit [Quit: This computer has gone to sleep]
joaomdmoura has quit [Ping timeout: 265 seconds]
aaeron has quit [Ping timeout: 240 seconds]
baweaver has quit [Remote host closed the connection]
aaeron has joined #ruby-lang
aaeron has quit [Client Quit]
delongG_ has quit [Remote host closed the connection]
aaeron has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
alestuber has quit [Remote host closed the connection]
k3asd` has quit [Ping timeout: 245 seconds]
workmad3 has joined #ruby-lang
alestuber has joined #ruby-lang
alestuber has quit [Ping timeout: 240 seconds]
workmad3 has quit [Ping timeout: 255 seconds]
delongG_ has joined #ruby-lang
JoshuaPaling has quit [Quit: Textual IRC Client: www.textualapp.com]
baweaver has joined #ruby-lang
baweaver has quit [Remote host closed the connection]
bruno- has quit [Quit: Lost terminal]
henrikhodne has quit [Ping timeout: 252 seconds]
bruno- has joined #ruby-lang
Fooster has joined #ruby-lang
Fooster has quit [Ping timeout: 265 seconds]
ogpastaling has quit [Ping timeout: 240 seconds]
danzilio has quit [Quit: Baiii!]
enebo has quit [Quit: enebo]
bertocode has joined #ruby-lang
delongG_ has quit [Remote host closed the connection]
Astrologos_ has joined #ruby-lang
delongG_ has joined #ruby-lang
wallerdev has joined #ruby-lang
michael_mbp has quit [Excess Flood]
michael_mbp has joined #ruby-lang
duderonomy has joined #ruby-lang
marr has quit [Ping timeout: 244 seconds]
dorei has quit [Ping timeout: 272 seconds]
delongG_ has quit [Remote host closed the connection]
Voker57 has quit [Remote host closed the connection]