<bnagy>
tbh for AR questions you are better off asking in a rails chan
<bnagy>
whether or not you're using rails
Adawerk has joined #ruby
<xybre>
Yeah, ActiveRecord looks enumerable but may not actually work the way you expect
RichardBaker has quit [Client Quit]
mmitchell has joined #ruby
<xybre>
Klotho: I thought you wanted a count, I must have misunderstood
<Klotho>
the rais channel kicked me out because I didn't want to redo my entire database structure
RichardBaker has joined #ruby
<Klotho>
xybre, I want to make a list of the values, then do something with the list, then go onto the next ID
sailias has joined #ruby
<bnagy>
if you want to fake a similar thing you could collection.each.with_object(Hash.new {|h,k| h[k]=[]}) {|obj,hsh| hsh[obj[:id]]=obj}
btanaka has quit [Remote host closed the connection]
<xybre>
Oh I thought I recognized your nick.
robbyoconnor has quit [Excess Flood]
<bnagy>
sorry that should be << obj not =
<xybre>
Order.select("date(created_at) as ordered_date, sum(price) as total_price").group("date(created_at)").to_a voila, you have an array, now do whatever you want to it
<bnagy>
"simple"
okinomo has joined #ruby
tkuchiki has joined #ruby
<xybre>
bnagy: copy and pasted the code from the link he provided, add .to_a
hashpuppy has quit [Quit: Computer has gone to sleep.]
nari has quit [Ping timeout: 276 seconds]
dLog has quit [Ping timeout: 264 seconds]
randomdrake has quit [Quit: randomdrake]
mmitchell has quit [Ping timeout: 248 seconds]
RichardBaker has quit [Quit: RichardBaker]
tkuchiki has quit [Ping timeout: 240 seconds]
zastern has quit [Remote host closed the connection]
senayar has quit [Remote host closed the connection]
<Klotho>
so the object created by that .group, how do I iterate through it for each group?
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
mmitchell has quit [Remote host closed the connection]
hashpuppy has joined #ruby
cody-- has quit [Quit: Computer has gone to sleep.]
b00stfr3ak has joined #ruby
b00stfr3ak has joined #ruby
mpereira has quit [Remote host closed the connection]
Monie has joined #ruby
<Klotho>
rhanks xybre
quoin has quit [Ping timeout: 246 seconds]
snovak has joined #ruby
hashpuppy has quit [Client Quit]
Drewch has quit [Quit: Computer has gone to sleep.]
c0rn has quit [Quit: Computer has gone to sleep.]
kvirani has quit [Remote host closed the connection]
kvirani has joined #ruby
elaptics is now known as elaptics`away
sailias has quit [Ping timeout: 264 seconds]
chxane has joined #ruby
Nisstyre-laptop has joined #ruby
hogeo has joined #ruby
Monie has quit [Ping timeout: 276 seconds]
snovak has quit [Ping timeout: 264 seconds]
Nisstyre-laptop is now known as nisstyre
julweber_ has joined #ruby
brianpWins has quit [Quit: brianpWins]
osvico has joined #ruby
kvirani has quit [Ping timeout: 276 seconds]
RichardBaker has joined #ruby
benlieb has quit [Quit: benlieb]
cody-- has joined #ruby
b00stfr3ak has quit [Ping timeout: 276 seconds]
echevemaster has quit [Ping timeout: 256 seconds]
kilophoton has joined #ruby
julweber has quit [Ping timeout: 264 seconds]
RichardBaker has quit [Client Quit]
rickmasta has quit [Read error: Connection reset by peer]
ffranz has quit [Quit: Leaving]
DanKnox is now known as DanKnox_away
headius has quit [Read error: Connection reset by peer]
ehc has quit [Quit: ehc]
rickmasta has joined #ruby
amacgregor_ has joined #ruby
headius has joined #ruby
yshh has joined #ruby
reset has quit [Quit: Leaving...]
Klotho1 has joined #ruby
mootpointer has joined #ruby
thesheff17 has joined #ruby
Monie has joined #ruby
amacgregor has quit [Ping timeout: 264 seconds]
pvizcay has joined #ruby
jonahR has quit [Quit: jonahR]
<Klotho1>
what's confusing me is that if I do something like Order.select("*").group("id").each do |r|, how do I know when I reach the end of each group? Or do I have to do it differently?
RichardBaker has joined #ruby
SteveBenner9 has quit [Quit: Leaving]
<Klotho1>
xybre, or anyone else?
jbrechtel has joined #ruby
yshh has quit [Remote host closed the connection]
<pontiki>
isn't id unique ?
hashpuppy has joined #ruby
jbrechte_ has joined #ruby
i_s has quit [Remote host closed the connection]
<xybre>
pontiki: not in his world, thats the 'fun' part, since he doesn't want to make ids unique
<Klotho1>
pontiki, substitute "value" for id
<pontiki>
oh ok
<Klotho1>
it's just some sort of ID
<pontiki>
nodnod
i_s has joined #ruby
RichardBaker has quit [Client Quit]
<Klotho1>
it's not the actual record ID
<pontiki>
no, gotcha
ryandeussing has joined #ruby
DrCode has quit [Remote host closed the connection]
sailias has joined #ruby
<pontiki>
just some random field you're grouping by
<Klotho1>
yeah
<Klotho1>
which can have duplicates
<pontiki>
no, i'm with ya
Monie has quit [Ping timeout: 246 seconds]
<Klotho1>
so for the group where value="a" I want to do something and then do something with the next group with value="c" or whatever
<pontiki>
idk
<pontiki>
i probaly do this stupidly
<pontiki>
but keep a "last" variable around that is initially nil, and just check "if r['id'] != last" thing to know when the groups change
<pontiki>
and when it isn't equal, set last = row['id']
jbrechtel has quit [Ping timeout: 276 seconds]
<Klotho1>
that's what I was doing, but I had the problem that I want to delete each set of records that I process, but only after they are all processed. And I fall out of the loop before being able to delete the last one
ryandeussing has quit [Ping timeout: 245 seconds]
<pontiki>
i guess i don't see what one has to do with the other
<pontiki>
what do you do when you detect a change in group?
jkamenik has joined #ruby
DrCode has joined #ruby
<Klotho>
I write a record to another table, and send an email
<pontiki>
and continue processing that record?
Monie has joined #ruby
<Klotho>
yes, since it's for the next group
DonRichie has quit [Ping timeout: 240 seconds]
<pontiki>
how is it you fall out of the loop?
iliketur_ has quit [Quit: zzzzz…..]
<Klotho>
because I only do that end of group process on a group change, and for the last group I fall out of the loop with no change
DonRichie has joined #ruby
lfox has joined #ruby
saarinen has quit [Quit: saarinen]
maletor has quit [Quit: Computer has gone to sleep.]
<pontiki>
ah
localredhead has quit [Ping timeout: 264 seconds]
<Klotho>
but outside the loop r is undefined, so I can't do the r.destroy I want to do
<pontiki>
i'm a little foggy right now
DonRichie has quit [Read error: Connection reset by peer]
<Klotho>
but I haven't been using .group
<Klotho>
so I was hoping that by using .group I wouild get a different data structure I could deal with better
<pontiki>
let me suggest another approach
ravster has left #ruby [#ruby]
<martxel>
I haven't read anything, but group_by might help
<pontiki>
can you add a field to your table to indicate you've processed the record?
<xybre>
Keep in mind that at least 3 different solutions have been proposed for this problem
centr0 has quit [Quit: centr0]
<pontiki>
oh
<Klotho>
something more like a 2 dimensional array so I can do an inner and outer loop. Inner loop for each group
<pontiki>
then i shall desist
grillermo has joined #ruby
goodcodeguy has joined #ruby
|jemc| has joined #ruby
<Klotho>
xybre, thanks. My question was, would I do something like Order.select("*").group("id").each do |r|, or how would i loop through them? I actually didn't understand the first suggestion you made with inject, etc.
hashpuppy has quit [Quit: Computer has gone to sleep.]
<bnagy>
don't group with AR, would be my suggestion
<Klotho>
AR?
<pontiki>
what? why not?
<bnagy>
just iterate all your records and then build a hash
<pontiki>
making the DB do the sorting is usually a lot faster and convenient
<Klotho>
oh
<pontiki>
it's *built* for that
<xybre>
pontiki++
GeissT has joined #ruby
<bnagy>
well if the AR group just doesn't work, which apparently it doesn't
<pontiki>
waaat???
cooldman224 has joined #ruby
<bnagy>
well otherwise I assume this would have been a much shorter conversation :)
<Klotho>
I just don't understand how to iterate by group using .group
<bnagy>
given that there were 2-3 solutions when I wandered off an hour ago to do work :)
<pontiki>
that doesn't mean .group isn't working...
<Klotho1>
you mean collection.each.with_object(Hash.new {|h,k| h[k]=[]}) {|obj,hsh| hsh[obj[:id]]=obj}, which you posted? I guess I should study it, cuz I don't understand it!
tabolario has joined #ruby
TDJACR has joined #ruby
<xybre>
Read the documentation for these things please
<Klotho1>
oops, bbl
<bnagy>
all that does is iterate the whole collection and builds a hash of id => [array of objects]
<bnagy>
apart from the typo where = should be <<
<bnagy>
but that _should_ be what group gives you, assuming the api is sane
<bnagy>
but who knows
<pontiki>
did anyone suggest tagging each record as processed and do a mass delete at the end?
buzzybron has joined #ruby
<pontiki>
or deleting each record when you start processing it?
<bnagy>
wait we want to delete records now as well?
<pontiki>
that's what i just heard is the problem
<bnagy>
srsly you should be asking AR people :)
<bnagy>
I guess maybe they support transactions
<pontiki>
yes
<bnagy>
but who knows, they're all nutcases afaict
<sinistersnare>
hey, i saw this gem once that all it did was return a Buzz word
beneggett has joined #ruby
<sinistersnare>
like 'ObjectFactoryProxy' or something
<sinistersnare>
but i cant seem to remember the name of it, does anyone have any insight?
mrsolo has quit [Quit: This computer has gone to sleep]
seich- has quit [Ping timeout: 240 seconds]
fbernier has quit [Remote host closed the connection]
TDJACR has joined #ruby
mrsolo has joined #ruby
michalkozminski has quit [Ping timeout: 245 seconds]
ner0x has joined #ruby
Quashie_ is now known as Quashie
brain_shim has joined #ruby
verto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hamakn has joined #ruby
IceDragon has quit [Ping timeout: 260 seconds]
huoxito has quit [Read error: Operation timed out]
IceDragon has joined #ruby
hamakn has quit [Read error: Connection reset by peer]
jtgiri_ has quit [Quit: jtgiri_]
hamakn has joined #ruby
seich- has joined #ruby
enebo has quit [Quit: enebo]
havenwood has quit [Remote host closed the connection]
koran has joined #ruby
<koran>
ruby s shit
havenwood has joined #ruby
ehc has joined #ruby
havenwood has quit [Read error: Connection reset by peer]
headius has joined #ruby
rrmartins has quit [Remote host closed the connection]
Domon has joined #ruby
<koran>
radar
<koran>
BITCH
havenwood has joined #ruby
travish has joined #ruby
<goodcodeguy>
O.o
<koran>
yea
<koran>
suck me off
<koran>
fagit
<travish>
wut?
<goodcodeguy>
sigh...
IceDragon has quit [Ping timeout: 256 seconds]
DanKnox is now known as DanKnox_away
<koran>
bitch
kloeri has quit [Read error: Connection reset by peer]
headius has quit [Client Quit]
Lewix has joined #ruby
snath has joined #ruby
<koran>
BITCH
<travish>
anybody have any questions / comments?
<koran>
yea
<koran>
suck my cock
<sinistersnare>
what an annoying troll
IceDragon has joined #ruby
<sinistersnare>
i was wondering about a ruby gem which returns various buzz-words
<koran>
fackin fag
<sinistersnare>
do you know of such a module?
TDJACR has quit [Quit: Quit]
<Nightmare>
Here's a question: why do you like using ruby (assuming you're here because you do)?
kloeri has joined #ruby
<sinistersnare>
i dont use ruby, i just want to use this ruby gem i saw a while ago :p
<koran>
nigga
jaimef has quit [Excess Flood]
<jordanbsanders>
I find it very succinct and readable.
<travish>
FYI: to ignore a user, type '/ignore <name>'
JumpMast3r has joined #ruby
dhruvasagar has joined #ruby
postmodern has quit [Quit: Leaving]
<travish>
^^ agree. Coming from java, I appreciate the brevity of ruby compared to the formalism of ruby.
<travish>
*formalism of java
grillermo has quit [Quit: bandtastic.me]
jaimef has joined #ruby
<sinistersnare>
oh yes,
<Nightmare>
Interesting
<koran>
faggit
<sinistersnare>
thats a good factoid with the /ignore
rrmartins has joined #ruby
grillermo has joined #ruby
<Nightmare>
or we can just pretend like he's not here/doesn't exist outright and not say anything to suggest we do, that tends to work :-p
<koran>
NIGGERS
koran has quit [Killed (idoru (Spam is off topic on freenode.))]
<Nightmare>
That works too
<travish>
much better now.
Voodoofish430 has quit [Quit: Leaving.]
spiridondon has joined #ruby
kloeri__ has joined #ruby
cooldman224 has quit [Remote host closed the connection]
<travish>
sinistersnare: you said you were looking for a specific gem?
<spiridondon>
niggers
<Lewix>
Nightmare: I like it because it's succint and elegant
cascalheir has joined #ruby
<sinistersnare>
yes, it returns a business style object oriented buzz word
<sinistersnare>
for example 'ObjectFactoryProxy' or something
<spiridondon>
suck my cock bitches
<goodcodeguy>
kids apparently have nothing better to do...
<Nightmare>
Wish I had more time to look into Ruby itself, shame I'm so busy and only really know the basics. It seems nice
<sinistersnare>
the /ignore tip is really useful
<spiridondon>
suck my big hard cock, bitches.
b00stfr3ak has joined #ruby
dgaffney has quit [Quit: dgaffney]
cascalheira has quit [Ping timeout: 256 seconds]
huoxito has joined #ruby
<goodcodeguy>
yeah, both ignored
<goodcodeguy>
just funny, why spam in a ruby channel
<spiridondon>
FUCKING FAGGOTS ASS FAGS
adkron_ has quit [Ping timeout: 246 seconds]
kloeri__ has quit [Quit: leaving]
<Lewix>
he probably had a hard time grasping the basics
<spiridondon>
ruby is for retards
<Lewix>
and hates the world for it
<goodcodeguy>
haha
osvico has quit [Ping timeout: 248 seconds]
spiridondon has left #ruby [#ruby]
<Nightmare>
He couldn't take the truth, apparently
adkron has joined #ruby
<sevenseacat>
its ok, he went to #rubyonrails instead
<sinistersnare>
travish: you know of any gem like that?
<goodcodeguy>
maybe he'll get more traction there ;)
<Lewix>
Nightmare: nah he can't learn it
goodcodeguy has quit [Quit: leaving]
<Lewix>
it's for the chosen ones
<travish>
No, I'm afraid thats not ringing a bell for me.
<travish>
@sinistersnare
TDJACR has joined #ruby
<sinistersnare>
damn, it was some buzzword generator. google isnt helping!
snath has quit [Ping timeout: 240 seconds]
<Lewix>
and seems like it does get more traction in #rubyonrails
cads has joined #ruby
<Nightmare>
there's an OP around there now, it seems, though
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Lewix>
some people just cant mentally ignore others, they have to use the big guns
sayan has joined #ruby
echevemaster has joined #ruby
jibi has quit [Quit: .]
DanKnox_away is now known as DanKnox
rrmartins has quit [Remote host closed the connection]
seich- has quit [Ping timeout: 240 seconds]
[rust] has joined #ruby
ehc has quit [Quit: ehc]
Davey has quit [Ping timeout: 248 seconds]
TDJACR has quit [Quit: Quit]
lfox has quit [Quit: ZZZzzz…]
headius has joined #ruby
seich- has joined #ruby
sirupsen has joined #ruby
amacgregor has joined #ruby
<V8Energy>
while packaging ruby script with ocra, it launches the application, after i exit the application, ocra exits too without completing. how come? am i doing something wrong?
rrmartins has joined #ruby
amacgregor_ has quit [Ping timeout: 240 seconds]
[rust] has quit [Ping timeout: 248 seconds]
sinistersnare has left #ruby [#ruby]
huoxito has quit [Ping timeout: 256 seconds]
smathieu has joined #ruby
huoxito has joined #ruby
<banisterfiend>
shevy Waldeinsamkeit
sambao21 has quit [Quit: Computer has gone to sleep.]
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jrobeson>
sourceforge still exists
KobraKao has quit [Quit: Saindo]
foobot has quit [Remote host closed the connection]
<pontiki>
of course
aggregatebot has joined #ruby
<jrobeson>
last time i tried to kill my sourceforge account, they woudln't let me. because i was the canonical name controlling 2 cvs repositories for a project that had moved to being hosted elsewise
smathieu has joined #ruby
raar is now known as arbes
yacks has quit [Quit: Leaving]
ryandeussing has joined #ruby
jtgiri_ has joined #ruby
barderer has quit [Ping timeout: 240 seconds]
zz_funny_banana has quit [Ping timeout: 240 seconds]
faulkner has quit [Read error: Operation timed out]
rcs has quit [Ping timeout: 248 seconds]
lukec has joined #ruby
SegFaultAX has quit [Ping timeout: 245 seconds]
ahuman has quit [Quit: No Ping reply in 180 seconds.]
bmn has quit [Ping timeout: 248 seconds]
ahuman has joined #ruby
arusso has quit [Ping timeout: 240 seconds]
zz_michael_mbp has joined #ruby
rafacv has joined #ruby
Sou|cutter has quit [Ping timeout: 240 seconds]
Tarential has quit [Excess Flood]
io_syl has joined #ruby
DylanJ has quit [Ping timeout: 264 seconds]
sethetter has quit [Quit: Lost terminal]
rblackwe has quit [Ping timeout: 240 seconds]
Tarential has joined #ruby
bmn has joined #ruby
faulkner has joined #ruby
miah has quit [Ping timeout: 248 seconds]
smathieu has quit [Ping timeout: 276 seconds]
miah has joined #ruby
rcs has joined #ruby
varfoo has quit [Quit: WeeChat 0.4.0]
arusso has joined #ruby
rblackwe has joined #ruby
kizzx2 has quit [Quit: Leaving.]
Sou|cutter has joined #ruby
SegFaultAX has joined #ruby
orionstein is now known as orionstein_away
ryandeussing has quit [Ping timeout: 276 seconds]
quoin has joined #ruby
mrsolo_ has joined #ruby
mrsolo has quit [Quit: Leaving]
browndawg has quit [Ping timeout: 276 seconds]
goleldar has quit [Read error: Operation timed out]
vramana has quit [Quit: ChatZilla 0.9.90.1 [Firefox 23.0/20130803215302]]
Zai00 has joined #ruby
camilasan has quit [Remote host closed the connection]
camilasan has joined #ruby
snyp has joined #ruby
JohnBat26 has joined #ruby
<shevy>
lol
colonolGron has quit [Quit: leaving]
camilasa_ has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
wallerdev has joined #ruby
okinomo has joined #ruby
kpshek has joined #ruby
<flughafen>
is there anything liek python-requests for ruby that makes http sessions easy?
buibex has joined #ruby
wallerdev has quit [Client Quit]
boblu has joined #ruby
mmozuras has quit [Remote host closed the connection]
Soda has joined #ruby
pushpak has joined #ruby
pushpak has left #ruby [#ruby]
dennus has joined #ruby
mmozuras has joined #ruby
snovak has joined #ruby
machuga|away is now known as machuga
tvw has joined #ruby
mansi has joined #ruby
buibex has quit [Ping timeout: 276 seconds]
viszu has quit [Quit: Leaving.]
antulik is now known as antulik-afk
Macaveli has quit [Quit: Computer has gone to sleep.]
snovak has quit [Ping timeout: 245 seconds]
mansi has quit [Ping timeout: 276 seconds]
verto has joined #ruby
Macaveli has joined #ruby
mikecmpbll has quit [Quit: Computer has gone to sleep.]
okinomo has quit [Ping timeout: 248 seconds]
aryaching has joined #ruby
tvw has quit []
jailbirdzentest has joined #ruby
JumpMast3r has joined #ruby
vlad_starkov has joined #ruby
shredding has joined #ruby
mansi has joined #ruby
<jailbirdzentest>
I'm having trouble writing a recursive function to convert an flat array of objects that has a "level" attribute to a hierarchical set. Can someone take a look at my data? https://gist.github.com/jcblitz/d70b75ba625be6d366d6
verto has quit [Read error: Connection reset by peer]
joonty has quit [Ping timeout: 246 seconds]
<MrZYX>
hm, why is level a string?
mansi has quit [Remote host closed the connection]
Xeago_ has joined #ruby
VTLob has joined #ruby
<jailbirdzentest>
sorry, it's not. It's an int, that's just the way I typed it in Gist
zz_michael_mbp is now known as mike_mbp
kvirani has joined #ruby
Xeago has quit [Ping timeout: 248 seconds]
<MrZYX>
also that will never be deterministic, since there's no way to select the right parent for the childrens of the next level
mike_mbp is now known as michael_mbp
mikecmpbll has joined #ruby
<jailbirdzentest>
it's based on the natural order, if a level 2 follows a level one, it's a child
pygospa has quit [Disconnected by services]
TheRealPygo has joined #ruby
kaldrenon has joined #ruby
pierre1 has joined #ruby
mmitchell has joined #ruby
DonRichie has joined #ruby
<Kneferilis>
hello, ruby has a reflection api?
<MrZYX>
jailbirdzentest: are there ever multiple level 0?
<jailbirdzentest>
no, 0 is root
<jailbirdzentest>
and is always first
<MrZYX>
Kneferilis: describe your problem not the solution you think you need
seyha has joined #ruby
jp- has joined #ruby
<Kneferilis>
MrZYX, well, I am interested in metaprogramming and I've read that ruby shines in that, but I was wondering if it has a reflection api
ewnd9 has quit [Ping timeout: 276 seconds]
cody-- has joined #ruby
maasdesigner has joined #ruby
jnoob22 has quit [Read error: Connection reset by peer]
enebo has joined #ruby
fbernier has joined #ruby
rcosta has joined #ruby
<MrZYX>
as if there's one definition of that... ruby has very good introspection and metaprogramming capabilities. If you want anything concrete get concrete yourself
jbpros_ has joined #ruby
iamjarvo has joined #ruby
joonty has joined #ruby
codecop has quit [Remote host closed the connection]
jbpros has quit [Ping timeout: 248 seconds]
jbpros_ is now known as jbpros
julweber has quit [Remote host closed the connection]
julweber has joined #ruby
mmitchell has quit [Remote host closed the connection]
Criztian has quit [Remote host closed the connection]
<Kneferilis>
MrZYX, PHP has a reflection api, so does Java and C#, so I was wondering if ruby had something similar
shaunbaker has quit [Ping timeout: 245 seconds]
Astralum has quit [Read error: Connection reset by peer]
YaNakilon has quit [Ping timeout: 240 seconds]
snovak has joined #ruby
Astralum has joined #ruby
<Xeago_>
Kneferilis: there is ObjectSpace
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
browndawg has quit [Read error: Connection reset by peer]
<MrZYX>
what is a reflection API to you? Calling methods programmatically? Ruby can do that. Finding out an objects instance variables? Ruby can do that. Defining methods, classes, modules dynamically? Ruby can do that.
<Xeago_>
in C# you can't loop over all objects created
RORgasm has quit [Remote host closed the connection]
zeade has quit [Quit: Leaving.]
RORgasm has joined #ruby
girija has joined #ruby
Macaveli has joined #ruby
burlyscudd has quit [Quit: Leaving.]
julian-delphiki has quit [Ping timeout: 245 seconds]
jtgiri_ has joined #ruby
rcosta has quit [Ping timeout: 246 seconds]
burlyscudd has joined #ruby
Bry8Star{T2_ has joined #ruby
Bry8Star{T2 has quit [Ping timeout: 240 seconds]
mwmnj has joined #ruby
rcosta has joined #ruby
jnix has quit [Remote host closed the connection]
kiri has quit [Quit: Leaving]
elux has joined #ruby
tenner36 has quit [Read error: Connection reset by peer]
tesuji has quit [Read error: Connection reset by peer]
baroquebobcat has joined #ruby
Macaveli has quit [Client Quit]
kaldreno_ is now known as kaldrenon
cody-- has quit [Quit: Computer has gone to sleep.]
hamakn has joined #ruby
mwmnj has quit [Client Quit]
ixti has quit [Quit: WeeChat 0.4.1]
ixti has joined #ruby
ixti has quit [Client Quit]
srji has joined #ruby
smathieu has joined #ruby
ixti has joined #ruby
ixti has quit [Client Quit]
ixti has joined #ruby
ixti has quit [Client Quit]
Rym has quit [Ping timeout: 256 seconds]
soba has joined #ruby
sambao21 has joined #ruby
ixti has joined #ruby
ixti has quit [Client Quit]
ixti has joined #ruby
soba_ has quit [Ping timeout: 240 seconds]
ixti has quit [Client Quit]
Nss has quit [Ping timeout: 248 seconds]
Nss has joined #ruby
smathieu has quit [Ping timeout: 276 seconds]
jibi has quit [Quit: .]
tenner36 has joined #ruby
anay has joined #ruby
girija has quit [Ping timeout: 240 seconds]
Lewix has joined #ruby
Lewix has quit [Changing host]
Lewix has joined #ruby
rrmartins has joined #ruby
pskosinski has joined #ruby
V8Energy has joined #ruby
thepreacher has joined #ruby
shaunbak_ has quit [Remote host closed the connection]
farn has quit [Quit: farn]
Rym has joined #ruby
fourq__ has joined #ruby
fourq__ is now known as lowcard
mrsolo has quit [Quit: This computer has gone to sleep]
Lewix has quit [Ping timeout: 240 seconds]
geekbri_ has quit [Remote host closed the connection]
Astralum has quit [Excess Flood]
geekbri has joined #ruby
ksinkar has quit [Write error: Broken pipe]
ffranz has quit [Excess Flood]
Astralum has joined #ruby
shaunbaker has joined #ruby
ksinkar_ has joined #ruby
Rym_ has joined #ruby
azcodex has joined #ruby
farn has joined #ruby
msuszczy has quit [Quit: leaving]
ffranz has joined #ruby
anay has quit [Remote host closed the connection]
jprovazn has quit [Quit: Odcházím]
io_syl has quit []
rrmartins has quit [Remote host closed the connection]
rodacato has quit [Remote host closed the connection]
wicketn00b has joined #ruby
quoin has quit [Remote host closed the connection]
rodacato has joined #ruby
quoin has joined #ruby
Rym has quit [Ping timeout: 264 seconds]
Rym_ is now known as Rym
quoin has quit [Remote host closed the connection]
srji has quit [Quit: leaving]
Lewix has joined #ruby
vlad_starkov has joined #ruby
blaxter_ has quit [Quit: foo]
quoin has joined #ruby
neonlex has quit [Ping timeout: 245 seconds]
axl_ has quit [Read error: Connection reset by peer]
zarul has joined #ruby
unixninja92 has joined #ruby
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<r0bgleeson>
apeiros: sorry to nuke your twitter feed but that was fun. I agree class_send has a place as much as class_method does, and I would use class_send for a quick-path method call (and indeed, its harmonious with other (*_)send APIs in ruby)
<apeiros>
see my last tweet :-p
vlad_starkov has quit [Remote host closed the connection]
vlad_sta_ has joined #ruby
axl_ has joined #ruby
<Todd>
morning
dhruvasagar has quit [Ping timeout: 264 seconds]
axl_ has left #ruby [#ruby]
thepreacher has quit [Quit: Leaving]
vlad_starkov has joined #ruby
quoin has quit [Ping timeout: 240 seconds]
rcosta has quit [Remote host closed the connection]
mcat1 has joined #ruby
browndawg has joined #ruby
banisterfiend has quit [Quit: Computer has gone to sleep.]
mmozuras has quit [Ping timeout: 264 seconds]
jonathanwallace has joined #ruby
soba has quit [Ping timeout: 245 seconds]
<r0bgleeson>
apeiros: indeed. replied. twitter is a pretty bad medium sometimes for those discussions.
<dagobah>
Is there a nicer way to remove an item from an array by value?
<r0bgleeson>
it looks nice
<apeiros>
dagobah: what's wrong with Array#delete ?
<r0bgleeson>
that's an hour gone to "i wish i didnt have to do self.class.foo(…)"
t0rc has joined #ruby
<dagobah>
Oops :)
huoxito has joined #ruby
rcosta has quit [Remote host closed the connection]
kobain has joined #ruby
<apeiros>
r0bgleeson: yes, 1h I have to work longer now. THANK YOU SIR!
<apeiros>
;-p
soba has joined #ruby
<r0bgleeson>
hehe
iamjarvo has quit [Remote host closed the connection]
cody-- has joined #ruby
iamjarvo has joined #ruby
<apeiros>
gah, I could strangle Kernel#Integer()'s API
soba_ has joined #ruby
<apeiros>
all I want is a sane way to normalize input (from sources I sadly can't control) to give me an integer and raise if it can't be sanely converted (like nil, "foo", 1.42)
hamakn has quit [Ping timeout: 256 seconds]
<apeiros>
*sob*, roll your own it is…
<joonty>
apeiros: you know rubies
<joonty>
maybe you can tell me whether this is a bug in ruby
<workmad3>
Morrolan: oh, I know exactly what I need to install... I've just not been around to install it :)
<Morrolan>
That is... inconvenient. :(
<workmad3>
banisterfiend: coffeescript, and I have that open to read :)
Stygia has quit [Quit: Leaving]
Liquid-- has joined #ruby
iamjarvo_ has quit [Remote host closed the connection]
<banisterfiend>
workmad3 ah :)
lukec has joined #ruby
iamjarvo has joined #ruby
dodosan has joined #ruby
<banisterfiend>
workmad3 i like coffeescript but i'm forever forgetting to use the @ when invoking methods :)
Ox6abe has joined #ruby
rcosta has joined #ruby
travish has joined #ruby
rcosta has quit [Remote host closed the connection]
<workmad3>
banisterfiend: :)
fgo has joined #ruby
DanKnox_away is now known as DanKnox
ldnunes has joined #ruby
<workmad3>
banisterfiend: for some reason, a lot of that discussion just reminds me of old books I've read from around the time of asm to high-level language shifts
DanKnox is now known as DanKnox_away
mklappstuhl has quit [Remote host closed the connection]
<workmad3>
banisterfiend: tbh, the main reason I've used a lot of coffeescript now was really because I had a couple of less experienced devs who knew ruby reasonably well but not really any JS
jbpros has quit [Quit: jbpros]
<workmad3>
banisterfiend: so we decided to use coffeescript on a project in order to give them slightly more familiar turf to play on :)
<banisterfiend>
workmad3 but if it was up to you, you'd still be using js? or you prefer cs now?
anay has quit [Remote host closed the connection]
jefflyne has quit [Quit: WeeChat 0.4.1]
<workmad3>
I do feel more comfortable with CS nowadays, but it's not that much of a shift for me to go either way
<platzhirsch>
I still didn't completely get the hang of prototypes in JS, read the design model several times, CS abstracts it away
<workmad3>
I quite like some of the things the CS compiler gives you automatically... like the (function() {})() wrapper around your source files in the compiled JS
troii has joined #ruby
<troii>
ruby is bad.
rodacato has quit [Remote host closed the connection]
ghr has quit [Quit: Computer has gone to sleep.]
troii has left #ruby [#ruby]
shaunbak_ has quit [Remote host closed the connection]
hasrb has joined #ruby
<banisterfiend>
hehehe "troll" needs to work a little harder to earn the right to use that nick
Al__ has quit [Quit: Al__]
goganchic has quit [Quit: Computer has gone to sleep.]
<platzhirsch>
I feel verbally abused
kaldrenon has quit [Remote host closed the connection]
rodacato has joined #ruby
DrShoggoth has joined #ruby
kaldrenon has joined #ruby
pel_daniel has joined #ruby
xibalba has left #ruby ["Leaving"]
jbpros has joined #ruby
JohnBat26 has quit [Ping timeout: 240 seconds]
fgo has quit [Ping timeout: 276 seconds]
dangerousdave has quit [Read error: Connection reset by peer]
Dave has joined #ruby
travish has left #ruby [#ruby]
<platzhirsch>
ban is t[h]e f[r]iend
Dave is now known as Guest74656
carlyle has quit [Remote host closed the connection]
rrmartins has quit [Remote host closed the connection]
noop has joined #ruby
carlyle has joined #ruby
freerobby has joined #ruby
banisterfiend has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
iamjarvo has quit [Remote host closed the connection]
shadoi has joined #ruby
ferdev has joined #ruby
iamjarvo has joined #ruby
samsagaz has quit [Remote host closed the connection]
girija has left #ruby ["Ex-Chat"]
peregrine81 has quit []
Senjai has quit [Ping timeout: 245 seconds]
randomautomator has quit [Read error: Connection reset by peer]
iamjarvo has quit [Remote host closed the connection]
iamjarvo has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
lukec has joined #ruby
kayloos has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
Eiam has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
diegoviola has joined #ruby
mrsolo has joined #ruby
pzula has joined #ruby
Zai00 has quit [Quit: Zai00]
Monie has joined #ruby
nhhagen_ has joined #ruby
pzula has quit [Quit: WeeChat 0.4.1]
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
Senjai has joined #ruby
Senjai has quit [Changing host]
Senjai has joined #ruby
Criztian has joined #ruby
quoin has joined #ruby
carlyle has quit [Remote host closed the connection]
Eiam has joined #ruby
tjad has joined #ruby
razi has quit [Ping timeout: 276 seconds]
Astralum has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
quoin has quit [Ping timeout: 276 seconds]
rrmartins has joined #ruby
dash_ has quit [Ping timeout: 264 seconds]
c0rn has joined #ruby
c0rn has quit [Client Quit]
jonkri has joined #ruby
eval-in has quit [Remote host closed the connection]
brianpWins has quit [Ping timeout: 276 seconds]
eval-in has joined #ruby
simplyaubs has joined #ruby
jbpros has joined #ruby
hashpuppy has joined #ruby
tkuchiki has quit [Remote host closed the connection]
julweber has joined #ruby
benlieb has joined #ruby
jbpros has quit [Client Quit]
hashpuppy has quit [Client Quit]
dv_ has joined #ruby
dash_ has joined #ruby
huoxito has quit [Ping timeout: 276 seconds]
julweber has quit [Ping timeout: 245 seconds]
bluOxigen has joined #ruby
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rcosta has joined #ruby
travish has joined #ruby
apeiros has quit [Remote host closed the connection]
travish has left #ruby [#ruby]
fgo has joined #ruby
platzhirsch has quit [Ping timeout: 246 seconds]
Criztian has quit [Remote host closed the connection]
Banistergalaxy has quit [Ping timeout: 256 seconds]
burlyscudd1 has joined #ruby
Tomasso has quit []
sambao21 has quit [Quit: Computer has gone to sleep.]
bamdad has joined #ruby
JohnBat26 has joined #ruby
JohnBat26 has quit [Client Quit]
burlyscudd has quit [Ping timeout: 276 seconds]
JohnBat26 has joined #ruby
sambao21 has joined #ruby
Guest74656 has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
fgo has quit [Ping timeout: 240 seconds]
sambao21 has quit [Client Quit]
timonv has joined #ruby
sambao21 has joined #ruby
cads has joined #ruby
ardex4137 has joined #ruby
Ripp__ has joined #ruby
antulik is now known as antulik-afk
vlad_sta_ has quit [Remote host closed the connection]
randomautomator has joined #ruby
azcodex has joined #ruby
wudofyr has quit [Read error: Connection reset by peer]
randomau_ has joined #ruby
alekst has joined #ruby
nomenkun has quit [Remote host closed the connection]
wudofyr has joined #ruby
atno has quit [Ping timeout: 264 seconds]
atno has joined #ruby
ner0x has joined #ruby
rcosta has quit [Remote host closed the connection]
rcosta has joined #ruby
blackmesa has joined #ruby
peregrine81 has joined #ruby
JumpMast3r has quit [Quit: JumpMast3r]
Companion is now known as companion
jp- has quit [Quit: OK, I believe you… but my tommy gun don't]
ccooke has quit [Quit: brb]
sambao21 has quit [Quit: Computer has gone to sleep.]
platzhirsch has joined #ruby
peregrine81 has quit [Client Quit]
rrmartins has quit [Remote host closed the connection]
randomautomator has quit [Ping timeout: 240 seconds]
carlyle has joined #ruby
ccooke has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
Macaveli has joined #ruby
rrmartins has joined #ruby
peregrine81 has joined #ruby
Monie has joined #ruby
Alina-malina has quit [Read error: Connection reset by peer]
mikeg has joined #ruby
askhader has joined #ruby
shunt has quit [Quit: leaving]
<askhader>
I'm running `bundle install` on the newrelic nginx plugin, and I see Fetching source index for http://rubygems.org/ then it hangs for a bit and says "Killed..."
<askhader>
Hwo can I debug this?
<MrZYX>
sounds like the OOM killer
azcodex has quit [Quit: azcodex]
jtgiri_ has quit [Quit: jtgiri_]
jtgiri_ has joined #ruby
buibex has joined #ruby
Alina-malina has joined #ruby
dodosan has joined #ruby
brianpWins has joined #ruby
ccooke has quit [Quit: leaving]
carlyle has quit [Ping timeout: 245 seconds]
drPoggs has joined #ruby
dodosan has quit [Remote host closed the connection]
dodosan has joined #ruby
<atmosx>
OOM Killer
bamdad has quit [Quit: bamdad]
ccooke has joined #ruby
kpshek has quit []
mikeg has quit [Remote host closed the connection]
apeiros has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
Evixion` is now known as Evixion
banisterfiend has quit [Ping timeout: 256 seconds]
kpshek has joined #ruby
huoxito has joined #ruby
akells has quit [Remote host closed the connection]
RichardBaker has quit [Quit: RichardBaker]
sambao21 has joined #ruby
ccooke has quit [Quit: leaving]
akells has joined #ruby
<askhader>
Is the only solution to the OOM killer to free up memory?
Cork has quit [Quit: .]
<MrZYX>
mounting a swap(file) can help but will slow down your system
<Morrolan>
In case#2, as soon as one condition evaluates to true, the following won't get evaluated anymore.
<MrZYX>
Lewix: the second makes clear that it's either the first or the second, in the first case you have to understand the conditions to realize that both cases can't be true at the same time
<MrZYX>
oh and what Morrolan said
<MrZYX>
I still think that making intention clearer is the bigger point here though
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Morrolan>
Sure, that's definitely a big point.
<Lewix>
Morrolan: yes but does it add to the performance of an app
<Morrolan>
But you probably don't want to, for example, hit the database, or a network resource, twice as often as required.
travish has joined #ruby
<Lewix>
ok
<Morrolan>
Come again?
<Lewix>
thanks you just answered
<Morrolan>
Ah, yea. :)
<MrZYX>
oh and also a LOC less :P
chairabanta has joined #ruby
quoin has joined #ruby
travish has left #ruby [#ruby]
azcodex has joined #ruby
<Lewix>
MrZYX: LOC?
<MrZYX>
Line Of Code
mlpinit_ has joined #ruby
Xeago has joined #ruby
<Lewix>
If foo; elsif foo2; end vs if foo;else foo2;end
ryandeussing has joined #ruby
postmodern has joined #ruby
Cork has joined #ruby
<Lewix>
else is not required. What's the preferred method
<MrZYX>
those aren't even doing the same
dash_ has quit [Ping timeout: 248 seconds]
rcosta has quit [Remote host closed the connection]
mlpinit has quit [Read error: Connection reset by peer]
quoin has quit [Ping timeout: 240 seconds]
dash_ has joined #ruby
Spami has joined #ruby
Spami has joined #ruby
Spami has quit [Changing host]
ferdev has quit [Quit: ferdev]
mlpinit has joined #ruby
Alina-malina has quit [Ping timeout: 248 seconds]
mrsolo has quit [Quit: This computer has gone to sleep]
visof has joined #ruby
robert_ has quit [Ping timeout: 240 seconds]
banisterfiend has joined #ruby
mrsolo has joined #ruby
visof has quit [Changing host]
visof has joined #ruby
blueOxigen has joined #ruby
ryandeussing has quit [Ping timeout: 264 seconds]
machuga|away is now known as machuga
adambeynon has quit [Quit: Computer has gone to sleep.]
mlpinit_ has quit [Ping timeout: 240 seconds]
<Lewix>
>> x =1; if x>2; puts "greater than 2"; elsif x<2; puts "less than 2"; end
<moshef>
banisterfiend: you can use redis pub/sub, I've also 'listened' to files to publish updates
ewnd9 has quit [Ping timeout: 240 seconds]
fmcgeough has quit [Quit: fmcgeough]
<moshef>
works perfectly fine locally when running puma, on prod we run with unicorn and nginx and its always dropping the connections, this drives me nuts
khismetix has joined #ruby
reset has quit [Quit: Leaving...]
Uranio has joined #ruby
milardovich has joined #ruby
geekbri has quit [Remote host closed the connection]
Qodosh has joined #ruby
MrThePla_ has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
MrThePlague has quit [Ping timeout: 240 seconds]
JumpMast3r has joined #ruby
machuga is now known as machuga|away
mikepack has joined #ruby
Tricon has joined #ruby
samsden has joined #ruby
havenwood has quit [Remote host closed the connection]
jgx has quit [Quit: Leaving]
MrThePla_ has quit [Remote host closed the connection]
i_s has quit [Remote host closed the connection]
<onewheelskyward>
moshef is it a timeout on the reverse proxy?
smathieu has quit [Remote host closed the connection]
jonahR has quit [Quit: jonahR]
hasrb has quit [Remote host closed the connection]
<moshef>
i can't tell for sure
<moshef>
can't understand from the log
<moshef>
but it works perfectly fine when running with puma
<moshef>
so..
fyz1x has joined #ruby
<onewheelskyward>
Interesting.
<onewheelskyward>
Are you using jruby with puma?
Lewix_ has joined #ruby
smathieu has joined #ruby
Al__ has joined #ruby
sambao21 has joined #ruby
MrThePlague has joined #ruby
devoldmx3 has joined #ruby
benlieb has quit [Quit: benlieb]
jdenen has quit [Quit: Leaving.]
chairabanta has joined #ruby
nhhagen_ has quit [Remote host closed the connection]
nhhagen_ has joined #ruby
simplyaubs has joined #ruby
devoldmx has quit [Ping timeout: 264 seconds]
nwertman_ has joined #ruby
kofno has quit [Ping timeout: 246 seconds]
cong has joined #ruby
yalue has quit [Quit: Leaving]
mityaz has joined #ruby
mityaz has quit [Client Quit]
nhhagen_ has quit [Ping timeout: 240 seconds]
auroraLTP has joined #ruby
hellyeah has quit [Read error: Operation timed out]
devoldmx has joined #ruby
centr0 has joined #ruby
devoldmx3 has quit [Read error: Connection reset by peer]
Uranio has quit [Quit: while you reading this, a kitty dies]
quoin has joined #ruby
robscomputer has quit [Remote host closed the connection]
jtgiri_ has joined #ruby
freerobby1 has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
Macaveli has joined #ruby
dash_ has quit [Quit: dash_]
altamic has joined #ruby
huoxito has joined #ruby
Al__ has quit [Read error: Connection reset by peer]
altamic has quit [Client Quit]
altamic has joined #ruby
Al__ has joined #ruby
<Todd>
oh wow.. you can continuously stack negations in Ruby.. not sure why I didn't realize this before (maybe because it's useless beyond 2 negations
altamic has left #ruby [#ruby]
Xaitec_____ has quit [Remote host closed the connection]
<Todd>
YO DAWG.. puts !!!!(nil.nil?) ? 'true' : 'false'
<cong>
the same with can be done with ++
<Todd>
and I'm obviously done working for the day
<Todd>
you guys have a good weekend
* Todd
packs up
<MrZYX>
! is actually a method call btw ;)
<Todd>
yeah
BlakeRG has left #ruby [#ruby]
quoin has quit [Ping timeout: 264 seconds]
Al__ has quit [Read error: Connection reset by peer]
soba has quit [Ping timeout: 245 seconds]
ner0x has quit [Remote host closed the connection]
Tuxist has quit [Remote host closed the connection]
ColKurtz has joined #ruby
benlieb has quit [Client Quit]
nhhagen_ has joined #ruby
auroraLTP has quit [Quit: ThrashIRC v2.9 sic populo comunicated]
c0rn has quit [Quit: Computer has gone to sleep.]
tonni has quit [Remote host closed the connection]
tonni has joined #ruby
mlpinit has quit [Remote host closed the connection]
Al__ has joined #ruby
auroraLTP has joined #ruby
snovak has quit [Remote host closed the connection]
mwmnj has quit [Ping timeout: 246 seconds]
kaldrenon has quit [Remote host closed the connection]
reset has joined #ruby
kaldrenon has joined #ruby
cads has quit [Ping timeout: 245 seconds]
BullClubMember has joined #ruby
rcedillor has left #ruby [#ruby]
elux has quit [Quit: Leaving...]
<pontiki>
wth is the matter with you all?
<apeiros>
it's friday
<onewheelskyward>
apeiros: win!
<pontiki>
hee
TIJ has joined #ruby
<apeiros>
not that mattered much. will go to work tomorrow anyway, *sob*
ffranz has quit [Quit: Leaving]
kaldrenon has quit [Ping timeout: 264 seconds]
<pontiki>
:(
sirupsen has joined #ruby
<pontiki>
but then you can think of add permuations of punctuation that are valid ruby
sirupsen has quit [Client Quit]
<pontiki>
odd*
gusnasis has quit [Ping timeout: 276 seconds]
milardovich has quit [Quit: Leaving]
nhhagen_ has quit [Ping timeout: 264 seconds]
<apeiros>
no. I'll think about how to automate tests with data coming from excel, going over a legacy system, being ETL'ed into the current system, throwing them over 2 job queue servers, pushing them into a foreign external system and generate an excel report back out of it
akells has quit [Remote host closed the connection]
<apeiros>
oh, and the test data comes from the small set of 6 different files, covers some 2 dozen tables, involves about 10 models. all of that stuff is new (including the job queue servers). mighty fun.
Quashie_ has quit [Ping timeout: 248 seconds]
* apeiros
loves stitching stuff with the proverbial hot needle
* apeiros
just hates the mess it creates and that it'll most likely be him who has to clean up too =(
cads has joined #ruby
mercwithamouth has quit [Ping timeout: 240 seconds]
pentameter has quit [Remote host closed the connection]
Zolo has joined #ruby
<apeiros>
and you don't want to know how little time I had (and have) to do all that stuff, *sob*
s0ny123 has quit [Quit: Lost terminal]
shredding has joined #ruby
<apeiros>
</rant>
shredding has quit [Client Quit]
freerobby has quit [Quit: Leaving.]
auroraLTP has quit [Quit: ThrashIRC v2.9 sic populo comunicated]
enebo has quit [Ping timeout: 246 seconds]
auroraLTP has joined #ruby
auroraLTP has quit [Client Quit]
bean__ has quit [Quit: Computer has gone to sleep.]
kpshek has quit []
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Morrolan>
Excel test data, excel reports? Welp. Where do those requirements come from?
<apeiros>
Morrolan: non-programmers supply test data, non-programmers read it
bluenemo has quit [Read error: Connection reset by peer]
<jtgiri_>
hello, i am having some issues with key method for hash, it doesn't seem to work if array has multiple values, here is the https://gist.github.com/anonymous/3789188a6185864f3a98 , any ideas why this is happening?
Notte has joined #ruby
<Morrolan>
Well, yes.
<Morrolan>
What did you expect to happen? The associated value of 'First-One' is '["vol-e9ec0c98", "vol-e69499a6"]'
<Morrolan>
And ["vol-e9ec0c98", "vol-e69499a6"] != ["vol-e9ec0c98"]
snovak has joined #ruby
<jtgiri_>
i see , okay thanks
Nisstyre-laptop has joined #ruby
iamjarvo has quit [Remote host closed the connection]
iamjarvo has joined #ruby
brianpWins has joined #ruby
dagnachew has joined #ruby
<Morrolan>
`b.keys.select { |key| b[key].include? "vol-e9ec0c98" }` would return you an array of all keys where 'vol-39...' is part of the value. It'll kind of blow up if the value doesn't respond to #include?, though.
snath has joined #ruby
<Morrolan>
But there's probably a better way to do what you want.
BillCriswell has quit [Remote host closed the connection]
TorrentScan has joined #ruby
<apeiros>
it's rather purpose-defeating to search a hash by value
iliketur_ has quit [Quit: zzzzz…..]
sarlalian has joined #ruby
iamjarvo has quit [Ping timeout: 240 seconds]
akells has quit [Remote host closed the connection]
jonathanwallace has joined #ruby
codecop has quit [Quit: Išeinu]
snovak has quit [Ping timeout: 260 seconds]
parzo has quit [Ping timeout: 240 seconds]
<jtgiri_>
Morrolan: thanks i will iterate through
auroraLTP has joined #ruby
auroraLTP has quit [Client Quit]
<Morrolan>
Out of curiosity, what are you working on? :)
sambao21 has quit [Quit: Computer has gone to sleep.]
<BraddPitt>
ty sir
kirun has quit [Quit: Client exiting]
<platzhirsch1>
BraddPitt: pitfall, for instance x = false or true evaluates to true, but x will have the value false
iamjarvo has quit [Remote host closed the connection]
iamjarvo has joined #ruby
jerius has quit [Read error: Operation timed out]
benlieb has joined #ruby
TorrentScan has joined #ruby
gusnasis has joined #ruby
<apeiros>
platzhirsch1: didn't you fall into that pit? :)
benlieb has quit [Client Quit]
<platzhirsch1>
apeiros: omg, why on earth do you remember that ? :P
benlieb has joined #ruby
<apeiros>
awesome memory
mercwithamouth has quit [Ping timeout: 264 seconds]
platzhirsch1 is now known as platzhirsch
<apeiros>
sadly not eidetic
TorrentScan has quit [Client Quit]
devoldmx3 has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
mrsolo has joined #ruby
iamjarvo has quit [Ping timeout: 260 seconds]
MrThePlague has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
mmitchell has quit [Remote host closed the connection]
osvico has joined #ruby
gusnasis has quit [Ping timeout: 245 seconds]
devoldmx has joined #ruby
RORgasm has quit [Remote host closed the connection]
<atmosx>
modifier-until?
apeiros has quit [Remote host closed the connection]
i_s has joined #ruby
<atmosx>
ah got there's an example
apeiros has joined #ruby
mercwithamouth has joined #ruby
peregrine81 has joined #ruby
<badquanta>
I'm trying to figure out how to 'attach_function' a variable length argument function with FFI. Any pointers? My searching hasn't uncovered the topic yet.
i_s has quit [Remote host closed the connection]
devoldmx3 has quit [Ping timeout: 264 seconds]
devoldmx27 has joined #ruby
RORgasm has joined #ruby
i_s has joined #ruby
Collin has joined #ruby
JumpMast3r has quit [Quit: JumpMast3r]
<Collin>
http://codepad.org/zlxVCXNe Does anyone have any idea what's wrong with my native extension? It compiles into 'rflac.so', then I run irb and type "require './rflac.so'", which returns true, but it says that rflac is undefined
devoldmx has quit [Read error: Connection reset by peer]
<workmad3>
Collin: also, ruby does have a Boolean type
<workmad3>
Collin: and true/false values
freerobby has quit [Quit: Leaving.]
<Collin>
Native extensions might not support it, I guess
<volty>
RubyPanther: maybe i didn't get what were you saying ?
<Collin>
It seems the correct way to check if a parameter is true is RTEST(value)
<RubyPanther>
volty: I can't really parse that into a question about what I said
<workmad3>
Collin: well, C didn't have a standard 'bool' until C99, iirc :)
<banisterfiend>
RubyPanther what are you doing with yourself these days?
<Collin>
Good point
<volty>
RubyPanther: ah! Ok, i cannot join that
mansi has quit [Ping timeout: 268 seconds]
<RubyPanther>
normally there is a line in the gemspec that says something like s.extensions << 'ext/dec_number/extconf.rb' and that is why the extension gets loaded when you do like require 'mygem'
nanoxd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<RubyPanther>
but if you're loading it by hand you have to do load() not require()
scrogson has left #ruby ["Auf Wiedersehen"]
<jrobeson>
there are more than a few option parser libraries out there.. anybody have a favorite?
<jrobeson>
cli option *
Ox6abe has joined #ruby
<volty>
RubyPanther: ah - with gems // anyway i'll make sure that ruby loads both when i recompile my old extensions ...
<RubyPanther>
jrobeson: optparse
<jrobeson>
there's also a whole wrapper for the interface like thor? i haven't really heard of it for many years.. so not sure if people really use it other than rails
<RubyPanther>
jrobeson: the typical best practice is not to add dependencies unless there is a good reason
<volty>
I'm fine with optparse
<r0bgleeson>
jrobeson: slop is good
<jrobeson>
slop hehe
<jrobeson>
search google for.. ruby slop :)
<jrobeson>
hehe
<r0bgleeson>
github.com/injekt/slop
<jrobeson>
yeah i found it.. i just found the idea funny
<r0bgleeson>
yeah
<r0bgleeson>
he has a history of bad project names
<r0bgleeson>
cinch was one
<dominikh>
a mistake I inherited.
<jrobeson>
RubyPanther, i did want something that handles the banner stuff and formatting that.. i really don't care for implementing it myself
<jrobeson>
so.. slop seems like it does that
MiguelGD has joined #ruby
<jrobeson>
r0bgleeson, yeah we use cinch in #reddit-portland
<jrobeson>
a cinch bot..
tatsuya_o has quit [Remote host closed the connection]
<r0bgleeson>
jrobeson: i think it's going to be re-released in Go
benlieb has quit [Quit: benlieb]
<r0bgleeson>
and abandoned
<RubyPanther>
optparse gives you a free banner in opts.to_s
<dominikh>
RubyPanther:
RichardBaker has quit [Quit: RichardBaker]
<dominikh>
eh, sorry, wrong key
<dominikh>
r0bgleeson: what is?
<r0bgleeson>
cinch
workmad3 is now known as wm3|zzz
<dominikh>
r0bgleeson: a) I have no intentions to release Cinch in Go b) Cinch in Ruby is not abandoned.
<banisterfiend>
dominikh i heard that too, about the Go rewrite
agjacome has joined #ruby
<r0bgleeson>
dominikh: it was a joke ;)
<dominikh>
well, a bad one if I might say :P
flarerine is now known as octarine
Guest39823 has quit [Ping timeout: 245 seconds]
<r0bgleeson>
so you havent given up on ruby?
snovak has joined #ruby
agjacome has quit [Client Quit]
<dominikh>
oh, I absolutely have
<dominikh>
but I maintain and manage Cinch still
<r0bgleeson>
why? =)
<dominikh>
which part
rads has quit [Quit: rads]
<r0bgleeson>
why maintain and manage cinch if you have given up on ruby
benlieb has joined #ruby
<dominikh>
because people still use it?
bio has joined #ruby
bio is now known as Guest24358
<r0bgleeson>
thats a good reason i guess
<r0bgleeson>
normally open source is for projects you have fun with
<dominikh>
maintaining means fixing bugs, and managing means talking to people who want to add features
<r0bgleeson>
if youre not enjoying it anymore or the language is boring..
tomzx_mac has joined #ruby
<r0bgleeson>
fair enough
<dominikh>
meh, I can have fun with code without open sourcing it. if I open source something and invite people to use it, I have some sort of responsibility :)
<dominikh>
*cough* just like the article I should've published 14 hours ago
<r0bgleeson>
but thats open source, if the maintainer doesn't have the will or energy to innovate and produce new ideas, people who use it can, and if they dont, they'll create something else
<r0bgleeson>
i wouldnt feel obligated
<dominikh>
less obligation than good manners, I guess.
<r0bgleeson>
what are you creating in go?
<dominikh>
nothing in particular (apart from an XMPP library). more involved in the community I guess
<r0bgleeson>
is there much of a ecosystem for code sharing?
bookmage has quit [Remote host closed the connection]
xk_id has joined #ruby
<banisterfiend>
dominikh have you looked at haskell?
<dominikh>
banisterfiend: briefly.
<banisterfiend>
It's even cooler than Go, IMO. You feel like you're actually doing computer science programming in it, rather than just clusterfucking things together until they work
<dominikh>
r0bgleeson: in a way, yes, in a way, no. there's no centralized system like rubygems, but a centralized system like rubydoc with a listing of projects. it's more word of mouth for libraries
<dominikh>
banisterfiend: I prefer getting things done over "computer science" which means just twisting your brain until you understand monads and found some way to express your thought as a long chain of pure function calls ;)
<dominikh>
right now I have less interest in innovation than I have in practicality.
<banisterfiend>
dominikh if you can do both at the time it's even better (getting things done + doing it elegantly with functional purity)
<banisterfiend>
nd monads aren't that hard
jonahR has joined #ruby
<dominikh>
nevertheless, not my thing :)
<banisterfiend>
they're haskell 101, haskell gets interesting when you learn about arrows and comonads, and so on
<dominikh>
in the meantime I learned a different language in an evening and just do stuff ;)
Ox6abe has quit [Remote host closed the connection]
Guest24358 has quit [Ping timeout: 264 seconds]
<r0bgleeson>
you learnt go in a night?
<dominikh>
r0bgleeson: 90% of it can be learned by reading, in a day. the rest is learnt by writing her first 1-3 projects.
<dominikh>
*your
<r0bgleeson>
who is this she you speak of
<banisterfiend>
his programming muse
<r0bgleeson>
i heard the Go spec was what people read to learn it
<dominikh>
it's part of it, yes. together with the interactive tour for an introduction and "effective go" that's a high level approach to teaching idioms and mechanics
<r0bgleeson>
ive got nothing but +1 for go from the people ive talked to who learnt it
<dominikh>
for people coming from C-like languages, there are probably two major concepts to study, for Ruby/Python/etc it's probably three or four
<r0bgleeson>
what are those concepts?
rcosta_ has quit [Read error: Connection reset by peer]
Lewix_ has quit [Remote host closed the connection]
simplyaubs has quit [Quit: simplyaubs]
bio- has joined #ruby
<dominikh>
Go's take at CSP and concurrency; structural programming with interfaces, being closer to memory and the system, less magic and less hidden costs but instead more explicit code
<banisterfiend>
dominikh you mean CPS ?
zeade has quit [Quit: Leaving.]
<banisterfiend>
oh no, CSP
mrsolo has joined #ruby
predator217 has quit [Ping timeout: 246 seconds]
TIJ has quit [Read error: Connection reset by peer]
qhartman has quit [Quit: Ex-Chat]
TIJ has joined #ruby
shtirlic_ has joined #ruby
shtirlic_ has quit [Remote host closed the connection]
shtirlic_ has joined #ruby
shtirlic_ has quit [Client Quit]
<banisterfiend>
dominikh does go also have STM ?
<dominikh>
banisterfiend: no.
hackerpreneur has quit [Ping timeout: 268 seconds]
<banisterfiend>
STM seems to be the approach that clojure/scala/haskell are emphasizing
<dominikh>
yup
m8 has quit [Quit: Sto andando via]
lfox has quit [Quit: ZZZzzz…]
ehc has quit [Quit: ehc]
<banisterfiend>
even though (afaict) many of them support go-style concurrency
predator117 has joined #ruby
chairabanta has joined #ruby
<dominikh>
clojure recently copied Go's way, yes
<dominikh>
not sure about the others
<banisterfiend>
dominikh do you know whether web-workers were also influenced?
<banisterfiend>
it seems kind of similar
bio- has quit [Ping timeout: 245 seconds]
<dominikh>
pretty sure web workers are more driven by the callback stuff JS had going on for a long time ;)
bio- has joined #ruby
samsden has joined #ruby
<banisterfiend>
well, you create a worker, and then you can only communicate with it via message passing down a channel
<Eiam>
banisterfiend: adding pry-rescue & pry-stackexplorer & pry-byebug seems to have regressed my pry experience
<banisterfiend>
Eiam why fren
shtirlic has joined #ruby
alekst has quit [Quit: Leaving...]
<banisterfiend>
Eiam what's happening?
<Eiam>
ran into https://github.com/pry/pry/issues/694 ,uninstalled the pry-nav gem (even though its not in my gem file so not sure why its being loaded )
shtirlic has quit [Client Quit]
tricon_ has joined #ruby
<Eiam>
ffuuccck
julian-delphiki has quit [Quit: Leaving]
<Eiam>
and now non stop redis timeouts grr
<Eiam>
that can't possibly be related
quoin has joined #ruby
<banisterfiend>
Eiam what other pry plugins do u have installed?
<Eiam>
going to blow away my VM & recreate it this is bullshit
<Eiam>
pry --installed-plugins says
<Eiam>
byebug, rescue, stack_explorer
<banisterfiend>
Eiam weird, they should be fine together
iliketur_ has joined #ruby
<Eiam>
going to vagrant provision and recreate the world & try it again
<Eiam>
then start removing stuff i added
<Eiam>
word I hear ya, I was super excited to wire up pry-rescue
<Eiam>
I setup Padrino.use PryRescue::Rack
dagnachew has quit [Quit: Leaving]
IanV_ has joined #ruby
Tricon has quit [Ping timeout: 240 seconds]
bio- has quit [Ping timeout: 264 seconds]
Cyrus has joined #ruby
JumpMast3r has joined #ruby
<Eiam>
I'll log an issue if removing it ends up fixing the issue.. for now I just uninstalled the pry-nav gem