apeiros changed the topic of #ruby-lang to: Ruby 2.1.0; 2.0.0-p353; 1.9.3-p484: http://ruby-lang.org || Paste >3 lines of text on http://gist.github.com || RubyConf 2013 at http://www.justin.tv/confreaks
kalehv has joined #ruby-lang
seanlinsley has quit [Quit: …]
woollyams has quit [Ping timeout: 252 seconds]
mykoweb has quit [Remote host closed the connection]
jonr22 has joined #ruby-lang
jsullivandigs has quit [Remote host closed the connection]
micalexander has joined #ruby-lang
Pell has quit [Remote host closed the connection]
hahuang65 has quit [Ping timeout: 245 seconds]
heavyhorse has quit [Quit: :quit]
elia has quit [Quit: Computer has gone to sleep.]
__butch__ has quit [Quit: Leaving.]
vlad_starkov has quit [Ping timeout: 260 seconds]
nXqd_ has quit [Ping timeout: 248 seconds]
micalexander has quit [Remote host closed the connection]
micalexander has joined #ruby-lang
Cakey has quit [Ping timeout: 265 seconds]
elliotec has quit [Remote host closed the connection]
elliotec has joined #ruby-lang
shinnya has quit [Ping timeout: 264 seconds]
eugmill has joined #ruby-lang
jsullivandigs has joined #ruby-lang
micalexander has quit [Ping timeout: 248 seconds]
Pell has joined #ruby-lang
micalexander has joined #ruby-lang
JoshuaPaling has joined #ruby-lang
|jemc| has quit [Ping timeout: 252 seconds]
Johz has quit [Quit: Leaving]
Cakey has joined #ruby-lang
mykoweb has joined #ruby-lang
postmodern has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
elliotec has quit [Remote host closed the connection]
mykoweb has quit [Remote host closed the connection]
zastern has quit [Quit: WeeChat 0.4.2]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jtw has quit []
charliesome has joined #ruby-lang
kalehv has quit [Remote host closed the connection]
mistym has quit [Remote host closed the connection]
benanne has quit [Quit: kbai]
mistym has joined #ruby-lang
Raynes has joined #ruby-lang
bradcliffe has quit [Quit: Textual IRC Client: www.textualapp.com]
jonr22 has quit [Remote host closed the connection]
jonr22 has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
Cakey has quit [Ping timeout: 265 seconds]
jonr22 has quit [Read error: Operation timed out]
chare has joined #ruby-lang
chare has left #ruby-lang [#ruby-lang]
lcdhoffman has joined #ruby-lang
ruby-lang323 has joined #ruby-lang
henrikhodne has quit [Ping timeout: 245 seconds]
Guest85414______ has quit [Ping timeout: 245 seconds]
henrikhodne has joined #ruby-lang
mikecmpbll has quit [Quit: i've nodded off.]
Guest85414______ has joined #ruby-lang
tsou has quit [Quit: off]
ruby-lang323 has quit [Ping timeout: 245 seconds]
tylersmith has quit [Remote host closed the connection]
seanlinsley has joined #ruby-lang
surtin has joined #ruby-lang
tkuchiki has joined #ruby-lang
surtin has quit [Client Quit]
woollyams has joined #ruby-lang
ikrima has joined #ruby-lang
ecnalyr has quit [Remote host closed the connection]
RoxasShadowRS has quit [Quit: Leaving]
kalehv has joined #ruby-lang
vlad_starkov has joined #ruby-lang
cored has quit [Ping timeout: 265 seconds]
iliketur_ has quit [Quit: zzzzz…..]
Lewix has joined #ruby-lang
marr has quit [Ping timeout: 265 seconds]
* centrx has noticed that Rails 2.1 seems to be 25% faster than Rails 2.0
<centrx> err, Ruby 2.1 and Ruby 2.0
<whitequark> it is
<Lewix> really?
<drbrain> really
<drbrain> the generational GC helps a bunch
<centrx> plus the Method Cache apparently
wallerdev has joined #ruby-lang
<pipework> centrx: lul.
<pipework> drbrain: Well, 1.9 to 2.1 seems more interesting to me, since 2.0 was slower than 1.9.
<drbrain> pipework: I found 2.0 to be faster for my workload
nertzy3 has joined #ruby-lang
<pipework> drbrain: I can't really back things up because I don't know where I read the article with some benchmarks that weren't too silly, and I don't know how I'd benchark it myself.
<centrx> pipework, We are living in real-world applications
<pipework> Me too
Cakey has joined #ruby-lang
<pipework> The benchmark I read was extracted from units of work in a real world application. :)
* drbrain nods
<pipework> drbrain: But I feel like 2.1 is super zippy!
nertzy2 has quit [Ping timeout: 252 seconds]
elliotec has joined #ruby-lang
<pipework> drbrain: Can you instrument the garbage collector to visualize similar to jvisualvm?
<drbrain> pipework: my typical usage is `rake test` for pure-ruby code
<pipework> drbrain: But does it output nyancat? Let's get real here.
Simpller has quit [Quit: Leaving]
* centrx is installing 1.9 to prove pipework wrong once and for all!
ecnalyr has joined #ruby-lang
<pipework> drbrain: Oh, I'm that ginger kid from PDXRuby when you guys talked about drb and shoes.
<pipework> centrx: Certainly you don't think that 2.0 was an improvement for 1.9 across the board?
mistym has quit [Remote host closed the connection]
<drbrain> for rdoc, 1.9.3: 8.3s, 2.0.0: 8.3s, 2.1.0: 7.2s
<drbrain> pipework: ah, ok
<centrx> Does "across the board" mean faster in most real-world circumstances. Or does it mean there exists some function for which it is slower.
<drbrain> rdoc is very much GC dependent
<pipework> centrx: Surely you don't think that your real world circumstance encompasses every possible way that ruby can be used, do you?
<centrx> My program uses all possible functionality.
<pipework> I'm sure.
kalehv has quit [Read error: Connection reset by peer]
diegoviola has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 260 seconds]
seanlinsley has quit [Ping timeout: 252 seconds]
kalehv has joined #ruby-lang
<centrx> pipework, Besides, "Performance optimizations" is listed in the changelog for 2.0
<pipework> centrx: Mmmhmm.
ecnalyr has quit [Client Quit]
iliketurtles has joined #ruby-lang
<centrx> pipework, You don't see any category for "Performance degradations" do you?
<pipework> I bet it is!
<centrx> Set and match.
seanlinsley has joined #ruby-lang
<pipework> Man, you are just so clever. I bet you have awards and certificates for how smart you is.
* centrx has entered pipework's subdermal layer
<pipework> Nawbruv, that's where I keep my souls. You can tell because freckles.
<centrx> Look at this
<centrx> /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
<pipework> https://www.ruby-forum.com/topic/4411594 This one is an example of performance degredations on release, but I'm sure it's fixed.
<centrx> Ruby 1.9 doesn't even work, so how could it be better than 2.0?
<drbrain> centrx: sounds like your ruby install is broken
<drbrain> centrx: since its from /usr/lib, I'll blame debian/ubuntu
<pipework> Oh wait, it's not even slated for 2.0, it's for 2.2
* centrx has installed four versions of Ruby on his system, including experimental
hahuang65 has joined #ruby-lang
<pipework> you can never have too many!
<pipework> in the case of mruby, take two, they're small!
<centrx> Good point, I should install mruby
mistym has joined #ruby-lang
<centrx> pipework, Looks like Ruby 2.1 is even slower with that contrived CPU benchmark
<pipework> centrx: Looks like ruby 1.8 was fast enough and all benchmarks on everything there and after were contrived as well.
<pipework> I'm sure you never create a lot of unique objects though, pretty edge case.
<centrx> Uh oh, my code uses keyword arguments
<centrx> Can't test it with Ruby 1.9
<pipework> It's a hash in 1.9
<centrx> I know but how much should I alter my code for this benchmark
<pipework> None because you already feel like you're right, so why bother?
<centrx> Hmm, you are very wise.
<centrx> Looks like it's only one method definition
<centrx> Hmm, another bug
<centrx> This Ruby 1.9 sure lacks a lot of features found in Ruby 2.0+
|jemc| has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
brettweavnet has joined #ruby-lang
JoshuaPaling has quit [Read error: Connection reset by peer]
<centrx> pipework, Okay I give up
<centrx> You win
<centrx> Ruby 1.9 is the fastest
<centrx> But it lacks ground-breaking features
tylersmith has joined #ruby-lang
Pell has quit [Remote host closed the connection]
<pipework> centrx: I'm sure.
Pell has joined #ruby-lang
vlad_starkov has joined #ruby-lang
tylersmith has quit [Ping timeout: 245 seconds]
retro|cz has joined #ruby-lang
Pell has quit [Ping timeout: 248 seconds]
amclain has joined #ruby-lang
Elico has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
<centrx> pipework, If I fix this bug with the CPU benchmark, will you agree that Ruby > 1.9 is the fastest ever and give me an award?
<pipework> centrx: If you fix every performance degredation in 2.0, then yes.
<pipework> I think drbrain might even smirk at you.
<centrx> Okay, when I fix this one I will ask you for the next one
<pipework> centrx: Ping me when it's accepted and in 2.0, bonus points if it's accepted for 2.0+
havenwood has joined #ruby-lang
mykoweb has joined #ruby-lang
<centrx> It looks like 2.1 has the same problem
<pipework> Probably why it's slated for 2.2
apeiros has quit [Remote host closed the connection]
sepp2k has quit [Read error: Connection reset by peer]
apeiros has joined #ruby-lang
* centrx is outraged about this bug
brettweavnet has quit [Quit: Bye]
fijimunkii has quit [Ping timeout: 260 seconds]
eugmill has quit [Remote host closed the connection]
Pell has joined #ruby-lang
Pell_ has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 240 seconds]
Pell has quit [Ping timeout: 245 seconds]
Pell_ has quit [Ping timeout: 245 seconds]
marcdel has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
marcdel has quit [Read error: Operation timed out]
marcdel has joined #ruby-lang
ruby-lang370 has joined #ruby-lang
<ruby-lang370> hello
unsymbol has quit [Ping timeout: 260 seconds]
<centrx> Ahoy
<ruby-lang370> I have a code desing question. Lets say I have some single responsibility class which has one boolean method, this method calls some method of another object which is a member of this class..then..
mehlah has quit [Quit: Leaving...]
mykoweb has quit [Remote host closed the connection]
<centrx> Probably should paste the code or pseudo-code instead of describing it in English
unsymbol has joined #ruby-lang
<ruby-lang370> this object makes some http requests for some json data, which can contain data "true" or "false"..so the first method i mentioned can return true or false..but what can i do if network error occurs, lets say i catch an excpetion in my object that deals with http requests.
<ruby-lang370> I was thinking to return false, but doesnt seem right to me..I am writing this library which other programmers will use
knu has quit [Ping timeout: 264 seconds]
<ruby-lang370> from api consumer point of view, what is the best approach here, should the api consumer catch an exception and handle it on their own ?
<ruby-lang370> I dont have a coding issue <centrix> jsut api design question.
TheMoonMaster has quit [Excess Flood]
bradcliffe has joined #ruby-lang
nathanstitt has joined #ruby-lang
<ruby-lang370> Let's say you have an online service to which you can query like http://www.isitfridayyet, which will return a json containing true or false.. You have a class with method def is_it_friday_yet? which return only true and false
<ruby-lang370> this method lets some other object do the http asking..
<ruby-lang370> So my question is , how to properly handle exceptions
<ruby-lang370> in this case
<ruby-lang370> lets say Timeout::Error occurs
<ruby-lang370> so exception occurs , do i propagate it to the top and let api consumer decide what to do.
<ruby-lang370> It seems simple question, but I think its not so obvious always what to do.
<centrx> Use retries
<centrx> For one
<centrx> if retries fail, then throw error
mwillhite has joined #ruby-lang
<mwillhite> hey, not sure the best place to ask this…I'm writing an app that will just be run in terminal…how do I display a screen and refresh the data on it?
fijimunkii has joined #ruby-lang
<centrx> mwillhite, Not sure if that is the preferred way
FlyingLeap has quit [Ping timeout: 248 seconds]
<mwillhite> hm…yeah I'm looking for something like how zeus has one screen…then colors and words update on that screen
vlad_starkov has joined #ruby-lang
<mwillhite> its not just printing more and more, its actually replacing whats already there
kalehv has quit [Remote host closed the connection]
bzalasky has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
<centrx> mwillhite, Try #ruby
bzalasky has quit [Remote host closed the connection]
TheMoonMaster has joined #ruby-lang
<mwillhite> okay thanks
RobertBirnie has joined #ruby-lang
bzalasky has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
<ruby-lang370> centrix, yea I was thinking about retries, but it creates blocking waits, then threading should be maybe used
bzalasky has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
<ruby-lang370> Maybe using something like a promise pattern i found in javascript :) http://martinfowler.com/bliki/JavascriptPromise.html
Mousse_ has quit [Quit: Computer has gone to sleep.]
<ruby-lang370> nah..Ill just go with handling excpetions myself..retrying once if timeout occurs and propagating exception up the excecution tree if it fails again or if any other network error happens
ruby-lang370 has quit [Quit: Page closed]
tylersmith has joined #ruby-lang
micalexander has quit [Remote host closed the connection]
micalexander has joined #ruby-lang
kalehv has joined #ruby-lang
micalexander has quit [Ping timeout: 248 seconds]
toasty has joined #ruby-lang
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nXqd_ has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 265 seconds]
eugmill has joined #ruby-lang
mehlah has joined #ruby-lang
Pell has joined #ruby-lang
mdub has joined #ruby-lang
D9 has joined #ruby-lang
mdub has quit [Read error: Connection reset by peer]
Pell has quit [Remote host closed the connection]
woollyams has quit [Ping timeout: 252 seconds]
woollyams has joined #ruby-lang
woollyams has quit [Read error: Connection reset by peer]
fedexo has joined #ruby-lang
mykoweb has joined #ruby-lang
woollyams has joined #ruby-lang
woollyams has quit [Read error: Connection reset by peer]
fijimunkii has quit [Read error: Connection reset by peer]
elliotec has quit [Remote host closed the connection]
woollyams has joined #ruby-lang
woollyams has quit [Read error: Connection reset by peer]
fijimunkii has joined #ruby-lang
woollyams has joined #ruby-lang
bahar has joined #ruby-lang
mehlah has quit [Quit: Leaving...]
jyunderwood has joined #ruby-lang
joelroa has quit [Ping timeout: 245 seconds]
jyunderwood has quit [Client Quit]
vlad_starkov has joined #ruby-lang
eugmill has quit [Remote host closed the connection]
bzalasky has joined #ruby-lang
bahar has quit [Changing host]
bahar has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
<centrx> Question: Why can't I get Ruby to compile with the -pg option for profiling with gprof?
bzalasky has joined #ruby-lang
mehlah has joined #ruby-lang
michd has joined #ruby-lang
zastern has joined #ruby-lang
michd has quit [Ping timeout: 252 seconds]
samlambe- has quit [Ping timeout: 252 seconds]
samlambert has joined #ruby-lang
fijimunkii has quit [Read error: Connection reset by peer]
jsullivandigs has quit [Remote host closed the connection]
fijimunkii has joined #ruby-lang
rkmetzl has quit [Read error: Connection reset by peer]
rkmetzl has joined #ruby-lang
fijimunkii has quit [Ping timeout: 265 seconds]
mwillhite has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fijimunkii has joined #ruby-lang
Lewix has joined #ruby-lang
joelroa has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
Lewix has joined #ruby-lang
matp has quit [Ping timeout: 245 seconds]
rahul_j has joined #ruby-lang
fijimunkii has quit [Read error: Connection reset by peer]
Rickmast- has quit [Read error: Operation timed out]
Gate has quit [Read error: Operation timed out]
matp has joined #ruby-lang
micalexander has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 265 seconds]
Gate has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
iliketurtles has quit [Quit: zzzzz…..]
joelroa has quit [Ping timeout: 245 seconds]
tcopp has quit [Ping timeout: 252 seconds]
kalehv has quit [Remote host closed the connection]
Rickmasta has joined #ruby-lang
micalexander has quit [Ping timeout: 265 seconds]
iliketurtles has joined #ruby-lang
toasty has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
mistym has quit [Remote host closed the connection]
rahul_j has quit [Quit: rahul_j]
knu has joined #ruby-lang
woollyams has quit [Ping timeout: 252 seconds]
beawesomeinstead has quit [Ping timeout: 252 seconds]
woollyams has joined #ruby-lang
tcopp has joined #ruby-lang
Raycaster has left #ruby-lang [#ruby-lang]
tcopp has quit [Ping timeout: 240 seconds]
beawesomeinstead has joined #ruby-lang
Pell has joined #ruby-lang
beawesomeinstead has joined #ruby-lang
beawesomeinstead has quit [Changing host]
beawesomeinstead has quit [Changing host]
beawesomeinstead has joined #ruby-lang
beawesomeinstead has quit [Changing host]
beawesomeinstead has joined #ruby-lang
vlad_starkov has joined #ruby-lang
Pell has quit [Ping timeout: 265 seconds]
<centrx> drbrain, What is the deal with the #ruby-core channel?
iliketur_ has joined #ruby-lang
elliotec has joined #ruby-lang
elliotec has quit [Remote host closed the connection]
elliotec has joined #ruby-lang
iliketurtles has quit [Ping timeout: 260 seconds]
rahul_j has joined #ruby-lang
<pipework> centrx: I'm not sure he gets the joke.
<pipework> For that matter, neither to I.
<centrx> Is there a joke?
<centrx> I am unable to compile Ruby with profiling information:
<centrx> /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/gcrt1.o: relocation R_X86_64_32S against `__libc_csu_fini' can not be used when making a shared object; recompile with -fPIC
<centrx> /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/gcrt1.o: error adding symbols: Bad value
JohnBat26 has joined #ruby-lang
<centrx> How can I get awards and certificates if I can't compile with profiling information?
dik_dak has quit [Quit: Leaving]
kalehv has joined #ruby-lang
dc5ala has joined #ruby-lang
phansch has joined #ruby-lang
kalehv has quit [Ping timeout: 272 seconds]
joelroa has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 272 seconds]
rippa has joined #ruby-lang
joelroa has quit [Ping timeout: 265 seconds]
anna has joined #ruby-lang
anna is now known as Guest15583
mistym has joined #ruby-lang
eject_ck has joined #ruby-lang
amerine has quit [Quit: Computer has gone to sleep.]
toasty has joined #ruby-lang
amerine has joined #ruby-lang
tcopp has joined #ruby-lang
fijimunkii has joined #ruby-lang
Guest15583 has quit [Read error: Connection reset by peer]
dingus_khan has joined #ruby-lang
toasty has quit [Remote host closed the connection]
rahul_j has quit [Quit: rahul_j]
tcopp has quit [Ping timeout: 240 seconds]
vlad_starkov has joined #ruby-lang
woollyams has quit [Ping timeout: 252 seconds]
chancancode has quit [Ping timeout: 245 seconds]
randym_ has quit [Ping timeout: 245 seconds]
chancancode has joined #ruby-lang
randym_ has joined #ruby-lang
nXqd_ has quit [Ping timeout: 240 seconds]
mykoweb has quit [Remote host closed the connection]
rahul_j has joined #ruby-lang
kalehv has joined #ruby-lang
Guest15583 has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
tcopp has joined #ruby-lang
kalehv has quit [Ping timeout: 245 seconds]
tonni has quit [Remote host closed the connection]
heftig has quit [Quit: Quitting]
tcopp has quit [Ping timeout: 265 seconds]
rahul_j_ has joined #ruby-lang
rahul_j has quit [Ping timeout: 248 seconds]
rahul_j_ is now known as rahul_j
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
tylersmith has quit [Remote host closed the connection]
Iravan has joined #ruby-lang
tylersmith has joined #ruby-lang
joelroa has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 265 seconds]
earthquake has quit [Quit: earthquake]
joelroa has quit [Ping timeout: 248 seconds]
tylersmith has quit [Ping timeout: 265 seconds]
kalehv has joined #ruby-lang
tonni has joined #ruby-lang
kalehv has quit [Read error: Connection reset by peer]
kalehv_ has joined #ruby-lang
toasty has joined #ruby-lang
woollyams has joined #ruby-lang
CaptainJet has quit []
Mon_Ouie has quit [Read error: Operation timed out]
toasty has quit [Remote host closed the connection]
Guest15583 is now known as k0t0n0\
k0t0n0\ is now known as k0t0n0
kalehv_ has quit [Ping timeout: 252 seconds]
joelroa has joined #ruby-lang
knu has quit [Ping timeout: 252 seconds]
vlad_starkov has joined #ruby-lang
knu has joined #ruby-lang
amclain has quit [Quit: Leaving]
joelroa has quit [Ping timeout: 265 seconds]
iliketur_ has quit [Quit: Textual IRC Client: www.textualapp.com]
rkmetzl has quit [Quit: rkmetzl]
Onixs has quit [Quit: Caught sigterm, terminating...]
knu has quit [Ping timeout: 252 seconds]
toasty has joined #ruby-lang
tonni has quit [Read error: Connection reset by peer]
knu has joined #ruby-lang
Onixs has joined #ruby-lang
guns has joined #ruby-lang
Coincidental has quit [Remote host closed the connection]
elliotec has quit [Remote host closed the connection]
woollyams has quit [Ping timeout: 252 seconds]
knu has quit [Ping timeout: 252 seconds]
centrx has quit [Quit: Leaving]
knu has joined #ruby-lang
mehlah has quit [Quit: Leaving...]
tonni has joined #ruby-lang
solars has joined #ruby-lang
tcopp has joined #ruby-lang
kitak has quit [Read error: Connection reset by peer]
kitak has joined #ruby-lang
k0t0n0 has quit [Quit: Leaving]
knu has quit [Ping timeout: 252 seconds]
tonni has quit [Read error: Connection reset by peer]
knu has joined #ruby-lang
tcopp has quit [Ping timeout: 245 seconds]
dingus_khan has quit [Remote host closed the connection]
toasty has quit [Remote host closed the connection]
elliotec has joined #ruby-lang
elliotec has quit [Remote host closed the connection]
elliotec has joined #ruby-lang
tonni has joined #ruby-lang
amerine has quit [Quit: Computer has gone to sleep.]
arBmind has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 252 seconds]
knu has quit [Ping timeout: 253 seconds]
amerine has joined #ruby-lang
knu has joined #ruby-lang
mistym has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
tonni has quit [Ping timeout: 245 seconds]
michd is now known as MichD
bradcliffe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
closer has quit [Ping timeout: 256 seconds]
tonni has joined #ruby-lang
RoxasShadowRS has joined #ruby-lang
closer has joined #ruby-lang
joelroa has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
toasty has joined #ruby-lang
bzalasky has joined #ruby-lang
Cakey has quit [Ping timeout: 265 seconds]
joelroa has quit [Ping timeout: 240 seconds]
tonni has quit [Remote host closed the connection]
tonni has joined #ruby-lang
bzalasky has quit [Ping timeout: 248 seconds]
tonni has quit [Read error: Connection reset by peer]
guns has quit [Quit: guns]
arBmind has quit [Quit: Leaving.]
vlad_starkov has quit [Remote host closed the connection]
tsou has joined #ruby-lang
elliotec has quit []
elliotec has joined #ruby-lang
elliotec has quit [Remote host closed the connection]
Cakey has joined #ruby-lang
benlovell has joined #ruby-lang
skade has joined #ruby-lang
tcopp has joined #ruby-lang
matp has quit [Ping timeout: 252 seconds]
tbuehlmann has joined #ruby-lang
kitak has quit [Remote host closed the connection]
toasty has quit [Remote host closed the connection]
tcopp has quit [Ping timeout: 240 seconds]
mikecmpbll has joined #ruby-lang
rahul_j has quit [Quit: rahul_j]
tonni has joined #ruby-lang
kitak has joined #ruby-lang
arBmind has joined #ruby-lang
phansch has quit [Quit: Leaving]
heftig has joined #ruby-lang
marcofernandez has quit [Ping timeout: 260 seconds]
dingus_khan has joined #ruby-lang
mikecmpbll has quit [Quit: i've nodded off.]
robbyoconnor has joined #ruby-lang
robbyoconnor has quit [Changing host]
robbyoconnor has joined #ruby-lang
diegoviola has quit [Quit: WeeChat 0.4.3]
dingus_khan has quit [Ping timeout: 272 seconds]
matp has joined #ruby-lang
joonty_ has joined #ruby-lang
rahul_j has joined #ruby-lang
vlad_starkov has joined #ruby-lang
Cakey has quit [Ping timeout: 252 seconds]
joonty has quit [Ping timeout: 252 seconds]
mikecmpbll has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 260 seconds]
Voker57 has quit [Ping timeout: 245 seconds]
Voker57 has joined #ruby-lang
benlovell has quit [Ping timeout: 240 seconds]
francisfish has joined #ruby-lang
<yorickpeterse> morning
<matti> Hi Yorik
<yorickpeterse> * Yorick
<yorickpeterse> with a c
<matti> I know, i am on a train writing from mibile
<matti> bit laggy, sorru :)
<matti> Hows tricks?
Gue______ has joined #ruby-lang
joelroa has joined #ruby-lang
Gue______ is now known as Rubyday
francisfish has quit [Ping timeout: 245 seconds]
joelroa_ has joined #ruby-lang
<Rubyday> Hey everyone, new to ruby. Anyways, just read Poignant's guide and did LRHW - any suggestions where to go from there?
benlovell has joined #ruby-lang
<matti> Write code!
<matti> ;)
<ljarvis> moin
apeiros has quit [Remote host closed the connection]
<ljarvis> +1 for writing code
joelroa has quit [Ping timeout: 265 seconds]
joelroa has joined #ruby-lang
apeiros has joined #ruby-lang
<maloik_> ugh, design is hard
<maloik_> whowuddathunk
<Rubyday> Thank you everyone :D
joelroa_ has quit [Ping timeout: 248 seconds]
marr has joined #ruby-lang
<Rubyday> What is beginner to intermediate to code?
<pipework> about between luke-warm to warm.
benlovell has quit [Ping timeout: 260 seconds]
joelroa has quit [Ping timeout: 240 seconds]
<ljarvis> luke i am your warm
jsrn has joined #ruby-lang
benlovell has joined #ruby-lang
joelroa has joined #ruby-lang
Rubyday has quit [Quit: Textual IRC Client: www.textualapp.com]
minivan has joined #ruby-lang
joelroa has quit [Ping timeout: 260 seconds]
joelroa has joined #ruby-lang
elia has joined #ruby-lang
joelroa has quit [Ping timeout: 252 seconds]
mehlah has joined #ruby-lang
joelroa has joined #ruby-lang
joelroa has quit [Max SendQ exceeded]
vlad_starkov has joined #ruby-lang
tcopp has joined #ruby-lang
joelroa has joined #ruby-lang
mehlah has quit [Client Quit]
jmeeuwen_ has joined #ruby-lang
jmeeuwen has quit [Read error: Connection reset by peer]
jmeeuwen_ is now known as jmeeuwen
tcopp has quit [Ping timeout: 265 seconds]
joelroa has quit [Ping timeout: 240 seconds]
nichtdiebohne has joined #ruby-lang
joelroa has joined #ruby-lang
<maloik_> http://hammr.co/8130259/1/index.html thoughts, rubyfriends ?
<pipework> maloik_: Do they have enough none-white non-male speakers?
<yorickpeterse> Looks allright, not enough pirate-ish stuff though
<maloik_> I meant thoughts about the design mostly ;-)
joelroa_ has joined #ruby-lang
<maloik_> but yea we're hard at work for that pipework
<pipework> I'm just sad that it'd eat up most of my conference budget to go!
<maloik_> yorickpeterse: the pirate stuff is a gimmick, we're not getting rid of it completely but toning it down a bit as it might scare off a more diverse audience
<yorickpeterse> pffff
<yorickpeterse> that's some horse crap right there if you'd ask me. You don't need pirates making people walk the plank or yell "ARRRRR ME COMING FOR YE BOOTEH" all teh time
<yorickpeterse> * the
vlad_starkov has quit [Remote host closed the connection]
<yorickpeterse> But the pirate theme in itself is pretty good fun
joelroa has quit [Ping timeout: 240 seconds]
<ljarvis> maloik_: that's the new place?
<maloik_> ljarvis: yessir
<ljarvis> impressive
<maloik_> it is, we're quite proud :-)
<ljarvis> I might do it again this year
joelroa has joined #ruby-lang
<ljarvis> im gonna be in germany around that time too
<ljarvis> so maybe i can head to ghent on my way home
<maloik_> yorickpeterse: it depends who you ask... someone else even suggested getting a new gender-unspecific (that's not a word I know) logo
<pipework> maloik_: I don't really buy into that argument. It always sounds like a bunch of self-taught psychiatrists projecting their insecurities.
<pipework> Maybe that's who you cater to, I don't know.
joelroa_ has quit [Ping timeout: 264 seconds]
<yorickpeterse> maloik_: that's another extreme end of the spectrum
<maloik_> I don't necessarily agree, and we can't just go ahead and change all that due to a limited budget
<yorickpeterse> Having said that, you can add a female pirate to the logo
<pipework> Or two!
<maloik_> I'm just pointing out that everyone has a different opinion on this stuff
<ljarvis> sigh
<maloik_> we're just doing what feels right
<yorickpeterse> No problem with that, just be careful to make sure that it's actually logical (if that's the right word) to do it
<ljarvis> make sure you have an african american and chinese pirate too
<maloik_> :-)
marcofernandez has joined #ruby-lang
<pipework> And a transgender pirate.
<ljarvis> maloik_: openminds must spend a buttload on arrrcamp
<ljarvis> arrrrcamp*
joelroa has quit [Ping timeout: 260 seconds]
<maloik_> mostly allowing us to do this during business hours, but yea openminds is definately the biggest sponsor in any case
joelroa has joined #ruby-lang
joelroa_ has joined #ruby-lang
toasty has joined #ruby-lang
joelroa has quit [Ping timeout: 252 seconds]
toretore has joined #ruby-lang
joelroa has joined #ruby-lang
joelroa_ has quit [Read error: Operation timed out]
rahul_j_ has joined #ruby-lang
rahul_j has quit [Ping timeout: 248 seconds]
rahul_j_ is now known as rahul_j
relix has joined #ruby-lang
toasty has quit [Ping timeout: 248 seconds]
joelroa_ has joined #ruby-lang
joelroa has quit [Ping timeout: 264 seconds]
joelroa has joined #ruby-lang
canton7-mac has joined #ruby-lang
workmad3 has joined #ruby-lang
francisfish has joined #ruby-lang
joelroa_ has quit [Ping timeout: 264 seconds]
Iravan has quit [Ping timeout: 252 seconds]
woollyams has joined #ruby-lang
joelroa has quit [Ping timeout: 260 seconds]
joelroa has joined #ruby-lang
prc has joined #ruby-lang
joelroa_ has joined #ruby-lang
workmad3 has quit [Ping timeout: 265 seconds]
workmad3 has joined #ruby-lang
aminRX has joined #ruby-lang
joelroa has quit [Ping timeout: 260 seconds]
joelroa has joined #ruby-lang
joelroa has quit [Max SendQ exceeded]
<yorickpeterse> ugh, I need to write myself a decent SQL GUI for Linux
<yorickpeterse> either the apps crash, do fuck all that I need or they're bloated Java SQL IDEs that look like they were made (and probably were) in 1995
joelroa_ has quit [Ping timeout: 240 seconds]
joelroa has joined #ruby-lang
<pipework> yorickpeterse: so, rails?
<pipework> LOL BECAUSE RAILS
ruby-lang039 has joined #ruby-lang
workmad3 has quit [Remote host closed the connection]
workmad3 has joined #ruby-lang
ruby-lang039 has quit [Client Quit]
<ljarvis> yorickpeterse: what dbms?
joonty_ has quit [Quit: WeeChat 0.4.2]
joelroa has quit [Ping timeout: 272 seconds]
<yorickpeterse> MyFirstSQL
<yorickpeterse> pipework: go away
joonty has joined #ruby-lang
<pipework> nowai
<yorickpeterse> The MyFirstSQL CLI is a pita to use
joelroa has joined #ruby-lang
<yorickpeterse> I was going to do this last weekend but didn't get to it
minivan has quit [Remote host closed the connection]
joelroa_ has joined #ruby-lang
marr has quit [Ping timeout: 260 seconds]
workmad3 has quit [Read error: Connection reset by peer]
workmad3 has joined #ruby-lang
joelroa has quit [Ping timeout: 264 seconds]
joelroa has joined #ruby-lang
joelroa_ has quit [Ping timeout: 264 seconds]
joelroa_ has joined #ruby-lang
workmad3 has quit [Ping timeout: 265 seconds]
joelroa has quit [Ping timeout: 265 seconds]
joelroa has joined #ruby-lang
workmad3 has joined #ruby-lang
joelroa_ has quit [Ping timeout: 260 seconds]
pabs has quit [Ping timeout: 245 seconds]
tcopp has joined #ruby-lang
joelroa_ has joined #ruby-lang
joelroa has quit [Ping timeout: 264 seconds]
joelroa has joined #ruby-lang
joelroa_ has quit [Ping timeout: 245 seconds]
tcopp has quit [Ping timeout: 240 seconds]
workmad3 has quit [Ping timeout: 265 seconds]
joelroa_ has joined #ruby-lang
joelroa has quit [Ping timeout: 265 seconds]
joelroa has joined #ruby-lang
joelroa_ has quit [Ping timeout: 265 seconds]
vlad_starkov has joined #ruby-lang
workmad3 has joined #ruby-lang
joelroa has quit [Ping timeout: 265 seconds]
joelroa has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 248 seconds]
woollyams has quit [Ping timeout: 252 seconds]
zz_gianlucadv is now known as gianlucadv
joelroa has quit [Ping timeout: 272 seconds]
Cakey has joined #ruby-lang
joelroa has joined #ruby-lang
workmad3 has quit [Remote host closed the connection]
joelroa_ has joined #ruby-lang
joelroa has quit [Read error: Operation timed out]
joelroa has joined #ruby-lang
workmad3 has joined #ruby-lang
bin7me has joined #ruby-lang
joelroa_ has quit [Ping timeout: 240 seconds]
<ljarvis> anyone here use vcr?
marcofernandez has quit [Ping timeout: 245 seconds]
joelroa has quit [Ping timeout: 245 seconds]
<yorickpeterse> Nope, the size of the fixture stuff put me off
<yorickpeterse> (file size that is)
rahul_j has quit [Quit: rahul_j]
joelroa has joined #ruby-lang
prc1 has joined #ruby-lang
workmad3 has quit [Ping timeout: 260 seconds]
joelroa_ has joined #ruby-lang
prc has quit [Ping timeout: 248 seconds]
workmad3 has joined #ruby-lang
<pipework> disk space is cheap.
joelroa has quit [Ping timeout: 240 seconds]
<yorickpeterse> You're the most boring troll to ever join this channel
joelroa has joined #ruby-lang
joelroa has quit [Max SendQ exceeded]
<pipework> I'm sorry that you disagree with me and decide to label that as trolling when I express different opinions.
<yorickpeterse> It's not so much about disk space, it's that there's no need for massive fixture files that contain HTML plus a bunch of YAML/JSON crap or w/e it was that VCR uses for meta data
joelroa_ has quit [Ping timeout: 265 seconds]
joelroa has joined #ruby-lang
prc1 has quit [Ping timeout: 240 seconds]
prc has joined #ruby-lang
joelroa_ has joined #ruby-lang
joelroa_ has quit [Max SendQ exceeded]
joelroa has quit [Ping timeout: 260 seconds]
alucardX has joined #ruby-lang
joelroa has joined #ruby-lang
joelroa has quit [Max SendQ exceeded]
Elico has quit [Quit: Elico]
<ljarvis> yeah lots of yaml
<ljarvis> they're big, but in our case they're damn handy
joelroa has joined #ruby-lang
<yorickpeterse> meh, I'm trying to work towards a non fixture based testing setup for our scrapers
<yorickpeterse> which is pretty tough but possible
<yorickpeterse> lots of yak shaving involved before I can start on that though
tedstriker has joined #ruby-lang
joelroa_ has joined #ruby-lang
chouhoulis has joined #ruby-lang
postmodern has quit [Quit: Leaving]
<ljarvis> by actually doing real requests?
joelroa has quit [Ping timeout: 272 seconds]
joonty has quit [Ping timeout: 252 seconds]
marr has joined #ruby-lang
joelroa has joined #ruby-lang
aarellano has joined #ruby-lang
joelroa_ has quit [Ping timeout: 248 seconds]
cnivolle has joined #ruby-lang
joelroa_ has joined #ruby-lang
aarellano has left #ruby-lang [#ruby-lang]
joelroa has quit [Ping timeout: 248 seconds]
joelroa has joined #ruby-lang
joelroa has quit [Max SendQ exceeded]
rahul_j has joined #ruby-lang
chouhoulis has quit [Remote host closed the connection]
joelroa_ has quit [Ping timeout: 260 seconds]
phansch has joined #ruby-lang
joelroa has joined #ruby-lang
marcofernandez has joined #ruby-lang
tcopp has joined #ruby-lang
hackeron has quit [Ping timeout: 245 seconds]
joelroa_ has joined #ruby-lang
Cakey has quit [Ping timeout: 248 seconds]
joelroa has quit [Ping timeout: 264 seconds]
joelroa has joined #ruby-lang
tcopp has quit [Ping timeout: 252 seconds]
joelroa_ has quit [Ping timeout: 265 seconds]
joelroa_ has joined #ruby-lang
rahul_j has quit [Quit: rahul_j]
joelroa has quit [Ping timeout: 260 seconds]
joelroa has joined #ruby-lang
joelroa_ has quit [Ping timeout: 252 seconds]
joelroa has quit [Ping timeout: 272 seconds]
joelroa has joined #ruby-lang
shinnya has joined #ruby-lang
hackeron has joined #ruby-lang
joelroa has quit [Ping timeout: 252 seconds]
apeiros has quit [Remote host closed the connection]
joelroa has joined #ruby-lang
apeiros has joined #ruby-lang
vlad_starkov has joined #ruby-lang
Cakey has joined #ruby-lang
rahul_j has joined #ruby-lang
joelroa_ has joined #ruby-lang
apeiros has quit [Ping timeout: 252 seconds]
joelroa has quit [Ping timeout: 264 seconds]
joelroa has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 260 seconds]
joelroa_ has quit [Ping timeout: 240 seconds]
<yorickpeterse> Nope
bin7me has quit [Ping timeout: 265 seconds]
<yorickpeterse> By mocking/testing the behaviour, which is pretty hard
<yorickpeterse> There would be some fixtures for some kind of intergration test though, but it wouldn't be the primary form
Cakey has quit [Ping timeout: 245 seconds]
<yorickpeterse> moral of the story, if you *have to* use fixture files something is wrong in my opinion
bin7me has joined #ruby-lang
<yorickpeterse> though there's no silver bullet to solve that
joelroa has quit [Ping timeout: 265 seconds]
pabloh has joined #ruby-lang
dilated_dinosaur has joined #ruby-lang
rippa has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
pudidis has joined #ruby-lang
tkuchiki has quit [Remote host closed the connection]
pudidis has quit [Quit: pudidis]
tcopp has joined #ruby-lang
Cakey has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
elia has joined #ruby-lang
ij has joined #ruby-lang
<ij> Blocks can destruct arrays with parameter syntax |(a, b)|, can functions do too?
<yorickpeterse> Yes
<yorickpeterse> >> def foo((a, b)); p a; p b; end; foo([10, 20])
<eval-in> yorickpeterse => 10 ... (https://eval.in/102730)
<ij> Hmm, is that new? I remember not having that.
<yorickpeterse> Might not have been in 1.8, but it's not a recent addition either
<yorickpeterse> As far as I know the syntax you can use in block arguments is identical to the syntax of method arguments
<yorickpeterse> >> proc { |number: 10| }
<eval-in> yorickpeterse => #<Proc:0x4098a428@/tmp/execpad-5fd0d3c8a7cc/source-5fd0d3c8a7cc:2> (https://eval.in/102731)
<yorickpeterse> hm, so inc keyword arguments apparently
<ij> Wow, I'm missing out some snytax...
<yorickpeterse> >> proc { |number: 10| number }.call
<eval-in> yorickpeterse => 10 (https://eval.in/102732)
Cakey has quit [Ping timeout: 252 seconds]
gregor__ has joined #ruby-lang
<gregor__> Hi. When using File.open("bla").first to read the first line of the file "bla", will the file be closed correctly? Or do I have to use a block: File.open("bla") {|f| f.readline } ?
<yorickpeterse> You either have to use the block form of call File#close yourself, otherwise the handle won't be closed until the handle goes out of scope (I believe)
<ljarvis> dem hanging descriptors
<gregor__> Even if I don't assign the file-handler to a variable?
<yorickpeterse> Most likely, not assigning a value won't mean it won't go out of scope
nXqd has quit [Quit: leaving]
<yorickpeterse> A variable is just a "label" of a block of memory, Ruby itself still keeps track of what scope it belongs to
tcopp has quit [Ping timeout: 260 seconds]
shinnya has quit [Ping timeout: 264 seconds]
vlad_starkov has joined #ruby-lang
<gregor__> yorickpeterse: Okay, thanks for the explanation
joelroa has joined #ruby-lang
mwillhite has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 240 seconds]
mwillhite has quit [Client Quit]
yalue has joined #ruby-lang
tkuchiki has joined #ruby-lang
joelroa has quit [Ping timeout: 240 seconds]
<yorickpeterse> np
jmeeuwen has quit [Ping timeout: 245 seconds]
smashwilson has joined #ruby-lang
micalexander has joined #ruby-lang
aminRX has quit [Remote host closed the connection]
marcofernandez has quit [Ping timeout: 252 seconds]
aminRX has joined #ruby-lang
Iskarlar has quit [Remote host closed the connection]
jmeeuwen has joined #ruby-lang
vlad_starkov has joined #ruby-lang
<yorickpeterse> grrrr, I hate Object#try
tonni has quit [Remote host closed the connection]
<yorickpeterse> that method should've never existed
<ljarvis> why?
tonni has joined #ruby-lang
<yorickpeterse> Because it's an anti pattern
<yorickpeterse> It's something you'd use if you have an if-phobia
<yorickpeterse> You also waste time by running code that might not even do anything useful since it's operating on nil values
<yorickpeterse> e.g.
wallerdev has joined #ruby-lang
<yorickpeterse> SomeModel.where(:foo => Bar.first.try(:id))
<yorickpeterse> why query a DB if you know that Bar.first might not be there?
Pell has joined #ruby-lang
<ljarvis> heh
<ljarvis> I don't really use it, I prefer x && x.foo
<yorickpeterse> "I know I don't have my car keys but I'm going to try and drive anyway"
<yorickpeterse> I should just override this method using refinements in our app
<ljarvis> I find it funny when people chain them, though
<yorickpeterse> and have it do `raise NotImplementedError, "HAHA GET OUT"`
<ljarvis> foo.try(:bar).try(:baz).try(:wut)
<yorickpeterse> yeah I've seen that
<yorickpeterse> ._.
carraroj has joined #ruby-lang
tonni has quit [Ping timeout: 265 seconds]
carraroj has quit [Remote host closed the connection]
<yorickpeterse> worse yet, apparently I wrote this crap
Voker57 has quit [Read error: Connection reset by peer]
<yorickpeterse> I have dishonored myself
<yorickpeterse> (read that with a fake Japanese accent)
ij has left #ruby-lang ["WeeChat 0.4.2"]
marcofernandez has joined #ruby-lang
retro|cz has quit [Remote host closed the connection]
vlad_starkov has quit [Ping timeout: 260 seconds]
<gnufied> worst form is:
<gnufied> foo.try(:[], "bar")
<yorickpeterse> haha what teh fuck
<yorickpeterse> * the
tonni has joined #ruby-lang
<gnufied> replaced my perfectly readable version of foo && foo[:bar] with that stuff
rahul_j has quit [Quit: rahul_j]
toretore has quit [Ping timeout: 265 seconds]
<yorickpeterse> not a huge fan of X && X.something either
<yorickpeterse> though that's mostly because I've seen to much shit of....
<yorickpeterse> e && e.attr('src') && e.attr('src').match(/_(\d+)\.png$/) && convert_rating($1)
<yorickpeterse> shit like that
<gnufied> the original code was: x.try(:[], foo).try(:[], 'bar')
<gnufied> ^ dis from real code
<yorickpeterse> yes
<gnufied> variables names changed to hide identity
<yorickpeterse> (alternative answer: same here)
<yorickpeterse> base_url = scraper.css('base')[0] && scraper.css('base')[0].attr('href') && scraper.css('base')[0].attr('href') + 'HotelReviews/Ajax/'
<yorickpeterse> CODE IS SELF DOCUMENTING
symm- has quit [Ping timeout: 245 seconds]
araujo has quit [Read error: Connection reset by peer]
araujo has joined #ruby-lang
<ljarvis> yorickpeterse: I think && is fine for basic stuff, and it makes it nice for assignment (especially in a hash) x: foo && foo.bar
<ljarvis> I find that handy in haml
<ljarvis> well, in templates in general
<yorickpeterse> <pedant> you're not supposed to assign stuff in views </pedant>
<ljarvis> it's a hash
pico-pete has quit []
<ljarvis> render foo, bar: x && x.foo for example
<gnufied> yeah I like that form for "extracting" values
<ljarvis> not assigning to locals
<ljarvis> i agree that shouldn't happen in views
<gnufied> ljarvis: not using presenters yet?
<gnufied> heathen, burn
<ljarvis> gnufied: yeah but not for everything
<ljarvis> and there are still places presenters dont solve
<yorickpeterse> ah, that case I can understand
<yorickpeterse> but yeah, only peasants do `- foo = @foo.bar`
minivan has joined #ruby-lang
heftig has quit [Remote host closed the connection]
<yorickpeterse> Unrelated question, is it possible to use AR without models *and* without having to manually generate SQL?
<yorickpeterse> That is, something like `ActiveRecord::Base.connection[:some_table].insert(...)`
heftig has joined #ruby-lang
<yorickpeterse> where ... is not a SQL fragment
<gnufied> why not use Arel for that?
<yorickpeterse> I'm already heavily using Arel, but I *don't* want to manually craft the darn queries
eugmill has joined #ruby-lang
<ljarvis> yorickpeterse: create a base model that inherits from AR::Base then use that to do everything
<yorickpeterse> hmmm, won't that mess up with the table name?
<gnufied> I don't think I understand yorickpeterse's requirement well enough.
<yorickpeterse> In Sequel you can do stuff like `DB[:users].insert(:name =>
<yorickpeterse> god damn it
<Mack32475> Anybody have a good tutorial for rbenv vs RVM
<ljarvis> no, you can use 'from' for selects for example, not sure about inserts, the problem you have is that it'll still try and instanciate an instance of that model for every row
<yorickpeterse> DB[:users].insert(:Name => 'Foo') # for example
<ljarvis> Mack32475: they both suck
<Mack32475> Really! What do you use?
<ljarvis> yorickpeterse: yeah, i think that would require arel but not entirely sure
<yorickpeterse> hmpf
<ljarvis> Mack32475: chruby
<tbuehlmann> wouldn't say they suck, but I also prefer chruby
<ljarvis> yorickpeterse: just use execute and not give a fuck
<Mack32475> Sweet! I'll have to try that! Thank you! Any good tutorials for Chruby?
<ljarvis> Mack32475: github.com/postmodern/chruby
<ljarvis> all you need is the readme
<Mack32475> Ok, cool!
<Mack32475> Thanks <ljarvis>!
<gnufied> still on rbenv here
<gnufied> I haven't seen suckage these dudes are talking about. :-)
<gnufied> dudes/dames
<ljarvis> rbenv is ok, except for re-shiming, rvm is just a giant ball of dick
<gnufied> chruby has a problem that, it depends on prompt hook in shell
<gnufied> so I could never get emacs for example to pick right version of ruby when using chruby
<gnufied> I could be wrong and I tried chruby 4 months back or so
vpretzel has quit [Ping timeout: 245 seconds]
<gnufied> so in non-interactive environments you will have to use chruby command to switch rubies
pudidis has joined #ruby-lang
joelroa has joined #ruby-lang
toretore has joined #ruby-lang
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jgpawletko has joined #ruby-lang
<omegahm> Hi, I have a problem I was wondering if you guys could help me with?
<yorickpeterse> Don't ask to ask, just ask
<omegahm> I read a filename by doing Dir.glob('docs', '*.markdown').each do |filename|
<omegahm> printing this filename yields the correct filename
foucist has joined #ruby-lang
<omegahm> doing File.read(filename) returns nothing
<omegahm> (empty string)
<ljarvis> that means they're empty files
<omegahm> But they are not. Doing a cat on them in the terminal yields a lot of content
tonni has quit [Read error: Connection reset by peer]
<foucist> can anyone tell me why "include RedisServiceConsumer; redis_service_namespace :foobar" in other classes fails to set the namespace? https://gist.github.com/foucist/ca3f0b6364511c2a5ea2
joelroa has quit [Read error: Operation timed out]
<foucist> class variable issues?
<gnufied> omegahm: does filename string prints relative path or full path?
<gnufied> anyways, if path was invalid
<ljarvis> foucist: even if it's not, I would avoid them, there's no reason for them there
<omegahm> gnufied: full path
<gnufied> File.read will return different error
<yorickpeterse> omegahm: read permissions set properly?
<foucist> ljarvis: well i know that, though i'm not sure how to re-write the code to eliminate the class variables
<omegahm> yorickpeterse: Hmm, how do I check this?
<ljarvis> foucist: I'm not sure I full grasp what's going on
<gnufied> omegahm: ls -all
tkuchiki has quit [Remote host closed the connection]
<omegahm> gnufied yorickpeterse: Everybody has read access :)
<yorickpeterse> then it's time to pastie the code
<yorickpeterse> also, you can check using `p File.readable?(filename)`
<gnufied> yorickpeterse: even for permissions it should throw different error when doing read
<gnufied> rather than returning empty content
<gnufied> :-)
<omegahm> The file is readable
<yorickpeterse> gnufied: hm, good point
<gnufied> omegahm: paste your code
<gnufied> which OS btw?
<gnufied> and file system is not network mounted or tmpfs or anything like that right?
<gnufied> shouldn't matter
<ljarvis> still not showing code
<gnufied> but still..
<ljarvis> herp sizzurp
<omegahm> gnufied: Nope. Simple Mac OS X
cored has joined #ruby-lang
cored has joined #ruby-lang
cored has quit [Changing host]
<gnufied> ...
<gnufied> paste code
tkuchiki has joined #ruby-lang
<foucist> ljarvis: trying to replace @@variable with attr_accessor :variable, lets see if that works heh
<yorickpeterse> dayum, Merb
joonty has joined #ruby-lang
<yorickpeterse> blast from the past
tonni has joined #ruby-lang
<foucist> yorickpeterse: :P
<foucist> yorickpeterse: huge merb app, 30k loc, needs to be refactored badly and migrated up to rails 3/4
<ljarvis> D:
<yorickpeterse> at least it's not Rails 2
<yorickpeterse> or Redmine
<ljarvis> i hope there's a huge bounty on that
<yorickpeterse> bah, ActiveRecurd::Base.connection.execute returns stuff as Arrays of Arrays
<foucist> ljarvis: bounty?
<foucist> yorickpeterse: what's wrong with rails 2? heh
<ljarvis> yorickpeterse: I think each takes as argument, try: result.each(as: :hash)
<yorickpeterse> hmmm
<yorickpeterse> hm yep
<yorickpeterse> ta
<yorickpeterse> That means I at least don't have to create a bunch of dummy models just for my tests
<yorickpeterse> Hm, still have to do that to create things easily
<ljarvis> why not use models?
<yorickpeterse> Overkill to create models just so I can create a row in a join table (for example)
<yorickpeterse> it's not used during runtime either
<yorickpeterse> I can move them to spec/support/models, which I already have done for a few, but ugh
<yorickpeterse> it shouldn't be required
jtw has joined #ruby-lang
kitak_ has quit [Remote host closed the connection]
kitak_ has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
skade has quit [Quit: Textual IRC Client: www.textualapp.com]
tonni has quit [Ping timeout: 265 seconds]
<ljarvis> heh
johnmilton has joined #ruby-lang
toretore has quit [Read error: No route to host]
hackeron has quit [Remote host closed the connection]
Elico has joined #ruby-lang
Elico has quit [Client Quit]
toretore has joined #ruby-lang
chouhoulis has joined #ruby-lang
hackeron has joined #ruby-lang
<ddd> if I have a method in ApplicationController that is marked private, *but* I have *not* set it to def self.method, then my controllers which inherit from ApplicationController should all have this method correct? even though it should still be private
tonni has joined #ruby-lang
<ddd> trying to access the method on derived models but its not showing in MyController.methods which is weird. (The method is also defined as a helper method (helper_method :current_user))
seanlinsley has quit [Quit: …]
<ddd> for example, RescueGroupsController < ApplicationController # which defines a private method current_user, which is also marked as a helper_method). But RescueGroup.methods.include?("current_user") returns false.
momomomomo has joined #ruby-lang
<ddd> am I misunderstanding the inheritance when methods are private?
<ddd> well marked private when defined in the parent
bradcliffe has joined #ruby-lang
pudidis has quit [Quit: pudidis]
<ddd> even though its a rails app, this *should* be standard ruby inheritance (or thats the belief I'm operating on)
<workmad3> ddd: you are correct... but Class.methods doesn't show private methods
<ddd> oh. i thought it showed even inherited.
jtw has quit [Ping timeout: 264 seconds]
<workmad3> ddd: check Class.private_methods ;)
<ddd> what should i be using
<ddd> ahh
<ddd> sec
<workmad3> ddd: it shows inherited, but not private ;)
<ddd> hmm, even #private_methods.include?(:current_user) # or "current_user" doesn't show it
<ddd> I gotta be misunderstanding something fundamental
pudidis has joined #ruby-lang
<workmad3> ddd: oh sorry... private_instance_methods
<workmad3> ddd: and for normal methods, you'd check Class.instance_methods (not Class.methods, which are class methods)
breakingthings has quit []
<ddd> ok. so its my knowledge of which methods do what thats gak'd
<ddd> lemme check those
<workmad3> it's easy enough to do :)
breakingthings has joined #ruby-lang
vlad_starkov has joined #ruby-lang
tonni has quit [Ping timeout: 265 seconds]
<ddd> yeah not there either. I gotta have toasted something.
<ddd> lemme hit the repo and show you the segment I mean
skade has joined #ruby-lang
<ddd> That defines the private method in ApplicationController (looking at this purely as ruby inheritance, nothing to do with Rails (or so I think))
eugmill has quit [Remote host closed the connection]
pudidis has quit [Client Quit]
<ddd> so, I'm operating under the belief due to inheritance that RescueGroupsController which derives from AppContr, should have :current_user in its private_instance_methods
<workmad3> ddd: it should do, yes... and a quick check in my current project indicates that this is true
<ddd> it does not (both visually and using #private_instance_methods.include?()
<ddd> ok, so that makes me think *I* am goofing something seriously and not recognizing what it is
<workmad3> ddd: code sample of what you're trying in the place you're trying it?
<ddd> workmad3 that codebase is up to date. its what I'm working with right now
tonni has joined #ruby-lang
<workmad3> ddd: so where are you checking the methods?
<ddd> well I have a controller (and this might move the discussion to #RubyOnRails, idk) that uses current_user to pull out that user's rescue groups.
<ddd> workmad3 oh right now, I was checking in Pry
<ddd> running "RescueGroup.private_instance_methods.include?(:current_user)" in Pry'd rails console
<ddd> i'll move this over to the other channel if this is better served there
eugmill has joined #ruby-lang
<ddd> wait
<ddd> sorry
<ddd> wow. I'm an idiot. I'm checking the *model* and *not* the controller
<ddd> friggin idiot
<foucist> :P
micalexander has quit [Remote host closed the connection]
micalexander has joined #ruby-lang
bzalasky has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
nathanstitt has joined #ruby-lang
<mattyohe> omegahm: so... did you ever end up pasting code?
<ddd> ok, so that begs the question on how to access private methods on a derived class? If I call directly RescueGroupsController.current_user it tells me it doesn't have the method, though its listed in private_instance_methods. I tried using #send as well.
<ddd> screw it, google session time i guess
<foucist> ddd: trying to access private methods is a big signal for "hey, maybe you need to refactor your approach"
<omegahm> mattyohe: No, sorry. I had a colleague look at it. We figured that it was a problem with not closing the file prior to working with it afterwards
<mattyohe> 0_o
<mattyohe> closing... prior to working with it?
vpretzel has joined #ruby-lang
<ddd> ahhh, private vs protexted here?
<foucist> private methods basically a signal "yo, this method shouldn't be used externally, it's not part of the object's api, and could change anytime"
micalexander has quit [Ping timeout: 240 seconds]
<ddd> foucist ah, no its something the classes derived from it depend on, i just didn't want to expose it outside the classes (parent and derived)
<foucist> ddd: well protected methods are a bit more accessible if the object inherits from the class
<ddd> so I take it *should* have set it as protected?
<foucist> no idea, i didn't read your problem
<workmad3> ddd: just call it
<workmad3> ddd: parent defines a private *instance* method 'current_user'... so in an instance method of RescueGroupsController, call 'current_user' (no self or anything)
<ddd> foucist right now it was i couldn't find the priv method because i was looking at the model not the controller. So, fixing that, I found the method. I tried calling it in the derived controller (yep, definitely controller this time hehe) but get undefined method 'current_user'
tonni has quit [Remote host closed the connection]
<workmad3> ddd: RescueGroupsController.current_user is trying to call a class method 'current_user' after all ;)
<ddd> so that tells me the private is blocking. only the parent call call it iiutc. with *protected* the dervied classes should be able to right?
tonni has joined #ruby-lang
<workmad3> ddd: no
<ddd> workmad3 but doesn't that require a 'self' to make it class level? (self always seems to fsck me up as to what is in scope at the time of the call)
<ddd> ok then i'm thoroughly confused
<workmad3> ddd: trying to call a method on a class, rather than an instance, makes it class level
kitak_ has quit [Remote host closed the connection]
<workmad3> ddd: RescueGroupsController == a class... RescueGroupsController.current_user therefore == a class method
<workmad3> ddd: but current_user is an instance method, not a class method... so you'd get a NoMethodError there
<momomomomo> ddd: regarding private vs protected methods: http://matthodan.com/2010/08/08/ruby-private-methods-vs-protected-methods.html
<ddd> ok, I need to call this method when the object is created. I need RescueGroupsController to set the current_user, and then use current_user when calling #new and #create
tonni has quit [Read error: Connection reset by peer]
<workmad3> ddd: current_user is typically implemented along the lines of 'def current_user; @current_user ||= load_user_from_session; end' so that you don't need to set the user before use btw ;)
<ddd> workmad3 yeah mine is doing ||= User.find(session[:user_id]) if session[:user_id]
rkmetzl has joined #ruby-lang
<workmad3> ddd: so you just need to call it
tkuchiki has quit [Remote host closed the connection]
tylersmith has joined #ruby-lang
<ddd> but this controller needs to use current_user on #new and #create because the call to them scopes the call. (it calls it in the scope of the user returned via current_user)
<workmad3> ddd: looking @ the controller, it's currently exactly right
<ddd> ok then wtf am i doing wrong. i thought it was and it works in the app, but doesn't work in the console, meaning that there is a diff between my console and when the app is running affecting my call chain. something I'm not grasping conceptually i think
wallerdev has joined #ruby-lang
<workmad3> ddd: it's generally not worth the effort to try and call controller actions from the console
<ddd> well where I expect it to populate, mainly because current_user should resolve to the helper method, be exec'd, return the user in current_user, and then scope the call to that user
momomomomo has quit [Quit: momomomomo]
<certainty> is rbx widely used these days?
<workmad3> ddd: you need to create an instance of a controller with a request environment in order for it to work particularly well
<ddd> workmad3 crap. I was trying to walk the calls so I knew how to write the actual test
<workmad3> ddd: use pry-rails and a pry debugger so you can slap a binding.pry in the action and step through it? :)
<ddd> the req env is auto-created when you instantiate in the console, correct?
<workmad3> no
<workmad3> there isn't a request env in the console
<ddd> i have those installed. time to learn them better i take it
<ddd> ok
Pell has quit [Remote host closed the connection]
<workmad3> that's why trying to use a controller in the console is a PITA :)
<ddd> ahh got it
<ddd> is there a workflow expected *to* be able to do that?
Pell has joined #ruby-lang
rkmetzl has quit [Read error: Connection reset by peer]
<ddd> my test (spec/model/rescue_group_spec.rb) is failing because current_user isn't populated, which is probably because the controller has to populate that. so, i was adding a before(:all) { current_user = User.find(1) } but current_user was returning nil even with that user definitely in the db.
rkmetzl has joined #ruby-lang
<workmad3> tbh, I've not investigated the area in much depth... I try to keep controllers down to about 3 lines per action, so don't tend to worry overlymuch about trying to call them in a console session :)
Pell has quit [Read error: Connection reset by peer]
<workmad3> ddd: well yeah... 'current_user = User.find(1)' sets a local variable 'current_user' to User.find(1)
<ddd> since #new and #create in the model need current_user populated (as it is when running due to the controller calling and passing in current_user) in the console this is failing
Pell has joined #ruby-lang
<workmad3> ddd: what you want to do is probably 'before {controller.stub(:current_user).and_return(User.find(1))}' to fake out the session
<ddd> wait, i should be setting @current_user right? because the *method* current_user is returning @current_user masked by #current_user
bin7me has quit [Quit: Leaving]
<ddd> wait lemme read that
<ddd> ok, let me gel this in my head. (everything you've said) rereading the convo and applying to the test
<ddd> after grabbing coffee first :)
robbyoconnor has quit [Ping timeout: 272 seconds]
minivan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
stef_204 has joined #ruby-lang
steeljav has joined #ruby-lang
heftig has quit [Quit: Quitting]
steeljav has quit [Client Quit]
deception has joined #ruby-lang
tkuchiki has joined #ruby-lang
<ddd> workmad3 OK, I got it working *if* I do before {} and *not* before(:all). before(:all) should create it once, and be used for each example in the test. My tests pass fine if I use before {}, but fail with undefined method 'proxy_for' for nil:NilClass if I use before(:all). what is the difference?
ikrima has quit [Ping timeout: 252 seconds]
Cakey has joined #ruby-lang
minivan has joined #ruby-lang
tonni has joined #ruby-lang
<ddd> ah, ok, before is shorthand for before(:each) and controller stubbing is done before each example. since its needed to be called for each example, thats why before(:all) is failing. the stubbed call has to be done before *each* example. I got it now.
|jemc| has quit [Ping timeout: 265 seconds]
<ddd> workmad3 thanks. led down the path to discovery :) appreciated
<certainty> usually he only leads down the rabbit hole
mykoweb has joined #ruby-lang
<ljarvis> wat
prc has quit [Ping timeout: 265 seconds]
Cakey has quit [Ping timeout: 272 seconds]
<certainty> workmad3 is really the crazy hatter :p
<ddd> hehe, my blog name for a long time was The Mad Hatter :)
Fr330wn4g3 has joined #ruby-lang
vpretzel_ has joined #ruby-lang
<certainty> now it's the The Mad Hater?
seanlinsley has joined #ruby-lang
<certainty> :)
<ddd> pretty much :)
<certainty> hehe
rkmetzl has quit [Read error: Connection reset by peer]
rkmetzl has joined #ruby-lang
vpretzel has quit [Disconnected by services]
vpretzel_ is now known as vpretzel
Cakey has joined #ruby-lang
Elico has joined #ruby-lang
marcofernandez has quit [Ping timeout: 260 seconds]
pabs has joined #ruby-lang
Fr330wn4g3 has left #ruby-lang [#ruby-lang]
vpretzel has quit [Ping timeout: 260 seconds]
Fr330wn4g3 has joined #ruby-lang
<foucist> hmm, if i monkey patch class Redis to add cache method, it doesn't seem to use the redis-namespace when i call set() etc
<foucist> i guess i need to do send or something?
eugmill has quit [Remote host closed the connection]
vpretzel has joined #ruby-lang
Fr330wn4g3 has left #ruby-lang [#ruby-lang]
<whitequark> foucist: I'd start with forking it and modifying it properly. :]
alucardX has quit [Quit: leaving]
eugmill has joined #ruby-lang
Ruby_newbie1 has joined #ruby-lang
<Ruby_newbie1> Hi guys, someone can help me solve this little code? http://pastebin.com/daUATV7w
<Jamo> to clean it up, or is there a bug?
<Ruby_newbie1> no, just re-write that code using the method below + regex
<Ruby_newbie1> first code works well
vlad_starkov has joined #ruby-lang
momomomomo has joined #ruby-lang
tonni has quit [Ping timeout: 245 seconds]
jsullivandigs has joined #ruby-lang
<certainty> you're repeating the "next if ..." expressions
marcofernandez has joined #ruby-lang
<Jamo> next if %w(path expires domain max-age)
<certainty> also you probably want to map instead
<Ruby_newbie1> ty sir for suggestions :)
|jemc| has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
<Jamo> *
<Jamo> next if %w(path expires domain max-age).include? name
<Ruby_newbie1> Jamo: concise method ;)
<foucist> whitequark: i don't want to do that, esp for something this simple
<foucist> there should be a way to monkey patch without interfering with the other gem that monkey patches too
<ljarvis> ^
<ljarvis> it's called refinements
* ljarvis runs
* yorickpeterse dusts off a kitchen towel and slaps it at ljarvis
<certainty> cookies = key_vals.inject([]){ |m,(k,v)| %w(path expire domain max-age).include?(name.downcase) ? m << "#{k}=#{v}; " : m }
<certainty> probably not very readable
<ljarvis> please use each_with_object instead of inject where it works
<ljarvis> aka there
pabs has quit [Ping timeout: 245 seconds]
<certainty> also wrong :/ name is not known in the block :)
jsilver has joined #ruby-lang
<certainty> you get the idea
micalexander has joined #ruby-lang
Pell has quit [Remote host closed the connection]
pabs has joined #ruby-lang
Pell has joined #ruby-lang
pabloh has quit [Quit: Saliendo]
<Ruby_newbie1> yep, ty Certainty&Jamo :)
vlad_starkov has joined #ruby-lang
robbyoconnor has joined #ruby-lang
robbyoconnor has quit [Changing host]
robbyoconnor has joined #ruby-lang
robbyoconnor has quit [Client Quit]
<certainty> Ruby_newbie1: just ask here. No need to query
Lewix has joined #ruby-lang
micalexander has quit [Ping timeout: 260 seconds]
<Ruby_newbie1> apologize me :)
<certainty> no problem
francisfish has quit [Remote host closed the connection]
Pell has quit [Ping timeout: 252 seconds]
Cakey has quit [Ping timeout: 260 seconds]
vlad_starkov has quit [Ping timeout: 252 seconds]
lavana has joined #ruby-lang
tylersmith has quit [Remote host closed the connection]
TheMoonMaster has quit [Excess Flood]
JohnBat26 has quit [Ping timeout: 264 seconds]
centrx has joined #ruby-lang
TheMoonMaster has joined #ruby-lang
pudidis has joined #ruby-lang
Ruby_newbie1 has left #ruby-lang [#ruby-lang]
bradcliffe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mistym has joined #ruby-lang
minivan has quit [Quit: Textual IRC Client: www.textualapp.com]
Mon_Ouie has joined #ruby-lang
marcdel has quit []
ruby-lang728 has joined #ruby-lang
speakingcode-wor has joined #ruby-lang
Mack32475 has quit [Ping timeout: 245 seconds]
pabs has quit [Ping timeout: 240 seconds]
pudidis has quit [Quit: pudidis]
toasty has joined #ruby-lang
bradcliffe has joined #ruby-lang
vlad_starkov has joined #ruby-lang
dc5ala has quit [Quit: Ex-Chat]
vlad_starkov has quit [Ping timeout: 265 seconds]
apeiros has joined #ruby-lang
atmosx has joined #ruby-lang
eugmill has quit [Remote host closed the connection]
symm- has joined #ruby-lang
eugmill has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
bantic has joined #ruby-lang
toasty has quit [Remote host closed the connection]
jsrn has quit [Read error: Operation timed out]
tonni has joined #ruby-lang
mistym has quit [Remote host closed the connection]
RobertBirnie has joined #ruby-lang
elliotec has joined #ruby-lang
vlad_starkov has joined #ruby-lang
tonni has quit [Ping timeout: 252 seconds]
centrx has quit [Quit: Leaving]
gianluca- has joined #ruby-lang
minivan has joined #ruby-lang
gianlucadv has quit [Quit: has left (but uses ZNC)]
foucist has quit [Ping timeout: 272 seconds]
workmad3 has quit [Ping timeout: 252 seconds]
phansch has quit [Quit: Leaving]
toasty has joined #ruby-lang
mistym has joined #ruby-lang
bjh13 has joined #ruby-lang
elliotec has quit [Remote host closed the connection]
elliotec has joined #ruby-lang
tkuchiki has quit [Remote host closed the connection]
cnivolle_ has joined #ruby-lang
toasty has quit [Remote host closed the connection]
toasty has joined #ruby-lang
toasty is now known as toastynerd
cnivolle has quit [Ping timeout: 246 seconds]
aminRX has quit [Ping timeout: 272 seconds]
elia has quit [Quit: Computer has gone to sleep.]
benlovell has quit [Read error: Connection reset by peer]
tylersmith has joined #ruby-lang
mikecmpbll has quit [Quit: ciao.]
toastynerd has quit [Remote host closed the connection]
maseda has joined #ruby-lang
maseda has left #ruby-lang [#ruby-lang]
eugmill has quit [Remote host closed the connection]
elliotec has quit [Remote host closed the connection]
tbuehlmann has quit [Quit: Leaving]
VTLob has joined #ruby-lang
foucist has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
lavana has quit [Quit: Leaving]
Voker57 has joined #ruby-lang
toastynerd has joined #ruby-lang
elliotec has joined #ruby-lang
<kith> is there something like local_variable_set()?
<certainty> var=value?
elliotec has quit [Remote host closed the connection]
<whitequark> what exactly do you want to achieve?
pudidis has joined #ruby-lang
elliotec has joined #ruby-lang
panpainter has joined #ruby-lang
vlad_starkov has joined #ruby-lang
hahuang65 has quit [Ping timeout: 245 seconds]
<kith> whitequark: create a variable from a given string
<kith> a variable name
Johz has joined #ruby-lang
<whitequark> can you write a code example, assuming local_variable_set exists ?
<kith> hmm you do know instance_variable_set() dont you?
<whitequark> sure
<kith> that one but just local
<whitequark> local variables are lexically scoped. instance variables are not. hence, I'm asking what specifically do you want to do.
elliotec has quit [Remote host closed the connection]
<ericwood> code sample plz
<kith> hang on
terabytest has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
elliotec has joined #ruby-lang
cnivolle_ has quit [Remote host closed the connection]
elliotec has quit [Remote host closed the connection]
<kith> hmm so basically saying last element of the array should be the name for a variable that cointains the array
<whitequark> kith: awesome, how are you going to access it?
<kith> goddamn...
<kith> all because the designer designed crap...
<havenwood> kith: just an aside, but you can remove the redundant #each here: str.each_line.each
<kith> whoops
<kith> didnt even notice
sepp2k has joined #ruby-lang
elliotec has joined #ruby-lang
elliotec has quit [Remote host closed the connection]
<kith> i'm trying to group lines of a text into arrays but i do not know how many groups i'll need... so what would be the best way to do that?
<ljarvis> >> [].each.each.each.each.each.each.each.each.each.to_a
<eval-in> ljarvis => [] (https://eval.in/102821)
<ljarvis> zomg
skade has joined #ruby-lang
<ljarvis> kith: group_by
<ljarvis> i dunno what you're doing but you said array and group
arBmind has quit [Quit: Leaving.]
<jsilver> >> while 1 do puts "1" end
<ljarvis> oh god local_variable_set
elliotec has joined #ruby-lang
<ljarvis> what is this i dont even garrrgggmmmllllll
<jsilver> >> while 1 { puts "1" }
<eval-in> jsilver => /tmp/execpad-f10a9409f674/source-f10a9409f674:2: syntax error, unexpected '{', expecting keyword_do_cond or ';' or '\n' ... (https://eval.in/102823)
<jsilver> does it detect infinite loop
phansch has joined #ruby-lang
<ljarvis> >> loop {}
<eval-in> ljarvis => (https://eval.in/102824)
<ljarvis> ^
<ljarvis> kith: what exactly are you trying to do?
tonni has joined #ruby-lang
<kith> read in a csv, sort, group, process the groups, return results
elliotec has quit [Remote host closed the connection]
<ljarvis> group by what?
anjen has joined #ruby-lang
<ljarvis> if you can provide input and desired output, we could probably help
<kith> last element of each line of the csv
Authenticator has joined #ruby-lang
<ljarvis> if you want them grouped by last element of each line then you need to process them as a single entity, or build an object and add on the fly
<ljarvis> do you want an array or a hash?
momomomomo has quit [Quit: momomomomo]
<kith> array
elliotec has joined #ruby-lang
pr0ton_ has joined #ruby-lang
elliotec has quit [Remote host closed the connection]
<terabytest> hey guys
<terabytest> i'd like to ask a question if anybody has a minute for me
<terabytest> basically, it's meant to be a way for my rails app to render markdown from anywhere just by calling MarkdownRenderer.render(...)
<terabytest> I'm wondering if the way I did it is legit
<kith> i'll figure it out on myself
<kith> thanks guys
tonni has quit [Ping timeout: 240 seconds]
<terabytest> I mean the way I created an instance variable on the class and used it to memoize the renderer instance
pudidis has quit [Quit: pudidis]
<terabytest> is there any other way or am I doing it outright wrong?
<toretore> besides singletons being evil it looks fine
<whitequark> seems fine to me
<existensil> terabytest: why didn't you just use Singleton. though, it does look ok the way you did it.
<terabytest> i don't know about singletons
<terabytest> what's that?
<existensil> then you wouldn't need to bother with memoizing, Singleton would take care of that
Phrogz_ has joined #ruby-lang
<toretore> in don't know why you're `class MarkdownRenderer < Redcarpet::Render::HTML`, it doesn't seem necessary
<whitequark> meh, replacing a clear one line with an obscure one line
<kith> ljarvis: thx
<whitequark> I'd keep @x ||=
Phrogz_ is now known as Phrogz
<terabytest> toretore: yeah `class MarkdownRenderer < Redcarpet::Render::HTML` is a leftover, i removed it
pr0ton_ has quit [Ping timeout: 264 seconds]
<terabytest> gonna check out Singleton, thanks guys!
eugmill has joined #ruby-lang
<toretore> Singleton wouldn't work in your case
* Phrogz just discovered #reverse_each. Astonishing.
<existensil> why wouldn't it toretore ?
heftig has joined #ruby-lang
<ljarvis> title = title && %[title="#{title}" ]
tonni has joined #ruby-lang
<terabytest> toretore: oh, why not?
<toretore> unless you make it into a real class of course, but then the whole point is gone
<ljarvis> Phrogz: it's not like you've been doing this long or anything....
<toretore> it is already a singleton, no need to "singletonize" it
<Phrogz> :;(
<Phrogz> (apparently I'm a crying spider)
<toretore> making it into an instantiable class and then making it a singleton means you're back to where you started
jhass|off is now known as jhass
<ljarvis> you dont need singleton, your example is fine
<terabytest> ah I see
<terabytest> so basically my code doesn't require changes?
<ljarvis> but i would clean up the link() method as I proposed above
bradcliffe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<terabytest> i was also wondering if it can be considered good practice
<ljarvis> if your condition is returning a literal nil, chances are you can clean it up
<terabytest> oh, hadn't seen your proposal
<existensil> here is what it would look like as a singleton: https://gist.github.com/carlzulauf/d4f82246dfa4f2fbb421
joelroa has joined #ruby-lang
<toretore> terabytest: i would make it into a real, instantiable class and keep the class methods and have them create a cached instance of self instead
<existensil> i think its a little clearer what's going on. call a spade a spade. it was a singleton before, now its just more obvious
stef_204 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
<terabytest> toretore: which class methods?
<toretore> nm, your code is fine :)
<terabytest> existensil: nice, but wouldn't i also need to define the #render method you're calling on the instance?
elliotec has joined #ruby-lang
<terabytest> or is it some ruby dark magic
pr0ton_ has joined #ruby-lang
Pupeno has joined #ruby-lang
<ljarvis> that code makes no sense
<toretore> converting it to use instance methods and then refusing to let me make instances of it is just mean
<ljarvis> terabytest: your code is fine
<certainty> whitequark: out of interest, is there a way to do what kith wanted? i mean other than doing binding.eval or something?
canton7-mac has quit [Quit: Leaving]
joelroa_ has joined #ruby-lang
<existensil> terabytest: oh, yeah, you're right. you'd need a render instance method. missed that.
<certainty> ah nvm, apparently there is binding.local_variable_set
<terabytest> nice!
joelroa has quit [Ping timeout: 265 seconds]
joelroa has joined #ruby-lang
pr0ton_ has quit [Client Quit]
eugmill has quit [Remote host closed the connection]
cored has quit [Read error: Connection reset by peer]
joelroa_ has quit [Ping timeout: 264 seconds]
<foucist> why doesn't this get inherited if i include a class that includes https://gist.github.com/workmad3/3927f49d0e3250fc374d ?
<foucist> i.e. class Foo; include Bar; end; class Bar; include RedisServiceConsumer; end
<foucist> Bar.redis_service works
<foucist> Foo.redis_service doesn't
<terabytest> ljarvis: thanks for the link thing
eugmill has joined #ruby-lang
joelroa_ has joined #ruby-lang
jhass is now known as jhass|off
joelroa has quit [Read error: Operation timed out]
<ljarvis> foucist: huh? you cant include Bar into Foo if Bar is a class
<foucist> ljarvis: good point :P
dabradley has quit [Quit: WeeChat 0.3.8]
joelroa has joined #ruby-lang
hahuang65 has joined #ruby-lang
minivan has quit [Remote host closed the connection]
joelroa_ has quit [Ping timeout: 265 seconds]
arBmind has joined #ruby-lang
joelroa_ has joined #ruby-lang
<ljarvis> drbrain: ping
vlad_starkov has quit [Remote host closed the connection]
<ljarvis> drbrain: whilst you're putting people in jail, if you get a second please check out the mech issue you'll have a notification for
joelroa has quit [Ping timeout: 252 seconds]
joelroa has joined #ruby-lang
FlyingLeap has joined #ruby-lang
FlyingLeap has joined #ruby-lang
FlyingLeap has quit [Changing host]
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
FlyingLeap has quit [Excess Flood]
dabradley has joined #ruby-lang
joelroa_ has quit [Ping timeout: 264 seconds]
joelroa__ has joined #ruby-lang
FlyingLeap has joined #ruby-lang
joelroa_ has joined #ruby-lang
<whitequark> certainty: no
<whitequark> only via eval
FlyingLeap has quit [Excess Flood]
joelroa has quit [Ping timeout: 260 seconds]
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
saarinen has joined #ruby-lang
<certainty> whitequark: what about binding.local_variable_set?
FlyingLeap has joined #ruby-lang
FlyingLeap has joined #ruby-lang
FlyingLeap has quit [Changing host]
Pupeno has quit [Remote host closed the connection]
<whitequark> certainty: no such thing
havenwood has quit [Ping timeout: 240 seconds]
pudidis has joined #ruby-lang
<whitequark> oh, new in 2.1 then
<certainty> :)
<certainty> it even states that it's similar to eval
<whitequark> haha
<whitequark> kith: ^
<whitequark> 2.1 has the local_variable_set you want
sepp2k1 has joined #ruby-lang
elliotec has quit [Remote host closed the connection]
<whitequark> though I'm still sure you're solving the wrong problem
<certainty> +1
<kith> geez.. i'm still on 1.8
FlyingLeap has quit [Excess Flood]
<certainty> oh boy
<certainty> you have my condolence
<kith> i'm glad i'm not stuck with cobol
joelroa__ has quit [Ping timeout: 248 seconds]
FlyingLeap has joined #ruby-lang
FlyingLeap has joined #ruby-lang
FlyingLeap has quit [Changing host]
<certainty> i have programs running on 1.8 too :)
<whitequark> cobol? try mumps
mehlah has joined #ruby-lang
sepp2k has quit [Ping timeout: 272 seconds]
<kith> whitequark: are you in health care somehow?
<whitequark> kith: lol no, I'm not nearly retired enough to know mumps
<whitequark> I just read about it on thedailywtf and got curious and then read a bit more
<kith> i know exactly ONE person that does mumps and that person is in health care hence my asking
<whitequark> I think that's the extent of mumps usage today, yeah
yfeldblum has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
<darix> hm then i know 2 people!
<darix> or maybe 3
<darix> well 2 at least
<terabytest> i concocted a way to make Rails models automatically render markdown without code repetition or anything bad like that
jtw has joined #ruby-lang
<terabytest> i'm kinda proud of it :o
Lewix has quit [Remote host closed the connection]
<terabytest> the code might be a bit bad though
<terabytest> pointers welcome :D
<whitequark> but you hardcoded Review in your concern
dilated_dinosaur has quit [Ping timeout: 241 seconds]
<terabytest> oh crap yeah just noticed
joonty has quit [Quit: WeeChat 0.3.8]
FlyingLeap has quit [Quit: Flying away...]
<terabytest> damn
elliotec has joined #ruby-lang
vlad_starkov has joined #ruby-lang
<terabytest> how do I get a reference to the class the code is running on
<terabytest> oh
<terabytest> duh
<terabytest> self
<darix> self.class.?
<darix> or just self
elliotec has quit [Remote host closed the connection]
<terabytest> yay, it works
<terabytest> self.class returns a string
<terabytest> self works!
jtw has quit [Ping timeout: 248 seconds]
<terabytest> fixed the gist
jtw has joined #ruby-lang
elliotec has joined #ruby-lang
<ljarvis> self.class returns a string eh
elliotec has quit [Remote host closed the connection]
elliotec has joined #ruby-lang
<Phrogz> self.class.to_s is a string; self.class.name is a string.
<Phrogz> self.class is the class itself.
<ljarvis> ^
<ljarvis> ok back to hacking on mechanize
<yorickpeterse> get back to work slacker
CaptainJet has joined #ruby-lang
<ljarvis> this is work
Pupeno has joined #ruby-lang
<ljarvis> OR IS IT
<ljarvis> it is.
bradcliffe has joined #ruby-lang
<yorickpeterse> work at 19:00, you must be loco
<yorickpeterse> HAHA YEAH
* yorickpeterse high fives himself
<Phrogz> heh
<whitequark> loco?
<yorickpeterse> his employer is called loco2
vpretzel has quit [Quit: Adios!]
Coincidental has joined #ruby-lang
<ljarvis> yorickpeterse: :D
specialblend has joined #ruby-lang
<ljarvis> because fuck you microsoft!
arBmind has quit [Quit: Leaving.]
bantic has quit [Quit: bantic]
brettweavnet has joined #ruby-lang
<Phrogz> That should be your commit message, ljarvis
<ljarvis> :/ I missed a trick there
<Phrogz> heh
DEac-_ has joined #ruby-lang
DEac- has quit [Read error: Connection reset by peer]
pabs has joined #ruby-lang
bradcliffe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ylluminate has joined #ruby-lang
bradcliffe has joined #ruby-lang
elliotec has quit [Remote host closed the connection]
elliotec has joined #ruby-lang
jtw has quit []
bantic has joined #ruby-lang
<jsilver> London is the home of 73 per cent of the UK’s wealth and 93 per cent of its twats. Letting the city sink beneath the waves will be an enormous net gain for the rest of Britain.
<jsilver> lolol
Cakey has joined #ruby-lang
* jsilver gives ljarvis a free copy of Word
<jsilver> happy?
elliotec has quit [Remote host closed the connection]
<jsilver> Yo Rick Peters
<jsilver> lmao
<ljarvis> wat
<jsilver> lmao
<jsilver> not being forced to go to this meeting; not going
D9 has quit [Quit: Leaving]
Cakey has quit [Ping timeout: 265 seconds]
vlad_starkov has quit [Remote host closed the connection]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<yorickpeterse> wat
<yorickpeterse> you're like the first person to make a funny name "pun" with my name
<jsilver> Yo, Rick Peters, whats up
<jsilver> lol
<jsilver> nice
<jsilver> woulda thought it was obvious
elliotec has joined #ruby-lang
<ljarvis> srsly
<ljarvis> wat
vpretzel has joined #ruby-lang
momomomomo has joined #ruby-lang
eugmill has quit [Remote host closed the connection]
<jsilver> the pun
<jsilver> i couldn't be the first
<jsilver> but yeah
<jsilver> I bet someone thought of it and was too composed to say it
<jsilver> but since I'm a big teaser, they you go
pabs has quit [Ping timeout: 252 seconds]
<jsilver> there you go
<jsilver> lol
<jsilver> back to work gents
<jsilver> :P
<yorickpeterse> I was joking about you being first
<jsilver> ah
<jsilver> thought so
<yorickpeterse> you're like hte 128309183209128309218301928309213th person to make such a joke
elliotec has quit [Remote host closed the connection]
<jsilver> lmao
<yorickpeterse> "HA HA HA NEW....YORICK"
elliotec has joined #ruby-lang
<jsilver> lol
<jsilver> you mean Yo, Rick
<jsilver> :D
<jsilver> its a good pun because
elliotec has quit [Remote host closed the connection]
<jsilver> if we're ever co-workers
<jsilver> I can still call you your name correctly
<jsilver> and yet use your nickname "Yo, Rick"
<jsilver> :D
<gnufied> wow
<jsilver> better than my nickname
<jsilver> they freakin call me "Newbie" here
<jsilver> it's insane because I've been programming 15 years even tho I'm only 26
Pupeno has quit [Remote host closed the connection]
<jsilver> also, they have never said "noob"
<jsilver> :|
<jsilver> i'm jus bein silly not trollin
<jsilver> don worry guys
<jsilver> MISANDWAS
<jsilver> MISASWAS
<Phrogz> How silly is he?
workmad3 has joined #ruby-lang
eugmill has joined #ruby-lang
<jsilver> I am not to say matz is silly
<jsilver> How is he silly?
<jsilver> lets change roles
<jsilver> I'm the devil's advocate
<jsilver> you try to claim matz is silly
<jsilver> no he's not.
<Phrogz> You know he is. There's a freaking swan involved. That's clearly silly.
jonahR has joined #ruby-lang
<Phrogz> And his attempt at facial hair? Clearly silliness.
<jsilver> swans a beautiful, not silly. it represents the beauty of ruby code
<jsilver> facial hair, not silly. required hair for most hacker facers. do you want to look like a normal person? hell no!
<jsilver> lololol
<jsilver> j/k matz is the silliest programming
<Phrogz> Hrm...I'm failing my argument. How about: there's a Z at the end of his name?
<jsilver> THAT IS SO SILLY
<jsilver> you're right
<jsilver> thank god matz invented Silliness Oriented Programming
<jsilver> thank god matz invented Silliness Oriented Actionable Programming (or SOAP)
<ljarvis> gah nokogiri
<ljarvis> y am i in u
saarinen has quit [Quit: saarinen]
<gnufied> jsilver: please stop
<jsilver> gnufied: ok. all funniness activities will be stop.. but not silliness. never silliness
<apeiros> hi there ljarvis
<ljarvis> ohi
<yorickpeterse> what the fuck, I calm down a day and somebody else just takes my place
<yorickpeterse> that aint right
Phrogz has quit [Ping timeout: 245 seconds]
<ljarvis> you should know better
CaptainJet has quit []
Pupeno has joined #ruby-lang
slyphon has joined #ruby-lang
<slyphon> ljarvis: sup
<ljarvis> slyphon: it's ok apeiros was on it, thanks though!
<slyphon> np
<yorickpeterse> wat
<ljarvis> I forgot you had op on here
<ljarvis> heh
<slyphon> :)
<yorickpeterse> the fuck is going on
<slyphon> i'm like the deputy that don' know how to shoot straight
<ljarvis> i hope you have a holster for that thing
<ljarvis> wait, that sounds bad
<slyphon> "well, damn, he kickbanned himself"
<apeiros> I got to bug radar to get op in #rubyonrails too :D
<slyphon> that's like bein' the boss of the monkey cage
<ljarvis> it would be a good thing that I don't have op on there
<jsilver> was this about me
<jsilver> if so I am sorry, I was only joking
eugmill has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
<ljarvis> i want to be in sydney right now
<ljarvis> like everyone on my twitter feed apparently is
sadhu has joined #ruby-lang
<ljarvis> yorickpeterse: can you produce nokogiri#1047 on anything but rbx? and is this their bug?
<sadhu> sadhu.@sayhello!
<sadhu> @sayhello! = print "Hello!"
jsullivandigs has quit [Read error: Connection reset by peer]
<sadhu> I've come here to discuss Ruby in weird terms.
<apeiros> the above isn't ruby, though :)
jsullivandigs has joined #ruby-lang
<ljarvis> apeiros: maybe it's ruby in weird terms!
<sadhu> How would it be written in Ruby correctly?
<apeiros> you're weird!
<ljarvis> :(
<sadhu> :(
<apeiros> sadhu: a method must not start with @, so `sadhu.@sayhello!` is invalid, `sadhu.sayhello!` would be valid
<slyphon> if you want to store the name of a method in @sayhello
<sadhu> I apologize for misusing instance variables.
<apeiros> sadhu: an ivar must not end with !, so `@sayhello! = print "Hello!"` is not valid, `@sayhello = print "Hello!"` is
<slyphon> @sayhello = :method_name
<slyphon> sadhu.send(@sayhello)
<apeiros> but while the latter is syntactically valid, it probably doesn't do what you expect it to do.
<slyphon> would do sadhu.method_name
<sadhu> so if @sayhello = :method_name
<sadhu> and i put sadhu.send(@sayhello)
<apeiros> it'll call sadhu.method_name
<apeiros> what do you want to do?
<sadhu> So when can @sayhello be defined as print "Say Hello!"?
<slyphon> the wisdom of this is debatable
<slyphon> only if it's a lambda
<sadhu> @sayhello = print "Say Hello!"
<sadhu> how do I lambda?
<slyphon> @sayhello = lambda { print "say hello!" }
<slyphon> @sayhello.call()
Pupeno has quit [Remote host closed the connection]
<sadhu> so @sayhello = lambda { print "say hello!" } saves print "say hello!" in a hash
CaptainJet has joined #ruby-lang
<ljarvis> sadhu: are you trying to learn ruby from scratch?
<slyphon> not a hash
<sadhu> I thought that any time something was in {} it was a hash? do you have to put hash.new?
<slyphon> no
<sadhu> or ( means do and } means end
<sadhu> { means do
<slyphon> it's block syntax
<sadhu> Oh, I see
eugmill has joined #ruby-lang
<sadhu> I've come here to drink from your firehouses.
<sadhu> Literally.
Pupeno has joined #ruby-lang
<cout> firehose?
<sadhu> Firehouse.
<ljarvis> sadhu: if you're trying to learn ruby we can recommend resources, you won't learn it properly here, we're here to help and give advice
<sadhu> It's a whole house of Firehouses.
<sadhu> I'll be on my way forever then. I'm going to do Koans until I become aware of the silent darkness.
<slyphon> learn you an ruby
<ljarvis> sadhu: great, dig into the koans and let us know if you have any questions
ruby-lang280 has joined #ruby-lang
bantic has quit [Quit: bantic]
itsraining has joined #ruby-lang
sadhu has quit [Ping timeout: 245 seconds]
<slyphon> i've got your silent darkness
ruby-lang280 has quit [Ping timeout: 245 seconds]
anjen has quit [Quit: anjen]
<gnufied> \
elliotec has joined #ruby-lang
symm- has quit [Ping timeout: 252 seconds]
gix- has joined #ruby-lang
gix has quit [Disconnected by services]
elliotec has quit [Remote host closed the connection]
<ljarvis> /
<apeiros> X
<ljarvis> NO
<apeiros> OMG! THEY GOT FUSED TOGETHER! YOU GOT TO SAVE THOSE POOR LITTLE STICKS!!!
gix- is now known as gix
<ljarvis> it's too late for them
badeball_ has joined #ruby-lang
elliotec has joined #ruby-lang
aminRX has joined #ruby-lang
<ljarvis> I like these docs http://libgit2.github.com/libgit2/#HEAD
badeball has quit [Ping timeout: 248 seconds]
<apeiros> ljarvis: I think you read the same tweet as I :D
<ljarvis> :P
badeball_ is now known as badeball
<ljarvis> apeiros: also, yes @ rugged
<apeiros> but I want to hear it from CW!
<apeiros> (since he's a maintainer of grit)
<apeiros> but thanks :)
<ljarvis> and so you should
<apeiros> where are you working again?
<ljarvis> hm?
vlad_starkov has quit [Ping timeout: 272 seconds]
<apeiros> ah, I see (twitter profile)
<apeiros> I thought for a second you worked at GH
<ljarvis> apeiros: actually looks like tom maintained grit? the readme also says it's been > rugged
<ljarvis> heh na, although almost
elliotec has quit [Remote host closed the connection]
<ljarvis> although if you generally assume everyone works for github, you'll get it right a lot of the time
mistym has quit [Remote host closed the connection]
dingus_khan has joined #ruby-lang
mistym has joined #ruby-lang
<apeiros> I prefer thinking everybody worked for microsoft. so I can feel smugly superior
elliotec has joined #ruby-lang
itsraining has quit [Ping timeout: 252 seconds]
elliotec has quit [Remote host closed the connection]
jsrn has joined #ruby-lang
elliotec has joined #ruby-lang
Fr330wn4g3 has joined #ruby-lang
dingus_khan has quit [Remote host closed the connection]
phansch has quit [Quit: Leaving]
mistym has quit [Remote host closed the connection]
phansch_ has joined #ruby-lang
phansch_ has quit [Client Quit]
ecnalyr has joined #ruby-lang
phansch has joined #ruby-lang
toastynerd has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
toastynerd has joined #ruby-lang
toastynerd has quit [Remote host closed the connection]
elliotec has quit [Remote host closed the connection]
charliesome has joined #ruby-lang
elliotec has joined #ruby-lang
gix- has joined #ruby-lang
gix has quit [Disconnected by services]
elliotec has quit [Remote host closed the connection]
elliotec has joined #ruby-lang
oracal has joined #ruby-lang
gix has joined #ruby-lang
mistym has joined #ruby-lang
cnivolle has joined #ruby-lang
prc has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
bzalasky has joined #ruby-lang
Lewix has joined #ruby-lang
gix- has quit [Ping timeout: 245 seconds]
saarinen has joined #ruby-lang
symm- has joined #ruby-lang
bzalasky has quit [Read error: Connection reset by peer]
gix- has joined #ruby-lang
gix has quit [Disconnected by services]
bzalasky has joined #ruby-lang
phansch has quit [Quit: WeeChat 0.4.2]
phansch has joined #ruby-lang
slyphon has quit [Read error: Operation timed out]
bzalasky has quit [Ping timeout: 260 seconds]
amerine has quit [Ping timeout: 260 seconds]
yalue has quit [Quit: Leaving]
amerine has joined #ruby-lang
momomomomo has joined #ruby-lang
elia has joined #ruby-lang
eugmill has quit [Ping timeout: 252 seconds]
eugmill_ has joined #ruby-lang
bantic has joined #ruby-lang
Phrogz has joined #ruby-lang
vlad_starkov has joined #ruby-lang
diegovio1 has joined #ruby-lang
centrx has joined #ruby-lang
bzalasky has joined #ruby-lang
elliotec has quit [Remote host closed the connection]
vlad_starkov has quit [Ping timeout: 245 seconds]
elliotec has joined #ruby-lang
VTLob has quit [Quit: VTLob]
elliotec has quit [Remote host closed the connection]
x0f_ has joined #ruby-lang
x0f has quit [Ping timeout: 272 seconds]
elliotec has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
<centrx> Has anyone had any success compiling Ruby with profiling support (-pg) ?
benanne has joined #ruby-lang
elia has joined #ruby-lang
woollyams has joined #ruby-lang
Phrogz has quit [Ping timeout: 245 seconds]
io_syl has joined #ruby-lang
jsullivandigs has quit [Quit: Leaving...]
elliotec has quit [Remote host closed the connection]
dingus_khan has joined #ruby-lang
elliotec has joined #ruby-lang
brownies has quit [Ping timeout: 245 seconds]
sed_life_better has joined #ruby-lang
deception has quit [Remote host closed the connection]
bradcliffe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
elliotec has quit [Remote host closed the connection]
dingus_khan has quit [Ping timeout: 260 seconds]
<sed_life_better> hi, i have a problem with checking for different date formats: i made a huge gnarly regex that captures matchses, but this can't be right, i don't know the right way to do this, help?
elliotec has joined #ruby-lang
tommylommykins has quit [Remote host closed the connection]
<centrx> sed_life_better, Date.strptime
__butch__ has joined #ruby-lang
<centrx> sed_life_better, Or use the chronic gem
brownies has joined #ruby-lang
<sed_life_better> centrx: can't use gems; checking Date.strptime
phansch has quit [Quit: WeeChat 0.4.2]
<centrx> Can't...use...gems....
elliotec has quit [Remote host closed the connection]
<sed_life_better> not allowed to, it's a challenge
benzrf has joined #ruby-lang
<centrx> ahh
benzrf has left #ruby-lang [#ruby-lang]
tommylommykins has joined #ruby-lang
elliotec has joined #ruby-lang
<sed_life_better> centrx: _strptime returns a hash of symbols and ints of the date values--o
<sed_life_better> i'm looking at the right one, right?
<centrx> Date::strptime returns a Date object
nikky has joined #ruby-lang
<sed_life_better> is there a difference between 1.9.3 and 2.0.0?
solars has quit [Ping timeout: 252 seconds]
<centrx> For this method? Doubtful
mistym has quit [Remote host closed the connection]
hagabaka has quit [Read error: Operation timed out]
brownies has quit [Ping timeout: 252 seconds]
hagabaka has joined #ruby-lang
<sed_life_better> centrx: what if that doesn't test against all the possible formats that might be entered--do i extend that? novice here
eugmill_ has quit [Remote host closed the connection]
diegovio1 is now known as diegoviola
brownies has joined #ruby-lang
<centrx> sed_life_better, Check which format the string hsa with Regexp, then parse that format with strptime
MichD is now known as michd
<sed_life_better> centrx: thank you, that makes a lot of sense. except, i'm still not sure how to use the regex before parsing--this can't be right: http://paste.org/flat/70635
jtw has joined #ruby-lang
Fr330wn4g3 has left #ruby-lang [#ruby-lang]
<centrx> sed_life_better, Seems kind of arbitrary
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<sed_life_better> right, felt that way. researching how many different formats #strptime accepts
elliotec has quit [Remote host closed the connection]
jonahR has quit [Quit: jonahR]
<sed_life_better> i still need to format the dates so #strptime accepts them somehow
mistym has joined #ruby-lang
<centrx> strptime accepts an arbitrary number of formats
<centrx> But your formats are ambiguous and incompletely defined
eugmill has joined #ruby-lang
<centrx> "11/27/2009", "18/03/09" has different order, but there is no way to verify which format your input is
<sed_life_better> right, that's kind of the problem i'm trying to remedy with the regex--hack them up and rearrange
<cout> centrx: obviously that second one is november 3, 3118
<centrx> My ears morphed to receptors that catch your every word about gravity control.
elliotec has joined #ruby-lang
vlad_starkov has joined #ruby-lang
Pupeno has quit [Remote host closed the connection]
foucist has quit [Ping timeout: 269 seconds]
vlad_starkov has quit [Ping timeout: 272 seconds]
<tdy> Rational#denominator seems to give the reduced denominator.. anyway to return the original denominator that was given to the function?
<tdy> any way*
panpainter has quit [Quit: panpainter]
<tdy> like Rational(4,8).denominator => 8 instead of => 2
jsrn has quit [Ping timeout: 240 seconds]
elliotec has quit [Remote host closed the connection]
elliotec has joined #ruby-lang
nXqd has joined #ruby-lang
Pell has joined #ruby-lang
Pell has quit [Remote host closed the connection]
<apeiros> tdy: I don't think rational stores that anywhere
arBmind has joined #ruby-lang
<tdy> apeiros: ok thanks, seems to be the consensus on SO too
Pell has joined #ruby-lang
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nXqd has quit [Remote host closed the connection]
Pell has quit [Remote host closed the connection]
micalexander has joined #ruby-lang
micalexander has quit [Remote host closed the connection]
smashwilson has quit [Quit: Leaving]
micalexander has joined #ruby-lang
jhass|off is now known as jhass
joevandyk has quit [Ping timeout: 260 seconds]
jeff_r has joined #ruby-lang
<apeiros> pfffft, as if SO knew more than I…
joevandyk has joined #ruby-lang
nXqd has joined #ruby-lang
<jeff_r> for this regex (http://rubular.com/r/s1pc51ksey), Im expected each of the commma seperated strings in quotes to be captured, any ideas what I'm doing wrong?
joelroa_ has quit [Ping timeout: 240 seconds]
micalexander has quit [Ping timeout: 265 seconds]
Pell has joined #ruby-lang
|jemc|_ has joined #ruby-lang
chouhoulis has quit [Ping timeout: 272 seconds]
dingus_khan has joined #ruby-lang
diegoviola has quit [Quit: WeeChat 0.4.3]
vlad_starkov has joined #ruby-lang
atmosx has quit [Quit: Lost in trance]
nikky has quit [*.net *.split]
bzalasky has quit [*.net *.split]
vpretzel has quit [*.net *.split]
specialblend has quit [*.net *.split]
hahuang65 has quit [*.net *.split]
sepp2k1 has quit [*.net *.split]
Johz has quit [*.net *.split]
apeiros has quit [*.net *.split]
|jemc| has quit [*.net *.split]
unsymbol has quit [*.net *.split]
samlambert has quit [*.net *.split]
verto has quit [*.net *.split]
yeltzooo has quit [*.net *.split]
[dmp] has quit [*.net *.split]
Caius has quit [*.net *.split]
Coincidental has quit [Remote host closed the connection]
bzalasky has joined #ruby-lang
vpretzel has joined #ruby-lang
apeiros has joined #ruby-lang
Johz has joined #ruby-lang
samlambert has joined #ruby-lang
[dmp] has joined #ruby-lang
specialblend has joined #ruby-lang
sepp2k1 has joined #ruby-lang
unsymbol has joined #ruby-lang
yeltzooo has joined #ruby-lang
verto has joined #ruby-lang
Caius has joined #ruby-lang
eugmill has quit [Remote host closed the connection]
vlad_starkov has quit [Read error: Connection reset by peer]
yeltzooo has quit [Max SendQ exceeded]
vlad_starkov has joined #ruby-lang
nikky has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
yeltzooo has joined #ruby-lang
__butch__ has quit [Quit: Leaving.]
Coincidental has joined #ruby-lang
meise_ has joined #ruby-lang
seanlinsley has quit [Quit: …]
meise has quit [Read error: Connection reset by peer]
<zenspider> jeff_r: can't see your regexp
<jeff_r> zendspider: its a link
relix has joined #ruby-lang
<zenspider> that doesn't work
<zenspider> huh. this time it did.
<zenspider> must have swallowed up the ) on the previous
<whitequark> rparen
<zenspider> wonder if I can tell emacs to knock that off
<centrx> Emacs, the famous IRC client?
<zenspider> pretty much
<zenspider> in this case it is find-file-at-point
<zenspider> which is amazing, normally
<zenspider> jeff_r: you're capturing the comma separated strings, what do you want instead?
<zenspider> you want an array of each one?
<jeff_r> zenspider: Im only getting 2 match groups back
<zenspider> that's what you're asking for
<zenspider> don't use match, use String#scan
elia has quit [Quit: Computer has gone to sleep.]
<jeff_r> zendspider: Id like to get a match group for each of the strings instead of just the 1st and last
<toretore> what's wrong with /"(.*?)"/ ?
<zenspider> like I said above, if you want to scan a string for all the matches, use scan
brettweavnet has quit [Quit: Bye]
<jeff_r> either of those would work I think, but this is for a cucumber step definition
<zenspider> now you have three problems?
ecnalyr has quit [Remote host closed the connection]
<jeff_r> zenspider: not a fan of cucumber?
<zenspider> sorry... but I'm in here to answer RUBY questions
ecnalyr has joined #ruby-lang
bantic has quit [Quit: bantic]
<centrx> tense moment
johnmilton has quit [Remote host closed the connection]
panpainter has joined #ruby-lang
benanne has quit [Quit: kbai]
ecnalyr has quit [Ping timeout: 240 seconds]
nathanstitt has quit [Quit: I growing sleepy]
foucist has joined #ruby-lang
hahuang65 has joined #ruby-lang
jsullivandigs has joined #ruby-lang
jeff_r has quit [Remote host closed the connection]
foucist has quit [Ping timeout: 260 seconds]
pudidis has quit [Ping timeout: 245 seconds]
pudidis has joined #ruby-lang
Thanatermesis has quit [Quit: ɯlɐɔ uı ʞɹoʍ oʇ ƃuıoƃ]
terabytest has quit [Quit: Computer has gone to sleep.]
vlad_starkov has joined #ruby-lang
toastynerd has joined #ruby-lang
jtw has quit []
mehlah has quit [Quit: Leaving...]
Pell has quit [Remote host closed the connection]
Thanatermesis has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
elliotec has quit [Remote host closed the connection]
ecnalyr has joined #ruby-lang
toastynerd has quit []
Johz has quit [Quit: Leaving]
BubonicPestilenc has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 260 seconds]
elliotec has joined #ruby-lang
charliesome has joined #ruby-lang
charliesome has quit [Read error: Connection reset by peer]
jxpx777 has quit [Read error: Connection reset by peer]
jxpx777 has joined #ruby-lang
postmodern has joined #ruby-lang
charliesome has joined #ruby-lang
charliesome has quit [Read error: Connection reset by peer]
charliesome has joined #ruby-lang
charliesome has quit [Read error: Connection reset by peer]
charliesome has joined #ruby-lang