fflush changed the topic of #ruby to: Ruby 1.9.3-p194: http://ruby-lang.org || Paste > 3 lines of text on pastebin.com
cakehero has quit [Quit: Computer has gone to sleep.]
ph^ has quit [Ping timeout: 264 seconds]
Juul has quit [Quit: Leaving]
<Spooner> qq99 : contents = File.read(@proxy) is simpler than 86..88 - Not sure what params[:splat] is expected to be, but that seems to be the only place one could "hack". Maybe regexp it to validate that it is sensible?
digitalcakestud1 has joined #ruby
lggr has quit [Ping timeout: 244 seconds]
<Spooner> Though using a db, e.g. MongoDB, sounds a bit more sensible than saving files.
digitalcakestudi has quit [Ping timeout: 244 seconds]
<Spooner> Also a nice idea to limit the size of the file and/or amount appended (if appropriate).
lggr has joined #ruby
sailias has joined #ruby
<Spooner> chiel BASE62.sample(5).join is even simpler, but each char would be unique :D
nari has quit [Ping timeout: 264 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
elico has quit [Quit: elico]
<Spooner> falieson : Still struggling with max_id?
Virunga has quit [Remote host closed the connection]
sent-hil has joined #ruby
sent-hil has quit [Remote host closed the connection]
mxweas has joined #ruby
seanstickle has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
skogis has quit [Ping timeout: 264 seconds]
<falieson> Spooner: a bit, its not as simple as just declaring it
<Spooner> falieson : while (max_id = dataset.min(:t_id)) > 248209782517932032 do
<falieson> Spooner: http://pastie.org/4812230 updated
<Spooner> If you want to do it that way, max_id = Float::INFINITY is better than 12313123123123123 ;)
<falieson> Spooner: lol
ScottNYC has quit [Quit: ScottNYC]
<falieson> Spooner: so your way declares the var at the same time?
<chiel> Spooner: ah yeah, that's not necessary, means there will be less combinations. :)
arubin has quit [Quit: arubin]
<Spooner> Yeah. Or have that line twice. Once before the while and once at the end of the while. But yes, doing it the way I suggested both sets it and tests it in one.
gfontenot has joined #ruby
<Spooner> falieson : And use #each not #map (now is a good tiem to look at the Array page and find out the difference ;) ).
pfaff has quit [Ping timeout: 245 seconds]
ffranz has quit [Quit: Leaving]
lggr has joined #ruby
<_7894> Map returns the array consisting of each return value
<falieson> Heh so I started that script (its supposed to pull a lot of data)
<falieson> and since I'm pretty nubby I use phpmyadmin to browse through mysql result
<falieson> and … it freezes
mmitchell has joined #ruby
<falieson> um, I don't think its sleeping every 1s
<_7894> xD That may be the prob :D
<falieson> or the db inserts are queued up?
<falieson> I'm adding about 300rows every refresh
<Spooner> No idea.
davidcelis has quit [Quit: K-Lined.]
<falieson> lol
<falieson> well lets just hope twitter api doesn't ban my office
<blazes816> (1..10).inject(&:+) should take about a second in ruby
<falieson> thanks for the help Spooner
icole has quit [Remote host closed the connection]
RegEchse has quit [Quit: <3 WeeChat (v0.3.9-rc2)]
slainer68 has quit [Remote host closed the connection]
dagnachewa has joined #ruby
hbpoison has joined #ruby
<roz-monokeros> blazes816: 1 second? that's too much
cakehero has joined #ruby
digitalcakestud1 has quit [Read error: Connection reset by peer]
<blazes816> i was totally kidding man
digitalcakestudi has joined #ruby
<blazes816> ruby has teh web scalez
dakine has joined #ruby
<falieson> I have sleep 1 in there
icole has joined #ruby
lggr has quit [Ping timeout: 240 seconds]
<falieson> so it should be fine
<blazes816> falieson: when i'm doing stuff like this I used a cached version in a db for testing, and then get it all working correctly before letting loose all over twitter's unicorns
mmitchell has quit [Ping timeout: 264 seconds]
<blazes816> also, are you doing an insert for each of the returned tweets?
hbpoison has quit [Ping timeout: 256 seconds]
slicslak has quit [Ping timeout: 244 seconds]
<blazes816> you can make them into 1 insert
tyfighter has quit [Quit: tyfighter]
ph^ has joined #ruby
adeponte has quit [Remote host closed the connection]
xeronic has quit [Ping timeout: 245 seconds]
BrokenCog has joined #ruby
BrokenCog has joined #ruby
BrokenCog has quit [Changing host]
dagnachewa has quit [Remote host closed the connection]
<falieson> blazes816: hmm, that would probably be good to know how to do. I'm not too worried about resources since I'm downloading everything to my local machine
pfaff has joined #ruby
lggr has joined #ruby
<blazes816> you mean the insert?
mwillhite has quit [Ping timeout: 252 seconds]
Forevernade has quit [Read error: Connection reset by peer]
foysavas has joined #ruby
vlad_starkov has joined #ruby
nateberkopec has joined #ruby
<falieson> thanks!
xeronic has joined #ruby
stan_man_can has quit [Quit: stan_man_can]
<blazes816> np
rakunHo has quit [Remote host closed the connection]
eignerchris has quit [Remote host closed the connection]
brianpWins has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
tgraham is now known as tgraham|away
vlad_starkov has quit [Ping timeout: 248 seconds]
lggr has quit [Ping timeout: 256 seconds]
ttt has joined #ruby
ph^ has quit [Ping timeout: 264 seconds]
chrishunt has quit [Ping timeout: 256 seconds]
ckrailo has quit [Quit: Computer has gone to sleep.]
fyolnish has joined #ruby
lggr has joined #ruby
sailias has quit [Ping timeout: 264 seconds]
elico has joined #ruby
ttt has quit [Ping timeout: 240 seconds]
icole has quit [Remote host closed the connection]
yshh has quit [Remote host closed the connection]
dagnachewa has joined #ruby
pfaff has quit [Ping timeout: 245 seconds]
ianbrandt has quit [Quit: ianbrandt]
blazes816 has quit [Quit: blazes816]
lggr has quit [Ping timeout: 256 seconds]
xeronic has quit [Ping timeout: 252 seconds]
sheerun has quit [Quit: and thanks for all the fish]
tgraham|away is now known as tgraham
mahmoudimus has joined #ruby
snorkdude has quit [Ping timeout: 264 seconds]
ryanlecompte has quit [Read error: Operation timed out]
cbuxton has quit [Quit: Leaving.]
lggr has joined #ruby
stan_man_can has joined #ruby
F1skr has quit [Quit: WeeChat 0.3.8]
samflores is now known as samflores|away
samflores|away is now known as samflores
elico has quit [Quit: elico]
samflores has quit [Quit: Linkinus - http://linkinus.com]
Bosma has joined #ruby
chrishunt has joined #ruby
yshh has joined #ruby
lggr has quit [Ping timeout: 264 seconds]
digitalcakestudi has quit [Quit: Leaving.]
digitalcakestudi has joined #ruby
jrist-dogwalk is now known as jrist
mercwithamouth has quit [Ping timeout: 256 seconds]
mercwithamouth has joined #ruby
<matti> Spooner: You there?
qq99 has quit [Ping timeout: 265 seconds]
davidcelis has joined #ruby
lggr has joined #ruby
peneconleche has joined #ruby
ph^ has joined #ruby
cakehero has joined #ruby
indian has joined #ruby
indian has quit [Changing host]
indian has joined #ruby
quest88 has joined #ruby
dmiller has joined #ruby
locriani_ has quit [Ping timeout: 248 seconds]
Hanmac1 has joined #ruby
pfaff has joined #ruby
peneconleche has quit [Ping timeout: 264 seconds]
lggr has quit [Ping timeout: 252 seconds]
talbot has joined #ruby
Hanmac has quit [Ping timeout: 252 seconds]
internet_user has quit [Remote host closed the connection]
mmitchell has joined #ruby
dagnachewa has quit [Quit: Leaving]
sent-hil has joined #ruby
ph^ has quit [Ping timeout: 264 seconds]
lggr has joined #ruby
qq99 has joined #ruby
digitalcakestudi has quit [Quit: Leaving.]
Targen has quit [Ping timeout: 256 seconds]
digitalcakestudi has joined #ruby
reset has joined #ruby
cakehero has quit [Quit: Leaving...]
pfaff has quit [Ping timeout: 245 seconds]
rabidpraxis has joined #ruby
lggr has quit [Ping timeout: 252 seconds]
digitalcakestud1 has joined #ruby
kiyoura has joined #ruby
digitalcakestudi has quit [Ping timeout: 245 seconds]
hbpoison has joined #ruby
philcrissman has joined #ruby
digitalcakestudi has joined #ruby
rabidpraxis has quit [Remote host closed the connection]
lggr has joined #ruby
digitalcakestud1 has quit [Ping timeout: 265 seconds]
kenneth has quit [Quit: kswizz.com]
hbpoison has quit [Ping timeout: 256 seconds]
<Spooner> matti hullo?
bradleyprice has quit [Quit: bradleyprice]
foysavas has quit [Remote host closed the connection]
gfontenot has quit []
ncr100 has quit [Ping timeout: 244 seconds]
<talbot> good evening
vlad_starkov has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
elico has joined #ruby
Elico1 has joined #ruby
luckyruby has quit [Remote host closed the connection]
josh^ has joined #ruby
alvaro_o_ has quit [Quit: Ex-Chat]
talbot has left #ruby [#ruby]
peneconleche has joined #ruby
daniel_- has quit [Quit: WeeChat 0.3.8]
chrishunt has quit [Ping timeout: 244 seconds]
vlad_starkov has quit [Ping timeout: 256 seconds]
pfaff has joined #ruby
ttt has joined #ruby
lggr has joined #ruby
bricker has quit [Ping timeout: 252 seconds]
sent-hil has quit [Remote host closed the connection]
Juul has joined #ruby
ph^ has joined #ruby
ttt has quit [Ping timeout: 260 seconds]
Phalanxia has joined #ruby
lggr has quit [Ping timeout: 248 seconds]
keppy has joined #ruby
seanstickle has quit [Quit: seanstickle]
rakm has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
pfaff has quit [Ping timeout: 245 seconds]
lggr has joined #ruby
ryanlecompte has joined #ruby
ph^ has quit [Ping timeout: 264 seconds]
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
duracrisis_ has joined #ruby
justinmcp has quit [Remote host closed the connection]
eignerchris has joined #ruby
ttt has joined #ruby
eignerchris has quit [Remote host closed the connection]
lamba has left #ruby [#ruby]
justinmcp has joined #ruby
Phalanxia has left #ruby ["Bai! :3"]
lggr has quit [Ping timeout: 252 seconds]
butblack has joined #ruby
dagnachewa has joined #ruby
JustinCampbell has quit [Remote host closed the connection]
eka has quit [Remote host closed the connection]
mahmoudi_ has joined #ruby
arubin has joined #ruby
phantasm66 has joined #ruby
apok has quit [Ping timeout: 256 seconds]
phantasm66 has quit [Client Quit]
lggr has joined #ruby
phantasm66 has joined #ruby
mahmoudimus has quit [Ping timeout: 265 seconds]
<matti> Spooner: I have THE ultimate solution for the FizzBuzz problem in Ruby ;]
<matti> Spooner: I could not sleep and I was bored...
rabidpraxis has joined #ruby
<Spooner> fizzbuzz gem. Inspired :)
thomasfedb has quit [Ping timeout: 245 seconds]
Know1edge has quit []
<Spooner> Your test results need to go a bit higher, since they ignore the first actual fizzbuzz (at 15 :D).
<matti> Spooner: I wrote it in C, so you guys cannot complain about it being slow.
<Spooner> I am sure we all appreciate it.
<matti> Spooner: Oh, good point ;]
<matti> I am just a Ruby n00b
sent-hil has joined #ruby
<Spooner> Testing nub ;)
jenrzzz has joined #ruby
thomasfedb has joined #ruby
kst has quit [Ping timeout: 256 seconds]
pipopopo has quit [Ping timeout: 244 seconds]
<Spooner> matti An exercise - rather than generate an array, use an Enumerator :D
nari has joined #ruby
CarlB_the_great has joined #ruby
<matti> Spooner: It does.
<matti> Spooner: It has .each
<Spooner> Oh, but you don't test it, so it clearly doesn't work :D
<matti> Pff
pipopopo has joined #ruby
kiyoura has quit [Quit: Leaving]
<matti> I practice HDD -- Hate Driven Development
<matti> ;p
lggr has quit [Ping timeout: 256 seconds]
<matti> No tests!
<matti> Move along ;p
<matti> Spooner: I am too tired at the moment ;]
<Spooner> Still, I am impressed.
<matti> Impressed?
<Spooner> Maybe I should fork and improve it. Good projects need more love.
<matti> Its hardly a good project.
dagnachewa has quit [Remote host closed the connection]
xrl has joined #ruby
<matti> I was just bored and read IRC backlog.
brianpWins has quit [Quit: brianpWins]
<matti> Spooner: Feel free to improve ;]
TomJ has quit [Quit: TomJ]
<matti> Spooner: And +1 for not testing Enumerator.
lggr has joined #ruby
<matti> I mean, for poining it out.
<Spooner> And not testing FizzBuzz itself :D
<matti> Oh, oh yes.
<matti> ;p
<matti> Oh yes.
<matti> ;p
* matti hugs Spooner
CarlB_th_ has joined #ruby
karakedi has joined #ruby
Dwarf has quit [Ping timeout: 246 seconds]
<Spooner> I will remind you that you could have written it: (1..100).each{|i|s="#{'fizz'if i%3==0}#{'buzz'if i%5==0}";puts s==''?i:s} but no, pages of C :D
<Spooner> Well, except the enumerator, of course.
CarlB_the_great has quit [Ping timeout: 240 seconds]
tbbach has quit [Quit: tbbach]
Dwarf has joined #ruby
<Spooner> I learned about RETURN_ENUMERATOR if nothing else.
sent-hil has quit [Remote host closed the connection]
dagnachewa has joined #ruby
<matti> ;]
sent-hil has joined #ruby
<falieson> Spooner: :-( I just did some more research and it appears that twitter IDs aren't sequential
lggr has quit [Ping timeout: 248 seconds]
<Spooner> That would explain a lot, I imagine.
ph^ has joined #ruby
<Spooner> matti Hate to tell you, but you never get to FizzBuzz. You fell for the Fizzbuzz trap.
GraemeLion has joined #ruby
voodoofish430 has quit [Quit: Leaving.]
indian has quit [Ping timeout: 245 seconds]
pingfloyd has joined #ruby
<matti> Spooner: I know.
indian has joined #ruby
lggr has joined #ruby
<matti> Spooner: I just fixed it.
mohits has joined #ruby
<matti> Spooner: I added test, and then went "Doh".
<Spooner> :D
AlbireoX`Laptop has joined #ruby
AlbireoX has quit [Ping timeout: 240 seconds]
<matti> Spooner: I was doing some re-factoring and moved code around and I think I pressed "u" too many times.
<matti> Spooner: And % 15 left on the bottom.
<matti> Meh.
<Spooner> That isn't an excuse. That is what the tests were for.
pfaff has joined #ruby
hbpoison has joined #ruby
dagnachewa has quit [Read error: Connection reset by peer]
<Spooner> You didn't get the job.
jasonkuhrt has joined #ruby
ryanlecompte has quit [Remote host closed the connection]
ckrailo has joined #ruby
mmitchell has quit [Remote host closed the connection]
<falieson> So I'm getting lots of duplicate data
<falieson> :-/
<Spooner> falieson : You aren't supposed to leave line 4 in - you are finding min twice.
ewag has quit [Read error: Connection reset by peer]
<falieson> ah
ph^ has quit [Ping timeout: 264 seconds]
<falieson> so it just kept resetting?
<Spooner> No idea. Not sure what dataset.min does.
<Spooner> Lowest id?
jasonkuhrt has quit [Client Quit]
<matti> Spooner: Fixed! Pushed!
jasonkuhrt has joined #ruby
<matti> Spooner: Thank you!
<falieson> so I replace that duplicate line
<falieson> with p max_id
hbpoison has quit [Ping timeout: 244 seconds]
<falieson> #<BigDecimal:7f8cd9abdd40,'0.2507305694 51835392E18',18(27)>
<falieson> #<BigDecimal:7f8cd9b354d0,'0.2507305694 51835392E18',18(27)>
<Spooner> You actually want :max_id ==> max_id - 1 otherwise you grab that one twice.
<matti> falieson: That is the same data.
lggr has quit [Ping timeout: 244 seconds]
<matti> falieson: But different BigDecial object.
<falieson> yeah, I assume that it went through 2 iterations and it came back with the same max_id
<matti> falieson: Either filter on values, or yield to notmal Fixnum and then filter.
<matti> "notmal"?
<matti> Meh ;]
<matti> I am too tired ;p
<falieson> http://cheat.errtheblog.com/s/sequel/ -> ctrl+f .min -> ##Summarizing
digitalcakestudi has quit [Read error: Connection reset by peer]
<matti> falieson: I am leaving you in the Spooner's capable hands ;p
digitalcakestudi has joined #ruby
<falieson> haha, thanks matti
lggr has joined #ruby
icole has joined #ruby
<Spooner> I know nothing about Sequel, but I am good at guessing.
<matti> Thanks Spooner !
<Spooner> matti : Good luck with the gem. I am sure it will be downloaded many times in interviews.
pfaff has quit [Ping timeout: 245 seconds]
<qq99> Spooner, I was avoiding using a DB since I wanted it to be easy to FTP a file in and have a route work
<falieson> Spooner: haha, you certainly are
<Spooner> How do you fizzbuzz, young softie? gem install fizzbuzz; fizzbuzz 100
<matti> falieson: x = x.to_i if x.is_a?(BigDeciaml) and so on...
<falieson> Spooner: I don't understand ^^
<Spooner> qq99 : Makes sense.
<qq99> Spooner, thanks, I guess I might re-evaluate sanitizing stuff to make sure... I was wondering if File.join(base_path, "../../../other....") could traverse up and out of the app's directory
vlad_starkov has joined #ruby
<Spooner> It can, assuming that other is somethign like "frog/../../../fish"
<qq99> so it can actually go upwards with the ../..?
<qq99> say, up a level from /frog?
<Spooner> So just ensure that the user-entered file-name is just letters.
<Spooner> qq99: Yep.
<qq99> Spooner, thanks
<Spooner> You can have /../ in a filename. File.expand_path will work out the "real" path, but it will work fine to find files regardless of whether the .. are resolved.
<Spooner> falieson : What don't you iunderstand? I got lost.
<falieson> haha, I got lost too
jenrzzz has quit [Ping timeout: 265 seconds]
<falieson> Spooner: "You actually want :max_id ==> max_id - 1 otherwise you grab that one twice."
<falieson> how do I grab it twice?
justsee has quit [Quit: Leaving...]
vlad_starkov has quit [Ping timeout: 265 seconds]
<Spooner> Right, if max_id is 1000, then it will grab 902..1000 (99 results). The next time, the min is 902, so it will grab xx..902. So 902 is grabbed twice. You want xx..901 instead.
Taichou has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
Dreamer3 has quit [Quit: Computer has gone to sleep.]
mikepack has quit [Remote host closed the connection]
<falieson> ah i see
<falieson> nice catch
<falieson> but then I'd only have 1 duplicate
<falieson> I have like 10
<falieson> (500K rows, probably have 8 dupes each)
<falieson> *Each tweet
glyytchy has quit [Quit: Leaving...]
<Spooner> Mmm.
dagnachewa has joined #ruby
reset has quit [Ping timeout: 245 seconds]
brianpWins has joined #ruby
<Spooner> I know zilch about the Twitter system, other than that it is mainly full of crap (in the posts).
<falieson> haha true
<Spooner> Sorry, 8 duplicates of every tweet?
joeycarmello has joined #ruby
<falieson> I grabbed a random selection of 100, at least 30 dupes of one tweet, a dozen of another
<Spooner> With different IDs?
<falieson> same ID
lggr has joined #ruby
<Spooner> Right, but they just end up as one in the database though?
maletor has quit [Quit: Computer has gone to sleep.]
<falieson> I have 30 or so rows with the same twitter id
<Spooner> Then your db is broken. Surely you should have id being unique?
pfaff has joined #ruby
<falieson> i have a unique id I'm using, but I didn't set twitter id to be unique in the db
radic has quit [Disconnected by services]
radic_ has joined #ruby
radic_ is now known as radic
<Spooner> Right, but that doesn't explain why you get so many copies downloaded.
qq99 has quit [Quit: Leaving]
* Spooner shrugs.
<falieson> yeah
<falieson> I suppose I have extra processing time, I could check for unique
<falieson> but it doesn't seem like yet should be necessary
<falieson> *like it should be
<Spooner> I'd just make the twitter id unique.
Taichou has quit [Remote host closed the connection]
<matti> Spooner: I fixored typos in tests...
<matti> Spooner: And now, nap time.
<Spooner> matti : Goodo!
<falieson> Spooner: http://pastie.org/4822616 so remove :id and change :t_id from BigDecimal to primary_key ?
Taichou has joined #ruby
<Spooner> Ah, think I have it. There isn't any reason that Twitter.search returns the results in order.
<Spooner> No, that doesn't work. Ignore me.
rakl has joined #ruby
<falieson> you are the only one I'm listening to lol
lggr has quit [Ping timeout: 245 seconds]
<Spooner> And EACH EACH EACH not MAP MAP MAP!
dmiller has quit [Remote host closed the connection]
Bosox20051 has joined #ruby
lggr has joined #ruby
stan_man_can has quit [Quit: stan_man_can]
rakl has quit [Client Quit]
<falieson> lol, it started working so I didn't change it out
<Spooner> falieson : Also, realised this saves you a db query - http://pastie.org/4822633
* falieson goes to the page
ph^ has joined #ruby
c0rn_ has quit [Quit: Computer has gone to sleep.]
jhunter has quit [Ping timeout: 252 seconds]
<falieson> Spooner: `<main>': undefined method `>' for nil:NilClass (NoMethodError)
<Spooner> I'm not sure about the Bignum stuff, by the way.
<Spaceghostc2c> matti: Don't be a prick.
<falieson> the BigDecimal?
<falieson> What would you suggest instead
arubin has quit [Quit: arubin]
<Spooner> I didn't pick up what the error was about, so I am in the dark.
<Spooner> falieson : Look at line #3
<Spooner> Guessing you forgot to paste that in.
<Spaceghostc2c> matti: <3
<falieson> Spooner: nope I got that
<falieson> :-)
GraemeLion has quit [Quit: Lost terminal]
* Spooner looks lost.
<falieson> man me too =(
lggr has quit [Ping timeout: 240 seconds]
<Spooner> Well, line 5 is the only > and line 3 sets the value, so it can't really be nil at that point.
<falieson> oh, if the db is bill it can be
<falieson> haha
<falieson> *nill
<falieson> I'll make a little loop for that
<Spooner> Ooh. Nah, just dataset.min(:t_id) || 0
<falieson> god I love ruby
<falieson> so slick
<Spooner> or while min_id && min_id > 123141 do
lggr has joined #ruby
<falieson> || 0 won't work because it has to be greater than 248209782517932032
<falieson> right?
<Spooner> Oh, yeah, sorry. I was thinking about it the wrong way around.
stan_man_can has joined #ruby
stan_man_can has quit [Client Quit]
Averna has joined #ruby
dagnachewa has quit [Remote host closed the connection]
<falieson> I suppose || infinity wouldn't work
<falieson> haha
ph^ has quit [Ping timeout: 252 seconds]
swarley has quit []
dagnachewa has joined #ruby
<Spooner> Depends how the search works. If it is "the highest 99 <= this limit" then it would, but if it is "the 99 immediately below this limit" it won't. Well, and it probably will cry about being given INFINITY anyway.
<Spooner> How did you do it before?
jeffreybaird has quit [Quit: jeffreybaird]
<Spooner> You must have had something in the database to give a min before now.
<falieson> yeah I must have
<falieson> I just trunked it because I wanted to easily see the data that we put in with this version
<Spooner> Well, just pick a silly big number.
<falieson> haha
<Spooner> or 2**99 or something.
<Spooner> That might be a bit large though.
peneconleche has quit [Quit: Leaving...]
lggr has quit [Ping timeout: 244 seconds]
GoHuyGo has joined #ruby
dmiller has joined #ruby
lggr has joined #ruby
<falieson> no dupes yet
<falieson> and yeah i think so
<falieson> so min_id = dataset.min(:t_id) || 2**99
<falieson> if dataset.min() is nil it uses the 2**99
<Spooner> Yeah.
<falieson> I understand correctly?
jasonkuhrt has quit [Quit: Linkinus - http://linkinus.com]
jasonkuhrt has joined #ruby
pfaff has quit [Ping timeout: 245 seconds]
roz-monokeros has quit []
<falieson> looks like its running correctly
Bosox20051 has quit [Remote host closed the connection]
<CaptainJet> you could use 1 << 64
<CaptainJet> which is 18446744073709551616
<CaptainJet> </late>
pfaff has joined #ruby
adkron has joined #ruby
<falieson> haha
<falieson> nice
lggr has quit [Ping timeout: 246 seconds]
<falieson> well that finished quickly
<falieson> ~22K results
dmiller has quit [Remote host closed the connection]
<Spooner> You can probably remove the sleep, since I'm guessing that was standard "I don't know what is wrong, so I'll pepper it with sleeps" (I've done that myself on bad days :D).
<falieson> haha
<falieson> I put the sleep in there because if it took hours (like my duplicate mess did) I didn't want twitter to ban me
<falieson> they don't want more than 1query/s
<Spooner> Oh, I see.
<falieson> ok, so that finished nice and quick
pu22l3r has joined #ruby
dmiller has joined #ruby
dagnachewa has quit [Remote host closed the connection]
jarred has quit [Quit: jarred]
Cache_Money has joined #ruby
<Spooner> Duplicates?
<Spooner> Or were they just there because you weren't cleaning the database each time you tested?
lggr has joined #ruby
ScottNYC has joined #ruby
Chryson has joined #ruby
bigmcq77 has quit [Quit: Computer has gone to sleep.]
hbpoison has joined #ruby
xyzodiac has quit [Quit: Computer has gone to sleep.]
wallerdev has quit [Quit: wallerdev]
itnomad has joined #ruby
diegoviola has quit [Ping timeout: 252 seconds]
tblamer has joined #ruby
lggr has quit [Ping timeout: 264 seconds]
mohits has quit [Ping timeout: 256 seconds]
freeayu has joined #ruby
dagnachewa has joined #ruby
hbpoison has quit [Ping timeout: 264 seconds]
ph^ has joined #ruby
<falieson> I think that it wasn't sorting properly
SeySayux has quit [Ping timeout: 256 seconds]
<falieson> and we changed something that now it is
<falieson> I changed result_type to mixed to recent
<falieson> but I hope that wasn't it since I was grabbing min
dagnachewa has quit [Remote host closed the connection]
Bosox20051 has joined #ruby
verto is now known as verto|off
wallerdev has joined #ruby
dagnachewa has joined #ruby
lggr has joined #ruby
vlad_starkov has joined #ruby
<falieson> thinking about it though, that probably was it
<falieson> something stupid like that
<falieson> what does min_id = [status.id, min_id].min do?
AlbireoX has joined #ruby
SeySayux has joined #ruby
Guest_ has joined #ruby
vlad_starkov has quit [Ping timeout: 256 seconds]
philcrissman has quit [Remote host closed the connection]
Edward_ has joined #ruby
<falieson> is it grabbing the lesser of the two?
<Spooner> Ensures that min_id is always at the lowest id. #min is a very standard method on Array (well, on Enumerable).
<bnagy> -.-
<falieson> maybe that's what fixed it
<bnagy> because min is a pretty opaque method name
<Spooner> bnagy : Yeah :P
lggr has quit [Ping timeout: 265 seconds]
groupcat_ has joined #ruby
AlbireoX`Laptop has quit [Ping timeout: 256 seconds]
<falieson> so I just grabbed 22K tweets with #election2012 in it
groupcat has quit [Quit: Reconnecting]
ph^ has quit [Ping timeout: 264 seconds]
iaj has quit [Read error: Connection reset by peer]
<Spooner> But it shouldn't make a difference really. All it does is avoid the need to keep asking the db what the minimum id is.
groupcat_ is now known as groupcat
iaj_ has joined #ruby
<falieson> oh
hbpoison has joined #ruby
randym has quit [Ping timeout: 264 seconds]
<falieson> mind if I ask a non-ruby question?
fir_ed has quit [Ping timeout: 264 seconds]
<falieson> since you've been helping me so much with this little script
<Spooner> Right, I am going to bed and you are going to start pry and do show-doc [].min :D
<falieson> :-D
CarlB_th_ has quit [Remote host closed the connection]
<falieson> I was going to do a comparison of sentiment for Rep vs Dem but there are so many people already doing that. Can you think of some other data points that might be interesting that would be difficult for an engine to determine but easy for a human?
guns has quit [Quit: guns]
jenrzzz has joined #ruby
<bnagy> comment IQ
<Spooner> Comparison of "I like X" rather than "I hate Y". Do people like candidates or do they hate the other one.
lggr has joined #ruby
dagnachewa has quit [Remote host closed the connection]
<falieson> along those lines
<Spooner> I'm guessing, that for the people who can be arsed to get off their arse to make a comment, more are negative comments than positive ones.
<falieson> its about 80% of tweets are Republican:negative
<falieson> or rather, 80% of Republican tweets are negative
<Spooner> Republicans suck. There's another one.
<falieson> lol
<Spooner> Democrats suck a bit less.
<falieson> while its equal parts Positive/Negative (about 40%) Democrats
<Spooner> Interesting.
<bnagy> falieson: spell check them
<bnagy> and then break them down by affiliation
<Spooner> Not sure what you gain from comparisons that are easy for humans but hard for machines. Surely you want to know things that are easy for machines?
<falieson> bnagy: lol, nice
<falieson> Spooner: things that are easy for machines is already done
dagnachewa has joined #ruby
<bnagy> that is a deeply flawed assumption
<falieson> I'm interning at a crowdsourcing company
<Spooner> Well, good luck in automating the bits other people can't do.
qos has joined #ruby
<falieson> so, if its easy for a human but hard for a computer, that leverages the power of crowdsourcing
<Spooner> Aha.
indian has quit [Remote host closed the connection]
flip_digits has quit [Quit: Computer has gone to sleep.]
<Spooner> But regardless of that, this crowd needs sleep. Goodnight (and I can honestly say that 1) I didn't know there was a US election and 2) I haven't a clue who is or even might be running. Oh, I guess Obama is going for second term? Drat!).
<falieson> night man
<falieson> and thanks for the help
<falieson> :-
sent-hil has quit [Remote host closed the connection]
<falieson> :-)
<Spooner> Of course, I'm in the UK, so I have an excuse.
randym has joined #ruby
c0rn_ has joined #ruby
<falieson> and bed now?
<falieson> jeez
<falieson> :-D
lggr has quit [Ping timeout: 252 seconds]
bradhe has quit [Remote host closed the connection]
<Spooner> Yeah, I live a life electric.
Spooner has quit []
<falieson> or eclectic ?
freeayu has quit [Read error: Connection reset by peer]
Juul has quit [Ping timeout: 256 seconds]
bradhe has joined #ruby
quazimodo has quit [Ping timeout: 246 seconds]
falieson has left #ruby [#ruby]
c0rn_ has quit [Quit: Computer has gone to sleep.]
lggr has joined #ruby
dagnachewa has quit [Remote host closed the connection]
CaptainJet has quit []
freeayu has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
Guest64548 has joined #ruby
xyzodiac has joined #ruby
loves_color_text has quit []
AlbireoX has quit [Read error: Connection reset by peer]
AlbireoX`Laptop has joined #ruby
love_color_text has joined #ruby
love_color_text has quit [Client Quit]
love_color_text has joined #ruby
lggr has quit [Ping timeout: 240 seconds]
lggr has joined #ruby
AndChat| has joined #ruby
sdegutis has joined #ruby
<sdegutis> hello
ph^ has joined #ruby
bradhe has quit [Remote host closed the connection]
manizzle has joined #ruby
AlbireoX`Laptop has quit [Read error: Connection reset by peer]
Banistergalaxy has quit [Ping timeout: 264 seconds]
ryanf has quit [Ping timeout: 256 seconds]
hvq has quit [Ping timeout: 264 seconds]
ananthakumaran has joined #ruby
lggr has quit [Ping timeout: 265 seconds]
Guest_ has quit [Quit: Computer has gone to sleep.]
xyzodiac has quit [Quit: Computer has gone to sleep.]
phantasm66 has quit [Quit: *sleeeeep*]
kaen has quit [Ping timeout: 265 seconds]
ph^ has quit [Ping timeout: 248 seconds]
lggr has joined #ruby
maletor has joined #ruby
chimkan_ has joined #ruby
jblack has joined #ruby
<Cache_Money> what am i doing wrong with this hash? http://pastie.org/4824709
macmartine has joined #ruby
notVert has quit [Read error: Connection reset by peer]
<bnagy> more specific questions work better
Bosma has quit [Ping timeout: 265 seconds]
jrist is now known as jrist-afk
<bnagy> but hsh[a][b] won't work until you set hsh[a], for a start
nateberkopec has quit [Quit: Leaving...]
<Cache_Money> so i just need to initialize it to an empty hash?
<bnagy> personally I'd flatten it out and rely on select etc to work with the data
lggr has quit [Ping timeout: 265 seconds]
sdegutis has left #ruby [#ruby]
<Cache_Money> what do you mean flatten it out? I haven't worked very extensively with hashes
<bnagy> instead of h['washington']['cities']['seattle'] just have one level
<Cache_Money> you mean h['washington']['seattle'] ?
<bnagy> no I mean one level
<bnagy> just seattle
mercwithamouth has quit [Ping timeout: 265 seconds]
<Cache_Money> what about cities with the same name?
<bnagy> put washington in as an entry if you need it
Bosox20051 has quit [Quit: Leaving]
<bnagy> if you have dups then you'd normally use a unique key or use an Array
lggr has joined #ruby
<TTilus> h["Springfield (here)"] h["Springfield (there)"] h["Springfield (everywhere)"]
Chryson has quit [Ping timeout: 264 seconds]
<bnagy> trouble with nested hashes is that they're a pain to query
<bnagy> people gravitate to them because they're humans, and used to filing systems and such
uris has quit [Quit: leaving]
<TTilus> you are good to go if you initialize the hasg with defailt value of new hasg
pfaff has quit [Ping timeout: 268 seconds]
justinmcp has quit [Remote host closed the connection]
<TTilus> h = Hash.new { |h, k| h[k] = {} }
<TTilus> minus bugs (pulled that from a hat)
<TTilus> s/hasg/hash/
vlad_starkov has joined #ruby
<TTilus> irc+cellphone = typos
mikepack has joined #ruby
brianpWins has quit [Quit: brianpWins]
lggr has quit [Ping timeout: 265 seconds]
pfaff has joined #ruby
Taichou has quit [Remote host closed the connection]
jasonkuhrt has quit [Quit: Leaving...]
AlbireoX has joined #ruby
vlad_starkov has quit [Ping timeout: 256 seconds]
tblamer has quit [Quit: Leaving]
<A124> Is there a better way to: array.map { |e| e == "\xFF" ? '' : e } ?
lggr has joined #ruby
fredjean has joined #ruby
<bnagy> ary - ["\xff"]
jhunter has joined #ruby
ph^ has joined #ruby
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
eldariof has joined #ruby
lggr has quit [Ping timeout: 252 seconds]
<A124> bnagy: Thank you. But this one eliminates the value instead of replacing.
Taichou has joined #ruby
ryanf has joined #ruby
tgraham has quit [Quit: Leaving...]
c0rn_ has joined #ruby
bradhe has joined #ruby
<karstensrage> ruby is really freaking cool
bradhe has quit [Remote host closed the connection]
<karstensrage> it really does a lot of things right
bradhe has joined #ruby
lggr has joined #ruby
ph^ has quit [Ping timeout: 264 seconds]
karakedi has quit [Ping timeout: 264 seconds]
sent-hil has joined #ruby
itnomad has quit [Quit: Leaving]
jenrzzz has quit [Ping timeout: 244 seconds]
tgraham has joined #ruby
Guest64548 has quit [Ping timeout: 244 seconds]
bafilius has joined #ruby
lggr has quit [Ping timeout: 265 seconds]
bafilius has quit [Client Quit]
Taichou has quit [Remote host closed the connection]
josh^ has quit [Ping timeout: 264 seconds]
lggr has joined #ruby
ph^ has joined #ruby
josh^ has joined #ruby
joofsh has joined #ruby
pu22l3r has quit [Remote host closed the connection]
tgraham has quit [Quit: Leaving...]
joofsh has quit [Remote host closed the connection]
Taichou has joined #ruby
mercwithamouth has joined #ruby
Hanmac1 is now known as Hanmac
jenrzzz has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
<iosctr> Cache_Money: fyi, state/city is not unique. Many states have duplicate city names. You might want to use state/zipcode.
locriani has joined #ruby
ij has joined #ruby
<Cache_Money> iosctr: good call
<A124> Cache_Money: Or in your case an array.
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
justsee has quit [Client Quit]
lggr has joined #ruby
butblack has left #ruby [#ruby]
dmiller has quit [Remote host closed the connection]
m3pow has quit [Quit: ChatZilla 0.9.89 [Firefox 15.0.1/20120907231657]]
lggr has quit [Ping timeout: 264 seconds]
joeycarmello has quit [Remote host closed the connection]
maletor has quit [Quit: Computer has gone to sleep.]
lggr has joined #ruby
macmartine has quit [Quit: Computer has gone to sleep.]
m3pow has joined #ruby
rabidpraxis has quit [Remote host closed the connection]
cyong has joined #ruby
sent-hil has quit [Remote host closed the connection]
gabrielrotbart has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
lggr has quit [Ping timeout: 265 seconds]
tagrudev has joined #ruby
vlad_starkov has quit [Ping timeout: 256 seconds]
lggr has joined #ruby
mahmoudi_ has quit [Quit: Computer has gone to sleep.]
<HardKoreMofo> I was told all the hot sexy women ewhore hang out here
<A124> [regexp] Can anyone point me out how should I match all occurences instead of one? (any number) "var latitude=35.77333, longitude=-80.82883;".match(/-?\d+(?:\.\d+)?/)
AlbireoX has quit [Remote host closed the connection]
<HardKoreMofo> Is this a perl programmer channel?
<A124> Nope.
<HardKoreMofo> what's this channel for?
wchun has quit [Ping timeout: 260 seconds]
AlbireoX has joined #ruby
xpen has joined #ruby
<A124> Ruby Language: http://www.ruby-lang.org/
<HardKoreMofo> yeah so I got ripped again... was told this was the ewhore channel
<HardKoreMofo> *kicks dirt*....
digitalcakestudi has quit [Ping timeout: 256 seconds]
lggr has quit [Ping timeout: 244 seconds]
GoGoGarrett has joined #ruby
Cache_Money1 has joined #ruby
vectorshelve has joined #ruby
<bnagy> A124: use scan, but ideally don't tokenize instead
lggr has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
AlbireoX has quit [Ping timeout: 265 seconds]
ScottNYC has quit [Quit: ScottNYC]
Cache_Money has quit [Ping timeout: 265 seconds]
<A124> bnagy: *facepalm* (My poor memory) Thank you, sir.
josh^ has quit [Ping timeout: 264 seconds]
mikepack has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 252 seconds]
adeponte has joined #ruby
josh^ has joined #ruby
lggr has joined #ruby
jenrzzz_ has joined #ruby
joelsbeard has joined #ruby
adeponte has quit [Remote host closed the connection]
brianpWins has joined #ruby
adeponte has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
maletor has joined #ruby
duracrisis_ has quit [Ping timeout: 244 seconds]
vlad_starkov has joined #ruby
lggr has quit [Ping timeout: 264 seconds]
adeponte has quit [Ping timeout: 256 seconds]
wallerdev has quit [Quit: wallerdev]
wallerdev has joined #ruby
AndChat| has quit [Ping timeout: 264 seconds]
freeayu has quit [Ping timeout: 265 seconds]
justinmcp has joined #ruby
lggr has joined #ruby
hbpoison_ has joined #ruby
hbpoison has quit [Read error: Connection reset by peer]
savage- has joined #ruby
senny has joined #ruby
jasonkuhrt has joined #ruby
savage- has quit [Client Quit]
eldariof has quit []
vlad_starkov has quit [Remote host closed the connection]
freeayu has joined #ruby
arturaz has joined #ruby
sleetdrop has joined #ruby
hbpoison_ has quit [Ping timeout: 256 seconds]
mercwithamouth has quit [Ping timeout: 256 seconds]
triptec has joined #ruby
maesbn has joined #ruby
hbpoison has joined #ruby
ananthakumaran has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
mahmoudimus has joined #ruby
jasonkuhrt has quit [Ping timeout: 264 seconds]
stepnem has joined #ruby
jastix has joined #ruby
areil has joined #ruby
margle has joined #ruby
haxrbyte has joined #ruby
lggr has joined #ruby
haxrbyte has quit [Remote host closed the connection]
cobragoat has joined #ruby
haxrbyte has joined #ruby
timonv has joined #ruby
icole has quit [Remote host closed the connection]
sent-hil has joined #ruby
Morkel has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
Hanmac has quit [Ping timeout: 246 seconds]
slicslak has joined #ruby
sonkei has joined #ruby
justinmcp has quit [Remote host closed the connection]
rohit has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
justinmcp has joined #ruby
lggr has joined #ruby
sonkei has quit [Client Quit]
cobragoat has quit [Remote host closed the connection]
arturaz has quit [Remote host closed the connection]
joelsbeard has quit [Ping timeout: 245 seconds]
aganov has joined #ruby
c0rn_ has quit [Quit: Computer has gone to sleep.]
tchebb has quit [Quit: Leaving.]
evad has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
rippa has joined #ruby
haxrbyte has quit [Ping timeout: 244 seconds]
workmad3 has joined #ruby
sent-hil has quit [Remote host closed the connection]
lggr has joined #ruby
sent-hil has joined #ruby
Villadelfia has quit [Quit: Leaving.]
rohit has quit [Ping timeout: 264 seconds]
gokul has joined #ruby
tchebb has joined #ruby
workmad3 has quit [Ping timeout: 265 seconds]
Hanmac has joined #ruby
lggr has quit [Ping timeout: 248 seconds]
amskah has joined #ruby
lggr has joined #ruby
jenrzzz_ has quit [Ping timeout: 244 seconds]
sleetdrop has quit []
mercwithamouth has joined #ruby
arturaz has joined #ruby
icole has joined #ruby
sent-hil has quit [Remote host closed the connection]
quest88 has quit [Quit: quest88]
bartj3 has joined #ruby
JohnBat26 has joined #ruby
lggr has quit [Ping timeout: 244 seconds]
xorgnak has joined #ruby
xorgnak has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
xorgnak has joined #ruby
pingfloyd has quit [Quit: pingfloyd]
jokar1 has quit [Quit: Leaving.]
lggr has joined #ruby
jokar has joined #ruby
bsmith_ has joined #ruby
Cache_Money1 has quit [Quit: Leaving]
icole has quit [Ping timeout: 244 seconds]
Cache_Money has joined #ruby
zommi has joined #ruby
lolmaus has joined #ruby
skogis has joined #ruby
lggr has quit [Ping timeout: 264 seconds]
quazimodo has joined #ruby
pauC has joined #ruby
timonv has quit [Remote host closed the connection]
adkron has quit [Ping timeout: 240 seconds]
matrixise has quit [Ping timeout: 256 seconds]
justinmcp has quit [Remote host closed the connection]
maletor has quit [Quit: Computer has gone to sleep.]
lggr has joined #ruby
LouisGB has joined #ruby
Villadelfia has joined #ruby
{^_^}_______ has quit [Read error: Connection reset by peer]
{^_^}_______ has joined #ruby
adeponte has joined #ruby
sepp2k has joined #ruby
chimkan_ has quit [Quit: chimkan_]
Villadelfia has quit [Client Quit]
Villadelfia has joined #ruby
rippa has quit [Ping timeout: 265 seconds]
bapa has joined #ruby
chimay has joined #ruby
adeponte has quit [Remote host closed the connection]
jastix has quit [Read error: Operation timed out]
adeponte has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
h4mz1d has joined #ruby
icole has joined #ruby
adeponte has quit [Ping timeout: 256 seconds]
Vainoharhainen has joined #ruby
lggr has joined #ruby
mengu has joined #ruby
icole has quit [Ping timeout: 265 seconds]
chimkan has joined #ruby
ckrailo has quit [Quit: Computer has gone to sleep.]
dakine has quit [Quit: Leaving]
dakine has joined #ruby
evad has quit []
slicslak has quit [Ping timeout: 246 seconds]
xorgnak has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 244 seconds]
hoelzro|away is now known as hoelzro
lggr has joined #ruby
h4mz1d has quit [Ping timeout: 264 seconds]
ssspiff has joined #ruby
bluOxigen has joined #ruby
futilegames has joined #ruby
sspiff has quit [Ping timeout: 264 seconds]
jastix has joined #ruby
brianpWins has quit [Quit: brianpWins]
GoHuyGo has quit [Quit: Leaving]
ereslibre has quit [Quit: No Ping reply in 180 seconds.]
ereslibre has joined #ruby
ereslibre has quit [Changing host]
ereslibre has joined #ruby
xeronic has joined #ruby
lggr has quit [Ping timeout: 265 seconds]
Elhu has joined #ruby
thisirs has joined #ruby
chendo_ has quit [Ping timeout: 265 seconds]
Hamed-R has joined #ruby
futilegames has quit [Read error: Connection reset by peer]
futilegames has joined #ruby
chendo_ has joined #ruby
tvw has joined #ruby
lggr has joined #ruby
justinmcp has joined #ruby
pskosinski has quit [Ping timeout: 276 seconds]
chimkan has quit [Quit: chimkan]
<Vainoharhainen> 123
vlad_starkov has joined #ruby
chendo_ has quit [Ping timeout: 255 seconds]
qos has quit [Read error: Connection reset by peer]
chendo_ has joined #ruby
qos has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
drkfiber has joined #ruby
<drkfiber> hello
jimeh has joined #ruby
xpen has quit [Remote host closed the connection]
xpen has joined #ruby
Banistergalaxy has joined #ruby
darthdeus has quit [Quit: Leaving...]
ttt has quit [Remote host closed the connection]
bsmith_ has quit [Ping timeout: 245 seconds]
lggr has joined #ruby
c0rn_ has joined #ruby
<matti> ;-)
Iszak has quit [Quit: User has gone to sleep.]
xpen has quit [Ping timeout: 260 seconds]
matthewrobbins has joined #ruby
bobbbo has joined #ruby
jgrevich has quit [Quit: jgrevich]
Iszak has joined #ruby
hsbt is now known as hsbt_away
gener1c_ has quit [Ping timeout: 240 seconds]
Hanmac has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
lggr has quit [Ping timeout: 265 seconds]
zommi has quit [Ping timeout: 265 seconds]
ryanf has quit [Quit: leaving]
mercwithamouth has quit [Ping timeout: 252 seconds]
zz_chrismcg is now known as chrismcg
drkfiber_ has joined #ruby
fixl has joined #ruby
lggr has joined #ruby
josh^ has quit [Ping timeout: 264 seconds]
lkba has quit [Quit: Bye]
ttt has joined #ruby
<margle> pew
thillux has joined #ruby
ad_da has joined #ruby
<ad_da> hi
<drkfiber_> hello
<margle> any south africans here?
<ad_da> how can I pass a integer value to hex value ?
jasonkuhrt has joined #ruby
drkfiber_ has quit [Client Quit]
<bnagy> ad_da: there's no such thing as a 'hex value'
ad_da is now known as adoff
<bnagy> what are you actually trying to do?
josh^ has joined #ruby
Rochefort has joined #ruby
<adoff> bnagy hi :) ok I have an integer value in a variable but I need to do an "and" operation (&) of that value with 0x0000400
<bnagy> so just do that
elaptics`away is now known as elaptics
<bnagy> 3 & 0x01 => 1
justinmcp has quit [Remote host closed the connection]
<adoff> bnagy: let me see thanks
<adoff> let you know
lggr has quit [Ping timeout: 246 seconds]
<drkfiber> 10.to_s(16)
jasonkuhrt has quit [Ping timeout: 256 seconds]
Hanmac has joined #ruby
Banistergalaxy has quit [Ping timeout: 240 seconds]
bsmith_ has joined #ruby
cantonic has joined #ruby
chimay has quit [Ping timeout: 264 seconds]
Rochefort has quit [Ping timeout: 256 seconds]
<A124> adoff: or if you have strings: "0x0000400".hex
workmad3 has joined #ruby
lggr has joined #ruby
zommi has joined #ruby
<adoff> A124: ok thank you :)
Criztian has joined #ruby
Hamed-R has quit [Ping timeout: 246 seconds]
<Hanmac> adoff: Integer("0x0000400") works too
qos has quit [Quit: Linkinus - http://linkinus.com]
icole has joined #ruby
daniel_- has joined #ruby
<adoff> Hanmac: nice :)
mucker has joined #ruby
Xeago has joined #ruby
icole has quit [Ping timeout: 240 seconds]
darthdeus has joined #ruby
pskosinski has joined #ruby
lggr has quit [Ping timeout: 255 seconds]
haxrbyte has joined #ruby
Rochefort has joined #ruby
drkfiber has quit [Quit: leaving]
zigomir has joined #ruby
Criztian has quit [Read error: Connection reset by peer]
Criztian has joined #ruby
haxrbyte has quit [Remote host closed the connection]
haxrbyte has joined #ruby
c0rn_ has quit []
lggr has joined #ruby
sayuj has joined #ruby
Hamed-R has joined #ruby
Hamed-R has quit [Changing host]
Hamed-R has joined #ruby
<Hanmac> sayuj #rubyonrails
bsmith_ has quit [Read error: Connection reset by peer]
robozahn has joined #ruby
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ruby
timonv has joined #ruby
matrixise has joined #ruby
<adoff> Hanmac: A124 bnagy It works thank you so much.
<adoff> there is no problem if I do ----> if (type & 0x800)!=0 or (type & 0x4000)!=0
<adoff> and type is an integer
<adoff> that condicion could be more optimized?
cezar has joined #ruby
cezar has quit [Client Quit]
bsmith_ has joined #ruby
timmow has joined #ruby
<bnagy> you can use .nonzero?
<adoff> bnagy: I don't know that :P I'm starting with ruby
arkiver has joined #ruby
<adoff> let me find information
<bnagy> and can't you just do 0x4800 ?
<A124> adoff: Welcome
lggr has quit [Ping timeout: 256 seconds]
<adoff> bnagy: yes I could you're right :)
<bnagy> it's probably less readable though
<adoff> no no its ok like that
<bnagy> if ( type & (0x4000|0x800)).nonzero?
<adoff> thank you :)
manizzle has quit [Ping timeout: 246 seconds]
arkiver has quit [Client Quit]
lggr has joined #ruby
berserkr has joined #ruby
justsee has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
horrror has joined #ruby
<horrror> is there a Ruby lib to extract Words out of MP3 or any other media file?
<horrror> is it possible?
<Mon_Ouie> "words"? As in speech recognition?
<horrror> yes
<horrror> like lyrics etc
<Mon_Ouie> That's a very tough problem, unless the file contains the lyrics in its metadata
vaclavt has joined #ruby
<horrror> no it doesn't
hbpoison has quit [Ping timeout: 245 seconds]
<horrror> I may parse the lyrics from somewhere else but i do need the time stamp of each word
jamjam has joined #ruby
timonv has quit [Remote host closed the connection]
<Xeago> horrror: that is very difficult to do
lggr has quit [Ping timeout: 240 seconds]
<horrror> bummer
<Xeago> accurate speech recognition is nearly impossible if there is background noise (music)
<Mon_Ouie> You could try to get the lyrics from the internet if you can somehow identify the song (the safest way is to use metadata; if there are none for that either, I'd try to find some service that does it.
timonv has joined #ruby
<Xeago> you could try matching syllables
<Xeago> and then count along with lyrics from the internet
<Xeago> but still, that is very hard to do
<horrror> hmm ok
adambeynon has joined #ruby
<Xeago> you'd need to understand how audio works
lggr has joined #ruby
<Xeago> have you seen captions at youtube?
<Xeago> they're horrible
xpen has joined #ruby
Hanmac has quit [Ping timeout: 246 seconds]
<horrror> yea they're
<horrror> but i can work with that
<Xeago> google has more engineers than you are old
<horrror> guess so
horrror has quit [Quit: horrror]
chendo_ has quit [Ping timeout: 265 seconds]
drkfiber has joined #ruby
justsee has quit [Quit: Linkinus - http://linkinus.com]
_dave_h_d has joined #ruby
<m3pow> Xeago
mr_dynamix has joined #ruby
Hanmac has joined #ruby
slainer68 has joined #ruby
chendo_ has joined #ruby
matrixise has quit [Ping timeout: 240 seconds]
lggr has quit [Ping timeout: 246 seconds]
Averna has quit [Quit: Leaving.]
drkfiber has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
jprovazn_away has quit [Remote host closed the connection]
drkfiber has joined #ruby
sspiff has joined #ruby
sspiff has joined #ruby
ssspiff has quit [Ping timeout: 264 seconds]
jasonkuhrt has joined #ruby
<bnagy> I am hungover, someone give me elegant code to marshal args in asm for x64 windows
<bnagy> for variable length args
<bnagy> basically "mov rcx,#{args.shift}" etc
adambeynon has quit [Quit: Computer has gone to sleep.]
lggr has joined #ruby
<bnagy> then rdx r8 r9 then the rest are push arg
drkfiber has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<bnagy> I can't work out a way without lots of checking args.empty?
zommi has quit [Ping timeout: 265 seconds]
schickung has joined #ruby
jasonkuhrt has quit [Ping timeout: 256 seconds]
<shevy> wat
<shevy> asm
<bnagy> yes
<bnagy> asm
QKO_ has joined #ruby
darthdeus has quit [Remote host closed the connection]
gokul has quit [Quit: Leaving]
matthewrobbins_ has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
matthewrobbins has quit [Read error: Operation timed out]
matthewrobbins_ is now known as matthewrobbins
QKO has quit [Ping timeout: 264 seconds]
matthewrobbins has quit [Remote host closed the connection]
matthewrobbins has joined #ruby
<Xeago> Can this be read concisely: "It is therefore encouraged that nodes outside of the regional area do not participate in master election **or** do not hold data."?
icole has joined #ruby
<bnagy> well negative encouragement is discouragement
aces1up has joined #ruby
lggr has joined #ruby
<Xeago> so you encourage to negate the sentence, and then add something like, 'but not both' at the end?
<aces1up> hey, I need some help with an enumerable call on my compisite tree.. the code for it is here: http://codepad.org/3fYDBZME any help would be appreciated!
<bnagy> but just start off with Nodes outside blah should not
<canton7> "nodes outside of the regional area are therefore encouraged not to participate in master election, and not to hold data"?
<Xeago> canton7: that I however, cna read in different ways
<canton7> s/and/or maybe -- I'm having trouble parsing the original
drkfiber has joined #ruby
<drkfiber> hello all
zommi has joined #ruby
icole has quit [Ping timeout: 255 seconds]
<Xeago> to not to, or to to not?
<Xeago> "are encouraged to not participate" vs "are encouraged not to participate"
fyolnish has quit [Remote host closed the connection]
<bnagy> nodes outside blah should not participate in blah if they hold data
<bnagy> not to, otherwise split infinitive
<canton7> Xeago, either. "to not" is a bit stronger I'd say
mucker has quit [Ping timeout: 244 seconds]
<Xeago> how about this: "It is therefore discouraged that nodes outside of the regional area participate in master-elction **and** hold data."
<Xeago> , they should only have 1 role
<Xeago> or something liek that
<Xeago> however I'd prefer using should instead of discouragement, due to rfc2119
lggr has quit [Ping timeout: 248 seconds]
<Xeago> "Nodes outside of the regional area should either participate in master lection **or** hold data, but not both."
<bnagy> well that says they should do one or the other
<Xeago> which is what I am trying to say :3
<bnagy> it doesn't allow for doing neither - if that' what you mean then cool
<Xeago> hmm, well it is possible to do neither
<bnagy> then just say they should not both hold data and participate
<Xeago> "Therefore, nodes outside of the regional area should not hold data **and** participate in master election."?
<bnagy> should not both
<canton7> still can be read as "can either hold data *or* participate, but not both" or "can neither hold data not participate"
xorgnak has joined #ruby
Aaaarg has quit [Quit: Aaaarg]
<bnagy> you can just say nodes that hold data should not participate
<Xeago> Therefore, nodes outside of the regional area should not both hold data **and** participate in master election at the same time.
xorgnak has quit [Remote host closed the connection]
<bnagy> logically equivalent and a lot clearer
<Xeago> bnagy: nodes that participate should also not hold data
xorgnak has joined #ruby
<bnagy> or that, either way
<Xeago> I feel both would be needed
lggr has joined #ruby
xorgnak has quit [Remote host closed the connection]
xorgnak has joined #ruby
<RubyPanther> I say it clearly and only can mean that it can be A or B, there is no reason to think it means A xor B or whatever
lggr has quit [Ping timeout: 255 seconds]
lggr has joined #ruby
ssspiff has joined #ruby
ssspiff has quit [Changing host]
ssspiff has joined #ruby
frogprince_mac has joined #ruby
sspiff has quit [Ping timeout: 260 seconds]
hbpoison has joined #ruby
TomJ has joined #ruby
TomJ has quit [Changing host]
TomJ has joined #ruby
_dave_h_d has quit [Quit: _dave_h_d]
lggr has quit [Ping timeout: 256 seconds]
cantonic_ has joined #ruby
chendo_ has quit [Ping timeout: 255 seconds]
tgraham has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
lggr has joined #ruby
cantonic has quit [Ping timeout: 244 seconds]
cantonic_ is now known as cantonic
chendo_ has joined #ruby
rjmt__ has joined #ruby
PragCypher has joined #ruby
Hamed-R has quit [Ping timeout: 245 seconds]
ProT-0-TypE has joined #ruby
lggr has quit [Ping timeout: 248 seconds]
drkfiber has quit [Quit: leaving]
vlad_starkov has joined #ruby
verto|off is now known as verto
sagax has quit [Ping timeout: 246 seconds]
verto is now known as verto|off
lggr has joined #ruby
manizzle has joined #ruby
chussenot has quit [Quit: chussenot]
Hamed-R has joined #ruby
Hamed-R has quit [Changing host]
Hamed-R has joined #ruby
jastix has quit [Read error: Operation timed out]
matrixise has joined #ruby
tgraham has quit [Quit: Leaving...]
hbpoison has quit [Ping timeout: 252 seconds]
lggr has quit [Ping timeout: 256 seconds]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
seme has joined #ruby
seme is now known as Guest53096
icole has joined #ruby
colinbm has joined #ruby
daniel_- has quit [Ping timeout: 255 seconds]
kermes has joined #ruby
amskah has quit [Quit: Leaving]
PragCypher has quit [Quit: Leaving]
lggr has joined #ruby
icole has quit [Ping timeout: 246 seconds]
dhruvasagar has quit [Remote host closed the connection]
D4T has joined #ruby
Dreamer3 has joined #ruby
bsmith_ has quit [Changing host]
bsmith_ has joined #ruby
bsmith_ is now known as bsmith
<aces1up> hey, I need some help with an enumerable call on my compisite tree.. the code for it is here: http://codepad.org/3fYDBZME any help would be appreciated!
lggr has quit [Ping timeout: 260 seconds]
issyl0 has joined #ruby
issyl0 is now known as Guest85093
bsmith has left #ruby [#ruby]
_bart has joined #ruby
dhruvasagar has joined #ruby
lggr has joined #ruby
gani has joined #ruby
<_bart> my string a = 'something/awesome >', and my array b = ['some', 'thing', 'something/awesome >'], as you can see b holds an exact match of a, how do I check a for an exact match in b?
samphippen has joined #ruby
<hoelzro> _bart: b.include? a
<_bart> ah obviously
<hoelzro> =)
<_bart> I was looking in the wrong way
<_bart> thanks
<_bart> trying .any and so on..
Rochefort has quit [Remote host closed the connection]
futilegames has quit [Quit: futilegames]
lggr has quit [Ping timeout: 252 seconds]
TomJ has quit [Quit: TomJ]
lggr has joined #ruby
pskosinski has quit [Ping timeout: 276 seconds]
Forevernade has joined #ruby
haxrbyte has quit [Ping timeout: 256 seconds]
tehgeekmeister has joined #ruby
arietis has joined #ruby
nari has quit [Ping timeout: 268 seconds]
sayuj has quit [Read error: Connection reset by peer]
xpen has quit [Remote host closed the connection]
mengu has quit [Read error: No route to host]
lggr has quit [Ping timeout: 256 seconds]
pskosinski has joined #ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
Hamed-R has quit [Ping timeout: 245 seconds]
Rochefort has joined #ruby
<Xeago> "Nodes that have disappeared from the cluster are automatically detected as such and queries will be routed to not hit said node."
<Xeago> does this sentence try too hard to say too many things?
lggr has joined #ruby
ttt has quit [Remote host closed the connection]
<JonnieCache> you could replace "not hit" with "avoid" and it would read better
Mon_Ouie has quit [Ping timeout: 264 seconds]
TomJ has joined #ruby
TomJ has quit [Changing host]
TomJ has joined #ruby
<chrismcg> "Nodes that disappear from the cluster are automatically detected and queries will not routed to them" or maybe just "Queries will not be routed to nodes that disappear from the cluster"
ij has quit [Ping timeout: 264 seconds]
lggr has quit [Ping timeout: 265 seconds]
robozahn has quit [Remote host closed the connection]
sayuj has joined #ruby
JustinCampbell has joined #ruby
chimay has joined #ruby
<ccooke> Xeago: "Nodes leaving the cluster will be automatically detected and queries will not be routed to them"
<Xeago> ty all
Hamed-R has joined #ruby
Hamed-R has quit [Changing host]
Hamed-R has joined #ruby
thillux has quit [Remote host closed the connection]
thillux has joined #ruby
lggr has joined #ruby
hbpoison has joined #ruby
jasonkuhrt has joined #ruby
cyong has quit [Quit: Leaving.]
fmcgeough has quit [Quit: fmcgeough]
hbpoison has quit [Ping timeout: 244 seconds]
icole has joined #ruby
und3f has joined #ruby
jasonkuhrt has quit [Ping timeout: 256 seconds]
lggr has quit [Ping timeout: 265 seconds]
Guest85093 is now known as issyl0
moted has quit [Read error: Operation timed out]
icole has quit [Ping timeout: 256 seconds]
TomJ has quit [Quit: TomJ]
tbbach has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
tgraham has joined #ruby
jastix has joined #ruby
TomJ has joined #ruby
TomJ has quit [Changing host]
TomJ has joined #ruby
daniel_- has joined #ruby
mr_dynamix has quit [Quit: mr_dynamix]
thillux_ has joined #ruby
wpaulson has joined #ruby
tgraham has quit [Client Quit]
wpaulson has quit [Client Quit]
lggr has joined #ruby
thillux has quit [Ping timeout: 240 seconds]
elsifaka has joined #ruby
xyzodiac has joined #ruby
tehgeekmeister has quit [Remote host closed the connection]
Taichou has quit [Remote host closed the connection]
Dreamer3 has quit [Quit: Leaving...]
Dreamer3 has joined #ruby
xyzodiac has quit [Client Quit]
manizzle has quit [Ping timeout: 255 seconds]
chendo_ has quit [Ping timeout: 252 seconds]
lggr has quit [Ping timeout: 256 seconds]
chendo_ has joined #ruby
thaz has joined #ruby
Taichou has joined #ruby
thaz has quit [Client Quit]
lggr has joined #ruby
yshh has quit [Remote host closed the connection]
dagnachewa has joined #ruby
hsbt_away is now known as hsbt
tbbach has quit [Quit: tbbach]
wmoxam has quit [Ping timeout: 268 seconds]
verto|off is now known as verto
dagnachewa has quit [Read error: Connection reset by peer]
dagnachewa has joined #ruby
dagnachew has joined #ruby
dagnachewa has quit [Client Quit]
dagnachew has quit [Client Quit]
dagnachewa has joined #ruby
ShiintoRyuu has joined #ruby
fermion has joined #ruby
hsbt is now known as hsbt_away
lggr has quit [Ping timeout: 256 seconds]
theRoUS_ has joined #ruby
heftig has joined #ruby
dagnachewa has quit [Remote host closed the connection]
lggr has joined #ruby
<Xeago> blurgh, basically have the same issue again: "This component needs to be made aware of nodes leaving the cluster so requests get routed to nodes still available."
<Xeago> "Nodes leaving the cluster have to manually be detected for requests to get rerouted." is the best I can come up with
verto is now known as verto|off
matthewrobbins has quit [Quit: matthewrobbins]
larissa has joined #ruby
wmoxam has joined #ruby
peneconleche has joined #ruby
mark_locklear has joined #ruby
ltsstar has joined #ruby
<A124> Anyone could recommend a versioning system for one person?
Spooner has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
<Xeago> git
<matti> Xeago: This is a fall off recent FizzBuzz golfs here ;d I could not sleep yeserday.
<matti> Xeago: And this was born.
<Xeago> lol
yshh has joined #ruby
hukl has joined #ruby
<JonnieCache> this is the opposite of golf
<matti> JonnieCache: True.
<matti> ;]
<matti> JonnieCache: But it was fun to make.
<JonnieCache> i bet its fast as well haha
<JonnieCache> reminds me of the node fibbonacci solver
<Xeago> where does the method block_given? come from?
<Spooner> Xeago : It is built-in.
<Xeago> uhh, where is fizzbuzz/fizzbuzz.rb?
<matti> Xeago: Its written in C
<matti> Xeago: ext/fizzbuzz
<matti> I said, I was boed.
<matti> bored8
<matti> s/8/*/
hbpoison has joined #ruby
lggr has joined #ruby
<Hanmac> Xeago: block_given? is like defined? not defined as a method, its more a feature of the parser
<Spooner> You missed a trick by not implementing FizzBuzz[n]
<matti> Hahah
<matti> Spooner: :))))
ewag has joined #ruby
<Xeago> matti: you got a linux.com address :O?
<theRoUS_> ruby 1.8.7: is there any way to hook the '@' means of accessing instance variables?
hbpoison has quit [Ping timeout: 255 seconds]
<Spooner> theRoUS_ : Nope. Youi should be accessing them via accessors if you want to hook them.
<Xeago> matti: if we're going for speed
<Xeago> I am sure we can strip off a few condtionals
icole has joined #ruby
<matti> Xeago: Sure, but why? They are there for readability.
<theRoUS_> Spooner: comprends. in general i agree. however, i want to wrap an instance variable so that *all* accesses to it are intercepted.
<_bart> how do I test a specific string contains a match for an array of regexp'es?
<Spooner> theRoUS_ : Yeah, but noone should be accessing it but your own class.
<_bart> so a = 'apple boo' b = [/boo/i, /[0-9]/] would be true, but b = [/9091/, /z/] would be false
lggr has quit [Ping timeout: 248 seconds]
fantazo has quit [Remote host closed the connection]
<Spooner> _bart regexps.any? {|r| str =~ r }
<_bart> thanks
jokar has quit [Quit: Leaving.]
<Xeago> shouldn't that be all?
theRoUS_ has quit [Changing host]
theRoUS_ has joined #ruby
theRoUS_ is now known as theRoUS
<Spooner> Nope, not based on the example.
<theRoUS> Spooner: indeed. but this is for a module that can be included and provides the wrapper.
<Xeago> ah, contains a match, thought it read matches an array of regexp'es
icole has quit [Ping timeout: 244 seconds]
mikekelly has quit [Ping timeout: 246 seconds]
mohits has quit [Quit: Leaving]
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
mohits has quit [Remote host closed the connection]
<Xeago> matti how did you get @linux.com address?
gry has quit [Quit: off]
nga4 has quit [Ping timeout: 264 seconds]
fmcgeough has joined #ruby
fmcgeough has quit [Client Quit]
fmcgeough has joined #ruby
chimay has quit [Ping timeout: 256 seconds]
xyzodiac has joined #ruby
peneconleche is now known as peneconleche|awa
krawchyk has joined #ruby
lggr has joined #ruby
<matti> Xeago: You can either help Linux Foundation (which is what I did), or donate and then get it.
<Xeago> ty
Axsuul has quit [Ping timeout: 256 seconds]
luckyruby has joined #ruby
matthewrobbins has joined #ruby
<Spooner> OIr just tell people it is your address and assume no-one will ever email you.
lggr has quit [Ping timeout: 260 seconds]
tgraham has joined #ruby
pseudo has joined #ruby
verto|off is now known as verto
Elico1 has quit [Quit: Elico1]
<pseudo> I am having trouble using a X509 pksc12 certificate for https/SSL, how to I properly read in a .p12 certificate in ruby? http.cert = OpenSSL::X509::Certificate.new(pem) is erroring out.
<pseudo> nested asn1 error (OpenSSL::X509::CertificateError)
hsbt_away is now known as hsbt
uris has joined #ruby
vectorshelve has quit [Ping timeout: 245 seconds]
GoGoGarrett has quit [Remote host closed the connection]
timonv has quit [Remote host closed the connection]
Guest64548 has joined #ruby
<matti> Spooner: Done!
<matti> irb(main):003:0> FizzBuzz[10]
<matti> => [1, 2, "Fizz", 4, "Buzz", "Fizz", 7, 8, "Fizz", "Buzz"]
josh^ has quit [Remote host closed the connection]
<Spooner> matti : No, I meant FizzBuzz[10] => "Buzz"
<matti> Ah.
<Xeago> and don't calculate 1 up to n
<Spooner> Aye.
<matti> What? From 0?
<Xeago> no, not at all
frogprince_mac has quit [Read error: Connection reset by peer]
<Xeago> just calculate n
lggr has joined #ruby
<matti> I assumed no negative numbers.
<Xeago> that's fine
hsbt has quit [Ping timeout: 256 seconds]
<matti> And yes, I can do it.
<Xeago> but as [10] does not return an array
<matti> ;]
<Spooner> I'm thinking if I want to know Fizzbuzz[134251513413152] it might take a while and fill up with Ruby arrays ;D
<Xeago> there's no need to loop from 0
verto is now known as verto|off
<Xeago> Spooner: exactly, that's what we want to prevent
<matti> Right, right ;p
hsbt has joined #ruby
<matti> I will do it later :)
<Xeago> booh, bummer
<Xeago> !
<matti> ?
<Xeago> now is the time, you shall prevail and work hard on fizzbuzz!
<matti> You guys don't like it, it seems.
<Xeago> I like the work alot
<matti> Xeago: You do it ;]
<Spooner> xeago Fork it if you need the funcationality now :D
<Xeago> shit
<matti> Haha
<Xeago> my c is rusty
<Xeago> my ruby's c is untouched
<matti> Xeago: I am not even a Ruby developer ;]
<Xeago> thing is, your caculate method assumes it should calculate from 1 up to n
<matti> I know.
sailias has joined #ruby
<matti> I wrote it at 3 am ;p
<matti> For fun ;p
timonv has joined #ruby
<Xeago> fine, i'll write for fun soon
<Xeago> first work
<matti> Yeah.
<Xeago> it is forked tho
<matti> Yay. Somebody forked something I've done.
* matti cries...
<matti> Tears of joy.
hsbt is now known as hsbt_away
nwest has joined #ruby
<Spooner> I've even had pull requests, but never anything more than a typo in the readme, I think :D
<matti> Typo?
<matti> Oh dear.
<matti> ;/
<Spooner> You are on your way to Ruby superstardom, matti!
<matti> I rather not.
<matti> I may be tempted to look at Rails if that happens.
<matti> And then I will be damaged for life.
<Spooner> You won't be able to go outside without being mobbed by Ruby-groupees!
<matti> LOL
<matti> We should get it into Core ;p
<matti> As an easter egg.
<matti> ;d
<Xeago> rofl
<Spooner> Get it into Rails. Can't make it any more bloated ;)
<matti> LOL
Guest53096 has quit [Ping timeout: 245 seconds]
<matti> We should have: is_{fizz,buzz,fizzbuzz}?
<matti> ;d
<matti> And then [] as you guys pointed out.
<matti> And calculate from n-onwards.
<matti> I like it.
<Spooner> Oh yeah, 5.is_buzz? Nice.
<shevy> matti!
<shevy> let's have babies
<matti> shevy shevy shevy
<matti> LOL
<matti> O_o
<Xeago> that's as simple as self%5==0
<Spooner> Or 5.buzz?
<shevy> hey
<shevy> monkey patching!!!
<matti> LOL
kitofr has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
<Xeago> shevy: what?
<shevy> the .buzz? method!
krawchyk has quit [Remote host closed the connection]
<Spooner> I think interviewers should throw in "print Fizz if divisible by 3 and Buzz if it is divisible by 7 and print FizzBuzz if it is both divisible by 3 and 7" and see how many people submit the standard Fizzbuzz ;)
Criztian_ has joined #ruby
<Xeago> lol
Criztian has quit [Ping timeout: 265 seconds]
<Spooner> Actually, how about 5.buzzes?, 7.fizzes? and 9.fizzes_while_it_buzzes?
<Xeago> lol
<shevy> Spooner will I be able to google at the time of the interview
justinmcp has joined #ruby
<Spooner> I'm sure people memorise it.
luckyruby has quit [Remote host closed the connection]
<shevy> wow
hsbt_away has quit [Ping timeout: 265 seconds]
lggr has joined #ruby
<Spooner> Whoever it was in the other day, talking about using it in his own interviews, said he asked interviewees to explain it, since memorising did take place.
<Spooner> It is such a standard question...
lolmaus has quit [Read error: Connection reset by peer]
faen has quit [Quit: faen]
keymone has joined #ruby
faen has joined #ruby
hsbt_away has joined #ruby
hsbt_away is now known as hsbt
bbttxu has joined #ruby
hsbt is now known as hsbt_away
jrist-afk is now known as jrist
<matti> Xeago, Spooner: TODO updated.
hsbt_away is now known as hsbt
Goles has joined #ruby
lolmaus has joined #ruby
<Spooner> I should have opened a feature-request issue. Sorry matti!
<Xeago> still do it
<Xeago> I'll then open a pull-request, mentioning your issue!
bartj3 has quit []
fixl has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
<Spooner> You'd be surprised just how much I can't be arsed to!
<matti> Pfff
<matti> ;D
<Xeago> Spooner: c'mon
xclite has joined #ruby
<matti> Spooner: *poke*
<matti> Spooner: Be more fun!
_mak has joined #ruby
Knodi has joined #ruby
Neomex has joined #ruby
Neomex has quit [Client Quit]
<Xeago> awwyeah!
<Xeago> bad description bro!
Knodi has quit [Client Quit]
<Spooner> Write a comment then.
<Xeago> it should have a full description on why it should not return an array, with the performance implications et
<Xeago> c
<Xeago> fine, ill see what I can do later
locriani_ has joined #ruby
luckyruby has joined #ruby
tommyvyo has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
elico has quit [Quit: elico]
locriani has quit [Ping timeout: 265 seconds]
fredjean has quit [Read error: Operation timed out]
chendo_ has quit [Ping timeout: 255 seconds]
ben_alman has quit [Excess Flood]
GoGoGarrett has joined #ruby
chendo_ has joined #ruby
Mon_Ouie has quit [Ping timeout: 256 seconds]
hsbt has quit [Ping timeout: 256 seconds]
tvw has quit [Remote host closed the connection]
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
linoj has joined #ruby
hbpoison has joined #ruby
<matti> ?
hsbt has joined #ruby
jeffreybaird has joined #ruby
nga4 has joined #ruby
<matti> LOL
<matti> ;]
robertotauille has joined #ruby
jasonkuhrt has joined #ruby
locriani has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
lggr has joined #ruby
<shevy> matti is in a good mood today
d3vic3 has joined #ruby
ananthakumaran has joined #ruby
gfontenot has joined #ruby
<shevy> I don't like this at all
<Xeago> ?
mr_dynamix has joined #ruby
<Xeago> why?
hbpoison has quit [Ping timeout: 246 seconds]
hsbt is now known as hsbt_away
locriani_ has quit [Ping timeout: 260 seconds]
ben_alman has joined #ruby
hsbt_away is now known as hsbt
xeronic has quit [Ping timeout: 252 seconds]
<Xeago> anyone has time? write a program that outputs a prefix notation of an infix expression!
hsbt is now known as hsbt_away
icole has joined #ruby
hsbt_away is now known as hsbt
jasonkuhrt has quit [Ping timeout: 265 seconds]
justinmcp has quit [Remote host closed the connection]
adambeynon has joined #ruby
ananthakumaran has quit [Ping timeout: 260 seconds]
<shevy> is there a way to convert a string like "01.01.1972" into a time object?
xyzodiac has quit [Quit: Computer has gone to sleep.]
<Xeago> yes
Criztian_ has quit [Remote host closed the connection]
<Xeago> Time.strptime
hsbt has quit [Ping timeout: 245 seconds]
icole has quit [Ping timeout: 252 seconds]
hsbt_away has joined #ruby
hsbt_away is now known as hsbt
lggr has quit [Ping timeout: 260 seconds]
<Xeago> shevy: actually in a date object
<shevy> oh well
yakitori has joined #ruby
<shevy> I tried via DateParse but somehow this sucks
<Spooner> Except that method doesn't exist, Xeago. You need DateTime.strptime("bleh").to_time
<shevy> I thought I could calculate the number of years a person lived most easily with it, like from 1516 up to 1588
<Xeago> Spooner: yea I figured when I read it again :)
<matti> Xeago: I am always in a good mood ;d
<Xeago> but shevy why don't you like that!?
mklappstuhl has joined #ruby
<shevy> dunno, the code seems more verbose than simply taking the years as integers and subtracting one from the other
<Xeago> ah so you weren't refering to matti beeing in a good mood :O?
<Xeago> I would totally do it via simple subtractions
<shevy> matti is in a very good mood today
<shevy> he had another day where he complained about lot of work
<matti> shevy: I alwaus have a lot of work. Today I am not very productive having not been sleeping almost at all yesterday.
<Xeago> don't blame me for that matti ;d
Guest47475 has joined #ruby
<matti> Xeago: Too late ;p
<Guest47475> is this the ruby on rails channel?
<matti> Guest47475: #rubyonrails
F1skr has joined #ruby
<Guest47475> Thanks
<pseudo> can anyone understand what is going wrong here?
hsbt has quit [Ping timeout: 244 seconds]
lggr has joined #ruby
<shevy> this code lacks cojones
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
zigomir has quit [Ping timeout: 245 seconds]
<Guest47475> what he said
<shevy> looks like some SSL related stinking error
<matti> pseudo: Switch off client-side certification verification.
zigomir has joined #ruby
hsbt_away has joined #ruby
<shevy> :in `connect': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLErro
deadghost has quit [Ping timeout: 244 seconds]
<pseudo> matti: how can I go about that?
<pseudo> this is my first time using ruby
robustus has joined #ruby
<matti> pseudo: Try: http.verify_mode = OpenSSL::SSL::VERIFY_NONE
hsbt_away is now known as hsbt
thillux_ has quit [Remote host closed the connection]
<pseudo> that is making much less of a stink
thillux has joined #ruby
<pseudo> i believe that this message mease that i get an http response, meaning that SSL is working?
<pseudo> #<Net::HTTPBadRequest:0x00000000a23780>
carloslopes has joined #ruby
monkegjinni has quit [Ping timeout: 264 seconds]
<Xeago> I am reflecting on blog.xeago.nl/graduation/architecture/design
<Xeago> what word should I choose?
mva3212 has quit [Remote host closed the connection]
<Xeago> The author's stance, choice, preference, what?
Hamed-R has quit [Quit: Leaving]
<matti> pseudo: I am not sure what else is broken ;]
<matti> pseudo: You are showing some Object to me ;d
<matti> pseudo: Alas, at least SSL is not blowing up ;d
<matti> Spooner: Very funny ;p
<matti> Spooner: I will hold you onto the 74% of your projects ;p
<pseudo> matti: yes, i gave it a bad POST request for sure, and if SSL is working then that is great.
lggr has quit [Ping timeout: 246 seconds]
<pseudo> which leads me to my next question: does anyone have a good resource to learn how to use JSON/xml for http in ruby?
monkegjinni has joined #ruby
replore_ has joined #ruby
<matti> pseudo: You just require JSON and then send it inside your POST or whatnot.
<matti> pseudo: Unless you want some fancy JSON-rest something API.
<matti> pseudo: XML is a pain to work with, even in Ruby.
<matti> pseudo: If you need XML-RPC then, there are things in stdlib for it.
ewag has quit [Remote host closed the connection]
hsbt is now known as hsbt_away
<pseudo> matti: i need to hook into a RESTful JSON API
<matti> pseudo: You are just sending things over. Easy.
<matti> pseudo: Build your request, and then turn it into JSON and send over.
obryan has joined #ruby
rbuck has joined #ruby
hsbt_away is now known as hsbt
<pseudo> matti: thanks for all the help
<rbuck> noob: does anyone know how to collect the list of $global_variables as a hash of key=>value?
zerowaitstate has joined #ruby
<A124> Xeago: git -> Thanks for tip. I'll take a look into private server.
<hoelzro> rbuck: there's a special hash named %main::
<hoelzro> but it's...kinda screwy.
xeronic has joined #ruby
rjmt__ has quit [Read error: Connection reset by peer]
ffranz has joined #ruby
Paradox has quit [Ping timeout: 256 seconds]
wallerdev has joined #ruby
joofsh has joined #ruby
lggr has joined #ruby
<Xeago> A124: don't need a private server
<hoelzro> dammit
<hoelzro> I thought I was in #perl
<hoelzro> rbuck: see global_variables
<hoelzro> Kernel#global_variables, I believe
<Xeago> I am reflecting on blog.xeago.nl/graduation/architecture/design
Paradox has joined #ruby
<Xeago> following this explanation: http://gist.io/3793895
<Xeago> what word should I choose
<Xeago> musings?
<rbuck> hoelzro: yeah, but global_variables only returns an array of the names, once you get the name, what do you do to get the value; eval is not always a safe choice
<Xeago> rbuck: you could sned it to Kernel
<hoelzro> hmm...
<Xeago> right?
<hoelzro> Xeago: it's not a method though, right?
v0n has quit [Ping timeout: 268 seconds]
<Xeago> I don't know :O
* hoelzro scans the Ruby source
Hanmac has quit [Ping timeout: 240 seconds]
peneconleche|awa has quit [Quit: Leaving...]
kpshek has joined #ruby
* m3pow appreciates Xeago
hsbt has quit [Ping timeout: 244 seconds]
gfontenot has quit [Ping timeout: 245 seconds]
hsbt_away has joined #ruby
daniel_- has quit [Quit: WeeChat 0.3.8]
shiki_ has quit [Remote host closed the connection]
mmitchell has joined #ruby
<hoelzro> well
phantasm66 has joined #ruby
<hoelzro> I can't see that functionality being exposed directly to Ruby
<hoelzro> but!
<hoelzro> there's rb_gv_get
<hoelzro> so just wrap that in a C extension and you're good to go
yekta has joined #ruby
mucker has joined #ruby
gfontenot has joined #ruby
keymone has quit [Quit: keymone]
lggr has quit [Ping timeout: 260 seconds]
Hanmac1 has joined #ruby
jrajav has joined #ruby
enroxorz-work has joined #ruby
<Hanmac1> yeah the bot-maker is back again
Hanmac1 is now known as Hanmac
<jrajav> Heya
<hoelzro> \o/
<jrajav> Apparently that one guy is having some trouble getting it set up
<Xeago> jrajav: could you set it up in a vagrant?
<jrajav> I don't know how close he is to getting it up (or if he'll still be able to)
<Xeago> that way anyone can run it
<jrajav> A who? lol
<Xeago> if we make our own al2o3cr box, anyone can easily host and manage it
awarner has joined #ruby
<Xeago> we add the box, init and up it
<Xeago> and done
<Xeago> vagrant ssh, to get a prompt inside the box
codefyre has joined #ruby
<jrajav> Can I use an existing Oracle Virtualbox? That's what I was already using
ProT-0-TypE has quit [Ping timeout: 240 seconds]
lggr has joined #ruby
<Xeago> think so
<jrajav> In fact, what's the advantage of Vagrant over just passing around a Virtualbox image?
<Xeago> vagrant wraps virtualbox
<Xeago> it streamlines the way you access it
<sebastianb> [Beginner question] - If I can use .inject to sum multiple arguments passed to a method, how can I subtract one from another?
<Xeago> wherever (and however) you host it with vagrant, vagrant ssh will always get you a prompt isnide the vm
ZubKonst_ has joined #ruby
<jrajav> Well yeah, I can definitely make the vbox image available for anyone to use with Virtualbox or Vagrant
justinmcp has joined #ruby
<jrajav> I'll clean it up and make a torrent of it
sayuj has quit [Quit: Leaving]
und3f has quit [Ping timeout: 256 seconds]
<jrajav> I never installed anything else on it, so I guess the only cleanup I really need to do is get my github auth out of /root
<jrajav> And re-init it as a read only auth
<Xeago> if you could set up key authentication
<Xeago> using the vagrant keys
<Xeago> :3
vaclavt has left #ruby [#ruby]
<jrajav> It's been so long since I had to set ssh up for anthing
<jrajav> haha
<jrajav> But yeah I'll try
<Xeago> read that last link, it might get you tempted to vagrant it :)
<Xeago> "Base boxes must be created using the VirtualBox tool itself."
ZubKonst has quit [Ping timeout: 264 seconds]
<jrajav> Well, like I said, I can't host the bot at all, virtualbox or no
<jrajav> Right now, at least
<jrajav> Maybe in a few months
dhruvasagar has quit [Ping timeout: 245 seconds]
<Xeago> I'll host it if I can get it running securely somewhere
codefyre has quit [Read error: Connection reset by peer]
<Xeago> however I had issue's aswell figuring out how the hell a chroot does it's thing
lggr has quit [Ping timeout: 240 seconds]
mohits has joined #ruby
geekbri has joined #ruby
<rbuck> hoelzro: here is how i got it to work, created a gist on how to coerce all global variables to a hash: https://gist.github.com/3794199
und3f has joined #ruby
<hoelzro> so you ended up just using eval?
<hoelzro> that's probably fine, I think
jrist is now known as jrist-mtg
peneconleche has joined #ruby
notVert has joined #ruby
bluOxigen has quit [Ping timeout: 240 seconds]
stopbit has joined #ruby
lggr has joined #ruby
nateberkopec has joined #ruby
freeayu has quit [Remote host closed the connection]
mucker has quit [Quit: leaving]
luckyruby has quit [Remote host closed the connection]
mucker has joined #ruby
aantix has joined #ruby
krawchyk has joined #ruby
slicslak has joined #ruby
hukl has quit [Quit: Leaving...]
arubin has joined #ruby
CarlB_the_great has joined #ruby
<Xeago> is "Xeago's musings" correct english?
luckyruby has joined #ruby
ShiintoRyuu has quit [Quit: Computer has gone to sleep.]
lggr has quit [Ping timeout: 265 seconds]
indian has joined #ruby
indian has joined #ruby
indian has quit [Changing host]
ananthakumaran has joined #ruby
horrror has joined #ruby
etehtsea has joined #ruby
vitoravelino is now known as vitoravelino`afk
<horrror> is there a good gem for video editing with Ruby? I want to create an online simple movie maker.. only images and text
philcrissman has joined #ruby
gani has quit [Ping timeout: 256 seconds]
Guest47475 has quit [Ping timeout: 240 seconds]
ananthakumaran has quit [Client Quit]
vitoravelino`afk is now known as vitoravelino
<Xeago> horrror: imagemagick can do most of that
internet_user has joined #ruby
mklappstuhl has quit [Ping timeout: 265 seconds]
<horrror> Xeago: I'll use imagemagick for the images effects. but for video transition effects, fade-in/out etc
<Xeago> ever heard of gif? :)
xpen has joined #ruby
pu22l3r has joined #ruby
LouisGB has quit [Ping timeout: 252 seconds]
lggr has joined #ruby
AlbireoX has joined #ruby
hoelzro is now known as hoelzro|away
hoelzro|away is now known as hoelzro
jasonkuhrt has joined #ruby
vderyagin has joined #ruby
cakehero has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
rmcafee has joined #ruby
Asher has quit [Ping timeout: 260 seconds]
chrishunt has joined #ruby
tagrudev has quit [Quit: Me = Awesome]
lggr has joined #ruby
rmcafee has quit [Client Quit]
tk__ has joined #ruby
replore_ has quit [Remote host closed the connection]
<shevy> Here comes the RubyOS!!!
ksergio has joined #ruby
havenn has joined #ruby
<m3pow> an operating system ?
bradleyprice has joined #ruby
mercwithamouth has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
quest88 has joined #ruby
hukl has joined #ruby
<asteve> rubyos? sounds like a terrible, terrible idea
axl_ has joined #ruby
Nisstyre-laptop has joined #ruby
nateberkopec has quit [Quit: Leaving...]
lggr has joined #ruby
horrror has quit [Quit: horrror]
catphish_ has joined #ruby
mikeycgto has joined #ruby
mikeycgto has quit [Changing host]
mikeycgto has joined #ruby
<Sou|cutter> sounds like a breakfast cereeal
<Xeago> rubyshell was quite cool
und3f has quit [Quit: Leaving.]
<Hanmac> Sou|cutter yeah eat your "Ruby O'"s :D
rabidpraxis has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
rjmt__ has joined #ruby
jgrevich has joined #ruby
lggr has joined #ruby
joshman_ has joined #ruby
<catphish_> i am having a character encoding problem but I'm unclear why
haxrbyte has joined #ruby
Nisstyre-laptop has quit [Ping timeout: 252 seconds]
<catphish_> i am trying to convert an unknown character set to ascii using the following: text.force_encoding('BINARY').encode("utf-8", :invalid => :replace, :undefined => :replace)
Nisstyre-laptop has joined #ruby
<catphish_> however i get: Encoding::UndefinedConversionError: "\xA8" from ASCII-8BIT to UTF-8
haxrbyte_ has joined #ruby
Taichou has quit [Remote host closed the connection]
mklappstuhl has joined #ruby
Criztian has joined #ruby
<catphish_> i would expect :invalid => :replace to handle the invalid byte in the original string
jjbohn has joined #ruby
olaaa has joined #ruby
gani has joined #ruby
jrist-mtg is now known as jrist
hsbt_away has quit [Ping timeout: 240 seconds]
hbpoison has joined #ruby
haxrbyte has quit [Ping timeout: 245 seconds]
Beoran has joined #ruby
jastix has quit [Quit: Leaving]
lggr has quit [Ping timeout: 256 seconds]
hsbt_away has joined #ruby
olaaa has left #ruby [#ruby]
<catphish_> irb(main):007:0> "\xA8".force_encoding('BINARY').encode("ascii", :invalid => :replace, :undefined => :replace)
<catphish_> Encoding::UndefinedConversionError: "\xA8" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII
rjmt__ has quit []
catphish_ has quit [Quit: Leaving]
emergion has joined #ruby
lggr has joined #ruby
<geekbri> Is there an elegant way to handle the situation where you want to call a method on an object that returns true/false in a conditional, but there is a chance that object could be nil?
<geekbri> E.G. if( condition_one || some_object.include?(something) )
kpshek has quit []
h4mz1d has joined #ruby
Rochefort has quit [Remote host closed the connection]
Elhu has quit [Quit: Computer has gone to sleep.]
chussenot has joined #ruby
Rochefort has joined #ruby
<havenn> catphish_ Hrm, works without the #force_encoding: "\xA8".encode 'ascii', invalid: :replace, undefined: :replace; #=> "?"
kpshek has joined #ruby
<shevy> geekbri usually it would be easier if the object would have only two states
Beoran has quit [Ping timeout: 260 seconds]
cakehero has quit [Quit: Computer has gone to sleep.]
h4mz1d has quit [Ping timeout: 245 seconds]
lggr has quit [Ping timeout: 244 seconds]
supergiantrobot_ has joined #ruby
cakehero has joined #ruby
chussenot has quit [Quit: chussenot]
My_Hearing has joined #ruby
My_Hearing has joined #ruby
My_Hearing has quit [Changing host]
fredjean has joined #ruby
Mon_Ouie has quit [Ping timeout: 265 seconds]
Guest47475 has joined #ruby
harushimo has quit [Quit: Leaving]
colinbm has quit [Quit: colinbm]
quest88 has quit [Quit: quest88]
chussenot has joined #ruby
timonv has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
theRoUS has quit [Ping timeout: 248 seconds]
lggr has joined #ruby
wting has joined #ruby
olaaa has joined #ruby
<wting> How should I iterate through half of an array? e.g. array has 10 items and I only want to go through the first 5?
<hoelzro> wting: take?
lolmaus has quit []
jonathan_ has joined #ruby
davidcelis has quit [Quit: K-Lined.]
<wting> nm, I just realized Ruby also has slices
<hoelzro> or that ;)
tk__ has quit [Quit: ばいばい]
margle has quit [Quit: Computer has gone to sleep.]
Criztian has quit [Remote host closed the connection]
jonathanwallace has quit [Ping timeout: 264 seconds]
ben_alman has quit [Excess Flood]
lggr has quit [Ping timeout: 240 seconds]
Beoran has joined #ruby
maesbn has quit [Ping timeout: 252 seconds]
Virunga has joined #ruby
icole has joined #ruby
Nisstyre-laptop has quit [Remote host closed the connection]
jonathanwallace has joined #ruby
ben_alman has joined #ruby
lggr has joined #ruby
Guest____ has joined #ruby
<shevy> [1,2,3,4,5,6].each_slice(2) {|slice| p slice} # => [1, 2] [3, 4] [5, 6]
jonathanwallace has quit [Remote host closed the connection]
jonathanwallace has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
<shevy> array =%w( a b c d e f g h i j k l m n ); array.each_slice(array.size / 2) {|slice| p slice} # => ["a", "b", "c", "d", "e", "f", "g"] ["h", "i", "j", "k", "l", "m", "n"]
<shevy> katana slice!
jonathan_ has quit [Ping timeout: 245 seconds]
<shevy> I am going to add aliases for ninja language
Hanmac has quit [Read error: Connection reset by peer]
<shevy> array.katana_slice(:half)
xeronic has quit [Ping timeout: 265 seconds]
timonv has joined #ruby
answer_42 has joined #ruby
Targen has joined #ruby
icole has quit [Ping timeout: 245 seconds]
nykac_ has quit [Ping timeout: 244 seconds]
Hanmac has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
jonathanwallace has quit [Ping timeout: 260 seconds]
lggr has quit [Ping timeout: 245 seconds]
thillux_ has joined #ruby
thillux has quit [Read error: Operation timed out]
beit has joined #ruby
havenn has quit [Remote host closed the connection]
<Xeago> lol
gfontenot has quit []
rmcafee has joined #ruby
lggr has joined #ruby
Rochefort has quit [Remote host closed the connection]
<m3pow> shevy, you have the black belt in ninja coding ?
<shevy> m3pow hmm not really
<shevy> the best code is the one never written
<m3pow> hi
<shevy> the best ninja is the one never seen
<shevy> m3pow, ninjas hiding in the sand -> http://www.youtube.com/watch?v=w3qr4bUn6Xo
gfontenot has joined #ruby
_mak has quit [Quit: Ex-Chat]
hoelzro has quit [Quit: Lost terminal]
<m3pow> you gotta love the oldies !!!
hoelzro has joined #ruby
larissa has quit [Quit: Leaving]
s14 has quit [Quit: s14]
<shevy> hehehe
<shevy> yeah
<shevy> was a time where Hong Kong still did good movies
Ankhers has joined #ruby
<shevy> today, it
mengu has joined #ruby
<shevy> is all dead :(
nykac_ has joined #ruby
<m3pow> not just Chinese movies
haxrbyte_ has quit [Ping timeout: 246 seconds]
<m3pow> but most of them are that way
<shevy> ah
<shevy> some good movies are still made... I liked Inception for instance...
<m3pow> that i liked too, very good movie
<m3pow> though matrix is my fav
lggr has quit [Ping timeout: 245 seconds]
<wmoxam> too bad the sequels sucked
haxrbyte has joined #ruby
<m3pow> they were good
<m3pow> but not as the original
<shevy> hmmm
deadghost has joined #ruby
<shevy> Matrix 1 was ok, I think the idea in it was quite new. Matrix 2 was not that bad but was along the lines "hey guys, let's stop here and you going to watch part III ok!" ending. Matrix III really sucked, so much awful digital effects...
wchun has joined #ruby
<m3pow> well still, that movie was about the ideea behind the effects and all
lggr has joined #ruby
<m3pow> you should also see Animatrix
<shevy> but take the new batman... Batman begins was ok, I did not like it that much but it was ok. The Dark Knight was really awesome... Dark Knight rises was ok but kinda unlogical, often unfitting, and Bane sounded like a croaking puppet all the time
<wmoxam> Girl with the Dragon Tattoo was good
carloslopes has quit [Quit: Leaving.]
<shevy> oh I saw Animatrix
<shevy> problem with animatrix is that 50% of the short stores are nice, 50% suck
<shevy> *stories
Synthead has joined #ruby
<shevy> most digital effects are really bad
nykac_ has quit [Ping timeout: 252 seconds]
Morkel has quit [Quit: Morkel]
<Xeago> what would your preferred representation of the word graduation be?
areil has quit [Remote host closed the connection]
<Xeago> image-representation*
Emmanuel_Chanel has quit [Quit: Leaving]
<m3pow> a beer
<wmoxam> Xeago: typically it's either a hat
<wmoxam> Xeago: or a rolled document
mikepack has joined #ruby
<Xeago> looking for a button to put on the left side: blog.xeago.nl
mikekelly has joined #ruby
chrishunt has quit [Ping timeout: 255 seconds]
<shevy> Xeago those rectangular hats
<m3pow> i was thinking the same thing
<Xeago> but still they're all ugly..
<Xeago> ish
haxrbyte_ has joined #ruby
bradhe has quit [Remote host closed the connection]
supergiantrobot_ has quit [Quit: supergiantrobot_]
ianbrandt has joined #ruby
ianbrandt has quit [Excess Flood]
ianbrandt has joined #ruby
matrixise has quit [Read error: Operation timed out]
justinmcp has quit [Remote host closed the connection]
haxrbyt__ has joined #ruby
<Xeago> which of those would you recommend?
haxrbyte has quit [Ping timeout: 245 seconds]
lggr has quit [Ping timeout: 255 seconds]
<m3pow> i preffer the one from the second link !
<shevy> I like the second one more
<shevy> but I dont like the "colours" in the second one
<Xeago> you want it softend a bit?
<Xeago> it'll be displayed with 90% opacity
<shevy> hmm not sure, I want it more appealing with colours, shiny and stuff
<shevy> aha
<shevy> perhaps then it will look better
<shevy> :)
hoelzro is now known as hoelzro|away
Emmanuel_Chanel has joined #ruby
swarley has joined #ruby
berserkr has quit [Quit: Leaving.]
<swarley> Okay o.o
haxrbyte_ has quit [Ping timeout: 255 seconds]
<shevy> swarley!
<shevy> kick some ass man!
<swarley> Ohai
rippa has joined #ruby
hbpoison has quit [Ping timeout: 255 seconds]
My_Hearing is now known as Mon_Ouie
aganov has quit [Remote host closed the connection]
jonathanwallace has joined #ruby
ryanlecompte has joined #ruby
lggr has joined #ruby
havenn has joined #ruby
DrShoggoth has joined #ruby
senny has quit [Remote host closed the connection]
araujo has quit [Read error: Connection reset by peer]
zigomir has quit [Quit: Leaving]
lkba has joined #ruby
araujo has joined #ruby
peneconleche has quit [Quit: Leaving...]
sailias has quit [Quit: Leaving.]
schickung has quit [Quit: schickung]
mmitchell has quit [Ping timeout: 244 seconds]
jrajav has quit []
mmitchell has joined #ruby
Vainoharhainen has quit [Quit: Leaving...]
Targen has quit [Read error: Connection reset by peer]
nykac_ has joined #ruby
etherdev has quit [Ping timeout: 246 seconds]
lggr has quit [Ping timeout: 255 seconds]
mr_dynamix has quit [Quit: mr_dynamix]
jasonkuhrt has quit [Quit: Leaving...]
DrShoggoth has quit [Quit: Leaving]
bradhe has joined #ruby
<Xeago> ty
<matti> ;]
mmitchell has quit [Remote host closed the connection]
<aces1up> hey, I need some help with an enumerable call on my compisite tree.. the code for it is here: http://codepad.org/3fYDBZME any help would be appreciated!
booginga has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
mmitchell has joined #ruby
hbpoison has joined #ruby
blazes816 has joined #ruby
hukl has quit [Quit: Leaving...]
atmosx has joined #ruby
Z0idberg has joined #ruby
ltsstar has quit [Ping timeout: 256 seconds]
matthewrobbins has quit [Quit: matthewrobbins]
lggr has joined #ruby
willclark has joined #ruby
timonv has quit [Remote host closed the connection]
ltsstar has joined #ruby
frogprince_mac has joined #ruby
mmitchell has quit [Ping timeout: 260 seconds]
philcrissman has quit [Remote host closed the connection]
deadghost has quit [Ping timeout: 252 seconds]
_bart has quit [Ping timeout: 246 seconds]
fredjean has quit [Quit: Computer has gone to sleep.]
kaawee has joined #ruby
<kaawee> Hello! Given a string s in encoding "ASCII-8BIT", how can I split this string into segments of 28-bytes each?
Mon_Ouie has quit [Quit: WeeChat 0.3.8]
Mon_Ouie has joined #ruby
brianpWins has joined #ruby
lggr has quit [Ping timeout: 248 seconds]
alvaro_o has joined #ruby
<Hanmac> kaawee: string.each_byte.each_slice(28) {|i| i }
Spooner has quit [Ping timeout: 260 seconds]
<Hanmac> i will be an Array of Fixnum
Squarepy has joined #ruby
<Xeago> Hanmac.fizz?
lggr has joined #ruby
<Hanmac> what do you mean with "fizz"? :P
<Xeago> Hanmac.is_fizz?
<Xeago> my interpreter is soon timing out, could you yield please?:P
<Xeago> or wait I syntax erro'd you
<Xeago> Hanmac.sample.is_fizz?
<Xeago> :)
busybox42 has quit [Ping timeout: 256 seconds]
<Xeago> anyways, the fun is spoiled, and the joke is bad
chussenot has quit [Ping timeout: 245 seconds]
slicslak has quit [Ping timeout: 265 seconds]
thunderstrike has joined #ruby
schickung has joined #ruby
lolmaus has joined #ruby
futilegames has joined #ruby
drkfiber has joined #ruby
gfontenot has quit []
<drkfiber> hello
Hanmac has quit [Remote host closed the connection]
arturaz has quit [Ping timeout: 264 seconds]
sailias has joined #ruby
lggr has quit [Ping timeout: 255 seconds]
cakehero has joined #ruby
davidcelis has joined #ruby
manizzle has joined #ruby
patrickrb has joined #ruby
<matti> Hi drkfiber
cakehero has quit [Client Quit]
<shevy> hi matti
<matti> Xeago: What are you doing?
maletor has joined #ruby
<Mon_Ouie> Now that's an elegant solution. There's even C code. Clearly that must mean it is great work.
<shevy> hehe
nateberkopec has joined #ruby
mark_locklear has quit [Quit: Leaving]
tgraham is now known as tgraham|away
<patrickrb> Hey everyone. I've just setup ruby/rails on a centos 6 with passenger and apache. I've got the default 'welcome aboard' page to load but when I click on "About your application’s environment" it shows a 500 internal server error. My database is mysql, I have all the necessary packages installed including the mysql gem. However, everything works as intended in the webbrick server. I can
<patrickrb> post links to both the apache version with the error and the working webbrick version if anyone cares to see. Any tips?
lggr has joined #ruby
philcrissman has joined #ruby
mklappstuhl has quit [Ping timeout: 245 seconds]
luckyruby has quit [Remote host closed the connection]
mohits has quit [Quit: Leaving]
deadghost has joined #ruby
carloslopes has joined #ruby
theRoUS has quit [Ping timeout: 260 seconds]
Chryson has joined #ruby
schickung has quit [Quit: schickung]
Spooner has joined #ruby
recycle has joined #ruby
havenn has quit [Remote host closed the connection]
zommi has quit [Quit: Leaving.]
xpen has quit [Remote host closed the connection]
Kruppe has joined #ruby
chrishunt has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
tgraham|away is now known as tgraham
recycle has quit [Remote host closed the connection]
havenn has joined #ruby
hadees has quit [Quit: hadees]
<matti> Mon_Ouie: I know, its dull.
<matti> Mon_Ouie: Apologies.
lggr has joined #ruby
macmartine has joined #ruby
havenn has quit [Read error: Connection reset by peer]
slainer68 has quit [Ping timeout: 246 seconds]
havenn has joined #ruby
kaawee has quit [Remote host closed the connection]
chrismcg is now known as zz_chrismcg
timepilot has joined #ruby
mercwithamouth has quit [Ping timeout: 255 seconds]
ShiintoRyuu has joined #ruby
pauC has quit [Quit: Ex-Chat]
theRoUS has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
lggr has quit [Ping timeout: 255 seconds]
Guest47475 has quit [Ping timeout: 260 seconds]
ncr100 has joined #ruby
thunderstrike has quit [Read error: Connection reset by peer]
thunderstrike has joined #ruby
AlbireoX`Laptop has joined #ruby
drkfiber has quit [Ping timeout: 256 seconds]
Hanmac has joined #ruby
drkfiber has joined #ruby
AlbireoX has quit [Read error: Connection reset by peer]
moted has joined #ruby
schickung has joined #ruby
hadees has joined #ruby
JohnBat26 has quit [Ping timeout: 252 seconds]
mikedevita has joined #ruby
lggr has joined #ruby
s0ber has quit [Read error: Connection reset by peer]
drkfiber has quit [Ping timeout: 246 seconds]
notwen has quit [Read error: Connection reset by peer]
diegoviola has joined #ruby
notwen has joined #ruby
<mikedevita> i have a date stored as a date object and im trying to convert it from 'Y-m-d' to 'b d, Y' when i run Date.strptime(i.date, '%Y-%m-%d').strftime(%b %d, %Y) it gives me an error
drkfiber has joined #ruby
<mikedevita> i shouldnt have to use strptime if its already a date object should i?
shevy has quit [Ping timeout: 245 seconds]
<mikedevita> i should be able to just use .strftime
mk03 has joined #ruby
<matti> mikedevita: If you already have Time / DateTime object.
<mikedevita> its just a date ojbect
<mikedevita> there is no time
<matti> mikedevita: Then strftime should do.
<mikedevita> undefined method `strftime' for nil:NilClass is what i get back
Iszak has quit [Quit: User has gone to sleep.]
<matti> mikedevita: If you want 1st, 2nd, 25th etc in your date, then you have to do a little bit of calculation -- very easy.
<havenn> mikedevita: Your 'date' is actually a nil.
<mikedevita> <%= invoice.invoice_date.strftime('%b %d, %Y') %>
<matti> mikedevita: i.date.class?
<mikedevita> im iterating through results from a db and trying to reformat the date returned
<matti> Ah.
delinquentme has joined #ruby
<delinquentme> ruby has its own internal garbage cleaning right?
<matti> Your nil might be NULL in the column.
<matti> s/column/row/
<matti> ;d
<matti> Whatnot.
etehtsea has quit [Quit: Computer has gone to sleep.]
<mikedevita> thats what it was
mklappstuhl has joined #ruby
<mikedevita> a few dates were set to 0000-00-00
<mikedevita> so how can i check to make sure this doesnt happen?
Companion has quit [Quit: Poweroff]
<mikedevita> say some putz gets into phpmyadmin and starts fartin' around and accidentally sets it to 0000-00-00
<mikedevita> can i have some sort of check when its reformatting?
<matti> mikedevita: A little bit of a pain with 0000-00-00 -- NULL would be better, I think.
<mikedevita> or i can just have a default value of today()
<mikedevita> in mysql
s0ber has joined #ruby
<matti> mikedevita: now()
<mikedevita> and that'd solve it im betting
<matti> mikedevita: You can ;]
<mikedevita> well yeah now()
schickung has quit [Quit: schickung]
<matti> ;d
lggr has quit [Ping timeout: 252 seconds]
zerowaitstate has quit [Quit: Leaving]
<mikedevita> now to figure how to add the default_value via active record migration
<mikedevita> is it :default
<matti> mikedevita: #rubyonrails
<matti> I have no idea.
<mikedevita> yup
<mikedevita> it is :)
timepilot has quit [Quit: timepilot]
lggr has joined #ruby
twoism has joined #ruby
JStoker has quit [Excess Flood]
Bish has quit [Ping timeout: 245 seconds]
Bish_ has joined #ruby
s0ber has quit [Ping timeout: 256 seconds]
Mon_Ouie has quit [Ping timeout: 245 seconds]
<wting> {} are hashes in Ruby right? aka Python dicts / Java HashMap.
luckyruby has joined #ruby
Mon_Ouie has joined #ruby
<havenn> wting: { yup: :i_am_a_hash }
pskosinski has quit [Quit: Some alternative (not-controlled-by-fu*up-developers/moderators) Red Eclipse servers: http://altred.tk/lmaster]
<Hanmac> wting ruby use {} also for blocks like array.each {|i| puts i }
jasonkuhrt has joined #ruby
shevy2 has joined #ruby
<wting> @havenn @Hanmac k, thx
apok has joined #ruby
pseudo has quit [Quit: Lost terminal]
gfontenot has joined #ruby
DarthGandalf has quit [Ping timeout: 245 seconds]
lggr has quit [Ping timeout: 252 seconds]
Chryson has quit [Quit: Leaving]
stephenjudkins has quit [Quit: stephenjudkins]
adoff has quit [Quit: Lost terminal]
DarthGandalf has joined #ruby
deryl has quit [Ping timeout: 256 seconds]
lggr has joined #ruby
ananthakumaran has joined #ruby
manizzle has quit [Ping timeout: 248 seconds]
jasonkuhrt has quit [Ping timeout: 246 seconds]
<patrickrb> I've got a problem with a new rails setup. I went ahead and posted it to stackoverflow for formatting. Can anyone help me out with this issue? http://stackoverflow.com/questions/12626296/ruby-rails-passenger-apache-welcome-aboard-500-internal-server-error
<patrickrb> wrong channel, whoops
bradleyp_ has joined #ruby
voodoofish430 has joined #ruby
bradleyprice has quit [Quit: bradleyprice]
<shevy2> RAAAAILS
shevy2 is now known as shevy
s0ber has joined #ruby
bricker has joined #ruby
jenrzzz has joined #ruby
peneconleche has joined #ruby
bigoldrock has joined #ruby
c0rn_ has joined #ruby
<matti> I want.
<matti> Ruby on Sledge
bradleyp_ has left #ruby [#ruby]
<matti> Ruby on Monocycle.
mikedevita has quit [Read error: Connection reset by peer]
<Hanmac> RubyOnBoat :P
<matti> Haha
xeronic has joined #ruby
bradleyprice has joined #ruby
lggr has quit [Ping timeout: 248 seconds]
<matti> Hanmac: "We sunk this project"
<matti> Hanmac: Would have a completely different meaning.
<matti> ;d
Z0idberg has quit [Read error: Operation timed out]
mklappstuhl has quit [Read error: Operation timed out]
lggr has joined #ruby
bbttxu has quit [Quit: bbttxu]
<havenn> For a gem so precious, it makes no sense to scuttle it around on a train. Let it live a little, buy Ruby a plane ticket: http://collectiveidea.com/blog/archives/2012/04/01/walken-on-rails/
<matti> LOL
workmad3 has quit [Ping timeout: 252 seconds]
fantazo has joined #ruby
<blazes816> Ruby on the Starship Enterprise
adeponte has joined #ruby
carwin has joined #ruby
<matti> Boldy goes where no developer has gone before...
JStoker has joined #ruby
<matti> I can totally see Matz saying "Engage!" with slight Japanese accept ;]
<matti> KAWAIIIII ;d
bluenemo has quit [Remote host closed the connection]
ananthakumaran has quit [Ping timeout: 255 seconds]
<carwin> hello
<havenn> 乗り出す!
<carwin> I'm learning ruby, does anyone have any simple project ideas?
slicslak has joined #ruby
icole has joined #ruby
ananthakumaran has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
replore_ has joined #ruby
lggr has joined #ruby
<Hanmac> blazes816 but this time we has no WesleyCrusher to fix that shit :D
deadghost has quit [Ping timeout: 260 seconds]
yakitori has quit [Ping timeout: 240 seconds]
Bosma has joined #ruby
yshh has quit [Remote host closed the connection]
jblack has quit [Ping timeout: 244 seconds]
icole has quit [Ping timeout: 248 seconds]
<blazes816> haha
deadghost has joined #ruby
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
slainer68 has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
nateberkopec has joined #ruby
lggr has joined #ruby
slicslak has quit [Ping timeout: 246 seconds]
chimay has joined #ruby
replore_ has quit [Remote host closed the connection]
pskosinski has joined #ruby
davidpk has joined #ruby
berserkr has joined #ruby
mahmoudimus has joined #ruby
davidpk is now known as dpk
pskosinski has quit [Remote host closed the connection]
Russell^^ has joined #ruby
GoHuyGo has joined #ruby
sepp2k1 has joined #ruby
pskosinski has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
mmitchell has joined #ruby
sepp2k has quit [Ping timeout: 264 seconds]
eldariof has joined #ruby
darthdeus has joined #ruby
timmow has quit [Ping timeout: 252 seconds]
peneconleche has quit [Quit: Leaving...]
<shevy> carwin depends on what you wanna do the most
<shevy> carwin for me I tend to write ruby scripts that I need
Xeago has quit [Remote host closed the connection]
<carwin> shevy: well i've been a php guy for 5 years or so -- so probably web related stuff, but i'm also just generally interested in ruby for everything
Squarepy has quit [Quit: Leaving]
<carwin> so far i've managed to write a little script that takes arguments to find and replace strings within a string
<carwin> and a script that utilizes libnotify in gnome
<carwin> just prints a notification out
fantazo has quit [Ping timeout: 246 seconds]
roflmaus has joined #ruby
lggr has joined #ruby
beneggett has joined #ruby
lolmaus has quit [Ping timeout: 240 seconds]
<shevy> carwin I used php before ruby too
<shevy> I ported all my www things I did with php to ruby
<carwin> oh duh! nice idea
<carwin> can't believe that didn't occur to me lol
<shevy> well
<shevy> I was using php to "empower" my local knowledge base
bigmcq77 has joined #ruby
virtuose has quit [Ping timeout: 246 seconds]
philcrissman has quit [Remote host closed the connection]
<shevy> back then all in .php, with ruby I actually use .cgi right now, which sucks... but I wont move to rails, so I need something else
jgwong has quit [Ping timeout: 256 seconds]
virtuose has joined #ruby
peneconleche has joined #ruby
jgwong has joined #ruby
yekta has quit [Quit: yekta]
<shevy> carwin, also turn the more useful projects you write in ruby into a .gem file quickly
<shevy> then maintain them for a longer while
virtuose has quit [Max SendQ exceeded]
* Hanmac wispers that he use ruby for 3D games
lggr has quit [Ping timeout: 246 seconds]
gani has quit [Quit: leaving..]
virtuose has joined #ruby
Neomex has joined #ruby
Neomex has quit [Client Quit]
<jgwong> Hanmac: Interesting, do you have any link?
Monie has joined #ruby
Monie has joined #ruby
Monie has quit [Changing host]
<jgwong> Ah, Ogre, nice
mahmoudi_ has joined #ruby
indian has quit [Ping timeout: 255 seconds]
<shevy> please help me persuade Hanmac to also provide documentation
<shevy> else he will not do so
<oz> Hanmac: wow, looks like a lot of work :)
mahmoudimus has quit [Ping timeout: 245 seconds]
<patrickrb> I was just thinking "nice readme" :P
<Hanmac> the file is only there because github maked it for me :D
baroquebobcat has quit [Quit: baroquebobcat]
<oz> ha ha :)
fantazo has joined #ruby
lggr has joined #ruby
sebastorama has quit [Quit: Computer has gone to sleep.]
philcrissman has joined #ruby
xyzodiac has joined #ruby
chimay has quit [Quit: WeeChat 0.3.9-rc1]
vectorshelve has joined #ruby
thisirs has quit [Remote host closed the connection]
cakehero_ has joined #ruby
hbpoison has quit [Ping timeout: 255 seconds]
BrokenCog has quit [Quit: leaving]
icole has joined #ruby
stephenjudkins has joined #ruby
lggr has quit [Ping timeout: 252 seconds]
atmosx has quit [Quit: WeeChat 0.3.8]
notwen has quit [Read error: Connection reset by peer]
notwen has joined #ruby
lggr has joined #ruby
Mon_Ouie has quit [Ping timeout: 245 seconds]
kirun has joined #ruby
geekbri has quit [Remote host closed the connection]
vderyagin has quit [Remote host closed the connection]
BrokenCog has joined #ruby
BrokenCog has joined #ruby
BrokenCog has quit [Changing host]
chrisja has joined #ruby
BrokenCog has quit [Client Quit]
Guest____ has quit [Ping timeout: 255 seconds]
havenn has quit [Remote host closed the connection]
BrokenCog has joined #ruby
BrokenCog has quit [Changing host]
BrokenCog has joined #ruby
mahmoudi_ has quit [Quit: Computer has gone to sleep.]
mahmoudimus has joined #ruby
punkrawkR has joined #ruby
sebastorama has joined #ruby
apok has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 240 seconds]
apok has joined #ruby
Mon_Ouie has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
haxrbyte has joined #ruby
lggr has joined #ruby
mmitchel_ has joined #ruby
haxrbyte has quit [Remote host closed the connection]
haxrbyt__ has quit [Ping timeout: 245 seconds]
thillux_ has quit [Remote host closed the connection]
haxrbyte has joined #ruby
tnk1 has joined #ruby
thillux has joined #ruby
margle has joined #ruby
hukl has joined #ruby
mmitchell has quit [Ping timeout: 244 seconds]
haxrbyte_ has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
jgwong has quit [Ping timeout: 240 seconds]
jgwong has joined #ruby
philcrissman has quit [Remote host closed the connection]
haxrbyte has quit [Ping timeout: 245 seconds]
lggr has quit [Ping timeout: 260 seconds]
<wting> Is it possible to dump half of the attributes from an object? For example object.inspect but matched against a whitelist.
rbuck has quit [Quit: Leaving.]
deryl has joined #ruby
<wting> I tried attr = [:height, :name]; attr.each do |a| { p person.a }
<wting> but that doesn't work :(
jerrad has joined #ruby
ests has joined #ruby
thillux has quit [Remote host closed the connection]
lggr has joined #ruby
yxhuvud has joined #ruby
Companion has joined #ruby
umttumt has joined #ruby
peregrine81 has joined #ruby
trey_ has joined #ruby
<blazes816> attr = [:height, :name]; attr.map!{|a| person.send(a)}; p attr
hukl has quit [Quit: Leaving...]
theRoUS has quit [Read error: Connection reset by peer]
<blazes816> wting, try that ^
vectorshelve has quit [Quit: Page closed]
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
lggr has quit [Ping timeout: 244 seconds]
futilegames has quit [Read error: Connection reset by peer]
futilegames has joined #ruby
lggr has joined #ruby
joelsbeard has joined #ruby
trey_ is now known as treyconnell
emmanuelux has joined #ruby
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<wting> blazes816: thx
drkfiber has quit [Ping timeout: 245 seconds]
xyzodiac has quit [Quit: Computer has gone to sleep.]
lggr has quit [Ping timeout: 244 seconds]
<xclite> if anybody in here has used commander to make command-line apps in ruby, i'd love tips for how to make arguments required without having to check that they were entered myself
xyzodiac has joined #ruby
Xeago has joined #ruby
juarlex has joined #ruby
daniel_- has joined #ruby
jgwong has quit [Ping timeout: 252 seconds]
treyconnell has quit [Remote host closed the connection]
olaaa has quit []
<wting> blazes816: Close, but unfortunately get an undefined method error for .send()
lggr has joined #ruby
margle has quit [Quit: Computer has gone to sleep.]
<blazes816> :s
<blazes816> gist your stack trace please?
peneconleche is now known as peneconleche|awa
<blazes816> attr = [:height, :name]; attr.map!{|a| person.send(a) if person.respond_to? a}; p attr
<blazes816> perhaps
mklappstuhl has joined #ruby
futilegames_ has joined #ruby
Mon_Ouie has quit [Ping timeout: 245 seconds]
Mon_Ouie has joined #ruby
margle has joined #ruby
the_jeebster has joined #ruby
futilegames has quit [Ping timeout: 252 seconds]
futilegames_ is now known as futilegames
<matti> Mon_Ouie: ;-)
xyzodiac has quit [Ping timeout: 260 seconds]
glyytchy has joined #ruby
<wting> blazes816: Thanks for your help. I'm on a tight deadline so I've just hacked a simple fix where I explicitly print each attribute individually. I'll probably get back to this later. :-/
cbuxton has joined #ruby
xyzodiac has joined #ruby
haxrbyte has joined #ruby
<Hanmac> wting maybe you mix instance_variables with methods ... as sample you have an @abc, that does not mean there is a method "abc" too
Raduwen has quit [Quit: Leaving...]
margle has quit [Client Quit]
lggr has quit [Ping timeout: 260 seconds]
haxrbyte_ has quit [Ping timeout: 256 seconds]
lggr has joined #ruby
deadghost has quit [Ping timeout: 260 seconds]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
ests has quit [Quit: ChatZilla 0.9.89 [Firefox 15.0.1/20120907164141]]
Xeago has quit [Remote host closed the connection]
hukl has joined #ruby
eldariof has quit [Ping timeout: 245 seconds]
hukl has quit [Client Quit]
TheShadowFog has quit [Remote host closed the connection]
TheShadowFog has joined #ruby
bluenemo has joined #ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
lggr has quit [Ping timeout: 245 seconds]
Kovensky has quit [Ping timeout: 264 seconds]
hbpoison has joined #ruby
eldariof has joined #ruby
lggr has joined #ruby
duracrisis has quit [Quit: Leaving]
koshii has quit [Remote host closed the connection]
koshii has joined #ruby
elaptics is now known as elaptics`away
stan_man_can has joined #ruby
<stan_man_can> Am i using the parse method wrong?
<GeekOnCoffee> should that be File.open ?
hbpoison has quit [Ping timeout: 255 seconds]
<stan_man_can> Nope it's a remote file
cakehero_ has quit [Remote host closed the connection]
haxrbyte has quit [Remote host closed the connection]
macmartine has joined #ruby
xyzodiac has quit [Quit: Computer has gone to sleep.]
drkfiber has joined #ruby
Kovensky has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
<kaleido> im definitely not a pro but shouldnt you make a variable from csv.read and then reference the variable in .parse?
jamjam has quit [Ping timeout: 248 seconds]
<kaleido> hell, im about as far from a pro as it gets
lkba has quit [Read error: Connection reset by peer]
AndChat- has joined #ruby
TheShadowFog has quit [Quit: pls respond]
headius has joined #ruby
<shevy> parse( str, options = Hash.new )
<GoHuyGo> hey guys
<GoHuyGo> I know this question has been asked a million times
<shevy> stan_man_can, apparently the second option should be a hash. in your code example, you pass in a string.
lggr has joined #ruby
<stan_man_can> kaleido: I can promise you you're at least 4-5 steps above me
<shevy> puts CSV.parse(csv.read, ";;") <-- you pass in ";;"
<stan_man_can> shevy: ohhhh
<GoHuyGo> but for someone with some programming experience ( some C - dynamic mem allocation + limited data struct) what's a good book for learning ruby
<shevy> GoHuyGo the pickaxe is ok
joelsbeard has quit [Ping timeout: 260 seconds]
<GoHuyGo> I've been getting destroyed in interviews becuase of simple questions like
<GoHuyGo> how do you implement polymorphism
<stan_man_can> so it should be CSV.parse(csv.read, {:fs => ";;"})
<GoHuyGo> shevy: I hae pickaxe but it seems more of a reference
<shevy> yeah
Dreamer3 has quit [Quit: Computer has gone to sleep.]
sepp2k1 has quit [Read error: Connection reset by peer]
<shevy> what is "polymorphism"
reset has joined #ruby
reset has quit [Read error: Connection reset by peer]
reset has joined #ruby
<shevy> "polymorphism in the context of object-oriented programming, is the ability to create a variable, a function, or an object that has more than one form"
<shevy> ok simple
<shevy> GoHuyGo, within the body of your method, you check for the type
thnee has quit [Quit: Lost terminal]
<shevy> def foo(a, b)
jenrzzz has joined #ruby
<shevy> if a.is_a? Hash
<shevy> elsif a.is_a? Array
<shevy> end
rcassidy has joined #ruby
<shevy> end
<shevy> that's polymorphism in ruby in a simple way
<shevy> then also how many arguments your method will have
<shevy> def foo(*a)
<GoHuyGo> right
<GoHuyGo> but in ruby
<shevy> there we go. now you can pass in as many arguments as you want.
<shevy> yes in ruby
<GoHuyGo> we have to implement it using modules no?
<shevy> why
<yxhuvud> shevy: it is not the ideomatic way though.
<shevy> what has the module to do with polymorphism?
<GoHuyGo> I have no idea
<GoHuyGo> that's why i am asking for books :)
<GoHuyGo> let me look
<GoHuyGo> I wrote it down
<shevy> with module you can mix in behaviour to your classes
<GoHuyGo> some dude asked me this during my interview
joofsh has quit [Ping timeout: 248 seconds]
<shevy> those questions are simply idiotic so simply give idiotic answers really
drkfiber has quit [Ping timeout: 260 seconds]
<GoHuyGo> I wish I knew enough to give idiotic answers
<GoHuyGo> hahaha
<shevy> well
<yxhuvud> GoHuyGo: go read up on duck typing. That is a lot better approach to polymorphism than explicit dispatch
ananthakumaran has quit [Quit: Leaving.]
haxrbyte has joined #ruby
<shevy> write 100 classes on your own in ruby
<shevy> won't take you long... 2 or 3 days
<GoHuyGo> he mentioned
AlbireoX has joined #ruby
<GoHuyGo> something about module mixins
<shevy> then you can answer all those questions with real example code that works
<shevy> there is nothing magical about mixin in a module
<kaleido> thats all covered in the books that were linked
cbuxton has quit [Quit: Leaving.]
baroquebobcat has joined #ruby
rmcafee has quit [Remote host closed the connection]
AlbireoX`Laptop has quit [Read error: Connection reset by peer]
<shevy> module Bar; def test; puts 'Hi this is a test.'; end; end; class Foo; include Bar; end; foo = Foo.new; foo.test
<GoHuyGo> I forgot what he said
rmcafee has joined #ruby
<rcassidy> ooh, walked in at the right time, i have a module question, i think
<GoHuyGo> but basically you have to implement polymorphism using module mixins
<stan_man_can> I really do like Ruby but coming from a PHP background I do prefer their docs
lggr has quit [Ping timeout: 245 seconds]
Neomex has joined #ruby
Neomex has quit [Client Quit]
<shevy> GoHuyGo simply write the method into a module. task solved
haxrbyte has quit [Remote host closed the connection]
<rcassidy> i've got 2 separate scripts i'm not supposed to be changing- but they contain global variables with the same names. when using them separately it's not an issue.
lggr has joined #ruby
pettsson has joined #ruby
roflmaus has quit []
<wting> I'm having trouble upserting with the Ruby driver. This line works: coll.update( { "app_id" => app.app_id }, doc)
<rcassidy> but if i wanted to write another script to utilize both of these, is there some way to compartmentalize them? i think i'm stuck squashing the global variables no matter what
<shevy> a global variable is always global
<rcassidy> shevy: that's what i thought
bbttxu has joined #ruby
<wting> but this line fails: coll.update( { "app_id" => app.app_id }, doc, true)
<shevy> you can perhaps load the first script first, copy the content of the global variable, then load the second script
F1skr has quit [Quit: WeeChat 0.3.8]
daniel_- has quit [Ping timeout: 260 seconds]
<rcassidy> makes sense. the person who is trying to tell me not to edit these two scripts was trying to come up with a solution involving modules/classes, but i thought the global variable clashing was unavoidable, too
My_Hearing has joined #ruby
<shevy> wting, and from the information you provided, you think anyone will be able to know what is the problem? ;)
Monie has quit [Read error: Connection reset by peer]
<rcassidy> back to drawing board :)
Monie has joined #ruby
Monie has quit [Changing host]
Monie has joined #ruby
<shevy> rcassidy, well yeah, whatever script is loaded last, the global variable will have that last changed value
<rcassidy> right.
<shevy> it is very rare that one needs to use a global variable though
Mon_Ouie has quit [Ping timeout: 246 seconds]
<rcassidy> shevy: tell that to the person who wrote the code i inherited o_O
<shevy> well I would tell him to stop writing code
<rcassidy> but, yes, i agree.
<shevy> for the good of mankind and such
<wting> shevy: Oops, I copy and pasted from #mongodb because I didn't get a response after a while but forgot to add in certain details. xD
<wting> but anyway it turns out I have to pass true in as a hash.
<shevy> hehe
<shevy> odd API :)
rippa has quit [Ping timeout: 255 seconds]
<chiel> hi all, when I am sending an array over to the server, for some reason it arrives as an object with numeric keys
lggr has quit [Ping timeout: 245 seconds]
kermes has quit [Remote host closed the connection]
<chiel> if I try to .to_a it, the resulting structure looks a bit like this: `[["0", "..."], ["1", "..."], ["2", "..."]]`
<chiel> which is entirely not what I want. :p
<chiel> is there some sane way to turn it into a regular array?
axl_ has quit [Quit: axl_]
<chiel> i.e., ["...", "...", "..."]
sagax has joined #ruby
joofsh has joined #ruby
<Virunga> ary.map {|a| a[1]} ?
<matti> ;
<matti> ;]
<chiel> yeah i suppose, but i was wondering why it does this?
<Virunga> That wasn't the question :D
<chiel> i am posting it from javascript, where it's represented just fine as an array of strings
<chiel> yeah ok :p
cbuxton has joined #ruby
<chiel> is there any specific reason it's coming through as an object rather than an array?
lggr has joined #ruby
nga4 has quit [Remote host closed the connection]
nga4 has joined #ruby
Forevernade has quit [Read error: Connection reset by peer]
Juul has joined #ruby
jasonkuhrt has joined #ruby
Forevernade has joined #ruby
My_Hearing is now known as Mon_Ouie
deadghost has joined #ruby
daniel_- has joined #ruby
<chiel> hm.. looking at the request in the inspector network tab, the data being sent looks like this:
<chiel> dependencies[0]:http://ajax.googleapis.com/ajax/libs/mootools/1.4.5/mootools.js
<chiel> dependencies[1]:/mootools-more-1.4.0.1.js
<chiel> dependencies[2]:css!bit.ly/somefile
<chiel> (just some test data)
<shevy> chiel probably something fucks up the data
sebastorama has quit [Ping timeout: 260 seconds]
<chiel> it looks like the xhr request is doing some weird things to it.. hmm
<shevy> sounds as if you are bug-hunting :)
<shevy> when you found it, eliminate it with no mercy
vlad_starkov has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 246 seconds]
<matti> ;]
alvaro_o has quit [Ping timeout: 244 seconds]
lggr has joined #ruby
duracrisis has joined #ruby
Morkel has joined #ruby
<chiel> shevy: rest assured I will!
duracrisis has quit [Client Quit]
<chiel> :D
alvaro_o has joined #ruby
<matti> ?
Asher has joined #ruby
duracrisis has joined #ruby
<shevy> matti he is hunting down bugs
<shevy> matti what are you doing
<matti> shevy: I am trying to read mail.
<matti> shevy: And thinking what to do with myself ;]
busybox42 has joined #ruby
<shevy> I am extending a ruby shell... and thinking how awesome it would be if I'd know C
xnm has joined #ruby
eldariof has quit []
lggr has quit [Ping timeout: 244 seconds]
Eplemosen has joined #ruby
headius has quit [Ping timeout: 246 seconds]
Asher has quit [Quit: Leaving.]
Asher has joined #ruby
mklappstuhl has quit [Ping timeout: 245 seconds]
headius has joined #ruby
lggr has joined #ruby
fermion has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
cbuxton1 has joined #ruby
scrogson has left #ruby [#ruby]
<matti> shevy: I don't know C.
cbuxton has quit [Ping timeout: 248 seconds]
<rcassidy> >> p "ping"
<rcassidy> d'oh
kpshek has quit []
SegFaultAX has joined #ruby
<shevy> matti :(
imami|afk is now known as banseljaj
* Hanmac throws an (*NULL) at matti
* matti drops core with SIGSEGV
<matti> :<
<blazes816> segfault
pskosinski has quit [Remote host closed the connection]
cbuxton1 has quit [Read error: Connection reset by peer]
emmanuelux has quit [Remote host closed the connection]
<blazes816> "oh, forgot a curly brace somewhere? segfault"
lggr has quit [Ping timeout: 256 seconds]
kpshek has joined #ruby
Xeago has joined #ruby
nyuszika7h has joined #ruby
pskosinski has joined #ruby
lggr has joined #ruby
jonathanwallace has quit [Remote host closed the connection]
<matti> blazes816: At least in JVM I would just print a nice stack trace on an NPE.
jonathanwallace has joined #ruby
<blazes816> mmmm I <3 jvm
hbpoison has joined #ruby
bluenemo has quit [Remote host closed the connection]
philcrissman has joined #ruby
My_Hearing has joined #ruby
recycle has joined #ruby
recycle has quit [Remote host closed the connection]
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
jonathanwallace has quit [Ping timeout: 244 seconds]
Mon_Ouie has quit [Ping timeout: 245 seconds]
hbpoison has quit [Ping timeout: 248 seconds]
haxrbyte has joined #ruby
chussenot has joined #ruby
lggr has quit [Ping timeout: 248 seconds]
steph` has joined #ruby
lggr has joined #ruby
bluenemo has quit [Ping timeout: 240 seconds]
vlad_starkov has joined #ruby
haxrbyte_ has joined #ruby
CarlB_the_great has quit [Remote host closed the connection]
talking has joined #ruby
triptec has quit [Ping timeout: 264 seconds]
CarlB_the_great has joined #ruby
workmad3 has joined #ruby
philcrissman_ has joined #ruby
haxrbyte has quit [Remote host closed the connection]
philcrissman has quit [Read error: Connection reset by peer]
<mr-rich> is there a GUI front end for ri?
haxrbyte has joined #ruby
slicslak has joined #ruby
krawchyk has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 252 seconds]
haxrbyte_ has quit [Ping timeout: 245 seconds]
Guest64548 has quit [Ping timeout: 246 seconds]
cbuxton has joined #ruby
lggr has joined #ruby
timonv has joined #ruby
chrisja has quit [Quit: leaving]
fmcgeough has quit [Quit: fmcgeough]
joelsbeard has joined #ruby
moshee has quit [Ping timeout: 256 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
futilegames has quit [Quit: futilegames]
haxrbyte_ has joined #ruby
lggr has quit [Ping timeout: 255 seconds]
ij has joined #ruby
ij has quit [Changing host]
ij has joined #ruby
haxrbyte has quit [Ping timeout: 260 seconds]
cbuxton has quit [Ping timeout: 248 seconds]
mklappstuhl has joined #ruby
ori-l has joined #ruby
lggr has joined #ruby
Britney has joined #ruby
<Britney> Hello
<mr-rich> hi
Targen has joined #ruby
jonathanwallace has joined #ruby
Britney is now known as Ravenna
<Ravenna> Targen?
<Ravenna> Who is Owner here?
Ravenna has quit [Client Quit]
fredjean has joined #ruby
emmanuelux has joined #ruby
<Sou|cutter> Is it possible to specify a timezone for Time.local(...) ? The docs indicate that you can, but when I try doing so it seems to be ignored
peneconleche|awa has quit [Quit: Leaving...]
lggr has quit [Ping timeout: 255 seconds]
<ori-l> hi. i'm coming to ruby from python, and find both symbols and dynamic monkey-patching a bit confusing. i want to override the value of a symbol attribute(?) so that the first time Klass[:foo] is evaluated, it's true, but subsequent evaluations are false. how would i do that?
My_Hearing is now known as Mon_Ouie
<Mon_Ouie> Symbols don't have values; they *are* values, just like integers are.
* ori-l weeps.
sailias has quit [Ping timeout: 245 seconds]
<Sou|cutter> ah screw it, Time.iso8601 ftw
mahmoudimus has joined #ruby
<ori-l> i understand this in the abstract, but i have a hard time figuring out what this means when you attach symbols to instances or classes
mmitchel_ has quit [Ping timeout: 245 seconds]
<Mon_Ouie> That doesn't mean anything as far as I know
<ori-l> so is there any way to make foo[:bar] == true once and thereafter false?
lggr has joined #ruby
<Mon_Ouie> foo[:bar] calls the method #[] on foo with one argument, :bar
<Mon_Ouie> Just like array[1] calls the method #[] on array with one argument, the integer 1
zz_chrismcg is now known as chrismcg
<ori-l> can i wrap #[] with my own function?
hakunin has joined #ruby
<asteve> you can get a good look at a butcher by sticking your head up a cows ass but why not take his word for it?
<asteve> i mean...
<asteve> wait
axl_ has joined #ruby
<ori-l> i'm sorry if i'm being daft, i am vaguely aware of not grokking something fundamental
delinquentme has quit [Quit: Leaving]
bbttxu has quit [Quit: bbttxu]
<ori-l> in python, i can override a type's __getitem__, so that myfoo[1] produces a computed value
<rcassidy> ori-l: yes, you can override the [] function
<rcassidy> is the bot still around?
<rcassidy> >> ping
<rcassidy> damn
Mon_Ouie has quit [Ping timeout: 246 seconds]
<ori-l> rcassidy: thanks, i'll look up how to do that
Mon_Ouie has joined #ruby
<ori-l> any pointers? it's not very googleable
<rcassidy> class A; def[](arg); .....; end; end;
<tommylommykins> def [](arg); stuff_goes_here end
<rcassidy> google "override square brackets ruby"
triptec has joined #ruby
<ori-l> ah cool, thanks!
Bosox20051 has joined #ruby
adurity has joined #ruby
<rcassidy> wonder what happened to our repl-bot, it's nice to give examples of code in chat
vlad_starkov has quit [Remote host closed the connection]
ij has quit [Ping timeout: 245 seconds]
lggr has quit [Ping timeout: 260 seconds]
mmitchell has joined #ruby
pu22l3r has quit [Ping timeout: 252 seconds]
lggr has joined #ruby
<tommylommykins> oh, an I think the []= is equivalent to python's __setitem__
<tommylommykins> *the []= method
Criztian has joined #ruby
hukl has joined #ruby
<stan_man_can> with mysql2 is there any way to just get a single result back
<stan_man_can> "select id from table where name = 'stan' limit 1"
mahmoudimus has quit [Quit: Computer has gone to sleep.]
asteve has quit []
Bosox20051 has quit [Quit: Leaving]
cbuxton has joined #ruby
haxrbyte_ has quit [Ping timeout: 244 seconds]
macmartine has quit [Quit: Computer has gone to sleep.]
mahmoudimus has joined #ruby
<kaleido> stan_man_can: how would you know its the answer you want?
ben_alman has quit [Excess Flood]
jenrzzz has quit [Ping timeout: 255 seconds]
<stan_man_can> instead of a whole results.each do |result| block?
lggr has quit [Ping timeout: 260 seconds]
<stan_man_can> kaleido: pardon me?
gregorg_taf has joined #ruby
gregorg has quit [Read error: Connection reset by peer]
<stan_man_can> kaleido: I'm only grabbing a single result. The table is only 22 rows and I know each one is unique
<kaleido> limiting a sql query to only one result
<stan_man_can> no two rows have the same name
<workmad3> stan_man_can: well you could always execute the query 'select id from table where name = whatever limit 1'
vlad_starkov has joined #ruby
<stan_man_can> I have a feeling there is a better way to do what I"m trying to but I can't think of anything better :/
vlad_starkov has quit [Remote host closed the connection]
cjs226 has joined #ruby
<workmad3> stan_man_can: not if you're using the driver directly
<workmad3> stan_man_can: basically all the driver does for you is execute queries and give you back result sets
<stan_man_can> workmad3: and it will always return it as a set even if there's only a single result right?
thinkdevcode has joined #ruby
<workmad3> stan_man_can: afaik, yes
<stan_man_can> Can I ask a general programming question here or only ruby specific?
jerrad has quit [Quit: Linkinus - http://linkinus.com]
robertotauille has quit [Quit: Leaving...]
<stan_man_can> not sure how strict you guys are here :P
<workmad3> you can ask, not guaranteed an answer though ;)
lggr has joined #ruby
ksergio has quit [Ping timeout: 246 seconds]
jerrad has joined #ruby
hoelzro|away is now known as hoelzro
answer_42 has quit [Quit: WeeChat 0.3.8]
mmitchell has quit [Remote host closed the connection]
steph` has quit [Remote host closed the connection]
hbpoison has joined #ruby
mmitchell has joined #ruby
sagax has quit [Quit: Ухожу я от вас]
vlad_starkov has joined #ruby
jenrzzz has joined #ruby
jgwong has joined #ruby
lggr has quit [Ping timeout: 255 seconds]
BSaboia has joined #ruby
ben_alman has joined #ruby
ests has joined #ruby
dpk has quit [Quit: Asleep at the keyboard.]
mikepack has quit [Remote host closed the connection]
Morkel has quit [Quit: Morkel]
baroquebobcat has quit [Ping timeout: 245 seconds]
hbpoison has quit [Ping timeout: 240 seconds]
ests has left #ruby [#ruby]
stephenjudkins has quit [Quit: stephenjudkins]
slicslak has quit [Ping timeout: 256 seconds]
tommyvyo has quit [Quit: Computer has gone to sleep.]
ests has joined #ruby
baroquebobcat has joined #ruby
rmcafee has quit [Quit: rmcafee]
vlad_sta_ has joined #ruby
<matti> '
<matti> ;]
<ests> \q
ests has quit [Client Quit]
lggr has joined #ruby
jgwong has quit [Ping timeout: 246 seconds]
jgwong has joined #ruby
ests has joined #ruby
aoshel has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Ping timeout: 245 seconds]
chrismcg is now known as zz_chrismcg
aoshel has joined #ruby
gfontenot has quit []
<blazes816> I wish pry-remote would detect that it was the only 'pry' loaded and make binding.pry work as binding.remote_pry
<blazes816> ;)
workmad3 has quit [Ping timeout: 260 seconds]
craq has joined #ruby
Mon_Ouie has quit [Ping timeout: 245 seconds]
ltsstar has quit [Quit: ltsstar]
Mon_Ouie has joined #ruby
hukl has quit [Quit: Leaving...]
mikepack has joined #ruby
workmad3 has joined #ruby
lggr has quit [Ping timeout: 255 seconds]
ests has left #ruby ["Konversation terminated!"]
Chryson has joined #ruby
cespare has quit [Quit: WeeChat 0.3.7]
carloslopes has quit [Quit: Leaving.]
jrist is now known as jrist-afk
berserkr has quit [Quit: Leaving.]
lggr has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
cespare has joined #ruby
slicslak has joined #ruby
swarley_ has joined #ruby
xnm has quit [Quit: WeeChat 0.3.7]
pskosinski has quit [Remote host closed the connection]
xyzodiac has joined #ruby
pskosinski has joined #ruby
Eplemosen has quit [Quit: NOPE]
jenrzzz has quit [Ping timeout: 260 seconds]
lggr has quit [Ping timeout: 256 seconds]
tgraham is now known as tgraham|away
Xeago has quit [Remote host closed the connection]
vlad_sta_ has quit [Remote host closed the connection]
minijupe has joined #ruby
adurity has quit [Remote host closed the connection]
Ankhers has quit [Remote host closed the connection]
lggr has joined #ruby
bradleyprice has quit [Remote host closed the connection]
pygmael has joined #ruby
pskosinski has quit [Remote host closed the connection]
cjs226 has quit []
thinkdevcode has quit [Ping timeout: 245 seconds]
jasonkuhrt has quit [Quit: Leaving...]
robustus has quit [Quit: ZNC - http://znc.in]
mahmoudimus has joined #ruby
macmartine has joined #ruby
ph^ has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 248 seconds]
Mon_Ouie has quit [Read error: Connection reset by peer]
murtas has joined #ruby
lggr has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
nwest has quit [Quit: Computer has gone to sleep.]
indian has joined #ruby
mklappstuhl has quit [Ping timeout: 246 seconds]
phantasm66 has quit [Quit: *sleeeeep*]
glyytchy has quit [Quit: Leaving...]
phantasm66 has joined #ruby
phantasm66 has quit [Client Quit]
<swarley_> i got bored and made this as a quantity sort of thing, what do you guys think http://pastebin.com/HRQAEE7N
<swarley_> 1.km etc
<swarley_> coerce with just 1.km.m changes it from km to m
Knodi has joined #ruby
<swarley_> i suppose i could improve it by having the coersions transfer to the new unit
lggr has quit [Ping timeout: 256 seconds]
<swarley_> instead of just a fixnum
Knodi has quit [Client Quit]
araujo has quit [Remote host closed the connection]
mklappstuhl has joined #ruby
GoGoGarrett has quit [Remote host closed the connection]
mucker has quit [Quit: leaving]
pskosinski has joined #ruby
sebastorama has joined #ruby
aoshel has quit [Quit: aoshel]
lggr has joined #ruby
roz-monokeros has joined #ruby
<roz-monokeros> hello
<roz-monokeros> is there a way to find the caller of a method from within that method?
tgraham|away is now known as tgraham
thone_ has joined #ruby
digitalcakestudi has joined #ruby
justinmcp has joined #ruby
catphish has joined #ruby
obryan has quit [Quit: Konversation terminated!]
<catphish> is there any way to work around this problem?
<catphish> "\250".force_encoding('binary').encode('ascii', :invalid => :replace)
<catphish> Encoding::UndefinedConversionError: "\xA8" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII
hadees has quit [Quit: hadees]
lggr has quit [Ping timeout: 256 seconds]
thone has quit [Ping timeout: 244 seconds]
phantasm66 has joined #ruby
rads has joined #ruby
mmitchell has quit [Remote host closed the connection]
emsilva has quit [Ping timeout: 248 seconds]
lggr has joined #ruby
mklappstuhl has quit [Ping timeout: 245 seconds]
darthdeus has quit [Quit: Leaving...]
darthdeus has joined #ruby
bbttxu has joined #ruby
araujo has joined #ruby
philcrissman_ has quit [Remote host closed the connection]
joshman_ has quit [Quit: Computer has gone to sleep.]
<Mon_Ouie> roz-monokeros: Kernel#caller returns the backtrace (as an array of strings)
LouisGB has joined #ruby
ponty has joined #ruby
Hgananavak has joined #ruby
<ponty> hi is there a short way to do the following: -if current_user && current_user.role == "customer"
<ponty> have to do it otherwise i get an error when current_user is nil
<catphish> that's how i do it
hbpoison has joined #ruby
<catphish> but there is a method called try
<catphish> which calls a method if it exists
ij has joined #ruby
<catphish> current_user.try(:role) == :customer
<catphish> iirc
<Paradox> time to eat lizard meat
<catphish> i think try is a rails feature
alanp_ has joined #ruby
<catphish> i prefer the way you already pasted personally
lggr has quit [Ping timeout: 255 seconds]
alanp has quit [Read error: Connection reset by peer]
jgwong has quit [Ping timeout: 246 seconds]
<Hgananavak> Is ruby used much/at all outside of web development in enterprise programming?
workmad3 has quit [Ping timeout: 244 seconds]
<catphish> Hgananavak: that's 2 questions, but the answer to both is yes
the_jeebster has quit [Quit: Leaving.]
<catphish> it's not designed for web
<catphish> so it's used for everything
jgwong has joined #ruby
<catphish> it's not as popular in enterprise development as java, but growing fast
kpshek has quit []
bbttxu has quit [Quit: bbttxu]
hbpoison has quit [Ping timeout: 246 seconds]
<ponty> thx for the hint
mk03 has quit [Ping timeout: 245 seconds]
<Hgananavak> I know it's not, but I'm just looking for another language to branch into, ruby's sexy but I just want to make sure it's something I actually might use i na job (I already know most C variants and Java quite well)
bobbbo has quit [Quit: bobbbo]
kpshek has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
jimeh has quit [Ping timeout: 265 seconds]
ph^ has joined #ruby
bbttxu has joined #ruby
<catphish> i use ruby for almost everything, but C for high speed network socket stuff and desktop apps
<ponty> Hgananavak: hackers seem to like ruby too. metasploit is written in ruby
<catphish> ruby is certainly versitile (mostly for server applications)
Axsuul has joined #ruby
lggr has joined #ruby
<catphish> and growing in enterprise use i believe
dustinleer has joined #ruby
dustinleer has quit [Remote host closed the connection]
headius_ has joined #ruby
jgwong has quit [Ping timeout: 255 seconds]
maletor has joined #ruby
jjbohn has quit [Ping timeout: 245 seconds]
horrror has joined #ruby
jgwong has joined #ruby
headius has quit [Disconnected by services]
headius_ is now known as headius
pygmael has quit [Quit: pygmael]
jeffreybaird has quit [Quit: jeffreybaird]
tgraham is now known as tgraham|away
<horrror> ok so I have this school project. I need help! I have a list of images which I want to make a motion video out of them. which means i want that in 1minutes the 10 images will be shown
<horrror> each image for average time of 6 seconds
Mon_Ouie has quit [Ping timeout: 245 seconds]
<horrror> and transition effects would be nice too (fade-in/out, twirls etc)
<catphish> power point?
mk03 has joined #ruby
<horrror> I guess RMagick is the way to go. but how do I make it to be a video?
pygmael has joined #ruby
<Hgananavak> catphish: Interesting, however 'Desktop Apps' are what we spend most of the time working on! So what do you do with Ruby then, simple scripting etc?
willclark has left #ruby [#ruby]
<catphish> Hgananavak: i write web apps, server daemons, command line tools
<catphish> my job is mostly socket programming and server side data processing
nga4 has quit [Ping timeout: 255 seconds]
lggr has quit [Ping timeout: 246 seconds]
jgwong has quit [Ping timeout: 252 seconds]
ph^ has quit [Ping timeout: 245 seconds]
phantasm66 has quit [Quit: *sleeeeep*]
JustinCampbell has quit [Remote host closed the connection]
xyzodiac has quit [Quit: Computer has gone to sleep.]
jgwong has joined #ruby
murtas has quit [Quit: leaving]
pygmael has quit [Client Quit]
<catphish> we also use ruby for server and network management tools
hadees has joined #ruby
<Hgananavak> Hmm, that's a shame. I'm more looking for something which I can easily create Desktop apps in, as this is what I do day-to-day.
stopbit has quit [Quit: Leaving]
<catphish> ruby has good GTK bindings if you wanted to use GTK
<catphish> but i've always preferred C for that
<Hgananavak> Mhmm tis true, not really a fan. Mucked around with PHP-GTK for a while, too hacky for my liking
peregrine81 has quit [Quit: Computer sleeping.]
<catphish> I use GTK with C which is really nice
lggr has joined #ruby
xyzodiac has joined #ruby
hoelzro is now known as hoelzro|away
jblack has joined #ruby
axl_ has quit [Quit: axl_]
joofsh has quit [Ping timeout: 246 seconds]
rakm has joined #ruby
<GoHuyGo> I am using map to create a new array
cjs226 has joined #ruby
<blazes816> nice!
<GoHuyGo> do I just assign a new variable
<GoHuyGo> to the block?
<GoHuyGo> i.e.
<GoHuyGo> b = a.map do |item| ...
<GoHuyGo> it works liek this
lggr has quit [Ping timeout: 260 seconds]
<GoHuyGo> but I just want to know if it's proper
<catphish> usually you would do b = as.map {|a|a.somtthing}
<GoHuyGo> let me show you a pastie
<blazes816> b = a.map(&:object_id); a.map!(&:object_id)
<GoHuyGo> blazes816: confused with that line
<blazes816> GoHuyGo: those are the two ways to use map
horrror has quit [Quit: horrror]
<GoHuyGo> okay
<GoHuyGo> am I using it correctly?
<blazes816> what you have should be fine. I use the convention that {} is for return data and do;end is for "side-effect" type stuff
<jgwong> GoHuyGo: Yep
<GoHuyGo> okay
<blazes816> do I'd personally use {}. but do; end works just fine
<GoHuyGo> is it faster than declaring a new array
ponty has quit [Read error: Connection reset by peer]
<GoHuyGo> and then pushing data set to new array
<GoHuyGo> @photo_array = [ ]
<blazes816> probably midly
<GoHuyGo> and in the block
ponty has joined #ruby
ponty has quit [Client Quit]
<GoHuyGo> @photo_array << new_data
<GoHuyGo> okay
<GoHuyGo> thanks :D
<blazes816> but you needn't concert yourself with such things, otherwise use c :D
<blazes816> np
<jgwong> :D
banseljaj is now known as imami|afk
theRoUS has quit [Ping timeout: 260 seconds]
lggr has joined #ruby
headius has quit [Quit: headius]
linoj has quit [Quit: linoj]
gllmpn has joined #ruby
jasonkuhrt has joined #ruby
carwin is now known as carwin|away
awarner has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 240 seconds]
jasonkuhrt has quit [Ping timeout: 245 seconds]
Criztian has quit [Remote host closed the connection]
BrokenCo1 has joined #ruby
BrokenCog has quit [Read error: Connection reset by peer]
tommyvyo has joined #ruby
ph^ has joined #ruby
lggr has joined #ruby
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
etherdev has joined #ruby
axl_ has joined #ruby
mengu has quit [Remote host closed the connection]
Forevernade has quit [Read error: Connection reset by peer]
Caius has quit [Ping timeout: 252 seconds]
xeronic has quit []
Forevernade has joined #ruby
stephenjudkins has joined #ruby
booginga has quit [Quit: Leaving]
carson has joined #ruby
tbbach has joined #ruby
jrunning has joined #ruby
dmiller has joined #ruby
replore has joined #ruby
thillux has joined #ruby
lggr has quit [Ping timeout: 244 seconds]
kpshek has quit []
Caius has joined #ruby
samphippen has joined #ruby
glyytchy has joined #ruby
jeffreybaird has joined #ruby
ph^ has quit [Ping timeout: 245 seconds]
Virunga has quit [Remote host closed the connection]
<jrunning> As a Ruby newbie, should I learn rspec, Test::Unit, or minitest first?
minijupe has quit [Quit: minijupe]
jgwong has quit [Ping timeout: 256 seconds]
sent-hil has joined #ruby
sent-hil has quit [Remote host closed the connection]
frogprince_mac has quit [Quit: Leaving...]
lggr has joined #ruby
jgwong has joined #ruby
Targen has quit [Ping timeout: 245 seconds]
stephenjudkins has quit [Quit: stephenjudkins]
sent-hil has joined #ruby
CarlB_the_great has quit [Remote host closed the connection]
<swarley_> jrunning, minitest has them all
<swarley_> i prefer rspec, but unit testing is pretty easy too
<swarley_> also, anyone who wants to offer any advice, this is what i have so far on my IRC library for plugins
<swarley_> its pretty alpha as far as completion
stim371 has joined #ruby
bier has quit [Ping timeout: 248 seconds]
rabidpraxis has quit [Remote host closed the connection]
swarley has quit [Disconnected by services]
swarley has joined #ruby
falieson has joined #ruby
swarley has quit [Client Quit]
lggr has quit [Ping timeout: 246 seconds]
swarley_ is now known as swarley
replore has quit [Remote host closed the connection]
<falieson> http://pastie.org/4832194 yesterday to fix duplicates in line 22 we used min_id = [status.id, min_id].min but I don't really understand what it does, especially to modify it for this version of the script that updates the current db, rather than downloading it from scratch
hbpoison has joined #ruby
<falieson> yesterdays script that 100% works to download all the tweets -> http://pastie.org/4832212
<blazes816> nice
LouisGB has quit [Ping timeout: 246 seconds]
minijupe has joined #ruby
lggr has joined #ruby
<jrunning> swarley: Oh, didn't realize MiniTest::Spec mimics the rspec syntax. Thanks.
justinmcp has quit [Remote host closed the connection]
<falieson> blazes816 sorry, bad paste. refresh -> http://pastie.org/4832194
minijupe has quit [Client Quit]
<falieson> line 21 in the download script keeps me from getting a ton of duplicates and the loop never finishing
<falieson> how do I modify that for http://pastie.org/4832212 to just update my db with tweets since the original download
hbpoison has quit [Ping timeout: 260 seconds]
replore has joined #ruby
replore has quit [Remote host closed the connection]
Monie has quit [Ping timeout: 260 seconds]
pygmael has joined #ruby
<blazes816> idk why you're doing that
<blazes816> min_id = [status.id, min_id].min obviously sets min_id to the lowest of those two vals
<blazes816> but idk what the goal is
pygmael has quit [Client Quit]
fbernier has quit [Quit: ZNC - http://znc.in]
fbernier has joined #ruby
apok_ has joined #ruby
joeycarmello has joined #ruby
apok has quit [Ping timeout: 255 seconds]
apok_ is now known as apok
bier has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
fredjean has quit [Quit: Computer has gone to sleep.]
jgwong has quit [Ping timeout: 244 seconds]
<tbbach> u can check if id is already on db before doing dataset.insert()
Synthead has quit [Quit: p33 ba115]
alek_b_ has joined #ruby
<falieson> that's what I thought it did too
alek_b has quit [Read error: Connection reset by peer]
beit has quit [Quit: beit]
axl_ has quit [Quit: axl_]
lggr has joined #ruby
emmanuelux has quit [Quit: emmanuelux]
daniel_- has quit [Ping timeout: 248 seconds]
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
cj__ has joined #ruby
cj__ has quit [Client Quit]
classix has quit [Quit: leaving]
ph^ has joined #ruby
<falieson> tbbach: so twitter api results are t_id ORDER BY DESC
cj__ has joined #ruby
<falieson> by grabbing the highest t_id already in my database, I set the limit of the search (since_id)
classix has joined #ruby
<falieson> the first result I get from twitter will be the highest t_id currently available for the query
pettsson has quit [Remote host closed the connection]
<falieson> and then I have to fill backwards all the way back to my original t_id.max
daniel_- has joined #ruby
hackeron has quit [Read error: Operation timed out]
<falieson> I can check for duplicates, and only insert uniques but if the output isn't iterating properly then its still just going to infinite loop
<falieson> its going to keep searching through the same set everytime
kirun has quit [Quit: Client exiting]
<falieson> aha… so I think what I need to do is use max_id and since_id
cj__ has quit [Client Quit]
<falieson> sorry for coming to you to answer my own question, haha
cj__ has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
<falieson> thanks tbbach and blazes816
josh^ has joined #ruby
Monie has joined #ruby
Monie has joined #ruby
Monie has quit [Changing host]
statarb3 has quit [Quit: Leaving]
lggr has joined #ruby
ph^ has quit [Ping timeout: 246 seconds]
jonathanwallace has quit [Remote host closed the connection]
nari has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
cj__ has quit [Quit: cj__]
jonathanwallace has joined #ruby
seanstickle has joined #ruby
aantix has quit [Quit: aantix]
davidcelis has quit [Quit: K-Lined.]
samphippen has quit [Quit: Computer has gone to sleep.]
jimeh has joined #ruby
lggr has quit [Ping timeout: 248 seconds]
cj__ has joined #ruby
gabrielrotbart has joined #ruby
jonathanwallace has quit [Remote host closed the connection]
skogis has quit [Ping timeout: 244 seconds]
carson has quit [Quit: carson]
vitor-br has quit [Ping timeout: 246 seconds]
jasonkuhrt has joined #ruby
tbbach has quit [Quit: tbbach]
bradleyprice has joined #ruby
jenrzzz has joined #ruby
lggr has joined #ruby
jjang has joined #ruby
jjang has quit [Remote host closed the connection]
jasonkuhrt has quit [Ping timeout: 245 seconds]
slicslak has quit [Ping timeout: 260 seconds]
justinmcp has joined #ruby
sent-hil has quit [Remote host closed the connection]
slicslak has joined #ruby
carson has joined #ruby
sailias has joined #ruby
tbbach has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
nga4 has joined #ruby
daniel_- has quit [Quit: WeeChat 0.3.8]
tgraham|away is now known as tgraham
Hgananavak has quit [Quit: Page closed]
luckyruby has quit [Remote host closed the connection]
umttumt has quit [Remote host closed the connection]
lggr has joined #ruby
kiyoura has joined #ruby
cj__ has quit [Quit: cj__]
<falieson> such a great feeling. I think i got it! =)
sebastorama has quit [Quit: Computer has gone to sleep.]
hackeron has joined #ruby
BSaboia has quit [Read error: Connection reset by peer]
icole has quit [Remote host closed the connection]
ph^ has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
tommyvyo has quit [Quit: Computer has gone to sleep.]
jenrzzz has quit [Ping timeout: 260 seconds]
eignerchris has joined #ruby
Esa_1 has joined #ruby
stephenjudkins has joined #ruby
lggr has joined #ruby
ianbrandt has quit [Quit: ianbrandt]
mercwithamouth has joined #ruby
chussenot has quit [Quit: chussenot]
monkegjinni has quit [Remote host closed the connection]
adeponte has quit [Remote host closed the connection]