apeiros changed the topic of #ruby-lang to: Nick registration required to talk || Ruby 2.0.0-p247: http://ruby-lang.org (Ruby 1.9.3-p448) || Paste >3 lines of text on http://gist.github.com
Forgetful_Lion has quit [Read error: Connection reset by peer]
grough has quit []
stamina has quit [Ping timeout: 240 seconds]
kith has quit [Ping timeout: 248 seconds]
kith has joined #ruby-lang
nathanstitt has joined #ruby-lang
Coincidental has quit [Remote host closed the connection]
Coincidental has joined #ruby-lang
datanoise has quit [Ping timeout: 248 seconds]
Coincidental has quit [Ping timeout: 240 seconds]
mdedetrich has quit [Quit: Computer has gone to sleep.]
jbsan has quit [Quit: JB.. OUT!]
io_syl has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
kek has joined #ruby-lang
bzalasky has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
bzalasky_ has joined #ruby-lang
bzalasky has quit [Ping timeout: 245 seconds]
kek has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
datanoise has joined #ruby-lang
D9_ has quit [Ping timeout: 240 seconds]
D9_ has joined #ruby-lang
imperator has quit [Quit: Valete!]
jeff_r has quit [Remote host closed the connection]
saarinen has quit [Quit: saarinen]
fuhgeddaboudit has quit [Ping timeout: 252 seconds]
Coincide_ has joined #ruby-lang
<zzak>
:(
hogeo has joined #ruby-lang
<zzak>
i am morning of first day :(
bzalasky_ has quit [Remote host closed the connection]
bzalasky has joined #ruby-lang
bzalasky has quit [Ping timeout: 245 seconds]
<zenspider>
zzak: means you get it over with and can enjoy the rest of the conf instead of fretting the whole time
edwardog has joined #ruby-lang
<edwardog>
Has anyone played with DBM much?
ssb123 has quit [Remote host closed the connection]
ssb123 has joined #ruby-lang
ssb123 has quit [Read error: Connection reset by peer]
ssb123 has joined #ruby-lang
bzalasky has joined #ruby-lang
<zenspider>
edwardog: the low level db?
<edwardog>
zenspider: yes – I was looking for a key/value store and saw that it was in the standard lib
mdedetrich has joined #ruby-lang
julweber has quit [Remote host closed the connection]
bastilian_ has joined #ruby-lang
bastilian has quit [Read error: Connection reset by peer]
bastilian_ has quit [Read error: Connection reset by peer]
bastilian has joined #ruby-lang
iliketurtles has quit [Quit: zzzzz…..]
tkuchiki has joined #ruby-lang
eponymi has joined #ruby-lang
shinnya has quit [Ping timeout: 248 seconds]
hhatch has quit [Read error: Operation timed out]
imperator has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
fenicks has quit [Remote host closed the connection]
Senjai has joined #ruby-lang
Senjai has quit [Changing host]
Senjai has joined #ruby-lang
iliketurtles has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
dhruvasagar has joined #ruby-lang
lfox has joined #ruby-lang
Senjai has quit [Ping timeout: 245 seconds]
lfox has quit [Client Quit]
jeff_r has joined #ruby-lang
fijimunkii has joined #ruby-lang
bantic has joined #ruby-lang
Oloryn_lt2 has joined #ruby-lang
edwardog has quit [Quit: edwardog]
fijimunkii has quit [Ping timeout: 240 seconds]
methods has joined #ruby-lang
methods has left #ruby-lang [#ruby-lang]
bzalasky has quit [Remote host closed the connection]
bzalasky has joined #ruby-lang
fuhgeddaboudit has joined #ruby-lang
bzalasky has quit [Ping timeout: 256 seconds]
hahuang61 has quit [Ping timeout: 240 seconds]
spuk has quit [Ping timeout: 260 seconds]
iliketurtles has quit [Quit: zzzzz…..]
spuk has joined #ruby-lang
ledestin has joined #ruby-lang
lsegal has quit [Read error: Connection reset by peer]
lsegal has joined #ruby-lang
cjs226 has joined #ruby-lang
mannyt has quit [Ping timeout: 245 seconds]
lsegal` has joined #ruby-lang
mannyt has joined #ruby-lang
vbatts1 has left #ruby-lang [#ruby-lang]
lsegal has quit [Read error: Connection reset by peer]
bastilian has quit [Read error: Connection reset by peer]
vbatts has joined #ruby-lang
<onewheelskyward>
I use sqlite for that kind of stuff.
bastilian has joined #ruby-lang
mannyt has quit [Client Quit]
nofxx has quit [Read error: Connection reset by peer]
nofxx1 has joined #ruby-lang
ledestin has quit [Ping timeout: 256 seconds]
Domon has joined #ruby-lang
Coincide_ has quit [Remote host closed the connection]
Coincidental has joined #ruby-lang
Domon has quit [Remote host closed the connection]
Domon has joined #ruby-lang
Domon__ has joined #ruby-lang
Domon has quit [Read error: Connection reset by peer]
Coincidental has quit [Ping timeout: 248 seconds]
<zzak>
zenspider: :(
D9_ has quit [Quit: Leaving]
bantic has quit [Quit: bantic]
woollyams has quit [Ping timeout: 252 seconds]
ledestin has joined #ruby-lang
havenwood has joined #ruby-lang
fuhgeddaboudit has quit [Ping timeout: 252 seconds]
grough has joined #ruby-lang
havenwood has quit [Ping timeout: 246 seconds]
mmorga has joined #ruby-lang
Oloryn_lt2 has quit [Read error: Connection timed out]
<imperator>
"cannot compute size of (long long)" - crap
grough has quit []
diegoviola has joined #ruby-lang
captain_chen has joined #ruby-lang
kgrz has joined #ruby-lang
* imperator
slaps -m64 everywhere
havenwood has joined #ruby-lang
iliketurtles has joined #ruby-lang
kurko_ has quit [Quit: Computer has gone to sleep.]
<imperator>
no joy
nofxx1 has quit [Read error: Connection reset by peer]
nofxx has joined #ruby-lang
havenwood has quit [Ping timeout: 240 seconds]
<captain_chen>
What's the policy on asking help on assignments?
jonathanmarvens has joined #ruby-lang
<captain_chen>
I just need a push in the right direction through some examples.
nisstyre has joined #ruby-lang
_jpb_ has quit [Ping timeout: 256 seconds]
<imperator>
it's fine as long as you tell us it's an assignment
<imperator>
so we know not to give you a direct answer :)
<imperator>
what's the assignment?
<captain_chen>
Okay.
<captain_chen>
My question is: How would I create an inverted index from reading a document formatted in a certain way?
<captain_chen>
My idea was to slurp the entire file, then use String.scan(/regex/) to grab the terms I needed in order to tokenize them to be placed later into a hash. Is my reasoning any good?
<captain_chen>
The only issue is that it will grab a whole sentence instead of just singular words which I need to work with.
bantic has joined #ruby-lang
fuhgeddaboudit has joined #ruby-lang
bantic has quit [Client Quit]
mucker has joined #ruby-lang
<imperator>
seems like a reasonable approach
<imperator>
but, let's think about this
<imperator>
you need scan strings
<imperator>
how would you go about getting strings, say, line by line from a file?
roadt_ has joined #ruby-lang
mmorga has quit [Remote host closed the connection]
<captain_chen>
Would it be better to do: File.read(file).each
<captain_chen>
Then pass it to a block?
mannyt has joined #ruby-lang
<imperator>
try that, see if it fits with what you're trying to do, and is easier than slurping the whole file all at once
<imperator>
and with that, i must be going
<imperator>
hopefully that gets you started
<captain_chen>
Ha, alright thanks.
imperator has left #ruby-lang ["Leaving"]
grahamsavage has joined #ruby-lang
<grahamsavage>
is there a never ending loop in ruby?
<grahamsavage>
i.e loop { break if bla } something like that
<grahamsavage>
i know i could do while true do end
<grahamsavage>
but hmm
nathanstitt has quit [Quit: I growing sleepy]
postmodern has quit [Quit: Leaving]
jonahR has joined #ruby-lang
fijimunkii has joined #ruby-lang
<captain_chen>
Yeah.
hahuang61 has joined #ruby-lang
nathanstitt has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 245 seconds]
jonathanmarvens has quit [Remote host closed the connection]
jonathanmarvens has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
vxxr has joined #ruby-lang
roadt_ has quit [Ping timeout: 245 seconds]
jonathanmarvens has quit [Ping timeout: 240 seconds]
jeff_r has quit [Remote host closed the connection]
sevvie has quit [Ping timeout: 245 seconds]
havenwood has joined #ruby-lang
havenwood has quit [Ping timeout: 264 seconds]
sevvie has joined #ruby-lang
sevvie has quit [Ping timeout: 256 seconds]
vxxr has quit [Quit: leaving]
sevvie has joined #ruby-lang
postmodern has joined #ruby-lang
<captain_chen>
Anyone good with reading text from files using regex?
brianpWins has joined #ruby-lang
kgrz has quit [Remote host closed the connection]
captain_chen has quit [Quit: Page closed]
ldnunes has quit [Quit: Leaving]
Oak has joined #ruby-lang
Oak has quit [Changing host]
Oak has joined #ruby-lang
jithu has joined #ruby-lang
soba has joined #ruby-lang
mucker has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
nofxx has quit [Remote host closed the connection]
lsegal` has quit [Read error: Connection reset by peer]
lsegal has joined #ruby-lang
havenwood has quit [Ping timeout: 264 seconds]
Domon__ has quit [Remote host closed the connection]
Domon has joined #ruby-lang
tomzx_mac has quit [Ping timeout: 246 seconds]
mannyt has quit [Quit: mannyt]
dhruvasagar has joined #ruby-lang
nofxx has joined #ruby-lang
bzalasky has joined #ruby-lang
Domon has quit [Ping timeout: 264 seconds]
julweber has joined #ruby-lang
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby-lang
jithu has quit [Quit: Mother, did it need to be so high?]
julweber has quit [Ping timeout: 240 seconds]
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby-lang
diegoviola has quit [Read error: No route to host]
tenderlove has joined #ruby-lang
tenderlove has quit [Client Quit]
robbyoconnor has joined #ruby-lang
krz has joined #ruby-lang
ssb123 has quit [Remote host closed the connection]
<canton7>
Lennier, "#{title} by #{author}", not "#{@title} by #{@author}"
<canton7>
you're created the local variable 'title', then you're throwing it away and using the original @title after all
yalue has joined #ruby-lang
<Lennier>
canton7, that's great, thank you very much!
<Lennier>
yes, i see now :)
<canton7>
Lennier, to be honest, I'd make sure @title is always of type Title. So in your constructor, check whether it's a string, and if so convert it to a Title
roadt_ has joined #ruby-lang
fijimunkii has joined #ruby-lang
symm- has joined #ruby-lang
<Lennier>
canton7, how can i convert a string to an Title object?
<Lennier>
you mean with title = Title.new(...)
<canton7>
Lennier, no idea. You're the one who owns the Title class
<yorickpeterse>
Hm, doesn't seem to be a way to hack it in either
<yorickpeterse>
you can use a Rakefile instead but then you have to specify all the ldflags and what not manually I believe
<superdealloc>
That's not gonna happen.
<superdealloc>
I might just ship this with a patched mkmf.rb, done right :-(
<superdealloc>
or just rename shit
<superdealloc>
dammit
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ruby-lang783 has joined #ruby-lang
enebo has joined #ruby-lang
jiuweigui has joined #ruby-lang
charliesome has joined #ruby-lang
jithu has quit [Quit: Mother, did it need to be so high?]
<jds>
Anyone familiar with DelayedJob? I'm faking recurring jobs using something like this - https://gist.github.com/jdelStrother/6811170 - which has worked fine for months. Last night it started replicating itself and I ended up with several thousand copies of the job in my database. I'm struggling to see how it might happen - anyone spot what I'm missing?
sevvie has quit [Read error: No route to host]
GeissT has quit [Quit: MillBroChat AdIRC User]
julweber has joined #ruby-lang
hogeo has quit [Remote host closed the connection]
hogeo has joined #ruby-lang
ruby-lang783 has quit [Ping timeout: 250 seconds]
hogeo has quit [Ping timeout: 252 seconds]
io_syl has joined #ruby-lang
tubbo has joined #ruby-lang
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<superdealloc>
Can I submit a patch for this or does anyone object to mkmf look for sourcefiles recursively?
tkuchiki has joined #ruby-lang
julweber has quit [Remote host closed the connection]
TCMSLP has quit [Quit: leaving]
nisstyre has quit [Quit: Leaving]
dhruvasagar has quit [Ping timeout: 264 seconds]
<yorickpeterse>
superdealloc: probably, though I believe mkmf is unmaintained at this point
<yorickpeterse>
and for good reasons I suppose
<superdealloc>
What's the alternative?
<yorickpeterse>
you might be able to do a find-replace on the generated Makefile, but that's also a bit of a hack
ec2-user_ has joined #ruby-lang
<yorickpeterse>
can you not just slap an include in some header file that is included?
<yorickpeterse>
or will it then complain that it can't find the files?
wallerdev has joined #ruby-lang
<superdealloc>
It will have the forward declarations, but not the symbols.
ec2-user_ has quit [Client Quit]
<superdealloc>
So when it's time to actually call the methods, it will throw up in your face.
nashrm` has joined #ruby-lang
bzalasky has joined #ruby-lang
<yorickpeterse>
hm
ec2-user_ has joined #ruby-lang
<yorickpeterse>
also, does somebody remember that option to tell RubyGems to *not* generate those bloody absolute file paths for binaries?
<yorickpeterse>
I just want #!/usr/bin/env foo instead of #!/home/yorickpeterse/blablabla/bin/foo
ec2-user_ has left #ruby-lang [#ruby-lang]
julweber has joined #ruby-lang
julweber has quit [Remote host closed the connection]
vmoravec_ has quit [Quit: Leaving]
hhatch has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
lfox has quit [Quit: ZZZzzz…]
havenwood has joined #ruby-lang
<yorickpeterse>
hm, found it
<yorickpeterse>
--env-shebang
scampbell has quit [Quit: Leaving]
malev has joined #ruby-lang
havenwood has quit [Ping timeout: 245 seconds]
bzalasky has quit [Remote host closed the connection]
ssb123 has joined #ruby-lang
bzalasky has joined #ruby-lang
salami has joined #ruby-lang
bzalasky has quit [Ping timeout: 256 seconds]
salami has quit [Read error: Connection reset by peer]
kireevco has joined #ruby-lang
Oloryn_lt2 has quit [Read error: Connection reset by peer]
shinnya has joined #ruby-lang
ledestin has quit [Quit: ledestin]
kek has quit [Remote host closed the connection]
mistym has joined #ruby-lang
ecnalyr has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
sevvie has joined #ruby-lang
schaerli has quit [Remote host closed the connection]
pellenation has joined #ruby-lang
schaerli has joined #ruby-lang
havenwood has joined #ruby-lang
cads has quit [Read error: Operation timed out]
peterc has quit [Ping timeout: 252 seconds]
schaerli has quit [Remote host closed the connection]
ikrima has quit [Ping timeout: 256 seconds]
ikrima has joined #ruby-lang
lfox has joined #ruby-lang
bzalasky has joined #ruby-lang
dagobah has quit [Remote host closed the connection]
io_syl has quit []
bzalasky has quit [Remote host closed the connection]
bzalasky has joined #ruby-lang
kgrz has quit [Remote host closed the connection]
kgrz has joined #ruby-lang
jeff_r has quit [Remote host closed the connection]
jonathanmarvens has quit [Remote host closed the connection]
MTen has quit [Ping timeout: 264 seconds]
bzalasky has quit [Ping timeout: 248 seconds]
rippa has joined #ruby-lang
kgrz has quit [Ping timeout: 248 seconds]
<ecnalyr>
I have a hash that looks like this: {"user_id"=>["", "9", "10", "11"]} and I need to iterate through the numbers and do something with them. I'm currently doing this: HASH.first.second.reject(&:empty?).map{ |r| User.find(r) } but this looks dumb. I feel dumb right now - what's a more concise way to do what I'm doing?
jonathanmarvens has joined #ruby-lang
mucker has quit [Remote host closed the connection]
pabs has quit [Quit: leaving]
<dr_bob>
ecnalyr, I would start by placing numbers in the Hash and not String instances.
<dr_bob>
HASH.first is not robust if Hash contents may change. Better do HASH["user_id"]...
<ecnalyr>
dr_bob, they're being returned to me from via a form I don't have much control over
<ecnalyr>
they = the hash
kek has joined #ruby-lang
<ecnalyr>
dr_bob that's a good point
pellenation has quit [Quit: Leaving.]
<ecnalyr>
dr_bob I can do that and drop the .first.second nonsense- already much cleaner
peterc has quit [Read error: Connection reset by peer]
Kabaka has joined #ruby-lang
<dr_bob>
dernise, you can improve one thing: you don't need the "unless"
<dr_bob>
You can use negative lookbehind
<dr_bob>
grr
<dr_bob>
%r{(?<!Swap)Cached}
<dr_bob>
And I would use Float instead of #to_f
Coincidental has joined #ruby-lang
tubbo has joined #ruby-lang
<dr_bob>
because Float will raise an exception if the String is not a float.
<dernise>
dr_bob: Ok. Didn't know that exist.
<dernise>
Trying it right now.
symm- has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
supergeek has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 240 seconds]
<dr_bob>
I'd also put the conversion to float where you read values - not in the formula at the end. Basically that's what you want: float values from /proc/meminfo
lfox has quit [Ping timeout: 240 seconds]
MaddinXx_ has quit [Remote host closed the connection]
supergeek has quit [Quit: Leaving]
<imperator>
is there a way within ruby to check to see if the underlying OS is 32 or 64 bit?
<imperator>
not ruby itself
iliketurtles has quit [Quit: zzzzz…..]
<cout>
yes
<yorickpeterse>
imperator: RbConfig::CONFIG['arch'] might be useful
<nofxx>
apeiros: not true when gaming. Better: 7% of your animal brain, even when gaming! ;)
<eam>
will require two SIGTERMs to terminate, the first seems to deadlock in the TERM handler
<eam>
this does not: ruby -e'puts $$; f = IO.popen("sleep 60"); f.read'
robbyoconnor has joined #ruby-lang
<eam>
am I misunderstanding the expected behavior, or is this a bug?
dernise__ has joined #ruby-lang
dernise_ has quit [Read error: Operation timed out]
iliketurtles has joined #ruby-lang
intellitech has quit [Quit: intellitech]
kek has joined #ruby-lang
<apeiros>
nofxx: if you'd game 100% of all the time
yalue has quit [Quit: Leaving]
pellenation has joined #ruby-lang
Elinos has joined #ruby-lang
MaddinXx has joined #ruby-lang
Paradox has joined #ruby-lang
tubbo has quit [Ping timeout: 248 seconds]
tubbo has joined #ruby-lang
xrq` is now known as xrq
robbyoconnor has quit [Ping timeout: 248 seconds]
alekst has joined #ruby-lang
mbj has joined #ruby-lang
robbyoconnor has joined #ruby-lang
kek has quit [Remote host closed the connection]
kek has joined #ruby-lang
schaerli has quit [Remote host closed the connection]
schaerli has joined #ruby-lang
ikrima has quit [Quit: Computer has gone to sleep.]
schaerli has quit [Remote host closed the connection]
schaerli has joined #ruby-lang
schaerli has quit [Remote host closed the connection]
schaerli has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 252 seconds]
kgrz has quit [Remote host closed the connection]
kgrz has joined #ruby-lang
<yorickpeterse>
News article: our national intelligence agency should get more E-freedom so it can perform surveillance, not to spy on citizens but to check for other spying agencies!
<yorickpeterse>
Looks legit
<toretore>
don't be such a terrorist
schaerli has quit [Ping timeout: 245 seconds]
robbyoconnor has joined #ruby-lang
kgrz has quit [Ping timeout: 245 seconds]
ikrima has joined #ruby-lang
pellenation has quit [Quit: Leaving.]
deception has quit [Quit: Goodbye]
<imperator>
man, linux confuses me sometimes
<yorickpeterse>
imperator: "sometimes"?
<imperator>
apparently there's a statvfs64, but not struct statvfs64
deluxe247 has joined #ruby-lang
deluxe247 has left #ruby-lang [#ruby-lang]
mistawright has joined #ruby-lang
dorei has joined #ruby-lang
<mistawright>
hey guys i had to remove ruby due to it being too old and installed ruby 2.0.0 using rvm. I am having an issue now when trying to install the aws-sdk it is unable to install it due to libxml2 which is already installed. as well I see that gem is atempting to install nokogiri and i do not see that as a dependency for aws-sdk
<yorickpeterse>
do you get an error, if so, could you pastie it?
<mistawright>
i reveive and error: Error installing aws-sdk: Error: Failed to build gem native exntension
<canton7>
mistawright, aws-sdk does depend on nokogiri..
<mistawright>
canton7, it didnt show it when i ran reverse dependencies
<mistawright>
http://pastebin.com/UdviA21r <-- here is what i get when trying to install aws-sdk take into consideration i just installed libxml2 using yum
<canton7>
mistawright, did you install the devel package?