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)
<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?
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]
<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])
<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
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
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
<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
<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
<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. :]
<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
<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
<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
<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
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]