apeiros changed the topic of #ruby-lang to: Ruby 2.1.5; 2.0.0-p598; 1.9.3-p551: http://ruby-lang.org || Paste code on http://gist.github.com
jo__ has joined #ruby-lang
RobertBirnie has quit [Ping timeout: 244 seconds]
JokerDoom has quit [Ping timeout: 264 seconds]
yfeldblum has joined #ruby-lang
RobertBirnie has joined #ruby-lang
jkad1 has quit [Quit: WeeChat 1.0.1]
caseypatrickdris has quit [Remote host closed the connection]
tekacs has quit [Ping timeout: 264 seconds]
EvilJStoker has quit [Ping timeout: 264 seconds]
Mellett68 has quit [Read error: Connection reset by peer]
oddmunds has quit [Ping timeout: 245 seconds]
surrounder has quit [Ping timeout: 264 seconds]
surrounder has joined #ruby-lang
roadkith has joined #ruby-lang
oddmunds has joined #ruby-lang
Menorah has joined #ruby-lang
EvilJStoker has joined #ruby-lang
tekacs has joined #ruby-lang
tekacs is now known as Guest19180
Mellett68 has joined #ruby-lang
ed112211 has quit [Quit: ed112211]
roadkith has quit [Client Quit]
devgiant has quit [Quit: Leaving]
shubhamgoyal has quit [Remote host closed the connection]
simi has quit [Ping timeout: 256 seconds]
shubhamgoyal has joined #ruby-lang
bmichelsen has joined #ruby-lang
rikkipitt has joined #ruby-lang
shinnya has quit [Read error: Connection reset by peer]
shubhamgoyal has quit [Ping timeout: 240 seconds]
bmichelsen has quit [Client Quit]
ed112211 has joined #ruby-lang
pwelch has quit [Quit: Connection closed for inactivity]
shinnya has joined #ruby-lang
ItSANgo has quit [Quit: Leaving...]
mcclurmc has quit [Remote host closed the connection]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
caseypatrickdris has joined #ruby-lang
Aova has quit [Changing host]
Aova has joined #ruby-lang
|jemc| has quit [Ping timeout: 258 seconds]
shinnya has quit [Ping timeout: 255 seconds]
nathanstitt has quit [Ping timeout: 264 seconds]
shubhamgoyal has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
mcclurmc has joined #ruby-lang
shinnya has joined #ruby-lang
loincloth has quit [Remote host closed the connection]
rikkipitt has quit []
<nofxx_> All hell will break loose if a name a class Collect ? Guess I had a problem sometime with one named Group.
<nofxx_> thing is , there's none gangster synonym for collect a debt
ShawnHill has joined #ruby-lang
<jhass> >> print "Is hell on earth?"; class Group; end; puts "no"
<eval-in__> jhass => Is hell on earth?no ... (https://eval.in/236073)
<nofxx_> jhass, hehe... not so easy to open that door
<drbrain> there's no built-in Collect or Group constants that I know of, but maybe it will collide with a gem you're using
<jhass> in doubt just namespace everything
<jhass> MyApplication::Group, MyLibrary::Collect
shinnya has quit [Ping timeout: 244 seconds]
<nofxx_> yeah... some orm/odm magic is what worries me. It's actually a model class, should have said.
bmichelsen has joined #ruby-lang
<jhass> I'm not sure if I would want to use an ORM that breaks when using a particular classname
<nofxx_> playing with rethink but guess it's going to be mongoid
<wallerdev> i had issues with mongoid
<wallerdev> but that was a few years ago
<wallerdev> i had issues with mongodb in general haha
Lewix has joined #ruby-lang
shinnya has joined #ruby-lang
hahuang61 has quit [Ping timeout: 255 seconds]
<nofxx_> saying this feels like something gonna happen in the next minute, but have a long running app w/o problems with mongo. And 100% HA, even linode rebooted some machines this year, all was good.
<wallerdev> sounds good :)
<wallerdev> i know some smart people that are using mongo in production right now
<wallerdev> so i wouldnt worry about it :p
<wallerdev> just left a bad taste for me with my experience with it
<wallerdev> mongo was still pretty new though and the ruby libs were not really production ready
enebo has quit [Quit: enebo]
<nofxx_> the best part really is out of the box replication and failover, feels right. you'll need tons of third party stuff to do that in pg.
<drbrain> nofxx_: replication and failover are built in to postgres: http://www.postgresql.org/docs/9.1/static/high-availability.html
<nofxx_> drbrain, "PostgreSQL does not provide the system software required to identify a failure on the primary and notify the standby database server. Many such tools exist and are well integrated with the operating system facilities required for successful failover, such as IP address migration.
<nofxx_> "
kalzz has quit [Quit: exit]
tenderlove has quit [Remote host closed the connection]
<darix> postgresql streaming replication + pgpool for failover handling
tenderlove has joined #ruby-lang
mcclurmc has quit [Remote host closed the connection]
<drbrain> nofxx_: looks like mongodb has some issues too: https://aphyr.com/posts/284-call-me-maybe-mongodb
|jemc| has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
tenderlove has joined #ruby-lang
matp_ has joined #ruby-lang
yfeldblum has quit [Ping timeout: 240 seconds]
tenderlove has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
mistym has quit [Remote host closed the connection]
matp has quit [Ping timeout: 250 seconds]
rcvalle has quit [Quit: rcvalle]
marr has quit [Ping timeout: 258 seconds]
loincloth has joined #ruby-lang
kalzz has joined #ruby-lang
<nofxx_> drbrain, nice blog ... intersting too: https://aphyr.com/posts/292-call-me-maybe-nuodb
<drbrain> pg has issues with transaction commit notification back to the client, but won't lose data
<drbrain> well, maybe jepsen hasn't been run against replication yet
<drbrain> stable replication in the face of failure scenarios is difficult to accomplish
matp has joined #ruby-lang
loincloth has quit [Ping timeout: 265 seconds]
matp_ has quit [Ping timeout: 264 seconds]
hendranata_ has joined #ruby-lang
mattyohe has quit [Quit: Connection closed for inactivity]
symm- has quit [Ping timeout: 255 seconds]
momomomomo has quit [Quit: momomomomo]
ItSANgo has joined #ruby-lang
yfeldblum has joined #ruby-lang
Musashi007 has joined #ruby-lang
caseypatrickdris has quit [Remote host closed the connection]
yfeldblu_ has joined #ruby-lang
<darix> drbrain: newer pgsql has synchronous streaming replication
<darix> drbrain: but I havent used that yet
shinnya has quit [Ping timeout: 256 seconds]
ShawnHill has left #ruby-lang [#ruby-lang]
yfeldblum has quit [Ping timeout: 258 seconds]
yfeldblu_ has quit [Ping timeout: 255 seconds]
Menorah has quit [Quit: This computer has gone to sleep]
<wallerdev> lol
<wallerdev> just found some clever code :(
<wallerdev> x > 0 || x = 0
<wallerdev> please dont write things like that if you ever get the idea :p
mattyohe has joined #ruby-lang
shinnya has joined #ruby-lang
amsi has quit [Quit: Leaving]
Menorah has joined #ruby-lang
<|jemc|> not that hard to follow
matsutomo has joined #ruby-lang
<jhass> ^ I do prefer x = 0 if x > 0 a lot though
duderonomy has quit [Ping timeout: 245 seconds]
<jhass> or unless I guess
<waxjar> almost as annoying as if x = "whatever; ...; end :P
<wallerdev> yeah
dabradley has quit [Ping timeout: 245 seconds]
<wallerdev> its an unless
<wallerdev> so its like backwards from what you might initially think
yusuf1 has joined #ruby-lang
<wallerdev> and still just like oh thats interesting, looks like someone forgot to write an if statement
koderok has joined #ruby-lang
<darix> waxjar: that's why some people suggest to use: puts "foo" if "whatever" == x
<darix> writing if "whatever" = x would give a syntax error early
<wallerdev> i hate writing them reversed
mistym has joined #ruby-lang
<wallerdev> reads weird in my head
<wallerdev> because i want to check if this thing is equal to this value
<wallerdev> not if the value is equal to the thing
<darix> why use the less error prone version when you can also shoot yourself into the feet ;)
<waxjar> darix: i don't mean accidentally fogetting an =, but intentionally writing it like that. usually to test if some method doesn't return nil
<waxjar> if x = hash[:might_exist]; x.foo; else; ...; end for example
<darix> what is something different than your previous example.
<wallerdev> yeah i dont like that pattern either
<wallerdev> ive seen it a couple times in our codebase too ;(
<waxjar> yeah, shouldn't have used a string there
<waxjar> or half a string, really :P
duderonomy has joined #ruby-lang
spetryk has quit [Quit: Be back later ...]
yfeldblum has joined #ruby-lang
loincloth has joined #ruby-lang
shinnya has quit [Ping timeout: 265 seconds]
Menorah has quit [Quit: This computer has gone to sleep]
koderok has quit [Quit: koderok]
loincloth has quit [Ping timeout: 245 seconds]
shinnya has joined #ruby-lang
amclain has joined #ruby-lang
Menorah has joined #ruby-lang
Menorah has quit [Max SendQ exceeded]
Menorah has joined #ruby-lang
dagda1 has quit [Ping timeout: 264 seconds]
tenderlove has joined #ruby-lang
dagda1 has joined #ruby-lang
djbkd has quit [Quit: My people need me...]
dabradley has joined #ruby-lang
havenwood has joined #ruby-lang
jhass has quit [Read error: Connection reset by peer]
jhass has joined #ruby-lang
nathanstitt has joined #ruby-lang
caseypatrickdris has joined #ruby-lang
kurko__ has joined #ruby-lang
tenderlove has quit [Ping timeout: 256 seconds]
ryez has joined #ruby-lang
Guest19180 is now known as tekacs
tekacs is now known as Guest73815
shinnya has quit [Ping timeout: 256 seconds]
bb010g has quit [Quit: Connection closed for inactivity]
ed112211 has quit [Quit: ed112211]
shinnya has joined #ruby-lang
caseypatrickdris has quit [Remote host closed the connection]
kurko__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Menorah has quit [Quit: This computer has gone to sleep]
g0bl1n has joined #ruby-lang
g0bl1n has quit [Changing host]
g0bl1n has joined #ruby-lang
AmirolAhmad has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
shubhamgoyal has quit [Remote host closed the connection]
AmirolAhmad has quit [Remote host closed the connection]
gjaldon has joined #ruby-lang
Menorah has joined #ruby-lang
AmirolAhmad has joined #ruby-lang
shubhamgoyal has joined #ruby-lang
shubhamg_ has joined #ruby-lang
o010n9 has joined #ruby-lang
gjaldon has quit [Remote host closed the connection]
shubhamgoyal has quit [Ping timeout: 265 seconds]
iamninja has joined #ruby-lang
ed112211 has joined #ruby-lang
Rodya_ has joined #ruby-lang
yfeldblum has quit [Ping timeout: 264 seconds]
mcclurmc has joined #ruby-lang
micaeked has joined #ruby-lang
kapil__ has joined #ruby-lang
Kingpin_ has quit []
Miphix has joined #ruby-lang
Menorah has quit [Quit: This computer has gone to sleep]
cornerma1 has joined #ruby-lang
cornerman has quit [Ping timeout: 256 seconds]
cornerma1 is now known as cornerman
yfeldblum has joined #ruby-lang
mistym has quit [Remote host closed the connection]
blackoperat has quit [Quit: Leaving]
Lewix has quit [Remote host closed the connection]
blackoperat has joined #ruby-lang
Musashi007 has quit [Quit: Musashi007]
mattyohe has quit [Quit: Connection closed for inactivity]
gjaldon has joined #ruby-lang
yfeldblum has quit [Ping timeout: 264 seconds]
charliesome has quit [Quit: zzz]
gjaldon has quit [Remote host closed the connection]
shubhamg_ has quit [Remote host closed the connection]
ruby-lang437 has joined #ruby-lang
<jdecuirm> Hey guys! nites!
ruby-lang437 has quit [Client Quit]
<jdecuirm> when i do something like target = open(filename, 'w') meaning filename it's a string with the name or path of the text file
<jdecuirm> Am i creating a File object with write properties right?
<jdecuirm> then over it i can use methods like truncate, read and close?
jgpawletko has quit [Quit: jgpawletko]
houhoulis has joined #ruby-lang
<micaeked> jdecuirm: Mostly correct. You can't call #read, since you opened it for writing, you would call #write, but the rest is correct.
jo__ has quit [Quit: Connection closed for inactivity]
kyb3r_ has joined #ruby-lang
charliesome has joined #ruby-lang
tenderlove has joined #ruby-lang
<jdecuirm> Oh, thanks micaeked, if i do target.close could i read my file after writing right? or i have to create another file object like target2 = open(filename) just for read?
<micaeked> jdecuirm: You would have to open it again. Calling #read on a closed stream raises `IOError: closed stream`
<jdecuirm> thanks!, last question mica, what's the difference of opening a file with 'w' property and then use truncate? isn't 'w' already truncate the file?
<micaeked> jdecuirm: Err, to clarify, you would have to do `target2 = open(filename)`, yes.
<jdecuirm> Oh, correct, thanks mica.
<micaeked> jdecuirm: Yes, opening a file with "w" does truncate the file automatically.
voxxit has quit [Remote host closed the connection]
<jdecuirm> thanks again mica
<micaeked> jdecuirm: Welcome.
kiyote23_ has quit [Remote host closed the connection]
voxxit has joined #ruby-lang
tenderlove has quit [Ping timeout: 256 seconds]
ddd_ has quit [Ping timeout: 264 seconds]
shinnya has quit [Ping timeout: 256 seconds]
ur5us has quit [Remote host closed the connection]
shubhamgoyal has joined #ruby-lang
ed112211 has quit [Quit: ed112211]
mistym has joined #ruby-lang
spastorino has quit [Quit: Connection closed for inactivity]
bb010g has joined #ruby-lang
gix has quit [Ping timeout: 240 seconds]
yfeldblum has joined #ruby-lang
spetryk has joined #ruby-lang
gix has joined #ruby-lang
RobertBirnie has joined #ruby-lang
yfeldblum has quit [Ping timeout: 245 seconds]
ItSANgo has quit [Read error: Connection reset by peer]
ItSANgo has joined #ruby-lang
pwnz0r has joined #ruby-lang
t0rrieri has quit [Changing host]
t0rrieri has joined #ruby-lang
pwnz0r_ has joined #ruby-lang
pwnz0r has quit [Ping timeout: 258 seconds]
g0bl1n has quit [Ping timeout: 265 seconds]
gjaldon has joined #ruby-lang
fclausen has joined #ruby-lang
kek has quit [Remote host closed the connection]
kek has joined #ruby-lang
weaksauce has quit [Ping timeout: 265 seconds]
gjaldon has quit [Remote host closed the connection]
gjaldon has joined #ruby-lang
Sadin has quit [Remote host closed the connection]
kiyote23 has joined #ruby-lang
nisstyre has quit [Changing host]
nisstyre has joined #ruby-lang
pwnz0r_ has quit [Ping timeout: 264 seconds]
pwnz0r has joined #ruby-lang
AKASkip has joined #ruby-lang
<waxjar> jdecuirm: if you use the block version of open, the file is automatically closed for you. it's handy, because you cannot forget to close the file :)
<waxjar> looks like this: open(filename, "w") { |f| f.write "foo" }
Lewix has joined #ruby-lang
weaksauce has joined #ruby-lang
JohnBat26 has joined #ruby-lang
AmirolAhmad has quit [Remote host closed the connection]
Rodya_ has quit [Quit: Ex-Chat]
<jdecuirm> thanks waxjar, nice tip!
djbkd has joined #ruby-lang
Musashi007 has joined #ruby-lang
_fritchie has quit [Quit: Textual IRC Client: www.textualapp.com]
st0mar has quit [Ping timeout: 244 seconds]
gss has joined #ruby-lang
yfeldblum has joined #ruby-lang
Musashi007 has quit [Quit: Musashi007]
shubhamgoyal has quit [Remote host closed the connection]
mcclurmc has quit [Remote host closed the connection]
shubhamgoyal has joined #ruby-lang
yfeldblum has quit [Ping timeout: 240 seconds]
hahuang61 has joined #ruby-lang
ur5us has joined #ruby-lang
mbr has quit [Ping timeout: 258 seconds]
mbr has joined #ruby-lang
hahuang61 has quit [Client Quit]
hahuang61 has joined #ruby-lang
nofxx_ has quit [Ping timeout: 264 seconds]
shubhamgoyal has quit [Ping timeout: 245 seconds]
Manj-811-Xfce has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
ur5us has quit [Ping timeout: 264 seconds]
TvL2386 has joined #ruby-lang
matsutomo has quit [Quit: matsutomo]
oleo has quit [Quit: Verlassend]
shubhamgoyal has joined #ruby-lang
matsutomo has joined #ruby-lang
g0bl1n has joined #ruby-lang
pwnz0r has quit [Remote host closed the connection]
AKASkip has quit [Ping timeout: 240 seconds]
Menorah has joined #ruby-lang
kiyote23 has quit [Remote host closed the connection]
houhoulis has quit [Remote host closed the connection]
kiyote23 has joined #ruby-lang
zgrogan has joined #ruby-lang
bmichelsen has quit [Quit: ZZZzzz…]
kiyote23 has quit [Ping timeout: 240 seconds]
Manj-811-Xfce has quit [Quit: Leaving]
Musashi007 has joined #ruby-lang
chinmay_dd has joined #ruby-lang
enkristoffer has joined #ruby-lang
pwnz0r has joined #ruby-lang
kek has quit [Read error: Connection reset by peer]
kek has joined #ruby-lang
kek has quit [Client Quit]
theotherstupidgu has joined #ruby-lang
yfeldblum has joined #ruby-lang
fclausen has quit [Ping timeout: 272 seconds]
mostlybadfly has quit [Quit: Connection closed for inactivity]
apeiros_ has quit [Read error: Connection reset by peer]
AmirolAhmad has joined #ruby-lang
apeiros_ has joined #ruby-lang
AmirolAhmad has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 258 seconds]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
symm- has joined #ruby-lang
Musashi007 has quit [Ping timeout: 256 seconds]
gregf_ has quit [Ping timeout: 240 seconds]
AmirolAhmad has joined #ruby-lang
gss has quit [Remote host closed the connection]
chinmay_dd has quit [Ping timeout: 245 seconds]
spetryk has quit [Quit: Be back later ...]
pwnz0r has quit [Remote host closed the connection]
bmichelsen has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
allomov has joined #ruby-lang
apeiros_ has joined #ruby-lang
hahuang62 has joined #ruby-lang
apeiros_ has quit [Ping timeout: 255 seconds]
hahuang61 has quit [Ping timeout: 265 seconds]
hahuang62 has quit [Client Quit]
hahuang61 has joined #ruby-lang
rbowlby has quit [Remote host closed the connection]
rbowlby has joined #ruby-lang
[spoiler] has joined #ruby-lang
shubhamgoyal has quit [Remote host closed the connection]
mLF has joined #ruby-lang
rbowlby has quit [Ping timeout: 250 seconds]
Forgetful_Lion has joined #ruby-lang
symm- has quit [Ping timeout: 244 seconds]
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby-lang
chinmay_dd has joined #ruby-lang
Menorah has quit [Quit: This computer has gone to sleep]
allomov has quit [Remote host closed the connection]
kyb3r_ has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby-lang
kyb3r_ has joined #ruby-lang
|jemc| has quit [Ping timeout: 258 seconds]
apeiros_ has joined #ruby-lang
yfeldblum has quit [Ping timeout: 245 seconds]
arBmind has joined #ruby-lang
rbowlby has joined #ruby-lang
micaeked has quit [Ping timeout: 256 seconds]
ShawnHill has joined #ruby-lang
matsutomo has quit [Quit: matsutomo]
matsutomo has joined #ruby-lang
AKASkip has joined #ruby-lang
matsutomo has quit [Client Quit]
yfeldblum has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
mistym has quit [Remote host closed the connection]
shubhamgoyal has joined #ruby-lang
gss has joined #ruby-lang
Forgetful_Lion has quit [Remote host closed the connection]
shuriu has joined #ruby-lang
matsutomo has joined #ruby-lang
AmirolAhmad has quit []
amclain has quit [Quit: Leaving]
cantonic has quit [Quit: cantonic]
solars has joined #ruby-lang
djellemah has joined #ruby-lang
shuriu has quit [Remote host closed the connection]
allomov has joined #ruby-lang
charliesome has quit [Quit: zzz]
matsutomo has quit [Quit: matsutomo]
st0mar has joined #ruby-lang
robbyoconnor has joined #ruby-lang
fusillicode has joined #ruby-lang
Forgetful_Lion has joined #ruby-lang
voxxit has quit [Remote host closed the connection]
revath has joined #ruby-lang
st0mar has quit [Ping timeout: 250 seconds]
g0bl1n has quit [Ping timeout: 264 seconds]
t3h_j4n170r has quit [Ping timeout: 264 seconds]
o010n9 has quit [Ping timeout: 250 seconds]
mLF has quit [Ping timeout: 265 seconds]
nisstyre has quit [Ping timeout: 240 seconds]
ta has quit [Remote host closed the connection]
ta has joined #ruby-lang
ta has quit [Remote host closed the connection]
Bwild has joined #ruby-lang
skade has joined #ruby-lang
ta has joined #ruby-lang
skade has quit [Remote host closed the connection]
revath has quit [Ping timeout: 250 seconds]
ta has quit [Read error: Connection reset by peer]
ta has joined #ruby-lang
skade has joined #ruby-lang
Iskarlar has joined #ruby-lang
shuriu has joined #ruby-lang
drbrain has quit [Ping timeout: 255 seconds]
skade has quit [Remote host closed the connection]
skade has joined #ruby-lang
matsutomo has joined #ruby-lang
skade has quit [Remote host closed the connection]
simi has joined #ruby-lang
revath has joined #ruby-lang
enkristoffer has quit [Remote host closed the connection]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
enkristoffer has joined #ruby-lang
agent_white has joined #ruby-lang
charliesome has joined #ruby-lang
matsutomo has quit [Quit: matsutomo]
zemlya has quit [Ping timeout: 240 seconds]
zemlya has joined #ruby-lang
agent_white has left #ruby-lang [#ruby-lang]
nisstyre has joined #ruby-lang
matsutomo has joined #ruby-lang
ShawnHill has left #ruby-lang [#ruby-lang]
Iskarlar has joined #ruby-lang
charliesome has quit [Quit: zzz]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
charliesome has joined #ruby-lang
mLF has joined #ruby-lang
Menorah has joined #ruby-lang
majeure has joined #ruby-lang
revath has quit [Read error: Connection reset by peer]
marr has joined #ruby-lang
kiyote23 has joined #ruby-lang
<yorickpeterse> morning
drbrain has joined #ruby-lang
kiyote23 has quit [Ping timeout: 256 seconds]
yfeldblum has quit [Ping timeout: 250 seconds]
<[spoiler]> noon
<[spoiler]> i lied it's not noon
Iskarlar has joined #ruby-lang
relic has joined #ruby-lang
relic has left #ruby-lang [#ruby-lang]
bmichelsen has quit [Quit: ZZZzzz…]
havenwood has quit []
majeure has quit [Quit: ZNC - http://znc.in]
<tbuehlmann> moin
Iskarlar has quit [Client Quit]
shuriu has quit [Remote host closed the connection]
revath has joined #ruby-lang
shuriu has joined #ruby-lang
<ljarvis> howdy
Iskarlar has joined #ruby-lang
shubhamgoyal has quit [Remote host closed the connection]
hahuang61 has quit [Quit: WeeChat 1.0.1]
elia has joined #ruby-lang
kyb3r_ has quit [Read error: Connection reset by peer]
micaeked has joined #ruby-lang
revath has quit [Read error: Connection reset by peer]
kasisnu has joined #ruby-lang
hendranata_ has quit [Ping timeout: 250 seconds]
<kasisnu> Hi. I have a question about serverspec. Maybe someone could point me to a resource. How would one go about doing a wget type test? I wanna hit an endpoint and not just check if a port is up.
shubhamgoyal has joined #ruby-lang
skade has joined #ruby-lang
skade has quit [Remote host closed the connection]
chinmay_dd has quit [Ping timeout: 245 seconds]
chinmay_dd has joined #ruby-lang
chinmay_dd has quit [Client Quit]
shubhamgoyal has quit [Remote host closed the connection]
chinmay_dd has joined #ruby-lang
shubhamgoyal has joined #ruby-lang
shubhamgoyal has quit [Remote host closed the connection]
workmad3 has joined #ruby-lang
yusuf1 has quit [Quit: Leaving.]
shuriu has quit [Ping timeout: 258 seconds]
loincloth has joined #ruby-lang
revath has joined #ruby-lang
shuriu has joined #ruby-lang
<zenspider> kasisnu: I have no idea what you're referring to
<maloik> I'm pretty sure you're better off asking in #chef
<zenspider> ok... maybe SOMEONE here does. I don't. :P
<maloik> :D
revath has quit [Read error: Connection reset by peer]
<maloik> ha, apparently it works for puppet etc too... in any case those related channels are more likely to have an answer
arBmind has quit [Quit: Leaving.]
cantonic has joined #ruby-lang
micaeked has quit [Quit: WeeChat 1.0.1]
t3h_j4n170r has joined #ruby-lang
<Jan_> wondering why they didn't call it srvrspec or sspec
<Jan_> or srvspec
Jan_ is now known as DefV
mylar has joined #ruby-lang
<maloik> because that's a horrible name? :P
<DefV> so is serverspec
o010n9 has joined #ruby-lang
<maloik> it's pretty obvious what it does though isn't it?
<DefV> it serves rspec :-D
<maloik> oh so that's what you mean... I didn't even realize that lol
<maloik> I guess the name isn't that obvious after all then
loincloth has quit [Ping timeout: 264 seconds]
<[spoiler]> penisland
* [spoiler] ain't even sorry.
<yorickpeterse> hurrrhurr somebody said penis
rbowlby has quit [Ping timeout: 264 seconds]
arBmind has joined #ruby-lang
<kasisnu> @zenspider: Np. :D
revath has joined #ruby-lang
bmichelsen has joined #ruby-lang
<kasisnu> You all were right. #chef did it! Thanks!
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
tkuchiki has quit [Ping timeout: 264 seconds]
revath has quit [Read error: Connection reset by peer]
midhir has joined #ruby-lang
fclausen has joined #ruby-lang
Forgetful_Lion has quit [Quit: ChatZilla 0.9.91 [Firefox 34.0.5/20141126041045]]
rikkipitt has joined #ruby-lang
micechal_ has joined #ruby-lang
* yorickpeterse modified an existing migration in this branch
* yorickpeterse is going to hell
<yorickpeterse> in my defense this branch is still a WIP that others don't share
micechal has quit [Ping timeout: 264 seconds]
rbowlby has joined #ruby-lang
fclausen has quit [Ping timeout: 272 seconds]
lapide_viridi has joined #ruby-lang
<[spoiler]> I modify migrations all the time (unless you modified a past migration lol)
<yorickpeterse> Yeah that's what I did
<yorickpeterse> I like living on the edge
<[spoiler]> LOL
<[spoiler]> oh yorick :-)
matsutomo has quit [Quit: matsutomo]
stamina has joined #ruby-lang
<yorickpeterse> http://i.imgur.com/qVq1Sn1.jpg basically this
bmichelsen has quit [Quit: ZZZzzz…]
loincloth has joined #ruby-lang
gix has quit [Ping timeout: 245 seconds]
loincloth has quit [Ping timeout: 240 seconds]
fclausen has joined #ruby-lang
gix has joined #ruby-lang
gjaldon has quit [Remote host closed the connection]
Sadin has joined #ruby-lang
fclausen has quit [Ping timeout: 272 seconds]
cantonic has quit [Quit: cantonic]
Sadin has quit [Remote host closed the connection]
allomov has quit [Remote host closed the connection]
caseypatrickdris has joined #ruby-lang
tenderlove has joined #ruby-lang
allomov has joined #ruby-lang
matp has quit [Remote host closed the connection]
matp has joined #ruby-lang
allomov has quit [Ping timeout: 245 seconds]
ikrima_ has joined #ruby-lang
shuriu has quit [Remote host closed the connection]
gjaldon has joined #ruby-lang
ikrima_ has quit [Read error: Connection reset by peer]
ikrima__ has joined #ruby-lang
rcvalle has joined #ruby-lang
tenderlove has quit [Ping timeout: 258 seconds]
shuriu has joined #ruby-lang
chills42 has joined #ruby-lang
lapide_viridi has quit [Quit: Leaving]
kasisnu has quit [Quit: Leaving.]
ItSANgo has quit [Quit: Leaving...]
shazaum has joined #ruby-lang
cantonic has joined #ruby-lang
djellemah has quit [Ping timeout: 250 seconds]
shazaum has quit [Changing host]
shazaum has joined #ruby-lang
<yorickpeterse> man I really missed using transactions
<yorickpeterse> (DB transactions that is)
chinmay_dd_ has joined #ruby-lang
Forgetful_Lion has joined #ruby-lang
chinmay_dd has quit [Ping timeout: 250 seconds]
shubhamgoyal has joined #ruby-lang
shubhamg_ has joined #ruby-lang
djellemah has joined #ruby-lang
ItSANgo has joined #ruby-lang
chinmay_dd_ is now known as chinmay_dd
shubhamgoyal has quit [Ping timeout: 250 seconds]
Menorah has quit [Quit: This computer has gone to sleep]
caseypatrickdris has quit [Remote host closed the connection]
loincloth has joined #ruby-lang
Sgeo_ has quit [Read error: Connection reset by peer]
loincloth has quit [Ping timeout: 264 seconds]
shuriu has quit [Remote host closed the connection]
Sgeo has joined #ruby-lang
caseypatrickdris has joined #ruby-lang
Menorah has joined #ruby-lang
kurko__ has joined #ruby-lang
Forgetful_Lion has quit [Remote host closed the connection]
shuriu has joined #ruby-lang
st0mar has joined #ruby-lang
gjaldon has quit []
allomov has joined #ruby-lang
Menorah has quit [Quit: This computer has gone to sleep]
apeiros_ has quit [Ping timeout: 265 seconds]
nofxx_ has joined #ruby-lang
mostlybadfly has joined #ruby-lang
apeiros_ has joined #ruby-lang
chinmay_dd has quit [Remote host closed the connection]
Menorah has joined #ruby-lang
mikecmpbll has joined #ruby-lang
scampbell has joined #ruby-lang
ShawnHill has joined #ruby-lang
matled has quit [Remote host closed the connection]
<yorickpeterse> Ah yes, sentiment analysis tools
<yorickpeterse> Where having 4 GB of RAM is not enough for El JVM
postmodern has quit [Quit: Leaving]
<yorickpeterse> So here we are going to 17GB to see if that works
chinmay_dd has joined #ruby-lang
<nofxx_> When you gem 'foo-bar', it will try first foo/bar.rb ? It loads the full lib/*.rb no?
<yorickpeterse> nofxx_: No, it will search for 'foo-bar.so' then 'foo-bar.rb'
<yorickpeterse> (RubyGems changed it so that extensions come before .rb I believe, or the other way around)
<yorickpeterse> Either way, it won't search for 'foo/bar.rb'
<nofxx_> sorry: lib/foo/bar.rb
<yorickpeterse> No
<yorickpeterse> gem 'foo-bar' doesn't recurse into subdirectories
<yorickpeterse> or break up the path into subdirectories that is
<nofxx_> yorickpeterse, but it's the recommendation: http://guides.rubygems.org/name-your-gem/
<nofxx_> wondering why a gem even named incorrectly loads
<nofxx_> must be lib/*.rb
<yorickpeterse> nofxx_: naming your Gem has nothing to do with gem 'foo-bar' automatically going to 'foo/bar.rb'
devPunk has joined #ruby-lang
<yorickpeterse> require()/gem() search for the literal argument you give it
<yorickpeterse> if you do gem 'foo/bar' then it _will_ search for foo/bar.rb
ecnalyr has joined #ruby-lang
Menorah has quit [Quit: This computer has gone to sleep]
<nofxx_> yup, require behaves right, Gemfile's #gem is my doubt
allomov has quit [Remote host closed the connection]
matled has joined #ruby-lang
allomov has joined #ruby-lang
st0mar has quit [Ping timeout: 264 seconds]
gss has quit [Ping timeout: 250 seconds]
ShawnHill has quit [Ping timeout: 264 seconds]
<yorickpeterse> Anybody here using https://github.com/Casecommons/pg_search?
<nofxx_> yorickpeterse, I dup searchable models to ES, works nice
<nofxx_> yorickpeterse, ah, figured out what was confusing... gem name is 'foo-bar' but the require is 'foo_bar'
<nofxx_> the gem name... =/ confuses projects uses hyphen*
<nofxx_> but when using hyphens it'll work as require, to the namespacing yorickpeterse
<nofxx_> do the*
loincloth has joined #ruby-lang
mnngfltg has joined #ruby-lang
loincloth has quit [Ping timeout: 258 seconds]
ShawnHill has joined #ruby-lang
ShawnHill has left #ruby-lang [#ruby-lang]
nathanstitt has quit [Quit: I growing sleepy]
pr0ton has joined #ruby-lang
kurko___ has joined #ruby-lang
caseypatrickdris has quit [Remote host closed the connection]
kurko__ has quit [Ping timeout: 264 seconds]
sankaber has joined #ruby-lang
<solars> hey, can anyone suggest a tool to find dead ruby code/methods in a projects?
<yorickpeterse> assuming you have tests
<solars> I have, but I want to check code that is (probably) not covered as well
<solars> have to analyse an existing project
tkuchiki has joined #ruby-lang
AKASkip has quit [Ping timeout: 244 seconds]
rbowlby has quit [Ping timeout: 240 seconds]
enebo has joined #ruby-lang
nisstyre has quit [Changing host]
nisstyre has joined #ruby-lang
ecnalyr has quit [Quit: Macbook has gone to sleep. . .]
st0mar has joined #ruby-lang
malconis has joined #ruby-lang
malconis has quit [Remote host closed the connection]
malconis has joined #ruby-lang
caseypatrickdris has joined #ruby-lang
setanta has joined #ruby-lang
mattyohe has joined #ruby-lang
mcclurmc has joined #ruby-lang
devPunk has quit [Quit: Leaving.]
[spoiler] has quit [Quit: Leaving]
revath has joined #ruby-lang
oleo has joined #ruby-lang
mikecmpbll has quit [Ping timeout: 256 seconds]
revath has quit [Read error: Connection reset by peer]
mikecmpbll has joined #ruby-lang
charliesome has quit [Quit: zzz]
gwendall has joined #ruby-lang
devPunk has joined #ruby-lang
whippythellama has joined #ruby-lang
devPunk has quit [Remote host closed the connection]
cantonic has quit [Quit: cantonic]
charliesome has joined #ruby-lang
TvL2386 has quit [Quit: Ex-Chat]
nathanstitt has joined #ruby-lang
Sadin has joined #ruby-lang
Lewix has joined #ruby-lang
ed112211 has joined #ruby-lang
tenderlove has joined #ruby-lang
theotherstupidgu has quit [Remote host closed the connection]
theotherstupidgu has joined #ruby-lang
Sadin has quit [Ping timeout: 250 seconds]
jgpawletko has joined #ruby-lang
Bwild has quit [Quit: leaving]
tenderlove has quit [Ping timeout: 250 seconds]
vondruch has quit [Ping timeout: 250 seconds]
cantonic has joined #ruby-lang
loincloth has joined #ruby-lang
yalue has joined #ruby-lang
theotherstupidgu has quit [Ping timeout: 244 seconds]
theotherstupidgu has joined #ruby-lang
revath has joined #ruby-lang
cantonic has quit [Client Quit]
kerunaru has joined #ruby-lang
enkristoffer has quit [Quit: ❤]
revath has quit [Ping timeout: 255 seconds]
tenderlove has joined #ruby-lang
whitespace has joined #ruby-lang
chinmay_dd is now known as chinmay_dd|dinne
chinmay_dd|dinne is now known as cdd|dinner
lapide_viridi has joined #ruby-lang
kerunaru has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
shinnya has joined #ruby-lang
allomov has quit [Remote host closed the connection]
mistym has joined #ruby-lang
mikecmpb_ has joined #ruby-lang
mikecmpbll has quit [Ping timeout: 272 seconds]
mistym has quit [Remote host closed the connection]
kurko___ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cdd|dinner is now known as chinmay_dd
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Rodya_ has joined #ruby-lang
charliesome has quit [Quit: zzz]
kapil__ has quit [Quit: Connection closed for inactivity]
malconis has joined #ruby-lang
whitespace has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
malconis has quit [Read error: Connection reset by peer]
kurko__ has joined #ruby-lang
mcclurmc has quit [Remote host closed the connection]
arBmind has quit [Quit: Leaving.]
rippa has joined #ruby-lang
mcclurmc has joined #ruby-lang
mistym has joined #ruby-lang
cornerma1 has joined #ruby-lang
duderonomy has quit [Ping timeout: 264 seconds]
malconis has joined #ruby-lang
g0bl1n has joined #ruby-lang
g0bl1n has quit [Changing host]
g0bl1n has joined #ruby-lang
mcclurmc has quit [Remote host closed the connection]
cornerman has quit [Ping timeout: 265 seconds]
sross07 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
cornerma1 is now known as cornerman
revath has joined #ruby-lang
mLF has quit [Ping timeout: 255 seconds]
<yorickpeterse> Hm, I was hoping full-text search in Pg would be a bit faster
<yorickpeterse> ah well, 2 seconds for scanning over half a mil isn't too bad
<yorickpeterse> (using indexes)
Lewix has quit []
Musashi007 has joined #ruby-lang
symm- has joined #ruby-lang
charliesome has joined #ruby-lang
mcclurmc has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
tenderlove has joined #ruby-lang
charliesome has quit [Client Quit]
tenderlove has quit [Remote host closed the connection]
revath has quit [Read error: Connection reset by peer]
|jemc| has joined #ruby-lang
tenderlove has joined #ruby-lang
kerunaru has joined #ruby-lang
tsou has joined #ruby-lang
g0bl1n has quit [Quit: Leaving]
theotherstupidgu has quit [Ping timeout: 240 seconds]
koderok has joined #ruby-lang
koderok has quit [Remote host closed the connection]
theotherstupidgu has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
Musashi007 has quit [Ping timeout: 245 seconds]
shuriu has quit [Remote host closed the connection]
elia has joined #ruby-lang
ed112211 has quit [Quit: ed112211]
jo__ has joined #ruby-lang
Musashi007 has joined #ruby-lang
mcclurmc has quit [Remote host closed the connection]
djellemah has quit [Quit: Leaving]
Musashi007 has quit [Ping timeout: 255 seconds]
Musashi007 has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
mcclurmc has joined #ruby-lang
tenderlove has joined #ruby-lang
solars has quit [Ping timeout: 272 seconds]
<apeiros_> yorickpeterse: what kind of full-text index do you use?
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
spetryk has joined #ruby-lang
mistym has quit [Remote host closed the connection]
iamninja has quit [Remote host closed the connection]
iamninja has joined #ruby-lang
mcclurmc has quit [Remote host closed the connection]
tkuchiki has quit [Ping timeout: 250 seconds]
<yorickpeterse> GIN
<yorickpeterse> Didn't really see a difference with GIST, and my data requires decent query timings
<yorickpeterse> currently messing with trigram matching, which gives me far better results anyway
<yorickpeterse> Mainly people just want to search for partial names over here, instead of having complex queries
<yorickpeterse> so full full-text search is a bit of an overkill
nathanstitt has quit [Remote host closed the connection]
nathanstitt has joined #ruby-lang
bears has quit [Remote host closed the connection]
mcclurmc has joined #ruby-lang
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros_> yorickpeterse: thanks. I'm quite interested in your findings about postgres :)
<apeiros_> gtg, commute
apeiros_ has quit [Remote host closed the connection]
rbowlby has joined #ruby-lang
apeiros_ has joined #ruby-lang
<yorickpeterse> dayum these trigram indexes are big
charliesome has joined #ruby-lang
<yorickpeterse> 100MB for half a mil rows
whitespace has joined #ruby-lang
<yorickpeterse> and I have 6 of these baddies
Menorah has joined #ruby-lang
spastorino has joined #ruby-lang
Menorah has quit [Client Quit]
mcclurmc has quit [Ping timeout: 250 seconds]
apeiros_ has quit [Ping timeout: 245 seconds]
rbowlby has quit [Ping timeout: 264 seconds]
malconis has joined #ruby-lang
rikkipitt has quit []
amsi has joined #ruby-lang
mistym has joined #ruby-lang
__butch__ has joined #ruby-lang
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mrevd has joined #ruby-lang
kiyote23 has joined #ruby-lang
<mrevd> is there any function that will allow a negative base, as in 42.to_s(-2)
hahuang61 has joined #ruby-lang
caseypatrickdris has quit [Read error: Connection reset by peer]
mustmodify has joined #ruby-lang
<mustmodify> is there a way to do instance_eval with a parameter? Seems like not... this works https://eval.in/236326 but this is a syntax error https://eval.in/236328
<|jemc|> mustmodify: instance_exec
<mustmodify> right, I tried that. and it's hateful too.
<mustmodify> But let me double check.
<|jemc|> &blockarg always goes last
<mustmodify> oh...
<mustmodify> Hey wait I knew that...
<mustmodify> apparently not enough.
<|jemc|> >> Object.new.instance_exec(5) { |x| x + 1 }
<eval-in__> |jemc| => 6 (https://eval.in/236333)
cmhobbs has joined #ruby-lang
cmhobbs has joined #ruby-lang
<|jemc|> >> pr = lambda { |x| x + 1 }; Object.new.instance_exec(5, &pr)
<eval-in__> |jemc| => 6 (https://eval.in/236335)
bb010g has quit [Quit: Connection closed for inactivity]
<|jemc|> mrevd: what are you trying to do?
yock has joined #ruby-lang
<mustmodify> Hm... it bothers me that the argument comes before the proc, but I guess that's the right way. Thanks.
<mustmodify> oh because it's a block not a proc. Seems like I should be able to pass in a proc and an argument. That's what bothers me.
elia has quit [Quit: Computer has gone to sleep.]
<mustmodify> bothers / feels off
hahuang61 has quit [Ping timeout: 264 seconds]
<|jemc|> mustmodify: you could wrap instance_exec with a method that takes the proc as the first argument
<mrevd> |jemc|, i'm trying to get the bit representation of a number in base -2
<mustmodify> mrevd: What does "base -2" mean?
<|jemc|> mrevd: you'll have to do the math yourself - ruby doesn't understand radix -2
<mustmodify> if base 5 means, "using the numbers 0,1,2,3,4"
<|jemc|> (and honestly, without looking it up, I don't know what radix 02 is either
<|jemc|> *91
<|jemc|> *-2
djellemah has joined #ruby-lang
<mrevd> In base −2, integers are represented by sequences of bits in the following way. Sequence B of N bits represents the number: sum{ B[i]*(−2)i for i = 0..N-1 }
<|jemc|> mrevd: ruby only handles a small range of radixes for you (radices?)
<|jemc|> >> 100.to_s(100)
<eval-in__> |jemc| => invalid radix 100 (ArgumentError) ... (https://eval.in/236337)
<workmad3> so 111 would be -2**2 + -2**1 + -2**0, which would be 4 - 2 + 1, 3
<|jemc|> mrevd: as far as I know, you'll have to do the math yourself (or find a gem that does that for you)
Musashi007 has quit [Ping timeout: 264 seconds]
<mrevd> hmm, im just not sure how to translate that
<workmad3> mrevd: you've given the formula, it's pretty easy to interpret from there ;)
* |jemc| shrugs
mikecmpb_ has quit [Quit: i've nodded off.]
kiyote23 has quit [Remote host closed the connection]
<mustmodify> mrevd: Why is this useful?
<mrevd> it's a test
<mrevd> not useful for any work i'd actually do
theotherstupidgu has quit [Ping timeout: 245 seconds]
theotherstupidgu has joined #ruby-lang
<mrevd> i just need some help translating that formula… im not sure what sum{} means
<workmad3> mrevd: it means... sum
<workmad3> mrevd: as in addition
<workmad3> mrevd: i.e. that's the formula for translating from a bitstring like 1111 into a numerical value
<nofxx_> workmad3, there's a gem for that... crossed it some days ago
<workmad3> mrevd: so to convert from number to bitstring, you need to figure out the inverse of that formula
<workmad3> nofxx_: I think you meant to target mrevd ;)
<nofxx_> ahh... it's already been said
<workmad3> also, if it's for a test, I doubt using a library would be particularly good form :P
<mrevd> it wouldn't :(
Musashi007 has joined #ruby-lang
<nofxx_> workmad3, ops.. sorry
<nofxx_> aint integers the same object for mri? 1 === 1 ? thing like 1000.freeze actually does something?
<workmad3> nofxx_: 1000.freeze would indeed be meaningless
<mustmodify> mrevd: so there is no value in using this, but it's just a thing anyway?
<workmad3> nofxx_: as integers are value objects
apeiros_ has joined #ruby-lang
<nofxx_> workmad3, java ppl... can't leave without complicating a code
<nofxx_> live*
<mustmodify> nofxx_: In ruby 1.8.7 integers weren't initially frozen.
<mustmodify> nofxx_: but now they are
<workmad3> mustmodify: weren't they still value objects though, so were in effect immutable?
<apeiros_> workmad3: yes
mustmodify has left #ruby-lang [#ruby-lang]
<apeiros_> fixnum, symbol, true, false, nil are immediates and were immutable back in 1.8 too
<apeiros_> numeric classes also emulated that behavior
<apeiros_> but I find it nice that they now all return true on frozen?
<workmad3> :)
RobertBirnie has joined #ruby-lang
yock has quit [Ping timeout: 272 seconds]
<apeiros_> IMO it would also be nice if frozen/immutable objects returned self on .dup
<apeiros_> though, not sure what to do about clone (clone does not replicate frozen status - which won't matter for immediates, but for other frozen objects)
fusillicode has quit [Ping timeout: 264 seconds]
kerunaru has quit [Quit: Textual IRC Client: www.textualapp.com]
Musashi007 has quit [Ping timeout: 256 seconds]
Miphix has quit [Quit: Leaving]
whitespace has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Musashi007 has joined #ruby-lang
charliesome has quit [Quit: zzz]
havenwood has joined #ruby-lang
calebk has quit [Ping timeout: 265 seconds]
Musashi007 has quit [Ping timeout: 265 seconds]
Musashi007 has joined #ruby-lang
kurko__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
vladgh has joined #ruby-lang
vladgh has quit [Remote host closed the connection]
calebk has joined #ruby-lang
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
malconis has joined #ruby-lang
wallerdev has joined #ruby-lang
mnngfltg has quit [Remote host closed the connection]
Musashi007 has quit [Ping timeout: 255 seconds]
<calebk> hello
Rodya_ has quit [Remote host closed the connection]
<calebk> so after playing around with my code more… I realized that it loops on the first iteration, but the index is always 0, and it doesn’t repeat, even though I told it to https://github.com/Scootie/BTCNetworkMap/blob/master/rubychain-json.rb lines105-l110
Musashi007 has joined #ruby-lang
jxie has quit [Read error: Connection reset by peer]
vladgh has joined #ruby-lang
<calebk> the array is 3 the first go around, but the index loops and i is always 0
<apeiros_> calebk: you can link the lines directly
vladgh has quit [Client Quit]
<calebk> ok ty
<calebk> hello ago
<calebk> *again
vladgh has joined #ruby-lang
jxie has joined #ruby-lang
<calebk> so i figured out it does loop correctly…. it just does the first “depth” of nodes
vladgh has quit [Remote host closed the connection]
vladgh has joined #ruby-lang
<calebk> however strangely the index is always 0, no matter how large the first queue is
<calebk> i’m not sure why that is
vladgh has quit [Remote host closed the connection]
stamina has quit [Quit: WeeChat 1.0.1]
djbkd has joined #ruby-lang
st0mar has quit [Ping timeout: 245 seconds]
SHyx0rmZ has quit [Remote host closed the connection]
vladgh has joined #ruby-lang
vladgh has quit [Remote host closed the connection]
SHyx0rmZ has joined #ruby-lang
kurko__ has joined #ruby-lang
caseypatrickdris has joined #ruby-lang
Musashi007 has quit [Ping timeout: 265 seconds]
mLF has joined #ruby-lang
sarkyniin has joined #ruby-lang
<calebk> eureka!…… the spiderdepth variable was getting interpreted as static for the entire loop, changed the depreciating counter inside the instance parameter
<calebk> *changed to
caseypatrickdris has quit [Ping timeout: 244 seconds]
workmad3 has quit [Ping timeout: 255 seconds]
Sadin has joined #ruby-lang
Musashi007 has joined #ruby-lang
vladgh has joined #ruby-lang
fusillicode has joined #ruby-lang
rbowlby has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
kasisnu has joined #ruby-lang
yalue has quit [Ping timeout: 245 seconds]
gwendall has quit [Remote host closed the connection]
gwendall has joined #ruby-lang
fusillicode1 has joined #ruby-lang
djbkd has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby-lang
vladgh has quit [Remote host closed the connection]
djellemah_ has joined #ruby-lang
fusillicode has quit [Ping timeout: 240 seconds]
gwendall has quit [Ping timeout: 264 seconds]
Musashi007 has quit [Ping timeout: 250 seconds]
djellemah has quit [Ping timeout: 250 seconds]
Musashi007 has joined #ruby-lang
yock has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
caseypatrickdris has joined #ruby-lang
kasisnu has quit [Quit: Leaving.]
kasisnu has joined #ruby-lang
djbkd has joined #ruby-lang
vladgh has joined #ruby-lang
fusillicode1 has quit [Quit: Leaving.]
fusillicode has joined #ruby-lang
jkad1 has joined #ruby-lang
gianlucadv has joined #ruby-lang
hahuang61 has joined #ruby-lang
marr has quit [Remote host closed the connection]
centrx has joined #ruby-lang
marr has joined #ruby-lang
bantic_ has joined #ruby-lang
mLF has quit [Ping timeout: 264 seconds]
marr has quit [Ping timeout: 245 seconds]
jkad1 has left #ruby-lang ["WeeChat 1.0.1"]
mikecmpbll has joined #ruby-lang
gwendall has joined #ruby-lang
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jkad has joined #ruby-lang
chinmay_dd has quit [Quit: Leaving]
malconis has joined #ruby-lang
kiyote23 has joined #ruby-lang
bhaak has quit [Ping timeout: 255 seconds]
djbkd has quit [Remote host closed the connection]
kiyote23 has quit [Remote host closed the connection]
mcclurmc has joined #ruby-lang
mcclurmc_ has joined #ruby-lang
mcclurmc has quit [Read error: Connection reset by peer]
djbkd has joined #ruby-lang
kasisnu has quit [Quit: Leaving.]
godd2 has quit [Remote host closed the connection]
jkad has quit [Quit: WeeChat 1.0.1]
kiyote23 has joined #ruby-lang
godd2 has joined #ruby-lang
mLF has joined #ruby-lang
kiyote23 has quit [Remote host closed the connection]
kiyote23 has joined #ruby-lang
jkad has joined #ruby-lang
kasisnu has joined #ruby-lang
Asher has quit [Ping timeout: 244 seconds]
kasisnu has quit [Client Quit]
mcclurmc_ has quit [Remote host closed the connection]
zgrogan has quit [Remote host closed the connection]
djellemah_ has quit [Ping timeout: 255 seconds]
shazaum has quit [Quit: This computer has gone to sleep]
ur5us has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby-lang
Sadin has quit [Remote host closed the connection]
Sadin has joined #ruby-lang
kasisnu has joined #ruby-lang
gwendall_ has joined #ruby-lang
gwendall has quit [Ping timeout: 244 seconds]
nofxx_ has quit [Ping timeout: 258 seconds]
Menorah has joined #ruby-lang
Asher has joined #ruby-lang
bmichelsen has joined #ruby-lang
duderonomy has joined #ruby-lang
miketheman has left #ruby-lang ["Textual IRC Client: www.textualapp.com"]
_fritchie has joined #ruby-lang
ikrima__ has quit [Ping timeout: 264 seconds]
centrx has quit [Quit: Science is organized knowledge, wisdom is organized life.]
tenderlove has quit [Remote host closed the connection]
tenderlove has joined #ruby-lang
_fritchie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tenderlove has quit [Remote host closed the connection]
kasisnu has quit [Quit: Leaving.]
mistym has quit [Remote host closed the connection]
tenderlove has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
Musashi007 has quit [Quit: Musashi007]
Iskarlar has joined #ruby-lang
JokerDoom has joined #ruby-lang
kurko__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
_JokerDoom has quit [Ping timeout: 256 seconds]
_fritchie has joined #ruby-lang
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mylar has quit []
<ljarvis> calebk: I see you didn't decide to adopt 2 space indent ;P
<ljarvis> ah you haven't changed it since
<yorickpeterse> WAIT
<yorickpeterse> SOMEBODY DIDN'T USE 2 SPACES?
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<|jemc|> yorickpeterse: didn't you hear? The new ruby convention is to use 3 'FULL BLOCK' (U+2588) characters to indent
<|jemc|> ███
scampbell has quit [Ping timeout: 272 seconds]
djellemah has joined #ruby-lang
mistym has joined #ruby-lang
_fritchie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<calebk> +_+ it’s my first week of ruby
<calebk> i was planning to do the 2 space indent for my next scrape of code
<|jemc|> calebk: well you're just in time to learn indentation the new way then
<|jemc|> def foo
<|jemc|> ███:bar
<|jemc|> end
<yorickpeterse> I
<yorickpeterse> * I'm more of a tab fan myself
<yorickpeterse> |jemc|: also that's not valid Ruby
<calebk> personally, i use tab because it makes it easier for me to differentiate
<calebk> but I didn’t know that ruby had a convention
* yorickpeterse actually hates tabs
<yorickpeterse> calebk: not an official one, no
<apeiros_> |jemc|: actually it's five semicolons: ;;;;;
<|jemc|> yorickpeterse: that's one yacc hack away
<calebk> so its…. more like a “commonly accepted practice” for spaces in ruby?
<|jemc|> from being valid ruby
djbkd has quit [Remote host closed the connection]
<apeiros_> ;; is valid ruby :)
<|jemc|> apeiros_ but I'd rather have my code look like a cityscape than a waterfall
<yorickpeterse> calebk: yes
djbkd has joined #ruby-lang
<|jemc|> calebk: yeah, it's pretty darn common
<yorickpeterse> apeiros_: not always
nofxx_ has joined #ruby-lang
<yorickpeterse> e.g.
<apeiros_> calebk: it's a "do it or people will unleash teh hate on you" convention
<yorickpeterse> ;;def foo
<|jemc|> there are various ruby style guides floating around if you're interested in what others are doing
<yorickpeterse> ;;;;10
<yorickpeterse> ;;
<yorickpeterse> is invalid
<yorickpeterse> errr
<yorickpeterse> derp
<yorickpeterse> of course it's invalid if you forget the end
* yorickpeterse slaps himself around with a copy of parse.y
<yorickpeterse> D:
<|jemc|> it's not valid in places like a multiline array declaration
Bwild has joined #ruby-lang
<apeiros_> lolyorick
<apeiros_> |jemc|: oh, indeed. how very sad.
<apeiros_> and there I thought ruby treated ; exactly like a newline
chills42 has quit [Remote host closed the connection]
<|jemc|> apeiros_: my toy lang has two modes for separators - one where semicolons are interchangable with newlines and one where commas are - in a typical context, it's semicolons; in something like an array, it's commas
<apeiros_> interesting. why not ; everywhere?
<|jemc|> so things like [1,2,,,,,,,3] are valid and still just three items (though ugly)
<|jemc|> apeiros_: long story short: it helps make it possible to nest some grammar areas inside eachother without a closing token
<|jemc|> so for a one-line method def, instead of:
<|jemc|> def foo; a; b; c; d; end
<|jemc|> it can be:
<|jemc|> foo: a; b; c; d
Musashi007 has joined #ruby-lang
lapide_viridi has quit [Quit: Leaving]
<|jemc|> because in the class declaration context, comma is the sep
<apeiros_> ok
<apeiros_> is the name of your language golf-lang? :)
<|jemc|> "foo: a; b, bar: c, d" would be two method defs
<|jemc|> heh
<|jemc|> making one-liner methods look pretty and succint can visually clean up a class definition
<apeiros_> (I admit, mine has a --golf flag which loads the whole stdlib plus a couple of shortcuts)
<apeiros_> yeah, I agree
<apeiros_> interesting, you built it on top of rubinius vm
<apeiros_> isn't that a rather quick moving target?
lapide_viridi has joined #ruby-lang
<|jemc|> yeah, the instruction set is going to be changing drastically soon ;)
<yorickpeterse> apeiros_: the public API hasn't changed in a long time
<yorickpeterse> but things will change in a bit though
<|jemc|> but the language is just a toy I'm not using for anything serious, and writing rubinius bytecode is lots of fun
<apeiros_> :)
<|jemc|> plus with the way its set up now, it has the benefit of being able to use ruby objects in myco and vice versa
postmodern has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
simi has quit [Ping timeout: 245 seconds]
djbkd has joined #ruby-lang
<apeiros_> soo, migrations work again and are now multi-schema capable. leisure time as a reward :)
AKASkip has joined #ruby-lang
gareim has joined #ruby-lang
iamninja has quit [Quit: ZZZzzz…]
<ljarvis> \o/
robbyoconnor has quit [Ping timeout: 250 seconds]
robbyoconnor has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
mistym has quit [Remote host closed the connection]
matsutomo has joined #ruby-lang
wallerdev has joined #ruby-lang
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
<apeiros_> oh btw. yorickpeterse - re pg & orms, are you by any chance interested in a minimal, postgres specific ORM? as in, help building it?
gianlucadv has quit [Ping timeout: 250 seconds]
bmichelsen has quit [Quit: ZZZzzz…]
<ljarvis> ^ i might be interesting in that too
<apeiros_> noted :)
<apeiros_> I have to ponder how much makeshift ugliness I accept to remain in it before I show it to you (and yorick, if he's interested)
tenderlove has quit [Remote host closed the connection]
tenderlove has joined #ruby-lang
<|jemc|> apeiros_: put me on the list :)
<apeiros_> ok, now I indeed need a list. just be aware that when I say "minimal", I mean minimal. at the moment it's probably behind every ORM feature wise.
<ljarvis> that's why im interested
<|jemc|> yeah, that's the appeal
<apeiros_> if you wonder what the point of it is: I don't need/want DBI and hence can (and intend to) leverage all of postgres specific advantages
spetryk has quit [Quit: Be back later ...]
robbyoconnor has quit [Ping timeout: 272 seconds]
marr has joined #ruby-lang
<ljarvis> we wrote rdbi and it's a shame it never really took off
<ljarvis> none of us were massively motivated at the time (although it's not really an orm)
lapide_viridi has quit [Quit: Leaving]
djbkd has joined #ruby-lang
oleo has quit [Ping timeout: 250 seconds]
mistym has joined #ruby-lang
st0mar has joined #ruby-lang
oleo has joined #ruby-lang
<ljarvis> i should really release slop
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<tbuehlmann> do so!
<ljarvis> im not sure whether to wait and build something to handle commands
yock has quit [Ping timeout: 258 seconds]
<ljarvis> but that stuff bores me so maybe someone else who's interested should take it on
j2p2 has quit [Ping timeout: 258 seconds]
mcclurmc has joined #ruby-lang
<ljarvis> god i love writing haskell
gwendall_ has quit [Remote host closed the connection]
gwendall has joined #ruby-lang
calebk has quit [Quit: calebk]
mcclurmc has quit [Ping timeout: 258 seconds]
bears has joined #ruby-lang
caseypatrickdris has quit [Remote host closed the connection]
AKASkip has quit [Ping timeout: 256 seconds]
mcclurmc has joined #ruby-lang
BubonicPestilenc has joined #ruby-lang
yfeldblum has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
symm- has quit [Read error: Connection reset by peer]
_fritchie has joined #ruby-lang
cmhobbs has quit [Ping timeout: 250 seconds]
sarkyniin has quit [Remote host closed the connection]
allomov has joined #ruby-lang
fusillicode has quit [Ping timeout: 240 seconds]
Menorah has quit [Quit: This computer has gone to sleep]
caseypatrickdris has joined #ruby-lang
siwica has joined #ruby-lang
skade has joined #ruby-lang
arBmind has joined #ruby-lang
<zenspider> ljarvis: you're perverse
<ljarvis> zenspider: quite!
<zenspider> I still can't read haskell
allomov has quit [Remote host closed the connection]
<ljarvis> yeah it still takes me some time to wrap my head around it when reading library code
yfeldblu_ has joined #ruby-lang
spastorino has quit [Quit: Connection closed for inactivity]
nofxx__ has joined #ruby-lang
nofxx_ has quit [Ping timeout: 245 seconds]
yfeldblum has quit [Ping timeout: 245 seconds]
Lewix has joined #ruby-lang
whippythellama has quit [Quit: whippythellama]
jkad has quit [Quit: WeeChat 1.0.1]
yfeldblu_ has quit [Ping timeout: 264 seconds]
ozialien has joined #ruby-lang
fclausen has joined #ruby-lang
skade has quit [Quit: Textual IRC Client: www.textualapp.com]
dorei has joined #ruby-lang
matsutomo has quit [Quit: matsutomo]
bb010g has joined #ruby-lang
VictorBjelkholm has joined #ruby-lang
yfeldblum has joined #ruby-lang
mbr_ has joined #ruby-lang
blowmage` has joined #ruby-lang
djellemah_ has joined #ruby-lang
shubhamgoyal has joined #ruby-lang
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
loincloth has quit [Ping timeout: 245 seconds]
blowmage has quit [Ping timeout: 245 seconds]
DefV_ has joined #ruby-lang
st0mar has quit [Ping timeout: 245 seconds]
djellemah has quit [Ping timeout: 245 seconds]
ur5us has quit [Ping timeout: 245 seconds]
shubhamg_ has quit [Ping timeout: 245 seconds]
mbr has quit [Ping timeout: 245 seconds]
banister has quit [Ping timeout: 245 seconds]
DefV has quit [Ping timeout: 245 seconds]
blackoperat has quit [Ping timeout: 245 seconds]
sk_0 has quit [Ping timeout: 245 seconds]
sk_0 has joined #ruby-lang
nofxx__ has quit [Ping timeout: 255 seconds]
mLF has quit [Ping timeout: 255 seconds]
ur5us has joined #ruby-lang
bantic_ has quit [Quit: bantic_]
yfeldblum has quit [Remote host closed the connection]
nofxx__ has joined #ruby-lang
mcclurmc has quit [Remote host closed the connection]
blackoperat has joined #ruby-lang
<yorickpeterse> apeiros_: re ORM, not really, I'm happy with Sequel, don't really have the time either for more stuff to work on
<yorickpeterse> apeiros_: already got my hands full with rbx, oga, soon an LL parser
bantic has joined #ruby-lang
<apeiros_> :)
<yorickpeterse> and all the crap that comes with that
<apeiros_> ok
jkad has joined #ruby-lang
calebk has joined #ruby-lang
bears has quit [Remote host closed the connection]
<calebk> other than using a thread queue, is there a way to check if threads are still being issued before the thread.join call?
<calebk> all of the threading examples use join after a fixed number of threads have been issued, but what if you don’t know if threads are still being issued?
<yorickpeterse> issued?
<yorickpeterse> If you mean if they are still alive you can call #alive? on a thread
<yorickpeterse> >> Thread.current.alive?
<eval-in__> yorickpeterse => true (https://eval.in/236399)
<nofxx__> something like Thread.all_running? Does that exists btw?
<yorickpeterse> nofxx__: Thread.list returns all threads, so you can do something like Thread.list.any?(&:alive?)
<nofxx__> yorickpeterse, that's very nice... didn't found it. No need for an array heh. Makes code uglier.
<calebk> so the typical example is 10.each do |foo| foo = Thread.new yada yada yada
<calebk> then after the loop its .join
spetryk has joined #ruby-lang
<calebk> but for me, there’s no fixed number, its dynamic
<yorickpeterse> calebk: you can do something like this:
<yorickpeterse> some_number.times.map { Thread.new { ... } }.join
<calebk> so when the .join is called, I have no idea if its abruptly ending before the new threads are added
<yorickpeterse> oh right
setanta has quit [Quit: Leaving]
<yorickpeterse> the above snippet won't call #join until all threads have been spawned
<calebk> but that’s the trick… the threads haven’t been even come into existence yet, because the number is dynamic, so there’s almost a look forward needed
<yorickpeterse> Not sure what you mean
<calebk> wouldn’t I have to specify the some_nmumber
<yorickpeterse> Do you mean that you will continuesly spawn new threads over a period of time?
<yorickpeterse> * continuously
<calebk> well I have workers creating workers which create workers…. its a function of crawling a tree, children creating children threads
Musashi007 has quit [Quit: Musashi007]
<calebk> but when I issue a general.join call, the code doesn’t know if it’s killing the process that’s killing those children
<calebk> *process that’s issueing those children in the future
<yorickpeterse> join doesn't kill any processes
<yorickpeterse> Thread#join merely waits until whatever it's called on has completed running
<nofxx__> yorickpeterse, my arrayless thread control is uglier than array one: Thread.list.reject { |t| t == Thread.current }.each(&:join)
<yorickpeterse> nofxx__: heh
gareim has quit [Ping timeout: 258 seconds]
<calebk> yeah…. but .join waits until what’s been already called, but what if the child thread hasn’t added it’s children yet?
<calebk> will it wait for those?
<yorickpeterse> #join simply blocks execution of the calling thread until the thread it has been called on has completed
<yorickpeterse> So everything after it will be blocked too
<yorickpeterse> This is why Thread.current.join triggers a deadlock: it waits for itself to finish, but it never will due to the #join call
<yorickpeterse> >> Thread.current.join
<eval-in__> yorickpeterse => Target thread must not be current thread (ThreadError) ... (https://eval.in/236400)
<zenspider> argh. pry isn't warning free either.
<yorickpeterse> oh, apparently there's now even a fancy warning for it
<calebk> hmmm…. then it seems queue is probably my only viable option for my situation
<nofxx__> I never really got why #join ... #wait doesn't make more sense?
<yorickpeterse> Probably comes from pthread_join()
<nofxx__> or maybe #sync
<calebk> has anyone tried threadz or actionpool gems?
<yorickpeterse> concurrent-ruby is a pretty good gem
<calebk> interesting
<calebk> i’ll play around with that one
<calebk> ty for the link
<calebk> hopefully it doesn’t poop out on me… i forsee about needing about 2000 queue
gwendall_ has joined #ruby-lang
<yorickpeterse> You shouldn't spawn that many threads
arBmind has quit [Ping timeout: 244 seconds]
<yorickpeterse> A pool with a fixed size is probably better in that case
<yorickpeterse> Especially on MRI spawning thousands of threads is not going to make a huge difference compared to only spawning a few
<calebk> well the queue is just the jobs waiting
gwendall has quit [Ping timeout: 265 seconds]
kurko__ has joined #ruby-lang
<calebk> i only plan to create 3 threads
mcclurmc has joined #ruby-lang
enebo has quit [Quit: enebo]
<yorickpeterse> ah
<calebk> I’m fixing a bit of crawling code https://github.com/Scootie/BTCNetworkMap
yfeldblum has joined #ruby-lang
<calebk> the problem is that each thread is tied to a node, and there are going to be a lot of nodes...
<calebk> this is my 6th day of ruby… still getting a feel for everything
<yorickpeterse> heh, multi-threading on the 6th day
<yorickpeterse> a brave person indeed
<calebk> it wasn’t my original plan… the code includes threading… but it gets messed up without a queue, because the .join abruptly ends the chance for the children threads to issue their own children
<calebk> hence… the queue
hahuang61 has quit [Quit: WeeChat 1.0.1]
mcclurmc has quit [Ping timeout: 272 seconds]
yfeldblum has quit [Ping timeout: 244 seconds]
charliesome has joined #ruby-lang
__butch__ has quit [Quit: Leaving.]
arBmind has joined #ruby-lang
hahuang61 has joined #ruby-lang
midhir has quit [Remote host closed the connection]
sankaber has joined #ruby-lang
Musashi007 has joined #ruby-lang
jo__ has quit [Quit: Connection closed for inactivity]
kurko__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
djbkd has quit [Remote host closed the connection]