<Bleachtree>
error is: undefined local variable or method `size' for #<#<Class:0x007fb9d2d4e6d8>:0x007fb9d2d568d8>
<Bleachtree>
any ideas?
livinded has joined #ruby-lang
<centrx>
Bleachtree, there's no "size" variable defined
<centrx>
Bleachtree, you would want options[:size]
<centrx>
Bleachtree, however, I don't think you can assign defaults to a hash like that in the method signature
<livinded>
What does inheriting from Thread provide to a class that would cause me to do that rather just just instantiating a new thread with Thread.new inside it?
<centrx>
Bleachtree, one standard way would be put at the top of method itself: size = options[:size] || 50
<frank_o>
Paperclip itself launches only one instance of ImageMagick at a time. This way it doesn't crash ones system if mass-uploading media via an API or whatever.
kohgpat has joined #ruby-lang
tris has quit [Quit: Leaving]
kohgpat has quit [Quit: leaving]
tris has joined #ruby-lang
haraoka has quit [Ping timeout: 265 seconds]
Newbie0086 has joined #ruby-lang
tris has quit [Ping timeout: 265 seconds]
Torrieri has quit [Quit: Be back later ...]
Torrieri has joined #ruby-lang
tris has joined #ruby-lang
Torrieri has quit [Ping timeout: 245 seconds]
dagda1 has quit [Read error: Connection reset by peer]
dagda1 has joined #ruby-lang
Newbie0086 has quit [Excess Flood]
Newbie0086 has joined #ruby-lang
ghostpl_ has joined #ruby-lang
tris has quit [Ping timeout: 265 seconds]
Voker57 has joined #ruby-lang
arBmind1 has joined #ruby-lang
tkuchiki has quit [Ping timeout: 252 seconds]
arBmind has quit [Ping timeout: 246 seconds]
tris has joined #ruby-lang
Voker57 has quit [Remote host closed the connection]
Voker57 has joined #ruby-lang
Voker57|2 has joined #ruby-lang
postmodern has quit [Quit: Leaving]
Voker57 has quit [Ping timeout: 264 seconds]
piotrj has quit [Read error: Connection reset by peer]
<yorickpeterse>
so I can do this: something.maybe[0]['some_key'].or(10)
<yorickpeterse>
I'll just call it strong-and-independent-maybe
tris has quit [Read error: No route to host]
tris has joined #ruby-lang
cb__ has quit [Ping timeout: 252 seconds]
<workmad3>
yorickpeterse: something like 'def [](*args); if brackets? value = @wrapped[*args]; else; value = nil; end; Maybe.new(value); end'?
<ljarvis>
maloik_: y u goin bristol m8
<ljarvis>
yorickpeterse: stahp
<yorickpeterse>
workmad3: hm yeah, that could work too
<yorickpeterse>
ljarvis: FEEL THE MONAD WITHIN YOU
<workmad3>
yorickpeterse: although I guess that it would be better if the monad raised a NoMethod error if value isn't nil and you try to access [] on it
<yorickpeterse>
No, the whole point is for it to not do that
<yorickpeterse>
otherwise it's of little value when, for example, accessing nested hashes
<workmad3>
yorickpeterse: hmm... I was meaning more that if you had, say {a: "foo"}.maybe[:a][:b]... so the key :a isn't nil, but it's also not a nested hash where you were expecting one
<yorickpeterse>
where some_array would be [{'foo' => {'count' => 20}}]
<workmad3>
(although that's a bad example, seeing as String responds to [] :) )
<yorickpeterse>
backstory, I'm dealing with some code here that does shit like this in a bunch of places:
<yorickpeterse>
last_period_result = result.maybe[0][category]['count'].or(0) (the to_i is useless since we can already guarantee "count" is always a fixnum)
<yorickpeterse>
^ and that without any NoMethodErrors
<workmad3>
yorickpeterse: next you'll create the convention with your maybe that [nil] should ignore the access
<yorickpeterse>
eh?
<ljarvis>
seems to me like you just need a proxy object
<ljarvis>
and some concerns
<ljarvis>
and some active methods
<yorickpeterse>
I was about to say "not sure if"
<workmad3>
yorickpeterse: so result[0][category]["count"] will do result[0]["count"] if category is nil
<yorickpeterse>
but that gave it away
<yorickpeterse>
workmad3: euh no, that's super confusing
<yorickpeterse>
The moment anything returns nil it currently becomes a noop
<workmad3>
yorickpeterse: yeah, that wasn't a serious suggestion :P
<yorickpeterse>
(more or less)
<yorickpeterse>
Ah
<yorickpeterse>
also yes I patch Object for this
<yorickpeterse>
come at me bruh
marr has quit [Ping timeout: 252 seconds]
<ljarvis>
marr has joined #ruby-lang
bb010g has quit [Quit: Connection closed for inactivity]
<yorickpeterse>
I only see a blank
tris has quit [Read error: No route to host]
tris has joined #ruby-lang
<ljarvis>
that's because you're not using a supermachine
<yorickpeterse>
prffft
<ljarvis>
zomg bath ruby tomorrow
<ljarvis>
bathing in ruby and shit
martinbmadsen has joined #ruby-lang
gwendall has joined #ruby-lang
pullphinger has quit []
tris has quit [Ping timeout: 265 seconds]
tris has joined #ruby-lang
martinbmadsen has quit [Ping timeout: 252 seconds]
tris has quit [Client Quit]
<TvL2386>
finally found out what's wrong with YAML::Store!!!!!!!!!!!! Issues when you feed YAML::Store.new a Pathname object, but no issues when you feed it a String. And only on ruby-1.9.3, not on ruby-2.1.0 (not tested any others)
<TvL2386>
kept me busy for hours!!!!!!!!!!!!!!!
elia has quit [Read error: No route to host]
Voker57 has joined #ruby-lang
_elia has joined #ruby-lang
Voker57|2 has quit [Ping timeout: 264 seconds]
Voker57|2 has joined #ruby-lang
Torrieri has joined #ruby-lang
Torrieri has joined #ruby-lang
Voker57 has quit [Ping timeout: 245 seconds]
Voker57 has joined #ruby-lang
bruno- has joined #ruby-lang
tris has joined #ruby-lang
Voker57|2 has quit [Ping timeout: 264 seconds]
<TvL2386>
In the code it uses pathname as an example, however it then checks to see if it's a String... If not, it fails to call initialization :D
Voker57 has quit [Remote host closed the connection]
joast has quit [Ping timeout: 246 seconds]
mikecmpbll has joined #ruby-lang
Asher1 has joined #ruby-lang
Asher has quit [Ping timeout: 256 seconds]
chills42 has joined #ruby-lang
hahuang61 has joined #ruby-lang
hahuang61 has quit [Ping timeout: 272 seconds]
<ljarvis>
Eising: why do you need rescue there?
<Eising>
ljarvis: form is a Sequel model, and backbone_template is a foreign key relation. If there's no foreign key relation (which there should never be, but happens anyway in rare cases), I get a no method error exception for #name
<ljarvis>
because backbone_template is nil?
<Eising>
yeah
<ljarvis>
so either use `form.backbone_template && form.backbone_template.name` or better yet, use that as a `template_name` method on your model
<Eising>
yeah, there are more elegant solutuins
<ljarvis>
yes, any solution
<ljarvis>
:D
AugustoCesar has quit [Remote host closed the connection]
<Eising>
hehe
<Eising>
I'm working on fixing the underlying issue instead
<yorickpeterse>
I was tempted to submit it to /r/mongodb
<yorickpeterse>
Ah, postgres weekly is from Peter Cooper's publishing empire
<yorickpeterse>
figures
<apeiros_>
that too?
<apeiros_>
I knew ruby & js weekly
momomomomo has quit [Ping timeout: 252 seconds]
<workmad3>
apeiros_: I'm subscribed to ruby, js, db, postgres and now webops weekly from PCs PE :)
<workmad3>
oh, and HTML5 weekly
<yorickpeterse>
webops?
<yorickpeterse>
is that a hybrid between a website and an ops?
<workmad3>
yorickpeterse: yeah, a new one he started... web operations weekly
<apeiros_>
yorickpeterse: webscale devops!
<yorickpeterse>
ha
Asher1 has quit [Quit: Leaving.]
Asher has joined #ruby-lang
<workmad3>
so far it's seemed to focus on infrastructure type stuff for running web sites... http 2 news, how to do performance tuning, some stuff on docker, etc.
<yorickpeterse>
$15 in total since the 8th, that's our entire CloudFront cost
<yorickpeterse>
so that's inc some assets for apps we have and some other stuff
momomomomo has joined #ruby-lang
iliketurtles has joined #ruby-lang
stamina has quit [Ping timeout: 264 seconds]
tommylommykins is now known as tommylommy12345
tommylommy12345 is now known as tommylommykins
fujimura has joined #ruby-lang
rbowlby has joined #ruby-lang
joaomdmoura has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
marr has joined #ruby-lang
fusillicode has quit [Ping timeout: 272 seconds]
chills42 has quit [Quit: Leaving...]
chills42 has joined #ruby-lang
cb__ has joined #ruby-lang
cb__ has joined #ruby-lang
Miphix has quit [Quit: Leaving]
strixd has quit [Quit: 500]
chills42 has quit [Quit: Leaving...]
iliketurtles has quit [Quit: zzzzz…..]
wallerdev has joined #ruby-lang
joaomdmoura has joined #ruby-lang
wallerdev has quit [Client Quit]
wallerdev has joined #ruby-lang
zucker has quit []
cb__ has quit [Remote host closed the connection]
cb__ has joined #ruby-lang
cb__ has quit [Changing host]
cb__ has joined #ruby-lang
Miphix has joined #ruby-lang
centrx has quit [Remote host closed the connection]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Torrieri has joined #ruby-lang
cb__ has quit [Ping timeout: 264 seconds]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Torrieri has quit [Ping timeout: 245 seconds]
tvon has quit [Quit: Lost terminal]
elia has quit [Quit: Computer has gone to sleep.]
the_real_intinig has joined #ruby-lang
sepp2k has joined #ruby-lang
sarkyniin has joined #ruby-lang
intinig has quit [Ping timeout: 256 seconds]
joaomdmoura has quit [Remote host closed the connection]
ozzloy has joined #ruby-lang
iliketurtles has joined #ruby-lang
piotrj has quit []
wallerdev has quit [Quit: wallerdev]
<Senjai>
yorickpeterse: You're pretty good at the writing of things
<Senjai>
you should do it more often
wallerdev has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 255 seconds]
fragamus has joined #ruby-lang
sk_0 has left #ruby-lang [#ruby-lang]
iliketurtles has quit [Remote host closed the connection]
ghostpl_ has quit [Remote host closed the connection]
mikecmpbll has quit [Ping timeout: 264 seconds]
taylorrf has joined #ruby-lang
fusillicode has joined #ruby-lang
iamninja has quit [Quit: WeeChat 1.1.1]
fujimura has quit [Remote host closed the connection]
taylorrf has quit [Remote host closed the connection]
taylorrf has joined #ruby-lang
cb_ has joined #ruby-lang
ta has joined #ruby-lang
lapide_viridi has joined #ruby-lang
stan has quit [Ping timeout: 265 seconds]
lytol has joined #ruby-lang
cornerma1 has joined #ruby-lang
ta has quit [Ping timeout: 256 seconds]
TvL2386 has joined #ruby-lang
cornerman has quit [Ping timeout: 256 seconds]
cornerma1 is now known as cornerman
jmrepetti has joined #ruby-lang
<TvL2386>
hi guys, read about volt gem on ruby weekly so I'm deciding to try it. `gem install volt -V` however keeps redirecting and it's not completing at all.....
GBrawl has joined #ruby-lang
gwendall has quit [Remote host closed the connection]
iamninja has joined #ruby-lang
<TvL2386>
finally installing and done
iliketurtles has joined #ruby-lang
<TvL2386>
wow.... 10 minutes or something
<jhass>
well, it'S a ton of stuff ;)
Torrieri has joined #ruby-lang
futilegames has joined #ruby-lang
waxjar has joined #ruby-lang
<TvL2386>
well, I've installed the rails gem on multiple occassions, but I've never been hanging long enough causing me to start gem install with verbose on to see if it's doing anything :)
Torrieri has quit [Ping timeout: 252 seconds]
<TvL2386>
my rubymine doesn't like this volt at all :)
gwendall has joined #ruby-lang
_djbkd has joined #ruby-lang
ItSANgo has quit [Quit: Leaving...]
deg_ has joined #ruby-lang
joaomdmoura has joined #ruby-lang
deg has quit [Ping timeout: 252 seconds]
workmad3 has quit [Ping timeout: 252 seconds]
dzejrou has quit [Ping timeout: 256 seconds]
_djbkd has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
_djbkd has joined #ruby-lang
deg_ has quit [Ping timeout: 272 seconds]
momomomomo has joined #ruby-lang
ta has joined #ruby-lang
deg has joined #ruby-lang
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
momomomomo_ has joined #ruby-lang
chouhoulis has joined #ruby-lang
joaomdmoura has quit [Remote host closed the connection]
momomomomo has quit [Ping timeout: 252 seconds]
<tubbo>
volt: A Ruby web framework where your Ruby runs on both server and extremely slowly in the browser #ftfy
momomomomo_ is now known as momomomomo
joaomdmoura has joined #ruby-lang
iliketurtles has quit [Quit: zzzzz…..]
chouhoul_ has quit [Ping timeout: 250 seconds]
tvon has joined #ruby-lang
Miphix has quit [Quit: Leaving]
gwendall has quit [Remote host closed the connection]
joaomdmoura has quit [Ping timeout: 256 seconds]
iliketurtles has joined #ruby-lang
mikecmpbll has joined #ruby-lang
martinbmadsen has joined #ruby-lang
joaomdmoura has joined #ruby-lang
thebastl has quit [Ping timeout: 244 seconds]
chinmay_dd has quit [Ping timeout: 244 seconds]
thebastl has joined #ruby-lang
arooni-mobile has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
chouhoulis has quit [Remote host closed the connection]
ghostpl_ has joined #ruby-lang
iliketurtles has quit [Quit: zzzzz…..]
chouhoulis has joined #ruby-lang
cb_ has quit [Ping timeout: 252 seconds]
havenwood has joined #ruby-lang
momomomomo_ has joined #ruby-lang
banister has joined #ruby-lang
momomomomo has quit [Ping timeout: 246 seconds]
momomomomo_ is now known as momomomomo
klmlfl has joined #ruby-lang
cb__ has joined #ruby-lang
cb__ has joined #ruby-lang
sankaber has joined #ruby-lang
momomomomo has quit [Client Quit]
hahuang61 has joined #ruby-lang
postmodern has joined #ruby-lang
arooni-mobile has quit [Remote host closed the connection]
gwendall has joined #ruby-lang
Torrieri has joined #ruby-lang
Torrieri has joined #ruby-lang
hahuang61 has quit [Ping timeout: 272 seconds]
wallerdev has quit [Quit: wallerdev]
chinmay_dd has joined #ruby-lang
Torrieri has quit [Ping timeout: 246 seconds]
arooni-mobile has joined #ruby-lang
chinmay_dd has quit [Ping timeout: 246 seconds]
arooni-mobile has quit [Remote host closed the connection]
kramsee has joined #ruby-lang
b_hoffman has quit [Quit: b_hoffman]
gix has quit [Ping timeout: 246 seconds]
b_hoffman has joined #ruby-lang
enebo has quit [Quit: enebo]
relix_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
amishPa has joined #ruby-lang
momomomomo has joined #ruby-lang
gix has joined #ruby-lang
martinbmadsen has quit [Ping timeout: 244 seconds]
cb__ has quit [Remote host closed the connection]
amishPa has left #ruby-lang [#ruby-lang]
TvL2386 has quit [Remote host closed the connection]
klmlfl has quit [Remote host closed the connection]
klmlfl has joined #ruby-lang
nertzy2 has quit [Quit: Leaving]
ammar_ has quit [Quit: leaving]
nertzy has joined #ruby-lang
b_hoffman has quit [Quit: b_hoffman]
lapide_viridi has quit [Quit: Leaving]
skade has joined #ruby-lang
relix has joined #ruby-lang
lele has quit [Quit: Coyote finally caught me]
Iskarlar has joined #ruby-lang
lele has joined #ruby-lang
GBrawl has quit [Read error: Connection reset by peer]
joaomdmoura has quit [Remote host closed the connection]
klmlfl has quit [Remote host closed the connection]
kadoppe has quit [Ping timeout: 246 seconds]
kadoppe has joined #ruby-lang
enebo has joined #ruby-lang
GBrawl has joined #ruby-lang
thebastl has quit [Quit: Leaving...]
wallerdev has joined #ruby-lang
momomomomo has quit [Ping timeout: 264 seconds]
iliketurtles has joined #ruby-lang
bb010g has joined #ruby-lang
momomomomo has joined #ruby-lang
Iskarlar has quit [Ping timeout: 264 seconds]
joaomdmoura has joined #ruby-lang
cb__ has joined #ruby-lang
b_hoffman has joined #ruby-lang
Iskarlar has joined #ruby-lang
fragamus has quit [Quit: Computer has gone to sleep.]
Torrieri has joined #ruby-lang
chibis has joined #ruby-lang
klmlfl has joined #ruby-lang
chibis has quit [Client Quit]
momomomomo has quit [Quit: momomomomo]
Torrieri has quit [Ping timeout: 252 seconds]
Iskarlar_ has joined #ruby-lang
solars has quit [Ping timeout: 272 seconds]
Iskarlar has quit [Ping timeout: 256 seconds]
jmrepetti has quit []
ItSANgo has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
GBrawl has quit [Ping timeout: 252 seconds]
klmlfl has quit [Remote host closed the connection]
ozzloy has quit [Ping timeout: 252 seconds]
GBrawl has joined #ruby-lang
joaomdmoura has quit [Remote host closed the connection]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<klmlfl>
xpost: can someone explained Ruby's 'defined?" method to a newbie (eli5)
GBrawl has quit [Quit: (null)]
<apeiros_>
klmlfl: please don't cross post. and if you do, tell in all channels where you ask, that you're cross posting.
Torrieri has joined #ruby-lang
Torrieri has quit [Changing host]
Torrieri has joined #ruby-lang
<klmlfl>
Please read that I DID do that!
iliketurtles has joined #ruby-lang
bb010g has joined #ruby-lang
Torrieri has quit [Ping timeout: 246 seconds]
dzejrou has quit [Ping timeout: 252 seconds]
<klmlfl>
apeiros, you shouldn't abuse your priveleges and kick people out for doing something like what I did (Cross posting...but mentioning it only the in the sub-sequent channels that it was a cross post)
<klmlfl>
Logically, one conclusion even you can come to is that I didn't INITIALLY intend for it to be a cross-post
<apeiros_>
klmlfl: of course the kicked person immediately accuses the kicker of abuse.
<apeiros_>
klmlfl: but hey, whatever man.
<klmlfl>
And for you take away a learning resource from me even though I just explained myself in a PM is over the top.
<jhass>
klmlfl: you seem to mistake a kick for a ban
<apeiros_>
if you explained to "apeiros", then I didn't get it. see the tail.
<klmlfl>
What you did is mistake a cross post for spam.
<klmlfl>
Ok, understood.
<jhass>
apeiros_: you really need a bouncer now though :P
<apeiros_>
no. you cross posted without telling. and you considered it wise to be snotty about it.
<jhass>
want an account on mine?
<klmlfl>
Anyways, I'm not some intentional spammer here. I wrote the message in one channel then though..hmm, let me ask these other channels and pre-pended my message with X-post.
<klmlfl>
All I said "whatever, man" meaning "I'm not going to spam this active channel where people are chatting to explain why I did something"
<jhass>
klmlfl: after not even waiting a minute
Almotasim has quit [Remote host closed the connection]
<klmlfl>
yes.
<jhass>
that's not even enough time to write up a proper answer right away
<apeiros_>
I see, you prefer to spam this channel with your personal problems.
hahuang61 has quit [Ping timeout: 252 seconds]
<jhass>
then you didn't inform other channels about a provided answer
<klmlfl>
Now that you decided to be a bully, yea.
<jhass>
wasting for example Radars time
<klmlfl>
I didn't waste his time at all. I got his message, thanked him, and would give him karma for his answer too if I could
klmlfl was kicked from #ruby-lang by apeiros_ [good bye]