idkazuma has quit [Remote host closed the connection]
datanoise has quit [Ping timeout: 240 seconds]
cmckni3 has joined #ruby-lang
datanoise has joined #ruby-lang
tomzx_mac has joined #ruby-lang
Domon has joined #ruby-lang
RickHull has joined #ruby-lang
tbuehlmann has quit [Ping timeout: 252 seconds]
<yfeldblum>
darix, i want to cache something on the filesystem for the duration of each thread-process-pair in a multithreaded and multiprocessed program
Stilo has joined #ruby-lang
<yfeldblum>
darix, i can use the pids and tids, but i'd like to prevent any stupid nonsense race conditions, whether hypothetical or real
slyphon has quit [Quit: slyphon]
sailias has joined #ruby-lang
plusk has joined #ruby-lang
justinmcp has joined #ruby-lang
kurko_ has quit [Ping timeout: 252 seconds]
cirenyc has joined #ruby-lang
Banistergalaxy has quit [Ping timeout: 245 seconds]
Banistergalaxy has joined #ruby-lang
Domon has quit [Remote host closed the connection]
KU0N has quit [Quit: Leaving...]
marr has quit [Ping timeout: 248 seconds]
thone has quit [Ping timeout: 252 seconds]
havenn has quit [Remote host closed the connection]
thone has joined #ruby-lang
kurko_ has joined #ruby-lang
mrsolo has quit [Quit: Leaving]
slyphon has joined #ruby-lang
slyphon has quit [Client Quit]
Domon has joined #ruby-lang
Domon has quit [Remote host closed the connection]
Domon has joined #ruby-lang
sebasoga has quit [Quit: Computer has gone to sleep.]
sailias has quit [Quit: Leaving.]
mjio has quit []
mistym has quit [Remote host closed the connection]
brianpWins has quit [Quit: brianpWins]
plusk has quit [Quit: plusk]
cirenyc has quit [Quit: Leaving...]
jackhammer2022 has joined #ruby-lang
Domon has quit [Remote host closed the connection]
Honeycomb has joined #ruby-lang
krz has joined #ruby-lang
gregmoreno has quit [Ping timeout: 245 seconds]
torrieri has quit [Quit: Leaving...]
slyphon has joined #ruby-lang
cirenyc has joined #ruby-lang
cirenyc has quit [Client Quit]
krohrbaugh has quit [Quit: Leaving.]
sn0wb1rd has quit [Quit: I will be right back]
dous has quit [Changing host]
dous has joined #ruby-lang
mjio has joined #ruby-lang
torrieri has joined #ruby-lang
justinmcp has quit [Ping timeout: 245 seconds]
datanoise has quit [Ping timeout: 264 seconds]
lsegal` has joined #ruby-lang
lsegal` has quit [Client Quit]
lsegal has joined #ruby-lang
torrieri has quit [Quit: Leaving...]
datanoise has joined #ruby-lang
joevandyk has quit [Quit: joevandyk]
slyphon has quit [Quit: slyphon]
Honeycomb has quit [Quit: Leaving.]
mistym has joined #ruby-lang
Domon has joined #ruby-lang
sebasoga has joined #ruby-lang
sebasoga has quit [Read error: Connection reset by peer]
sebasoga has joined #ruby-lang
dhruvasagar has joined #ruby-lang
sebasoga has quit [Read error: Connection reset by peer]
torrieri has joined #ruby-lang
sebasoga has joined #ruby-lang
justinmcp has joined #ruby-lang
srbaker has quit [Quit: Computer has gone to sleep.]
dhruvasagar has quit [Ping timeout: 252 seconds]
sebasoga has quit [Ping timeout: 248 seconds]
havenwood has joined #ruby-lang
sebasoga has joined #ruby-lang
joooooo has joined #ruby-lang
setmeaway2 has quit [Read error: Connection reset by peer]
<kith>
is there something like "hash.map!"?
sebasoga has quit [Read error: Connection reset by peer]
sebasoga has joined #ruby-lang
sn0wb1rd has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
<firefux>
right, if you don't have 1.8 you don't have to do that, ruby will be ruby1.9.1
Kuukunen has joined #ruby-lang
geopet has joined #ruby-lang
<postmodern>
firefux, i don't have 1.8 installed and apparently I had to do that
<firefux>
on 12.04?
<postmodern>
firefux, yup
<postmodern>
firefux, sshed in right now
davidbalber|away is now known as davidbalbert
datanoise has quit [Ping timeout: 245 seconds]
klebervi_ has joined #ruby-lang
slyphon has joined #ruby-lang
klebervirgilio has quit [Ping timeout: 264 seconds]
tdy_ has joined #ruby-lang
klebervi_ has quit [Remote host closed the connection]
klebervirgilio has joined #ruby-lang
<firefux>
postmodern: I just did apt-get install ruby1.9.3 on a fresh 12.04 VM and ruby -v showed 1.9.3p0
<postmodern>
firefux, ah excellent
<firefux>
so don't know why you had to do that if you didn't had 1.8 installed
<postmodern>
firefux, than i guess the author assumed or added it as a safety measure
<postmodern>
firefux, maybe ruby1.8 got depped in at some point, and i uninstalled it later
<postmodern>
firefux, think vim requires ruby for highlighting/indentation
lcdhoffman has quit [Quit: lcdhoffman]
<postmodern>
*libruby
bzalasky has joined #ruby-lang
<drbrain>
no, its separate
<drbrain>
vim's syntax highlighting and indentation is regular-expression based
<firefux>
not sure, I think vim only requires it if you plan to script vim in ruby
<firefux>
otherwise you don't anything ruby related for vim
klebervirgilio has quit [Ping timeout: 245 seconds]
soypirate has joined #ruby-lang
geopet has quit [Quit: geopet]
wmoxam has joined #ruby-lang
ryanf has quit [Quit: leaving]
banister`sleep has quit [Read error: Connection reset by peer]
bzalasky has quit [Remote host closed the connection]
spuk has quit [Ping timeout: 255 seconds]
datanoise has joined #ruby-lang
spuk has joined #ruby-lang
jxie has quit [Quit: leaving]
kvs has quit [Ping timeout: 246 seconds]
bzalasky has joined #ruby-lang
pkondzior__ has quit [Read error: Operation timed out]
wycats__ has quit [Write error: Broken pipe]
beawesomeinstead has quit [Read error: Operation timed out]
bzalasky has quit [Remote host closed the connection]
thejspr_ has quit [Read error: Operation timed out]
dreinull_ has quit [Ping timeout: 252 seconds]
guilleiguaran has quit [Ping timeout: 255 seconds]
randym has quit [Ping timeout: 264 seconds]
Guest85414 has quit [Ping timeout: 264 seconds]
herpless has quit [Ping timeout: 256 seconds]
akahn has quit [Ping timeout: 256 seconds]
anildigital_work has quit [Ping timeout: 245 seconds]
akamike has quit [Ping timeout: 245 seconds]
lectrick has quit [Ping timeout: 264 seconds]
UziMonkey has quit [Read error: Operation timed out]
L0rdShrek____ has quit [Ping timeout: 272 seconds]
grandy has quit [Ping timeout: 252 seconds]
Spaceghost|cloud has quit [Ping timeout: 245 seconds]
mroth_ has quit [Ping timeout: 256 seconds]
bpot has quit [Ping timeout: 260 seconds]
amdprophet has quit [Ping timeout: 245 seconds]
pnr has quit [Ping timeout: 256 seconds]
<rking>
Hrm. What's the right way to install libruby.a in such a way that compiling vim/subtle/etc can bind to it, if you're using something like ruby-build?
<rking>
Do you just point all the way into ~/.rbenv/versions/etc ?
<rking>
s/bind to it/link it/
scrr has quit [Ping timeout: 264 seconds]
sush24 has joined #ruby-lang
<postmodern>
rking, install it into /usr/local
gregmoreno has joined #ruby-lang
<postmodern>
rking, or pass special --with-ruby-dir flags to vim/subtle/etc
<postmodern>
rking, ruby-build $RUBY /usr/local/
datanoise has quit [Ping timeout: 260 seconds]
gregmoreno has quit [Remote host closed the connection]
gregmoreno has joined #ruby-lang
kvs has joined #ruby-lang
JonsonXP has quit [Ping timeout: 250 seconds]
<rking>
Ahh, nice.
<rking>
postmodern: Thanks.
justinmcp has quit [Remote host closed the connection]
<rking>
I tried being cheeky and just symlinking libruby-static.a into /usr/lib, but it gave an error about needing to compile with -fPIC.
Kuukunen has quit [Ping timeout: 264 seconds]
<rking>
I'm not sure if that referred to the .a or to subtle. I tried hacking -fPIC into both, with no success.
shirokuro11 has joined #ruby-lang
sush24 has quit [Client Quit]
<rking>
postmodern: Thanks for the PSA re grumpy IRC people. Chance of hitting the intended audience: 0.0000001%, but still.
<postmodern>
rking, thanks, keep running into them on linux/lang channels
<postmodern>
rking, and they are never official support people
scrr has joined #ruby-lang
sonne has quit [Ping timeout: 276 seconds]
mercwithamouth has quit [Quit: leaving]
mercwithamouth has joined #ruby-lang
jxie has joined #ruby-lang
djwonk has quit []
justinmcp has joined #ruby-lang
chendo_ has quit [Ping timeout: 256 seconds]
shirokuro11 has quit [Remote host closed the connection]
chendo_ has joined #ruby-lang
Kuukunen has joined #ruby-lang
bzalasky has joined #ruby-lang
kurko_ has quit [Quit: Computer has gone to sleep.]
valeri_ufo has quit [Ping timeout: 276 seconds]
torrieri has quit [Quit: Leaving...]
valeri_ufo has joined #ruby-lang
vbatts has quit [Quit: WeeChat 0.3.6]
torrieri has joined #ruby-lang
gregmor__ has joined #ruby-lang
jasiek_ has quit [Ping timeout: 248 seconds]
Artheist has joined #ruby-lang
sepp2k has joined #ruby-lang
gregmoreno has quit [Ping timeout: 264 seconds]
vbatts has joined #ruby-lang
his_shadow has quit [Ping timeout: 260 seconds]
justinmcp has quit [Remote host closed the connection]
jasiek has joined #ruby-lang
ryanf has joined #ruby-lang
spuk has quit [Quit: Human beings were created by water to transport it uphill.]
sonne has joined #ruby-lang
davidbalbert is now known as davidbalber|away
amerine has quit [Quit: Computer has gone to sleep.]
justinmcp has joined #ruby-lang
meatballhat has quit [Quit: leaving]
meatballhat has joined #ruby-lang
Artheist has quit [Remote host closed the connection]
nXqd has joined #ruby-lang
robbyoconnor has joined #ruby-lang
wycats__ has joined #ruby-lang
wmoxam has quit [Quit: leaving]
Artheist has joined #ruby-lang
justinmcp has quit [Remote host closed the connection]
<hakunin>
I wonder why Net::HTTPResponse doesn't just provide #each, instead naming it #read_body...
torrieri has quit [Read error: Connection reset by peer]
drumond19 has joined #ruby-lang
djwonk has joined #ruby-lang
<hakunin>
If I wanted to stream from Net::HTTPResponse to Rails' send_data (which accepts objects responding to #each) I guess i'd have to wrap it just to rename that method
mercwithamouth has quit [Ping timeout: 248 seconds]
mercwithamouth has joined #ruby-lang
glebm has quit [Quit: Computer has gone to sleep.]
Honeycomb has quit [Quit: Leaving.]
glebm has joined #ruby-lang
drbrain has quit [Ping timeout: 264 seconds]
Domon has quit [Remote host closed the connection]
mistym has quit [Remote host closed the connection]
trappist_ is now known as trappist
noop has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 255 seconds]
MSU_ has quit [Ping timeout: 248 seconds]
mroth_ has joined #ruby-lang
MSU has joined #ruby-lang
anildigital_work has joined #ruby-lang
Guest85414 has joined #ruby-lang
bpot has joined #ruby-lang
<yfeldblum>
hakunin, `http_response.enum_for(:read_body).each do |part| ... end`
pkondzior__ has joined #ruby-lang
thejspr_ has joined #ruby-lang
guilleiguaran has joined #ruby-lang
iamjarvo has quit [Quit: Leaving.]
skade has joined #ruby-lang
akahn has joined #ruby-lang
dreinull_ has joined #ruby-lang
vlad_starkov has joined #ruby-lang
L0rdShrek____ has joined #ruby-lang
pnr has joined #ruby-lang
lectrick has joined #ruby-lang
drumond19 has quit [Read error: Connection reset by peer]
Spaceghost|cloud has joined #ruby-lang
akamike has joined #ruby-lang
ruby-lang114 has joined #ruby-lang
randym has joined #ruby-lang
mjio has quit []
UziMonkey has joined #ruby-lang
UziMonkey has joined #ruby-lang
UziMonkey has quit [Changing host]
<hakunin>
yfeldblum: i knew there must be a way to turn anything into an enumerator, thanks
jerrytgarcia has joined #ruby-lang
herpless_ has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
Domon has joined #ruby-lang
amdprophet has joined #ruby-lang
grandy has joined #ruby-lang
io_syl has quit [Ping timeout: 245 seconds]
JohnBat26 has joined #ruby-lang
rippa has joined #ruby-lang
ruby-lang114 has quit [Ping timeout: 245 seconds]
datanoise has joined #ruby-lang
beawesomeinstead has joined #ruby-lang
tomzx_mac has quit [Ping timeout: 248 seconds]
Mon_Ouie has joined #ruby-lang
datanoise has quit [Ping timeout: 256 seconds]
rc- has joined #ruby-lang
rue|w has joined #ruby-lang
drbrain has joined #ruby-lang
krz has quit [Ping timeout: 248 seconds]
Domon has quit [Remote host closed the connection]
rue|w has quit [Ping timeout: 276 seconds]
tonni has quit [Remote host closed the connection]
krz has joined #ruby-lang
charliesome has joined #ruby-lang
Honeycomb has joined #ruby-lang
noop has quit [Read error: Connection reset by peer]
nXqd has quit [Ping timeout: 276 seconds]
earthquake has joined #ruby-lang
justinmcp has joined #ruby-lang
noop has joined #ruby-lang
rc- has quit [Ping timeout: 245 seconds]
wallerdev has quit [Quit: wallerdev]
charliesome_ has joined #ruby-lang
charliesome has quit [Disconnected by services]
charliesome_ is now known as charliesome
chendo_ has quit [Ping timeout: 252 seconds]
xalei has joined #ruby-lang
justinmcp has quit [Ping timeout: 245 seconds]
tonni has joined #ruby-lang
chendo_ has joined #ruby-lang
nXqd has joined #ruby-lang
gnufied has joined #ruby-lang
lun_ has quit [Ping timeout: 264 seconds]
musl has quit [Ping timeout: 255 seconds]
<hakunin>
Relatedly, in ruby it seems you can only read or write to the pipe, not both. So if I want to pipe a bunch of data through an external command (I write and I read), must I first write everything before starting to read?
noop has quit [Ping timeout: 264 seconds]
<hakunin>
and if yes, is there some workaround to have actual stream going?
<drbrain>
hakunin: you need two pipes
<drbrain>
pipes only go one way
<hakunin>
drbrain: hm, and you can have 2 pipes to the same command? I need to write to its one end and read from the other
noop has joined #ruby-lang
<drbrain>
hakunin: yes
jayne has quit [Ping timeout: 612 seconds]
<drbrain>
you write to the pipe the command reads from and read from the pipe the command writes to
<drbrain>
popen does this for you automatically, with spawn you need to set it up yourself
<hakunin>
drbrain: makes sense, i just need a pointer to a class/method i should look at, something like popen4 (i actually wanted to use rtomayko's posix-spawn, but not 100% necessary)
<drbrain>
spawn is built-in to 1.9.3 and newer
<drbrain>
oops, 1.9 and newer
<hakunin>
drbrain: whoops, wrote before reading that
<drbrain>
I think posix-spawn is only needed on ruby 1.8
dhruvasagar has joined #ruby-lang
<drbrain>
yeah, according to the README, of posix spawn, use it on 1.8
<hakunin>
really, that's pretty serious news to me....
bzalasky has quit [Remote host closed the connection]
musl has joined #ruby-lang
<hakunin>
drbrain: as in - in 1.9 the forking is already implemented without copy-on-write madness?
ryez has joined #ruby-lang
<drbrain>
hakunin: it's a property of spawn, not ruby
<hakunin>
drbrain: oh perhaps you misread that readme, posix-spawn changes sys calls, not just interface
skade has quit [Quit: Computer has gone to sleep.]
rippa has quit [Ping timeout: 240 seconds]
<hakunin>
it's a peculiar issue with ruby's GC triggering CoW on all of memory by flipping dirty bit
<drbrain>
hakunin: ruby now uses bitmap marking
|Vargas| has joined #ruby-lang
|Vargas| has quit [Client Quit]
<hakunin>
drbrain: i did not know that
<drbrain>
hakunin: but, it doesn't look like posix-spawn reimplements system, `, etc.
jayne has joined #ruby-lang
|Vargas| has joined #ruby-lang
<hakunin>
drbrain: it's fully isolated, i just wanted to use that to avoid wasting ram in shell-outs to imagemagick and friends
lun_ has joined #ruby-lang
<hakunin>
but apparently it is not as much of an issue anymore
<drbrain>
looks like 1.9 uses spawn for system and `
<hakunin>
drbrain: fwiw, i also wrote my imagemagick wrapper skeptick based on posix spawn, and advertised it as an advantage: github.com/maxim/skeptick
<drbrain>
likely for popen too
<hakunin>
maybe should start downplaying that
<havenwood>
Kinda seems like Enumerable#to_h would be handy. Any downsides I'm not thinking of for a simple implementation like this?: https://gist.github.com/havenwood/5088442
<hakunin>
drbrain: appreciate pointers, will figure it out from here
<drbrain>
for spawn, system, ` and popen, 1.9 won't suffer from CoW when invoking a program
nXqd has quit [Ping timeout: 255 seconds]
pepper_chico has quit [Quit: Computer has gone to sleep.]
bzalasky has joined #ruby-lang
lun_ has quit [Read error: Connection reset by peer]
<hakunin>
drbrain: i'm a bit more confused now, i thought all of them relied on fork, and once you fork in ruby <2.0 - you will suffer from CoW because GC changes are not deployed as part of 1.9
<whitequark>
drbrain: wait, _avoid_ CoW?
fgsfdsfgsfds has joined #ruby-lang
<whitequark>
isn't it that bitmap marking GC makes CoW much more efficient? like, REE implemented it specifically for that reason?
<drbrain>
whitequark: when you use fork + exec you still get a copy of the memory on some OSes
Mon_Ouie has quit [Ping timeout: 276 seconds]
<drbrain>
so ruby uses spawn if the OS supports it to avoid the extra copying
<hakunin>
so spawn in and of itself _is_ that other thing besides fork, that doesn't copy memory? this is probably the source of my confusion
atrocitas has joined #ruby-lang
<drbrain>
hakunin: yes
<hakunin>
i thuoght there were different spawns
<hakunin>
:(
<drbrain>
same system call, separate implementations
<hakunin>
so why woudl posix-spawn offer to replace 1.9's spawn
<drbrain>
hakunin: it is for ruby 1.8
<hakunin>
drbrain: i don't see where it says that
<drbrain>
"The posix-spawn library aims to implement a subset of the Ruby 1.9 Process::spawn interface in a way that takes advantage of fast process spawning interfaces when available and provides sane fallbacks on systems that do not."
<eam>
posix_spawn is done with vfork
<whitequark>
drbrain: nono, I was talking about bitmap marking. I understand how fork and spawn and CoW relate
<eam>
on linux, at least
<whitequark>
drbrain: but I don't get how the bitmap marking adds to the mix
<drbrain>
whitequark: 1.9 and earlier stores marks on each object so you touch (and copy) all of memory on first GC
amerine has joined #ruby-lang
<drbrain>
the bitmaps put those marks into fewer pages
<whitequark>
drbrain: indeed, so bitmap marking is _good_ for CoW. no?
<drbrain>
so you won't have multiple copies of all your instruction sequences
<drbrain>
correct
<whitequark>
ah
<whitequark>
I simply misunderstood your sentence
<whitequark>
nevermind
<hakunin>
drbrain: that piece of doc only says they're adhering to 1.9's interface
<drbrain>
eam: I bet vfork() came before posix_spawn()
<hakunin>
drbrain: i don't think there is any low level spawn, it's all fork, or as eam points out, looks like vfork makes all the diff
<drbrain>
hakunin: also, "A largish compatible subset of Ruby 1.9's Process::spawn interface and enhanced versions of Kernel#system, Kernel#`, etc. under Ruby >= 1.8.7 (currently MRI only)."
<hakunin>
or i'm an idiot and don't know anything about computers
<hakunin>
(not saying it's unlikely)
<drbrain>
hakunin: all of what's written in the README says "we are copying 1.9's Process::spawn"
<hakunin>
drbrain: again, i searched through all mentions of 1.8 and all they say is that it's _also_ useful in 1.8
<hakunin>
drbrain: as in "despite being in 1.8, you will get 1.9's interface"
fgsfdsfgsfds has quit [Ping timeout: 245 seconds]
vlad_starkov has joined #ruby-lang
<hakunin>
drbrain: but the underlying system calls differ
<hakunin>
from vanilla spawn
<eam>
drbrain: probably. vfork is the nonstandard call and posix_spawn() is the portable version
<drbrain>
hakunin: I would be surprised if there were a serious functional difference between the different calls
<hakunin>
drbrain: that difference is in entirely ignoring CoW, and only useful for forking when you will never need parent process' memory
<hakunin>
which is perfect for shell-outs
<whitequark>
(not that the forking overhead actually matters that much in practice. I recall reading an article about that.)
<eam>
fork vs vfork is huge on linux at least, I had an app which shelled out many times, we plotted a clear linear cost as resident memory grew
<hakunin>
whitequark: with problematic GC it matters, because on some of my servers i'm literally "only room for one more Rails process in ram"
jerrytgarcia has quit [Read error: Connection reset by peer]
<whitequark>
I see
<eam>
at MB sized processes the CoW cost vanishes into the noise of making a syscall. But at GB sized or bigger it becomes a dominant cost
<eam>
for us it added tens of minutes to a job
vlad_starkov has quit [Ping timeout: 256 seconds]
chendo__ has joined #ruby-lang
<drbrain>
hakunin: they're the same
<drbrain>
posix-spawn and 1.9's Process.spawn/system/`/popen use the equivalent system calls
<eam>
for our particular purpose we ended up writing a small daemon we could ipc to, to fork/exec for us
nXqd has joined #ruby-lang
<drbrain>
ruby 1.9 only forks when you don't have spawn/posix_spawn/vfork
<hakunin>
drbrain: if vfork doesn't let child use parent's memory how can this work
<drbrain>
hakunin: I thought you said that was the whole point
<hakunin>
drbrain: but sometimes you fork for other reasons than shell out
<eam>
hakunin: the child must exec() immediately or undefined
<drbrain>
hakunin: then posix-spawn still does nothing for you
<drbrain>
and you should use ruby 2
jerrytgarcia has joined #ruby-lang
<hakunin>
drbrain: i'm asking, if ruby 1.9 always uses vfork on systems that support it, then you can never fork and have parent process memory
<hakunin>
drbrain: that seems weird
<drbrain>
hakunin: it does the appropriate thing for what you are doing
beho has joined #ruby-lang
<hakunin>
(on those systems)
<eam>
hakunin: it only would use it for creating child processes (fork/exec) not for fork itself
<drbrain>
fork do ruby code end uses "regular" fork
* hakunin
is processing
ykk has quit [Remote host closed the connection]
<drbrain>
fork do exec 'some', 'other', 'program' end uses "regular" fork
<drbrain>
system 'some', 'other', 'program' uses the spawn family, where available
gregmor__ has quit [Remote host closed the connection]
<drbrain>
same for using shell execution
justinmcp has joined #ruby-lang
<drbrain>
(system "some other program", but you should avoid that where possible
<hakunin>
drbrain: ok i think it's hitting me: these methods you keep listing, they are only for exec, so obviopusly they can safely use vfork on supporting systems, and ruby 1.9 already does that. Bear with me, I'm connecting.
<hakunin>
their purpose is shell-outs, so yes, they can forget parent
<hakunin>
now it makes sense
<drbrain>
yay!
<hakunin>
drbrain: i seriously appreciate the time you took to explain this
<hakunin>
eam: thanks a lot for clarifications
chendo__ has quit [Quit: Computer has gone to sleep.]
lun_ has joined #ruby-lang
huydx has joined #ruby-lang
apeiros_ has joined #ruby-lang
vmoravec has joined #ruby-lang
tonni has quit [Remote host closed the connection]
chendo_ has quit [Ping timeout: 252 seconds]
bluepojo has quit [Remote host closed the connection]
justinmcp has quit [Remote host closed the connection]
bluepojo has joined #ruby-lang
justinmcp has joined #ruby-lang
chendo_ has joined #ruby-lang
kgrz has joined #ruby-lang
bluepojo has quit [Ping timeout: 252 seconds]
seoaqua has joined #ruby-lang
imperator has joined #ruby-lang
<hakunin>
drbrain: sorry to bother you again, above you mentioned that "popen does this for you automatically" about 2 pipes. but given a block with out, err, in - how can i write to in and read from out simultaneously? just do it in order in.write(chunk); yield(out.read) type of thing?
<drbrain>
hakunin: yes
<drbrain>
hakunin: if you need to interleave reading and writing you can use IO.select or threads
<hakunin>
drbrain: so it's a blocking write, and a blocking read
<hakunin>
drbrain: ok i see, thanks
beho has quit [Remote host closed the connection]
datanoise has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
<drbrain>
hakunin: 1.9.3 seems to, maybe 1.9.2 does not
<drbrain>
shachaf: hi
retro|cz has quit [Ping timeout: 248 seconds]
<whitequark>
drbrain: we've been talking with @charliesome about eval-in bot from #ruby
<whitequark>
and I thought that maybe it was a good idea to have it at #r-l
<drbrain>
we can give it a shot
<whitequark>
'k, thanks!
* imperator
goes back to 1.9.3 for now
<whitequark>
imperator: something broken on 2.0?
ryanf has quit [Quit: leaving]
<imperator>
extension building seems fucked up
<drbrain>
imperator: there's some rubygems bugs
<drbrain>
should have a fix out tomorrow
tonni has joined #ruby-lang
glebm has quit [Quit: Computer has gone to sleep.]
<imperator>
oic
datanoise has quit [Ping timeout: 276 seconds]
djwonk has quit [Ping timeout: 248 seconds]
<drbrain>
changes in mkmf.rb were made to fix some bugs, but they exposed other bugs in rubygems :?
<drbrain>
:/
<imperator>
strange
torrieri has joined #ruby-lang
postmodern has quit [Quit: Leaving]
tbuehlmann has joined #ruby-lang
maxmanders has joined #ruby-lang
djwonk has joined #ruby-lang
<imperator>
huh, even after reverting i can't install ffi
<drbrain>
imperator: can you try rubygems trunk?
<seoaqua>
has anyone successfully installed ruby2.0? there are some problems with mine. i've installed the gem bson_ext, but system keep warning of it. i think it's related to the require path, but i don't know how to debug:S
chekcmate has joined #ruby-lang
<drbrain>
seoaqua: it's a RubyGems bug, there should be a release tomorrow
<seoaqua>
drbrain, O_O thanks,but ...
<drbrain>
seoaqua: you can try using rubygems trunk
<seoaqua>
drbrain, it was on a centos. on my mac, i can't even install any gems
<drbrain>
I'm on a mac and haven't had any problems (but I don't use bson)
djwonk has quit [Ping timeout: 245 seconds]
beho has joined #ruby-lang
<imperator>
ran rake install_gem, still says I have 2.0.0
<charliesome>
i had jruby on eval.in (it was called rbpad at the time) but i removed it because i got scared of the jvm
<drbrain>
… with openssl
kgrz has quit [Quit: Computer has gone to sleep.]
noop has quit [Ping timeout: 245 seconds]
tbuehlmann has quit [Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org]
<seoaqua>
drbrain, first i build the ruby without the notice of openssl, then i installed ruby with rbenv with openssl option, do i need to restart the machine?
<drbrain>
seoaqua: no
<drbrain>
if you're building by hand, ./configure --with-openssl-dir=/path/to/openssl/
<seoaqua>
drbrain, actually after building without openssl, it was running ok until i changed some path configs
<seoaqua>
drbrain, i'll try this one
noop_ has quit [Ping timeout: 264 seconds]
judofyr has joined #ruby-lang
<seoaqua>
drbrain, but it was strange when i run ruby with subliem
<seoaqua>
drbrain, *sublime. in that RUBY VERSION is 1.9.3 and GEM VERSION is 2.0.0
<chekcmate>
people pissing themselves about 32 cents
<yorickpeterse>
only 32 cents?
<chekcmate>
a friend to be precise
<chekcmate>
he often forgets that I don't ask for certain amounts he eventuallyl consumes at my appartment or whereever
<chekcmate>
which I pay
<chekcmate>
but complaining about getting 32 cents too less
<chekcmate>
i could rip his skull open and shit in his head
<chekcmate>
those things make me angry
kgrz has quit [Ping timeout: 252 seconds]
<yorickpeterse>
send him a bill
<chekcmate>
pff... it's something about being friends too
<chekcmate>
about not being the bitch
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
toretore has joined #ruby-lang
<yorickpeterse>
well clearly it's an issue
<ggreer>
sounds like a healthy relationship
<tbuehlmann>
incident management, go!
<chekcmate>
friendship stops when it comes to money
AndChat| has joined #ruby-lang
<chekcmate>
but stopping at 32 cents?
<chekcmate>
that's just miserable
<chekcmate>
sad and miserable
<ggreer>
yeah I've been friendly about wayyy more money than that. like when one of my friends wanted to go on a wine tour in south america
<yorickpeterse>
chekcmate: then what exactly is your problem?
<apeiros_>
chekcmate: give him a dollar and forget about it
<chekcmate>
it's principles!
<chekcmate>
i dont give a fuck about 32 cents and that's what he should do too
<chekcmate>
32 cents are wasted when I buy beer and don't ask for money
Banistergalaxy has quit [Ping timeout: 248 seconds]
<yorickpeterse>
oh wait, you owe him 32 cents? I thought it was the other way around
<chekcmate>
no, I OWE him
<apeiros_>
yeah, so no value in getting all worked up about it. over-return just to show, and forget it.
<chekcmate>
now come on... then I'd call myself greatest bitch on earth
noop has joined #ruby-lang
<chekcmate>
I asked if he wanted 32 punches in the face the next time I see him... no answer on that yet...
<chekcmate>
I always get worked up on those things
<chekcmate>
it's so little
<chekcmate>
but fucks things up big time
<yorickpeterse>
chekcmate: get 32 cents in 1 cent coins
<yorickpeterse>
then throw it at him while yelling "HERE PEASANT"
<chekcmate>
hahaha
<yorickpeterse>
"GO FEIST ON MY MONEY"
<lianj>
if the 32 were for drugs it is serious
<chekcmate>
nope, I give away enough drugs for free
<chekcmate>
so that does not count
<chekcmate>
the thing is that friendship is about giving and taking
klebervirgilio has joined #ruby-lang
<chekcmate>
and he obviously thinks he is the only one giving
<chekcmate>
which is absoluetly not true
<chekcmate>
but well,... fuck it
<chekcmate>
dont wanna make bad mood here
<chekcmate>
spam
<chekcmate>
it
<chekcmate>
away
<chekcmate>
I encountered a nasty bot yesterday
<yorickpeterse>
Go take a run for a few minutes already
<chekcmate>
which was funny, when you sent anything including "spam" in it, the bot would state he was vegetarian haha
<chekcmate>
yorickpeterse: good idea.. going for a smoke
<lianj>
take a run -> going for a smoke
<lianj>
close enough
lun_ has quit [Ping timeout: 252 seconds]
<whitequark>
hm
<whitequark>
has anyone encountered a sanitizer for rack which strips out all invalid utf-8?
atrocitas has quit [Remote host closed the connection]
<whitequark>
postgres really doesn't like it when I attempt to insert that filthy stuff in it
klebervirgilio has quit [Read error: Operation timed out]
vlad_starkov has joined #ruby-lang
<dbussink>
whitequark: i've always found it to be a bug in the uploaded data, ended up doing character encoding detection and then converting when necessary
<dbussink>
whitequark: with uploaded csv files etc.
<whitequark>
dbussink: it is indeed a bug in data
<whitequark>
some weird bots, and weird IE-using people send invalid requests which eventually result in 500's
sush24 has quit [Read error: Connection reset by peer]
<whitequark>
what I want is to just strip invalid characters / change them to U+FFFD
musl has quit [Ping timeout: 255 seconds]
<whitequark>
eg Opera 9 for some reason sends a strange character in useragent, which explodes when I log it in DB
sush24 has joined #ruby-lang
<whitequark>
as ruby lazily verifies utf-8 validity and postgres does that on INSERT
<lianj>
ha
<dbussink>
whitequark: ah, right, i only had the cases with for example the csv uploads, where we had to properly convert it anyway
<dbussink>
no generic "ignore all"
klebervirgilio has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
<judofyr>
dbussink: I've found that encodings in 1.9 just make it more explicit. in 1.8 you just got invalid data in your database…
<judofyr>
whitequark: the rescue EncodingError is for the encoding 1250
<dbussink>
judofyr: i don't mind the explicitness, i do mind the adhoc implementation, where in certain cases you do get exceptions / errors and in others not (while they are seemingly the same)
<dbussink>
judofyr: and postgres rejecting invalid utf-8 has saved my ass a few times :)
<judofyr>
dbussink: examples? I haven't had much problems with it (other than libraries not tagging strings correctly)
idkazuma has quit [Remote host closed the connection]
<gnufied>
I will be surprised, but afaik rails does not install a shutdown handler.
<gnufied>
there are handlers in webrick & thin
<gnufied>
rails delegates to rack handler
<gnufied>
which in turn calls thin or webrick or whatever app server you are using
dzhulk has joined #ruby-lang
<gnufied>
thin shutdown handler, closes all open active connections rather than abruptly killing the process
vlad_starkov has quit [Ping timeout: 264 seconds]
lele has quit [Quit: Coyote finally caught me]
kevinfagan has quit [Quit: Leaving...]
thebastl has quit [Read error: Operation timed out]
chekcmate has quit [Ping timeout: 245 seconds]
jondot has joined #ruby-lang
herpless_ is now known as herpless
rippa has quit [Ping timeout: 240 seconds]
sailias has joined #ruby-lang
justinmcp has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
sandbags1138 has quit [Remote host closed the connection]
kurko_ has joined #ruby-lang
iamjarvo has joined #ruby-lang
benlovell has joined #ruby-lang
plusk has joined #ruby-lang
soypirate has joined #ruby-lang
idkazuma has joined #ruby-lang
kevinfagan has joined #ruby-lang
soypirate has quit [Read error: Connection reset by peer]
tomzx_mac has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 264 seconds]
srbaker has joined #ruby-lang
anonymuse has joined #ruby-lang
dorei has joined #ruby-lang
wmoxam has joined #ruby-lang
ioga_wrk has quit [Read error: Operation timed out]
imperator has joined #ruby-lang
ioga_wrk has joined #ruby-lang
gustavnils has joined #ruby-lang
Squarepy has joined #ruby-lang
outoftime has joined #ruby-lang
adam12 has quit [Ping timeout: 240 seconds]
adam12 has joined #ruby-lang
slyphon has quit [Quit: slyphon]
jonahR has joined #ruby-lang
fire has quit [Quit: WeeChat 0.4.0]
lun_ has joined #ruby-lang
srbaker has quit [Quit: Computer has gone to sleep.]
pepper_chico has joined #ruby-lang
pepper_chico has quit [Max SendQ exceeded]
pepper_chico has joined #ruby-lang
beiter has joined #ruby-lang
breakingthings has joined #ruby-lang
vlad_starkov has joined #ruby-lang
MrZYX has joined #ruby-lang
nibbo has quit [Ping timeout: 260 seconds]
nibbo has joined #ruby-lang
lun_ has quit [Remote host closed the connection]
rue|w has quit [Remote host closed the connection]
srbaker has joined #ruby-lang
slyphon has joined #ruby-lang
sebasoga has quit [Quit: Computer has gone to sleep.]
vlad_starkov has quit [Remote host closed the connection]
slyphon_ has joined #ruby-lang
tomzx_mac has quit [Ping timeout: 276 seconds]
Squarepy has quit [Changing host]
Squarepy has joined #ruby-lang
slyphon has quit [Ping timeout: 250 seconds]
slyphon_ is now known as slyphon
tylersmith has joined #ruby-lang
__Big0__ has joined #ruby-lang
SquadronROE has joined #ruby-lang
davidbalber|away is now known as davidbalbert
noop has quit [Remote host closed the connection]
agnitio has joined #ruby-lang
carloslopes has quit [Remote host closed the connection]
methods has joined #ruby-lang
volume has joined #ruby-lang
methods has left #ruby-lang [#ruby-lang]
jxie has joined #ruby-lang
sebasoga has joined #ruby-lang
enebo has joined #ruby-lang
jerrytgarcia has quit [Read error: Connection reset by peer]
jerrytgarcia has joined #ruby-lang
io_syl has joined #ruby-lang
jondot has quit [Ping timeout: 256 seconds]
rippa has joined #ruby-lang
SquadronROE has left #ruby-lang [#ruby-lang]
DingusGrunty has joined #ruby-lang
io_syl has quit [Client Quit]
slyphon has quit [Ping timeout: 240 seconds]
fire has joined #ruby-lang
<DingusGrunty>
Is there a way to hide the channel join/quit notifications?
<injekt>
DingusGrunty: probably
rubybob has quit [Quit: Page closed]
<badeball>
DingusGrunty: most decent clients can do that for you.
<certainty>
but in many channels that's the only messages you see for some time xD
<DingusGrunty>
ha, yeah. I'm using webchat so... maybe. I'll dig around.
<DingusGrunty>
ah ha
<DingusGrunty>
there we go.
<badeball>
certainty: decent client will let you specify which channels to hide notifications in ;)
<certainty>
badeball: yeah, i have that setup for my irssi
<badeball>
me too. no way I'm reading through joins and quits here and in #rails.
beho_ has joined #ruby-lang
pepper_chico has quit [Quit: Computer has gone to sleep.]
beho has quit [Ping timeout: 240 seconds]
dzhulk has quit [Quit: Leaving.]
ykk has quit [Remote host closed the connection]
fire is now known as nerd
drumond19 has joined #ruby-lang
sush24_ has quit [Quit: This computer has gone to sleep]
plusk has quit [Quit: plusk]
tonni has quit [Remote host closed the connection]
soypirate has joined #ruby-lang
ykk has joined #ruby-lang
gregmoreno has joined #ruby-lang
wyhaines has joined #ruby-lang
zmack has quit [Remote host closed the connection]
fn_ has joined #ruby-lang
tbuehlmann has joined #ruby-lang
rue|w has joined #ruby-lang
idkazuma has quit [Remote host closed the connection]
lbb has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
gnufied has quit [Quit: Leaving.]
zmike123 has joined #ruby-lang
hapster has joined #ruby-lang
rue|w has quit [Ping timeout: 240 seconds]
kristofferrr has joined #ruby-lang
sush24 has joined #ruby-lang
dhruvasagar has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
|Vargas| has quit [Quit: ...]
krohrbaugh has quit [Quit: Leaving.]
fn_ has quit [Remote host closed the connection]
joevandyk has joined #ruby-lang
vlad_starkov has joined #ruby-lang
lbb has quit [Remote host closed the connection]
tonni has joined #ruby-lang
fire has joined #ruby-lang
nerd has quit [Ping timeout: 256 seconds]
benlovell has quit [Quit: Computer has gone to sleep.]
vlad_starkov has quit [Ping timeout: 255 seconds]
pepper_chico has joined #ruby-lang
pepper_chico has quit [Max SendQ exceeded]
pepper_chico has joined #ruby-lang
pepper_chico has quit [Max SendQ exceeded]
judofyr has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 276 seconds]
pepper_chico has joined #ruby-lang
pepper_chico has quit [Max SendQ exceeded]
pepper_chico has joined #ruby-lang
pepper_chico has quit [Max SendQ exceeded]
nertzy has quit [Ping timeout: 248 seconds]
pepper_chico has joined #ruby-lang
pepper_chico has quit [Max SendQ exceeded]
pepper_chico has joined #ruby-lang
pepper_chico has quit [Max SendQ exceeded]
carloslopes has joined #ruby-lang
pepper_chico has joined #ruby-lang
wallerdev has joined #ruby-lang
carloslopes has quit [Remote host closed the connection]
Stilo has joined #ruby-lang
idkazuma has joined #ruby-lang
apeiros_ has joined #ruby-lang
gnufied has joined #ruby-lang
beho_ has quit [Remote host closed the connection]
<injekt>
drbrain: when you have time could you review the last show-stoppers on mechanize, looks like we're almost ready for a release once they're figured out
madish has joined #ruby-lang
ykk has quit [Remote host closed the connection]
plusk has joined #ruby-lang
joevandyk has quit [Quit: joevandyk]
glebm has quit [Quit: Computer has gone to sleep.]
shiningblue has joined #ruby-lang
pepper_chico has quit [Quit: Computer has gone to sleep.]
sailias has quit [Ping timeout: 255 seconds]
joevandyk has joined #ruby-lang
shiningblue has quit [Client Quit]
krohrbaugh has joined #ruby-lang
ryez has quit [Ping timeout: 245 seconds]
nXqd has quit [Ping timeout: 252 seconds]
pepper_chico has joined #ruby-lang
pepper_chico has quit [Max SendQ exceeded]
idkazuma has quit [Remote host closed the connection]
Mon_Ouie has quit [Quit: WeeChat 0.4.0]
pepper_chico has joined #ruby-lang
solars has quit [Ping timeout: 245 seconds]
nXqd has joined #ruby-lang
sepp2k1 has joined #ruby-lang
sepp2k has quit [Ping timeout: 248 seconds]
glebm has joined #ruby-lang
pepper_chico has quit [Quit: Computer has gone to sleep.]
amerine has joined #ruby-lang
jerrytgarcia has quit [Read error: Connection reset by peer]
jerrytgarcia has joined #ruby-lang
sailias has joined #ruby-lang
tonni has quit [Read error: Connection reset by peer]
jonahR has quit [Quit: jonahR]
gnufied has quit [Quit: Leaving.]
aedorn has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
tdy_ has quit [Ping timeout: 255 seconds]
<mehwork>
is there a way to assign to non-existing class variables? e.g., class Foo; end f=Foo.new ; f.bar=5
<mehwork>
right now, that would say 'undefined method bar='
fn_ has joined #ruby-lang
<apeiros_>
mehwork: you're probably looking for method_missing
<apeiros_>
see Object#method_missing
<apeiros_>
the whole thing is quite unrelated to class variables, though (@@cvars are class variables, they're usually to be avoided)
<mehwork>
thanks
beho has joined #ruby-lang
klebervirgilio has quit [Remote host closed the connection]
jacktrick has joined #ruby-lang
jacktrick has quit [Client Quit]
benlovell has joined #ruby-lang
krohrbaugh has quit [Quit: Leaving.]
krohrbaugh has joined #ruby-lang
skade has joined #ruby-lang
tdy_ has joined #ruby-lang
agnitio has quit [Read error: Operation timed out]
fn_ has quit [Remote host closed the connection]
sn0wb1rd has joined #ruby-lang
tylersmith has quit [Quit: tylersmith]
dblack_ has joined #ruby-lang
pkrnj has joined #ruby-lang
tylersmith has joined #ruby-lang
scampbell has joined #ruby-lang
sebastiansier has joined #ruby-lang
sepp2k1 has quit [Remote host closed the connection]
maxmanders has quit [Quit: Computer has gone to sleep.]
mrsolo has joined #ruby-lang
io_syl has joined #ruby-lang
beiter has quit [Quit: beiter]
sn0wb1rd has quit [Quit: sn0wb1rd]
bantic has joined #ruby-lang
sn0wb1rd has joined #ruby-lang
pepper_chico has joined #ruby-lang
pepper_chico has quit [Max SendQ exceeded]
lele has joined #ruby-lang
Mon_Ouie has quit [Read error: Connection reset by peer]
pepper_chico has joined #ruby-lang
kevinfagan has quit [Quit: Leaving...]
pepper_chico has quit [Max SendQ exceeded]
pepper_chico has joined #ruby-lang
pepper_chico has quit [Max SendQ exceeded]
MaddinXx_ has joined #ruby-lang
pepper_chico has joined #ruby-lang
retro|cz has quit [Ping timeout: 248 seconds]
breakingthings has quit []
Mon_Ouie has joined #ruby-lang
workmad3 has quit [Ping timeout: 252 seconds]
dhruvasagar has joined #ruby-lang
torrieri has joined #ruby-lang
havenwood has joined #ruby-lang
sebastia_ has joined #ruby-lang
benlovell has quit [Quit: Zzz]
krohrbaugh has quit [Read error: Connection reset by peer]
<cschneid>
tsou: yes, I'm aware of set as well. Set.new(a1) == Set.new(a2) is an option but I'd rather do `a1 <op> a2` to make the code that calls it clearer
<apeiros_>
havenwood: also, depending on what cschneid wants, wrong
<cschneid>
apeiros_: yeah, I'll do that, biggest thing is to get the generic function out of this class. Thanks for helping me talk though this.
<tsou>
havenwood: that would impose a great overhead of sorting..
<havenwood>
tsou: Yup.
vlad_starkov has joined #ruby-lang
<havenwood>
tsou: Just meant to show adding a new method via monkey patching rather than overriding core method.
<cschneid>
am I right that you can't invent new operators?
<cschneid>
(other than the silly stacking trick of unary ops)
<havenwood>
cschneid: You can invent new methods.
<havenwood>
cschneid: === is a method
<apeiros_>
=== is an existing method which shouldn't be overridden either (on core classes) ;-)
rue|w has joined #ruby-lang
cored has quit [Ping timeout: 248 seconds]
<cschneid>
right, new operators give compile errors. === is magic (along with =~, and all the others). Gotta follow method naming rules otherwise
<apeiros_>
there is superators, but why? a named method is just fine IMO
rue|w has quit [Read error: Connection reset by peer]
<havenwood>
apeiros_: I said that badly, I didn't mean to override threequals!
<apeiros_>
cschneid: nah, google for "ruby superators"
<apeiros_>
but personally, I don't like that
rue|w has joined #ruby-lang
<cschneid>
well, that scares me. :) I'm certainly going to just add the method to enumerable, just was verifying you couldn't easily make up new "operator" methods
<cschneid>
ahh, yeah, it's the silly unary stacking trick there.
<apeiros_>
I think it's cool. but nothing for serious.
cored has joined #ruby-lang
<cschneid>
agreed, it's cool, but I wouldn't use it in a real project
<cschneid>
thanks for the help guys
heftig has quit [Ping timeout: 245 seconds]
<tsou>
what's wrong with it?
MaddinXx has joined #ruby-lang
rue|w has quit [Ping timeout: 260 seconds]
torrieri has quit [Quit: Leaving...]
cultureulterior_ has quit [Quit: cultureulterior_]
drumond1_ has quit [Remote host closed the connection]
<yorickpeterse>
So I've bumped into an issue with building my instruction set: statements and conditions. In particular if/elsif/else statements are tricky [...]
* whitequark
sighs
<yorickpeterse>
I'm trying to not end up making a single dimensional AST (one that's basically a multi dimensional one in disguise) but I end up getting overly verbose instructions
<yorickpeterse>
For example:
rippa has quit [Ping timeout: 240 seconds]
<yorickpeterse>
http://pastie.org/6396649 I haven't actually implemented this yet, but I've been banging my head against a wall for 3 days now because I can't really seem to figure out what a nice way for it would be
<yorickpeterse>
The Rbx bytecode isn't very helpful either sadly (it has been before this problem)
pepper_chico has joined #ruby-lang
<yorickpeterse>
Any suggestions?
pepper_chico has quit [Max SendQ exceeded]
pepper_chico has joined #ruby-lang
xalei has joined #ruby-lang
mercwithamouth has quit [Ping timeout: 245 seconds]
El_loco has quit [Remote host closed the connection]
Mon_Ouie has quit [Remote host closed the connection]
Mon_Ouie has joined #ruby-lang
<yorickpeterse>
hmmm...maybe I've found something
<whitequark>
yorickpeterse: mm
* whitequark
reads
<whitequark>
yorickpeterse: you obviously have no idea what a bytecode *is*
<whitequark>
why is there even elsif? you only need three things
<whitequark>
a label, an unconditional jump and a conditional jump
<whitequark>
btw `and` desugars to a conditional
<yorickpeterse>
heh, that's literally just what I wrote down
<yorickpeterse>
hmmm, this is pretty interesting stuff
<injekt>
anyone here good with SQL? (PostgreSQL) I have a query i've written in rails and I'm trying to merge the executed queries into one (writing it in SQL)
<yorickpeterse>
I can see myself reading this on a sunny day in the park
torrieri has quit [Quit: Leaving...]
<yorickpeterse>
unless I fall asleep, which wouldn't be very uncommon
kristofferrr has quit [Quit: ❤]
torrieri has joined #ruby-lang
<yorickpeterse>
injekt: what's your issue exactly?
<injekt>
yorickpeterse: here's some code to explain it a little better https://gist.github.com/injekt/d8614e8370c2a43b7307 I'm avoiding an n+1 query by eager loading the photos, BUT that still executes more queries than I'd like, and it eager loads ALL photos when I only want one
<injekt>
stuff like this AR sucks for, im trying to write it in sql but apparently i suck and i keep doing it wrong :)
<yorickpeterse>
Will this be Pg specific?
<injekt>
yessir
Nisstyre-laptop has quit [Ping timeout: 250 seconds]
<yorickpeterse>
because I recall seeing this pretty baller Pg presentation that will probably help you out, lets see if I can find it