sush24 has quit [Quit: This computer has gone to sleep]
thone_ has quit [Ping timeout: 250 seconds]
larrylv has quit [Remote host closed the connection]
larrylv has joined #ruby-lang
chendo_ has quit [Quit: Computer has gone to sleep.]
larrylv has quit [Ping timeout: 248 seconds]
reppard has joined #ruby-lang
zmack_ has joined #ruby-lang
sailias has joined #ruby-lang
zmack has quit [Ping timeout: 244 seconds]
sailias has quit [Client Quit]
sailias has joined #ruby-lang
zmack has joined #ruby-lang
davidbalbert is now known as davidbalber|away
zmack_ has quit [Ping timeout: 244 seconds]
sush24 has joined #ruby-lang
reppard has quit [Ping timeout: 244 seconds]
MaddinXx has quit [Remote host closed the connection]
MaddinXx has joined #ruby-lang
cultureulterior_ has joined #ruby-lang
AndChat| has joined #ruby-lang
cultureulterior_ has quit [Client Quit]
Banistergalaxy has quit [Ping timeout: 248 seconds]
nettsundere has quit [Remote host closed the connection]
francisfish has joined #ruby-lang
havenn has joined #ruby-lang
francisfish has quit [Remote host closed the connection]
tockitj has quit [Remote host closed the connection]
jbsan_ has joined #ruby-lang
jbsan has quit [Ping timeout: 264 seconds]
jbsan_ is now known as jbsan
scottschecter has joined #ruby-lang
xyzodiac has joined #ruby-lang
ronaldo__ has joined #ruby-lang
srbaker has joined #ruby-lang
reppard has joined #ruby-lang
ronaldo__ has quit [Client Quit]
ronaldo__ has joined #ruby-lang
srbaker has quit [Quit: Computer has gone to sleep.]
reppard has quit [Ping timeout: 248 seconds]
ronaldo__ has left #ruby-lang [#ruby-lang]
ronaldo__ has joined #ruby-lang
ronaldo__ has quit [Remote host closed the connection]
zmack_ has joined #ruby-lang
mercwithamouth has quit [Ping timeout: 252 seconds]
davidbalber|away is now known as davidbalbert
zmack has quit [Ping timeout: 248 seconds]
kivi has joined #ruby-lang
mistym has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Remote host closed the connection]
kivi has quit [Ping timeout: 255 seconds]
GarethAdams has quit [Ping timeout: 264 seconds]
krz has quit [Quit: krz]
kurko_ has joined #ruby-lang
<dominikh>
whitequark: thanks again for SSE :)
Rarrikins has joined #ruby-lang
mistym has joined #ruby-lang
kivi has joined #ruby-lang
zmack_ has quit [Remote host closed the connection]
zmack has joined #ruby-lang
kivi has quit [Ping timeout: 252 seconds]
tjadc_ has quit [Ping timeout: 255 seconds]
vlad_starkov has quit [Remote host closed the connection]
agile has left #ruby-lang ["Ex-Chat"]
reppard has joined #ruby-lang
zmack has quit [Remote host closed the connection]
kivi has joined #ruby-lang
reppard has quit [Read error: Operation timed out]
breakingthings has joined #ruby-lang
glebm has joined #ruby-lang
zmack has joined #ruby-lang
sush24 has quit [Ping timeout: 250 seconds]
srbaker has joined #ruby-lang
kivi has quit [Ping timeout: 244 seconds]
leopard_me has joined #ruby-lang
LineByLine has joined #ruby-lang
tbuehlmann has joined #ruby-lang
arooni-mobile has quit [Ping timeout: 248 seconds]
xyzodiac has quit [Quit: Computer has gone to sleep.]
LineByLine has quit [Client Quit]
arooni-mobile has joined #ruby-lang
JoelMcCracken has joined #ruby-lang
xyzodiac has joined #ruby-lang
zmack has quit [Ping timeout: 265 seconds]
zmack has joined #ruby-lang
reppard has joined #ruby-lang
erikh has joined #ruby-lang
<erikh>
hey dudes,
thisirs has joined #ruby-lang
<erikh>
I'm trying to get the effect of perl's 'tie' for ruby core types
<erikh>
and I'm wondering how it might be done, or if not trivial, what involvement would be required
reppard has quit [Ping timeout: 245 seconds]
reppard has joined #ruby-lang
hazel_eyed has joined #ruby-lang
hazel_eyed has left #ruby-lang [#ruby-lang]
arooni-mobile has quit [Ping timeout: 260 seconds]
slyphon has joined #ruby-lang
<cirwin>
erikh: I'm trying to understand what tie does in <2minutes
francisfish has joined #ruby-lang
<erikh>
so perl's tie takes a package and a data structure
<erikh>
and basically proxies all I/O to the data structure through the package
<erikh>
now, it's possible to kind-of tie with things like Delegator, Forwardable and so on
<cirwin>
so in ruby I guess you just 'def []()' ?
<erikh>
it's a little more complicated than that
<erikh>
Hash and Array have numerous methods to manipulate their contents
<erikh>
so all of them have to be proxied.
<erikh>
and of course, it's hardly future-proof
<cirwin>
I see
<erikh>
oh well, I'll probably get un-lazy and take my query to the core list
<erikh>
just kind of wondering what this venture would be like and whether or not it'd be a desired feature
* slyphon
looks at his watch
<cirwin>
it's pretty backwards-feeling
<erikh>
cirwin: how so?
<slyphon>
erikh: might be a little early for the left coast, no?
<cirwin>
erikh: I might just be misunderstanding it
<erikh>
slyphon: almost 10am, but it is saturday
<slyphon>
yeah
<injekt>
it's about 10am there
<injekt>
eh
<cirwin>
it feels like you're trying to fill in a box, instead of stack boxes
<cirwin>
if that makes any sense
<erikh>
no, it doesn't.
<cirwin>
ah well
<erikh>
:P
* cirwin
goes to re-learn perl
<slyphon>
:)
<erikh>
tie just circumvents the i/o part of the whole thing.
francisfish has quit [Remote host closed the connection]
Rarrikins has quit [Read error: Connection reset by peer]
<erikh>
retains the rest of the logic and interface
Rarrikins has joined #ruby-lang
flaguy48 has joined #ruby-lang
<injekt>
tie $foo, "Dog"; $foo = "hello" #=> $obj->STORE("hello")
<injekt>
eh the call to tie calls Dog->TIESCALAR() iirrc
<erikh>
e.g., you call hash[:foo] = 1, and if it was tied, it would execute its set routine. as I understand it, MRI at least doesn't define what "set" really means, so the only real way to change how things get set in a ruby hash is to "monkeypatch" the C setter that they all call
<erikh>
(which is very unlikely to be exposed)
<slyphon>
erikh: that's always bugged me
<cirwin>
erikh: exposing it in a way that can be overriden in a subclass would be cool
<slyphon>
erikh: python even has a single-point-to-override
<injekt>
lol
<erikh>
slyphon: yep, that's really what it comes down to
<erikh>
but there are other considerations with doing it in the pure-C implementation, especially WRT performance I bet
<slyphon>
hrm
<cirwin>
erikh: I'd have thought the method caches would be able to deal with it like they do with Fixnum#+
<erikh>
the nice thing about perl's tie is that it actually sets a magic bit on the hash itself that says "delegate all your i/o here" and then perl itself just does its own thing if it isn't set
<erikh>
i mean, having a single point of entry would definitely be ideal; it may just not be performance-effective.
sulo has joined #ruby-lang
<erikh>
cirwin: I have no idea what method caches have to do with this, to be honest.
<slyphon>
erikh: i wonder if it's actually performance, though
<slyphon>
also
* slyphon
snickers @ "single point of entry"
* slyphon
likes to keep it professional
<erikh>
well, my brain is bascially telling me something like delete would end up being like this: hash.delete -> C implementation of Hash#delete -> Ruby Implementation of Hash#perform_delete -> C implementation that actually deletes from the hash
francisfish has joined #ruby-lang
<erikh>
poorly named methods, but, that presumes the "point of entry" for Hash key deletion would be Hash#perform_delete
<slyphon>
sure
<erikh>
(consider delete_at and friends)
<slyphon>
ther's probably a Hash#perform_delete2 in there too
<slyphon>
:)
<erikh>
haha
<erikh>
well yeah, I imagine right now delete and delete_at have no common method exposed in ruby
<erikh>
I can check, but I don't know if I really need to, to know that :P
<slyphon>
oh, i guess there's "concurrency" to think about
<erikh>
cirwin: if it helps any, tie is frequently used in perl to do things like present databases as a hash.
<injekt>
ah that was it
<injekt>
db
<injekt>
yeah im not spending time on an example for that :D
<slyphon>
then again, ruby's a little loosey-goosey when it comes to memory consistency
<erikh>
slyphon: well, that could be the writer of the tie interface's responsibility
<slyphon>
for the internal state of the hash?
<erikh>
I mean, if I'm sending all my writes to a sqlite db, chances are it's going to be more stable than ruby anything anyhow
<slyphon>
or you're just providing a hash-like interface?
<slyphon>
ha!
sulo has quit [Remote host closed the connection]
francisfish has quit [Remote host closed the connection]
<slyphon>
erikh: careful, i see a man in the crowd swinging a rope
<erikh>
slyphon: right; that's what tie does really, just proxies the i/o for a data strcuture
ebouchut has joined #ruby-lang
<erikh>
injekt's example is a little convoluted, but it takes any change to the string and pushes it as a new string in a list, and returns a random element from that list on read
<erikh>
it's circumvented the i/o for writing to that string.
<erikh>
well, and reading of course.
<erikh>
oh
<erikh>
it just shifts it
<erikh>
even more useless
<erikh>
:P
zmack has quit [Remote host closed the connection]
<erikh>
oh well, I'll ping -core when I'm less tired
<erikh>
thanks for the effort, folks
erikh has left #ruby-lang ["WeeChat 0.3.9.2"]
<injekt>
hey im just pleased i managed to write it all and it run first time without issues having not written perl for a while
<injekt>
even if it is pointless and in some terms harmful to understand
thisirs has quit [Ping timeout: 250 seconds]
Rarrikins_r has joined #ruby-lang
Rarrikins has quit [Ping timeout: 250 seconds]
m3nd3s has quit [Remote host closed the connection]
m3nd3s has joined #ruby-lang
sush24 has joined #ruby-lang
reppard has quit [Ping timeout: 252 seconds]
tbuehlmann has quit [Remote host closed the connection]
blacktul_ has joined #ruby-lang
m3nd3s has quit [Remote host closed the connection]
blacktulip has quit [Ping timeout: 260 seconds]
sush24 has quit [Ping timeout: 244 seconds]
sush24 has joined #ruby-lang
stonerfish has joined #ruby-lang
megharsh has joined #ruby-lang
megharsh has quit [Client Quit]
megharsh has joined #ruby-lang
sulo has joined #ruby-lang
MaddinXx has quit [Remote host closed the connection]
sepp2k has quit [Ping timeout: 252 seconds]
drbrain has joined #ruby-lang
achiu has quit [Ping timeout: 252 seconds]
tenderlove has quit [Remote host closed the connection]
tenderlove has joined #ruby-lang
jonahR has joined #ruby-lang
ebouchut has quit [Quit: This computer has gone to sleep]
Asher has joined #ruby-lang
sepp2k has joined #ruby-lang
francisfish has joined #ruby-lang
nmeum has joined #ruby-lang
nmeum has left #ruby-lang [#ruby-lang]
srbaker has quit [Quit: Computer has gone to sleep.]
sulo has quit [Remote host closed the connection]
larrylv has joined #ruby-lang
<whitequark>
dominikh: you're welcome :)
<dominikh>
even tho they are mostly causing me problems right now :P
<whitequark>
why are they?
wallerdev has joined #ruby-lang
<dominikh>
well, first they didn't work properly because nginx was buffering. that was easy to fix. now I am facing a problem where two EventSources in a single script don't work in chrome but work in firefox. wireshark tells me that chrome does send the 2nd request correctly, but it never reaches the backend server, so only the first source works
<rue>
Everybody with Perl problems I assume from the context
<whitequark>
dominikh: oooh, nginx buffering :) didn't I say about it? proxy_buffering off; ftw
<whitequark>
hm
<whitequark>
version of chrome? chrome 6 advertises support, but it seems that chrome <9 doesn't actually work
Asher has quit [Quit: Leaving.]
<whitequark>
also.
<dominikh>
whitequark: as for buffering, I disable it just for the SSE bits, with a special header. I do like buffering for other parts :P
<whitequark>
pipelining.
sulo has joined #ruby-lang
<dominikh>
chromium 24
<whitequark>
chrome has pipelining which is really FUBAR with SSE for some reason
<dominikh>
mhm
<whitequark>
namely, for me, it sends an SSE request and then seemingly pipelines some other one (eg favicon) _after_ it
<whitequark>
so until the first SSE request expires after 30s of inactivity, the second one won't get to loading
<whitequark>
this kinda annoys me
<dominikh>
well that doesn't exactly work well with something that doesn't time out
<whitequark>
I'm not sure why it expires after 30s of inactivity for me
<whitequark>
well, that could be either nginx or thin
<whitequark>
it does happen with thin on localhost, I think
<whitequark>
let me check.
larrylv has quit [Ping timeout: 250 seconds]
<whitequark>
dominikh: hint: use "X-Accel-Buffering: no" header in your backend to avoid messing with nginx settings
<dominikh>
exactly the the header I was talking about ;)
<whitequark>
oh, right
sepp2k has quit [Read error: Connection reset by peer]
[dmp] has joined #ruby-lang
sepp2k has joined #ruby-lang
vlad_starkov has joined #ruby-lang
<dominikh>
whitequark: okay, seems to be nginx here that is messing with two SSE streams. at least it seems to work fine when bypassing nginx and talking to the backend directly
<whitequark>
strange
<dominikh>
yeah, especially because it works in firefox :D
sulo has quit [Remote host closed the connection]
retro|cz has quit [Remote host closed the connection]
<whitequark>
dominikh: I'd say it is pipelining again. what does wireshark say about that?
soahccc has joined #ruby-lang
<dominikh>
whitequark: chrome sends a normal http request, nothing ever responds.
stardiviner has quit [Ping timeout: 248 seconds]
<dominikh>
to make things worse, I don't see anything in nginx's logs
<whitequark>
weird
wmoxam has quit [Remote host closed the connection]
<whitequark>
chrome://net-internals ?
kennyvb has quit [Ping timeout: 244 seconds]
ebouchut has joined #ruby-lang
<dominikh>
yeaah, that doesn't really help :>
sepp2k1 has joined #ruby-lang
sepp2k has quit [Ping timeout: 255 seconds]
<dominikh>
whitequark: disabling pipelining in chrome fixes the issue
<whitequark>
dominikh: I knew.
<dominikh>
that's bloody stupid
<whitequark>
yeah
<whitequark>
and the thing you need to do is, probably, make a few CNAMEs
<dominikh>
yeah, definitely won't do that
stardiviner has joined #ruby-lang
<dominikh>
luckily this is a project where I can say "shit happens" if it doesn't work for others.
<dominikh>
it's internal
<whitequark>
why don't do that? it's fairly trivial, no?
<dominikh>
because I want my router to have a single name only ;)
<dominikh>
it's also fairly trivial to combine both event sources into one. this was more about knowing WHY it didn't work
<whitequark>
ah, right
<Paradox>
#rails seems dead this morning, but i've got a small sticky point
<Paradox>
i'm trying to move from a many-to-one to a many-to-many relationship
<Paradox>
but i already have code in the m2o
<Paradox>
what would be the best way to migrate this in the migration
<telemachus>
Paradox: Another good channel for rails is (or was - haven't been there in a while) #railsbridge
<telemachus>
less crowded, less troll-y
<tpope>
wtf is #rails? #rubyonrails is the official channel
nyuszika7h has quit [Read error: Connection reset by peer]
<chris2>
rubyists always need two channels
<havenn>
#railsnoob
nyuszika7h has joined #ruby-lang
MaddinXx_ has joined #ruby-lang
davidbalbert is now known as davidbalber|away
breakingthings has quit []
msch has quit [Quit: Coyote finally caught me]
cyri_ has joined #ruby-lang
<darix>
tpope: you sure that #rails isnt just a redirection to #rubyonrails?
<dominikh>
#ror is, #rails is not
<darix>
ah
<dominikh>
#rails is some almost always dead channel
<emocakes>
Paradox a shell script?
msch has joined #ruby-lang
<Paradox>
emocakes, nah, i figured it out
solars has quit [Ping timeout: 244 seconds]
<Paradox>
tpope, #ruby has more people than #ruby-lang too
<dominikh>
yeah, keeps the outcasts away from the real channel
<Paradox>
people seem to find it so difficult to read topics
<Paradox>
its always been amusing
<Paradox>
emocakes, nah, im going to do it in the migration
<emocakes>
makes sense
<Paradox>
i just have to think about the proper way to do it on the down
<Paradox>
gurh
<tpope>
last I checked (many years ago), #ruby was basically a bunch of people that were too dumb to find the offical channel
<Paradox>
some nice people hang out in ruby
<Paradox>
banisterfield, Mon_ouie
<tpope>
I don't really need more ruby channels :|
<dominikh>
Mon_Ouie hangs out here, too.
<dominikh>
and banister is a stoner :P
<Mon_Ouie>
Yeah, and banister used to be here too
<tpope>
I'll migrate if that's the thing to do
<Mon_Ouie>
He actually used to be here but not on #ruby
wallerdev has quit [Quit: wallerdev]
havenn has quit [Remote host closed the connection]
lcdhoffman has joined #ruby-lang
<darix>
Mon_Ouie: do you need more infos for the coolline bug?
<Mon_Ouie>
I think it's more of a Pry bug still
<matti>
Mon_Ouie: ;]
solars has joined #ruby-lang
<Mon_Ouie>
When did it happen though?
Nisstyre-laptop has joined #ruby-lang
<Mon_Ouie>
(I mean, how to reproduce)
wallerdev has joined #ruby-lang
msch has quit [Quit: Coyote finally caught me]
msch has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
lcdhoffman has quit [Quit: lcdhoffman]
ericwood has quit [Remote host closed the connection]
Rarrikins_r has quit [Ping timeout: 265 seconds]
ebouchut has quit [Quit: This computer has gone to sleep]
sailias has quit [Ping timeout: 248 seconds]
CapnKernul has joined #ruby-lang
wyhaines has joined #ruby-lang
Spaceghostc2c has quit [Excess Flood]
vlad_starkov has joined #ruby-lang
ryanf has quit [Ping timeout: 252 seconds]
lcdhoffman has joined #ruby-lang
Spaceghostc2c has joined #ruby-lang
postmodern has joined #ruby-lang
sush24 has quit [Quit: This computer has gone to sleep]
vlad_starkov has quit [Ping timeout: 255 seconds]
sush24 has joined #ruby-lang
s0ber_ has joined #ruby-lang
tdy has quit [Read error: Connection reset by peer]
tdy_ has joined #ruby-lang
s0ber has quit [Ping timeout: 265 seconds]
s0ber_ is now known as s0ber
reppard has joined #ruby-lang
achiu has joined #ruby-lang
achiu has quit [Client Quit]
achiu has joined #ruby-lang
reppard has quit [Ping timeout: 250 seconds]
Asher has joined #ruby-lang
leopard_me has quit [Quit: Computer has gone to sleep.]
CapnKernul has quit [Quit: Leaving...]
xalei has joined #ruby-lang
holgerno has joined #ruby-lang
reppard has joined #ruby-lang
sush24 has quit [Quit: This computer has gone to sleep]
kennyvb has joined #ruby-lang
jonahR has quit [Ping timeout: 252 seconds]
sulo has joined #ruby-lang
lsegal has joined #ruby-lang
sulo has quit [Remote host closed the connection]
<darix>
Mon_Ouie: moment
tenderlove has quit [Remote host closed the connection]
<darix>
see query
ryanf has joined #ruby-lang
francisfish has quit [Remote host closed the connection]
ryanf has quit [Ping timeout: 244 seconds]
ryanf has joined #ruby-lang
reppard has quit [Quit: leaving]
stonerfish has quit [Quit: Leaving.]
mccraig_ has left #ruby-lang [#ruby-lang]
mccraig has joined #ruby-lang
stonerfish has joined #ruby-lang
mccraig has left #ruby-lang [#ruby-lang]
CapnKernul has joined #ruby-lang
workmad3 has joined #ruby-lang
tdy_ has quit [Ping timeout: 245 seconds]
tdy_ has joined #ruby-lang
kurko_ has quit [Ping timeout: 252 seconds]
stonerfish has quit [Quit: Leaving.]
sailias has joined #ruby-lang
havenn has joined #ruby-lang
stonerfish has joined #ruby-lang
francisfish has joined #ruby-lang
CapnKernul has quit [Quit: Leaving...]
stonerfish has quit [Client Quit]
stonerfish has joined #ruby-lang
francisfish has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
leopard_me has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 252 seconds]
leopard_me has quit [Quit: Computer has gone to sleep.]
havenn has quit [Ping timeout: 260 seconds]
s1n4 has joined #ruby-lang
MaddinXx_ has quit [Remote host closed the connection]
s1n4 has quit [Client Quit]
s1n4 has joined #ruby-lang
Nisstyre-laptop has quit [Quit: Leaving]
nyuszika7h has quit [Quit: Here we are, going far to save all that we love - If we give all we've got, we will make it through - Here we are, like a star shining bright on your world - Today, make evil go away!]
nyuszika7h has joined #ruby-lang
Asher has quit [Quit: Leaving.]
blacktul_ has quit [Remote host closed the connection]
CapnKernul has joined #ruby-lang
cyri_ has quit [Quit: cyri_]
Rarrikins has joined #ruby-lang
s1n4 has quit [Quit: leaving]
havenn has joined #ruby-lang
jondot` has quit [Ping timeout: 255 seconds]
leopard_me has joined #ruby-lang
drbrain has quit [Remote host closed the connection]
xyzodiac has quit [Quit: Computer has gone to sleep.]