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
<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?
<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 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
<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>
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.
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?
<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]