ChanServ changed the topic of #ruby-lang to: Ruby 1.9.3-p125: http://ruby-lang.org | Paste >3 lines of text on http://pastie.org or use a gist
Darkspiel has joined #ruby-lang
BigO has joined #ruby-lang
josephholsten_ has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
vmoravec has quit [Ping timeout: 255 seconds]
josephholsten has quit [Read error: Operation timed out]
josephholsten_ is now known as josephholsten
vmoravec has joined #ruby-lang
wyhaines has quit [Remote host closed the connection]
davidbalber|away is now known as davidbalbert
Nisstyre-laptop has joined #ruby-lang
havenn has quit [Ping timeout: 260 seconds]
asaaki has quit [Quit: Bye!]
KA_ has quit [Quit: KA_]
asaaki has joined #ruby-lang
havenn has joined #ruby-lang
lcdhoffman has joined #ruby-lang
steveklabnik has quit [Quit: bye]
intellitech has joined #ruby-lang
benanne has quit [Quit: kbai]
BigO has quit [Remote host closed the connection]
KA_ has joined #ruby-lang
stonerfish has joined #ruby-lang
workmad3 has quit [Ping timeout: 276 seconds]
asaaki has quit [Quit: Bye!]
asaaki has joined #ruby-lang
mrsolo has quit [Quit: Leaving]
KA_ has quit [Quit: KA_]
__butch__ has quit [Quit: Leaving.]
Darkspiel_ has joined #ruby-lang
Darkspiel_ has quit [Read error: Connection reset by peer]
KA_ has joined #ruby-lang
intellitech is now known as intellitech|afk
havenn_ has joined #ruby-lang
havenn has quit [Ping timeout: 264 seconds]
gregmoreno has quit [Remote host closed the connection]
havenn_ has quit [Read error: Connection reset by peer]
havenn has joined #ruby-lang
chimkan has joined #ruby-lang
rebelcan has quit [Quit: leaving]
<tsou> blazes816: can you explain what you meant regarding Hash.new([]) and Hash.new(){[]} ?
chimkan has quit [Quit: chimkan]
<drbrain> tsou: h = Hash.new []; p h[0].object_id, h[1].object_id
KA_ has quit [Quit: KA_]
robotmay has quit [Remote host closed the connection]
<tsou> got it, thanks :)
dalekurt has quit [Quit: I'll be back!]
josephholsten has quit [Quit: josephholsten]
bubonicpestilenc has joined #ruby-lang
dpatel has quit [Quit: dpatel]
<bubonicpestilenc> Hey guys
<bubonicpestilenc> Anybody using SASS or SCSS? https://gist.github.com/4092308
<apeiros_> bubonicpestilenc: just remove all } and ;
<apeiros_> and then you pretty much have sass
<bubonicpestilenc> yo udidn't read comment @ gist? :D
thone_ has joined #ruby-lang
<apeiros_> na, misread it
<apeiros_> that's what you get if you don't ask the question here :-p
<apeiros_> "oh hey, here's that large junk of text, somewhere in there is a question burried, go find it"
<bubonicpestilenc> large?
<bubonicpestilenc> =P
kalleth has quit [Ping timeout: 248 seconds]
<zenspider> flog 3.1.0 released
kalleth has joined #ruby-lang
thone has quit [Ping timeout: 252 seconds]
<banisterfiend> zenspider: oh, did you try out pry-rescue with minitest yet btw?
<zenspider> no
paulp has joined #ruby-lang
paulp has quit [Remote host closed the connection]
<zenspider> I did update the MT readme for it tho
<banisterfiend> yeah, that gave me optimism that maybe you'd tried it ;) hehe
stonerfish has quit [Quit: Leaving.]
datanoise has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
datanoise has quit [Ping timeout: 246 seconds]
swarley has quit [Ping timeout: 252 seconds]
KA_ has joined #ruby-lang
strust has quit [Quit: Page closed]
KA_ has quit [Quit: KA_]
savage- has quit [Remote host closed the connection]
bubonicpestilenc has quit [Quit: My blog @ http://bubonicpestilence.ru/]
blazes816 has quit [Quit: blazes816]
Aiur has quit [Quit: Computer has gone to sleep.]
Aiur has joined #ruby-lang
jordiebrad has joined #ruby-lang
vmoravec has quit [Ping timeout: 276 seconds]
vmoravec has joined #ruby-lang
methods has joined #ruby-lang
madish has joined #ruby-lang
elephants has joined #ruby-lang
jordiebrad has quit [Remote host closed the connection]
elephants has left #ruby-lang [#ruby-lang]
toretore has quit [Quit: Leaving]
pkrnj has joined #ruby-lang
krohrbaugh has quit [Quit: Leaving.]
tenderlove has joined #ruby-lang
Carnage\ has quit []
lcdhoffman has joined #ruby-lang
yxhuvud has quit [Quit: Nettalk6 - www.ntalk.de]
yxhuvud has joined #ruby-lang
lcdhoffman has quit [Client Quit]
havenn has quit [Ping timeout: 240 seconds]
aetcore has quit [Remote host closed the connection]
aetcore has joined #ruby-lang
davidbalbert is now known as davidbalber|away
lcdhoffman has joined #ruby-lang
Aria has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
havenn has joined #ruby-lang
apeiros_ has joined #ruby-lang
KA_ has joined #ruby-lang
KA_ has quit [Client Quit]
banisterfiend has quit [Ping timeout: 255 seconds]
saxy has quit [Remote host closed the connection]
robbyoconnor has joined #ruby-lang
alvaro_o has quit [Quit: Ex-Chat]
ryanlecompte has joined #ruby-lang
krohrbaugh has joined #ruby-lang
KA_ has joined #ruby-lang
ryanlecompte has quit [Remote host closed the connection]
banisterfiend has joined #ruby-lang
KA_ has quit [Client Quit]
josephholsten has joined #ruby-lang
beckettsfool has quit [Quit: This computer has gone to sleep]
tenderlove has quit [Remote host closed the connection]
elephants has joined #ruby-lang
KA_ has joined #ruby-lang
ryanlecompte has joined #ruby-lang
KA_ has quit [Client Quit]
josephholsten has quit [Quit: josephholsten]
stardiviner has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
chessguy has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
havenn has quit [Ping timeout: 255 seconds]
<firefux> In line 7, what does yield does to the reciever? http://ideone.com/X1tybh
ninp0 has quit [Read error: Operation timed out]
<firefux> oops
<firefux> the code actually is: http://sprunge.us/GKRT?%3Clang%3E
chessguy has quit [Remote host closed the connection]
elephants has quit [Remote host closed the connection]
charliesome has joined #ruby-lang
lsegal has joined #ruby-lang
havenn has joined #ruby-lang
CaptainJet has joined #ruby-lang
stardiviner has joined #ruby-lang
qpingu has left #ruby-lang [#ruby-lang]
blazes816 has joined #ruby-lang
bluepojo has quit [Quit: Leaving.]
ddd has quit [Quit: Leaving.]
saxy has joined #ruby-lang
eyda|mon has quit [Quit: WeeChat 0.3.9]
saxy has quit [Ping timeout: 244 seconds]
areil has joined #ruby-lang
chessguy has joined #ruby-lang
davidbalber|away is now known as davidbalbert
methods has left #ruby-lang [#ruby-lang]
gsav has joined #ruby-lang
countdigi has quit [Quit: leaving]
ryanf has joined #ruby-lang
havenn has quit [Read error: No route to host]
Rizzle has joined #ruby-lang
havenn has joined #ruby-lang
ViperMaul|_ has quit [Ping timeout: 245 seconds]
vmoravec has quit [Ping timeout: 244 seconds]
chessguy_ has joined #ruby-lang
saxy has joined #ruby-lang
chessguy has quit [Ping timeout: 246 seconds]
rohit has joined #ruby-lang
vmoravec has joined #ruby-lang
CaptainJet has quit []
swarley has joined #ruby-lang
saxy has quit [Ping timeout: 252 seconds]
ryanf_ has joined #ruby-lang
gsav_ has joined #ruby-lang
mporter has joined #ruby-lang
gsav has quit [Read error: Connection reset by peer]
thinkdevcode has joined #ruby-lang
ryanf has quit [Ping timeout: 246 seconds]
madish has quit [Quit: ChatZilla 0.9.89 [Firefox 16.0.1/20121026125834]]
pkrnj has quit [Ping timeout: 246 seconds]
swarley has quit [Read error: Connection reset by peer]
ryanf has joined #ruby-lang
swarley has joined #ruby-lang
vmoravec has quit [Ping timeout: 248 seconds]
gsav_ has quit [Ping timeout: 276 seconds]
stardiviner has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
Aiur has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
ryanf_ has quit [Ping timeout: 265 seconds]
banisterfiend is now known as banister`sleep
vmoravec has joined #ruby-lang
jxie has joined #ruby-lang
banister`sleep has quit []
gaveen has joined #ruby-lang
gaveen has quit [Changing host]
gaveen has joined #ruby-lang
jordiebrad has joined #ruby-lang
saxy has joined #ruby-lang
svyatov has joined #ruby-lang
ddd has joined #ruby-lang
saxy has quit [Ping timeout: 246 seconds]
svyatov has quit [Quit: svyatov]
KA_ has joined #ruby-lang
ddd has quit [Quit: Leaving.]
ddd has joined #ruby-lang
jordiebrad has quit [Remote host closed the connection]
havenn has quit [Ping timeout: 260 seconds]
robbyoconnor has quit [Ping timeout: 246 seconds]
kentos has quit [Quit: Leaving]
UberNerdGirl_ has quit [Quit: Connection closed for inactivity]
jxie has quit [Ping timeout: 252 seconds]
jxie has joined #ruby-lang
burgestrand has joined #ruby-lang
blazes816 has quit [Quit: blazes816]
saxy has joined #ruby-lang
havenn has joined #ruby-lang
vmoravec has quit [Ping timeout: 252 seconds]
vmoravec has joined #ruby-lang
ryanlecompte has quit [Read error: Connection reset by peer]
ryanlecompte has joined #ruby-lang
saxy has quit [Ping timeout: 252 seconds]
rohit has quit [Quit: Leaving]
vmoravec has quit [Ping timeout: 276 seconds]
gsav has joined #ruby-lang
vmoravec has joined #ruby-lang
jxie has quit [Ping timeout: 264 seconds]
ryanf has quit [Quit: leaving]
andrewhl has quit [Remote host closed the connection]
KendrickVT has joined #ruby-lang
saxy has joined #ruby-lang
saxy has quit [Ping timeout: 252 seconds]
sepp2k has joined #ruby-lang
havenn_ has joined #ruby-lang
havenn has quit [Ping timeout: 252 seconds]
stardiviner has joined #ruby-lang
thatdutchguy has quit [Remote host closed the connection]
thatdutchguy has joined #ruby-lang
swarley has quit [Ping timeout: 255 seconds]
swarley has joined #ruby-lang
Aria has quit [Remote host closed the connection]
KA_ has quit [Quit: KA_]
thatdutchguy has quit [Remote host closed the connection]
vmoravec has quit [Ping timeout: 248 seconds]
chessguy_ has quit [Remote host closed the connection]
KA_ has joined #ruby-lang
chessguy has joined #ruby-lang
chessguy has quit [Remote host closed the connection]
thatdutchguy has joined #ruby-lang
thatdutchguy has quit [Remote host closed the connection]
KA_ has quit [Client Quit]
vmoravec has joined #ruby-lang
chessguy has joined #ruby-lang
chessguy has quit [Remote host closed the connection]
saxy has joined #ruby-lang
gsav has quit [Read error: Connection reset by peer]
cirwin has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
saxy has quit [Ping timeout: 244 seconds]
<cirwin> I'm trying to build a copy of ruby trunk that makes the rb_binding_new_with_cfp() function external (so I can call it from a c extension)
<cirwin> but I don't know why it's not external already (it's not marked as static), so I'm not getting far
<cirwin> does anyone know what I should look for?
KendrickVT has quit [Quit: Leaving.]
Mon_Ouie has quit [Ping timeout: 240 seconds]
rippa has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
KA_ has joined #ruby-lang
gphillips has joined #ruby-lang
Nisstyre-laptop has quit [Quit: Leaving]
gphillips has quit [Remote host closed the connection]
solars has joined #ruby-lang
ryanf has joined #ruby-lang
saxy has joined #ruby-lang
havenn_ has quit [Read error: No route to host]
havenn has joined #ruby-lang
rekky has joined #ruby-lang
saxy has quit [Ping timeout: 252 seconds]
svyatov has joined #ruby-lang
KendrickVT has joined #ruby-lang
mistym_ has quit [Remote host closed the connection]
davidbalbert is now known as davidbalber|away
adurity has joined #ruby-lang
KendrickVT has quit [Ping timeout: 260 seconds]
mporter has quit [Quit: This computer has gone to sleep]
aetcore has quit [Remote host closed the connection]
svyatov has quit [Quit: svyatov]
saxy has joined #ruby-lang
aetcore has joined #ruby-lang
kain has quit [Quit: exit]
adurity has quit [Remote host closed the connection]
saxy has quit [Ping timeout: 245 seconds]
thinkdevcode has quit [Remote host closed the connection]
KendrickVT has joined #ruby-lang
KendrickVT has quit [Ping timeout: 252 seconds]
robbyoconnor has joined #ruby-lang
Darkspiel has quit [Remote host closed the connection]
robbyoconnor has quit [Read error: Operation timed out]
methods1 has joined #ruby-lang
Darkspiel has joined #ruby-lang
robbyoconnor has joined #ruby-lang
swarley has quit [Ping timeout: 264 seconds]
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
shtirlic has joined #ruby-lang
Nisstyre-laptop has joined #ruby-lang
havenn has quit [Ping timeout: 252 seconds]
KA_ has quit [Quit: KA_]
anannie has quit [Ping timeout: 255 seconds]
saxy has joined #ruby-lang
KA_ has joined #ruby-lang
icooba has joined #ruby-lang
shtirlic_ has joined #ruby-lang
vmoravec has quit [Ping timeout: 248 seconds]
saxy has quit [Ping timeout: 244 seconds]
vmoravec has joined #ruby-lang
KA_ has quit [Quit: KA_]
KA_ has joined #ruby-lang
shtirlic has quit [Remote host closed the connection]
dc5ala has joined #ruby-lang
saxy has joined #ruby-lang
rekky has quit [Quit: rekky]
KendrickVT has joined #ruby-lang
gaveen has quit [Ping timeout: 260 seconds]
KendrickVT has quit [Ping timeout: 252 seconds]
<zenspider> does anyone know who manages http://contributors.rubyonrails.org ?
saxy has quit [Ping timeout: 255 seconds]
gaveen has joined #ruby-lang
gaveen has quit [Changing host]
gaveen has joined #ruby-lang
methods1 has quit [Quit: Leaving.]
rekky has joined #ruby-lang
saxy has joined #ruby-lang
Nisstyre-laptop has quit [Quit: Leaving]
<zenspider> cool. thanks!
<zenspider> aaaand. no issues. wtf
Carnage\ has joined #ruby-lang
Carnage\ has quit [Client Quit]
<zenspider> prolly
saxy has quit [Ping timeout: 248 seconds]
GarethAdams has quit [Quit: Linkinus - http://linkinus.com]
workmad3 has joined #ruby-lang
cirwin has quit [Ping timeout: 246 seconds]
Nisstyre-laptop has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
shtirlic has joined #ruby-lang
Nisstyre-laptop has quit [Ping timeout: 260 seconds]
lake has quit [Ping timeout: 276 seconds]
shtirlic has quit [Ping timeout: 264 seconds]
workmad3 has quit [Ping timeout: 264 seconds]
KendrickVT has joined #ruby-lang
Guest54783 has quit [Ping timeout: 244 seconds]
TheMoonMaster has quit [Ping timeout: 256 seconds]
lake has joined #ruby-lang
mksm has joined #ruby-lang
TheMoonMaster has joined #ruby-lang
KendrickVT has quit [Ping timeout: 255 seconds]
sandbags has joined #ruby-lang
saxy has joined #ruby-lang
aetcore has quit [Remote host closed the connection]
<yorickpeterse> Morning
thatdutchguy has joined #ruby-lang
saxy has quit [Ping timeout: 252 seconds]
dous has quit [Remote host closed the connection]
Darkspiel has quit [Remote host closed the connection]
madish has joined #ruby-lang
dous has joined #ruby-lang
dous has quit [Changing host]
dous has joined #ruby-lang
KendrickVT has joined #ruby-lang
saxy has joined #ruby-lang
KendrickVT has quit [Ping timeout: 252 seconds]
saxy has quit [Ping timeout: 276 seconds]
stardiviner has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
qwerxy has joined #ruby-lang
<andrewvos> Morning
rekky has quit [Quit: rekky]
qwerxy has quit [Quit: offski]
retro|cz has joined #ruby-lang
thatdutchguy has quit [Remote host closed the connection]
<mfn> Morning
saxy has joined #ruby-lang
cantonic has joined #ruby-lang
saxy has quit [Ping timeout: 264 seconds]
<andrewvos> Morning
<kke> any good high traffic ruby backend scaling success stories? we've all seen the web stuff
banister`sleep has joined #ruby-lang
<andrewvos> What, like apis?
<andrewvos> Web apis*
<andrewvos> What, are you trying to make an architecture decision? You're trying to prove Ruby is fast enough?
<kke> a little bit of both. thinking about background processing more than "how we scaled rails to handle 500k page views a second"
banister`sleep has quit [Ping timeout: 268 seconds]
<andrewvos> What are you trying to do kke?
zomgbie has joined #ruby-lang
saxy has joined #ruby-lang
KendrickVT has joined #ruby-lang
<andrewvos> ?
saxy has quit [Remote host closed the connection]
saxy has joined #ruby-lang
<kke> andrewvos: we currently handle about 20k transactions a day and need to scale to 10 million a day because of a new client, mostly receiving files through api/ftp/remote service polling, converting between formats, storing to db, sending forward to other services
vmoravec has quit [Ping timeout: 276 seconds]
Darkspiel has joined #ruby-lang
vmoravec has joined #ruby-lang
<andrewvos> So 5 requests per second.
<andrewvos> Oh wait 10 million
KendrickVT has quit [Ping timeout: 260 seconds]
<kke> about 100kb-10mb of data each
<andrewvos> That's like 120 p/s. Fun
saxy has quit [Ping timeout: 244 seconds]
<andrewvos> Is this a theoretical maximum?
<andrewvos> So what part might be in Ruby?
<kke> i think the new client has overestimated their need, but certainly a few magnitudes more than our current 20k/day
<kke> the current is 100% ruby except for mysql, nginx and other bits like that
<andrewvos> Ok well you need to stop asking questions in Ruby channels and write some spikes :)
<kke> the current system can't handle that, i'm kind of sure of that :)
<andrewvos> kke: So make it handle that in whatever way possible, under isolation somewhere.
<kke> it's a legacy rails 2.0 app without any component isolation, just croned rake tasks and db polling, etc
<andrewvos> This sounds fun. I want to work for you.
<kke> and we're rewriting it anyway
<kke> but the new chief technical guy seems to be a bit anti-ruby and is probably trying to push scala or java on us
workmad3 has joined #ruby-lang
<lianj> kke: time to quit
<kke> i'd like to believe we can write a well performing scalable ruby backend, and i was looking for any good articles of scaling something else than high traffic websites
vmoravec has quit [Ping timeout: 244 seconds]
<andrewvos> lianj: Agree.
<kke> there's still hope :)
<lianj> high traffic, non cachable websites?
<andrewvos> Just quit. You can't make people like that believe.
shtirlic has joined #ruby-lang
<kke> i gave github as example, but he said they're doing all the heavy stuff with something else
<andrewvos> kke: Why are you trying to argue with them then?
vmoravec has joined #ruby-lang
<andrewvos> kke: Why do you thing your approach is better?
goshakkk_ has joined #ruby-lang
schaerli has joined #ruby-lang
<kke> well probably it isn't
sush24 has joined #ruby-lang
goshakkk_ has quit [Client Quit]
<yorickpeterse> kke: Ruby isn't the one language to rule them all. It's good at a lot of things but as shown by others it's not very good at dealing with very high concurrency
<andrewvos> kke: Sorry I'm not trying to put you off. If you answer that question you might have some more ammo against these people.
<andrewvos> kke: I mean, if you *can* answer that question.
<lianj> yorickpeterse: c extensions, remove gil, include/speedup ffi
<lianj> or use jruby :/
<kke> yeah jruby has been on the table
<yorickpeterse> Well yeah, but there's a reason why companies such as Twitter have decided to move certain parts away from Ruby
<lianj> because they suck
* lianj trollface
<yorickpeterse> tbh companies such as Twitter are more of an exception than the norm
<yorickpeterse> Not everybody has such a high amount of traffic
<lianj> maybe people like to think they have
rekky has joined #ruby-lang
vmoravec has quit [Ping timeout: 268 seconds]
<kke> and their ruby backend was built in 2008 with starling, mongrel and stuff like that
vmoravec has joined #ruby-lang
Darkspiel has quit [Remote host closed the connection]
rekky has quit [Quit: rekky]
riffraff has joined #ruby-lang
<kke> the reason why twitter didn't try jruby was because their stuff used gems with c-extensions and it didn't run on jruby
saxy has joined #ruby-lang
sush24 has quit [Quit: This computer has gone to sleep]
<whitequark> not to say that in 2008, jruby wasn't actually all that good.
<whitequark> definitely not in the "no one needs MRI if we have JRuby" way it currently is, at least according to some people.
toretore has joined #ruby-lang
<yorickpeterse> For me the primary downside of jruby is the jvm (I'm not trolling)
<yorickpeterse> I'm really interested in Rbx but last time I played with it it was quite a bit slower than MRI
<yorickpeterse> (this was over a year ago I think)
rohit has joined #ruby-lang
<kke> performancewise jruby beats mri and rbx by 100% in many benchmarks
<kke> a couple of years ago it was the other way around
<erikh> arg
<erikh> this is never this black and white
<erikh> jruby is pretty awesome, for a certain class of things.
<kke> one of which isn't IO
<erikh> mmm
<erikh> show me a ruby program that can saturate an I/O bus without a C extension to help
saxy has quit [Ping timeout: 244 seconds]
<erikh> run it as root if you need to.
<rohit> JRuby might be all hot stuff but it still has some way to go. All Ruby implementations need to improve. http://blog.headius.com/2012/10/so-you-want-to-optimize-ruby.html
vlad_starkov has joined #ruby-lang
vlad_sta_ has joined #ruby-lang
<erikh> you can saturate disk or network with a shell script
<erikh> jruby isn't going to have a problem.
cantonic has quit [Quit: cantonic]
<lianj> jruby-complete.jar is awesome :)
vlad_starkov has quit [Ping timeout: 276 seconds]
<kke> if you take a ruby program that does a lot stuff with files, running the same thing on jruby seems to take double the time, i'm sure if you targeted jruby in the first place and perhaps used some of the java's io libraries the tables would turn
<erikh> how are you benchmarking it?
<kke> require 'benchmark'
workmad3 has quit [Ping timeout: 252 seconds]
<apeiros_> hm, I'm wondering
<apeiros_> with jruby you can package up ruby apps, right?
<apeiros_> i.e., create (besides jvm) self-contained apps?
<erikh> that's more or less what logstash does.
<erikh> which beats the tar out of i/o without blinking, btw. :)
<lianj> apeiros_: yes. take jruby-complete.jar, put your files and some gems you need inside and people can run it via simply doing java -jar bundles_app.jar
<apeiros_> lianj: hm, no clickable app?
<apeiros_> you know, for those mouse-pushing users which know nothing about CLI…
schaerli has quit [Remote host closed the connection]
<rohit> You can make a script that runs the jar I guess, ship it as executable
<lianj> well, if finder opens jars when you double click on them. or use some other tool to make a .app wrapper out of it
<kke> i think many java apps just supply an .exe or other os equivalent that does pretty much that
qwerxy has joined #ruby-lang
<kke> and there's not much else that can be done
<kke> you can make a single executable that has a jar inside it and somehow launch that
<lianj> apeiros_: i even got thin running in such a bundles/contained jar file. the thin parser is a c ext though, but the puma webserver has ported the parser to jruby and luckily didnt change the api so you can trick thin to use this instead
<whitequark> yorickpeterse: the problem with rbx is that it does not exactly work
<whitequark> I mean, theoretically it does.
<kke> the jruby-complete package is quite big file to include with each release
KendrickVT has joined #ruby-lang
<whitequark> but every single time I tried to use rbx for any of my project, I ended up writing issues and/or patches for a few hours
<whitequark> and then giving up
<lianj> whitequark: yea likewise. for 1.9 support that is
<whitequark> lianj: no one cares about 1.8
<lianj> thats what makes it sad, 1.9 still no good on rbx
<lianj> at least some weeks ago
<whitequark> well, define "1.9"
<whitequark> I never bumped into Encoding issues for example
<lianj> working encoding
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
<whitequark> but lots, lots of segfaults and some class model quirks
<lianj> i did
x0F_ is now known as x0F
<whitequark> imo, for any western app you can just stick to utf-8 everywhere and call it a day.
rohit has quit [Quit: Leaving]
<lianj> encoding not finished means you can even get problems with utf-8, dont recall my issues but it was some like that
<kke> whitequark: if clients just sent valid utf or even valid iso8859 and not some weird combinations that iconv croaks on..
KendrickVT has quit [Ping timeout: 252 seconds]
jxie has joined #ruby-lang
<kke> encodings have been a pain since the computer was invented and still no good
saxy has joined #ruby-lang
asaaki has quit [Quit: Bye!]
<andrewvos> Hmm
<andrewvos> How can I run an ssh server on heroku?
saxy has quit [Read error: Connection reset by peer]
<andrewvos> Is there like a one line command I can run to enable access externally?
saxy has joined #ruby-lang
<yorickpeterse> whitequark: hmm
<andrewvos> I just want to say to ssh "let anyone in with the username andrew and password blah"
<andrewvos> But because it's on heroku, I need it to run when the web app starts
<andrewvos> So that it is run under that user
<andrewvos> I'm running screen
<kke> it's currently almost decent if working with input from browsers but with text files such as xml, the encodings are often broken on arrival
<andrewvos> erikh: halppp
<erikh> what
<andrewvos> Does what I'm trying to do sound crazy?
<erikh> yes
<erikh> because if heroku has any sense at all they've got the ports on your instances locked up tighter than a nun's ... chastity belt
<andrewvos> erikh: Ok, but usually there is one port assigned for the web app. I plan on using this.
<andrewvos> erikh: (I'm trying to get IRSSI under screen on a heroku box)
<erikh> ok, and that's fronted by a load balancer
<erikh> almost definitely.
<andrewvos> erikh: I've got screen and irssi installed and running perfectly.
<erikh> dude
<erikh> knock this ghetto crap off
<erikh> you are so lazy :P
<andrewvos> But it's fuunnn
<andrewvos> :)
<erikh> do you want a shell?
<erikh> are you *that* cheap?
<erikh> I can give you a shell.
<andrewvos> No no I have an ec2 instance
<erikh> ...
<andrewvos> hah thanks
<andrewvos> But no, I'm just trying to see if I can get it done
<erikh> it really depends on how they front port 80/443
<erikh> if the load balancer uses TCP timeouts (probably), if the load balancer proxies HTTP and not TCP (probably), etc etc
<andrewvos> erikh: So why do you think the load balancer will be an issue? Is it because multiple of multiple dynos?
<andrewvos> Ohh ok
<andrewvos> But HTTP is TCP?
<erikh> no, http uses tcp.
<andrewvos> Yeah
<erikh> http is also stateless.
<andrewvos> Load balancers can distinguish between normal tcp and http over tcp?
<erikh> there are a number of things you can do with a good http load balancer you cannot with a tcp "load balancer" because of this
<erikh> depends on how they're configured
<andrewvos> Interesting
<erikh> you can probably try something with nc or socat against the port the webapp would normally bind to
<erikh> and then telnet to that port and see what comes out the other end
<erikh> or
<erikh> you could just ask them
<erikh> they'll probably tell you.
<andrewvos> hmm
qwerxy has quit [Quit: offski]
chessguy has joined #ruby-lang
<erikh> I'd be really surprised if they haven't made doing a proper unix shell nearly impossible
workmad3 has joined #ruby-lang
<erikh> seems like that'd be a breeding ground for a shitstorm from an ISP perspective
<andrewvos> erikh: Do you know about `heroku run bash` ?
<lianj> thats their api
<erikh> right, but that doesn't reattach you to a shell or allow you to run things like znc with any effectiveness, does it?
<lianj> its no pty
<erikh> oh, well there's that then
schaerli has joined #ruby-lang
<erikh> I mean, this is a huge problem for ISPs that charge money for their services, much less give away free accounts to anonymous users
<andrewvos> erikh: It's a new username every time
<erikh> some data centers block 6667 inbound because of this exact thing
<lianj> he only wants outbound, no?
<andrewvos> erikh: But, you can run startup scripts and launch apps inside a buildpack
<erikh> lianj: he needs to get in somehow
<andrewvos> erikh: So I have screen running, and I need to ssh and attach to it somehow.
<erikh> heh
<erikh> man
<erikh> good luck. there's probably some http tunneler that might help
<andrewvos> haha
<andrewvos> thanks
schaerli has quit [Remote host closed the connection]
schaerli has joined #ruby-lang
<erikh> basically, you're screwed
<andrewvos> Could one of you explain why?
<andrewvos> (Please :))
<lianj> erikh: if outbound tcp connection are stablish, maybe you could just reverse bind. but then you need another server to listen on anyway
<lianj> andrewvos: https://pastee.org/b3kee
<andrewvos> Hmm, so the port that is available for use is $PORT
<andrewvos> lianj: Oh so I would need ssh to keep on sending bytes?
<erikh> you'd need a keepalive, yes
<lianj> your inbound connections (open ports) are called from the http load balancer. you cant just use that port for tcp stuff
<erikh> well a heartbeat to be accurate
<erikh> SSH can do that
<erikh> BUT
<erikh> you're basically asking for the slightest burp to tear your shit down
<andrewvos> Ok
<erikh> oh, hot damn
<erikh> emacs finally has a stable fullscreen mode in OS X
<erikh> I can finally use a not-shit mail client
<andrewvos> emacs is a mail client?
<andrewvos> /is/has/
<erikh> emacs has like 8 million mail clients
<erikh> and those are just the popular ones
<erikh> many of them are leaps and bounds beyond the other stuff that's out there.
<andrewvos> Fuck
<andrewvos> You're an emacs user??
<erikh> no
<erikh> I use vim
<erikh> I just want to use emacs for mail
<andrewvos> heh
<erikh> I was an emacs user a long, long time ago
<erikh> this fullscreen support isn't really lion full screen
retro|cz has quit [Ping timeout: 244 seconds]
saxy has quit [Remote host closed the connection]
melter has quit [Quit: Client exiting]
retro|cz has joined #ruby-lang
tbuehlmann has joined #ruby-lang
retro_ has joined #ruby-lang
<chris2> interesting
<chris2> erikh: gnus?
<lianj> ups, wrong channel
kitallis has joined #ruby-lang
<lianj> i was hoping this douche plays sarcastaball, but he wasnt..
spike|spiegel has joined #ruby-lang
<andrewvos> erikh: You have dashed my hopes of hacking together an ungodly mess of heroku/irssi.
<andrewvos> erikh: Do you have an xbox console?
jxie_ has joined #ruby-lang
KendrickVT has joined #ruby-lang
fantomax has joined #ruby-lang
jxie has quit [Ping timeout: 265 seconds]
<erikh> chris2: VM I think
<erikh> andrewvos: yeah, but I'm seeing it
fantomax has quit [Client Quit]
<erikh> selling it
KendrickVT has quit [Ping timeout: 252 seconds]
<andrewvos> erikh: Just Cause 2 is soooo fun
<erikh> never got into it, but drbrain recommended it to me
<andrewvos> RubyTapas is like the best thing ever.
<andrewvos> erikh: I've got this thing for buying older xbox games (used) on amazon for $5. So many good games out there for reallly cheap.
<erikh> ah
<andrewvos> Singularity is also pretty damn cool
<erikh> never played that one
<andrewvos> You get this thing on your arm that can make distort time
<andrewvos> So you can make enemies age really fast
<andrewvos> Or you can make broken down stairs rebuild
gaveen has quit [Remote host closed the connection]
<erikh> oh, that's kind of a neat mechanic
<erikh> the game that really blew my socks off recently was dishonored
gaveen has joined #ruby-lang
gaveen has quit [Changing host]
gaveen has joined #ruby-lang
<andrewvos> Not played that
<erikh> wow, I haven't used emacs in a long time
<erikh> M-x configure doesn't exist anymore, ha
countdigi has joined #ruby-lang
<andrewvos> ShouldI buy it?
<unsymbol> erikh: which version you checking out atm?
<erikh> I thought it was good. stealthy game with some pretty interesting gameplay and the storyline is variable based on how you play the game
<erikh> 24
<erikh> oh that's because it's m-x customize
<erikh> derp
<erikh> it's cool. I've got this
<erikh> m-x viper-mode
<unsymbol> heh :3
countdigi has quit [Client Quit]
<unsymbol> oh, zabutom is so awesome. http://www.youtube.com/watch?v=D6HcMsDeuXI
jxie_ has quit [Quit: leaving]
canton7 has quit [Ping timeout: 264 seconds]
canton7 has joined #ruby-lang
poga has joined #ruby-lang
poga has quit [Remote host closed the connection]
gix has quit [Ping timeout: 245 seconds]
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
gix has joined #ruby-lang
swarley has joined #ruby-lang
cantonic has joined #ruby-lang
retro_ has quit [Ping timeout: 244 seconds]
retro|cz has quit [Ping timeout: 244 seconds]
sush24 has joined #ruby-lang
lcdhoffman has joined #ruby-lang
zomgbie has quit [Ping timeout: 256 seconds]
erichmenge has quit [Quit: Arrivederci!]
swarley has quit [Ping timeout: 245 seconds]
davidbalber|away is now known as davidbalbert
<eam> erikh: I use that for real
jbsan has quit [Quit: JB.. OUT!]
<eam> viper-mode is great
robotmay has joined #ruby-lang
davidbalbert is now known as davidbalber|away
<rue> evil is (supposedly) where it’s at
<rue> Much more complete
<rue> Etc.
schaerli has quit [Remote host closed the connection]
<eam> Oh? I haven't been keeping up. Checkin' that out
erichmenge has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
<rue> I was thinking about trying it out, but I couldn’t be arsed to check whether the few plugins I use are available on emacs
guest__ has joined #ruby-lang
<chris2> evil is great
gregmoreno has joined #ruby-lang
saxy has joined #ruby-lang
<chris2> has textobjects etc
<rue> Well, it’s really just Powerline, Command-T, and Ack that I use. Plus some kind of a tab manager.
<chris2> ack exists for emacs
<chris2> you can customize the mode-line alreadz
gregmoreno has quit [Remote host closed the connection]
vlad_sta_ has quit [Remote host closed the connection]
saxy has quit [Ping timeout: 240 seconds]
gregmoreno has joined #ruby-lang
<chris2> command-t i dont know. emacs has various file finders
chessguy has quit [Remote host closed the connection]
schaerli has joined #ruby-lang
saxy has joined #ruby-lang
gregmoreno has quit [Remote host closed the connection]
KendrickVT has joined #ruby-lang
saxy has quit [Ping timeout: 260 seconds]
zomgbie has joined #ruby-lang
anannie has joined #ruby-lang
KendrickVT has quit [Ping timeout: 252 seconds]
bfreeman has joined #ruby-lang
gregmoreno has joined #ruby-lang
zomgbie has quit [Ping timeout: 248 seconds]
<apeiros_> comments welcome: https://gist.github.com/4096752 (a module which provides an inspect method, which can be used when to_s is redefined) (cross posted in #ruby-lang)
gaveen has quit [Remote host closed the connection]
<apeiros_> gah, cross-posted in #ruby
postmodern has quit [Quit: Leaving]
vmoravec has quit [Ping timeout: 276 seconds]
gaveen has joined #ruby-lang
gaveen has quit [Changing host]
gaveen has joined #ruby-lang
vmoravec has joined #ruby-lang
slaytanic has quit [Quit: Changing server]
slaytanic has joined #ruby-lang
voker57_ has quit [Remote host closed the connection]
<andrewvos> apeiros_: Shouldn't inpect and to_s be different things?
<apeiros_> andrewvos: define a class, define to_s, watch what happens to your inspect
<andrewvos> apeiros_: Don't have 2 installed
<apeiros_> andrewvos: in ruby 2, the issue is gone
<apeiros_> it states in ruby *<* 2
<apeiros_> the < matters :-p
gregmoreno has quit [Remote host closed the connection]
<andrewvos> Oh right
<andrewvos> So in 2.0 it doesn't call to_s?
<apeiros_> I think so
<andrewvos> What is the new behaviour?
andrewhl has joined #ruby-lang
<apeiros_> haven't tried. but according to a bug ticket, the behavior changed
<apeiros_> (don't have 2.0 yet either)
kitallis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<yorickpeterse> static code analysis is hard
<yorickpeterse> To be more specific, writing clean and readable code for static code analysis is hard
workmad3 has quit [Ping timeout: 246 seconds]
sush24 has quit [Quit: This computer has gone to sleep]
sailias has joined #ruby-lang
sush24 has joined #ruby-lang
vlad_starkov has joined #ruby-lang
sush24 has quit [Client Quit]
thinkdevcode has joined #ruby-lang
jbsan has joined #ruby-lang
sailias has quit [Quit: Leaving.]
malev has joined #ruby-lang
BigO has joined #ruby-lang
BigO has quit [Remote host closed the connection]
<rue> chris2: Opinion on the best file finder?
quatauta has joined #ruby-lang
riffraff has quit [Quit: Leaving]
intellitech|afk is now known as intellitech
BigO has joined #ruby-lang
KendrickVT has joined #ruby-lang
<whitequark> yorickpeterse: hmm, why?
<whitequark> I find it that analysis tool code decomposes pretty nicely
<whitequark> LLVM is a very nice example of that
<yorickpeterse> Because knowing me it's very easy to write code that works but is pretty hard to read
<yorickpeterse> The only answer to that is refactoring but that isn't always as easy
mistym_ has joined #ruby-lang
<whitequark> GCC is a counter-example, but it was rendered non-modular due to political reasons, so...
zomgbie has joined #ruby-lang
<yorickpeterse> In this case I'm trying to refactor some code that tries to resolve the class of a method receiver
<yorickpeterse> so for `String.foo` it has to return String, for `name = "Ruby"; name.upcase` String as well, etc
<whitequark> uhh...
<whitequark> I'd say that you need to renormalize the code first, and analyze it afterwards
AlHafoud_ has joined #ruby-lang
AlHafoud_ has quit [Excess Flood]
KendrickVT has quit [Ping timeout: 240 seconds]
<chris2> rue: nope. i dont use any of them
<yorickpeterse> Renormalize as in?
<whitequark> normalization includes implicit context reification
<whitequark> implicit contexts as in http://yugui.jp/articles/846
<whitequark> reification as in 'make self to a variable and it will be explicit'
<yorickpeterse> hm
<whitequark> s,to,,
<whitequark> that's how I do it, at least
<yorickpeterse> To give you an idea, this method handles the resolving of method receivers: https://github.com/YorickPeterse/ruby-lint/blob/master/lib/ruby-lint/helper/scoping.rb#L145-L191
<yorickpeterse> As you might agree it's not very pretty
<chris2> rue: check out ido and anything.el
<whitequark> ohhh
<rue> Ta
<rue> chris2: How do you find stuff? Or have you really given up on code? :)
<chris2> oh, i just enter the path
AlHafoudh has joined #ruby-lang
<whitequark> yorickpeterse: not really related to code quality, but your code seriously needs a lot of this: https://github.com/styleguide/ruby
AlHafoudh has quit [Excess Flood]
<rue> chris2:
<whitequark> now about the architecture.
<rue> Er, you should give it a go. It really does help quite a bit
AlHafoudh has joined #ruby-lang
<yorickpeterse> whitequark: any specific examples? As far as I know I'm pretty complient with it besides the implicit returns
AlHafoudh has quit [Excess Flood]
<chris2> i rarely work with more than three files :P
<yorickpeterse> And that I hate Tomdoc
zomgbie has quit [Ping timeout: 260 seconds]
<rue> Especially if you’re writing Scala using the normal JVM directory tree -.-
<whitequark> yorickpeterse: disregard the Tomdoc bit, it's Github-specific. everything else is very good.
<chris2> rue: i plan to code quite a bit in the next time
<whitequark> yorickpeterse: well, `and's. This could very well be bugs sometimes.
<chris2> rue: but in Go i guess
AlHafoudh has joined #ruby-lang
AlHafoudh has quit [Excess Flood]
<chris2> rue: yeah i dont do java. and i'd use a speedbar then
swarley has joined #ruby-lang
<chris2> and elscreen tabs perhaps
<yorickpeterse> whitequark: the use of `and` is one of the things I actually dislike of that method
<whitequark> `and' doesn't really exist for conditions. it's for perl-style things like "do_something or die", or "redirect_to and return"
AlHafoudh has joined #ruby-lang
AlHafoudh has quit [Excess Flood]
<rue> Sure it exists
<rue> It’s just a different precedence
<whitequark> rue: exactly why it shouldn't be used in conditions
AlHafoudh has joined #ruby-lang
AlHafoudh has quit [Excess Flood]
<rue> Shouldn’t ≠ doesn’t
<rue> :
AlHafoudh has joined #ruby-lang
AlHafoudh has quit [Excess Flood]
<rue> Wth enter key? :)
<whitequark> rue: I'm talking about best practices here, so =.
<yorickpeterse> Hm, I wonder if I can store the class names when building the list of definitions instead of retrieving it afterwards
AlHafoudh has joined #ruby-lang
<yorickpeterse> That would make it much easier to deal with receivers and the likes
AlHafoudh has quit [Excess Flood]
<whitequark> yorickpeterse: I see a worse problem with your architecture
<yorickpeterse> Oh?
<whitequark> the behavioral analysis layer is very tightly coupled to the code representation itself
<yorickpeterse> Can you give an example?
<whitequark> grep for the word "token".
<yorickpeterse> heh
<yorickpeterse> What would you suggest to decouple it more from it?
<yorickpeterse> Since the code more or less has to rely on the AST for it to be able to analyse it
<whitequark> if you want to understand what a method receiver is, you don't need to know if it was a "self.meth", "meth()" or "a.meth()"
<whitequark> well, quite simply, make an IR.
<yorickpeterse> IR?
<ddd> was just gonna ask
<whitequark> stands for "intermediate representation".
<whitequark> it's a way of repsesenting code which disregards everything which does not affect the behavior of the code.
<whitequark> check Rubinius' bytecode if you want to know how it generally looks like
<whitequark> (I'm not suggesting you to use it.)
<yorickpeterse> Wouldn
<yorickpeterse> Fucking enter
<yorickpeterse> Wouldn't that remove too much useful information?
<whitequark> that's an excellent question
davidbalber|away is now known as davidbalbert
<whitequark> and the answer is yes and no. If you want a good linter, you cannot throw out the primordial AST and just work on the IR. that would be acceptable for me as a compiler writer, but not for you.
swarley has quit [Read error: Connection reset by peer]
<whitequark> there's lots of stuff which is only accessible through AST. Comments, styling, stuff like "meth (foo)" (note the space), etc.
<whitequark> but for _behavioral_ analysis of the code you don't need any of that, and in fact it prevents you from writing decoupled, efficient code.
<whitequark> after all, you can store the originating token for each IR entity (and that's what I do, in a way)
<yorickpeterse> Hm
<whitequark> what's also good is that when you will want to write a CFA [control flow analysis] pass, you'd find that IR makes that a whole lot easier. I'd say that is practically impossible without a proper IR.
<whitequark> and you will want that. I bet you've seen Laser.
KendrickVT has joined #ruby-lang
<yorickpeterse> I have
<yorickpeterse> Couldn't make much sense of it sadly since the code was all over hte place
<yorickpeterse> * the
<whitequark> mhh
<whitequark> was it? I found it a bit messy, but pretty comprehensible
<whitequark> (compared to GCC internals, everything is. there are files where C, assembler and a special Lisp dialect are fucking interleaved.)
<yorickpeterse> heh
<yorickpeterse> Looking at some of the examples of Rubinius bytecode I'm not entirely sure how that would help in this case, though I'm probably just not getting it
quatauta has quit [Quit: Verlassend]
thinkdevcode has quit [Remote host closed the connection]
BigO has quit [Remote host closed the connection]
Weems has quit [Read error: Connection reset by peer]
krohrbaugh has quit [Quit: Leaving.]
BigO has joined #ruby-lang
Weems has joined #ruby-lang
Weems has quit [Changing host]
Weems has joined #ruby-lang
krohrbaugh has joined #ruby-lang
BigO has quit [Remote host closed the connection]
wallerdev has joined #ruby-lang
<yorickpeterse> Hmm
BigO has joined #ruby-lang
<yorickpeterse> Looking at the bytecode of some dummy code it's starting to make some sense. However, I have my doubts about it making the code easier to grasp/maintain
dalekurt has joined #ruby-lang
dalekurt has quit [Client Quit]
BigO has quit [Remote host closed the connection]
marr has joined #ruby-lang
havenn has joined #ruby-lang
KA_ has quit [Quit: KA_]
<whitequark> yorickpeterse: ugh. sorry, I looked into gcc sources.
<yorickpeterse> No worries, I'm trying to wrap my head around coming up with something new in terms of architecture. Currently writing down some pseudo bytecode based on what I see from Rbx
<whitequark> it's not entirely unlike pierceing your own skin with acid-soaked red hot needles, but I digress.
<whitequark> yorickpeterse: yup, that's what I meant
<whitequark> basically, imagine you need to write a bytecode for a processor which runs Ruby
<whitequark> not a real one; you can have an infinite number of registers, etc.
<yorickpeterse> However, I feel that instead of tying this in with the AST it would instead tie the analysis bit in with the bytecode
<yorickpeterse> Having said that, I have been trying to come up with a way to handle the whole context switching and what not on an earlier stage instead of doing this during analysis
<yorickpeterse> This might be one way of solving that
<whitequark> yorickpeterse: tying the analysis to the IR is the whole point of writing an IR
<whitequark> you see, the IR shouldn't be designed from thin air. It should instead be _optimal_ for analysis
vlad_starkov has quit [Remote host closed the connection]
<yorickpeterse> Hm, come to think of it the whole code guideline bit might be something I'd ditch seeing how Reek and the likes already do that
<yorickpeterse> That way I can focus on a format that's better for logic analysis instead of style issues
<yorickpeterse> And it would open the way for potentially caching that output so you don't have to re-parse unchanged files on every run
KendrickVT has quit [Quit: Leaving.]
jbsan has quit [Read error: Connection reset by peer]
sandbags has quit [Remote host closed the connection]
<yorickpeterse> Hm, now I need to come up with some format and a way to process it
stardiviner has joined #ruby-lang
<whitequark> yorickpeterse: might want to take a look at Furnace
<whitequark> rdoc.info seems to not build the docs for beta versions, so you might need to clone the repo and yardoc it.
lcdhoffman has joined #ruby-lang
<yorickpeterse> Another nice thing that such an IR would introduce is that my parser no longer needs to create nested data
<yorickpeterse> Which could remove quite a bit of code and make it easier to grok the output
<whitequark> nested data?
KA_ has joined #ruby-lang
zomgbie has joined #ruby-lang
<yorickpeterse> Take a class for example. If you parse it with Ripper it will return nested Sexp nodes
<yorickpeterse> If you create a node for pushing/popping contexts you can more or less remove this
jbsan has joined #ruby-lang
<yorickpeterse> Similar to what Rbx does with push_stack and pop
lcdhoffman has quit [Client Quit]
KA_ has quit [Client Quit]
marr has quit [Ping timeout: 246 seconds]
<whitequark> mhm
<whitequark> I don't understand why that is a problem
<yorickpeterse> It's not a huge issue but it requires recursion to process which in turn will result in massive stack traces (depending on the size of the AST) if things go wrong
<yorickpeterse> I also hate debugging nested structures in, say, Pry
schaerli has quit [Remote host closed the connection]
<whitequark> well, your code should be modelled after your data
<whitequark> and at least for a linter, the code is inherently nested
kentos has joined #ruby-lang
<whitequark> so I'd keep that
ryanlecompte has quit [Remote host closed the connection]
ryanlecompte has joined #ruby-lang
<yorickpeterse> Looking at Furnace, how would you store context based data (e.g. variables) in the AST?
<yorickpeterse> What I have now is an array that's pushed/popped whenever the context changes but this is done for every class that performs analysis
<yorickpeterse> And I'd like to only do that once instead
havenn has quit [Read error: No route to host]
havenn_ has joined #ruby-lang
<khaase> anyone ever wrote code to detect if third-party cookies are being blocked?
wallerdev has quit [Quit: wallerdev]
kain has joined #ruby-lang
<rue> khaase: Nah, it’s fine
KendrickVT has joined #ruby-lang
<khaase> rue: ?
<khaase> rue: blocking third-party cookies messes with our iframe oauth handshake
<khaase> rue: so I would like to run it in a popup in that case
<khaase> but popup are ugly
<khaase> so I only want to do that if third party cookies are blocked
<khaase> but I fail to detect it
<khaase> the straight forward approach (creating a third-party cookie and then checking if it's there) doesn't work for some reason
<khaase> the cookie is there
<khaase> and I don't know what I'm doing wrong
sush24 has joined #ruby-lang
dorei has joined #ruby-lang
methods has joined #ruby-lang
vlad_starkov has joined #ruby-lang
sush24 has quit [Quit: This computer has gone to sleep]
workmad3 has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
cantonic has quit [Quit: cantonic]
pkrnj has joined #ruby-lang
mporter has joined #ruby-lang
sepp2k1 has joined #ruby-lang
sepp2k has quit [Ping timeout: 246 seconds]
vmoravec has quit [Ping timeout: 256 seconds]
vmoravec has joined #ruby-lang
<rue> Hms
t_ has joined #ruby-lang
wallerdev has joined #ruby-lang
mischa has joined #ruby-lang
sush24 has joined #ruby-lang
mischa has quit [Client Quit]
<yorickpeterse> whitequark: Do you happen to have an Email address I can send some questions to instead of spamming this IRC channel?
blacktulip has joined #ruby-lang
krohrbaugh has quit [Quit: Leaving.]
dc5ala has quit [Quit: Ex-Chat]
artOfWar has joined #ruby-lang
crackity_jones has joined #ruby-lang
justinram has joined #ruby-lang
crackity_jones has quit [Client Quit]
crackity_jones has joined #ruby-lang
havenn_ has quit [Remote host closed the connection]
<whitequark> yorickpeterse: whitequark@whitequark.org
<whitequark> re context-based data: decouple that from the context.
<yorickpeterse> ta
<yorickpeterse> Hm
<whitequark> for example, rename the variables from symbolic names to something like a tuple of the symbolic name and depth
<whitequark> thus you would avoid dealing with declaration shadowing.
blazes816 has joined #ruby-lang
<yorickpeterse> One thing I'm still not getting, even after scribbling down a lot, is how an IR (opposed to a cleaner AST) would benefit me
<yorickpeterse> That is, I can't think of anything simpler than an AST roughly based on what you use for Furnace
<whitequark> yorickpeterse: that would be your IR.
<whitequark> in fact, it would be wrong to say that rbx's bytecode is not hierarchic in the nature.
<whitequark> it's just the nesting is hidden in the (implicit) stack
<whitequark> in fact, such stack-based bytecode is _directly and completely_ equivalent to an AST.
<whitequark> (sans two opcodes, 'dup' and 'swap' which you'll need to expand control-flow-altering constructs such as ||.)
<yorickpeterse> hmm
<yorickpeterse> also holy shit, Google scares me. I added you as a contact and boom, it fetched everything
zomgbie_ has joined #ruby-lang
<yorickpeterse> So anyway, my AST and IR are essentially the same once I simplify the AST
<yorickpeterse> Which is good because right now I have way too many classes for different node types
<whitequark> hehe, this is a common mistake
<whitequark> in dynamic languages, you don't need to have different classes for different AST node types
<whitequark> I've explained that further in the Furnace docs
sush24 has quit [Quit: This computer has gone to sleep]
<yorickpeterse> My primary reasoning for it was that I initially didn't want to end up with 1 class with a bucket load of attributes
<yorickpeterse> But looking at it now that's way better than N different classes
<whitequark> exactly
zomgbie has quit [Ping timeout: 252 seconds]
<yorickpeterse> Hm, I suppose I could change the way analysis classes work by not passing entire nodes to the callback methods but only relevant information
<yorickpeterse> e.g. instead of `def on_class(node)` you'd get something like `def on_class(name, parent, line, column, ....)`
<yorickpeterse> That way if the AST changes the analysis classes don't get messed up, in theory
<whitequark> I prefer to decompose that inline
<whitequark> see the doc on Furnace::AST::Node
<whitequark> (would also link you the one on AST::Processor, but I have yet to write it.)
<yorickpeterse> I noticed it was absent :)
vmoravec has quit [Ping timeout: 276 seconds]
<yorickpeterse> Reading the docs, would I pass a custom class that extends a node? Not sure if I'm fully understanding it
<whitequark> see, the point is, you do extend Node, but only once and only to include meta-information, i.e. whatever is not required to specify the behavior
<whitequark> file name, line number, something else maybe.
<yorickpeterse> hmm
<whitequark> for all behavior-specific information you just set the type of node.
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
<whitequark> as per processor, my ones look like this: http://pastie.org/5393209
ryanlecompte has quit [Remote host closed the connection]
ananna has joined #ruby-lang
<whitequark> that's basically how you are expected to write them. I've explored the pros and cons of different formats for quite a lot of time and that's what I have settled on.
<whitequark> immutability, no behavior-specific inheritance, inline decomposition.
vmoravec has joined #ruby-lang
<yorickpeterse> In these examples you're not setting information such as the line number and column number (unless I'm just missing it). How would you go about doing that?
anannie has quit [Ping timeout: 276 seconds]
<whitequark> pretty simple, I import that from RubyParser: http://pastie.org/5393232
<yorickpeterse> As an example, this is what I have now https://gist.github.com/8ae635ac242b2915c524
<yorickpeterse> That outputs a reasonable simple AST
<whitequark> pretty close to one of my early implementations :)
<whitequark> but you're missing an important point
<whitequark> on_assign stores variable name in meta-information
<whitequark> that doesn't make any sense
<yorickpeterse> What's your reasoning for storing names and such in a `children` attribute?
<whitequark> it is not _meta_.
<yorickpeterse> well yeah
<yorickpeterse> I wasn't sure about that since I wouldn't consider them children either
<whitequark> it does not describe _the node itself_, it describes the behavior of the node
<whitequark> it's children.
workmad3 has quit [Ping timeout: 255 seconds]
<whitequark> at least when ASTs are concerned, this type of stuff is stored as children.
<yorickpeterse> Hmm
<whitequark> this is my base class for all AST::Processors, which defines how to traverse common node types
<whitequark> I'd advise you just to use Furnace, it's exactly why it was written and is being published. Literally months of work are there :)
<yorickpeterse> So what would be valid info to store in such a meta container?
<whitequark> source location, mainly.
<whitequark> if you have annotations, then those, too.
t_ has quit [Remote host closed the connection]
<whitequark> in my decompiler, I've also stored stuff like read/write barriers for instructions there.
<whitequark> they could be recomputed using just the type+children of all the nodes, so basically that was a cache.
<whitequark> I'm also writing more documentation and refactoring code now
ryanlecompte has joined #ruby-lang
<yorickpeterse> neat, I'll most likely use Furnace seeing how that saves me some time and effort
<yorickpeterse> Right, while we're at it: context switching.
<whitequark> k sure
<yorickpeterse> Right now I'm doing this for every analysis class that needs it (they simply include it): https://github.com/YorickPeterse/ruby-lint/blob/master/lib/ruby-lint/helper/definition_resolver.rb#L49-L73
<whitequark> this is the problem I'm at in Foundry right now
<yorickpeterse> To me this feels wrong and it's not very efficient to do either
<yorickpeterse> It also requires a dependency between analysis classes which I don't want
<whitequark> and also you're missing quite an important part here
<whitequark> the lexical context of method definition is not always its execution context, if we're talking about the type of `self'
<whitequark> (that _is_ true for constant lookup paths indeed)
<whitequark> you have inheritance and modules
<whitequark> well, in fact, just inheritance.
thinkdevcode has joined #ruby-lang
<yorickpeterse> Correct, I left the whole meta programming/messing around with self for what it is for now
<yorickpeterse> The current approach also doesn't work with refinements
<yorickpeterse> at least not in a nice way
<whitequark> err
ryanlecompte has quit [Remote host closed the connection]
<yorickpeterse> Hm wait, I think that actually might work but I'd have to double check
davidbalbert is now known as davidbalber|away
<whitequark> class A < B is not metaprogramming :)
<whitequark> it's a basic operation
<yorickpeterse> that actually already works
<whitequark> even if a method of A calls a method of B?
<whitequark> s,of,defined in,
<yorickpeterse> lookups for various types will bubble up so if you set the parent contexts properly it works as expected
<whitequark> ok, that still leaves out class A; include B
<yorickpeterse> nope, works too :)
<whitequark> oh, I see
voker57 has joined #ruby-lang
<yorickpeterse> tbh I'd prefer to build the definitions list earlier
<yorickpeterse> preferrably right after building the AST and before sending it to the various analysis classes
krohrbaugh has joined #ruby-lang
<yorickpeterse> Because right now that's done by an analysis class which means the other ones *have* to be run after it and rely on its data
<yorickpeterse> which makes it harder for to thread/multi process it in the future (this is a long term idea though)
<yorickpeterse> s/for//
MaddinXx has joined #ruby-lang
<whitequark> you just need to do that in two passes
t_ has joined #ruby-lang
vmoravec has quit [Ping timeout: 252 seconds]
<yorickpeterse> Also really want to kill RubyLint::Definition since it now does two things at once
gregmore_ has joined #ruby-lang
jarib has quit [Ping timeout: 246 seconds]
jarib has joined #ruby-lang
jarib has joined #ruby-lang
jarib has quit [Changing host]
<yorickpeterse> So much code to refactor, so little time
<yorickpeterse> If I intend to stick to my release of December 25th
stardiviner has quit [Ping timeout: 246 seconds]
stardiviner has joined #ruby-lang
t_ has quit [Remote host closed the connection]
gregmore_ has quit [Remote host closed the connection]
t_ has joined #ruby-lang
vmoravec has joined #ruby-lang
mikemo has joined #ruby-lang
<yorickpeterse> Anyway, massive thanks for the help. It seems I have some code to refactor and tests to break :)
gaveen has quit [Ping timeout: 248 seconds]
KA_ has joined #ruby-lang
<whitequark> you're welcome
<whitequark> btw my Jabber is whitequark@jabber.ru, that might be more efficient than email for some kinds of discussions
<whitequark> (I'm not a big fan of IRC PM's, as my irssi doesn't have any method to notify me of a new message. so, no attention => no reply.)
gaveen has joined #ruby-lang
gaveen has quit [Changing host]
gaveen has joined #ruby-lang
<yorickpeterse> Perhaps a silly question but if I use Gtalk will that work with that address?
gaveen has quit [Remote host closed the connection]
<whitequark> should do.
<yorickpeterse> Seems to
Nisstyre-laptop has joined #ruby-lang
havenn has joined #ruby-lang
vmoravec has quit [Ping timeout: 255 seconds]
vmoravec has joined #ruby-lang
swarley has joined #ruby-lang
KendrickVT has quit [Quit: Leaving.]
mikemo has left #ruby-lang [#ruby-lang]
mikemo has joined #ruby-lang
mikemo has quit [Quit: ChatZilla 0.9.89 [Firefox 16.0.2/20121024073032]]
tonni has quit [Remote host closed the connection]
thatdutchguy has joined #ruby-lang
methods has left #ruby-lang [#ruby-lang]
tenderlove has joined #ruby-lang
thatdutchguy has quit [Remote host closed the connection]
thatdutchguy has joined #ruby-lang
vmoravec has quit [Ping timeout: 252 seconds]
CaptainJet has joined #ruby-lang
thatdutchguy has quit [Ping timeout: 255 seconds]
MaddinXx has quit [Remote host closed the connection]
vmoravec has joined #ruby-lang
havenn has quit [Read error: Connection reset by peer]
havenn has joined #ruby-lang
tonni has joined #ruby-lang
vmoravec has quit [Ping timeout: 244 seconds]
artOfWar has quit [Remote host closed the connection]
havenn has quit [Remote host closed the connection]
artOfWar has joined #ruby-lang
vmoravec has joined #ruby-lang
gregmoreno has joined #ruby-lang
KendrickVT has joined #ruby-lang
artOfWar has quit [Remote host closed the connection]
KendrickVT has quit [Ping timeout: 252 seconds]
lcdhoffman has joined #ruby-lang
lsegal has joined #ruby-lang
methods1 has joined #ruby-lang
spike|spiegel has quit [Quit: leaving]
methods has joined #ruby-lang
vmoravec has quit [Ping timeout: 276 seconds]
areil has quit [Remote host closed the connection]
methods1 has quit [Ping timeout: 264 seconds]
vmoravec has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
ryanf has quit [Quit: leaving]
rippa has quit [Ping timeout: 245 seconds]
artOfWar has joined #ruby-lang
thatdutchguy has joined #ruby-lang
mytrile has joined #ruby-lang
nertzy has joined #ruby-lang
thatdutchguy has quit [Remote host closed the connection]
marr has joined #ruby-lang
artOfWar has quit [Ping timeout: 264 seconds]
thatdutchguy has joined #ruby-lang
thatdutchguy has quit [Remote host closed the connection]
ananna has quit [Remote host closed the connection]
methods has quit [Quit: Leaving.]
banister`nap has joined #ruby-lang
havenn has joined #ruby-lang
cirwin has joined #ruby-lang
corsican has quit [Quit: leaving]
mytrile has quit [Remote host closed the connection]
tenderlove has quit [Remote host closed the connection]
mytrile has joined #ruby-lang
corsican has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
artOfWar has joined #ruby-lang
jamjam has joined #ruby-lang
nertzy has quit [Quit: This computer has gone to sleep]
tenderlove has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
tenderlove has joined #ruby-lang
Nisstyre-laptop has quit [Quit: Leaving]
s0ber_ has joined #ruby-lang
s0ber has quit [Ping timeout: 260 seconds]
s0ber_ is now known as s0ber
tenderlove has quit [Ping timeout: 244 seconds]
chimkan_ has joined #ruby-lang
toretore has quit [Ping timeout: 252 seconds]
methods has joined #ruby-lang
seanstickle has joined #ruby-lang
seanstickle has left #ruby-lang [#ruby-lang]
seanstickle has joined #ruby-lang
seanstickle has left #ruby-lang [#ruby-lang]
seanstickle has joined #ruby-lang
mporter has quit [Quit: This computer has gone to sleep]
chimkan_ has quit [Read error: Connection reset by peer]
chimkan_ has joined #ruby-lang
mytrile has quit [Remote host closed the connection]
methods has quit [Quit: Leaving.]
tenderlove has joined #ruby-lang
vmoravec has quit [Ping timeout: 260 seconds]
tenderlove has quit [Read error: Connection reset by peer]
tenderlove has joined #ruby-lang
vmoravec has joined #ruby-lang
methods has joined #ruby-lang
methods has quit [Write error: Broken pipe]
methods has joined #ruby-lang
artOfWar has quit [Remote host closed the connection]
herpless_ is now known as herpless
workmad3 has joined #ruby-lang
Nisstyre-laptop has joined #ruby-lang
brianpWins has joined #ruby-lang
cantonic has joined #ruby-lang
ryanf has joined #ruby-lang
methods has quit [Quit: Leaving.]
methods has joined #ruby-lang
methods1 has joined #ruby-lang
mistym_ has quit [Remote host closed the connection]
methods has quit [Read error: Operation timed out]
justinram has quit [Remote host closed the connection]
thinkdevcode has quit [Remote host closed the connection]
jamjam has quit [Quit: Lost terminal]
vmoravec has quit [Ping timeout: 245 seconds]
blacktulip has quit [Remote host closed the connection]
vmoravec has joined #ruby-lang
mistym_ has joined #ruby-lang
dorei has quit []
chimkan_ has quit [Read error: Connection reset by peer]
ryanf has quit [Quit: leaving]
chimkan_ has joined #ruby-lang
asasin1234 has joined #ruby-lang
asasin1234 has left #ruby-lang [#ruby-lang]
mistym_ has quit [Remote host closed the connection]
dorei has joined #ruby-lang
chimkan_ has quit [Read error: Connection reset by peer]
chimkan_ has joined #ruby-lang
ruurd has joined #ruby-lang
chimkan_ has quit [Read error: Connection reset by peer]
banister`nap has left #ruby-lang [#ruby-lang]
banisterfiend has joined #ruby-lang
<zenspider> I'm on a boat!
chimkan_ has joined #ruby-lang
thatdutchguy has joined #ruby-lang
thatdutchguy has quit [Remote host closed the connection]
sepp2k1 has quit [Read error: Connection reset by peer]
<andrewvos> zenspider: Why?
<zenspider> because boats go from one place to another
chimkan_ has quit [Quit: chimkan_]
vmoravec has quit [Ping timeout: 276 seconds]
DEac- has quit [Read error: No route to host]
<mfn> Ruby has some http libraries to choose from ... is one recommended for working more at the metal level with HTTP? Don't need/want automagic cookie handling and stuff, but access to headers, etc.
<drbrain> mfn: net/http
DEac- has joined #ruby-lang
zomgbie has joined #ruby-lang
zomgbie_ has quit [Read error: Operation timed out]
<drbrain> mfn: or net-http-persistent
vmoravec has joined #ruby-lang
shtirlic has quit [Remote host closed the connection]
intellitech has quit [Quit: Leaving]
<zenspider> huh... apparently there is a deadzone in the middle :P
chimkan has joined #ruby-lang
zomgbie has quit [Ping timeout: 260 seconds]
<mfn> drbrain: thx
<drbrain> mfn: there maybe be more suitable higher-level libraries that will steel leave you "at the metal level"
<drbrain> steel -> still
<zenspider> maybe be -> may be :P
banisterfiend has quit [Ping timeout: 260 seconds]
<zenspider> I'm releasing from a boat!
<zenspider> minitest 4.3.0 released!
marr has quit []
cosah has joined #ruby-lang
cosah_ has joined #ruby-lang
cosah_ has quit [Client Quit]
mistym_ has joined #ruby-lang
chimkan has quit [Quit: chimkan]
Aria has joined #ruby-lang
lsegal has quit [Ping timeout: 255 seconds]
kurko_ has joined #ruby-lang
chimkan has joined #ruby-lang
chimkan has quit [Ping timeout: 265 seconds]