Davey has quit [Quit: Computer has gone to sleep.]
emergion has joined #ruby
atno has quit [Ping timeout: 248 seconds]
predator217 has quit [Ping timeout: 240 seconds]
v0n has joined #ruby
serp` has joined #ruby
wmoxam has joined #ruby
babykosh has joined #ruby
mercwithamouth has joined #ruby
cmarques has quit [Ping timeout: 260 seconds]
ephemerian has left #ruby [#ruby]
smathieu_ has quit [Remote host closed the connection]
_ffio_ has quit [Ping timeout: 246 seconds]
devoldmx3 has quit [Ping timeout: 240 seconds]
fomatin has quit [Quit: Computer has gone to sleep.]
RichardBaker has quit [Quit: RichardBaker]
PhatBaja has quit [Quit: Leaving.]
<flaccid>
change_logger(Logger.new(STDOUT)) sweet
niklasb has joined #ruby
wmoxam has quit [Ping timeout: 264 seconds]
vlad_starkov has joined #ruby
cj3kim has quit [Remote host closed the connection]
saarinen has quit [Quit: saarinen]
RobW_ has quit [Quit: RobW_]
pupoque has quit [Ping timeout: 276 seconds]
mmitchell has quit [Remote host closed the connection]
elux has quit [Quit: Leaving...]
jmeeuwen has quit [Quit: Disconnecting from stoned server.]
jmeeuwen has joined #ruby
vlad_starkov has quit [Ping timeout: 264 seconds]
moos3 has quit [Quit: Computer has gone to sleep.]
premjg_ has joined #ruby
RichardBaker has joined #ruby
moos3 has joined #ruby
premjg_ has quit [Client Quit]
emergion has quit [Quit: Computer has gone to sleep.]
zacts has quit [Quit: leaving]
DaveANI has quit [Remote host closed the connection]
premjg_ has joined #ruby
mansi has joined #ruby
premjg_ has quit [Client Quit]
Davey has joined #ruby
mrommelf has joined #ruby
marr has quit [Ping timeout: 248 seconds]
Drakevr has quit [Ping timeout: 260 seconds]
Drakevr has joined #ruby
_ffio_ has joined #ruby
julweber_ has joined #ruby
julweber has quit [Ping timeout: 246 seconds]
mansi has quit [Ping timeout: 240 seconds]
emmanuelux has quit [Remote host closed the connection]
mjc__ has joined #ruby
mjc__ has quit [Client Quit]
jonkri has quit [Quit: jonkri]
moos3 has quit [Quit: Computer has gone to sleep.]
Beoran_ has quit [Read error: Connection reset by peer]
Beoran_ has joined #ruby
mansi has joined #ruby
emergion has joined #ruby
pkill has joined #ruby
mahmoudi_ has joined #ruby
emergion has quit [Max SendQ exceeded]
dmiller has joined #ruby
v0n has quit [Ping timeout: 246 seconds]
harrymoreno_ has joined #ruby
wsterling has joined #ruby
zastern has quit [Remote host closed the connection]
zeade has quit [Quit: Leaving.]
harrymoreno has quit [Ping timeout: 240 seconds]
harrymoreno_ is now known as harrymoreno
hogeo has joined #ruby
mjc__ has joined #ruby
mahmoudimus has quit [Ping timeout: 268 seconds]
mjc_ has quit [Disconnected by services]
mjc__ is now known as mjc_
mansi has quit [Ping timeout: 248 seconds]
choobie has joined #ruby
Yakko has joined #ruby
smathieu has joined #ruby
drakedouay has quit [Quit: leaving]
dmiller has quit [Ping timeout: 260 seconds]
jkline has quit [Quit: jkline]
mrommelf has left #ruby ["Leaving..."]
dankest has quit [Quit: dankest]
cj3kim has joined #ruby
adeponte has quit [Remote host closed the connection]
wsterling has quit [Ping timeout: 248 seconds]
theRoUS has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
Spooner has quit [Remote host closed the connection]
DonRichie has quit [Ping timeout: 268 seconds]
smathieu has quit [Read error: Connection reset by peer]
ssvo has quit [Ping timeout: 276 seconds]
DonRichie has joined #ruby
smathieu has joined #ruby
dmiller has joined #ruby
Hanmac2 has joined #ruby
_maes_ has joined #ruby
bricker has quit [Ping timeout: 248 seconds]
tkuchiki has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
henn has quit [Ping timeout: 268 seconds]
serp` has quit [Quit: serp`]
Hanmac2 has quit [Ping timeout: 248 seconds]
bionoid has joined #ruby
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
DrCode has quit [Ping timeout: 240 seconds]
end_guy has quit [Ping timeout: 240 seconds]
tacos1de has quit [Ping timeout: 240 seconds]
lebek has joined #ruby
DrCode has joined #ruby
ixti has quit [Quit: WeeChat 0.4.1]
reset has quit [Quit: Leaving...]
avidity has joined #ruby
Vivekananda has quit [Ping timeout: 260 seconds]
RichardBaker has quit [Quit: RichardBaker]
end_guy has joined #ruby
wmoxam has joined #ruby
tacos1de has joined #ruby
henn has joined #ruby
arya_ has joined #ruby
henn has quit [Changing host]
henn has joined #ruby
uxp has quit [Remote host closed the connection]
rsahae has quit [Remote host closed the connection]
<avidity>
I recently upgraded my mac to mountain lion, reinstalled the curb gem (ruby libcurl bindings), and now curb seems to no long work properly with https sites. Although the Content-Length header in the GET response reports data, the body_str is empty. Most interestingly, if I step through an access of body_str using rdebug it causes the script to execute in its entirety. What gives?
DanKnox is now known as DanKnox_away
uxp has joined #ruby
nari has joined #ruby
machuga|away is now known as machuga
cj3kim has quit [Remote host closed the connection]
julweber_ has quit [Remote host closed the connection]
nari has quit [Ping timeout: 240 seconds]
<avidity>
havenwood: interesting revelation. it works in irb
Michael_ has quit [Remote host closed the connection]
bionoid has quit [Remote host closed the connection]
iliketurtles has joined #ruby
mmitchell has joined #ruby
Michael_ has joined #ruby
<avidity>
havenwood: this is really strange. it seems to be the line: html = client.body_str.to_s
babykosh has quit [Quit: babykosh]
<avidity>
that is causing it to fail
reset has quit [Ping timeout: 248 seconds]
<avidity>
havenwood: also if i attempt to inspect client.body_str in the debugger it fails as well
<avidity>
havenwood: but if i do puts client.body_str.to_s before setting html it's fine.
<avidity>
(well not fine. but fine until it gets to the setting the html var part or inspection in the debugger)
michaeldeol has quit [Remote host closed the connection]
<avidity>
hmmm.. crap, now it's failing on the perform
mmitchell has quit [Ping timeout: 248 seconds]
keanehsiao has joined #ruby
Mattix has quit [Ping timeout: 246 seconds]
dankest has joined #ruby
<avidity>
bnagy: yes i have and it works.
<avidity>
bnagy: it also seems to work in irb, which is strange
Bry8Star{T2 has joined #ruby
<avidity>
i wonder if it's nokogiri
keanehsiao has quit [Ping timeout: 248 seconds]
jkline has joined #ruby
Notte has quit [Remote host closed the connection]
osvico has quit [Ping timeout: 240 seconds]
mrpot4to_ has joined #ruby
MrPoT4tO has joined #ruby
JZTech101 has quit [Quit: Hi, I'm a quit message virus. Please replace your old line with this line and help me take over the world of IRC]
mahmoudi_ has joined #ruby
diegoviola has joined #ruby
<diegoviola>
hi
harrymoreno has quit [Ping timeout: 240 seconds]
<diegoviola>
where can i find standard salaries for ruby/rails developers? i got a job but i'm not sure how much to ask, sorry for this off-topic/odd question
jkline has quit [Ping timeout: 276 seconds]
cdelo has quit [Quit: Leaving]
atyz has joined #ruby
smathieu_ has quit [Remote host closed the connection]
smathieu has joined #ruby
dankest has quit [Quit: dankest]
harrymoreno has joined #ruby
Michael_ has quit [Remote host closed the connection]
Ripp__ has quit [Quit: This computer has gone to sleep]
mahmoudimus has quit [Ping timeout: 276 seconds]
Asher1 has quit [Quit: Leaving.]
Asher has joined #ruby
vlad_starkov has joined #ruby
Anarch has quit [Ping timeout: 240 seconds]
Hanmac1 has joined #ruby
<avidity>
diegoviola: salaries are usually based on your salary history
<avidity>
diegoviola: did the employer not ask for that?
<flaccid>
what country are you in avidity?
<avidity>
Los Angeles
dankest has joined #ruby
<avidity>
USofA
helvete has quit [Ping timeout: 260 seconds]
<avidity>
I'm a tech recruiter, btw
<flaccid>
what country is diegoviola in ?
<flaccid>
i certainly wouldn't give someone my 'salary history'
<avidity>
um... on every job application i've ever filled out it always asked about my previous pay
Anarch has joined #ruby
smathieu has quit [Read error: No route to host]
<avidity>
as a recruiter we ask for your current base on our first call
<flaccid>
glad its not like that over here
<flaccid>
thats totally lame
<flaccid>
and funnily i work for a Calif company
smathieu has joined #ruby
<avidity>
ya, that's why i dont code for money
lindenle has quit [Quit: This computer has gone to sleep]
<flaccid>
recruiters are a pita
vlad_starkov has quit [Ping timeout: 240 seconds]
<Crawford>
I have a hash: h = {a=>1,b=>2}...I want to use it in as string without the containing brackets, ie. "foo 'a':1,'b':2". When I use "foo #{h}", I get "foo {'a':1,'b':2}". How should I go about doing that?
<avidity>
damn right we are. youve got a US $20K fee on your head.
Hanmac1 has quit [Ping timeout: 240 seconds]
Ortuna has quit [Quit: IRC Leave]
TonyMergue has quit [Read error: Connection reset by peer]
iliketurtles has quit [Ping timeout: 276 seconds]
michaeldeol has joined #ruby
<avidity>
Crawford: you're gonna need to write your own to_s for that
<n_blownapart>
thanks. actually it was yesterday.. it seemed quiet. btw sevenseacat I started the manning book, it's very helpful thanks.
smathieu has quit [Remote host closed the connection]
<avidity>
bnagy: you're proposing to modify the output?
tjbiddle has quit [Ping timeout: 261 seconds]
<sevenseacat>
n_blownapart: good stuff :)
dankest has quit [Quit: dankest]
tobyo has joined #ruby
tommyvyo has joined #ruby
MrPoT4tO has quit [Read error: Connection reset by peer]
mrpot4to_ has quit [Read error: Connection reset by peer]
<bnagy>
avidity: of to_s? Yes. Instead of using inject, an array creation, a lookup join and finally a string creation, in a method? HELL YES.
MrPoT4tO has joined #ruby
<n_blownapart>
yeah. the question I had was that I was supposed to get INSERT INTO "users" in the development.log file , after saving users (via sandbox) to the db. But couldn't find it. Can I post here for this?
<avidity>
how is foo.keys.inject([]) do |a, key| a << "'#{key}': #{fetch(key)}" end.join(', ') retarded?
<bnagy>
n_blownapart: no
osvico has joined #ruby
axl_ has quit [Quit: axl_]
<n_blownapart>
ok thanks bnagy moving over...
cj3kim has joined #ruby
mrpot4to_ has joined #ruby
sleetdrop has joined #ruby
<avidity>
bnagy: well when you put it that way, dropping the first and last character don't sound so bad
wrsh has quit [Remote host closed the connection]
<avidity>
*doesn't
bionoid has quit [Remote host closed the connection]
rezzack has quit [Quit: Leaving.]
nitish has quit [Read error: Connection reset by peer]
<Crawford>
yeah...a simple slice is much nicer. Sorry for the complete noobness, but thx for the help!
wrsh has joined #ruby
<bnagy>
np
freakazoid0223 has joined #ruby
nitish has joined #ruby
sleetdrop has quit [Client Quit]
Es0teric has joined #ruby
kofno has joined #ruby
zastern has joined #ruby
aaroncm has joined #ruby
aaroncm has quit [Remote host closed the connection]
nitish has quit [Read error: Connection reset by peer]
aaroncm has joined #ruby
Pandee has quit [Read error: Connection reset by peer]
nitish has joined #ruby
nitish has quit [Changing host]
nitish has joined #ruby
Pandee has joined #ruby
rezzack has joined #ruby
<avidity>
bnagy: though inspect outputs => rather than :, so I would be correct
<Crawford>
yeah...just realized that :P
cj3kim has quit [Ping timeout: 240 seconds]
<bnagy>
then just gsub it
dhruvasagar has joined #ruby
henn has joined #ruby
henn has joined #ruby
<avidity>
bnagy: do you think inspect doesn't cost any cycles either?
<bnagy>
I don't really care that much about the performance, although to_s + gsub is probably fine
radic__ has joined #ruby
<bnagy>
I care about readability
<avidity>
Crawford: go with mine, it's a good solution and has more flexibility.
<bnagy>
... you are insane
mikeg has joined #ruby
<avidity>
bnagy: my solution is far more readable
<bnagy>
... you are insane
<avidity>
bnagy: yours is some hacky sorta thing. and you were just slamming mine for being inefficient
<bnagy>
it also is
<bnagy>
but that's not why I hate it
ssvo has joined #ruby
<Crawford>
avidity: hash_to_S - undefined method `fetch' for main:Object
<avidity>
?
Voodoofish430 has quit [Quit: Leaving.]
rsahae has quit [Quit: rsahae]
<bnagy>
yeah it should be foo.fetch, but it's insane anyway
<Crawford>
lol
bionoid has joined #ruby
<bnagy>
why pull keys and then fetch each elem
<bnagy>
when you could just use each?
<bnagy>
like.. srsly. Learn to ruby or stfu and don't give advice
pkill has quit [Ping timeout: 245 seconds]
echevemaster_ has joined #ruby
radic_ has quit [Ping timeout: 240 seconds]
reset has joined #ruby
robustus has quit [Ping timeout: 248 seconds]
_veer has quit [Ping timeout: 240 seconds]
havenwood has quit [Remote host closed the connection]
asteve has joined #ruby
<avidity>
bnagy: you could do something with each. same difference
havenwood has joined #ruby
<avidity>
bnagy: fetch is the same thing as []
havenwood has quit [Read error: Connection reset by peer]
robustus has joined #ruby
<bnagy>
I am going to ignore you now
<sevenseacat>
lolwat
nezumi has joined #ruby
<sevenseacat>
fetch is not the same thing as []
<n_blownapart>
bnagy: could I ask , do you use ruby as your primary language and another framework at all comparable to rails, because you don't like the limitations of rails?
<bnagy>
n_blownapart: I don't do any web, and I have been pretty much full time ruby for 6 years
<bnagy>
so yes, it's my primary language
cry has joined #ruby
<n_blownapart>
bnagy: wow is there plenty of work for people like you or is most of it in rails?
nari has joined #ruby
reset has quit [Ping timeout: 264 seconds]
<bnagy>
I have no idea what 'people like me' is :P
<n_blownapart>
working in ruby primarily sans rails
<bnagy>
well in lots of fields your language is secondary to what you're actually working on
elux has joined #ruby
<sevenseacat>
i think working in ruby without rails would be awesome
<bnagy>
I'm in security research, which is kinda niche
krz has joined #ruby
Dekade has quit []
<bnagy>
and I could as easily be using any other language
<bnagy>
well maybe not _any_
pr0ggie has joined #ruby
<sevenseacat>
php? >_>
jorge has joined #ruby
<sevenseacat>
brainfuck? <_<
<n_blownapart>
ok thanks bnagy cool. one day maybe I'll be able to pick and choose.
Kabaka has quit [Remote host closed the connection]
Kabaka has joined #ruby
NiteRain has quit [Ping timeout: 248 seconds]
forced_request has quit [Read error: Connection reset by peer]
<Crawford>
Oh god...I think the whole issue with these REST calls I've been making is that the body of the POST has been using ' instead of " *headdesk*
buzzybron has joined #ruby
<bnagy>
Crawford: are you sure you shouldn't just be using json at some point instead of hand massaging hashes?
Kabaka has quit [Client Quit]
Kabaka has joined #ruby
n_blownapart has quit [Remote host closed the connection]
<Crawford>
bnagy: yeah, I should be, actually. though I wasn't having any luck with that in the past, but that was before I started using requestbin to test
alvaro_o has quit [Quit: Ex-Chat]
<avidity>
sevenseacat: ok, so i checked ruby.c... and [] calls rb_hash_aref(), which does lookups directly via: st_lookup(RHASH(hash)->ntbl, key, &val). fetch does a bunch of argument checking and then calls st_lookup(). so they're very close.
<sevenseacat>
i would asume that one used the other yes, but they are not the same thing.
smathieu has joined #ruby
pkill has joined #ruby
<avidity>
sevenseacat: well they both use st_lookup. [] may appear a lot more direct, but those if checks are going to fail, so the amount of overhead is minimal
paissad has joined #ruby
<avidity>
sevenseacat: though, if you were trying to do as many lookups as possible, you'd definitely feel the hit
k-man has left #ruby ["WeeChat 0.4.0"]
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<diegoviola>
avidity: i was billing less
<diegoviola>
avidity: but then again i was doing remote work for some dude in the US, and I was in Paraguay
<jarray52>
What's the shortest way to sort an array of strings of the form "#{month)/#{day}/#{year}" in an array called 'dates'?
iliketurtles has quit [Quit: zzzzz…..]
thams has quit [Quit: thams]
smathieu has quit [Ping timeout: 248 seconds]
<bnagy>
jarray52: sort or sort_by
<avidity>
the salary equivalent of hourly in the US (now this might be different due to taxes and stuff) is if you're on a 6 month+ contract you double your hourly and subtract 20% to make an equivalent salary
<bnagy>
sort will get you just lexical sorting, by default, which probably isn't what you want?
Hanmac1 has joined #ruby
<jarray52>
bnagy: I want them sorted from most recent to least recent. Most recent first. dates.sort returns some strange order I cannot understand.
<avidity>
seeing as you weren't working full-time, and as long as your hourly rate was competitive, you could use that as your bottom
dankest has joined #ruby
<jarray52>
perhaps it is sorting them as strings
<bnagy>
jarray52: that form is invalid for ruby ( m/d/y )
<bnagy>
so you can parse em with strptime
dmiller has quit [Remote host closed the connection]
vikhyat has quit [Remote host closed the connection]
fridim__ has joined #ruby
|jemc| has joined #ruby
arya_ has quit [Ping timeout: 248 seconds]
<|jemc|>
what "object" do my global methods get put in? Or, to put it another way, if I "def foo; end" outside of any class definition, how do I retrieve a list of symbols that contains :foo to verify that :foo was defined?
<bnagy>
|jemc|: Object
sambao21 has quit [Quit: Computer has gone to sleep.]
<|jemc|>
bnagy: "method: foo" is a good way to check if the method exists, and I just catch the exception to handle it not existing, but I am still purely academically curious about how to obtain a list of all "global" methods
Domon has quit [Remote host closed the connection]
mengu has joined #ruby
workmad3 has joined #ruby
Meatant has quit [Quit: shops]
iliketurtles has quit [Quit: zzzzz…..]
ChristianS has joined #ruby
maroloccio has joined #ruby
aganov has joined #ruby
gildo has joined #ruby
nomenkun has joined #ruby
Hanmac has joined #ruby
fomatin has quit [Quit: Computer has gone to sleep.]
Hanmac1 has joined #ruby
Gooder`` has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
Anarch has joined #ruby
timonv has joined #ruby
Hanmac has quit [Ping timeout: 240 seconds]
ayaz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
workmad3 has quit [Ping timeout: 240 seconds]
bionoid has quit [Remote host closed the connection]
gadgetoid has quit [Ping timeout: 240 seconds]
ayaz has joined #ruby
haxrbyte_ has quit [Read error: Connection reset by peer]
haxrbyte has joined #ruby
haxrbyte has quit [Remote host closed the connection]
djbkd has quit [Quit: Leaving]
stormbytes has joined #ruby
Gooder has joined #ruby
Goopyo has joined #ruby
jarray52 has left #ruby [#ruby]
kofno has joined #ruby
brianpWins has quit [Quit: brianpWins]
gadgetoid has joined #ruby
timonv has quit [Remote host closed the connection]
brianpWins has joined #ruby
kofno has quit [Ping timeout: 240 seconds]
tatsuya_o has joined #ruby
ntus1017 has quit [Ping timeout: 240 seconds]
teddyp1cker has joined #ruby
milestone has quit [Quit: milestone]
pranny has joined #ruby
mercwithamouth has quit [Ping timeout: 248 seconds]
threesome has quit [Ping timeout: 276 seconds]
Domon has joined #ruby
dmiller has joined #ruby
andikr has joined #ruby
smathieu has joined #ruby
dmiller has quit [Ping timeout: 240 seconds]
wesside has quit [Quit: Computer has gone to sleep.]
milestone has joined #ruby
nomenkun has quit [Remote host closed the connection]
gildo has quit [Ping timeout: 240 seconds]
byprdct has joined #ruby
smathieu has quit [Ping timeout: 268 seconds]
obs has joined #ruby
mitesh_test has joined #ruby
mitesh_test has quit [Quit: mitesh_test]
Notte has joined #ruby
haxrbyte has joined #ruby
ghr has joined #ruby
teddyp1cker has left #ruby [#ruby]
rdg has joined #ruby
rbento has joined #ruby
maz-dev has joined #ruby
smathieu has joined #ruby
haxrbyte_ has joined #ruby
smathieu has quit [Remote host closed the connection]
mansi has joined #ruby
noyb has quit [Ping timeout: 276 seconds]
smlgs has joined #ruby
threesome has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
<diegoviola>
is mocking/stubbing in rspec about faking objects for testing?
<diegoviola>
i'm new with tdd/bdd
gildo has joined #ruby
<diegoviola>
well, not that new but i don't have much experience with tdd/bdd..
tonini has quit [Remote host closed the connection]
teddyp1cker has joined #ruby
<sevenseacat>
no, it's about isolation and expectations.
diegoviola was kicked from #ruby by apeiros [cross-posting without telling that you cross-post is not welcome. this is only a kick, not a ban, take it as a warning.]
pupoque has quit [Read error: Connection reset by peer]
__main__ has joined #ruby
pupoque has joined #ruby
rdark has joined #ruby
optimusprimem has quit [Ping timeout: 245 seconds]
Anarch has quit [Ping timeout: 240 seconds]
roadt__ has quit [Ping timeout: 240 seconds]
vlad_starkov has joined #ruby
jokke has quit [Quit: WeeChat 0.4.1]
ernar has joined #ruby
matchaw has joined #ruby
pedestrian has joined #ruby
ernar has left #ruby [#ruby]
atmosx has quit [Quit: And so the story goes…]
jokke has joined #ruby
jlebrech has joined #ruby
lemonsparrow has joined #ruby
ernar has joined #ruby
pedestrian has quit [Read error: Connection reset by peer]
Gooder` has joined #ruby
roadt__ has joined #ruby
rshetty has joined #ruby
<jlebrech>
how do you get the string representation of a fixnums variable name?
<apeiros>
-_-
<apeiros>
objects do NOT know what variable reference them
<apeiros>
you can NOT get the name of variables which reference an object
Spooner has joined #ruby
mklappstuhl has joined #ruby
<apeiros>
x = @y = @@z = $boo = 12 # what name does `12` have?
Gooder has quit [Ping timeout: 248 seconds]
pedestrian has joined #ruby
jbpros has quit [Ping timeout: 264 seconds]
ferdev has quit [Quit: ferdev]
samuel02 has quit [Remote host closed the connection]
atmosx has joined #ruby
<hoelzro>
didn't we just discuss this yesterday?
jkline has quit [Quit: jkline]
nari has quit [Ping timeout: 245 seconds]
matchaw_ has joined #ruby
<jlebrech>
but you have x
<jlebrech>
right there
matchaw has quit [Ping timeout: 240 seconds]
sevenseacat has quit [Quit: Leaving.]
pedestrian has quit [Read error: Connection reset by peer]
<atmosx>
does anyone use the sinatra-cache expire?
<jlebrech>
you can eval('x') but you can't x.deval ?
pedestrian has joined #ruby
<apeiros>
jlebrech: no. you can't.
<apeiros>
and it makes no sense either.
<apeiros>
if you have x.deval you can just write 'x' right there.
madhatter has quit [Quit: Changing server]
jbpros has joined #ruby
dmiller has joined #ruby
adeponte has joined #ruby
<jlebrech>
guess i just have to do return {x: x, y: y, z: z}
<hoelzro>
consider this:
<hoelzro>
12.deval
<apeiros>
and no, you can't pass variables in ruby. you can only pass objects. (you can use e.g. symbols to pass *names*, those aren't variables either)
<hoelzro>
what would that return?
atyz has quit [Quit: Leaving...]
<jlebrech>
a hash of keys and values
<apeiros>
lol
<apeiros>
think again
<jlebrech>
:P
robert_ has quit [Ping timeout: 248 seconds]
<jlebrech>
i was thinking you could turn [a,b,c,d] into {a: a, b: b, c: c, d: d}
<apeiros>
you could turn %w[a b c d] into {a: a, b: b, c: c, d: d}
<apeiros>
but it'd be ugly and you shouldn't do it.
<jlebrech>
oh well
<apeiros>
if you want to code like php coders, then maybe you should use php :-p
buibex has joined #ruby
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pedestrian has quit [Read error: Connection reset by peer]
<apeiros>
(what was it there? extract() and the other was which one?)
dmiller has quit [Ping timeout: 240 seconds]
<apeiros>
ah, right, extract() and compact()
adeponte has quit [Ping timeout: 240 seconds]
<apeiros>
damn, why do I still remember that shit? it's soon been 10y
* apeiros
needs a brain decontamination
utdemir has joined #ruby
robscomputer has quit [Ping timeout: 248 seconds]
raddazong has joined #ruby
irmbrady has joined #ruby
aaronmcadam has joined #ruby
raddazong has quit [Changing host]
raddazong has joined #ruby
raddazong is now known as madhatter
Hanmac1 has quit [Quit: Leaving.]
ferdev has joined #ruby
<jlebrech>
php is a shittier language but it can do more tricks
trepidaciousMBR has joined #ruby
<tobiasvl>
can it really
<tobiasvl>
ruby has a few nifty things up its sleeve
Hanmac has joined #ruby
<jlebrech>
i think with php everything has to be a trick
<apeiros>
I agree up until "shittier language".
pwnfactory has joined #ruby
krainboltgreene has joined #ruby
krainboltgreene has quit [Client Quit]
nism has joined #ruby
<jlebrech>
i think ruby guides you to code more cleanly than php
<jlebrech>
but also means when you want to code like a crazy person you get more speedbumps
timonv has quit [Remote host closed the connection]
<DaniG2k>
ruby is rather well crafted
<tobiasvl>
i dunno … ruby metaprogramming is pretty easy and crazy
atno has quit [Remote host closed the connection]
<DaniG2k>
did some php back in the day
BizarreCake has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
<tobiasvl>
everyone has done some php back in the day
<DaniG2k>
heheh
cry has quit [Remote host closed the connection]
postmodern has quit [Ping timeout: 240 seconds]
Spami has quit [Quit: This computer has gone to sleep]
Anarch has joined #ruby
<bnagy>
uh.. no?
<DaniG2k>
guys what are some interesting software projects these days
<DaniG2k>
im bored
<DaniG2k>
startups or whatnot
<bnagy>
what areas do you like?
<DaniG2k>
anything really, I just want to check something new out
Spami has joined #ruby
Spami has joined #ruby
Spami has quit [Changing host]
<bnagy>
celluloid is kinda cool
<tobiasvl>
bnagy: oh are you saying that not all living human beings in the entire world have coded php after all? okay then, i guess i was generalizing :(
<bnagy>
and there are some areas where I think they could use hands
<bnagy>
there's always crazy interesting parser stuff going on
<bnagy>
if you're kinky that way
postmodern has joined #ruby
<bnagy>
personally I find it too much like yacc shaving
<bnagy>
seriously_random: because that's what it tells you to do
<aaronmcadam>
well there's nothing in that string
<aaronmcadam>
hahah
<bnagy>
Chef#new_order says 'make an instance method called new_order on a class called Chef'
<aaronmcadam>
bingo :)
<aaronmcadam>
and I didn't even read the article :D
steamboy has quit [Remote host closed the connection]
<bnagy>
anyway, dinner
arya_ has quit []
goleldar has quit [Quit: Leaving]
<seriously_random>
aaroncm, sorry I am still lost. When I create WaiterRobot.new I have to pass in a first parameter that creates new Chef, not simply a string?
krz has quit [Quit: krz]
krz has joined #ruby
krz has quit [Client Quit]
krz has joined #ruby
pupoque has quit [Ping timeout: 264 seconds]
krz has quit [Client Quit]
peter has joined #ruby
sleetdrop has quit [Quit: Computer has gone to sleep.]
peter is now known as Guest40479
krz has joined #ruby
<Guest40479>
when add some new fields to edit account it is not storing the data in rails4
roadt__ has quit [Ping timeout: 246 seconds]
<seriously_random>
aaroncm, here is my failed Chef class. What's wrong with it? http://pastie.org/8151918
maz-dev has quit [Ping timeout: 276 seconds]
<maddog__>
I have a order model which has a planned_shipping_date field. This field can change over time. What's the best practice to keep track of the changes? creating a separate model and associate it with the order model? Or is there a better/smarter way of doing this?
Arya has joined #ruby
Arya is now known as Guest87726
roadt__ has joined #ruby
Guest87726 is now known as arya_
nism has quit [Ping timeout: 250 seconds]
<maddog__>
woops, wrong channel, sorry
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
ismlages has joined #ruby
arya_ has quit [Client Quit]
<aaronmcadam>
seriously_random: nothing. but you'll have to change your waiter instanitation
<aaronmcadam>
instantiation*
otherj has joined #ruby
prashaantt_ has joined #ruby
krainboltgreene has joined #ruby
arya_ has joined #ruby
prashaantt_ has left #ruby [#ruby]
BSaboia has joined #ruby
toddWork_ has joined #ruby
arya_ has left #ruby [#ruby]
tonini has joined #ruby
pupoque has joined #ruby
DrCode has quit [Ping timeout: 240 seconds]
axeman- has quit [Ping timeout: 248 seconds]
cj3kim has joined #ruby
axeman- has joined #ruby
haxrbyte_ has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
shemerey has joined #ruby
ybart has quit [Quit: ybart]
ybart has joined #ruby
monkegjinni has joined #ruby
marr has joined #ruby
teddyp1cker has quit [Remote host closed the connection]
teddyp1cker has joined #ruby
hamakn has quit [Read error: Connection reset by peer]
vikhyat has joined #ruby
hamakn has joined #ruby
moos3 has quit [Quit: Computer has gone to sleep.]
Es0teric has quit [Quit: Computer has gone to sleep.]
monkegji_ has joined #ruby
teddyp1cker has quit [Ping timeout: 264 seconds]
<daxroc1>
What does ripper require to compile?
licorn54 has quit [Quit: licorn54]
ssvo has quit [Ping timeout: 246 seconds]
sergicles has joined #ruby
monkegjinni has quit [Ping timeout: 248 seconds]
pupoque has quit [Ping timeout: 240 seconds]
tatsuya_o has joined #ruby
Guest40479 has quit [Quit: Page closed]
Domon has quit [Remote host closed the connection]
haxrbyte has joined #ruby
codecop has quit [Ping timeout: 276 seconds]
ssvo has joined #ruby
<ddv>
I'm trying to capture output from a command, for example sleep, output = %[sleep --help), which outputs usage: sleep seconds but for some reason output is empty ""
robbyoconnor has joined #ruby
prashaantt has quit [Ping timeout: 240 seconds]
icecandy has joined #ruby
cj3kim has joined #ruby
canton7 is now known as that_
gildo has quit [Ping timeout: 248 seconds]
dmiller has joined #ruby
Hanmac has quit [Quit: Leaving.]
that_ is now known as canton7
Hanmac has joined #ruby
mansi has joined #ruby
razi has joined #ruby
Catbuntu has joined #ruby
nomenkun has joined #ruby
<Catbuntu>
hihi
geoffw8_ has joined #ruby
razi has quit [Client Quit]
krz has quit [Quit: krz]
cj3kim has quit [Ping timeout: 240 seconds]
lebek has joined #ruby
prashaantt has joined #ruby
machuga|away is now known as machuga
dmiller has quit [Ping timeout: 276 seconds]
Zolo has joined #ruby
presupplication6 has joined #ruby
heftig has quit [Quit: Quitting]
ssvo has quit [Ping timeout: 240 seconds]
heftig has joined #ruby
heftig has quit [Remote host closed the connection]
mklappstuhl has quit [Remote host closed the connection]
pupoque has joined #ruby
heftig has joined #ruby
mansi has quit [Remote host closed the connection]
otherj has quit []
codecop has joined #ruby
ssvo has joined #ruby
krandi has joined #ruby
icecandy has quit [Remote host closed the connection]
fuleo has quit [Remote host closed the connection]
pupoque has quit [Ping timeout: 240 seconds]
fuleo has joined #ruby
andikr has quit [Ping timeout: 276 seconds]
tk_ has joined #ruby
hogeo has quit [Remote host closed the connection]
ssvo has quit [Ping timeout: 248 seconds]
ssvo has joined #ruby
jibi has quit [Ping timeout: 248 seconds]
rshetty has quit [Quit: Sleeping]
nezumi has quit [Ping timeout: 248 seconds]
monkegji_ has quit [Remote host closed the connection]
prashaantt has quit [Quit: prashaantt]
buibex has quit [Ping timeout: 248 seconds]
BSaboia has quit [Read error: Operation timed out]
YaNakilon has quit [Ping timeout: 246 seconds]
steamboy has joined #ruby
ssvo has quit [Read error: No route to host]
ssvo has joined #ruby
steamboy_ has joined #ruby
tulak has joined #ruby
YaNakilon has joined #ruby
haxrbyte_ has joined #ruby
rshetty has joined #ruby
steamboy has quit [Ping timeout: 248 seconds]
<tulak>
Why 16.6 − 9 equals 7.600000000000001 ? is there any way how to fix this ? I even tried python with the same result, in C it is ok 7.6
pipework has quit [Remote host closed the connection]
milestone has left #ruby [#ruby]
Hanmac has quit [Ping timeout: 240 seconds]
rshetty has quit [Read error: Connection reset by peer]
haxrbyte has quit [Ping timeout: 240 seconds]
<sqd_>
tulak: that's how floating point numbers are supposed to work
<sqd_>
if you're not going to use more than 1 decimal, do (166-90)/10.0 instead
rshetty has joined #ruby
monkegjinni has joined #ruby
<sqd_>
if you might use more than 1 decimal, look if there's a ruby equivalent to python's Decimal class
yacks has quit [Ping timeout: 268 seconds]
<tulak>
sqd_: thanks there is BigDecimal class in Rails that gives me that functionality
renderful has quit [Remote host closed the connection]
<davertron>
hoelzro: detach means don't wait for the child process to finish running before continuing in the parent process
monkegj__ has joined #ruby
renderful has joined #ruby
steamboy has joined #ruby
<davertron>
hoelzro: let me try running it with one child instead of two, but I don't think it changes anything; i'm pretty sure the "until reader.eof?" line is the problem, because calling exec means I can't call close on the writer, which means reader will never receive an eof
* hoelzro
just looked at the docs for detach
<hoelzro>
that's more messed up than I thought.
<hoelzro>
davertron: did you read what I wrote above?
<hoelzro>
when a process exits, all of its file handles are closed.
jerius has joined #ruby
monkegji_ has quit [Ping timeout: 240 seconds]
monkegjinni has quit [Read error: Operation timed out]
axeman- has quit [Remote host closed the connection]
goodgame has left #ruby ["Quitte"]
tonini has quit [Remote host closed the connection]
<davertron>
hoelzro: ok, so?
<davertron>
hoelzro: what am I doing wrong then?
<hoelzro>
so this *should* work =)
<davertron>
hoelzro: ok :)
senayar has quit [Read error: Connection reset by peer]
senayar_ has joined #ruby
<hoelzro>
well, I just tried it with one child
<hoelzro>
still no go
<hoelzro>
oh
<hoelzro>
duh
<davertron>
hoelzro: yeah, one child is the same
<hoelzro>
you didn't close the writer in the parent
<hoelzro>
so one end of the pipe is still open
devoldmx has quit [Ping timeout: 276 seconds]
<davertron>
><
<davertron>
yep, that does seem to fix it
anonymuse has joined #ruby
<hoelzro>
my advice about one pipe per child still applies
jorge has quit [Remote host closed the connection]
<davertron>
hoelzro: Yeah, originally I had one pipe per child, but I wanted to try this to see if it would work
<hoelzro>
it'll "work"
jorge has joined #ruby
<hoelzro>
but the ordering of the contents of the pipe may get f'ed up
<davertron>
hoelzro: OK, I think in this case I don't care about that all that much
<hoelzro>
fair enough
yacks has quit [Ping timeout: 240 seconds]
<davertron>
but I do think it's cleaner to have separate pipes
<hoelzro>
usually when people write examples like this it's because they're trying to apply the concepts elsewhere =)
<hoelzro>
so just checking
<davertron>
hoelzro: well you're right, this is just a dummy program so
codecop has quit [Remote host closed the connection]
<davertron>
I'll go with separate pipes in my real program :)
gildo has joined #ruby
JZTech101 has joined #ruby
<hoelzro>
cool =)
vlad_starkov has joined #ruby
devoldmx has joined #ruby
DaniG2k has quit [Quit: Leaving.]
tonini has joined #ruby
oceanbreeze has joined #ruby
mary5030 has joined #ruby
mljsimone is now known as mljsimone|away
anonymuse has quit [Remote host closed the connection]
Inoperable has quit [Quit: Rectified]
Dreamer3 has quit [Quit: Computer has gone to sleep.]
<oceanbreeze>
Sup guys, someone already got the new Ruby 2.0 pickaxe book?
jorge has quit [Ping timeout: 276 seconds]
anonymuse has joined #ruby
emergion has joined #ruby
bpmsalonbot has left #ruby ["Leaving"]
mary5030 has quit [Remote host closed the connection]
marcgg_ has joined #ruby
sethetter has joined #ruby
<oceanbreeze>
Come on!
mljsimone|away has quit [Ping timeout: 245 seconds]
Squarepy has joined #ruby
marcgg has quit [Ping timeout: 264 seconds]
anonymuse has quit [Ping timeout: 276 seconds]
fgo has joined #ruby
Zolo has quit [Remote host closed the connection]
wmoxam has joined #ruby
ferdev has quit [Ping timeout: 240 seconds]
binaryplease has joined #ruby
dmiller_ has joined #ruby
joq has joined #ruby
joq has left #ruby ["WeeChat 0.4.1"]
baordog has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
asobrasil has joined #ruby
pr0ggie has quit [Ping timeout: 264 seconds]
yacks has joined #ruby
fernandoaleman has joined #ruby
atyz has joined #ruby
colonolGron has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
mary5030 has joined #ruby
jerius_ has joined #ruby
<fryguy>
mattinahat: you shouldn't have 2 elements on a page with the same id. use classes or something if you want to share things like that
mary5030 has quit [Remote host closed the connection]
niklasb has quit [Read error: Connection reset by peer]
mary5030 has joined #ruby
devoldmx has quit [Ping timeout: 268 seconds]
Iszak has joined #ruby
<mattinahat>
fryguy: I'm trying to scrape the new outlook web app. It broke my old code, and now I'm not sure how to iterate through. Before it used frames and tables, now it looks like it's all put together on the backend and spit out as tons of divs.
niklasb has joined #ruby
sailias has quit [Ping timeout: 246 seconds]
jerius has quit [Ping timeout: 276 seconds]
tk_ has quit [Quit: ばいばい]
tagrudev has quit [Remote host closed the connection]
devoldmx has joined #ruby
xavier23 has joined #ruby
jibi has joined #ruby
PigDude has joined #ruby
<PigDude>
collect or map? select or filter? I use the formers
Spami has quit [Quit: This computer has gone to sleep]
tonini has quit [Remote host closed the connection]
jerius has joined #ruby
tulak has left #ruby [#ruby]
maz-dev has quit [Ping timeout: 246 seconds]
acrussell has joined #ruby
freerobby has joined #ruby
dhruvasagar has joined #ruby
tommyvyo has joined #ruby
viszu has joined #ruby
monkegj__ has quit [Ping timeout: 268 seconds]
Krajsnick has joined #ruby
buibex has quit [Ping timeout: 248 seconds]
burlyscudd has joined #ruby
Astralum has joined #ruby
linusoleander has quit [Quit: linusoleander]
michaeldeol has joined #ruby
renderful has quit [Ping timeout: 256 seconds]
linusoleander has joined #ruby
ananthakumaran1 has joined #ruby
michaeldeol has quit [Remote host closed the connection]
buibex has joined #ruby
linusoleander has quit [Client Quit]
linusoleander has joined #ruby
nemesit|znc has quit [Ping timeout: 256 seconds]
jbpros has joined #ruby
platzhirsch has joined #ruby
andikr has quit [Read error: Connection reset by peer]
jtdowney has joined #ruby
ananthakumaran has quit [Ping timeout: 256 seconds]
<platzhirsch>
when I press CTRL+C Sidekiq shutsdown, but the worker cannot. They keep on working. Do I have to react to a shutdown hook or something similar?
tatsuya_o has joined #ruby
<platzhirsch>
maybe just begin .. rescue SIdekiq::Shutdown
nemesit|znc has joined #ruby
acrussell has left #ruby [#ruby]
linusoleander has quit [Client Quit]
linusoleander has joined #ruby
jtdowney has quit [Read error: Connection reset by peer]
sambao21 has quit [Quit: Computer has gone to sleep.]
michaeldeol has joined #ruby
sailias has quit [Ping timeout: 264 seconds]
eka has joined #ruby
DanKnox_away is now known as DanKnox
Mattix has quit [Quit: Leaving]
Spami has joined #ruby
Spami has quit [Changing host]
Spami has joined #ruby
kobain has quit [Ping timeout: 240 seconds]
havenwood has joined #ruby
kobain has joined #ruby
Gardel has joined #ruby
lindenle has joined #ruby
niceguyjames has joined #ruby
tvw has quit []
fredjean has joined #ruby
niklasb has quit [Ping timeout: 268 seconds]
jbpros has quit [Quit: jbpros]
angusiguess has joined #ruby
Zeeraw has joined #ruby
ddm has joined #ruby
Spooner has quit [Remote host closed the connection]
zomgbie has quit [Read error: Connection reset by peer]
Drago has joined #ruby
burlyscudd has quit [Quit: Leaving.]
angusigu1ss has quit [Ping timeout: 240 seconds]
freerobby has quit [Read error: Connection reset by peer]
devinus has joined #ruby
freerobby1 has joined #ruby
Drago has quit [Client Quit]
g0bl1n has joined #ruby
zeromodulus has joined #ruby
zeromodulus has quit [Changing host]
zeromodulus has joined #ruby
devoldmx3 has joined #ruby
sqd_ has joined #ruby
devoldmx has quit [Ping timeout: 248 seconds]
thoolihan has joined #ruby
Kruppe has quit [Remote host closed the connection]
thoolihan has left #ruby [#ruby]
badquanta has joined #ruby
maroloccio has quit [Quit: WeeChat 0.4.0]
thoolihan has joined #ruby
ferdev has quit [Quit: ferdev]
sailias has joined #ruby
ernar has quit [Quit: ernar]
kofno has quit [Remote host closed the connection]
BRMatt has joined #ruby
atmosx has joined #ruby
baroquebobcat has joined #ruby
michael_mbp is now known as zz_michael_mbp
kofno has joined #ruby
GeissT has quit [Quit: MillBroChat AdIRC User]
dagen has joined #ruby
BSaboia has joined #ruby
fgo has quit [Remote host closed the connection]
mengu_ has quit [Quit: This computer has gone to sleep]
Spami has quit [Ping timeout: 276 seconds]
speaking1ode-wor has joined #ruby
nomenkun has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
<dagen>
please help... i have a table in my DB, table named 'users'. and there is some field named 'some_data' how i can get the data from this field via query from view.html.erb?
<dagen>
i newbie in ruby and can't solve this problem two days...
rodacato has quit [Ping timeout: 256 seconds]
devoldmx3 has quit [Ping timeout: 264 seconds]
rshetty has joined #ruby
<speaking1ode-wor>
can anyone explain this to me? https://gist.github.com/speakingcode/6023143#file-ruby_module_loading_experiment Active record monkey-patches (i believe) Object class with to_json method, via ActiveSupport, but it doesn't take effect until you make an explicit reference to ActiveRecord::Base... what mechanics of imports cause that behavior?
<lectrick>
Why can't I overload && or || ? Waaaah.
devoldmx has joined #ruby
filipe has quit [Ping timeout: 268 seconds]
utdemir has quit [Remote host closed the connection]
<atmosx>
dagen: join #rubyonrails you're using activerecord
Spami has joined #ruby
<atmosx>
speaking1ode-wor: u2
workmad3_ has joined #ruby
rodacato has joined #ruby
carloslopes has quit [Remote host closed the connection]
davertron has left #ruby [#ruby]
davertron has joined #ruby
<dagen>
atmosx 10x
<speaking1ode-wor>
atmosx: my question is about the way ruby loads modules from requires, tho, not about activerecord
phantasm66 has joined #ruby
phantasm66 has quit [Changing host]
phantasm66 has joined #ruby
<speaking1ode-wor>
that is just the working example of it
vlad_starkov has quit [Read error: Connection reset by peer]
phantasm66 has quit [Client Quit]
<lectrick>
from jim weirich, the man: "The && and || operators are not overloadable, mainly because they provide "short circuit" evaluation that cannot be reproduced with pure method calls." Well then clearly, we need to change how method calls are implemented to be able to do this... ;)
phantasm66 has joined #ruby
phantasm66 has joined #ruby
phantasm66 has quit [Client Quit]
<apeiros>
speaking1ode-wor: you're mistaken. not active record adds to_json, active support does.
<lectrick>
Brb hacking parse.y.
<apeiros>
and there it's active_support/core_ext
ferdev has joined #ruby
<apeiros>
lectrick: s/brb/missing in action/
<speaking1ode-wor>
apeiros: that's what i said.. "via ActiveSupport" but my question is why does the monkey patch not take effect until you make an explicit reference to a particular class
shouya has joined #ruby
<apeiros>
probably because it uses autoloading
<speaking1ode-wor>
elaborate?
shouya1 has quit [Ping timeout: 268 seconds]
dawkirst has joined #ruby
<_br_>
having no luck at all in #elasticsearch. Does anyone here know ElasticSearch/Tire Gem and Nested Sorting ?
threesome has joined #ruby
<lectrick>
apeiros: hehe
<workmad3_>
lectrick: what? are you going to alter method parameter passing so that each param is essentially enclosed in an anonymous closure that's automatically evaluated within a method when it's read?
<lectrick>
workmad3_: Of course. Duh. :)
<workmad3_>
lectrick: :D
<lectrick>
workmad3_: (not serious)
zigomir has joined #ruby
<workmad3_>
lectrick: incidentally, you *can* do that in a lisp macro ;)
jonkri has joined #ruby
jonkri has joined #ruby
jonkri has quit [Changing host]
<lectrick>
workmad3_: But that's pretty much how that would have to be implemented, I guess. Imagine having to .call every parameter lol
havenwood has quit [Remote host closed the connection]
DonRichie has joined #ruby
<lectrick>
workmad3_: What CAN'T you do in a Lisp macro? (Good to point out, regardless.)
sayan has quit [Ping timeout: 240 seconds]
wsterling has joined #ruby
<workmad3_>
lectrick: err... calculate pi exactly in non-infinite time?
DestinyAwaits has left #ruby ["Leaving"]
BRMatt has quit [Ping timeout: 264 seconds]
sambao21 has joined #ruby
mantas322 has joined #ruby
<mantas322>
Hi guys
jonathanwallace has quit [Ping timeout: 246 seconds]
<lectrick>
workmad3_: I was going to say "search meatspace for complete satisfaction parameters" and get all metaphysical, but that works too :)
<apeiros>
speaking1ode-wor: take a look at the active_record.rb file
<mantas322>
if I want to create a string of "y" of a certain length, whats an optimal way of doing this in one line?
<lectrick>
I went through a Scheme class somehow not understanding closures until I studied Ruby for a time.
ssvo has quit [Ping timeout: 240 seconds]
<mantas322>
i = 0 while i < 10 y_Count += "y" i+=1 end
<workmad3_>
lectrick: I just grasped at the first task that came to mind that was non-computable :)
<apeiros>
speaking1ode-wor: and at ActiveSupport::Autoload
<lectrick>
workmad3_: It's easy to calculate pi exactly in non-infinite time as long as you're not trying to represent it using a decimal. π... there, done. :)
<workmad3_>
lectrick: my second example would probably have been something to do with the halting problem :)
dhruvasagar has quit [Ping timeout: 276 seconds]
mattsgarrison_ has joined #ruby
<workmad3_>
lectrick: that isn't it calculated
phantasm66 has joined #ruby
phantasm66 has quit [Changing host]
phantasm66 has joined #ruby
<workmad3_>
lectrick: that's a symbol used to represent the exact value for purposes of manipulation
<lectrick>
There are 2 kinds of people in the world, those who understand the halting problem, and th... ... ......
<workmad3_>
:)
pipework has quit [Ping timeout: 276 seconds]
lebek has joined #ruby
<apeiros>
reminds me of: there are 10 kinds of people in the world - those who understand binary, and those who don't.
sailias has quit [Ping timeout: 240 seconds]
<workmad3_>
I quite like 'there are 2 kinds of people in the world, those who split people into two categories and those who don't'
<apeiros>
and: dead people understand hex
<lectrick>
workmad3_: Well, in my representational alphabet, the π IS the value of pi. :)
mattsgarrison_ has quit [Remote host closed the connection]
<speaking1ode-wor>
so there's a good talk about computation and halting problem with ruby examples, http://vimeo.com/66849976
bigoldrock has joined #ruby
mattsgarrison_ has joined #ruby
<workmad3_>
apeiros: I see DEAD people
jsatk has quit [Remote host closed the connection]
<workmad3_>
or is that I see 0xDEAD people? :)
<apeiros>
really? are you in an airport or train station?
<apeiros>
or a stadion?
<workmad3_>
:P
* apeiros
wonders where you could see that many people
<apeiros>
also, you sure you don't see DEAF people? :D
burlyscudd has joined #ruby
<apeiros>
you could have miscounted after all…
pipework has joined #ruby
ybart has quit [Quit: ybart]
havenwood has joined #ruby
fredjean has quit [Quit: Computer has gone to sleep.]
<lectrick>
Didn't some system use 0xDEAD to represent some actual failure state code?
* workmad3_
goes ::1
<workmad3_>
lectrick: wasn't that DEADBEAF ?
<workmad3_>
*DEADBEEF
mantas322 has left #ruby [#ruby]
<lectrick>
workmad3_: yeah, perhaps. I forget the deets
binw has quit [Read error: Connection reset by peer]
tkuchiki has joined #ruby
carloslopes has joined #ruby
cj3kim has quit [Ping timeout: 268 seconds]
henn has joined #ruby
henn has joined #ruby
henn has quit [Changing host]
TheBay has joined #ruby
thoolihan has quit [Quit: thoolihan]
Spami has joined #ruby
<TheBay>
hi, what book u recommend to learn Ruby from Novice level ? ty
sailias has joined #ruby
dhruvasagar has quit [Ping timeout: 260 seconds]
<speaking1ode-wor>
TheBay: the well-grounded rubyist is pretty good, as is the pragmatic programmers book, programming ruby or something. people call it the 'pickaxe' book
danbeck has quit [Quit: danbeck]
<TheBay>
speaking1ode-wor: k ty (Y)
<_br_>
TheBay: Poignant Guide
workmad3_ has quit [Ping timeout: 260 seconds]
renderful has quit [Ping timeout: 256 seconds]
thepumpkin has joined #ruby
thoolihan has joined #ruby
_ffio_ has joined #ruby
binw has joined #ruby
burlyscudd has joined #ruby
johchri has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ffio_ has quit [Ping timeout: 248 seconds]
mikeg has joined #ruby
Kruppe has joined #ruby
<TheBay>
don't matter the version used in those books ?
<speaking1ode-wor>
preferably the most recent versions
mercwithamouth has quit [Ping timeout: 240 seconds]
robscomputer has joined #ruby
<TheBay>
speaking1ode-wor: k
binaryplease has quit [Ping timeout: 240 seconds]
danbeck has joined #ruby
<_br_>
PickAxe is so boring it has no chunky bacon.
d2dchat has joined #ruby
noname001 has quit [Ping timeout: 240 seconds]
<speaking1ode-wor>
it's straightforward. the problem with poignant IMO is that it has a problem getting to the point, and goes on tangential rants about nothing, coupled with annoying and shitty drawings with dialog of questionable relevance... jus sayin
<_br_>
speaking1ode-wor: Nice try you little troll.
<speaking1ode-wor>
oh stating my opinion candidly with examples to back it up makes me a troll? troll i shall be, then
nemesit|znc has joined #ruby
mattsgarrison_ has quit [Remote host closed the connection]
denver has quit [Remote host closed the connection]
djbkd has joined #ruby
dagen has quit []
mattsgarrison_ has joined #ruby
mneorr has joined #ruby
Speed has joined #ruby
mneorr_ has quit [Ping timeout: 248 seconds]
BRMatt has joined #ruby
burlyscudd has quit [Quit: Leaving.]
dagobah has quit [Remote host closed the connection]
daxroc1 has quit [Quit: Leaving.]
xardas has joined #ruby
sailias has quit [Ping timeout: 246 seconds]
<terrellt>
Yeah, I've never read it, but based on a couple chapters I just went through that's a lot of filler.
cha1tanya has joined #ruby
fredjean has quit [Ping timeout: 276 seconds]
arietis has quit [Quit: Computer has gone to sleep.]
<_br_>
Phew. I just realized that ruby seems to have become the 'new' java apparently listening to you guys.
henn has quit [Ping timeout: 264 seconds]
mahmoudimus has joined #ruby
<speaking1ode-wor>
curious how a discussion of tutorial book style reflects ruby or java, or what that even means?
kofno has quit [Remote host closed the connection]
<_br_>
You never studied _why's projects, have you?
<_br_>
Ruby is supposed to be fun. Pickaxe is a dry collection of factoids.
buibex has quit [Ping timeout: 248 seconds]
johchri has quit [Ping timeout: 240 seconds]
<speaking1ode-wor>
i know all about _why, but what do his projects have to do with my opinoin of his book?
<Bira>
People learn differently. Some do better with whimsical books like the Poignant Guide, some do better with more traditional textbooks. I'm personally glad both are available.
dankest has joined #ruby
devoldmx has quit [Ping timeout: 264 seconds]
kofno has joined #ruby
fredjean has joined #ruby
<_br_>
speaking1ode-wor: Never mind. I'd rather not continue this conversation. Thanks.
<Bira>
Both being available makes Ruby more accessible to more people.
<havenwood>
TheBay: I've heard people highly recommend "Learn to Program, by Chris Pine".
devoldmx has joined #ruby
<Bira>
That's a good one too.
sr78ger has joined #ruby
<havenwood>
TheBay: Do take a look at _why's poignant guide, and be sure to listen to the soundtrack whilst you read :O
alup has quit [Quit: Leaving]
cha1tanya is now known as punerb-git
<speaking1ode-wor>
i agree with Bira. _br_ you made the first critical comment, regarding pickaxe, so i simply stated my own critique of poignant, to express the dichotomy of style. i don't think the discussion has any bearing on fun. maybe some people find annyoing irrelvant doodles and rants that are off topic and off base from the subject matter to not be fun. i'm such person. the fun in ruby is in learning it and using it, not giggling over "humor"
Eiam has joined #ruby
arietis has joined #ruby
<Bira>
Learn to Program is good if you are entirely new to programming in general, as is _why's book if you like its style.
<Bira>
The Pickaxe, IMHO, will be more useful if you already know how to program and are only new to the Ruby language.
nomenkun has quit [Remote host closed the connection]
<havenwood>
Chunky bacon is important.
fomatin has joined #ruby
nari has quit [Ping timeout: 248 seconds]
monkegjinni has joined #ruby
<speaking1ode-wor>
there's an overwhelming amount of free tutorials and guides online as well, and a lot of them are quality. i'd also recommend codecademy.com's ruby lessons, nice way to dive into the syntax
<havenwood>
Pickaxe seems like a neat reference though. Flipped through it at the book store, but they were selling an old version and it was expensive.
jlast_ has joined #ruby
jlast_ has quit [Remote host closed the connection]
<speaking1ode-wor>
havenwood: that's funny. not the most recent version, but a farily recent version, is freely available online, and i've seen the most recent one online too but i'm not sure that it was supposed to be free :-O
realDAB has joined #ruby
<Bira>
The Pickaxe is indeed a neat reference! I'd also say it's a great second book on the language if you're new to programming (i.e, start with Learn to Program or the Poignant Guide, move on to the Pickaxe). The latest version isn't too expensive in PDF form.
PhatBaja has joined #ruby
jlast_ has joined #ruby
anonymuse has quit [Remote host closed the connection]
jlast has quit [Ping timeout: 240 seconds]
atno has quit [Read error: No route to host]
atno__ has joined #ruby
Yakko has quit [Ping timeout: 246 seconds]
punerb-git is now known as cha
speaking1ode-wor is now known as speakingcode-wor
cha is now known as cha1tanya
devinus has quit [Quit: devintorr.es]
saarinen has joined #ruby
robscomputer has quit [Remote host closed the connection]
robscomputer has joined #ruby
dankest has quit [Quit: dankest]
d3 has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
brunoro has joined #ruby
woolite64_ has joined #ruby
pupoque has quit [Ping timeout: 268 seconds]
devoldmx3 has joined #ruby
mercwithamouth has joined #ruby
henn has joined #ruby
henn has joined #ruby
geggam has joined #ruby
krainboltgreene has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
buibex has joined #ruby
woolite64 has quit [Ping timeout: 248 seconds]
eldariof has joined #ruby
robscomputer has quit [Ping timeout: 248 seconds]
dash__ has quit [Quit: Time to beer :)]
devoldmx has quit [Ping timeout: 248 seconds]
devoldmx3 has quit [Ping timeout: 264 seconds]
devoldmx has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
d3 has joined #ruby
shaunbaker has joined #ruby
zz_michael_mbp is now known as michael_mbp
aaronmcadam has quit [Quit: Leaving...]
devoldmx3 has joined #ruby
anonymuse has joined #ruby
sr78ger has quit [Quit: Qui]
zaltekk has left #ruby [#ruby]
PhatBaja has quit [Quit: Leaving.]
jlast_ has quit [Remote host closed the connection]
devoldmx has quit [Ping timeout: 264 seconds]
<lectrick>
I think I need help/practice in not turning boring problems into interesting ones unnecessarily (adding time without equivalent payoff necessarily)
ferdev has quit [Quit: ferdev]
iliketurtles has joined #ruby
dankest has joined #ruby
dhruvasagar has joined #ruby
michael_mbp is now known as zz_michael_mbp
asteve has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zz_michael_mbp is now known as michael_mbp
<lectrick>
For example, I needed a way to convert to and from base58 for some bitcoin stuff I'm working on. The gem already out there does not use btc's version of base58, it swaps the lowercase and capitals. So instead of just using a variant of that code, I wrote something that converts from any base, to any other base, using any character/symbol set. :O
woolite64__ has joined #ruby
<lectrick>
Now, while this will probably make a great gem whenever I get around to releasing it as such, I surely spent more time on this immediate problem than was merited
<lectrick>
(and was of course more interesting to work on)
iliketurtles has quit [Client Quit]
<lectrick>
So if there are any freelance types out there who are good at this, I'd love some advice on where that line should be drawn and how.
monkegjinni has quit [Remote host closed the connection]
iliketurtles has joined #ruby
<mjc_>
lectrick: release it so you get the payoff you were working toward and move on :)
Zeeraw has quit [Quit: Computer has gone to sleep.]
<mjc_>
lectrick: if you do work to make something generic like that with the intent of making a gem, you haven't finished doing so and the work is wasted
clintnewsom has quit [Quit: clintnewsom]
fernandoaleman has quit [Quit: Leaving.]
anonymuse has quit [Remote host closed the connection]
<lectrick>
I have a bunch of pieces of code that could all be gems. Possibly good or popular gems. I'm chickening out at the gem-cutting part for some reason. (Not for inability; it's some kind of mental block- fear of success? lol)
<lectrick>
Fear of attention? I don't know.
<aedorn>
lectrick: No, no, you're going about this wrong. You want to turn them into interesting problems - and then you want to write a better "Learn to Program" book, or a website full of interesting problems people can practice with. Monetize!
pedestrian has joined #ruby
woolite64_ has quit [Ping timeout: 268 seconds]
DanKnox is now known as DanKnox_away
ultimoo has joined #ruby
arietis has joined #ruby
JohnBat26 has joined #ruby
Fire-Dragon-DoL has joined #ruby
inimit has joined #ruby
realDAB has quit [Quit: realDAB]
<lectrick>
So here's an example where this did pay off- I looked at this codebase's dozens of unregulated monkeypatches in horror and wrote a monkeypatch-manager API/class simply called "Patcher". Currently it's embedded in our project but I'm sure it could be gemified (it already has tests etc.)
Al_ has joined #ruby
<terrellt>
lectrick: Cut the gem, put it on github/rubygems, say "accepting pull requests", and go about your life.
<lectrick>
We recently upgraded to 3.2 and, like magic, a bunch of patches just shut themselves off (due to how they work). Everyone here was like "whoa, this just avoided a shitload of debugging"
cantonic has joined #ruby
thoolihan has quit [Ping timeout: 260 seconds]
<speakingcode-wor>
as a freelancer i would say taking time to generalize things, cut gems etc will likely save you work later on when you reuse them in other projects, etc. it may also save someone else work, which is just as good, as it adds to the symbiosis of the community, and by freeing someone from solvig that problem, they are free to solve new problems in exchange...that said, meet your deadlines first, get your money. how you balance depeonds on y
<atmosx>
lectrick: just do it (by Nike)
shaunbaker has quit [Remote host closed the connection]
<lectrick>
The current strategy is: "If this looks like this could be generalized/useful for others, MAKE A MENTAL NOTE TO FINISH IT ON MY OWN TIME and then force myself to solve the immediate problem for now"... Not always successful with that lol
ryannielson has joined #ruby
<speakingcode-wor>
there's always the triangle of deadline, budget, and quality
<atmosx>
lectrick: I think that what's everybody is doing
<lectrick>
terrellt: Well, if I get past the block, there's going to be a large quantity unleashed at once :)
<terrellt>
lectrick: Good?
<lectrick>
terrellt: :)
<atmosx>
this 'dd' takes foverever hm
<lectrick>
speakingcode-wor: with the edges of "fast, cheap, good" right? pick 2? :)
realDAB has joined #ruby
tjbiddle has joined #ruby
<michael_mbp>
how can I do class_eval on Class.new without passing a block?
cj3kim has joined #ruby
dv__ has joined #ruby
cj3kim has quit [Read error: Connection reset by peer]
sambao21 has quit [Quit: Computer has gone to sleep.]
cj3kim has joined #ruby
byprdct has joined #ruby
carloslopes has quit [Remote host closed the connection]
mklappstuhl has joined #ruby
adeponte has joined #ruby
<speakingcode-wor>
lectrick: yup. andi would say generalization falls under quality, from your c lients perspective.
<michael_mbp>
I feel doing klass = Class.new; klass.class.class_eval is bad form as that injects stuff into Class itself.
dv_ has quit [Ping timeout: 276 seconds]
<michael_mbp>
that's the same as Class.class_eval.
<lectrick>
mahlon: klass.instance_eval ? :O
io_syl has joined #ruby
reset has joined #ruby
DanKnox_away is now known as DanKnox
<michael_mbp>
lectrick: instance_eval... ah :)
TheBay is now known as anon_
renderful has joined #ruby
chxane has quit [Remote host closed the connection]
<lectrick>
does a class defined via klass=Class.new go out of scope and get garbage-collected? (I think so, just wondering)
matchaw_ has quit [Read error: Connection reset by peer]
cha1tanya has quit [Quit: cha1tanya]
chxane has joined #ruby
saarinen has quit [Quit: saarinen]
smathieu has joined #ruby
anon_ has quit [Remote host closed the connection]
renderful has quit [Ping timeout: 240 seconds]
<Hanmac>
tectrick i think this is difficult to test right?
apeiros has joined #ruby
ephemerian has left #ruby [#ruby]
<michael_mbp>
lectrick: class_eval/instance_eval is only available on the Class
<Hanmac>
lectrick: from what i test, the class says alive as long one of the instances lives …
buibex has quit [Remote host closed the connection]
<michael_mbp>
so MyClass = Class.new is the same as doing class MyClass; end;
stkowski has joined #ruby
m8 has joined #ruby
<michael_mbp>
instance_eval is done in the scope of the singleton, class_eval in the scope of 'mod'
bertolo has joined #ruby
pcasaretto has joined #ruby
<michael_mbp>
I'm trying to use this for testing purposes
cj3kim has quit [Read error: Connection reset by peer]
rsahae has joined #ruby
poikon has joined #ruby
henn has quit [Remote host closed the connection]
chase-work has joined #ruby
<michael_mbp>
problem in 'naming' the class is that it pollutes the env.
ToApolytoXaos has joined #ruby
<pcasaretto>
Hey guys, did anyone have any trouble with Rails serialized attributes when updating to 2.0 ?
cj3kim has joined #ruby
<michael_mbp>
ObjectSpace?
<michael_mbp>
one way would be to remove the 'constant' from the env?
xardas has quit [Read error: Connection reset by peer]
<Hanmac>
and beware that class obj; .. end works too if you need to play with Constants
xardas has joined #ruby
tkuchiki has quit [Remote host closed the connection]
<michael_mbp>
hanmac: thoughts?
Vivekananda has joined #ruby
Sou|cutter has joined #ruby
<Hanmac>
michael_mbp: remove_const
Squarepy has quit [Quit: Leaving]
Davey has quit [Quit: Computer has gone to sleep.]
twoism has joined #ruby
avril14th has quit [Remote host closed the connection]
danbeck has quit [Quit: danbeck]
jlast has joined #ruby
jonathanwallace has joined #ruby
<michael_mbp>
ooh!
brianpWins has quit [Quit: brianpWins]
<michael_mbp>
you can do klass = Class.new; klass.send(:include, ...)
<Hanmac>
you can also do class klass; include … ; end
iliketurtles has quit [Quit: zzzzz…..]
S0da has joined #ruby
marcdel has joined #ruby
araujo has quit [Read error: Connection reset by peer]
cantonic_ has joined #ruby
cantonic has quit [Ping timeout: 264 seconds]
cantonic_ is now known as cantonic
araujo has joined #ruby
Anarch has quit [Ping timeout: 240 seconds]
senayar has quit [Remote host closed the connection]
<michael_mbp>
yeah, that's opening it up ofc.
dankest has quit [Quit: dankest]
<speakingcode-wor>
is there a reason to not put [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
<speakingcode-wor>
in .bashrc, versus .bash_profile
<Hanmac>
did you know that you can hide classes inside the singleton classes of other objects? ;D
i_s has joined #ruby
axl_ has quit [Quit: axl_]
mercwithamouth has quit [Ping timeout: 246 seconds]
michaeldeol has quit [Remote host closed the connection]
<Hanmac>
hm i would prefer if that anoym class would look more like this: "#<Class:#<Object:0x007fcd1c8a1538>>::A" but i dont know if that is possible
devinus has joined #ruby
<michael_mbp>
I can't seem to access A though from the object
carloslopes has joined #ruby
pcasaretto has quit [Quit: pcasaretto]
<Hanmac>
michael_mbp yeah, you need "singleton_class" for that
<michael_mbp>
how do you call p though?
<michael_mbp>
oh p isn't a mehtod there :)
<michael_mbp>
why do you need p self ?
anonymuse has joined #ruby
<Hanmac>
i wanted to show you want does it return inside the class of this class
<michael_mbp>
ah
jonathanwallace has quit [Ping timeout: 260 seconds]
dankest has quit [Quit: dankest]
nikeita has joined #ruby
dankest has joined #ruby
asteve has joined #ruby
asteve has quit [Max SendQ exceeded]
rsahae has quit [Quit: rsahae]
bionoid has quit [Remote host closed the connection]
Zai00 has quit [Quit: Zai00]
asteve has joined #ruby
TheBay has joined #ruby
momomomomo has joined #ruby
rezzack has joined #ruby
<michael_mbp>
I need to get around the difference of class_eval and instance_eval.
momomomomo has quit [Client Quit]
carloslopes has quit [Ping timeout: 240 seconds]
<havenwood>
michael_mbp: use class_eval for instances and instance_eval for classes :P
pedahzur has joined #ruby
atno__ has quit [Remote host closed the connection]
<havenwood>
cause that makes perfect sense, right?!
<Hanmac>
use class_eval on classes defines method for instances ;P
TheBay has left #ruby [#ruby]
gnagno_ has joined #ruby
cj3kim has quit [Read error: Connection reset by peer]
<pedahzur>
I have a ruby app running on one of my servers (not my app). It is using, constantly, 100% CPU, even though I know (from the purpose of the script) it is not CPU bound. It is a dispatcher of other processes. strace'ing the processes shows a lot of "rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0" and even more (LOTS AND LOTS AND LOTS) of "rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0" What might I be able to tell the developer to look for
<pedahzur>
to reduce this application's CPU usage? Or is that not nearly enough information? :)
rsahae has joined #ruby
cj3kim has joined #ruby
roadt__ has quit [Read error: Connection reset by peer]
thebope has joined #ruby
<havenwood>
pedahzur: What version of Ruby?
<havenwood>
pedahzur: 1.8?
<thebope>
Suppose I would like to define a DataStructure class which catches NoMethodError as opposed to having the ruby compiler catch it
gnagno_ has quit [Read error: Connection reset by peer]
<thebope>
I've got a catch NoMethodError do block, but the compiler still catches it
BSaboia has quit [Read error: Operation timed out]
<gnagno>
can I declare a method that will be globally available in my application ?
bionoid has joined #ruby
mercwithamouth has joined #ruby
<havenwood>
pedahzur: 1.8 is End-of-Lifed, update to 1.9.2+ if possible!
Pandee has joined #ruby
Al_ has quit [Quit: Al_]
<havenwood>
2.0 is latest stable.
mark_locklear has quit [Ping timeout: 264 seconds]
mmitchell has joined #ruby
<lectrick>
Is there a way for git to auto-stash work when you switch branches and auto-unstash work that was stashed on the branch you just switched to?
resno has joined #ruby
MrZYX is now known as MrZYX|off
<pedahzur>
havenwood: Kind of out of our control. This is RHEL 6.3. Surprised they haven't backported the fix.
<gnagno>
lectrick, I think you can solve it with a bash script
<havenwood>
pedahzur: Yeah, i was glad to see Ruby 2.0.0-p247 as default Ruby in Fedora 19.
<fryguy>
pedahzur: that's what rvm, rbenv, and chruby are for
* Hanmac
is a trunk user
<lectrick>
gnagno: or a clever alias I guess
<matti>
LOL
<matti>
hanmac: ;p
clintnewsom has joined #ruby
spider-mario has joined #ruby
spider-mario has quit [Client Quit]
<gnagno>
lectrick, I don't know if you can make an alias execute more than a command... but I think we are a bit OT here
<Hanmac>
matti: all my libs i use for my bindings are daily trunk
smathieu has quit [Remote host closed the connection]
<pedahzur>
fryguy: Thanks, I'll keep that in mind.
monkegjinni has joined #ruby
<havenwood>
pedahzur: I love me some ruby-install + chruby, but yeah, that is a conundrum if you're stuck on 1.8.7.
<thebope>
For some reason gist never works for me when I click create gist
<Hanmac>
havenwood: when the time has come and they are more finish than now … but you can also try to add README files for me ;P
bionoid has joined #ruby
<havenwood>
hanmac: Touche! I should indeed, been meaning to check em out in more detail.
Kruppe has quit [Remote host closed the connection]
<thebope>
when the test runs I receive "Failure: Expected , was " but I would like "Failure: Expected , was NoMethodError"
d2dchat has quit [Remote host closed the connection]
<mjc_>
Sou|cutter: does the regex work as two seperate tests? /vendor/.+/spec/spec_helper.rb and /spec/spec_helper.rb ?
rsahae has quit [Quit: rsahae]
vlad_starkov has quit [Ping timeout: 260 seconds]
mansi has quit [Read error: Connection reset by peer]
<thebope>
adding to_s does not work either, hmm
<Sou|cutter>
mjc_: let me see...
gildo has joined #ruby
mansi has joined #ruby
rsahae has joined #ruby
<resno>
i admin a site running ruby using radiant cms version .8.1 and version 1.8 of ruby. is this site at danger for bad things?
TheBay is now known as annon
bricker has joined #ruby
<thebope>
perhaps an ensure block
pwnfactory has quit [Quit: Leaving]
blaxter_ has quit [Ping timeout: 240 seconds]
dankest has joined #ruby
<havenwood>
resno: Ruby 1.8 is deprecated. As of a fortnight ago it will receive no security patches. So though it is currently up-to-date security-wise, it won't be soon enough.
vikhyat has quit [Remote host closed the connection]
<Hanmac>
resno its like riding an dead horse … and i dont mean an cool undead one
L8D has quit [Remote host closed the connection]
samuel02 has quit [Ping timeout: 240 seconds]
seich- has quit [Ping timeout: 240 seconds]
<resno>
the dev who worked on it has went off on his merry way, so im trying to decide how to manage a site which is only kept for archives
wsterling has quit [Read error: Connection reset by peer]
wsterling has joined #ruby
vlad_starkov has quit [Ping timeout: 246 seconds]
mansi has quit [Ping timeout: 256 seconds]
cj3kim has quit [Remote host closed the connection]
brianpWins has quit [Quit: brianpWins]
viszu has joined #ruby
mmitchell has quit [Ping timeout: 264 seconds]
tgrimley1 is now known as tomgrim
devinus has quit [Quit: devintorr.es]
vlad_starkov has joined #ruby
havenwood has quit [Remote host closed the connection]
michael_mbp is now known as zz_michael_mbp
brianpWins has joined #ruby
mansi has joined #ruby
wsterlin_ has joined #ruby
wsterling has quit [Read error: Connection reset by peer]
bionoid has joined #ruby
<joshu_>
I think it has something to do with rake adding "lib" by default, and when I specify the tests directory task.libs << 'tests' it becomes Command failed with status (1): [ruby -I"lib:tests"
csdc has joined #ruby
stkowski has quit [Quit: stkowski]
pothibo has joined #ruby
sethetter has joined #ruby
tacos1de has quit [Ping timeout: 240 seconds]
rezzack has joined #ruby
end_guy has quit [Ping timeout: 240 seconds]
echevemaster has joined #ruby
echevemaster has joined #ruby
echevemaster has quit [Changing host]
cj3kim has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
samuel02 has joined #ruby
tacos1de has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
michaeldeol has quit [Remote host closed the connection]
peregrine81 has quit [Quit: peregrine81]
platzhirsch has joined #ruby
blackmesa has joined #ruby
bondar has quit []
anonymuse has quit [Remote host closed the connection]
jbpros has joined #ruby
rodacato has quit [Remote host closed the connection]
axl_ has quit [Quit: axl_]
carloslopes has joined #ruby
burlyscudd has quit [Quit: Leaving.]
shouya has quit [Ping timeout: 276 seconds]
thepumpkin has quit [Remote host closed the connection]
speakingcode-wor has quit [Quit: Lost terminal]
burlyscudd has joined #ruby
<freerobby1>
Is the reason that some gems have rails-specific integration gems to avoid requiring rails as a dependency?
<freerobby1>
e.g. factory_girl has factory_girl_rails
gildo has quit [Ping timeout: 240 seconds]
<freerobby1>
I'm building a gem and not sure whether to make an entirely separate rails integration gem or find a way to bundle them together with an optional dependency
fernandoaleman has left #ruby [#ruby]
<platzhirsch>
Any sidekiq users? I have no idea how to gracefully shutdown my worker if a kill commands come in
axl_ has joined #ruby
soulcake has joined #ruby
dankest has joined #ruby
kpmjf has quit [Quit: leaving]
<aedorn>
freerobby1: No, it's more because certain gems must do things a very specific way to integrate into Rails, in which it's not compatible with regular Ruby projects.
xavier23 has quit [Ping timeout: 268 seconds]
soulcake has quit [Read error: Connection reset by peer]
dennisz has joined #ruby
devoldmx3 has joined #ruby
lellisga has joined #ruby
xavier23 has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
<aedorn>
platzhirsch: If you're sending a TERM signal then they have X amount of seconds to shutdown before being terminated, where X is the amount specified by the -t option when you started it (or default of 8 seconds)
tonini has joined #ruby
KevinSjoberg has quit [Quit: Computer has gone to sleep.]
speakingcode-wor has joined #ruby
<platzhirsch>
aedorn: actually I just press CTRL+C in the console which should be SIGINT
Krajsnick has quit [Remote host closed the connection]
<platzhirsch>
but the effect is the same, free workers are shutdown and as you said 8 seconds until the termination
<platzhirsch>
but actually that termination never happens
end_guy has joined #ruby
ntus1017 has quit [Remote host closed the connection]
lellisga has quit [Remote host closed the connection]
<aedorn>
Yeah, guess it traps SIGINT also. (INT, TERM, USR1, USR2, and TTIN according to the code)
smathieu has quit [Remote host closed the connection]
xavier23 has quit [Ping timeout: 259 seconds]
eldariof has quit [Ping timeout: 240 seconds]
burlyscudd has quit [Quit: Leaving.]
pkrnj has joined #ruby
soulcake has joined #ruby
<platzhirsch>
aedorn: but I am not sure whether I have to to anything, as I have read the documentation, the Sidekiq manager should kill remaining processes
shouya has quit [Ping timeout: 264 seconds]
harrymoreno_ has joined #ruby
harrymoreno has quit [Ping timeout: 240 seconds]
harrymoreno_ is now known as harrymoreno
cj3kim has quit [Remote host closed the connection]
<aedorn>
Yes, it should, but if it doesn't then you have something holding the process up. It just uses an exception within the thread if it goes over the time allotted for shutting down. So if it doesn't hit that exception then it'll continue to run.
jkline has joined #ruby
<aedorn>
So you'll have to either kill -9 the workers, or figure out why it's getting 'stuck'
avidity has joined #ruby
xavier23 has joined #ruby
<avidity>
good grief.. finally got that curl/curb problem fixed. turns out it was the rdebug gem that needed to be updated. i'm using the rubymine ide and when i updated the ide it must have updated it's gemfile because it updated rdebug
<avidity>
and now everything works
mansi has quit [Remote host closed the connection]
thepumpkin has joined #ruby
Liquid-- has quit [Quit: Computer has gone to sleep.]
mansi has joined #ruby
Liquid-- has joined #ruby
ilyam has joined #ruby
<freerobby1>
aedorn: Couldn't they simply not load those files by default though and let rails users require them?
michaeldeol has joined #ruby
reset has quit [Quit: Leaving...]
zz_michael_mbp is now known as michael_mbp
cj3kim has joined #ruby
mansi has quit [Ping timeout: 240 seconds]
vlad_starkov has joined #ruby
apeiros has quit [Remote host closed the connection]
<aedorn>
freerobby1: Some people do that. The preferred methods seems to be a separate gem just so anything Rails specific can be updated separately. It's all personal preference though.
Liquid-- has quit [Client Quit]
devinus has quit [Quit: devintorr.es]
renderful has joined #ruby
shouya has joined #ruby
mneorr has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
v0n has quit [Ping timeout: 268 seconds]
ryannielson has quit [Quit: ryannielson]
v0n has joined #ruby
devinus has joined #ruby
viszu has quit [Quit: Leaving.]
rsahae has quit [Quit: rsahae]
v0n has quit [Client Quit]
renderful has quit [Ping timeout: 248 seconds]
jprovazn has quit [Quit: Odcházím]
v0n has joined #ruby
darth_chatri has quit [Quit: Leaving.]
niklasb has joined #ruby
saarinen has joined #ruby
sambao21 has joined #ruby
davedev24 has quit [Remote host closed the connection]
DrShoggoth has quit [Quit: Leaving]
iliketurtles has joined #ruby
<platzhirsch>
aedorn: thanks for the input :) guess it's time some debugging then
<joshu_>
very odd if I do this " class TestMeme < Minitest::Unit::TestCase" rake test works, but when I do " class TestMeme < Minitest::Test´" it doesn't
tatsuya_o has joined #ruby
marcgg has joined #ruby
mansi has joined #ruby
realDAB has joined #ruby
kofno has quit [Remote host closed the connection]
rodacato has quit [Remote host closed the connection]
michaeldeol has quit [Remote host closed the connection]
blackmesa has quit [Remote host closed the connection]
cj3kim has quit [Remote host closed the connection]
blackmesa has joined #ruby
pedestrian has quit [Quit: WeeChat 0.4.1]
workmad3 has joined #ruby
rodacato has joined #ruby
reset has joined #ruby
timonv has joined #ruby
nikeita has quit [Quit: bye bye]
wmoxam has quit [Ping timeout: 248 seconds]
nezumi has quit [Ping timeout: 256 seconds]
carloslopes has quit [Read error: Connection reset by peer]
diegoviola has quit [Read error: Connection reset by peer]
carloslopes has joined #ruby
Liquid-- has quit [Quit: Computer has gone to sleep.]
Guest93225 has joined #ruby
Guest93225 is now known as diegoviola
nkts has joined #ruby
<louism2_>
ok, I think I may have lost my mind… I am trying to use a simple elsif statement for control flow and for some reason I can't get execution to enter into the elsif block: https://gist.github.com/louism2/6032994
pitzips_ has quit [Ping timeout: 264 seconds]
Kruppe has quit [Ping timeout: 264 seconds]
lnormous has quit [Quit: Leaving]
<mjc_>
louism2_: is date_in true?
nkts_ has joined #ruby
nkts_ has quit [Max SendQ exceeded]
<louism2_>
mjc_: no
<louism2_>
mjc_: it's not nil
p0wn3d has quit [Remote host closed the connection]
tonini has quit [Remote host closed the connection]
nkts_ has joined #ruby
<mjc_>
louism2_: if you put something in the if date_in section, do you see it execute?
stkowski has quit [Quit: stkowski]
brunoro has quit [Ping timeout: 246 seconds]
<louism2_>
mjc_: yeah
<mjc_>
louism2_: then date_in is evaluating to true
<mjc_>
louism2_: in ruby only false evaluates to false IIRC
robscomputer has quit [Read error: Connection reset by peer]
rsahae has joined #ruby
<DrIDK>
humm... So, I just create a method : def test(a) puts a end;
robscomputer has joined #ruby
kjellski has joined #ruby
devoldmx has quit [Ping timeout: 240 seconds]
iliketurtles has joined #ruby
ilyam has joined #ruby
iliketurtles has quit [Max SendQ exceeded]
<DrIDK>
ahh
<DrIDK>
sorry, I didn't notice.... ":" can be after or before
iliketurtles has joined #ruby
drakedouay has quit [Quit: leaving]
kjellski has quit [Client Quit]
<havenwood>
DrIDK: Colon-before with a 'Hash rocket' is 1.8-style, and the new syntax is 1.9.
Nisstyre has quit [Quit: Leaving]
wmoxam has joined #ruby
<DrIDK>
havenwood, but this is not working for string as keys ?
<havenwood>
In any case, the hash-rocket lives. When the key isn't a symbol, hash-rocket it is.
splittingred has quit [Quit: splittingred]
<havenwood>
DrIDK: Hash rocket for strings.
<DrIDK>
havenwood, thanks! I understood now
<havenwood>
{aim: true, 'string' => true}
<slash_nick>
Also, people cringe when you swap syntaxes... if you're going to be using hash rocket syntax for one key/value pair, use it consistently for all key/value pairs
<havenwood>
I just use 1.9 syntax for symbol keys, and uniformly so.
Hanmac has joined #ruby
asgardBSD_ has joined #ruby
<havenwood>
even if it is {key: :value}
sethetter has quit [Ping timeout: 268 seconds]
carloslopes has quit [Remote host closed the connection]
<waxjar>
that's why the hash rocket's still the bomb
asgardBSD has quit [Ping timeout: 264 seconds]
<havenwood>
a hash bomb?
v0n has quit [Read error: Operation timed out]
<slash_nick>
i'll take one
<waxjar>
haha, yes pls
bigmac has joined #ruby
atyz has joined #ruby
bigmac is now known as i8igmac
reset has joined #ruby
wmoxam has quit [Ping timeout: 240 seconds]
<DrIDK>
and second question... Do you know why gem request is very slow ?
jacktrick has joined #ruby
<havenwood>
a particular gem command?
phantummm has joined #ruby
xavier23 has quit [Quit: xavier23]
<havenwood>
DrIDK: What version of RubyGems?: gem -v
<DrIDK>
havenwood, no , every gem request
codecop has quit [Remote host closed the connection]
<DrIDK>
havenwood, 1.8.23
<slash_nick>
DrIDK: what is a gem request, I wonder
nanoxd has joined #ruby
<havenwood>
DrIDK: I'd suggest updating RubyGems and see if it is still a problem?: gem update --system
<DrIDK>
slash_nick, for exemple rails... let me do it now , i will tel you when it's done
<slash_nick>
DrIDK: do you mean "gem install rails" ?
xardas has quit [Ping timeout: 240 seconds]
<DrIDK>
slash_nick, yes
<slash_nick>
DrIDK: I'd do "gem install rails --no-ri --no-rdoc"
<havenwood>
that is a gem command
Astralum has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Remote host closed the connection]
<havenwood>
DrIDK: Sudo gem install yard && yard server --gems
<slash_nick>
havenwood: I very much like what they've done with their logo in the top left
<DrIDK>
ya!! It's cool to be here! I get nice stuff !
mansi has joined #ruby
* DrIDK
trying pry
greenr has quit [Quit: Konversation terminated!]
gchristensen has joined #ruby
<DrIDK>
is there a ruby gem for testing REST request ?
<DrIDK>
ohao !! pry is pretty!
<gchristensen>
Hi, I'm having an issue where simplecov works for some coworkers on a gem I'm authoring but not others, and not on TravisCI. https://github.com/zippykid/rack-content-hash/pull/1/files is my code adding simplecov integration, however it is returning 0%. I've tried shifting around the SimpleCov.start and such, but to no avail. Any suggestions on getting that set up properly?
m8 has quit [Quit: Sto andando via]
<havenwood>
DrIDK: For serving up HTTP, rack/test.
<DrIDK>
havenwood, I mean a tool like pry
rhys has quit [Quit: Leaving]
<DrIDK>
no matter
* DrIDK
trying yard
sqd_ has joined #ruby
reset has joined #ruby
asteve has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pkrnj has joined #ruby
bionoid has quit [Remote host closed the connection]
<havenwood>
DrIDK: If its not clear, just point your browser to http://localhost:8808 once you have the gem server running.
BSaboia has quit [Ping timeout: 268 seconds]
devinus has quit [Quit: devintorr.es]
superscott[8] has joined #ruby
<DrIDK>
havenwood, it works. But I have not all documentation... Only 5 from my gem installed
<DrIDK>
I didn't have ruby Core API
<havenwood>
yeah, that is gems only
ravster has left #ruby [#ruby]
realDAB has joined #ruby
gchristensen has left #ruby ["WeeChat 0.4.0"]
krainbol_ has joined #ruby
rsahae has quit [Quit: rsahae]
<havenwood>
From Pry you can get at all documentation and source code (may need to install pry-doc gem as well).
mansi has quit [Remote host closed the connection]
ukd1 has quit [Remote host closed the connection]
ukd1 has joined #ruby
mansi has joined #ruby
<havenwood>
I'd suggest reading up on Pry commands. (From inside pry just type `help`.)
krainboltgreene has quit [Ping timeout: 260 seconds]
<Mon_Ouie>
There's a gem you can install to get the yard documentation for ruby-core I believe
<havenwood>
DrIDK: If you get tired of typing `sudo` with Ruby, checkout ruby-install and chruby. Nice way to install and select the current Ruby.
<Mon_Ouie>
Or just configure it to install in your home directory
<DrIDK>
I like my sudo :D
<Mon_Ouie>
echo "gem: --user-install" > ~/.gemrc
<superscott[8]>
is there a way to say something like a, b, c = Hash.new like each of those variables are their own new hash?
devoldmx3 has quit [Read error: Connection reset by peer]
mansi has quit [Ping timeout: 240 seconds]
[E] has joined #ruby
<Mon_Ouie>
No, but {} is shorter than Hash.new
jerius has quit [Quit: jerius]
<superscott[8]>
yeah but i like Hash.new :D
zomgbie has quit [Ping timeout: 240 seconds]
<havenwood>
superscott[8]: a, b, c = Array.new(3) { Hash.new }
<havenwood>
>.>
<superscott[8]>
havenwood: O_o
<superscott[8]>
:D
[E] has left #ruby [#ruby]
wmoxam has quit [Ping timeout: 276 seconds]
vlad_starkov has joined #ruby
jaimef has quit [Excess Flood]
mantas322 has joined #ruby
<mantas322>
Hello
<mantas322>
I have an array
<mantas322>
to iterate through it I can do array.each
nathan28 has joined #ruby
<mantas322>
can I do array.eachbackwords?
<havenwood>
mantas322: reverse_each
<mantas322>
:D
<mantas322>
ty
MrPoT4tO has joined #ruby
mrpot4to_ has joined #ruby
rsahae has joined #ruby
<nathan28>
i am having an epically awful time with datamapper + sqlite trying to work on a padrino app, i've been having to reset the db and migrate up from zero for essentially every new migration
i8igmac has quit [Quit: Leaving]
<nathan28>
i've seen datamapper have issues before, but afaict this hasn't been a problem for a few months, am i just retarded
axeman- has quit [Remote host closed the connection]
ginsu has quit []
danbeck has quit [Quit: danbeck]
dv__ is now known as dv_
<havenwood>
nathan28: i've never used datamapper. was looking at rom (datamapper 2) and it looks neat: http://rom-rb.org
<havenwood>
uses ruby-install and chruby in its vagrant setup \o/
<havenwood>
nathan28: I've had good luck with Sequel. Have you tried the datamapper irc chan?
jaimef has joined #ruby
<nathan28>
havenwood: i really want to like datamapper, but it makes it hard to
swordsmanz is now known as swords
swords is now known as swordsmanz
swordsmanz is now known as swords
<nathan28>
havenwood: i'm looking into sequel right now actually, i'm just not as familiar w/ the DSL but the fact that it's SQL-user friendly is a plus
swords is now known as swordsmanz
tomzx_mac has joined #ruby
jaimef has quit [Excess Flood]
<havenwood>
nathan28: Really is nice. The one prob I ran into with Postgres the gem author figured out and gave me the answer on irc in like 5min.
saarinen has quit [Quit: saarinen]
jkline has joined #ruby
<havenwood>
mad props to Jeremy Evans!
<havenwood>
I saw what looked like major updates to the sequel gem recently, but I haven't investigated in detail yet.