apeiros changed the topic of #ruby to: Ruby 2.0.0-p247: http://ruby-lang.org (Ruby 1.9.3-p448) || Paste >3 lines of text on http://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
ngoldman has quit [Ping timeout: 265 seconds]
nisstyre has joined #ruby
<PPH> Is there a fancy way to write this? variable === true
johnnyfuchs has joined #ruby
yfeldblu_ has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
Guest84325 has quit [Remote host closed the connection]
funburn has joined #ruby
ewnd9 has joined #ruby
fgo has joined #ruby
kevinykchan has quit [Quit: Computer has gone to sleep.]
johnnyfuchs has quit [Client Quit]
dangerousdave has quit [Ping timeout: 244 seconds]
jamblack has quit [Quit: jamblack]
lukec has quit [Ping timeout: 244 seconds]
mojjojo has quit [Quit: mojjojo]
kevinykchan has joined #ruby
<heftig> PPH: just variable
mojjojo has joined #ruby
lupine has joined #ruby
<PPH> heftig: k
<heftig> "if foo" is true when foo is not false or nil
joshwines has joined #ruby
<PPH> heftig: do you know if there is a fancier way to write if defined? var and var?
Soda has quit [Read error: Connection reset by peer]
<heftig> just "if var"
<PPH> heftig: I got undefined variable error
<volty> not exactly
polaco is now known as polaco_zZz
nobitanobi has quit [Ping timeout: 246 seconds]
agorman has left #ruby ["Leaving"]
<heftig> well, right
awhiuahwiuah has joined #ruby
nobitanobi has joined #ruby
<heftig> PPH: what are you doing, by the way? "defined?" smells
<PPH> i don't like this if defined? display_cpanel_column and display_cpanel_column
awhiuahwiuah has quit [Client Quit]
reset has quit [Quit: Leaving...]
pushpak has quit [Quit: Linkinus - http://linkinus.com]
capicue has quit [Read error: Connection reset by peer]
capicue_ has joined #ruby
nanothief has joined #ruby
greenrose has quit [Read error: Connection reset by peer]
larissa has quit [Ping timeout: 246 seconds]
Kamuela has joined #ruby
<PPH> trying to pass a variable to a partial to say if a column should be display or not... but I don't want other partials to have to set this variable to false they should just not pass the variable at all
<PPH> other callers of the partial*
<bricker> PPH: it's bad design if you have to check if it's defined
mikepack has joined #ruby
<bricker> "I don't want other partials to have to"... well you can't have it both ways.
Banistergalaxy has quit [Ping timeout: 272 seconds]
lukec has joined #ruby
motto has quit [Quit: Sto andando via]
<bricker> PPH: if your partial needs a variable defined in order to load properly, then you better pass it in.
rickmasta has quit [Quit: Leaving...]
<PPH> bricker: ok
<shevy> PPH what I tend to do is, I initialize all instance variables in a method call reset. if I dont need the @ivar to have a specific value, I initialize it to nil. then, if I want to check if it was modified, I just do: if @foo
Kamuela has quit [Remote host closed the connection]
tharindu has joined #ruby
rickmasta has joined #ruby
lupine has quit [Quit: ZNC - http://znc.in]
<volty> what is defined? for then?
<shevy> Hanmac1 are you awake?
<shevy> volty dunno... for constants perhaps? hmm
<shevy> but you can check if a method is defined too, I think
timonv has quit [Remote host closed the connection]
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
<PPH> shevy: does it apply to rails partials?
<shevy> I dont know what is a rails partials. if it uses ruby code, it surely apples to ruby code
timonv has joined #ruby
<shevy> volty, look what I get: defined? x # => "method"; defined? xy # => nil; defined? $array # => "global-variable"
<shevy> I seem to either get nil, or a string back, through defined?
srji has joined #ruby
<volty> i don't know about the right way to handle with partials
Kamuela has joined #ruby
<PPH> well I'll ask my question into the rubyonrails channel thanks for the help :)
<Kamuela> ok
greenrose has joined #ruby
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<PPH> This question was ruby oriented then it moved slowly to rails... lol
kaspergrubbe has quit [Remote host closed the connection]
<volty> i just know that if tomorrow I find a case where i call methods if present (instead of checking for 'type' of what is passed) I will do it with defined?
kevinykchan has quit [Quit: Computer has gone to sleep.]
<volty> (or respond_to?, or whatever appropriate)
JonahR has joined #ruby
<shevy> respond_to? seems better
<shevy> it basically is a "does this object have this method xyz?"
<volty> yes but that is for methods
<shevy> yeah
kevinykchan has joined #ruby
tharindu has quit [Ping timeout: 252 seconds]
<shevy> for @ivars you could use .instance_variable_defined?
hiroyuki has quit [Read error: Connection reset by peer]
<shevy> and if you use global variables then you should use php
<shevy> :D
<volty> :)
timonv has quit [Ping timeout: 244 seconds]
lupine has joined #ruby
threesome has joined #ruby
mikepack has quit [Remote host closed the connection]
i8igmac has joined #ruby
havenwood has joined #ruby
srji has quit [Quit: leaving]
Apane has quit [Ping timeout: 246 seconds]
larissa has joined #ruby
kevinykchan has quit [Ping timeout: 272 seconds]
ewnd9 has quit [Ping timeout: 260 seconds]
ckinni has joined #ruby
predator217 has joined #ruby
myappleguy has joined #ruby
vlad_starkov has joined #ruby
<PPH> just FYI, the answer to my problem was: variable ||= nil :)
CreativeEmbassy has joined #ruby
crazymykl has quit [Read error: Operation timed out]
reset has joined #ruby
nobitanobi has quit [Ping timeout: 246 seconds]
tsykoduk is now known as zz_tsykoduk
carlyle has joined #ruby
nwertman has quit [Ping timeout: 240 seconds]
predator117 has quit [Ping timeout: 272 seconds]
<volty> ah, an asking expert! :)
Astralum has quit [Ping timeout: 272 seconds]
<shevy> :P
<shevy> he hates @ivars!
nwertman has joined #ruby
<volty> naa, he likes testing ppl
pel_daniel has left #ruby [#ruby]
Hanmac has joined #ruby
hogeo has joined #ruby
Hanmac1 has quit [Ping timeout: 268 seconds]
<volty> he has a secret register in which he's filling votes :)
felixjet has joined #ruby
<Kamuela> reinstalling mah rubies
<shevy> Kamuela oh noes
<Kamuela> haha, had to. xubuntu reinstall
<Kamuela> but at least now i has a fat portion of disk space given to lunix :)
mklappstuhl has quit [Remote host closed the connection]
Mars has joined #ruby
chomskiii has quit [Read error: Connection reset by peer]
<Kamuela> ls
<Kamuela> wewps
ValicekB has quit [Ping timeout: 246 seconds]
Mars is now known as Guest38382
chomskiii has joined #ruby
volty has quit [Quit: have to concentrate]
jrhe has quit [Quit: jrhe]
maletor has joined #ruby
hogeo has quit [Ping timeout: 246 seconds]
<shevy> wewps?
bootcoder has quit [Quit: Konversation terminated!]
sn0wb1rd has quit [Quit: See ya]
yfeldblum has quit [Remote host closed the connection]
bootcoder has joined #ruby
ngoldman has joined #ruby
yfeldblum has joined #ruby
vlad_starkov has quit [Ping timeout: 260 seconds]
ngoldman has quit [Client Quit]
<withnale_> is it possible to do a require_relative on a file without a .rb extension?
baroquebobcat has quit [Quit: baroquebobcat]
<heftig> withnale_: can't you give it an extension?
<withnale_> Ideally no
<withnale_> I'm writing a DSL
mrsolo has quit [Quit: This computer has gone to sleep]
jamblack has joined #ruby
drumsrgr_ has joined #ruby
sergicles has joined #ruby
kreisys has joined #ruby
Cork has quit [Ping timeout: 260 seconds]
jamblack has quit [Client Quit]
hogeo has joined #ruby
drumusician has quit [Ping timeout: 260 seconds]
<emocakes> i have adsl withnale_
<shevy> emocakes!!!
<emocakes> shevy !!
<shevy> withnale_ if it is not possible you could always try to file an issue at the ruby bugtracker/issuetracker
<heftig> withnale_: or implement your own loader using File.read and eval
zz_karupanerura is now known as karupanerura
<shevy> emocakes pfft those girls weigh nothing, they should try that with me
drumsrgr_ has quit [Ping timeout: 272 seconds]
<emocakes> still
<emocakes> i couldnt do that with a pillow
<emocakes> :p
<shevy> depends on the training!
epichero has joined #ruby
<shevy> I am more impressed about the handstand
ValicekB has joined #ruby
Cork has joined #ruby
sn0wb1rd has joined #ruby
<withnale_> heftig: found out I can just use 'load'
jibi_ has quit [Ping timeout: 260 seconds]
<withnale_> DSL = domain specific language
lmadrigal has joined #ruby
wildroman2 has quit [Remote host closed the connection]
kevinykchan has joined #ruby
lupine has quit [Quit: ZNC - http://znc.in]
lupine has joined #ruby
DanKnox is now known as DanKnox_away
PragCypher has joined #ruby
PragCypher has quit [Read error: Connection reset by peer]
ddpunk has joined #ruby
Monie has joined #ruby
kevinykchan has quit [Client Quit]
carlyle has quit [Ping timeout: 245 seconds]
dubsteph has quit [Read error: Connection reset by peer]
myappleguy has quit [Ping timeout: 246 seconds]
<shevy> load and require are nice
<shevy> require_relative must die in a fire
mikepack has joined #ruby
michael_mbp is now known as zz_michael_mbp
lnormous has quit [Ping timeout: 246 seconds]
dubsteph has joined #ruby
wildroman2 has joined #ruby
rjhunter has joined #ruby
lnormous has joined #ruby
MrZYX is now known as MrZYX|off
epichero has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
mixel has joined #ruby
robustus has quit [Ping timeout: 245 seconds]
rickmasta has quit [Quit: Be back later]
sevenseacat has joined #ruby
rickmasta has joined #ruby
<dorei> i feel so lazy :)
mikepack has quit [Ping timeout: 272 seconds]
myappleguy has joined #ruby
superscott[8] has joined #ruby
<shevy> dorei work on very small projects
robustus has joined #ruby
<dorei> one-liners xD
<shevy> ok
<shevy> you are really lazy
* xybre require's shevy's relatives
* shevy relates to xybre's requires
nanoyak has joined #ruby
marr has quit [Ping timeout: 244 seconds]
zeade has quit [Quit: Leaving.]
lethjakm1 has joined #ruby
tkuchiki has joined #ruby
mrsolo has joined #ruby
jlast has quit [Remote host closed the connection]
nfk has quit [Quit: yawn]
Ox6abe has quit [Remote host closed the connection]
revans has quit [Quit: Linkinus - http://linkinus.com]
lnormous has quit [Ping timeout: 272 seconds]
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lethjakman has quit [Ping timeout: 265 seconds]
wildroman2 has quit [Remote host closed the connection]
<xybre> D:
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sn0wb1rd has quit [Quit: See ya]
sn0wb1rd has joined #ruby
h0rrorvacui has joined #ruby
kitak has quit [Read error: Connection reset by peer]
Kneferilis has quit [Read error: Connection reset by peer]
Banistergalaxy has joined #ruby
kitak has joined #ruby
dweeb_ has quit [Quit: Computer has gone to sleep.]
jamblack has joined #ruby
Jetchisel has joined #ruby
stkowski has quit [Quit: stkowski]
DrShoggoth has quit [Quit: Leaving]
timonv has joined #ruby
JimmyAtCMU has joined #ruby
phinfonet has quit [Quit: exitiing]
jamblack has quit [Client Quit]
manonthemat has joined #ruby
i8igmac has quit [Quit: Leaving]
yfeldblu_ has joined #ruby
falood has joined #ruby
tharindu has joined #ruby
timonv has quit [Ping timeout: 260 seconds]
Guest38382 has quit [Remote host closed the connection]
dubsteph has quit [Ping timeout: 268 seconds]
funburn has quit [Ping timeout: 265 seconds]
yfeldblum has quit [Read error: Operation timed out]
carlyle has joined #ruby
benlieb has joined #ruby
kaspergrubbe has joined #ruby
musty has quit [Quit: Lost terminal]
yfeldblu_ has quit [Ping timeout: 240 seconds]
zeropx has quit [Quit: has left the room … Or did he?]
tharindu has quit [Ping timeout: 265 seconds]
JimmyAtCMU has quit [Remote host closed the connection]
JimmyAtCMU has joined #ruby
carlyle has quit [Ping timeout: 245 seconds]
jb41 has quit [Ping timeout: 260 seconds]
jamblack has joined #ruby
funburn has joined #ruby
agent_white has quit [Ping timeout: 260 seconds]
jamesaanderson has joined #ruby
vlad_starkov has joined #ruby
kaspergrubbe has quit [Ping timeout: 268 seconds]
ravster has quit [Quit: Leaving.]
jamblack has quit [Client Quit]
tvw has quit []
kevind_ has joined #ruby
kevind_ has quit [Client Quit]
mneorr has joined #ruby
blarghmatey_ has joined #ruby
scarolan has joined #ruby
manonthemat has left #ruby [#ruby]
Mon_Ouie has quit [Read error: Operation timed out]
surrealanalysis has quit [Quit: surrealanalysis]
amacgregor has joined #ruby
<mneorr> how to get the full error output when a Rake 'sh some-command' fails?
benwoody has quit [Quit: benwoody]
Mon_Ouie has joined #ruby
Randomage has joined #ruby
rezzack has quit [Quit: Leaving.]
allanmacgregor has quit [Ping timeout: 246 seconds]
Randomage has left #ruby [#ruby]
funburn has quit [Quit: funburn]
dorei_ has joined #ruby
dorei_ has quit [Client Quit]
Mars has joined #ruby
jamblack has joined #ruby
Mars is now known as Guest14991
JimmyAtCMU has quit [Read error: Connection reset by peer]
nobitanobi has joined #ruby
<nobitanobi> hihi
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dorei has quit [Ping timeout: 272 seconds]
daxroc has quit [Quit: Leaving.]
iliketurtles has quit [Quit: zzzzz…..]
lukec has quit [Quit: lukec]
gstamp has quit [Ping timeout: 256 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
RichardBaker has quit [Quit: RichardBaker]
hamakn has joined #ruby
gstamp has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
<nobitanobi> when do we use %{ text } ?
moneydouble has left #ruby [#ruby]
<nobitanobi> how is this called %{ ... } ?
hamakn_ has joined #ruby
hamakn has quit [Read error: Connection reset by peer]
gstamp_ has joined #ruby
<gr33n7007h> >> %{}.class
<eval-in> gr33n7007h => String (https://eval.in/68382)
hogeo has quit [Remote host closed the connection]
hogeo has joined #ruby
gstamp has quit [Ping timeout: 256 seconds]
gstamp_ is now known as gstamp
<nobitanobi> it's just a String constructor?
<shevy> apparently
<nobitanobi> hum
<shevy> >> x = %{ text }; p x
<eval-in> shevy => " text " ... (https://eval.in/68383)
<shevy> even honours ' '
Guest14991 has quit [Remote host closed the connection]
nanoyak has quit [Quit: Computer has gone to sleep.]
Bish_ is now known as Bish
hogeo has quit [Ping timeout: 246 seconds]
kobain has quit [Remote host closed the connection]
kobain has joined #ruby
Hanmac1 has joined #ruby
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jamblack has quit [Quit: jamblack]
hogeo has joined #ruby
Hanmac has quit [Ping timeout: 244 seconds]
<rjhunter> nobitanobi: it's just one of the many literal quoting styles -- ruby inherited many from perl. %{} is useful for when your text contains " or ' characters
<nobitanobi> rjhunter, cool :) thanks
<rjhunter> >> %{that's a "quote" mark back there}
<eval-in> rjhunter => "that's a \"quote\" mark back there" (https://eval.in/68386)
jamesaanderson has joined #ruby
rrichardsr3 has joined #ruby
<nobitanobi> oh nice
<nobitanobi> you can do %() too
<nobitanobi> ha
rrichardsr3 has quit [Max SendQ exceeded]
mikepack has joined #ruby
<rjhunter> >> %[or square brackets]
<eval-in> rjhunter => "or square brackets" (https://eval.in/68387)
<rjhunter> >> %Xor even a letter likeX
<eval-in> rjhunter => /tmp/execpad-c52bb8132456/source-c52bb8132456:2: unknown type of %string ... (https://eval.in/68388)
<rjhunter> oh
<rjhunter> not quite
<rjhunter> %_but underscores should work_
<rjhunter> >> %_but underscores should work_
<eval-in> rjhunter => "but underscores should work" (https://eval.in/68389)
vy0b0x has joined #ruby
lukec has joined #ruby
vy0b0x has quit [Client Quit]
EvanR_ has joined #ruby
<nobitanobi> :)
<nobitanobi> rjhunter, nice
<shevy> nobitanobi there, you learn something new in ruby every day
mojjojo has quit [Quit: mojjojo]
<nobitanobi> that's right. You know I've been doing rails for almost a year now....but I want to learn Ruby
<nobitanobi> *good Ruby per say
sambao21 has joined #ruby
<rjhunter> %{} is by far the most common, usually with the w modifier to make an array
dorei has joined #ruby
reset has quit [Ping timeout: 272 seconds]
pragmatism has quit [Quit: Leaving...]
Davey has joined #ruby
kaspergrubbe has joined #ruby
Davey has quit [Client Quit]
taternuts has joined #ruby
mikepack has quit [Ping timeout: 272 seconds]
<shevy> >> %w( rjhunter likes eggs and bacon )
<eval-in> shevy => ["rjhunter", "likes", "eggs", "and", "bacon"] (https://eval.in/68390)
xm has joined #ruby
cgore has quit [Remote host closed the connection]
kreisys has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Ping timeout: 272 seconds]
cgore has joined #ruby
<rjhunter> which reminds me, it's past eating time
<nobitanobi> shevy, you are in Austria you said nah?
<nobitanobi> when the heck do you sleep?
<shevy> nobitanobi I slept from 17.00 to 21:30
<nobitanobi> oh, naps naps
<nobitanobi> how good are they
yanglvxiong has joined #ruby
sepp2k has quit [Quit: Leaving.]
<yanglvxiong> “ruby_sysinit”: 找不到标识符
<yanglvxiong> 该怎么办???
Shellcat has quit [Remote host closed the connection]
superscott[8] has quit [Quit: superscott[8]]
<nobitanobi> ?
<yanglvxiong> int _tmain(int argc, _TCHAR* argv[])
Davey has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
shterrett has joined #ruby
<yanglvxiong> ruby_sysinit(&argc, &argv);
<yanglvxiong> “ruby_sysinit”: 找不到标识符
<yanglvxiong> error C3861: “ruby_sysinit”: 找不到标识符
blarghmatey_ has quit [Ping timeout: 246 seconds]
<yanglvxiong> 是不是要包含什么头啊?
<yanglvxiong> 在mian函数里面
<sevenseacat> good luck with that
<sevenseacat> prolly not many chinese speakers here
<yanglvxiong> 我现在要用c调用ruby
zhuxh has joined #ruby
<rjhunter> yanglvxiong: #rails-cn
xorgnak has joined #ruby
<sam113101> I wish I knew Chinese
brianb_ has joined #ruby
Voodoofish4301 has quit [Quit: Leaving.]
yanglvxiong has left #ruby [#ruby]
dhruvasagar has joined #ruby
yanglvxiong has joined #ruby
DanKnox_away is now known as DanKnox
<brianb_> I'd like to have a public attr_reader and a private attr_writter, but can't seem to. Can someone take a look? https://gist.github.com/bbuchalter/7477992
somasonic has left #ruby ["fin."]
<yanglvxiong> error C3861: “ruby_sysinit”: 找不到标识符
<yanglvxiong> how can ido
pragmatism has joined #ruby
<yanglvxiong> how can i do for error C3861: “ruby_sysinit”
<yanglvxiong> undefine
<sam113101> >> def 找不到标识符; puts 'test'; end; 找不到标识符
<eval-in> sam113101 => test ... (https://eval.in/68391)
benwoody has joined #ruby
<sam113101> amazing unicode support
<sam113101> thank you ruby
<h0rrorvacui> its about an error he is getting
<h0rrorvacui> he says something about a function in main
zhuxh_ has joined #ruby
<nobitanobi> brianb_, you could write your own setter under 'private' def size=(size) @size = size end;
<xorgnak> brianb_: is there any reason why you need to have the private method?
amacgregor_ has joined #ruby
<h0rrorvacui> 找不到标识符 = identifier not found
<sam113101> why are there C bits? is he writing a C module or trying to compile ruby?
<rjhunter> i think yanglvxiong is trying to compile Ruby itself
aspires has quit [Quit: sudo making a sandwich]
<h0rrorvacui> yeah..
wildroman2 has joined #ruby
amacgregor__ has joined #ruby
zhuxh has left #ruby [#ruby]
<rjhunter> ruby_sysinit is defined in `ruby.c` and called from main()
closures999 has joined #ruby
capicue_ has quit [Quit: Leaving...]
<brianb_> xorgnak: it's private because it's not needed publicly. =)
dhruvasagar has quit [Ping timeout: 246 seconds]
tharindu has joined #ruby
<brianb_> nobitanobi: I don't believe that's the issue.
<brianb_> But I will try.
amacgregor has quit [Ping timeout: 246 seconds]
<brianb_> nobitanobi: No change in behavior.
<yanglvxiong> what????
jonathanwallace has quit [Quit: WeeChat 0.4.1]
<sam113101> yanglvxiong: why are you compiling ruby?
iliketurtles has joined #ruby
<yanglvxiong> how can i do for error C3861: “ruby_sysinit” identifier not found
<nobitanobi> brianb_, what error are you getting?
nisstyre has quit [Quit: Leaving]
<h0rrorvacui> 我现在要用c调用ruby = I now call ruby with c
<nobitanobi> and what are you trying?
bronson has quit [Quit: bronson]
<brianb_> nobitanobi: please see the comment in https://gist.github.com/bbuchalter/7477992 for the error and implementation
<h0rrorvacui> so he is embedding ruby?
<yanglvxiong> error C3861: “ruby_sysinit” identifier not found
<yanglvxiong> I now call ruby with c
CreativeEmbassy has quit [Quit: Computer has gone to sleep.]
<nobitanobi> brianb_, private methods can't have an object before. You can't write object.private_method (in your case you are doing self.size)
<sam113101> yanglvxiong: looks like the identifier is not found
<rjhunter> yanglvxiong: #include <ruby.h>
<nobitanobi> the methods are send to 'self' by default. That's why they are private
amacgregor_ has quit [Ping timeout: 246 seconds]
kevinykchan has joined #ruby
<yanglvxiong> yes i have
<brianb_> nobitanobi: that makes sense. But when I remove the self, I get another error, I'll add it as another comment.
<yanglvxiong> in my header
<nobitanobi> ok
<yanglvxiong> #include <ruby.h>
Hanmac1 has quit [Ping timeout: 272 seconds]
<h0rrorvacui> 我们的源代码
<h0rrorvacui> google translation of "show us the source code"
<h0rrorvacui> :P
CreativeEmbassy has joined #ruby
<brianb_> nobitanobi: updated now, https://gist.github.com/bbuchalter/7477992
wildroman2 has quit [Ping timeout: 272 seconds]
nwertman has quit [Ping timeout: 268 seconds]
<yanglvxiong> int _tmain(int argc, _TCHAR* argv[])
Hanmac has joined #ruby
tharindu has quit [Ping timeout: 246 seconds]
<brianb_> nobitanobi: I'm surprised size is returning nil. I thought the attr_reader above would define def size; @size; end
<yanglvxiong> ruby_sysinit(&argc, &argv); ruby_init(); ruby_init_loadpath();
kitak_ has joined #ruby
<sam113101> breaking news: I think there is a language barrier
<nobitanobi> brianb_, let me see
<brianb_> nobitanobi: thank you
<Kamuela> Doing the koans
kevinykchan has quit [Ping timeout: 252 seconds]
<yanglvxiong> who can help me
<rjhunter> yanglvxiong: try the channel #rails-cn
kitak has quit [Ping timeout: 246 seconds]
<sam113101> there's no one there
<sam113101> lel
<nobitanobi> brianb_, actually... check this out
<rjhunter> :-(
<sam113101> might as well tell him to join #/dev/null
<sam113101> Null Development — Develop your null!
<nobitanobi> brianb_, yeah, I dunno. I actually got confused by this now: https://gist.github.com/novito/7478128
vlad_starkov has joined #ruby
dorei has quit []
rezzack has joined #ruby
<nobitanobi> brianb_, this code I just sent works. Dunnno why is letting me place 'self' in front of the private method.
<brianb_> what version of ruby?
<nobitanobi> 2.0
ehc has quit [Quit: ehc]
<rjhunter> yanglvxiong: we might help, but we will be very slow.
<brianb_> nobitanobi: same here, p247
<nobitanobi> confused.
<rjhunter> is there something like StackOverflow.com for Chinese speakers?
<brianb_> nobitanobi: the only difference I see is mine is wrapped in a module...not that it should matter
yanglvxiong has quit [Ping timeout: 250 seconds]
CaptainJet has quit []
xm has quit [Quit: Page closed]
<sam113101> charsetoverflow.com
ddpunk has quit []
earthquake has joined #ruby
marcgg_ has joined #ruby
<nobitanobi> ooook brianb_
marcgg has quit [Ping timeout: 252 seconds]
whunt has quit [Quit: Computer has gone to sleep.]
sailias has joined #ruby
<brianb_> nobitanobi: whatdya figure out?
<nobitanobi> actually, setter methods "method=" can be called with an explicit receiver
<nobitanobi> :P
<nobitanobi> private setter methods I mean
<brianb_> ok, so my first implementation was acceptable, but still doesn't explain the error, right?
<nobitanobi> let me paste your code
<nobitanobi> and see if I can figure it out
scarolan has quit [Ping timeout: 272 seconds]
<nobitanobi> brianb_, is not a setter
<nobitanobi> you are doing +=
<brianb_> hmmmm
<brianb_> interesting
<brianb_> I just assumed that += would call the setter after doing the addition.
<brianb_> Bad assumption!
<nobitanobi> just pass size=(@size + 1)
<nobitanobi> yeah hehe
<brianb_> nobitanobi: thank you sir.
benwoody has quit [Quit: benwoody]
<nobitanobi> sure man! I learned something new too
<nobitanobi> :)
<brianb_> now, I've always known that self was the implicit sender in a class, but it seems it's not in this case
capicue has joined #ruby
benwoody has joined #ruby
tyfighter has joined #ruby
benlieb has quit [Quit: benlieb]
gr33n7007h has quit [Quit: Where's John Conner]
kemist has joined #ruby
saarinen has quit [Quit: saarinen]
<brianb_> newest comment
<brianb_> I'm baffled why that accessor isn't available without including self?!
<brianb_> it's seeing size as a local var instead of a method call
<shevy> brianb_ I guess local vars have precedence in methods
<brianb_> but only if a local is defined
<brianb_> i guess I am calling size =
<brianb_> interesting!
<brianb_> yes, that's it
<shevy> yeah, the ruby parser probably thinks this can only be a local var
<brianb_> when I use self.size =, then I don't need self.size in the reader
<brianb_> jeeez, what a pain
<Kamuela> I confess... I went looking at Django again today
<shevy> DIE KAMUELA DIE IN A FIRE!
benlieb has joined #ruby
<nobitanobi> brianb_, I'm confused about why you need to place self though
ddpunk has joined #ruby
<brianb_> nobitanobi: so it actually sends a message instead of trying to initialize a local var
<nobitanobi> oh ok.
<nobitanobi> cool
enebo has quit [Quit: enebo]
ehc has joined #ruby
atno has joined #ruby
myappleguy has quit [Ping timeout: 264 seconds]
alvaro_o has quit [Quit: Ex-Chat]
benlieb has quit [Client Quit]
kaspergrubbe has quit [Remote host closed the connection]
sambao21 has quit [Ping timeout: 272 seconds]
lmadrigal has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
carlyle has joined #ruby
simplyaubs has joined #ruby
shterrett has quit [Quit: shterrett]
saarinen has joined #ruby
saarinen has quit [Client Quit]
<rjhunter> yanglvxiong's question made me realise i'd never tried embedding Ruby in C before, so I thought I'd take a look
<rjhunter> I can't find a nice guide, but I managed to fiddle my way through
<rjhunter> if yanglvxiong comes back, I think I can help him/her
heidi has quit [Quit: Leaving.]
<Kamuela> ok this is my referral link, as far as i know it doesn't work anymore, but cool enough to check out anyway https://www.nitrous.io/join/XFPnrr7k1SA
<Kamuela> allows for tandem coding on multiple boxes
<Kamuela> slick as ishhh
xorgnak has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
blarghmatey has joined #ruby
braincrash has quit [Read error: Operation timed out]
<Kamuela> shevy, I'm sorry :( But I remembered why I hated it :)
carlyle has quit [Ping timeout: 245 seconds]
mikepack has joined #ruby
<nobitanobi> Kamuela, Django? And why did you hate it?
<Kamuela> nobitanobi, I like python, just don't like django very much compared to rails
Mars has joined #ruby
<nobitanobi> may I ask why though? I tried Django a long time ago
ckinni has joined #ruby
Mars is now known as Guest27594
<Kamuela> not sure, just didn't seem to "click" with my personality the way rails does. the funnier part is that i finished a small project in django and still haven't one in rails though... lol
gr33n7007h has joined #ruby
<nobitanobi> :)
rh1n0 has joined #ruby
<nobitanobi> I recall Django comes with a pretty nice admin interface
<nobitanobi> 'by default'
endash has quit [Ping timeout: 260 seconds]
amacgregor has joined #ruby
mikepack has quit [Ping timeout: 252 seconds]
vlad_starkov has quit [Ping timeout: 252 seconds]
<Kamuela> yeah but then there's a rails_admin gem so not too big of a leap
<Kamuela> it's gonna come down to, like everything always does, "philosophy"
hornairs has quit [Quit: hornairs]
<Kamuela> which i was substitute as "self-righteousness" and "resistance to change"
amacgregor_ has joined #ruby
<Kamuela> if django tweaked itself a little bit and became more like rails i think it could kick some major ass
plotter has quit [Quit: Leaving]
braincrash has joined #ruby
timonv has joined #ruby
<Kamuela> but to be not rails will likely be a more important guiding principle
Guest27594 has quit [Ping timeout: 268 seconds]
amacgregor__ has quit [Ping timeout: 246 seconds]
ddpunk has quit [Remote host closed the connection]
<nobitanobi> :)
nisstyre has joined #ruby
amacgregor has quit [Ping timeout: 246 seconds]
rh1n0 has quit [Quit: Linkinus - http://linkinus.com]
Spami has quit [Quit: This computer has gone to sleep]
<Kamuela> anyone help me with the ruby koans?
timonv has quit [Ping timeout: 272 seconds]
eka has quit [Quit: Computer has gone to sleep.]
<rjhunter> Kamuela: what help do you need?
sbos99 has joined #ruby
bradsmith has joined #ruby
danshultz has joined #ruby
nateberkopec has quit [Quit: Leaving...]
osvico has quit []
zhuxh_ has quit [Quit: Page closed]
mary5030 has joined #ruby
tharindu has joined #ruby
brianb_ has quit [Ping timeout: 252 seconds]
tharindu has quit [Read error: Connection reset by peer]
xk_id has quit [Quit:
osvico has joined #ruby
mneorr_ has joined #ruby
Apane has joined #ruby
mneorr has quit [Ping timeout: 268 seconds]
lmickh has quit [Ping timeout: 260 seconds]
brianb_ has joined #ruby
brianb_ has quit [Client Quit]
mneorr_ has quit [Ping timeout: 272 seconds]
hogeo has quit [Remote host closed the connection]
digital-ghost has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
osvico has quit []
benwoody has quit [Quit: benwoody]
thekkid has quit [Ping timeout: 252 seconds]
blarghmatey has quit [Ping timeout: 244 seconds]
zz_michael_mbp is now known as michael_mbp
baroquebobcat has joined #ruby
myappleguy has joined #ruby
heidi has joined #ruby
osvico has joined #ruby
Fire-Dragon-DoL has quit [Quit: Leaving.]
radic_ has joined #ruby
radic has quit [Disconnected by services]
EvanR_ has quit [Ping timeout: 265 seconds]
nanoyak has joined #ruby
musty has joined #ruby
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lukec has quit [Quit: lukec]
pragmatism has quit [Quit: Leaving...]
mary5030 has quit [Remote host closed the connection]
Mars has joined #ruby
mary5030 has joined #ruby
Mars is now known as Guest42775
iliketurtles has quit [Quit: zzzzz…..]
jhulten has quit [Remote host closed the connection]
zz_jrhorn424 is now known as jrhorn424
jhulten has joined #ruby
dhruvasagar has joined #ruby
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
mary5030 has quit [Ping timeout: 246 seconds]
ananthakumaran has joined #ruby
jhulten has quit [Ping timeout: 264 seconds]
varfoo has joined #ruby
graydot has joined #ruby
sydbarret has joined #ruby
<sydbarret> i heard ruby is most difficult to learn than php, is that true?
<sydbarret> ruby on rails
mary5030 has joined #ruby
wallerdev_ has joined #ruby
yfeldblum has joined #ruby
ItSANg___ has joined #ruby
Guest42775 has quit [Remote host closed the connection]
ValicekB has quit [Ping timeout: 272 seconds]
hogeo has joined #ruby
Monie has joined #ruby
matchaw has joined #ruby
mjs2600 has quit [Remote host closed the connection]
alekst has quit [Quit: Computer has gone to sleep.]
allanm_ has joined #ruby
aapzak_ has joined #ruby
raar has joined #ruby
pothibo_ has joined #ruby
sectionm1 has joined #ruby
raar is now known as Guest2443
maloik_ has joined #ruby
banisterfiend has joined #ruby
classix has quit [Disconnected by services]
Lindrian_ has joined #ruby
QKO_ has quit [Ping timeout: 264 seconds]
wereHamster has joined #ruby
kaichanvong___ has joined #ruby
dhruvasa1ar has joined #ruby
Patchou has joined #ruby
classix has joined #ruby
bluehavana_ has joined #ruby
QKO has joined #ruby
wesside_ has joined #ruby
yfeldblum has quit [Remote host closed the connection]
BeanDip__ has joined #ruby
yfeldblum has joined #ruby
<rjhunter> sydbarret: that's a pretty subjective question, and you'll definitely get biased answers here in #ruby
sydbarret has left #ruby [#ruby]
peteyg__ has joined #ruby
kstephens_ has joined #ruby
braincra- has joined #ruby
<rjhunter> sydbarret: you'll also get biased answers in #rubyonrails and #php
heidi1 has joined #ruby
<rjhunter> (oh, you're gone from a netsplit and i'm talking to myself)
mikepack has joined #ruby
varfoo has quit [*.net *.split]
heidi has quit [*.net *.split]
Apane has quit [*.net *.split]
dhruvasagar has quit [*.net *.split]
musty has quit [*.net *.split]
braincrash has quit [*.net *.split]
Mon_Ouie has quit [*.net *.split]
otherj has quit [*.net *.split]
ner0x has quit [*.net *.split]
pothibo has quit [*.net *.split]
SirFunk has quit [*.net *.split]
bahar has quit [*.net *.split]
Clooth has quit [*.net *.split]
`MArceLL` has quit [*.net *.split]
wallerdev has quit [*.net *.split]
matchaw_ has quit [*.net *.split]
aapzak has quit [*.net *.split]
Olipro has quit [*.net *.split]
allanm has quit [*.net *.split]
banisterfiend` has quit [*.net *.split]
ItSANgo has quit [*.net *.split]
wesside has quit [*.net *.split]
wereHams1er has quit [*.net *.split]
Lindrian has quit [*.net *.split]
blotchy has quit [*.net *.split]
bluehavana has quit [*.net *.split]
Tamae has quit [*.net *.split]
jalcine has quit [*.net *.split]
joshwines_ has quit [*.net *.split]
ekarlso has quit [*.net *.split]
mikee has quit [*.net *.split]
joonty has quit [*.net *.split]
Guest29360 has quit [*.net *.split]
sectionme has quit [*.net *.split]
Kudos has quit [*.net *.split]
xybre has quit [*.net *.split]
Corey has quit [*.net *.split]
peteyg_ has quit [*.net *.split]
maloik has quit [*.net *.split]
ix0071 has quit [*.net *.split]
kaichanvong has quit [*.net *.split]
iliketurtles has joined #ruby
BeanDip_ has quit [*.net *.split]
VesQ has quit [*.net *.split]
kstephens has quit [*.net *.split]
kstephens_ is now known as kstephens
wallerdev_ is now known as wallerdev
kaichanvong___ is now known as kaichanvong
Apane has joined #ruby
bluehavana_ has quit [Changing host]
bluehavana_ has joined #ruby
ValicekB has joined #ruby
danshultz has quit [Remote host closed the connection]
bluehavana_ is now known as bluehavana
pothibo_ is now known as pothibo
ix007 has joined #ruby
ix007 has joined #ruby
ix007 has quit [Changing host]
Kudos has joined #ruby
danshultz has joined #ruby
joshwines_ has joined #ruby
io_syl has quit []
Corey has joined #ruby
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ekarlso has joined #ruby
SirFunk has joined #ruby
vlad_starkov has quit [Write error: Connection reset by peer]
IceDragon has quit [Quit: Space~~~]
bahar has joined #ruby
robonerd has quit [Ping timeout: 246 seconds]
bahar has quit [Changing host]
bahar has joined #ruby
EvanR_ has joined #ruby
musty has joined #ruby
mikepack has quit [Ping timeout: 272 seconds]
hogeo has quit [Remote host closed the connection]
hogeo has joined #ruby
lukec has joined #ruby
danshultz has quit [Ping timeout: 272 seconds]
varfoo has joined #ruby
larissa has quit [Quit: Leaving]
plotter has joined #ruby
plotter has joined #ruby
plotter has quit [Changing host]
joonty has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
rezzack has quit [Ping timeout: 246 seconds]
hogeo has quit [Ping timeout: 272 seconds]
bradsmith has quit [Remote host closed the connection]
sambao21 has joined #ruby
ananthakumaran has joined #ruby
bradsmith has joined #ruby
ner0x has joined #ruby
thekkid has joined #ruby
nisstyre has quit [Quit: Leaving]
ckinni has joined #ruby
chinkung has quit [Quit: Bye!]
hogeo has joined #ruby
bradsmith has quit [Ping timeout: 252 seconds]
jalcine has joined #ruby
sambao21 has quit [Ping timeout: 268 seconds]
nism-pi has joined #ruby
musty has quit [Ping timeout: 252 seconds]
dhruvasa1ar has quit [Ping timeout: 246 seconds]
tyfighter has quit [Quit: tyfighter]
Corey has quit [Read error: error:1408F119:SSL routines:SSL3_GET_RECORD:decryption failed or bad record mac]
macmartine has joined #ruby
Corey has joined #ruby
Corey_ has joined #ruby
mixel has quit [Quit: mixel]
banghouse has quit [Remote host closed the connection]
pothibo has left #ruby [#ruby]
EvanR_ has quit [Ping timeout: 272 seconds]
myappleguy has quit [Ping timeout: 246 seconds]
funburn has joined #ruby
CreativeEmbassy has quit [Quit: Computer has gone to sleep.]
simplyaubs has quit [Quit: simplyaubs]
Corey has quit [Read error: Connection reset by peer]
Corey_ has quit [Read error: Connection reset by peer]
jkhwan has quit [Remote host closed the connection]
Corey has joined #ruby
jkhwan has joined #ruby
Corey_ has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
sguselnikov has joined #ruby
tharindu has joined #ruby
heidi1 has quit [Quit: Leaving.]
jkhwan has quit [Ping timeout: 272 seconds]
vlad_starkov has joined #ruby
michael_mbp is now known as zz_michael_mbp
Corey has quit [Read error: Connection reset by peer]
Corey_ has quit [Read error: Connection reset by peer]
Corey has joined #ruby
CreativeEmbassy has joined #ruby
Corey_ has joined #ruby
Apane has quit [Ping timeout: 272 seconds]
guilleiguaran_ is now known as guilleiguaran
mikee has joined #ruby
ckinni has quit [Quit: Textual IRC Client: www.textualapp.com]
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
zz_scottstamp is now known as scottstamp
ckinni has joined #ruby
nisstyre has joined #ruby
ckinni has quit [Max SendQ exceeded]
xcess_denied has joined #ruby
Corey has quit [Read error: Connection reset by peer]
ckinni has joined #ruby
Corey_ has quit [Read error: Connection reset by peer]
Corey has joined #ruby
Corey_ has joined #ruby
graydot has quit [Quit: graydot]
sguselnikov has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
ewnd9 has joined #ruby
mary5030 has quit [Ping timeout: 260 seconds]
Monie has quit [Ping timeout: 260 seconds]
huttan has quit [Ping timeout: 260 seconds]
carlyle has joined #ruby
carlyle has quit [Client Quit]
Corey has quit [Read error: Connection reset by peer]
nari has joined #ruby
scottstamp is now known as zz_scottstamp
Corey has joined #ruby
arietis has joined #ruby
Corey_ has quit [Read error: Connection reset by peer]
Corey_ has joined #ruby
mikee has quit [*.net *.split]
nowthatsamatt has quit [Quit: nowthatsamatt]
aapzak_ has quit [Ping timeout: 268 seconds]
aapzak has joined #ruby
heidi has joined #ruby
Monie has joined #ruby
Corey has quit [Read error: Connection reset by peer]
iliketurtles has quit [Quit: zzzzz…..]
Corey has joined #ruby
Corey_ has quit [Read error: Connection reset by peer]
end_guy has joined #ruby
sambao21 has joined #ruby
Corey_ has joined #ruby
hogeo has quit [Remote host closed the connection]
jhulten has joined #ruby
gianlucadv has quit [Ping timeout: 260 seconds]
timonv has joined #ruby
dhruvasagar has joined #ruby
duggiefresh has joined #ruby
sambao21 has quit [Ping timeout: 260 seconds]
Corey has quit [Read error: Connection reset by peer]
yfeldblum has quit [Read error: Connection reset by peer]
Corey has joined #ruby
Corey_ has quit [Read error: Connection reset by peer]
timonv has quit [Ping timeout: 246 seconds]
Corey_ has joined #ruby
OdNairy has joined #ruby
jhulten has quit [Ping timeout: 264 seconds]
osvico has quit [Ping timeout: 265 seconds]
fgo has quit [Remote host closed the connection]
petey has joined #ruby
Corey has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Read error: Connection reset by peer]
Corey has joined #ruby
Corey_ has quit [Read error: Connection reset by peer]
pothibo has joined #ruby
Corey_ has joined #ruby
hogeo has joined #ruby
ddpunk has joined #ruby
pothibo has quit [Client Quit]
DanKnox is now known as DanKnox_away
Corey has quit [Read error: Connection reset by peer]
ehc has quit [Quit: ehc]
Corey has joined #ruby
ValicekB has quit [Ping timeout: 265 seconds]
simplyaubs has joined #ruby
Corey_ has quit [Read error: Connection reset by peer]
io_syl has joined #ruby
ddpunk has quit [Ping timeout: 260 seconds]
Olipro has joined #ruby
Corey_ has joined #ruby
danshultz has joined #ruby
simplyaubs has quit [Client Quit]
sambao21 has joined #ruby
sailias has quit [Ping timeout: 260 seconds]
DanielRb has quit [Quit: Quit]
graydot has joined #ruby
Corey has quit [Read error: Connection reset by peer]
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Corey has joined #ruby
danshultz has quit [Ping timeout: 264 seconds]
Corey_ has quit [Read error: Connection reset by peer]
yacks has quit [Remote host closed the connection]
Corey_ has joined #ruby
Olipro has quit [Ping timeout: 265 seconds]
sambao21 has quit [Ping timeout: 272 seconds]
Advocation has joined #ruby
Corey has quit [Read error: Connection reset by peer]
ValicekB has joined #ruby
Corey has joined #ruby
Corey_ has quit [Read error: Connection reset by peer]
Corey_ has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
VesQ has joined #ruby
mikee has joined #ruby
duggiefresh has quit [Ping timeout: 272 seconds]
Advocation has quit [Ping timeout: 246 seconds]
hogeo has quit [Remote host closed the connection]
capicue has quit [Quit: Leaving...]
mikee has quit [Ping timeout: 246 seconds]
hogeo has joined #ruby
hogeo has quit [Read error: Connection reset by peer]
myappleguy has joined #ruby
Corey has quit [Read error: Connection reset by peer]
hogeo has joined #ruby
lukec has quit [Quit: lukec]
Corey has joined #ruby
ananthakumaran has joined #ruby
CaptainKnots has quit [Ping timeout: 252 seconds]
mikee has joined #ruby
nisstyre has quit [Quit: Leaving]
ananthakumaran has quit [Client Quit]
Corey_ has quit [Read error: Connection reset by peer]
peterdecroos has joined #ruby
Corey_ has joined #ruby
pw3 has joined #ruby
vlad_starkov has joined #ruby
myappleguy has quit [Ping timeout: 244 seconds]
banghouse has joined #ruby
banghouse is now known as Guest23283
rippa has joined #ruby
Corey has quit [Read error: Connection reset by peer]
Corey has joined #ruby
tylersmith has quit [Remote host closed the connection]
tylersmith has joined #ruby
huttan has joined #ruby
Corey_ has quit [Read error: Connection reset by peer]
Hanmac1 has joined #ruby
Corey_ has joined #ruby
Hanmac has quit [Ping timeout: 260 seconds]
tylersmi_ has joined #ruby
OPTIMUS_ has joined #ruby
tylersmith has quit [Read error: Connection reset by peer]
Corey has quit [Read error: Connection reset by peer]
Corey has joined #ruby
huttan has quit [Ping timeout: 264 seconds]
Corey_ has quit [Read error: Connection reset by peer]
platypine has quit [Ping timeout: 272 seconds]
OPTIMUS_ has quit [Remote host closed the connection]
Corey_ has joined #ruby
sbos99 has quit [Read error: Connection reset by peer]
OdNairy has joined #ruby
FortuneYe has joined #ruby
Corey has quit [Read error: Connection reset by peer]
apeiros has joined #ruby
earthquake has quit [Quit: earthquake]
Corey_ has quit [Client Quit]
peterdecroos has quit [Remote host closed the connection]
robonerd has joined #ruby
peterdecroos has joined #ruby
yfeldblum has joined #ruby
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
JonahR has quit [Quit: jonahR]
jondkinney is now known as jondkinney_afk
simoz has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
peterdecroos has quit [Ping timeout: 244 seconds]
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
Monie has quit [Ping timeout: 246 seconds]
pw3 has quit [Ping timeout: 250 seconds]
echevemaster has quit [Quit: Leaving]
Guest18786 has joined #ruby
pranny has joined #ruby
ananthakumaran has joined #ruby
capicue has joined #ruby
mrsolo has joined #ruby
capicue has quit [Client Quit]
arietis has joined #ruby
Guest18786 has quit [Ping timeout: 272 seconds]
simoz has quit [Ping timeout: 246 seconds]
jkhwan has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
Monie has joined #ruby
taternuts has quit []
xybre has joined #ruby
dhruvasagar has quit [Ping timeout: 265 seconds]
simoz has joined #ruby
dhruvasagar has joined #ruby
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
Hanmac has joined #ruby
gr33n7007h has quit [Quit: Where's John Conner]
Mon_Ouie has joined #ruby
Guest2443 has quit [Ping timeout: 264 seconds]
Astralum has joined #ruby
Hanmac1 has quit [Ping timeout: 272 seconds]
nowthatsamatt has joined #ruby
nowthatsamatt has quit [Client Quit]
jkhwan has quit [Remote host closed the connection]
apeiros has quit [Ping timeout: 260 seconds]
simoz has quit [Ping timeout: 260 seconds]
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
joelteon has joined #ruby
<joelteon> it's been a long time since I wrote a gem, and I don't remember how you set up the require paths properly in development
<joelteon> my bin/shipmaster requires "lib/shipmaster", but that requires "shipmaster/version" which isn't in the load path, though it's in lib/. what do I do
ewnd9 has quit [Ping timeout: 272 seconds]
achru has joined #ruby
fgo has joined #ruby
ValicekB has quit [Ping timeout: 268 seconds]
RichardBaker has joined #ruby
`MArceLL` has joined #ruby
Saima has joined #ruby
Saima has left #ruby [#ruby]
nomenkun has joined #ruby
Tearan has joined #ruby
Tearan has quit [Client Quit]
soba has joined #ruby
Tearan has joined #ruby
DanielRb has joined #ruby
wiiw has joined #ruby
<wiiw> a = true ; b = false ; not a and not b == not ( a or b )
<wiiw> is it true ?
mercwithamouth has joined #ruby
ewnd9 has joined #ruby
zipper has joined #ruby
lethjakman has joined #ruby
ckinni has joined #ruby
ewnd9 has quit [Remote host closed the connection]
<existensil> >> a = true ; b = false ; not a and not b == not ( a or b )
<eval-in> existensil => /tmp/execpad-f35df1f5a530/source-f35df1f5a530:2: syntax error, unexpected ( arg, expecting '(' ... (https://eval.in/68426)
zoee has joined #ruby
<existensil> its nothing
ewnd9 has joined #ruby
<existensil> joelteon: I'm guessing you want something like this in your bin script: $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
joelteon has left #ruby ["bye"]
<existensil> add the lib directory of the parent directory to the front of the load path
lethjakm1 has quit [Ping timeout: 264 seconds]
ValicekB has joined #ruby
Soda has joined #ruby
<existensil> then your bit can just require 'shipmaster', and shipmaster can require 'shipmaster/version' like you want
<existensil> s/bit/bin
vlad_starkov has joined #ruby
ner0x has quit [Remote host closed the connection]
DonRichie has joined #ruby
sergicles has quit [Quit: sergicles]
Mars has joined #ruby
Mars is now known as Guest43113
baroquebobcat has quit [Quit: baroquebobcat]
fir3bug has joined #ruby
fir3bug has left #ruby [#ruby]
zz_michael_mbp is now known as michael_mbp
funburn has quit [Quit: funburn]
Banistergalaxy has quit [Ping timeout: 248 seconds]
CreativeEmbassy has quit [Quit: Computer has gone to sleep.]
Banistergalaxy has joined #ruby
Apane has joined #ruby
timonv has joined #ruby
Davey has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
sandeepk has joined #ruby
tachy0n has joined #ruby
<tachy0n> anyone familiar with Middleman?
zoee has quit [Quit: This computer has gone to sleep]
<rjhunter> tachy0n: i've used it for a couple of things
<tachy0n> just curious how I could fix this not knowing much about ruby or gems
amritanshu_RnD has joined #ruby
nomenkun has quit [Remote host closed the connection]
timonv has quit [Ping timeout: 260 seconds]
<sandeepk> techyOn: use bundle exec middleman server
nomenkun has joined #ruby
<tachy0n> ah that worked thanks
krz has joined #ruby
<sandeepk> cool
<tachy0n> so files named <name>.html.erb in my project path are only loadable this way?
<tachy0n> I picked this work up off of wrapbootstrap
<tachy0n> thinking I'd get pure HtML / CSS not a ruby project :)
tagrudev has joined #ruby
<tachy0n> oh nevermind it puts them in build
mengu has joined #ruby
<rjhunter> tachy0n: `bundle exec middleman build` compiles all the files. `bundle exec middleman server` loads them per-request (I don't think middleman stores a compiled copy until you tell it to build)
lethjakman has quit [Ping timeout: 260 seconds]
Deele has quit [Ping timeout: 260 seconds]
<tachy0n> rjhunter: thanks
nomenkun has quit [Ping timeout: 268 seconds]
<wiiw> >> a = true ; b = false ; (not a and not b) == (not ( a or b ))
<eval-in> wiiw => true (https://eval.in/68428)
nobitanobi has quit [Quit: Leaving]
<wiiw> existensil: thsnks
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<rjhunter> tachy0n: the idea is that you can run `server` while you fiddle around with the files (edit file, refresh browser),then run `build` when you're "done" and want to give the files to someone or something without ruby
thekkid has quit [Ping timeout: 260 seconds]
<tachy0n> yeah its similar to what I use yeoman and grunt
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
nomenkun has joined #ruby
tylersmi_ has quit [Remote host closed the connection]
skaflem has joined #ruby
lnormous has joined #ruby
nomenkun has quit [Remote host closed the connection]
mikepack has joined #ruby
nomenkun has joined #ruby
xorgnak___ has joined #ruby
pragmatism has joined #ruby
Davey has joined #ruby
sayan has joined #ruby
ddpunk has joined #ruby
gstamp has quit [Read error: No route to host]
mikepack has quit [Ping timeout: 272 seconds]
xorgnak___ has quit [Remote host closed the connection]
dangerousdave has joined #ruby
nomenkun has quit [Ping timeout: 264 seconds]
kobain has quit [Ping timeout: 260 seconds]
macmartine has quit [Remote host closed the connection]
xorgnak___ has joined #ruby
gstamp has joined #ruby
Soda has quit [Remote host closed the connection]
<shevy> Kamuela are you still here?
<shevy> I cant see much, could be a netsplit
<shevy> test
<Kamuela> i'm hrtr
<Kamuela> btu baskfin up cna u her me
<Kamuela> shevy, gets a ping
vlad_starkov has quit [Remote host closed the connection]
xorgnak___ has quit [Remote host closed the connection]
ddpunk has quit [Ping timeout: 272 seconds]
xorgnak___ has joined #ruby
xorgnak___ has quit [Remote host closed the connection]
fgo has quit [Remote host closed the connection]
xorgnak___ has joined #ruby
<shevy> aha
<shevy> Kamuela how much ruby do you know?
<shevy> can you use block_given? and yield already?
io_syl has quit []
<Kamuela> i thought yield was rails!
<sevenseacat> nope
myappleguy has joined #ruby
jprovazn has joined #ruby
XenoWolf has quit [Read error: Operation timed out]
<Kamuela> shevy, "can i use" i don't know, but i'm looking at a small example right now and it seems like badassery
xorgnak___ has quit [Remote host closed the connection]
<Kamuela> is this not what one would call "polymorphism?"
<sevenseacat> no
xorgnak___ has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Kamuela> i don't know where ruby decides "run time" and "compile time" split
jbpros has joined #ruby
Mon_Ouie has quit [Ping timeout: 244 seconds]
graydot has quit [Quit: graydot]
<shevy> Kamuela yield and block_given? relate to blocks in ruby
xorgnak___ has quit [Remote host closed the connection]
xorgnak___ has joined #ruby
Guest43113 has quit [Remote host closed the connection]
myappleguy has quit [Ping timeout: 264 seconds]
<shevy> Kamuela what is compile time in ruby? :>
<Kamuela> shevy, so yield is basically shorthand for the block
graydot has joined #ruby
wiiw has left #ruby [#ruby]
<shevy> with yield you grab the block
<Kamuela> and with the else case for block_given you have a default behavior?
<shevy> >> def foo(i=''); puts i; puts yield if block_given?; end; foo 'hi'
<eval-in> shevy => hi ... (https://eval.in/68429)
<shevy> >> def foo(i=''); puts i; puts yield if block_given?; end; foo 'hi' { 'hah' }
<eval-in> shevy => /tmp/execpad-f294d7a33c20/source-f294d7a33c20:2: syntax error, unexpected '{', expecting keyword_end ... (https://eval.in/68430)
<Kamuela> not really default, more like non-block i suppose
<shevy> oops
<shevy> >> def foo(i=''); puts i; puts yield if block_given?; end; foo('hi') { 'hah' }
<eval-in> shevy => hi ... (https://eval.in/68431)
<shevy> Kamuela it simply is as if you provided an extra argument to your method
<shevy> Kamuela which methods in ruby can accept a block?
vlad_starkov has joined #ruby
macmartine has joined #ruby
dnyy has joined #ruby
huttan has joined #ruby
fluffheadsr has quit [Ping timeout: 268 seconds]
<Kamuela> shevy, which methods? i do not know. but this example uses a try case
bkolden has joined #ruby
<shevy> Kamuela the answer is
<shevy> all methods
jbpros has quit [Quit: jbpros]
<shevy> blocks are a huge difference from ruby to i.e. php
sandeepk has quit [Quit: Leaving...]
<Kamuela> shevy, ah trick question. i was thinking specifically. but before you said that, all methods. you made me think because you asked it had to be more specific
XenoWolf has joined #ruby
<Kamuela> but the fact that ruby does that whacky pretty stuff i'm actually very open to
<Kamuela> reflexive syntax i guess is what i'd call it
<shevy> Kamuela well it is bad to use questions where people do not have to think
banisterfiend has quit [Quit: Computer has gone to sleep.]
<xorgnak___> :SYN
<shevy> ok so now you know what a block is and how to use it
Eiam has quit [Ping timeout: 260 seconds]
<Kamuela> i don't mind. either way, i am learning something
<shevy> Kamuela the next question will be around the & symbol in ruby
<Kamuela> when you say "and how to use it" hmm, i guess not?
lnormous has quit [Ping timeout: 252 seconds]
<shevy> but let me think to formulate a question...
<shevy> not?
<shevy> well that is simple now
<shevy> with: block_given? you can query if you have passed a block to a method or not
<shevy> and actually, that is it about blocks... I mean, we can get to Procs soon... but other than that... there is not much else to know about blocks is there?
<xorgnak___> :SYN
<shevy> oh
huttan has quit [Ping timeout: 252 seconds]
<shevy> Kamuela how many blocks can you pass to a method?
baldivia has joined #ruby
xorgnak___ has quit [Remote host closed the connection]
xorgnak___ has joined #ruby
<xorgnak___> :SYN
<shevy> xorgnak___ what
<DouweM> shevy: right, there's not much else to know about blocks once you have yield/block_given?/&block var/block is a Proc
<heftig> Kamuela: there's no "compile time", closest you get is "parse time", when the code is loaded
OdNairy has joined #ruby
<Kamuela> shevy, i'm going to say 1 thought it might be possible you end up with an array of blocks?
xorgnak___ has quit [Remote host closed the connection]
xorgnak___ has joined #ruby
<xorgnak___> :SYN
<shevy> DouweM yeah... I'll get to the latter two soon I suppose...
sandeepk has joined #ruby
<shevy> Kamuela how would you call these?
<DouweM> shevy: and one last thing: array decomposition in block args
<shevy> Kamuela or let's start simpler, how do you call one block?
<shevy> don't scroll up ;)
<Kamuela> yield[0] yield[1] ??
<shevy> hmmmmmmm
<h0rrorvacui> whats is going on?
<h0rrorvacui> teaching him ruby?
noop has joined #ruby
<shevy> damn
<shevy> NoMethodError: undefined method `glock_given?' for main:Object
<shevy> I need some coffee...
<h0rrorvacui> LoL
<sandeepk> shevy: I would say it about ruby and other languages here. Ruby has a very unique implementation of closures as compare to other counter parts
<sevenseacat> this isnt america. no glocks here.
<shevy> Kamuela cool... that actually works
<Kamuela> shevy, but that wasn't the way you were used to doing it?
<shevy> >> def foo; yield[1] if block_given?; end; foo { %w( abc def ghi ) }
<eval-in> shevy => "def" (https://eval.in/68441)
<shevy> Kamuela haha well it surprised me that it worked :)
<shevy> I really need a break, be back in some minutes
<Kamuela> shevy, i swear that i just TRUST ruby to handle all things crazy
<heftig> sevenseacat: isn't the glock an austrian pistol?
<Kamuela> no glock is american isn't it
<sevenseacat> no idea. i know its a gun and they love guns in the states.
<h0rrorvacui> heftig: nope
warren has joined #ruby
<h0rrorvacui> yes
lmickh has joined #ruby
<h0rrorvacui> its austrian
<h0rrorvacui> its not american *
falood has quit [Ping timeout: 264 seconds]
<h0rrorvacui> I own one sadly.
<Kamuela> word
<Kamuela> why is that sad?
xorgnak___ has quit [Remote host closed the connection]
<warren> Anyone know of an example code where I can see require 'someffi' and rescue <native implementation>?
falood has joined #ruby
<h0rrorvacui> I'm an American, fits a stereotype.
xorgnak___ has joined #ruby
<xorgnak___> :SYN
<Kamuela> h0rrorvacui, to own a glock? only if you're black or latino in the inner city...
Tearan has quit [Quit: Sleepy Badger....]
<Kamuela> h0rrorvacui, i thought the new stereotype was "AR-killing machine"
<h0rrorvacui> I own an AR too.
xorgnak___ has quit [Remote host closed the connection]
ElectronFunBaby has joined #ruby
<Kamuela> h0rrorvacui, fully auto?
<h0rrorvacui> No.
<Kamuela> i don't understand the laws well enough
<heftig> i think you'd be foolish to admit to owning a fully auto rifle on a public channel
<Kamuela> lots of technically illegal technically not illegal such
xorgnak___ has joined #ruby
<xorgnak___> :SYN
<h0rrorvacui> You can own fully auto if you get the permits in my state.
<h0rrorvacui> You have to get your sheriff's permission here.
<Kamuela> nice, no clue for the laws here in hawaii
<Kamuela> we're very liberal (read: new york/california) but i actually think gun ownership is rising
<h0rrorvacui> I'm in Alabama.
<h0rrorvacui> So think what you want :P
bkolden has quit [Quit: ChatZilla 0.9.90.1 [Firefox 25.0/20131025151332]]
<Kamuela> haha i don't think anything. i love muh freedom
<h0rrorvacui> I'm just a target shooter. I don't even hunt.
<h0rrorvacui> I can't kill a fly without feeling bad.
<h0rrorvacui> I shoo them outside.
<Kamuela> nothing wrong with that. you're not supposed to have a gun to kill people
<Kamuela> everyone's supposed to have a gun so that everyone thinks twice about killing people
<existensil> ha
<h0rrorvacui> Never thought of it that way.
_HolyCow has joined #ruby
<Kamuela> states with the highest open carry tend to have the lowest amount of violent crime
<h0rrorvacui> I think we do have a gun culture here in Alabama that builds respect that might be lost in some areas where hunting and gun ownership was different.
<existensil> i'd say guns are more likely to make a perp think twice about not killing you. you might have a gun, so they have to kill and rob instead of just rob you.
<Kamuela> it's not a perfect 1:1, like you can throw in chicago which is VERY anti-gun but has gun murders everyday. you can't immediately say it's because of the gun laws, though i'd like to. it also happens to be extremely dense and dense living is harder
<existensil> Kamuela: the states with the highest carry do not have the lowest violent crime, despite the fact that suchs states are more rural and should have lower violent crime
tachy0n has quit [Quit: ChatZilla 0.9.90.1 [Firefox 25.0/20131025151332]]
<h0rrorvacui> I don't think we have hardly a violent crime outside our major city here in Alabama.
xcess_denied has quit [Quit: Leaving...]
<h0rrorvacui> Okay, gun related I should say.
<Kamuela> existensil, are you going to make a leap somewhere to say that we should stop people from legitimately owning firearms or discouraging it because people who want to do harm use guns?
<h0rrorvacui> But thats not empirical obviously
xorgnak___ has quit [Remote host closed the connection]
<existensil> NYC has extremely low violent crime rate, especially considering the correlation between density and crime rates, and hardly any guns
<existensil> Kamuela: no, just tyring to keep the conversation honest
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
XenoWolf has quit [Ping timeout: 244 seconds]
<existensil> i don't propose banning guns. i do think purpose built murder machines, which have no practical application outside of that (read: assault weapons) should probably be more strictly controlled
<existensil> and i'm not a big fan of concealed carry
jkhwan has joined #ruby
<Kamuela> well full-disclosure, i am one of those nuts that tends to see very strong pro-gun points outweighing almost any anti-gun points
<Kamuela> concealed carry is the best
<Kamuela> you're one of 3 dudes who has a gun on your hip
<Kamuela> the bad guy now kills you 3 first without warning
<existensil> countries with stricter gun laws almost universally have much lower crime rates than us
<existensil> though i will admit at least part of that is cultural
<Kamuela> having a gun on your hip almost says shoot me
<existensil> but concealed carry just further enshrines violance in our culture
* sevenseacat looks at the amount of gun crime in Australia
<sevenseacat> (spoilers: we dont have any)
<Kamuela> when you say cultural, do you mean that americans are just blood thirsty?
<Kamuela> because i believe the cultural argument, but when you look at the statistics, there's a real story
mrsolo has quit [Quit: Leaving]
pragmatism has quit [Quit: Leaving...]
<sevenseacat> i didnt mean to start such a heated discussion >_>
<existensil> no, but there is evidence that even when guns are removed, Americans still kill each other at a higher rate than other developed nations
<existensil> its not clear to me, or to many experts i have read, exactly why that is
<Kamuela> existensil, it's drug violence
<Kamuela> we have the highest incarceration rate per capita
<Kamuela> and that is all non-violent drug
<existensil> haha. i think any attempt at distilling it into a single sentence is deeply flawed
closures999 has quit [Remote host closed the connection]
<Kamuela> and violence involves drugs at least half the time
<existensil> and completely overlooks the many many complex reasons for higher violent crime in the US
<existensil> it is not just drug violence
<Kamuela> i'm not talking about the use of drugs, i'm talking about gangs financed by drug dealing because it is illegal and stupidly expensive for no reason
<existensil> although, i agree that drug violence causes a lot of death and fighting the drug war, at least with our current tactics, is ridiculous
<Kamuela> and what drives the expense is specifically the fact that its outlawed
<existensil> any tactics that treat regular users/citizens as dangerous criminals is doomed for failure
zoee has joined #ruby
DouweM has quit [Ping timeout: 252 seconds]
dagobah has joined #ruby
<h0rrorvacui> I wonder if being exposed to guns at a young age helps. I was using guns at about age 6 probably.
<h0rrorvacui> I've a lot of respect for guns.
<Kamuela> h0rrorvacui, i was horribly afraid of guns my whole life and have never held one
<h0rrorvacui> I'm not afraid of them as long as they are not pointed at me.
<h0rrorvacui> lol
<existensil> if you take gang/drug/organized-crime related violence out of the statistics i'm pretty sure the USA would still be pretty high on a list of violent crime among developed nations
xcess_denied has joined #ruby
XenoWolf has joined #ruby
<Kamuela> h0rrorvacui, no wait, that's a lie, i did end up holding a few at this dude's house he had some rifles and pistols
zoee has quit [Client Quit]
<Kamuela> h0rrorvacui, exactly though, i could see the lack of respect
<existensil> i was in the Army. I am more afraid of guns after than before.
<Kamuela> h0rrorvacui, someone pointed one at me and i pushed him back and pushed the gun down
<Kamuela> h0rrorvacui, you don't point a fucking gun at someone unless you intend to shoot
zoee has joined #ruby
xcess_denied has quit [Client Quit]
olivier_bK has joined #ruby
sandeepk has quit [Quit: Leaving...]
nwertman has joined #ruby
<Kamuela> existensil, it might be an interest experiment to try just that. you may be surprised. i may be surprised. too often we rely on the numbers of news articles and stuff
<Reach> ive never used a gun
<existensil> i just don't understand why people are so eager to equip themselves with the ability to easily and permanently take the lives of other people. if you're getting robbed, give them your stuff. pulling a gun out only escalates.
<Reach> and have never felt that i need a gun
<Reach> you people are weird
macmartine has quit [Read error: Connection reset by peer]
<Kamuela> existensil, the threat of having a gun pulled on someone has a very marked increase in the apprehension of somoene to rob you in the first place
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<rcs> We're programmers, right? I think any statements that are made here should be backed by stats, instead of just stated as truth.
<existensil> Reach: I've used them plenty and agree with you.
heidi has quit [Quit: Leaving.]
<Kamuela> existensil, that i'm not making up
<rcs> Australian, for instance.
<sevenseacat> +1 to Reach
<krz> how can i get the child module without using splits. i.e. Foo::Bar
macmartine has joined #ruby
<h0rrorvacui> I own a lot of my guns because they are family heirlooms.
<krz> want Bar
<krz> module/class
<krz> is there a method to achieve this?
<rcs> krz: What do you mean?
<krz> i want to get the class name without Foo::
<sevenseacat> rcs: interesting
<Kamuela> Howard Zinn talked about an "infantilization" of society. The idea that more and more of our problems are handled by other people. I think the general fear of guns is one such area where we are infantilized. sevenseacat, if you were anti-gun in truth, wouldn't you advocate that police didn't have them either?
<rcs> krz: 'Foo::Bar'.split('::').last ?
<krz> no splits
<krz> wondering if there is a method specifically for this purpose
lnormous has joined #ruby
<sevenseacat> Kamuela: why would i say that?
<ElectronFunBaby> This is a deep convo... for such a place. +1 for Howard Zinn... he was aware.
vlad_starkov has quit [Remote host closed the connection]
<krz> ah demodulize
olivier_bK has quit [Ping timeout: 252 seconds]
<Kamuela> lol, i'm sorry. i was an economics and political science major in university
<existensil> Kamuela: I advocate that police should only carry them when necessary. Clearly, with concealed carry and widespread ownership, it is always necessary in the US, but in other places (Canada, UK, etc) many officers do not.
<Reach> Kamuela: it's more complicated than that.
<Reach> there are criminals with guns, so yes police should have guns. but the normal citizen requires no such thing.
ewnd9 has quit [Remote host closed the connection]
<existensil> I think guns should be taken from most NYC officers. Too many shootings of pedestrians during pursuit of unarmed perps.
JohnBat26 has joined #ruby
<rcs> krz: Rails only, and does a string match anyway.
nwertman has quit [Ping timeout: 272 seconds]
<Kamuela> Reach, but when good people AND police have guns, why is there more harm than good done?
<existensil> with a reduced lack of a threat of guns, NYC officers could probably do without them
<h0rrorvacui> Do you think if you live in a rural part of Alabama, your opinion on guns would be different?
<h0rrorvacui> lived*
joshwines_ has quit [Ping timeout: 264 seconds]
ElectronFunBaby has quit [Quit: Leaving...]
<Kamuela> existensil, laws don't change things! that's the big fallacy, laws only affect the law-abiding
ewnd9 has joined #ruby
<Kamuela> that i think is the number one FUNDAMENTAL thing that people just don't get. they think that laws matter
<Kamuela> there's already a law against robbery!
<sevenseacat> the ramifications of a cop using a gun in the line of diuty, and the average citizen shooting someone, are very very different
<Kamuela> but he's doing it!
<Reach> laws kind of do matter...
<Kamuela> he's robbing you!
<existensil> h0rrorvacui: the reality is different (cops would obviously have to have guns and be super cautious) but the opinion would be the same... that we should strive to reduce the need for and practice of concealed carry so citizens can be safer and cops don't need guns
<Kamuela> there's already a law against murder, but he's doing it!
denysonique has quit [Ping timeout: 252 seconds]
<Kamuela> he's killing you!
<sevenseacat> Kamuela: if laws didnt matter, you probably wouldnt be here.
<existensil> Kamuela: the idea that laws change nothing is even more fallacious
<Kamuela> existensil, indeed it is because i posit that laws do more harm than good
<sevenseacat> lol
<h0rrorvacui> I'm tempted to agree. I just think my guns are just that my guns. I want to own them like a collector or knives wants to own knives.
relix has joined #ruby
<existensil> if the laws restricted the sale of weapons, guess what? criminals can't make them themselves, so if production is decreased so is their access
<Kamuela> they transfer power from the law-abiding to the law-ignoring, all other things held constant
<h0rrorvacui> of*
macmartine has quit [Remote host closed the connection]
<sevenseacat> trollolololol
<Reach> Kamuela: depends on the ones implementing the laws
<Kamuela> as programmers, the simple logic behind that should be understood
<Reach> what if we implement a law that all Jewish people have to give up their wealth to the state
<Reach> of course that's causing harm
<existensil> Kamuela: that's pretty rigid ideology and isn't backed up by really anything
raar has joined #ruby
vlad_starkov has joined #ruby
joshwines_ has joined #ruby
<Kamuela> all of you need to read anything by Thomas Sowell
h_kon has joined #ruby
<sevenseacat> Reach: i think they tried something like that in the 30s for starters
<existensil> laws against pollution don't lead to polluters getting worse... it leads to decreased pollution, as designed
raar is now known as Guest94419
<Reach> sevenseacat: exactly, and look what happened in some areas of the world
<Reach> actually, im sure the US benefitted from that German law.
<Kamuela> existensil, it means that the ones who do pollute gain an unfair advantage
ephemerian has joined #ruby
<Kamuela> existensil, do you think pollution laws are "equal" or do you think big polluters put them on the books to cut smaller firms out of the market?
dhruvasagar has quit [Ping timeout: 244 seconds]
<Kamuela> existensil, the idea that any law exists within a moral vacuum is ludicrous
<existensil> Kamuela: no, because if the law is structured right, the increased risk to the polluter exceeds the value of their advantage, so they reduce pollution as required
<Kamuela> yet the analysis often goes morality FIRST when looking at any law whatsoever, falllllacy
<existensil> what? so EPA regulations are helping the worst polluters? are you hearing yourself?
camilasan has joined #ruby
<Kamuela> existensil, they are
vlad_starkov has quit [Read error: Connection reset by peer]
<existensil> example please
<h0rrorvacui> existensil: What do you think of the suggestion that our high gun possession protects us from invasion?
<existensil> h0rrorvacui: our military is bigger than the closest 20 combined
<existensil> invasion from what?
visof has joined #ruby
<existensil> aliens?
<visof> hi
<Kamuela> ohhh noes, da big oil and gas companies are so evil, we need the epa to stop them!
<Kamuela> bought and paid for, thanks EPA
<h0rrorvacui> 4,585,000 total military in china
<h0rrorvacui> 2,291,910 in USA
<h0rrorvacui> not true.
<Kamuela> h0rrorvacui, he probably means by spending
<existensil> Kamuela: thats a seperate problem, the bending of laws by those with money. that has to do with money in politics and is mostly unrelated. its an undeniable fact that many of the worst pollutants have been reduced or even eliminated since we started regulating
Guest2496 has joined #ruby
<Kamuela> existensil, the bending of laws by those with money, clout, whatever, is literally the backbone of your law-creating society
<existensil> I mean in spending and capability. true, we'd have a tough time in a ground war to china, but how do you propose they wage such a war? any other theatre and we would crush them pretty decisively
Spami has joined #ruby
<Kamuela> existensil, ok, but at what cost? that's the other point. do we want zero pollution? what if we could achieve zero pollution? you need to ask at what cost
<h0rrorvacui> existensil: What about competition marksmen who shoot in competitions and have extended background checks?
JeanMertz has joined #ruby
<existensil> Kamuela: proper governing is all about weighing those costs and taking the approach that does the most good for the most people
<Kamuela> h0rrorvacui, ah, don't peddle to that. it's not about sport or qualifications. it's about balance of power man
<Kamuela> existensil, proper governing is done at the level of the individual
<existensil> when contrasted against the alternative: no governing, proper governing clearly wins out as a way of organizing effort
zigomir has joined #ruby
<h0rrorvacui> I'm just curious because I'm live in an area thats largely a hive mind for pro-gun.
<h0rrorvacui> I live*
<Kamuela> existensil, well, that's either-or/false dichotomy. laws > anarchy therefore infinite laws
<existensil> right. i agree that is a bit of a strawman, but that did seem to be where you and h0rrorvacui were headed
<Kamuela> h0rrorvacui is just chillin, i'm doing the crazy stuff :P
<existensil> getting the laws right is far more important than the number of laws/regulations
<h0rrorvacui> I think should be excluded...
<Kamuela> who do you propose would get the laws right?
<h0rrorvacui> I didn't say anything other than I owned weapons.
<existensil> Kamuela: well, that's why we have democrazy. ideally.
<Kamuela> existensil, because the majority is right about things?
warren has left #ruby ["Leaving"]
<existensil> its not perfect, but its better than all the alternatives we've tried
<existensil> do you propose something better?
heftig has quit [Quit: Quitting]
rjhunter has quit [Remote host closed the connection]
<Kamuela> uh, a constitutional republic is kind of a million times better...
<h0rrorvacui> I just propose extremely difficult screening for firearms
<Kamuela> but i suppose it isn't perfect either, because it has devolved into what we have now
<existensil> exactly
<h0rrorvacui> To own a fire arm you should have to take a test much like a drivers license
<Kamuela> wow
<Kamuela> h0rrorvacui, who decides the tests?
<rcs> I do.
<h0rrorvacui> State law
<h0rrorvacui> I mean each state.
<Kamuela> does every state have to have a test?
<h0rrorvacui> But a bare federal minimum
<Kamuela> a bare federal minimum...
cricri_ has joined #ruby
<h0rrorvacui> Yes, each state has to do so much in their testing. But like driver licenses they have their own testing in a sense.
JeanMertz has quit [Ping timeout: 272 seconds]
<Kamuela> step 1. identify a problem step 2. devise a law
graydot has quit [Quit: graydot]
jkhwan has quit [Remote host closed the connection]
Zeeo has joined #ruby
tylersmith has joined #ruby
lnormous has quit [Ping timeout: 265 seconds]
pragmatism has joined #ruby
jkhwan has joined #ruby
pragmatism has quit [Client Quit]
<jrobeson> Kamuela, as a programmer i think your'e speaking nonsense and being completely illogical
<jrobeson> lol
<Kamuela> i'll stop. i understand everyone's points
<Kamuela> jrobeson, which part was illogical?
wallerdev has quit [Quit: wallerdev]
<jrobeson> no sense in getting back into it after you just stopped .. it's not really topical
graydot has joined #ruby
<Kamuela> jrobeson, i'd like a chance to clear things up for you
<h0rrorvacui> I feel sorry for the non-Americans having to hear that tbh...
<h0rrorvacui> lol
dhruvasagar has joined #ruby
<jrobeson> Kamuela, you can't clear up nonsense you already said and are standing hard on
<jrobeson> nothing of value would be gained
<h0rrorvacui> oagnageal dkaljega ;leajkea
<Kamuela> h0rrorvacui, the United States government occupied Hawaii and stole it from our sovereign queen at gunpoint
<Kamuela> by joint resolution, Hawaii was annexed
<h0rrorvacui> I ment to say: that wasn't true.
<Kamuela> so I am not really an american after all
<jrobeson> that is true tho..
xcess_denied has joined #ruby
akonny has joined #ruby
<Zeeo> Good day gentlemen, I'm gonna need some help with this. I'm trying to join two words into a regular exp (using r =Regexp.union). Everything works fine, no problem with that but I wanna make this case insensitive, so I make it (r2 = Regexp.new(r, Regexp::IGNORECASE) and I get this warning:
<jrobeson> i mean.. we basically forced japan to open up the same way..
<Zeeo> warning: flags ignored
jkhwan_ has joined #ruby
<existensil> Kamuela: well, by that logic none of us are, except direct native american descendents
<Zeeo> what does it even mean and how do I get rid of this?
tharindu has quit [Quit: Leaving...]
<Kamuela> existensil, slippery slope fallacy
<existensil> the vast majority of the US was taken by force, or bought from someone who took it by force (Alaska and the Louisianna purchase)
<jrobeson> well.. same as every other conflict ever..
sandeepk has joined #ruby
<jrobeson> at least we gave some of it back
justsee has quit [Ping timeout: 272 seconds]
<Kamuela> i don't get it
<existensil> hahaha, for very small definitions of the word some
jkhwan has quit [Read error: Connection reset by peer]
<Kamuela> so wait, let me be clear
<Kamuela> the nonsense i have spoken, that everyone is completely clear that is nonsense
<Kamuela> is that if i have a gun and i want to rob you
tylersmith has quit [Ping timeout: 264 seconds]
<jrobeson> Zeeo, i've never used regex by calling it as a class.. i just use /someregex/i
<Kamuela> i should do it because none of you will be armed except h0rrorvacui
<Kamuela> ?
baldivia has quit [Remote host closed the connection]
zipper has quit [Remote host closed the connection]
<jrobeson> how about removing the need to rob people..
<Kamuela> EXACTLY!
zipper has joined #ruby
<sevenseacat> if you want to do that and end up in jail, sure
<Zeeo> jrobeson: I need to use it this way, I'm dumping an array in it
<Kamuela> jrobeson, that's a great point! and that's what i'm saying. when you create a law that says make guns harder to get, you aren't addressing the need to rob people. what you are addressing is the ability of law-abiding to have a deterrent to the problem of robbery
<h0rrorvacui> In kamuela's defense isn't targeting guns and declaring them the problem in a way a strawman argument?
<jrobeson> well.. i'd suggesting taclking both problems..
<jrobeson> and not a single one in a pretend vacuum
<Kamuela> h0rrorvacui, in england, they are running these ads http://www.youtube.com/watch?v=-_eGJmKMwJo
<Zeeo> jrobeson: and it's not always all the strings but sometimes one or another
<sevenseacat> this is such a bizarre conversation
<Kamuela> h0rrorvacui, so it's not just guns... don't take knives out of the kitchen! you heartless b***ards!
<sevenseacat> yes, because you get people going on massive killing sprees armed with knives
<jrobeson> just get renters/home owners insurance .. so if you get robbed.. wahtever
<Kamuela> jrobeson, what is the problem that gets addressed with stronger gun laws?
<jrobeson> just get new stuff
sesco has joined #ruby
bubbajones has quit [Ping timeout: 244 seconds]
<h0rrorvacui> sevenseacat: actually they do happen
<Kamuela> jrobeson, but if robbery rates went up, you'd pay more for rental insurance
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jrobeson> there's no evidence that that would happen
<Kamuela> ...
jbpros has joined #ruby
<jrobeson> unless you wanna seriously twist shit around
<Kamuela> that's how insurance works
fysaen has joined #ruby
<Kamuela> do you understand the insurance business model?
petey has quit [Remote host closed the connection]
<jrobeson> no.. no evidence about mroe robberies.. not the insurance rates
<Kamuela> ah
<sevenseacat> h0rrorvacui: oh they probably do but it would be a lot harder to do
bubbajones has joined #ruby
<jrobeson> nothing is gonna stop people who wanna kill people from killing people.. anything that focuses on that part is fooling you
<jrobeson> trying to fool you*
jbpros has quit [Client Quit]
<Kamuela> jrobeson, yes. in addition to that, i'm trying to argue the net positive of more firearms
<sevenseacat> guns create a false illusion of safety 'no-one will shoot me if i have a gun' yes they can, and you'll die just the same
<jrobeson> there is no net positive from firearms
<jrobeson> not a single one
<jrobeson> unless you hunt your own food
<jrobeson> i meant to say
<jrobeson> no net positive in a city* not a single one
sesco has quit [Write error: Broken pipe]
zipper has quit [Ping timeout: 260 seconds]
<jrobeson> for rural folks.. i understand
<Kamuela> jrobeson, guns are used in self defense more than they are used in crimes at about a 10:1 ratio every day
<Kamuela> jrobeson, so a gun law addresses the 10, and leaves the 1 alone
<sevenseacat> say what
<jrobeson> and thousdands of kids die a year from unnecessary gun deaths
<Kamuela> sevenseacat, in the United States
<sevenseacat> that doesnt make sense
zipper has joined #ruby
<shevy> jrobeson zombies need human flesh so they need guns
<jrobeson> so.. i'd rather have those kids alive
<shevy> in a city
<sevenseacat> self defense against what that isnt a crime?
<jrobeson> than somebody not to get robbed
timonv has joined #ruby
<jrobeson> it's ridiculous
<shevy> it's a wanted feature
<jrobeson> it's all about an illusion of safety like sevenseacat said
<Kamuela> jrobeson, it's not either-or. take a proposal, weight its benefit against its cost
<existensil> +1 on "illusion of safety"
<jrobeson> and the benefits don't match the costs
Spami has quit [Quit: This computer has gone to sleep]
<jrobeson> the costs are too high
brtdv has joined #ruby
<Kamuela> jrobeson, youd have to start with a proposal though. i'll be honest, i'm just assuming you're onboard with some stuff that you didn't actually say, that others said, earlier
<jrobeson> ah i didn' read it all
<bigkevmcd> Kabaka: do you have a link to your 10:1 statistic? I'm intrigued by those numbers...
<jrobeson> i just know that i don't want guns in my city
<jrobeson> btw.. i'm also american..
<Kamuela> that doesn't matter lol
<shevy> jrobeson where?
<jrobeson> any city i live in? :)
<shevy> I mean, geographically... western area... east... southern texas maniacs...
<jrobeson> but really.. i'm more interested in getting rid of handguns than anything ..
<h0rrorvacui> gunpolicy.org has all you need
<jrobeson> i grew up in virginia
Xeago has joined #ruby
rjhunter has joined #ruby
<jrobeson> but really.. i'm not interested in getting rid of all guns.. handguns would generate a great net win
<existensil> I'd draw the line at weapons that are purpose built for killing humans and don't have much utility beyond that. Handguns and assault weapons are generally ineffective hunting weapons and they clearly weren't designed for that.
<existensil> The irony is, for protecting your home your best bet is a shotgun, which i wholely support remaining legal
<jrobeson> and note.. i'm saying that as a person who was actually robbed with a handgun.. althoguh they idn't get what they wanted..
<existensil> they can't be concealed in public, and are very effective hunting tools, so i'm very pro shotgun
<Kamuela> hmm, those statistics tend to prove one thing conclusively
<h0rrorvacui> existensil: yes they can
<Kamuela> if someone's gonna die, in the united states, we don't f- around, we shoot em
<Kamuela> lol
<shevy> hmm via << we can merge two arrays, but then I have to apply .flatten on them. is there a way to just easily append one array to another?
dweeb_ has joined #ruby
<h0rrorvacui> I've seen illegal modifications to shotguns that made them more lethal and just about as easy to conceal as a pistol
<Kamuela> but overall violence and such is kinda comparable
<jrobeson> or uhmm.. poison them with depleted uranium ..
<Kamuela> jrobeson, can't help we're such a civilized nation :)
<existensil> h0rrorvacui: yes, and I *can* use a screwdriver to hammer a nail... clearly wasn't built for it though and its not particularly effective
<shevy> ah ... #concat
<h0rrorvacui> not to mention guns that are both a pistol but fire shotgun cartridges
noname001__ has joined #ruby
* jrobeson fires a shotgun in the room
<h0rrorvacui> shotguns are the most effective killing machine
<shevy> >> array1 = %w( a b c ); array2 = %w( e f g ); array1.concat(array2)
<eval-in> shevy => ["a", "b", "c", "e", "f", "g"] (https://eval.in/68453)
<existensil> h0rrorvacui: illegal, so if you are caught just even holding one you are likely headed to jail. that makes the risk of ownership high, which generally reduces said ownership
farmswort has joined #ruby
<h0rrorvacui> there is permit-able ownership
<shevy> h0rrorvacui cars are also rather solid weapons
tharindu has joined #ruby
kaspergrubbe has joined #ruby
<Kamuela> existensil, i wish i could ask you a question in isolation of everything else but then i guess the reason for asking you would be to try to prove something anyway so it would be pointless
<existensil> :-)
<h0rrorvacui> I agree shevy
<h0rrorvacui> The thing is, shotguns are more effective than pistols and rifles for killing.
<existensil> h0rrorvacui: that was the exact point i made... which is why it baffles me further that everyone seems to want a handgun in their home
<Kamuela> h0rrorvacui, yeah rifles are like a perimeter control thing
<shevy> really? (I am really asking, I have absolutely no idea)
<Kamuela> existensil, so your major concern is that people can sneak guns around, produce them at random, and cause problems/
sergicles has joined #ruby
<emocakes> is say we should equip everyone
<emocakes> kids going to school
<h0rrorvacui> lol
<emocakes> policemen, firemen
<existensil> Kamuela: my major concern is that the utility of the items I listed is outweighed by their danger
<emocakes> everyone
<h0rrorvacui> Nurses
<emocakes> when everyone has a gun
<emocakes> no one will want to pull out a gun on anyone
<emocakes> nurses, babysitters, old ladies
<emocakes> postmen
<Kamuela> it's not. i wish you could measure how many people are NOT killed as a result of guns
<Kamuela> the hardest part of economics is really conveying the hidden stuff, the unintended consequences
<Kamuela> it's always so easy to see the immediate effects but not the what-if effects of an alternate scenario
<Boohbah> /topic
* Kamuela sets topic "Ruby is still C"
<existensil> Kamuela: if there were severe risks to removing handguns and assault weapons, wouldn't the statistics bear that out in the many developed nations that have removed them?
<existensil> it seems the UK is doing just fine
pragmatism has joined #ruby
<jrobeson> does anybody hae an opinion on pusher or any other "realtime" event type service?
<Kamuela> existensil, well Godwin's law is coming in 3...2...1...
<jrobeson> NAZIES
<existensil> jrobeson: i've used pusher with good results
<jrobeson> err NAZIS
<h0rrorvacui> dito
<existensil> honestly, I wanted to build the real time notification system myself, but pusher saved a ton of time
<h0rrorvacui> pusher is nice
<Kamuela> yep, the nazis collected the guns before they started the mass killings
<Boohbah> existensil: that is because all of the freedom loving englishmen emigrated to the united states in the 18th century
<Kamuela> it was for a safer germany btw
<jrobeson> there's one built into rails.. buti t's broken .. although not to the fault of rails necessarily..
<existensil> lol
<Kamuela> not making that shit up, well known propaganda posters and such
<existensil> Boohbah: wasn't that long before the UK took guns away?
<existensil> :-P
<Kamuela> existensil, didn't violent crime and murders go up when the UK took guns away? not by guns, but in general?
<jrobeson> let's just take the guns away from insecure dudes.. that'll be a good start..
<existensil> Kamuela: the Nazis also liked Opera. maybe we should fear its rising popularity in Seattle?
<Kamuela> jrobeson, good in theory, but when you ask who to take guns away from, who comes up with the criteria?
<h0rrorvacui> Kamuela: Thats likely because it was now illegal to own a gun.
<existensil> Kamuela: absolutely not
<jrobeson> that's something that is acdtually provable.. right now.. go get the stats
sergicles has quit [Ping timeout: 264 seconds]
<h0rrorvacui> what do we need?
<jrobeson> i wish pusher supported server sent events
andikr has joined #ruby
<Kamuela> jrobeson, which part? i'll look em up. you mean the UK stuff?
<jrobeson> yes
<jrobeson> i've randomly heard multiple things about it.. but never cared enough to look up
heftig has joined #ruby
jkhwan_ has quit [Remote host closed the connection]
d45h has joined #ruby
<jrobeson> guns aren't my favorite political topic as i don't really expect much to come from anything
aganov has joined #ruby
<Kamuela> jrobeson, i'm trying to find raw statistics, while searching i find a lot of stuff supporting my assertion but they're news articles
jkhwan has joined #ruby
io_syl has joined #ruby
<jrobeson> it's not like it'd ever be possible to get rid of all the guns that are already here
jbpros has joined #ruby
<existensil> jrobeson: what do you mean? I can push events from my rails app pretty easily
<jrobeson> let's just go with the chris rock solution and charge tons of money for bullets..
<h0rrorvacui> I've found several sources saying there is no hard evidence or research conducted.
tvw has joined #ruby
<h0rrorvacui> That is on UK post gun ban laws
jkhwan has quit [Read error: Connection reset by peer]
<jrobeson> existensil, i meant the html5 "server sent events"
jkhwan has joined #ruby
<jrobeson> server sent events are a lot easier to deal with support wise.. only a simple polyfill is required
dhruvasagar has quit [Ping timeout: 252 seconds]
<jrobeson> and no firewall issues or anything else
<existensil> the massive drop in crime in the US over the past 20 years, even when the economy was doing bad and unemployment was high, has thrown a lot of the established research on what causes violent crime out the window
dhruvasagar has joined #ruby
<jrobeson> lots of talk about lead and things in there too
xorgnak___ has joined #ruby
<xorgnak___> I'm using a simple bot to compile traffic from a few freenode channels
<jrobeson> so. pusher users.. what does a connection really mean?
<existensil> no one has come up with very compelling reasons to explain it. obviously there are many reasons involved but the significance of each is still pretty unknown
xorgnak___ has quit [Remote host closed the connection]
<Kamuela> where the hell are the statistics? i'm googlin' and finding it difficult
<shevy> :-)
<existensil> which ones?
<Kamuela> existensil, i'm honestly looking for anything, true violent crime rates
<Kamuela> existensil, i am trying to look at UK violent crime over time, UK property crime over time
<h0rrorvacui> gunpolicy.org has a lot of statistics on that matter
<Kamuela> existensil, i'd expect that all other things being equal, property and violent crime would rise after a gun ban
<shevy> Kamuela write a data miner in ruby ;)
<h0rrorvacui> Do a search for UK post gun ban
<Kamuela> h0rrorvacui, yeah but gunpolicy is about guns
<existensil> Kamuela: its going to be tough, because the UK has been ratcheting up gun laws since 1903: http://en.wikipedia.org/wiki/Gun_politics_in_the_United_Kingdom#Pistols_Act_1903
<jrobeson> so.. i have a usb dongle thing.. that currently submits to my ruby based app via http.. 1 or every "event" . i also have events happening on the app itself for starting the game, stopping it, etc..
<h0rrorvacui> Yeah but it compiles information about the relations of crimes with guns
<existensil> so its going to be tough to find a before/after event to examine statistics against
<h0rrorvacui> and those without
<jrobeson> s/or/on/
<existensil> but, it does have one of the lowest gun death rates in the world
<jrobeson> oh.. webhooks.. i think that's what i'm looking for.. they seem to have it
jhaals has joined #ruby
<jrobeson> i have found some other interesting stuff in my research.. some that even let you upload js or lua scripts to do a little processing on the provider hosted side
<existensil> like most big political issues, as much as we want it to be simple, the reality is very complicated
joshwines_ has quit [Ping timeout: 268 seconds]
<jrobeson> but existensil THEY ARE TAKING OUR FREEDOMS
<jrobeson> LOL
ezkl has joined #ruby
yfeldblum has quit [Ping timeout: 260 seconds]
einarj has joined #ruby
<jrobeson> ok.. pusher users.. what is your response times tend to be? what is "real time"
mrsolo has joined #ruby
<existensil> in general you will be hard pressed to find a country on the very low end of the homicide rate that has really relaxed gun regulation... but the factors for their homicide rate are way more complicated than gun laws so that alone only explains a small part
TigerWolf has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
alup has joined #ruby
<h0rrorvacui> existensil: I'm actually seem a disconnect with guns and crime. It just doesn't help that guns are more effective at killing.
<h0rrorvacui> seeing*
joshwines_ has joined #ruby
<Kamuela> i gotta go to sleep guys, good points from everybody
<Kamuela> shevy, i learn more ruby tomorrow :)
aapzak has quit [Read error: Connection reset by peer]
iliketurtles has joined #ruby
<h0rrorvacui> I think handguns are the big problem.
<h0rrorvacui> Just do away with handguns.
<existensil> h0rrorvacui: i think in general you're right. it does appear that guns has a very very weak correlation with violence.
<existensil> but, really, all the factors do
<h0rrorvacui> I think we have a broken culture.
<h0rrorvacui> I blame hollywood.
<h0rrorvacui> :P
<existensil> clearly there is some influence from things like income, unemployment, population density, etc, but you will find giant exceptions to any of them
<h0rrorvacui> Guns are not cool.
<existensil> lol, yeah Hollywood has clearly gone out of their way to make guns *uncool* :-P
<h0rrorvacui> We should do an anti-drug style campaign against guns.
RichardBaker has quit [Quit: RichardBaker]
Kamuela has quit [Quit: Leaving]
<jrobeson> hmm.. i don't really think that'll help or be worth it
<jrobeson> plenty of people enjoy movies or games that happen to have guns in them.
<jrobeson> but they still don't ever get a real gun.. or kill real people
<h0rrorvacui> The problem is guns allow you to separate yourself from the act of killing. It allows you to dehumanize the "target"
<existensil> for the most part i think guns in the USA are used as a wedge issue to get people to vote a certain way. In the end they matter very little. you should be voting based on education, support for scientific research, investment in infrastructure, economic policies, etc... guns are more than anything a giant distraction
xorgnak___ has joined #ruby
<xorgnak___> I'm using a simple bot to compile traffic from a few freenode channels. If you'd like to try it, download my gist at https://gist.github.com/xorgnak/7481117
<jrobeson> existensil, i agree .. that's why i mostly ignore it..
<jrobeson> xorgnak___, is that what the ACK stuff earlier was about?
<h0rrorvacui> thats a good point
xorgnak has joined #ruby
<h0rrorvacui> However, its not something that can be done with the seemingly endless spree killings going on in the US.
<xorgnak> jrobeson: glad you asked.
jkhwan has quit [Remote host closed the connection]
<existensil> if you vote based on issues like that you have very likely been duped into voting against your own self interest
<jrobeson> so freakin true..
drumusician has joined #ruby
aapzak has joined #ruby
jkhwan has joined #ruby
<xorgnak> jrobeson: wrote a little bot for ii, and I forgot to change my channels back from testing.
<xorgnak> check it out if you like
<jrobeson> h0rrorvacui, a lot of people have been blaming the media for those killings due to making it seem like a way to get a national airing of your grievances
michael_mbp is now known as zz_michael_mbp
<jrobeson> and that the real fix for that.. is stop focusing so much on it.. it's still important news.. just stop sharing their manifestos.. and showing all the sad families over and over and over
<existensil> i think its also worth noting, that even with the recent spat of shootings included, our violent crime rate is near the lowest its been in 30+ years
<jrobeson> yep..
rippa has quit [Read error: Connection reset by peer]
<h0rrorvacui> Also, apparently spree killings are not really up according to some.
<h0rrorvacui> They are just favored by the media.
<h0rrorvacui> For coverage.
<existensil> the shooting sprees are just given an undue amount of attention in the media. the actual danger is incredibly small and for the most part these shootings have always happened, they are just getting more attention.
<sevenseacat> that i would believe
visof has quit [Quit: leaving]
<existensil> motherjones did a giant compilation of mass shooting events
sandeepk has quit [Quit: Leaving...]
<h0rrorvacui> Has anyone watched cpgrey's youtube videos?
<existensil> appears to show that they are not, in fact, increasing
<jrobeson> it's just hard to know what to cover these days for those lazy bastards
<jrobeson> when some huge natural disaster isn't happening
<existensil> if it doesn't make it onto arstechnica or hacker news, i probably won't see it
<h0rrorvacui> Has anyone noticed the mistakes in coverage seem more abundant in media?
heftig has quit [Quit: Quitting]
<existensil> i know that means i'm living in a bubble/echo-chamber, but its easier that way :-P
<h0rrorvacui> Than they used to be.
<jrobeson> i'm not so sure if tha'ts true or not.. it might be the same thing as we were just saying about the mass shootings
<jrobeson> you just never heard
<existensil> h0rrorvacui: yes. for good reason too... scaled back budgets trying to fuel a 24hr news cycle
<h0rrorvacui> I think it is true, I just believe its because they are tying into social media for their reporting.
<jrobeson> but it is funny to watch jon stewart skewering them
jkhwan has quit [Ping timeout: 272 seconds]
aagdbl has joined #ruby
<existensil> the replacement of investigative journalism with punditry
<existensil> also factors in
mrfoto has joined #ruby
<existensil> its cheaper and gets better ratings, so can't really blame the media exactly
tesuji has joined #ruby
<h0rrorvacui> I think we could get more done if we had another big political party in the mix.
<existensil> there is no question though that many major sources of investigative journalism (newspapers) have been scaled back massively in recent years
fluffheadsr has joined #ruby
<existensil> that business model is undergoing severe disruption. it will probably get better when things stabilize a bit some day.
fluffheadsr is now known as Guest25635
<existensil> h0rrorvacui: i think getting money out of politics would have a much bigger impact than getting another party in
<existensil> though i would like to see both
dnyy has quit []
myappleguy has joined #ruby
<h0rrorvacui> I was looking at district lines etc in my state. It seems they are gerrymandering a good bit here.
mikepack has joined #ruby
frankforest has joined #ruby
xorgnak___ has quit [Remote host closed the connection]
xorgnak___ has joined #ruby
<xorgnak___> I'm using a simple bot to compile traffic from a few freenode channels. If you'd like to try it, download my gist at https://gist.github.com/xorgnak/7481117
<existensil> it happens almost anywhere where one party has firm control over a state legislature. definitely happens a bit more often in republican controlled states, though.
<h0rrorvacui> The "black belt" is broken up into a bunch of districts seemingly to dilute the their democratic vote. I wonder why we don't just do away with electoral college.
<poutine> xorgnak, that violates freenode AUP
<existensil> h0rrorvacui: inertia
xorgnak___ has quit [Remote host closed the connection]
lkba has quit [Read error: Connection reset by peer]
lkba has joined #ruby
marr has joined #ruby
nism-pi1 has joined #ruby
xorgnak___ has joined #ruby
dEPy has joined #ruby
<xorgnak___> I'm using a simple bot to compile traffic from a few freenode channels. If you'd like to try it, download my gist at https://gist.github.com/xorgnak/7481117
xk_id has joined #ruby
<jrobeson> poutine, it does?
* existensil kicks xorgnak___
frankforest has quit [Quit: frankforest]
<poutine> * - We would like to remind you that unauthorised public logging
<poutine> * - of channels on the network is prohibited.
<poutine> in /motd
daxroc has joined #ruby
<jrobeson> what's unathorized? and why who? the channel owner?
<poutine> you committed a stage A5 Freenode Felony
<jrobeson> xorgnak, but this this particular channel.. read the topic "other public logging is prohibited"
<sevenseacat> you're screwed now
<jrobeson> lol poutine
<xorgnak> damn. no lube or anything? shucks?
beardedninja has joined #ruby
<jrobeson> i could use some poutin tho ..
Hanmac has quit [Ping timeout: 260 seconds]
nism-pi1 has quit [Client Quit]
<jrobeson> poutine is delicious
Hanmac has joined #ruby
<jrobeson> sevenseacat, ever had it?
<poutine> you know you like poutine's hot cheesy wad sloshing around in your mouth
myappleguy has quit [Ping timeout: 264 seconds]
<xorgnak> geez guys. I'm just trying to put the news up on an old monitor at the shop. You'd think I stole someone's grammy or something.
<jrobeson> uhmm..
mikepack has quit [Ping timeout: 246 seconds]
<jrobeson> xorgnak, i'm not mad at you.. just pointing out the topic
<poutine> oops forgot the indefinite article there
<sevenseacat> jrobeson: no
<sevenseacat> its a canadian thing isnt it
<jrobeson> sevenseacat, well if you like things that are cheesy and fried.. you'd probably like it
<sevenseacat> i sure do
<sevenseacat> cheese is one of my favorite food groups
<jrobeson> i think it is canadian.. it certainly seems most popular in the montrealish area
xk_id has quit [Client Quit]
<xorgnak> what can I say? the idea of an irc client that you can only watch has a certain appeal to me.
olivier_bK has joined #ruby
daxroc has quit [Client Quit]
<existensil> that's basically how i use twitter
daxroc has joined #ruby
<h0rrorvacui> same
mephux has quit [Ping timeout: 272 seconds]
<jrobeson> it's becoming popular in the US too though
<existensil> even had a read only client i was using for a while
<xorgnak> me too. but irc's just so much better.
<poutine> I am not trying to be off-topic here, but every time I see a grown man consuming dairy products, I have to wonder how he's able to live his life knowing he will forever be unable to please a woman sexually
<jrobeson> sevenseacat, in canada, you'd probably put gracy on it ..
zipper has quit [Remote host closed the connection]
teoric has joined #ruby
<jrobeson> uhmm?
<existensil> lol poutine ... wat?
nvrch has joined #ruby
<xorgnak> dirty.
<jrobeson> how does that make any sense?
<h0rrorvacui> what?
zipper has joined #ruby
<sevenseacat> lol
<sevenseacat> i dont get it, but its funny
<h0rrorvacui> I guess I'll have to eat my cheerios without milk.
* sevenseacat continues eating cheese
mephux has joined #ruby
Hanmac1 has joined #ruby
ahawkins has joined #ruby
<xorgnak> sevenseacat: no pleasing women for you.
<sevenseacat> im fine with that.
parduse has quit [Ping timeout: 264 seconds]
iliketurtles has quit [Quit: zzzzz…..]
dodosan has joined #ruby
huttan has joined #ruby
OdNairy has joined #ruby
h0rrorvacui has quit [Quit: ZQ]
mrsolo has quit [Quit: This computer has gone to sleep]
xcess_denied is now known as xcess_denied|awa
Hanmac has quit [Ping timeout: 272 seconds]
<jrobeson> lol
parduse has joined #ruby
<tobiasvl> 20 minutes left till chess
workmad3 has joined #ruby
<jrobeson> xorgnak, might wanna remember that not everybody here is a) into women b) is a guy
<sevenseacat> ;)
<xorgnak> who's business is it of mine who spends time with whom?
<jrobeson> you're right about that :)
<jrobeson> it just came out funny to me
<jrobeson> sevenseacat.. i meant gravy up there.. GRAVY on your poutine
<sevenseacat> even more unhealthy and tasty.
<sevenseacat> excellent.
<jrobeson> australians have gravy right? :)
<jrobeson> hah
joshwines_ has quit [Ping timeout: 246 seconds]
nisstyre has joined #ruby
timonv has quit [Remote host closed the connection]
huttan has quit [Ping timeout: 272 seconds]
Banistergalaxy has quit [Ping timeout: 272 seconds]
<rjhunter> Australians do have gravy -- in Melbourne, you can even get poutine (from "Lord of the Fries")
blackmesa has joined #ruby
timonv has joined #ruby
<jrobeson> rjhunter, how about in perth?
* sevenseacat makes note about next trip to melbourne
<sevenseacat> we dont have lord of the fries over here
thejoecarroll has quit [Quit: ZNC - http://znc.in]
<xorgnak> it's funny that I was asked about the ACK stuff. this little bot in a previous life was the heart of a little project that used irc in the back for communication. ii needs something in it's fifo in order to receive traffic from the channel. so you can use the opprtunity to send a 'hello' message to the channel to let everyone know you're there. I used it to trigger a callback. worked pretty well. standard bot stuff, but handy.
<xorgnak> food for thought.
<rjhunter> i've not had Real Canadian Poutine but it's pretty hard to get a bad result out of chips + gravy + cheese
pyx has joined #ruby
pyx has quit [Client Quit]
<jrobeson> i suppose not
maasha has joined #ruby
<xorgnak> I haven't had a poutine since I was in Windsor a decade ago
<maasha> morning all
<xorgnak> greetings.
<existensil> given the ingredients I am quite certain I would love poutine
<xorgnak> replace the gravy with bacon and I'm all for it.
<jrobeson> or just add bacon..
<existensil> replace the cheese with bacon... and then put the cheese back in there
<existensil> mmm
<maasha> .oO(wtf?)
<xorgnak> you could, but doesn't it just take up room that should be used for more bacon?
<jrobeson> maasha, we were talking about poutine and how people who've never had it might like it
<rjhunter> tonight on #ruby, gun control and canadian snacks
<jrobeson> MMM snacks
drumusician has quit [Ping timeout: 264 seconds]
decoponio has joined #ruby
<xorgnak> and the freenode penal code
<jrobeson> the freenode cops are coming to get you
<xorgnak> I hear they have black helicopters
Advocation has joined #ruby
<zipper> Uh how can I undo a rails generate scaffold?
<existensil> git clean
<rjhunter> zipper: git reset
<existensil> :-)
timonv has quit [Ping timeout: 264 seconds]
<xorgnak> zipper: rm -fRvv /your/rails/directory; then go cry in a corner.
<maasha> I think I will check in later to see if the situation has improved :o/
<rjhunter> zipper: seriously though, lean on your version control system. that's what it's there for.
<shevy> cvs
<xorgnak> rjhunter: true story.
teoric has quit [Quit: WeeChat 0.4.1]
<xorgnak> shevy: git
dodosan has quit [Remote host closed the connection]
<shevy> what! insult!
<shevy> :(
<rjhunter> zipper: manually figuring out exactly what changed and *hopefully* getting all of it exactly right... not worth it
<mrfoto> zipper: there is a destroy
<zipper> rails destroy scaffold
<zipper> I was told so
<mrfoto> instead of g or generate use destroy with the same parameters
<mrfoto> should work in most of the cases
<zipper> It did
<mrfoto> also for this questions go to #rubyonrails
<xorgnak> zipper: good work
Advocation has quit [Ping timeout: 265 seconds]
jbw has quit [Ping timeout: 272 seconds]
TMM has joined #ruby
Guest25635 is now known as bassclef
<sevenseacat> he cross-posted it there too :P
Es0teric has quit [Quit: Computer has gone to sleep.]
kaspergrubbe has quit [Ping timeout: 260 seconds]
<xorgnak> sevenseacat: smart
<xorgnak> sevenseacat: effective use of recources
Apane has quit [Ping timeout: 272 seconds]
<rjhunter> were the responses any more useful?
pragmatism has quit [Quit: Leaving...]
pragmatism has joined #ruby
sevenseacat has quit [Quit: Leaving.]
Clooth has joined #ruby
shaunbaker has joined #ruby
drumusician has joined #ruby
dweeb_ has quit [Quit: Computer has gone to sleep.]
blackmesa has quit [Ping timeout: 240 seconds]
sandeepk has joined #ruby
Al_ has joined #ruby
shaunbaker has quit [Remote host closed the connection]
shaunbaker has joined #ruby
jbw has joined #ruby
pragmatism has quit [Quit: Leaving...]
<shevy> only those who dare go to #rubyonrails may know the answer!
xorgnak___ has quit [Remote host closed the connection]
<shevy> define_method(key.to_sym) {|i = ''|
<shevy> I feel dirty dynamically generating methods that way :(
tkuchiki has quit [Remote host closed the connection]
xorgnak___ has joined #ruby
<xorgnak___> I'm using a simple bot to compile traffic from a few freenode channels. If you'd like to try it, download my gist at https://gist.github.com/xorgnak/7481117
<existensil> your bot should be less chatty
<xorgnak> it's friendly
jbw has quit [Read error: Operation timed out]
jbw has joined #ruby
timonv has joined #ruby
kaspergrubbe has joined #ruby
<xorgnak> oh dynamic method creation!
<shevy> lol
shaunbaker has quit [Ping timeout: 272 seconds]
<shevy> omg
<shevy> in bash
<shevy> I hate you xorgnak
<xorgnak> metaprogramming how I love the
<xorgnak> I did one in ruby too, but I rebuilt it better in ruby.
<xorgnak> go figure
camilasan has quit [Remote host closed the connection]
<xorgnak> fan-freakin-tastic at what it does
camilasan has joined #ruby
nisstyre has quit [Quit: Leaving]
blackmesa has joined #ruby
<shevy> he must be on LSD or something
<xorgnak> nicotine and caffine
<xorgnak> but I do have a 256 color terminal, so I am seeing pretty colors. sortof.
rdark has joined #ruby
<existensil> gnome-terminal ftw!
<xorgnak> xterm-256colors
<existensil> found out GTK3 is styled via CSS, so now me and gnome-terminal get along much much better
<xorgnak> that's good to know
<existensil> it always looked like crap with a thick border whenever i used tabs... but now it looks just how i want :-)
<xorgnak> I'm still fascinated by .Xresources
Lewix has quit [Remote host closed the connection]
<existensil> not sure what that is
<xorgnak> it's how colors are set in command line land
camilasan has quit [Ping timeout: 272 seconds]
popl has joined #ruby
popl has joined #ruby
popl has quit [Changing host]
nari has quit [Ping timeout: 245 seconds]
tkuchiki has joined #ruby
hogeo has quit [Remote host closed the connection]
jlebrech has joined #ruby
<xorgnak> dwm is about as heavyweight as I get on my own machines, and clients get standard ubuntu desktops from us so I do most everything by config file.
<shevy> existensil, can you style in a custom way with CSS now?
<shevy> I mean in gnome
karupanerura is now known as zz_karupanerura
<xorgnak> anything gtk3 I guess
<xorgnak> which is pretty cool
dweeb_ has joined #ruby
lkba has quit [Ping timeout: 272 seconds]
amritanshu_RnD has quit [Quit: Leaving]
JimmyNeutron has quit [Ping timeout: 277 seconds]
<existensil> shevy: yeah, i can gist my .config/gtk-3.0/gtk.css ... looks like this right now: http://imgur.com/OaFqH25
<xorgnak> gists are pretty cool
shaunbak_ has joined #ruby
s3itz has joined #ruby
holderbaum has joined #ruby
hiall has joined #ruby
jibi has joined #ruby
atno has quit [Ping timeout: 264 seconds]
tkuchiki has quit [Ping timeout: 268 seconds]
jibi has quit [Read error: Connection reset by peer]
mikepack has joined #ruby
tesuji has quit [Read error: Connection reset by peer]
jibi has joined #ruby
zarubin has joined #ruby
mikepack has quit [Ping timeout: 272 seconds]
aagdbl has quit [Quit: This computer has gone to sleep]
heftig has joined #ruby
hiall has quit [Quit: hiall]
aagdbl has joined #ruby
Guest80281 has joined #ruby
sergicles has joined #ruby
dhruvasagar has quit [Ping timeout: 272 seconds]
dhruvasagar has joined #ruby
ghr has joined #ruby
mikecmpbll has joined #ruby
petey has joined #ruby
<maasha> I have been speculating on how to emulate piped streams inside a Ruby script: cat file | cut | grep | sort > new_flie
shredding has joined #ruby
<maasha> But in a way that only one record of data is loaded into memory at any one time.
<xorgnak> any ideas?
<maasha> I was thinking chainable methods cat.cut.grep.sort.puts, but also a class of methods that could be called one at a time.
Advocation has joined #ruby
Zeeo has quit [Ping timeout: 260 seconds]
Guest23283 has quit [Remote host closed the connection]
<shevy> orc.hates.peas
<shevy> maasha you can always parse it on your own and keep snapshots between data passed between these different programs
<Hanmac1> maasha: something like? i didnt add the cut part, because i dont know that you want with it File.open(new_file,"w") {|f| File.forach(file).lazy.select{"greppart"}.to_a.sort.each {|l| f << l}}
<shevy> and > is just "save file"
petey has quit [Ping timeout: 260 seconds]
jbw has quit [Ping timeout: 252 seconds]
<xorgnak> how about a module which implements the self.methods and standardizes the outputs to match the inputs?
Hanmac1 is now known as Hanmac
dhruvasagar has quit [Ping timeout: 252 seconds]
<xorgnak> then instantiate a class to act on a file
Advocation has quit [Ping timeout: 260 seconds]
timonv has quit [Remote host closed the connection]
<xorgnak> so you'd have something like @obj = Class.new filename
<xorgnak> @obj.method.method.method
<maasha> shevy: Hanmac: here is a concept mockup: https://gist.github.com/maasha/a0704352ebd3f38ac52d
<xorgnak> then display @obj.display to read
Rollabunna has joined #ruby
<Hanmac> maasha: i would add this stuff as methods directly or method_missing
<shevy> maasha also add the input string :)
sergicles has quit [Quit: sergicles]
<shevy> method_missing can lead to complicated code
<Hanmac> imo this Pipe class would be very fun
<maasha> So first I would like to compile a pipeline, and then at run its should start iterating, but I am unsure how to get it to process the pipeline without loading all of the input into memory at once.
allsystemsarego has joined #ruby
allsystemsarego has joined #ruby
allsystemsarego has quit [Changing host]
<maasha> bleh and s/b/p/
<shevy> yes
<xorgnak> .gsub
<shevy> why not process commandlet by commandlet one after the other?
<maasha> Hanmac: very good! I need some ideas on how to get it going! :o)
<shevy> and you could always store transition states somewhere
<maasha> Hanmac: I fear one will have to construct some clever enumerator - and maybe even have to mess with fibers and other low level stuff.
zipper has quit [Read error: Operation timed out]
<maasha> shevy: because I would like to setup the pipeline first. Then it can be tested for syntax and typos and missing arguments. And when that is ok, execute the pipeline.
<maasha> shevy: it would work phantastic in irb!
<Hanmac> maasha: i would like to chain it like that: Pipe.new.cat(input: "table.txt").cut(field: 2).grep(pattern: "foo").sort.puts("result.txt").run
zipper has joined #ruby
dodosan has joined #ruby
sergicles has joined #ruby
<maasha> Hanmac: I also considered this. I think both should be tested.
kitak_ has quit [Ping timeout: 246 seconds]
camilasan has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
jbw has joined #ruby
<maasha> Hanmac: and I still favor Pipe.new.command(:cat, input: "table.txt").command(:cut, field: 2). etc ...:o)
dodosan has quit [Ping timeout: 246 seconds]
zipper has quit [Ping timeout: 260 seconds]
sergicles has quit [Ping timeout: 260 seconds]
nomenkun has joined #ruby
ua has joined #ruby
Rollabunna has quit [Remote host closed the connection]
amacgregor has joined #ruby
Rollabunna has joined #ruby
amacgregor_ has quit [Ping timeout: 246 seconds]
zipper has joined #ruby
jbw has quit [Ping timeout: 264 seconds]
sergicles has joined #ruby
emocakes has quit [Quit: Linkinus - http://linkinus.com]
zeeraw has joined #ruby
dhruvasagar has joined #ruby
Rollabunna has quit [Read error: Connection reset by peer]
timonv has joined #ruby
myappleguy has joined #ruby
Rollabunna has joined #ruby
tvw has quit [Read error: Connection reset by peer]
tvw has joined #ruby
<maasha> Hanmac: in fact, I think it would be possible to run such a pipe both method by method or using chained methods.
sergicles has quit [Ping timeout: 260 seconds]
zipper has quit [Ping timeout: 244 seconds]
ezkl has quit [Quit: QUIT!]
zipper has joined #ruby
h_kon has quit [Remote host closed the connection]
eka has joined #ruby
h_kon has joined #ruby
hogeo has joined #ruby
myappleguy has quit [Ping timeout: 272 seconds]
Rollabunna has quit [Ping timeout: 264 seconds]
jbw has joined #ruby
h_kon has quit [Ping timeout: 265 seconds]
keanehsiao has joined #ruby
<keanehsiao> hi
huttan has joined #ruby
<keanehsiao> I would like to ask, I am outputting text like " \u6797\u66f8\u8c6a" it should display "林書豪", however, it keep as "\u6797\u66f8\u8c6a"
hogeo has quit [Remote host closed the connection]
linduxed has quit [Read error: Connection reset by peer]
h_kon has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
Danielss89 has joined #ruby
mikepack has joined #ruby
huttan has quit [Ping timeout: 260 seconds]
<Hanmac> keanehsiao: works for me ;P what is your ruby version?
<s3itz> keanehsiao: you sure you aren't forcing single quotation somewhere?
<Danielss89> Hey, i'm having trouble with gem on osx mavericks.. i'm trying to install localtunnel, but i get this error: http://pastebin.com/zCmASfvL
<keanehsiao> Hanmac: hi, it works for me in irb too, but not erb
<keanehsiao> s3itz: no, pretty sure
zoee has quit [Quit: This computer has gone to sleep]
nfk has joined #ruby
<keanehsiao> Hanmac: I actually render like <%=text%>
<Hanmac> hm yeah and how do you set "text"?
mikepack has quit [Ping timeout: 268 seconds]
joshwines has quit [Ping timeout: 259 seconds]
<keanehsiao> just grab from db. nothing special… actually, these text works if I do it via ajax. there another 95% same page I called via ajax.. and that works..
joshwines has joined #ruby
<keanehsiao> it's really weird..
hogeo has joined #ruby
zipper has quit [Ping timeout: 272 seconds]
<Hanmac> keanehsiao: maybe the db did something wrong ... did you use rails?
zipper has joined #ruby
<keanehsiao> Hanmac: no I use rack with erubis. I think it has nothing wrong with db.. since another page go through same code and works fine, the only difference is it called via ajax..
Thanatermesis has joined #ruby
ckinni has joined #ruby
hiall has joined #ruby
hello_world has joined #ruby
hogeo has quit [Remote host closed the connection]
OdNairy has quit [Ping timeout: 264 seconds]
ckinni has quit [Client Quit]
Xeago has quit [Remote host closed the connection]
Tuxist has joined #ruby
parduse has quit []
shredding has quit [Quit: shredding]
kaspergrubbe has joined #ruby
mengu has quit [Remote host closed the connection]
OdNairy has joined #ruby
zipper has quit [Ping timeout: 252 seconds]
parduse has joined #ruby
pranny has quit [Quit: Leaving.]
coderhs has joined #ruby
DouweM has joined #ruby
shredding has joined #ruby
seich- has quit [Ping timeout: 240 seconds]
m8 has joined #ruby
lkba has joined #ruby
intuxicated has joined #ruby
sandeepk has quit [Quit: Leaving...]
jb41 has joined #ruby
zarubin has quit [Ping timeout: 265 seconds]
sandeepk has joined #ruby
jonfer has joined #ruby
jonfer has left #ruby [#ruby]
mengu has joined #ruby
atmosx has joined #ruby
tesuji has joined #ruby
OdNairy_ has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
OdNairy has quit [Ping timeout: 253 seconds]
Deele has joined #ruby
hogeo has joined #ruby
hogeo has quit [Remote host closed the connection]
phansch has joined #ruby
platypine has joined #ruby
platypine has joined #ruby
platypine has quit [Changing host]
vlad_starkov has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
hogeo has joined #ruby
tesuji has quit [Read error: Connection reset by peer]
samuel02 has joined #ruby
tesuji has joined #ruby
<Danielss89> Hey, i'm having trouble with gem on osx mavericks.. i'm trying to install localtunnel, but i get this error: http://pastebin.com/zCmASfvL
platypine has quit [Ping timeout: 264 seconds]
hiall has quit [Read error: Operation timed out]
<Hanmac> Danielss89: i think your ssl is broken, how did you install ruby?
hiall has joined #ruby
<Danielss89> with brew
<Danielss89> Hanmac: i tried 'brew reinstall openssl' too
<havenwood> Danielss89: looks like from your path you're using rvm ruby
<Hanmac> i installed my stuff with ports and then used rvm to install ruby ... i dont have problems like that
Xeago has joined #ruby
<Danielss89> hmm, i dont know what rvm is -.-
hogeo has quit [Remote host closed the connection]
<havenwood> Danielss89: rvm pkg install openssl
timonv has quit [Remote host closed the connection]
sevenseacat has joined #ruby
kaspergrubbe has joined #ruby
<Hanmac> "osx mavericks" is one of the shittiest updates i have ever seen ... from system-update its much more worse than vista
<havenwood> Danielss89: So i guess first pick if you want to keep using RVM. If you do ^ and reinstall Ruby. If you don't, uninstall RVM: rvm implode
bubu\a has joined #ruby
<bubu\a> yo, am doing something stupid here but can't see wood for trees right now: https://gist.github.com/joshmyers/bf27be39ca84879cc6dc
<havenwood> Danielss89: Just to confirm, it explodes if you open `irb` and type: require 'openssl'
mephux has quit [Quit: w0ots...]
zipper has joined #ruby
<Danielss89> havenwood: yeah it does
mephux has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
<Danielss89> trying reinstall now
<workmad3> Danielss89: had you done a mavericks upgrade install, or a clean install?
<havenwood> i like mavericks, power lasts longer
<Danielss89> workmad3: upgrade
<workmad3> Danielss89: was ruby installed before the upgrade?
<Danielss89> workmad3: i dont remember
<workmad3> hehe :)
Mars has joined #ruby
<Danielss89> oh wait, no, it was a clean install
<workmad3> hmm, ok
<Danielss89> cause mavericks crashed so i lost everything -.-
<workmad3> ouch
Mars is now known as Guest57248
claymore has joined #ruby
<Danielss89> i used boxen though, so it might have fucked something up
<havenwood> takes surprisingly long to setup dev environment
<workmad3> I don't trust upgrade installs for oses :)
sergicles has joined #ruby
blackmesa has joined #ruby
<workmad3> havenwood: I'm gonna be testing that when I have a bit of free time to reinstall my mbp
Guest80281 has quit [Quit: Textual IRC Client: www.textualapp.com]
<s3itz> xcode-select --install was pretty sweet, xcode is becoming huge
kaspergrubbe has joined #ruby
Xeago has quit [Ping timeout: 245 seconds]
<workmad3> havenwood: I'm anticipating a not massive amount of time with the use of homebrew and brew-cask :)
<Hanmac> what i hate on osx: each time you open a program it might popup a "there is a new version" message, but osx is not insteligent enough to make a central service for that
aagdbl0 has joined #ruby
<s3itz> afterwards, brew was quick and painless
<s3itz> Hanmac: that's for apps that aren't on the store
<s3itz> and that's because the developers chose to use that system
zoee has joined #ruby
<shevy> how big is xcode?
timonv has joined #ruby
<shevy> on linux gcc + assorted tools are quite large too
<s3itz> ~1GB
<shevy> wow
aagdbl has quit [Ping timeout: 272 seconds]
<s3itz> where as just install the tools for terminal use is about 1/5th
mojjojo has joined #ruby
ravster has joined #ruby
Guest57248 has quit [Ping timeout: 240 seconds]
krz has quit [Ping timeout: 272 seconds]
<s3itz> correction, 5.0.2 is 2.0GB~
dhruvasa1ar has joined #ruby
<s3itz> cmdline tools is barely 100MB
<s3itz> lol
<shevy> cool
<shevy> slackware .iso file is about 2.5 gigs
<shevy> expands to around 7.5 gig on hdinstall
jrhe has joined #ruby
<Hanmac> shevy: it rows if you add Water ;P
hogeo has joined #ruby
dhruvasagar has quit [Ping timeout: 260 seconds]
anderson has joined #ruby
includex has joined #ruby
xk_id has joined #ruby
vlad_starkov has joined #ruby
apeiros has joined #ruby
mikepack has joined #ruby
Dave has joined #ruby
dgellow has joined #ruby
Dave is now known as Guest85781
nateberkopec has joined #ruby
hamakn_ has quit [Remote host closed the connection]
hamakn has joined #ruby
JJMalina has joined #ruby
obs has joined #ruby
nateberkopec has quit [Read error: Connection reset by peer]
seich- has joined #ruby
dangerousdave has quit [Ping timeout: 252 seconds]
krz has joined #ruby
mikepack has quit [Ping timeout: 260 seconds]
Xeago has joined #ruby
mojjojo has quit [Quit: mojjojo]
atno has joined #ruby
Guest2496 is now known as denysonique
hamakn has quit [Ping timeout: 260 seconds]
carif has joined #ruby
mojjojo has joined #ruby
nomenkun has quit [Quit: Leaving...]
coldmethod has quit [Ping timeout: 244 seconds]
tharindu has quit [Quit: Linkinus - http://linkinus.com]
<maasha> I put the Ruby Pipe question on stack overflow to see what solutions may be suggested: http://stackoverflow.com/questions/19999888/how-to-create-a-memory-efficient-ruby-pipe-class
coldmethod has joined #ruby
inad922 has joined #ruby
<inad922> hello
carif has quit [Ping timeout: 265 seconds]
tharindu has joined #ruby
danshultz has joined #ruby
<shevy> inad922 hi. do you use ruby?
Guest39676 has joined #ruby
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
dgellow has left #ruby [#ruby]
krz has quit [Quit: krz]
petey has joined #ruby
varfoo has quit [Quit: WeeChat 0.4.0]
dhruvasa1ar has quit [Ping timeout: 272 seconds]
alekst has joined #ruby
ckinni has joined #ruby
Desert_eagle has joined #ruby
<Hanmac> maasha: look at File.foreach("path").lazy
petey has quit [Ping timeout: 264 seconds]
d45h has quit [Ping timeout: 244 seconds]
<maasha> Hanmac: where?
<shevy> hehe
ckinni has quit [Client Quit]
<maasha> ri lazy returns nothing
<Hanmac> i mean use the File.foreach method to create an Enumerator and then make it lazy
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
<maasha> Hanmac: lazy eh? Hm, how is that suppose to work?
hogeo has quit [Remote host closed the connection]
mojjojo has quit [Quit: mojjojo]
khushildep has joined #ruby
banister has joined #ruby
Beoran__ has joined #ruby
cody-- has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
<maasha> Hanmac: ok, so lazy is some sort of technique? Like lazy loading?
d45h has joined #ruby
fgo has joined #ruby
bazaretas has joined #ruby
<Hanmac> maasha: for sample when you have [1,2,3].select(&:odd?).inject(:+) select creates a second array, with lazy you can prevent that
Beoran_ has quit [Ping timeout: 240 seconds]
ddpunk has joined #ruby
jbpros has quit [Quit: jbpros]
xcess_denied|awa has quit [Quit: Leaving...]
<maasha> tobiasvl: Hanmac ah, this looks exactly like the stuff I will be needing: call-by-need
* maasha goes reading
* Hanmac knows the functions you need, before you do ,P
fysaen has quit [Ping timeout: 272 seconds]
osvico has joined #ruby
sandeepk has quit [Quit: Leaving...]
jbpros has joined #ruby
jbpros has quit [Client Quit]
atmosx has quit [Quit: Lost in trance]
BizarreCake has joined #ruby
ckinni has joined #ruby
funburn has joined #ruby
mjs2600 has joined #ruby
<shevy> Hanmac
<shevy> I need your brain
hello_world has quit [Ping timeout: 250 seconds]
mixel has joined #ruby
thelorax123 has quit [Remote host closed the connection]
mojjojo has joined #ruby
thelorax123 has joined #ruby
Ox6abe has joined #ruby
lfox has joined #ruby
<Hanmac> shevy: "/dev/brain cant be unmounted because its currently in use"
gebbione has joined #ruby
<gebbione> hi
heftig has quit [Ping timeout: 252 seconds]
samuel02 has quit [Remote host closed the connection]
falood has quit [Remote host closed the connection]
<gebbione> is this the right syntax to take the value from env or use the default 8888 ?
<gebbione> ENV["OE_CUSTOM_HTTP_PORT"] || 8888
<gebbione> at the moment i m getting an error
<shevy> what error is it
<gebbione> does it need some kind of brachets around?
samuel02 has joined #ruby
<gebbione> forward_ports.rb:22:in `<=': comparison of String with 1024 failed (ArgumentError
Speed has joined #ruby
mjs2600 has quit [Remote host closed the connection]
<gebbione> the full string is
<gebbione> config.vm.network :forwarded_port, host: ENV["OE_CUSTOM_HTTP_PORT"] || 8888, guest: 80
<shevy> ah
<shevy> so something appears after it?
<shevy> try perhaps with ()
<gebbione> ok i ll give it a go
huttan has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
<shevy> gebbione in general if you don't like the ||, you could first assign to a default value
<shevy> and then do:
<shevy> x = ENV["OE_CUSTOM_HTTP_PORT"] if ENV["OE_CUSTOM_HTTP_PORT"]
<gebbione> i don't mind the ||
<gebbione> i just need to understand the syntax
<gebbione> as i don't do ruby all day i have no spot on knowledge of it
<Hanmac> this should work: config.vm.network :forwarded_port, host: (ENV["OE_CUSTOM_HTTP_PORT"] || 8888), guest: 80
<gebbione> it didnt
mjs2600 has joined #ruby
Columcille has quit [Ping timeout: 245 seconds]
<gebbione> i get the same error
samuel02 has quit [Ping timeout: 244 seconds]
Columcille has joined #ruby
Mars has joined #ruby
Mars is now known as Guest12747
ewnd9 has quit [Ping timeout: 252 seconds]
s3itz has quit [Quit: Textual IRC Client: www.textualapp.com]
huttan has quit [Ping timeout: 260 seconds]
jonathanwallace has joined #ruby
javos has joined #ruby
mjs2600 has quit [Remote host closed the connection]
zipper_ has joined #ruby
justsee has joined #ruby
maasha has quit [Ping timeout: 250 seconds]
zipper has quit [Read error: Connection reset by peer]
hogeo has joined #ruby
leonardo_leo has joined #ruby
Guest12747 has quit [Ping timeout: 252 seconds]
graydot has quit [Quit: graydot]
JJMalina has quit [Quit: Leaving...]
leonardo_leo has left #ruby [#ruby]
javos_ has joined #ruby
xk_id has quit [Quit:
sectionm1 has quit [Remote host closed the connection]
jonathanwallace has quit [Read error: Operation timed out]
javos has quit [Ping timeout: 272 seconds]
yalue has joined #ruby
javos_ has quit [Client Quit]
heftig has joined #ruby
GreatSUN has joined #ruby
<GreatSUN> Hi all
camilasan has quit [Remote host closed the connection]
<GreatSUN> does someone of you guys have an idea, why I am not able to get more than 30 results when checking for A records via Resolv::DNS ?
shredding has quit [Quit: shredding]
camilasan has joined #ruby
<GreatSUN> Is there possibly any way to configure a maximum number of results?
mikepack has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
camilasan has joined #ruby
xorgnak has quit [Remote host closed the connection]
xorgnak___ has quit [Remote host closed the connection]
jonathanwallace has joined #ruby
mjs2600 has joined #ruby
hogeo has quit [Remote host closed the connection]
hogeo has joined #ruby
javos_ has joined #ruby
Hoozt has joined #ruby
Hoozt has left #ruby [#ruby]
hogeo has quit [Remote host closed the connection]
Hoozt has joined #ruby
<Hoozt> Hello everyone, can I ask a rails question? Can't join the rails channel.
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mikepack has quit [Ping timeout: 246 seconds]
<sevenseacat> you should register your nickname then
javos_ has quit [Client Quit]
camilasan has quit [Ping timeout: 264 seconds]
aagdbl0 has quit [Quit: This computer has gone to sleep]
dhruvasagar has joined #ruby
ckinni has joined #ruby
evenix has joined #ruby
mercwithamouth has quit [Ping timeout: 272 seconds]
arietis has joined #ruby
xcess_denied has joined #ruby
spike|spiegel has quit [Ping timeout: 245 seconds]
psyprus has quit [Read error: Connection reset by peer]
drumusician has quit [Ping timeout: 252 seconds]
sergicles has quit [Quit: sergicles]
funburn has quit [Quit: funburn]
yacks has joined #ruby
Hoozt has left #ruby [#ruby]
ckinni has quit [Client Quit]
camilasan has joined #ruby
zipper_ has quit [Ping timeout: 246 seconds]
spike|spiegel has joined #ruby
jbpros has joined #ruby
mklappstuhl has joined #ruby
blackmesa has joined #ruby
_Bravado has quit [Quit: _Bravado]
ckinni has joined #ruby
zipper has joined #ruby
hamakn has joined #ruby
psyprus has joined #ruby
graydot has joined #ruby
mojjojo has quit [Quit: mojjojo]
javos_ has joined #ruby
jamesaanderson has joined #ruby
ckinni has quit [Client Quit]
ckinni has joined #ruby
mojjojo has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
sergicles has joined #ruby
dhruvasagar has quit [Ping timeout: 264 seconds]
zipper_ has joined #ruby
zipper_ is now known as HAIL_STALLMAN
hamakn has quit [Ping timeout: 272 seconds]
javos_ has quit [Client Quit]
arietis has quit [Quit: Computer has gone to sleep.]
mklappstuhl has quit [Remote host closed the connection]
Al_ has quit [Remote host closed the connection]
<GreatSUN> does someone of you guys have an idea, why I am not able to get more than 30 results when checking for A records via Resolv::DNS ?
<GreatSUN> Is there possibly any way to configure a maximum number of results?
graydot has quit [Quit: graydot]
Advocation has joined #ruby
scarolan has joined #ruby
spike|spiegel has quit [Ping timeout: 260 seconds]
zipper has quit [Ping timeout: 260 seconds]
ewnd9 has joined #ruby
eshy has quit [Ping timeout: 256 seconds]
huttan has joined #ruby
Advocation has quit [Ping timeout: 260 seconds]
tagrudev has quit [Remote host closed the connection]
jonathanwallace has quit [Ping timeout: 268 seconds]
PragCypher has joined #ruby
tagrudev has joined #ruby
spike|spiegel has joined #ruby
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Xeago_ has joined #ruby
mikecmpbll has joined #ruby
ddpunk has quit [Remote host closed the connection]
Xeago_ has quit [Remote host closed the connection]
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zeel has joined #ruby
ckinni has joined #ruby
Xeago has quit [Ping timeout: 252 seconds]
osvico has quit [Ping timeout: 244 seconds]
mojjojo has quit [Quit: mojjojo]
mjs2600 has quit [Remote host closed the connection]
mojjojo has joined #ruby
heftig has quit [Ping timeout: 268 seconds]
scarolan has quit [Ping timeout: 244 seconds]
surrealanalysis has joined #ruby
Xeago has joined #ruby
<shevy> sevenseacat hehe you send them right over to #rubyonrails
<sevenseacat> i did, then i helped him there, then he left lol
mark_locklear has joined #ruby
Guest85781 has quit [Quit: Linkinus - http://linkinus.com]
enebo has joined #ruby
dangerousdave has joined #ruby
nateberkopec has joined #ruby
stringoO has joined #ruby
jamesaanderson has joined #ruby
fgo has quit [Remote host closed the connection]
pothibo has joined #ruby
pothibo has quit [Read error: Connection reset by peer]
coderhs has quit [Ping timeout: 272 seconds]
evenix has quit [Remote host closed the connection]
vlad_starkov has quit [Read error: Connection reset by peer]
<shevy> :(
obs has quit [Remote host closed the connection]
sergicles has quit [Quit: sergicles]
vlad_starkov has joined #ruby
evenix has joined #ruby
<matti> I wonder.
<matti> Should I stop supporting 1.8.x?
OdNairy_ is now known as OdNairy
ananthakumaran has quit [Quit: Leaving.]
jerius has joined #ruby
pushpak has joined #ruby
mojjojo has quit [Quit: mojjojo]
enebo has quit [Quit: enebo]
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
diegoviola has joined #ruby
zoee has quit [Quit: This computer has gone to sleep]
justsee has quit [Ping timeout: 260 seconds]
lfox has quit [Quit: ZZZzzz…]
Cygnus has joined #ruby
aagdbl0 has joined #ruby
Cygnus is now known as Guest49533
evenix has quit [Ping timeout: 260 seconds]
aagdbl0 has quit [Client Quit]
heftig has joined #ruby
mmitchell has joined #ruby
Guest49533 has left #ruby [#ruby]
keanehsiao has quit [Quit: keanehsiao]
Cygnus_ has joined #ruby
drumusician has joined #ruby
kraljev has joined #ruby
Cygnus_ has left #ruby [#ruby]
IceDragon has joined #ruby
sayan has quit [Ping timeout: 272 seconds]
<kraljev> What is the recommended solution to write desktop application using javascript?
<kraljev> And so javascript can call ruby backend
<kraljev> so basicall, webkitQt like behaviour
Mars has joined #ruby
zoee has joined #ruby
Mars is now known as Guest86255
linduxed has joined #ruby
_maes_ has quit [Ping timeout: 246 seconds]
Ox6abe has quit [Remote host closed the connection]
mojjojo has joined #ruby
asobrasil has joined #ruby
simoz has joined #ruby
hashpuppy has joined #ruby
Guest86255 has quit [Ping timeout: 268 seconds]
mlpinit has joined #ruby
mjs2600 has joined #ruby
jonathanwallace has joined #ruby
banisterfiend has joined #ruby
EvanR has joined #ruby
EvanR is now known as Guest92131
h_kon has quit [Remote host closed the connection]
<gebbione> hi i just the same question earlier but i keep getting this error http://pastebin.com/d7uGH2x7 … anyone can suggest what i might be doing wrong?
vlad_starkov has quit [Remote host closed the connection]
<gebbione> should i use .to_i ?
sambao21 has joined #ruby
Astralum has quit [Read error: Connection reset by peer]
soba has quit [Ping timeout: 252 seconds]
Astralum has joined #ruby
MrZYX|off is now known as MrZYX
ddpunk has joined #ruby
shredding has joined #ruby
jonathanwallace has quit [Ping timeout: 272 seconds]
zoee has quit [Quit: This computer has gone to sleep]
bricker has quit [Ping timeout: 260 seconds]
bricker`away has joined #ruby
habanany has joined #ruby
thejoecarroll has joined #ruby
elux has joined #ruby
drag00n has joined #ruby
snuffeluffegus has joined #ruby
raphaelivan has joined #ruby
havenwood has quit []
<shevy> gebbione why won't you just expand and use proper variables
<shevy> this code looks so volatile
<shevy> config.vm.network :forwarded_port, host: ENV["OE_CUSTOM_SQL_PORT"] || 3333, guest: 3306
ddpunk_ has joined #ruby
<shevy> does it all have to be in one line
<shevy> why not try to simply expand it and see if the error goes away
burlyscudd has joined #ruby
sergicles has joined #ruby
Fire-Dragon-DoL has joined #ruby
nism-pi has quit [Quit: leaving]
<gebbione> i don't see what difference it would make but i ll try, also not sure what you mean with volatile.
hamakn has joined #ruby
farmswort has quit [Remote host closed the connection]
zoee has joined #ruby
burlyscudd has quit [Client Quit]
kaspergrubbe has quit [Remote host closed the connection]
kraljev has left #ruby [#ruby]
inad922 has quit [Ping timeout: 260 seconds]
ddpunk has quit [Ping timeout: 264 seconds]
banisterfiend has quit [Quit: Textual IRC Client: www.textualapp.com]
mlpinit has quit [Remote host closed the connection]
mlpinit has joined #ruby
xcess_denied has quit [Ping timeout: 265 seconds]
_5kg has quit [Ping timeout: 245 seconds]
mlpinit_ has joined #ruby
angusiguess has joined #ruby
_5kg has joined #ruby
<gebbione> shevy, i get the same results with this
banisterfiend has joined #ruby
ckinni has joined #ruby
canton7 has quit [Remote host closed the connection]
nfk has quit [Quit: yawn]
jbw has quit [Read error: Operation timed out]
<shevy> and where is the error? can you use https://gist.github.com/ ? I dont see much on pastebin.com
burlyscudd has joined #ruby
jrhe has quit [Ping timeout: 265 seconds]
<shevy> also
<shevy> do puts these three variables
<shevy> httpPort sqlPort customIP
<shevy> and tell the class
<shevy> it could be at least one is an integer
ddpunk_ has quit []
jbw has joined #ruby
<shevy> gebbione and try both, to_i and to_s
snuffeluffegus has quit [Quit: Leaving]
jkamenik has joined #ruby
mlpinit has quit [Ping timeout: 272 seconds]
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
schickung has joined #ruby
Levin_22 has joined #ruby
Levin_22 has left #ruby [#ruby]
larissa has joined #ruby
Advocation has joined #ruby
<gebbione> to_i made it
<gebbione> i need to try all values now
Guest92131 has quit [Ping timeout: 252 seconds]
Jetchisel has left #ruby ["Unfortunately time is always against us -- *Morpheus*"]
ExCa|iBuR has joined #ruby
myappleguy has joined #ruby
Kneferilis has joined #ruby
xk_id has joined #ruby
lfox has joined #ruby
shredding has quit [Quit: shredding]
OdNairy has joined #ruby
breakingthings has joined #ruby
mmitchell has quit [Remote host closed the connection]
phinfonet has joined #ruby
Advocation has quit [Ping timeout: 252 seconds]
ehc has joined #ruby
jrhe has joined #ruby
inad922 has joined #ruby
tesuji has quit [Read error: Connection reset by peer]
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
zoee has quit [Quit: This computer has gone to sleep]
deception has joined #ruby
jonathanwallace has joined #ruby
sailias has joined #ruby
popl has quit [Ping timeout: 268 seconds]
banisterfiend has quit [Quit: Computer has gone to sleep.]
kaspergrubbe has joined #ruby
surrealanalysis has quit [Quit: surrealanalysis]
zoee has joined #ruby
tharindu has quit [Ping timeout: 244 seconds]
chuk has joined #ruby
EvanR_ has joined #ruby
lfox has quit [Quit: ZZZzzz…]
kaspergrubbe has quit [Remote host closed the connection]
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
ananthakumaran has joined #ruby
pothibo has joined #ruby
achr3f1 has joined #ruby
cpruitt has joined #ruby
jonathanwallace has quit [Ping timeout: 244 seconds]
achr3f1 has left #ruby [#ruby]
theRoUS has quit [Ping timeout: 264 seconds]
banisterfiend has joined #ruby
EvanR_ has quit [Ping timeout: 244 seconds]
cpruitt has quit [Client Quit]
lfox has joined #ruby
cpruitt has joined #ruby
zoee has quit [Quit: This computer has gone to sleep]
parduse has quit []
sandeepk has joined #ruby
CaptainKnots has joined #ruby
CaptainKnots has quit [Changing host]
CaptainKnots has joined #ruby
parduse has joined #ruby
spike|spiegel has quit [Ping timeout: 264 seconds]
wallerdev has joined #ruby
Xeago has quit [Remote host closed the connection]
MrZYX is now known as MrZYX|off
MattStratton has joined #ruby
momomomomo has joined #ruby
ehc has quit [Quit: ehc]
yfeldblum has joined #ruby
Mars has joined #ruby
interactionjaxsn has joined #ruby
Mars is now known as Guest3529
MrZYX|off is now known as MrZYX
larissa has quit [Quit: Leaving]
shredding has joined #ruby
duggiefresh has joined #ruby
mmitchell has joined #ruby
mojjojo has quit [Quit: mojjojo]
mmitchell has quit [Remote host closed the connection]
jibi has quit [Quit: leaving]
mojjojo has joined #ruby
Guest3529 has quit [Ping timeout: 240 seconds]
yfeldblum has quit [Remote host closed the connection]
surrealanalysis has joined #ruby
yfeldblum has joined #ruby
SteveBenner9 has quit [Ping timeout: 268 seconds]
evenix has joined #ruby
scarolan has joined #ruby
xk_id has quit [Quit:
failshell has joined #ruby
banisterfiend has quit [Quit: Computer has gone to sleep.]
mary5030 has joined #ruby
xk_id has joined #ruby
jlast has joined #ruby
bean__ has joined #ruby
mojjojo has quit [Client Quit]
adambeynon has joined #ruby
sevenseacat has quit [Quit: Leaving.]
banisterfiend has joined #ruby
amacgregor has quit [Read error: Connection reset by peer]
yfeldblum has quit [Ping timeout: 272 seconds]
amacgregor has joined #ruby
mary5030 has quit [Remote host closed the connection]
Clooth has quit [Quit: Leaving...]
mary5030 has joined #ruby
mikepack has joined #ruby
sandeepk has quit [Quit: Leaving...]
zarubin has joined #ruby
mjs2600 has quit [Read error: Connection reset by peer]
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mjs2600 has joined #ruby
carlyle has joined #ruby
mikepack has quit [Ping timeout: 244 seconds]
mojjojo has joined #ruby
opt9 has joined #ruby
nfk has joined #ruby
nfk has joined #ruby
nfk has quit [Changing host]
CaptainJet has joined #ruby
wallerdev has quit [Quit: wallerdev]
thelorax123 has quit [Remote host closed the connection]
thelorax123 has joined #ruby
ewnd9 has quit [Ping timeout: 244 seconds]
jmeeuwen_ has joined #ruby
zeeraw has joined #ruby
jmeeuwen has quit [Write error: Broken pipe]
jmeeuwen_ is now known as jmeeuwen
sandeepk has joined #ruby
tylersmith has joined #ruby
chuk has quit [Quit: Leaving]
dweeb_ has quit [Quit: Computer has gone to sleep.]
sagarjunnu has joined #ruby
TheHodge has quit [Ping timeout: 254 seconds]
octarine has quit [Ping timeout: 254 seconds]
dEPy has quit [Quit: Lingo - http://www.lingoirc.com]
TheHodge has joined #ruby
zz_michael_mbp is now known as michael_mbp
octariNSA has joined #ruby
mrsolo has joined #ruby
tris has quit [Excess Flood]
tris has joined #ruby
noop has quit [Ping timeout: 246 seconds]
sagarjunnu has quit [Client Quit]
CreativeEmbassy has joined #ruby
bassclef has quit [Ping timeout: 268 seconds]
Lindrian_ has quit [Changing host]
Lindrian_ has joined #ruby
Lindrian_ is now known as Lindrian
pixelgremlins has joined #ruby
ehc has joined #ruby
Xeago has joined #ruby
HAIL_STALLMAN has quit [Quit: leaving]
jjbohn has joined #ruby
zoee has joined #ruby
drumsrgr8forn8 has joined #ruby
Underbyte has joined #ruby
Fire-Dragon-DoL has quit [Quit: Leaving.]
iamjarvo has joined #ruby
happydude has joined #ruby
aryaching has joined #ruby
danman has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
mojjojo has quit [Quit: mojjojo]
jamesaanderson has joined #ruby
mojjojo has joined #ruby
mrfoto has quit []
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
zarubin has quit [Ping timeout: 246 seconds]
thesheff17 has joined #ruby
mercwithamouth has joined #ruby
burlyscudd has quit [Ping timeout: 268 seconds]
eshy has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
jamesaanderson has quit [Client Quit]
mlpinit_ has quit [Remote host closed the connection]
zipper has joined #ruby
sergicles_ has joined #ruby
mlpinit has joined #ruby
hiall_ has joined #ruby
shredding_ has joined #ruby
includex has quit [Quit: Textual IRC Client: www.textualapp.com]
verywiseman has joined #ruby
shredding has quit [Ping timeout: 252 seconds]
shredding_ is now known as shredding
sergicles has quit [Ping timeout: 264 seconds]
sergicles_ is now known as sergicles
mlpinit_ has joined #ruby
verywiseman has quit [Max SendQ exceeded]
Skelz0r has quit [Ping timeout: 268 seconds]
tagrudev has quit [Quit: friday friday gonna get down on friday]
verywiseman has joined #ruby
hiall has quit [Ping timeout: 264 seconds]
hiall_ is now known as hiall
drumusician has quit [Ping timeout: 272 seconds]
mjs2600 has quit [Remote host closed the connection]
Soda has joined #ruby
mjs2600 has joined #ruby
zipper has quit [Ping timeout: 252 seconds]
zipper has joined #ruby
poikon has joined #ruby
mlpinit has quit [Ping timeout: 272 seconds]
JustinAiken has joined #ruby
poikon has quit [Client Quit]
<JustinAiken> how does one pass an array of strings to ruby through an ENV variable?
poikon has joined #ruby
poikon has quit [Client Quit]
dhruvasagar has joined #ruby
Ivo has quit [Ping timeout: 246 seconds]
<JustinAiken> ie, i want ENV['drb_allowed'] to give me something like ["0.0.0.0", "127.0.0.1"]
iajrz_ has joined #ruby
<apeiros> JustinAiken: env variables are always strings.
<apeiros> JustinAiken: if you want an array or other datastructure, you'll need some kind of serialization
iajrz_ is now known as iajrz
jcarouth has joined #ruby
four33 has joined #ruby
<apeiros> e.g. comma separated, marshal, yaml, …
poikon has joined #ruby
<JustinAiken> okay; that's what I was suspecting, thanks for the confirmation
MattStratton has quit [Read error: Operation timed out]
tannerburson has joined #ruby
benwoody has joined #ruby
kobain has joined #ruby
jbpros has quit [Quit: jbpros]
GreatSUN has quit [Ping timeout: 250 seconds]
d45h has quit []
Ox6abe has joined #ruby
Skelz0r has joined #ruby
VTLob has joined #ruby
ocx has joined #ruby
mikecmpbll has joined #ruby
kreeger has joined #ruby
<ocx> hello all i am having the serial blocked when using this code: http://codepad.org/iUA3im36
<ocx> should i use a tee?
rudisimo has joined #ruby
kreeger has left #ruby [#ruby]
jonathanwallace has joined #ruby
sichardrtallman has joined #ruby
jonathanwallace has quit [Client Quit]
emocakes has joined #ruby
octariNSA has quit []
jonathanwallace has joined #ruby
linduxed has quit [Ping timeout: 268 seconds]
octarine has joined #ruby
Mars has joined #ruby
Mars is now known as Guest25348
mojjojo has quit [Quit: mojjojo]
sichardrtallman has quit [Client Quit]
Ivo has joined #ruby
_maes_ has joined #ruby
evenix has quit [Remote host closed the connection]
JustinAiken has left #ruby [#ruby]
evenix has joined #ruby
<ocx> anyone here?
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
kaspergrubbe has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
Evan_Donovan has joined #ruby
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
Evan_Donovan has quit [Changing host]
Evan_Donovan has joined #ruby
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
kaspergrubbe has joined #ruby
Guest25348 has quit [Ping timeout: 246 seconds]
<Evan_Donovan> i have a cookie from Piwik that i need to parse. the cookie has a period in its name.
ananthakumaran has joined #ruby
<Evan_Donovan> is it possible for me to access the cookie using the following:
<Evan_Donovan> referer_data = cookies[:_pk_ref.3.d77e]
<Evan_Donovan> or do i need to do something else because of the periods?
tvw has quit []
breakingthings has quit []
<Hanmac> Evan_Donovan: try this cookies[:"_pk_ref.3.d77e"]
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
<Evan_Donovan> thanks, Hanmac
<Evan_Donovan> Hanmac++
_maes_ has joined #ruby
bradsmith has joined #ruby
* Hanmac is now known as Hanmad
marr has quit [Read error: Connection reset by peer]
evenix has quit [Ping timeout: 272 seconds]
mojjojo has joined #ruby
apeiros has quit [Remote host closed the connection]
zoee has quit [Quit: This computer has gone to sleep]
hiroyuki has joined #ruby
mengu has quit []
apeiros has joined #ruby
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
lethjakman has joined #ruby
zeeraw has joined #ruby
yfeldblum has joined #ruby
zipper has quit [Quit: Lost terminal]
apeiros has quit [Ping timeout: 265 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
Monie has joined #ruby
dubsteph has joined #ruby
iamjarvo has quit [Remote host closed the connection]
PPH has quit [Quit: leaving]
shawnjgoff has joined #ruby
sambao21 has joined #ruby
acrussell has joined #ruby
Spami has joined #ruby
typicalbender has joined #ruby
<shawnjgoff> How can I find the documentation for the setter syntax? e.g. def some_property=()
maletor has joined #ruby
skaflem has quit [Quit: Leaving]
d45h has joined #ruby
holderbaum has quit [Quit: leaving]
mojjojo has quit [Quit: mojjojo]
PPH has joined #ruby
<iajrz> that one's better still
einarj has quit [Remote host closed the connection]
<shawnjgoff> Yeah, I was looking for official documentation, so the first is better for me.
aa47f8 has joined #ruby
baroquebobcat has joined #ruby
<shawnjgoff> Thanks for finding that.
d45h has quit [Client Quit]
<shawnjgoff> So, I ran across somethings surprising, and it doesn't look like the documentation addresses it.
<shawnjgoff> A setter method always returns its given argument. You can't return any other value.
<iajrz> huh. I thought a setter should return nil
<shawnjgoff> Yeah.
maletor has quit [Quit: Computer has gone to sleep.]
<shawnjgoff> So, if you are given an invalid error, you can't return nil or some special value. You have to raise an exception.
sumark has quit [Remote host closed the connection]
<shawnjgoff> sorry... invalid value, not invalid error.
<MrZYX> it's a normal method, so it returns what that method returns
brtdv has quit [Write error: Broken pipe]
burlyscudd has joined #ruby
<MrZYX> if you want it to return nil do def foo=(bar) @foo = bar; nil; end
<shawnjgoff> No, I just created a setter that explicitely returns nil. It doesn't return nil.
<MrZYX> oh really?
<shawnjgoff> MrZYX, what you described is exactly what I expectd
kcombs has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
<MrZYX> hm, then it's because syntactically an assignment and the value of an assignment is the assigned value
sumark has joined #ruby
wallerdev has joined #ruby
hamakn has quit [Remote host closed the connection]
<shawnjgoff> Here: http://pastie.org/8482895
taternuts has joined #ruby
hamakn has joined #ruby
IcyDragon has joined #ruby
<MrZYX> try using send
yfeldblum has quit [Remote host closed the connection]
<MrZYX> then it does return nil
Randomage has joined #ruby
IceDragon has quit [Disconnected by services]
jwest has quit [Quit: WeeChat 0.4.1]
pedda has joined #ruby
IcyDragon is now known as IceDragon
<shawnjgoff> Yeah, send returned nil.
jwest has joined #ruby
shredding has quit [Quit: shredding]
<shawnjgoff> So, the method is returning what it's returning, but `a = something` isn't a method call, so the return value is not the result from the method.
<MrZYX> so as I said, syntactically it's an assignment and thus its value is the assigned one
<shawnjgoff> Got it.
graydot has joined #ruby
DouweM_ has joined #ruby
parduse has quit []
emocakes has quit [Quit: Leaving...]
atno has quit [Read error: No route to host]
Randomage has left #ruby [#ruby]
ananthakumaran has quit [Quit: Leaving.]
atno has joined #ruby
DouweM has quit [Ping timeout: 260 seconds]
_maes_ has quit [Ping timeout: 260 seconds]
hamakn has quit [Ping timeout: 268 seconds]
Advocation has joined #ruby
parduse has joined #ruby
noname001__ has quit [Ping timeout: 244 seconds]
<ocx> hello whats wrong with this code? http://codepad.org/tnChL3w7 i am not able to match bingo
mercwithamouth has quit [Ping timeout: 252 seconds]
p8952 has quit [Quit: Leaving]
verywiseman has quit [Remote host closed the connection]
habanany has quit [Quit: Leaving.]
d45h has joined #ruby
ValicekB has quit [Ping timeout: 272 seconds]
rudisimo1 has joined #ruby
yfeldblum has joined #ruby
mercwithamouth has joined #ruby
Advocation has quit [Ping timeout: 252 seconds]
rudisimo has quit [Read error: Connection reset by peer]
<MrZYX> ocx: most people prefer loop do over while true, your indentation is off and the parens around the if are entirely superfluous. But getting to the logic: iirc #read doesn't ensure to read a whole line or a full word or anything, it just returns whatever is currently available, so command might be "star" in the first iteration and "t_s" in the second or even more splitted etc.
<MrZYX> try puts command_received
baroquebobcat has quit [Quit: baroquebobcat]
hamakn has joined #ruby
<ocx> momomomomo: the if statement in that code is not being matched, i tried also to check with include?("") but doesnt match too
d45h has quit [Client Quit]
boboc has joined #ruby
sooli has joined #ruby
<sooli> Hi there, I'm working on a new Ruby CMS http://solicms.com ... a free DB CMS powered by GWAN server
Fire-Dragon-DoL has joined #ruby
watermel0n has joined #ruby
baroquebobcat has joined #ruby
<ocx> MrZYX: tried that
parduse has quit []
sergicles has quit [Quit: sergicles]
<ocx> MrZYX: http://codepad.org/VGSQtXwm this works
<ocx> but the if does not work
petey has joined #ruby
<MrZYX> try puts
heftig has quit [Quit: Quitting]
<MrZYX> so you see the iterations
<MrZYX> each line is a new call to #read
<MrZYX> so a new value for command_received
zz_tsykoduk is now known as tsykoduk
sergicles has joined #ruby
parduse has joined #ruby
NickiMinaj has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<NickiMinaj> When are reference errors (reference to a variable not defined in scope, not reference to an undefined property on an object that exists) discovered in a Ruby program?
<NickiMinaj> i.e., at run time or compilation
hamakn has quit [Remote host closed the connection]
linduxed has joined #ruby
boboc has quit []
<ocx> MrZYX: print works but puts doesnt output anything
hamakn has joined #ruby
canton7 has joined #ruby
<workmad3> NickiMinaj: there's a compile time in ruby??? :P
<MrZYX> NickiMinaj: easy to find out. define a method using an undefined local, never call the method, see if you get an error, call the method, see if you get an error
timonv has quit [Remote host closed the connection]
jbpros has joined #ruby
<NickiMinaj> MrZYX: I don't have Ruby locally, sorry
<MrZYX> ocx: puts always outputs something, it may only be a newline though
timonv has joined #ruby
danshultz has quit [Remote host closed the connection]
<workmad3> >> def foo; undefined_local; end;
<eval-in> workmad3 => nil (https://eval.in/68583)
<workmad3> >> def foo; undefined_local; end; foo
<eval-in> workmad3 => undefined local variable or method `undefined_local' for main:Object (NameError) ... (https://eval.in/68584)
<workmad3> NickiMinaj: oh look, we have a ruby interpreter in-channel ;)
<NickiMinaj> Sweet! :)
<ocx> yes i get a blank screen MrZYX but with pritn i dont get the blank screen i just get the text when serial is written to
<momomomomo> workmad3: in Rubinius...
danshultz has joined #ruby
<ocx> MrZYX: ^
mlpinit_ is now known as mlpinit
<MrZYX> ocx: now read my explanation again
nwertman has joined #ruby
<NickiMinaj> Okay, so you guys must have a lint tool you use to check for reference errors?
apeiros has joined #ruby
erry_ has joined #ruby
<ocx> MrZYX: how can i resolve that? i got your point
danshult_ has joined #ruby
ValicekB has joined #ruby
danshultz has quit [Read error: Connection reset by peer]
<workmad3> NickiMinaj: yeah, it's called the test suite.. :P
atno has quit [Remote host closed the connection]
Liquid-- has joined #ruby
hamakn has quit [Ping timeout: 260 seconds]
<MrZYX> ocx: checkout the docs for IO (or the serialport gem), there's stuff like #readline and #read takes an argument of how many bytes it should read etc.
erry_ has left #ruby [#ruby]
<workmad3> NickiMinaj: also, static analysis linting is not a good way to check for that sort of error in ruby
tylersmith has quit [Remote host closed the connection]
diegoviola has quit [Ping timeout: 246 seconds]
<workmad3> NickiMinaj: there are plenty of ways that the 'undefined reference' could be made valid
blackmesa has joined #ruby
<workmad3> >> def method_missing(method, *args); method.to_s; end; hello
<eval-in> workmad3 => "hello" (https://eval.in/68585)
timonv has quit [Ping timeout: 272 seconds]
atno has joined #ruby
<NickiMinaj> workmad3: Obviously you could define a property later on, but how would a reference to a variable that's not declared be changed at runtime?
<workmad3> NickiMinaj: a 'reference' (or local variable) is indistinguishable from a method call
<workmad3> NickiMinaj: and methods can be created dynamically
macmartine has joined #ruby
heidi has joined #ruby
TigerWolf has joined #ruby
<NickiMinaj> That makes sense. I didn't know local variables were treated as method/property refs in Ruby. Thanks.
<workmad3> local variables aren't treated as methods... but they're indistinguishable from them to the interpreter
<workmad3> so if the local variable doesn't exist, the interpreter goes looking for a method
ghr has quit [Quit: Computer has gone to sleep.]
aa47f8 has quit [Remote host closed the connection]
rudisimo1 has quit [Quit: Leaving.]
aa47f8_ has joined #ruby
rudisimo has joined #ruby
tharindu has joined #ruby
sayan has joined #ruby
mark_locklear has quit [Quit: Leaving]
mjs2600 has quit [Remote host closed the connection]
camilasan has quit [Remote host closed the connection]
AlSquirrel has quit [Read error: Connection reset by peer]
camilasan has joined #ruby
dubsteph has quit [Ping timeout: 264 seconds]
kaspergrubbe has quit [Remote host closed the connection]
xeno_ has joined #ruby
macmartine has quit [Remote host closed the connection]
nvrch has quit [Quit: nvrch]
<xeno_> I was trying to figure out if there was any way to hack an instance constant in ruby. It doesn't look like it.
mjs2600 has joined #ruby
jrhe has quit [Quit: jrhe]
<xeno_> I was hoping there might be some kind of construct like the Javascript closures that inherit from the outer function, but that doesn't exist.
<xeno_> Any suggestions?
acrussell has left #ruby [#ruby]
evenix has joined #ruby
Mars has joined #ruby
^Chris^ has joined #ruby
RichardBaker has joined #ruby
Mars is now known as Guest67082
kaspergrubbe has joined #ruby
mrsolo has joined #ruby
jhaals has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<xeno_> I guess the one thing you could do is break convention and have a new singleton class for each object.
sambao21 has joined #ruby
carlyle has quit [Remote host closed the connection]
nari has joined #ruby
<xeno_> But the main problem is that Ruby just doesn't take object oriented immutables seriously.
camilasan has quit [Ping timeout: 272 seconds]
<NickiMinaj> workmad3: Thanks so much for explaining.
mikepack has joined #ruby
ephemerian has quit [Quit: Leaving.]
<Hanmac> xeno_ show that you try todo
kaspergrubbe has quit [Remote host closed the connection]
<apeiros> "object oriented immutables" - and what'd that be?
saarinen has joined #ruby
<apeiros> ruby has immutables, ruby allows you to create your own immutables too.
<apeiros> see Object#freeze
Guest67082 has quit [Ping timeout: 253 seconds]
ahawkins has quit [Quit: leaving]
<xeno_> class x def initialize(a) { A=a} end where A is an instance constant, rather than a class or global constant.
gebbione has quit [Quit: This computer has gone to sleep]
DouweM_ has quit [Quit: Linkinus - http://linkinus.com]
simoz has quit [Ping timeout: 252 seconds]
DouweM has joined #ruby
<apeiros> xeno_: I think you're confusing objects and variables
<apeiros> an "immutable" variable is not the same as an immutable object.
<apeiros> and correct, ruby doesn't allow you to single an ivar out to be unreassignable. all you can do is freeze the entire object (and that's quite object oriented :-p)
<xeno_> aeiros. No, a language should allow you to set a constant at any scope. I cannot set it except at global or class scope, unless this freeze works. I will look at that. Thanks.
<apeiros> wow, new mutilation…
<ocx> MrZYX: i tried readline(5) or readlines doesnt work the strange thing is that: http://pastebin.com/4wSRmTGi works fine for line3 and prints the correct serial data with a newline but does not mattch the if statement
lnormous has joined #ruby
<apeiros> xeno_: use tab completion for nicks. less embarrassing
<apeiros> xeno_: "a language should" - no. no language owes you anything.
AlSquire has joined #ruby
mikepack has quit [Ping timeout: 258 seconds]
<apeiros> xeno_: and if you think you have a better understanding how language design works as a whole - go ahead and create a language.
mmcdaris has joined #ruby
thelorax123 has quit [Remote host closed the connection]
<ocx> this is my main issue: if (command_received.include?("stream"))
saarinen has quit [Ping timeout: 265 seconds]
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
ce_afk is now known as cescalante
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zxq9 has joined #ruby
<MrZYX> ocx: again, use puts, you can't tell if it was one or thirty calls to read to generate the "right" output with print. with readline(5) you limited the line to 5 bytes, that's "strea" for example
terrellt has quit [Ping timeout: 277 seconds]
pragmatism has joined #ruby
<xeno_> Okay, it looks like freeze will work. Thanks guys. I'll come back and whine more if I find problems.
thelorax123 has joined #ruby
jkhwan has joined #ruby
cpruitt has quit [Quit: cpruitt]
rubydreamr has joined #ruby
ner0x has joined #ruby
<rubydreamr> yoyoyo
jprovazn has quit [Quit: Odcházím]
<rubydreamr> Got a fun one for ya'll - using ruby, how can you detect a sequence of +1s... 1,2,3,4 or 2,3,4,5 or 3,4,5,6
<Hanmac> xeno_ like that?
<Hanmac> >> class X;def initialize(a); self.singleton_class.const_set(:A,a);end;end; X.new(4).singleton_class::A
<eval-in> Hanmac => 4 (https://eval.in/68586)
user258467 has quit [Quit: Quitte]
mansi has joined #ruby
atno has quit [Remote host closed the connection]
timonv has joined #ruby
<apeiros> rubydreamr: each_cons(2).all? { |a,b| a+1 == b }
<xeno_> No, it cannot be a singleton. It must be a many object class.
<ocx> MrZYX: command_received = sp.readline(5) gives test.rb:7:in `readline': end of file reached (EOFError)
bklane has joined #ruby
<rubydreamr> apeiros: [1,2,3,4].all? { |a,b| a+1 == b }
<rubydreamr> not quite
<MrZYX> I guess your port went down or your device did send a EOF to it
<apeiros> rubydreamr: if you fail to copy & paste…
<apeiros> rubydreamr: seriously, read what I wrote.
d4heyDU has joined #ruby
AlSquire has quit [Read error: Operation timed out]
bluenemo has joined #ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
hamakn has joined #ruby
<xeno_> Freeze didn't work on an instance variable.
<xeno_> I'll put together a pastie.
<rubydreamr> apeiros: wow, each_cons, nice - never saw that one before, thank
AlSquire has joined #ruby
<apeiros> xeno_: freeze freezes the receiver, not the variable
<Hanmac> xeno_ freeze only prevent the object from been changed, not its variable which it is asigned
<ocx> read works readline(x) gives that error..
atno has joined #ruby
rubydreamr has quit [Quit: Page closed]
<ocx> MrZYX: cant i redirect the output of print into a variable as a workaround?
endash has joined #ruby
<ocx> something like a = print sp.read
<xeno_> Well, I need to freeze a specific variable, to be like a val in Scala.
Lewix has joined #ruby
Lewix has joined #ruby
bluenemo has quit [Remote host closed the connection]
<bklane> I am running stupid right now and cant figure out why these instance variables i set in a method aren't available in the controller. How do I make them accessible? https://gist.github.com/blklane/497cf19e074a86fac411
Spami has quit [Quit: This computer has gone to sleep]
mojjojo has joined #ruby
RichardBaker has quit [Quit: RichardBaker]
dagobah has quit [Remote host closed the connection]
<MrZYX> ocx: no
<MrZYX> ocx: do your commands have a fixed width?
<xeno_> Closures, for instance, in Ruby, merely depend on anonymous functions, and don't realy preserve an inherited scope, so you cannot use that.
<ocx> MrZYX: yes
<ocx> i can design them that way
<apeiros> xeno_: eh, wrong?
<xeno_> This is an odd but important place where Javascript is literally superior to Ruby.
thekkid has joined #ruby
<ocx> like a12345 for first command b12345 for second etc
mmcdaris has quit [Quit: mmcdaris]
Xeago has quit [Remote host closed the connection]
<MrZYX> ocx: any parameters?
<thekkid> What's the easiest way to get milliseconds since epoch from a datetime object
<Hanmac> xeno_: to prevent an instance variable from been changed you need to freeze the object which owns the instance variable
<MrZYX> ocx: how do you separate the commands?
nobitanobi has joined #ruby
alup has quit [Quit: Leaving]
<xeno_> But I need some things to be variable in the object.
<apeiros> xeno_: anyway, if you want to write fortran, don't use C - or however that saying went.
<apeiros> alternatively: when in rome, do as the romans do
<Hanmac> thekkid: Time.at ?
<apeiros> xeno_: then change your design.
<ocx> they are sent one at a time and there is a newline at the end of each command
<Hanmac> ups from direction
<ocx> MrZYX: ^
cburyta_ has quit [Remote host closed the connection]
<apeiros> xeno_: you don't write ruby as if it was javascript.
<xeno_> Immutables are a basic part of functional programming.
<apeiros> xeno_: durr
<xeno_> Javascript doesn't have immutables either.
<apeiros> xeno_: again, ruby has immutables.
<thekkid> Hanmac: Does that give you number of milliseconds
<MrZYX> ocx: did you try readline without a parameter? what about gets?
<xeno_> But at least it has real closures to compensate.
<ocx> MrZYX: yes i tried readline no good
jrhe has joined #ruby
timonv has quit [Remote host closed the connection]
<MrZYX> try gets
natevick has joined #ruby
nfk has quit [Read error: Operation timed out]
<apeiros> obj.freeze # obj is now immutable - easy as pie
phus1on has joined #ruby
<Hanmac> thekkid:
<Hanmac> >> require "date"; DateTime.now.to_time.to_f
<eval-in> Hanmac => 1384536169.095437 (https://eval.in/68587)
<pedda> hi there
<apeiros> Hanmac: *1000
Spami has joined #ruby
VTLob has quit [Quit: VTLob]
<apeiros> (since he wants ms, not s)
<ocx> MrZYX: sp.gets ?
<MrZYX> yes
<Hanmac> apeiros: yeah, but maybe thats okay too
burlyscudd has quit [Quit: Leaving.]
<pedda> i'm working on my chef based cookbook for vagrant (VM provisioning software written in ruby) and i want to pass some parameters to a cookbook without being interpreted as strings
<ocx> test.rb:9:in `<main>': undefined method `include?' for nil:NilClass (NoMethodError) MrZYX
<thekkid> Hanmac: Thanks
<nobitanobi> morning guys
<pedda> how can i avoid this: :max_execution_time => 360 to become this: max_execution_time="360"
<ocx> ^ MrZYX
hamakn has quit [Ping timeout: 268 seconds]
<pedda> is this even a valid question for this chan ? :)
<MrZYX> ocx: so you still have EOFs on the line: http://rubydoc.info/stdlib/core/IO:gets
<MrZYX> handle them
<Hanmac> pedda: i found the #chef channel, i dont know if that is what you want
natevick has quit [Client Quit]
<pedda> it is
<pedda> actually
<pedda> i thought it might rather be some casting issue i'm not aware of
Spami has quit [Client Quit]
<pedda> @Hanmac
<pedda> as i'm not used to ruby at all
<ocx> MrZYX: you mean i have EOF at the end of each line?
royalty has joined #ruby
mary5030 has quit [Remote host closed the connection]
dodosan has joined #ruby
<MrZYX> I don't know where they are
<MrZYX> but they are there
mary5030 has joined #ruby
d45h has joined #ruby
zoee has joined #ruby
<ocx> MrZYX: thats a hard one , how can i handle it?
<MrZYX> with readline you rescue the exception, with gets you check for nil
<ocx> readline is getting me that error: test.rb:7:in `readline': end of file reached (EOFError) MrZYX
<MrZYX> so your exception is EOFError
dodosan has quit [Remote host closed the connection]
wald0 has joined #ruby
<wald0> > Time.utc("2013, 08")
sambao21 has quit [Quit: Computer has gone to sleep.]
<wald0> > Time.gm("2013, 08")
einarj has joined #ruby
carlyle has joined #ruby
<wald0> no bot working?
<ocx> kinda lost MrZYX i dont quite understand the workaround for this
RichardBaker has joined #ruby
carlyle has quit [Read error: Connection reset by peer]
<wald0> >> Time.utc("2013, 08")
<eval-in> wald0 => 2013-01-01 00:00:00 UTC (https://eval.in/68591)
<wald0> ah
<wald0> why i cannot set the month ?
<xeno_> I would like to do something like "this.freeze" at the end of the initialize method, but I cannot remember what Ruby uses for "this"
<apeiros> wald0: did you consider reading the API docs on Time.utc?
<Mon_Ouie> Just "freeze", which would be equivalent to self.freeze
<Mon_Ouie> (unless you have a local variable called freeze)
<xeno_> Okay, thank you.
<MrZYX> ocx: either begin; command = sp.readline; other code; rescue EOFError; end; or command = sp.gets; if command.nil?; next; elsif .....
<xeno_> Thanks again guys. That usage of freeze will get me there, at least in this case.
<wald0> apeiros: i get that command from a book of ruby which im reading/learning :/
sambao21 has joined #ruby
<apeiros> wald0: ok, then time to get acquainted with the docs. you can use e.g. `ri Time::utc` in your bash or other shell
<apeiros> wald0: alternatively you can use sites like rdoc.info or ruby-doc.org
<apeiros> make sure you use the docs of the ruby version you're actually using (ri should always be the right version)
daxroc has quit [Ping timeout: 260 seconds]
<nobitanobi> In a Ruby application, if I want to use gems I need to require them (despite using Gemfile). Why in Ruby on Rails for example I don't need to require them? How is that done?
einarj has quit [Ping timeout: 272 seconds]
Voodoofish430 has joined #ruby
zeel has quit [Remote host closed the connection]
jhulten has joined #ruby
jbpros has quit [Quit: jbpros]
krz has joined #ruby
ravster has quit [Quit: Leaving.]
<ocx> MrZYX: http://codepad.org/p4TJiOY8 no good still
shaunbak_ has quit [Remote host closed the connection]
daxroc has joined #ruby
camilasan has joined #ruby
<MrZYX> well, that's invalid nesting
mmcdaris has joined #ruby
<MrZYX> begin; while; rescue;
<MrZYX> is invalid
shaunbaker has joined #ruby
<ocx> while begin rescue
jbpros has joined #ruby
<MrZYX> either begin; while; end; rescue; end; end; or while; begin; rescue; end; end;, yes
mojjojo has quit [Quit: mojjojo]
mojjojo has joined #ruby
<apeiros> nobitanobi: because rails at startup instructs bundler to load all gems
IcyDragon has joined #ruby
<MrZYX> ocx: also it's a new code block, you should indent it
h0rrorvacui has joined #ruby
camilasan has quit [Remote host closed the connection]
<nobitanobi> apeiros, that's interesting. So, if I want to explicit require a gem? https://github.com/wvanbergen/oily_png
<ocx> MrZYX: thats the output: http://pastebin.com/L7kcLhm2 it looks like it inserts newlines on its own
<nobitanobi> Basically this gem improves another gem and it needs to be explicitly required.
<ocx> should be stream_start
<nobitanobi> at least, that's how I see it.
camilasan has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
bigkevmcd has quit [Quit: Ex-Chat]
<MrZYX> ocx: that are probably your EOFs
TMM has quit [Quit: Ex-Chat]
havenwood has joined #ruby
Elfix has quit [Ping timeout: 264 seconds]
<MrZYX> so you have no choice but making your own readline I guess
heftig has joined #ruby
akonny has quit [Quit: akonny]
echevemaster has joined #ruby
<ocx> MrZYX: you mean write my own readline function?
<MrZYX> method, yes
IceDragon has quit [Ping timeout: 252 seconds]
blackmesa has joined #ruby
shaunbaker has quit [Ping timeout: 246 seconds]
camilasan has quit [Read error: Operation timed out]
<MrZYX> something like def readline(sp); line = ""; line << sp.gets until line.end_with?("\n"); line; end
<ocx> wow hehe
Spami has joined #ruby
Spami has quit [Max SendQ exceeded]
<ocx> can i try that code you just wrote MrZYX ?
jbpros has quit [Ping timeout: 260 seconds]
<MrZYX> sure, add a .to_s to make sure the nil gets will return doesn't bite you
Spami has joined #ruby
aspiers has joined #ruby
<MrZYX> and a .chomp to the return line to get rid of the newline character if you want
<nobitanobi> apeiros, I guess I would need to write :require => false in the ChunkyPNG. I will give it a try. Thanks
arietis has joined #ruby
zigomir has quit [Quit: zigomir]
heidi has quit [Quit: Leaving.]
kaspergrubbe has joined #ruby
lsmola_ has quit [Ping timeout: 264 seconds]
cburyta has joined #ruby
sayan has quit [Ping timeout: 272 seconds]
myappleguy has quit [Ping timeout: 264 seconds]
<ocx> MrZYX: looks good? http://codepad.org/2aWbgBfH
<MrZYX> does it work? ;)
nfk has joined #ruby
nfk has quit [Changing host]
nfk has joined #ruby
<ocx> lets see
lethjakm1 has joined #ruby
<ocx> no i still have the chunked string over several lines MrZYX
<MrZYX> so, maybe that's because you don't even call that new method ;)
<ocx> lol
maletor has joined #ruby
mmcdaris has quit [Ping timeout: 268 seconds]
cburyta has quit [Ping timeout: 264 seconds]
brtdv has joined #ruby
Banistergalaxy has joined #ruby
myappleguy has joined #ruby
lethjakman has quit [Ping timeout: 272 seconds]
DanKnox_away is now known as DanKnox
mmcdaris has joined #ruby
<MrZYX> btw, which ruby version are you using?
<ocx> 1.9.3p0
aspires has joined #ruby
<MrZYX> okay, if you have time you probably should get -p448 or even 2.0 but that require 'rubygems' at the top is already done for you then
mmcdaris has quit [Client Quit]
Eiam has joined #ruby
Mars has joined #ruby
juan_ has quit [Quit: Leaving]
d45h has quit [Ping timeout: 272 seconds]
<ocx> :/
Mars is now known as Guest86774
<MrZYX> so, .to_s converts an object into a string
<MrZYX> nil is an object too
<MrZYX> what does return nil on a EOF?
mansi has quit [Remote host closed the connection]
<ocx> nil ?
AlSquire has quit [Ping timeout: 264 seconds]
kaspergrubbe has quit [Remote host closed the connection]
happydude has quit [Quit: Leaving]
alekst has quit [Quit: Computer has gone to sleep.]
nobitanobi has quit [Read error: Connection reset by peer]
<MrZYX> yes, nil, rubys NULL object
stkowski has joined #ruby
burlyscudd has joined #ruby
Davey has joined #ruby
duggiefresh has quit [Remote host closed the connection]
terrellt has joined #ruby
d45h has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
<ocx> MrZYX: ok so i am getting a nill exception
<MrZYX> there's not really such a thing as a "nil exception"
Guest86774 has quit [Ping timeout: 252 seconds]
<MrZYX> we pass nil to a method that expects a string
<ocx> how can i handle that MrZYX
<MrZYX> so we need to convert nil to a string first
<ocx> ok
<MrZYX> with the to_s method
<ocx> thats new to me
<lupine> amusingly, "raise nil" raises a TypeError
kaspergrubbe has joined #ruby
jrhe has quit [Read error: Connection reset by peer]
<ocx> nil.to_ MrZYX ?
<ocx> _s
<MrZYX> you need to find the method that returns nil
<MrZYX> when it encounters an EOF
mmcdaris has joined #ruby
danshult_ has quit [Remote host closed the connection]
schickung has quit [Quit: schickung]
jhulten has quit [Remote host closed the connection]
danshultz has joined #ruby
raphaelivan has quit [Ping timeout: 252 seconds]
jhulten has joined #ruby
mjs2600 has quit [Remote host closed the connection]
<MrZYX> I sent you a link to its documentation earlier
schickung has joined #ruby
<ocx> MrZYX: i think its line 8: line << sp.gets until line.end_with?("\n") since: 01test.rb:8:in `readline1': can't convert nil into String (TypeError)
<MrZYX> exactly
<MrZYX> so we call three methods in that line
jhulten has quit [Read error: Connection reset by peer]
<MrZYX> String#<<, IO#gets and String#end_with?
jhulten has joined #ruby
<MrZYX> which might return nil and which doesn't like to be passed a nil?
rdark has quit [Quit: leaving]
<MrZYX> *which one
<ocx> line.end_with?("\n")
danshult_ has joined #ruby
<Hanmac> end_with? returns bool
<ocx> it will return nill since it does not match until a \n is reached MrZYX
<MrZYX> and we pass a static string value to it
eldariof has joined #ruby
danshultz has quit [Read error: Connection reset by peer]
<MrZYX> no, it does return true or false
<ocx> ok then sp.gets
myappleguy has quit [Ping timeout: 265 seconds]
<ocx> so i do line.sp.gets.to_s ?
<MrZYX> yes
<MrZYX> hm
aryaching_ has joined #ruby
<MrZYX> almost
surrealanalysis has quit [Quit: surrealanalysis]
<MrZYX> does line (String) have a #sp method?
<ocx> `<main>': undefined method `include?' for nil:NilClass (NoMethodError)
workmad3 has quit [Ping timeout: 246 seconds]
lfox has quit [Quit: ZZZzzz…]
Norrin has quit [Excess Flood]
schickung has quit [Client Quit]
<MrZYX> hm, no idea how you made that happen again...
aryaching has quit [Ping timeout: 252 seconds]
<ocx> MrZYX: here is my updated code: http://codepad.org/WfTv4aeU
inad922 has quit [Quit: ChatZilla 0.9.90.1 [Firefox 25.0/20131025151332]]
pedda has quit [Quit: Textual IRC Client: www.textualapp.com]
lnormous has quit [Ping timeout: 252 seconds]
<MrZYX> ah, so you changed the return value of the readline1 method
<MrZYX> print does return nil
bean has quit [Read error: Connection reset by peer]
<MrZYX> and the last expression in a method is its return value
<MrZYX> so readline1 returns the nil the print on its last line returns
_serial_ has joined #ruby
<ocx> it works!
<ocx> MrZYX: you made my day :)
<ocx> great lesson too thanks a lot
<MrZYX> ocx: now let me clean that up a bit: http://paste.mrzyx.de/pc44a27d5/
tylersmith has joined #ruby
sooli has quit [Quit: sooli]
RichardBaker has quit [Quit: RichardBaker]
zeade has joined #ruby
jbpros has joined #ruby
_serial_ has quit [Client Quit]
kaspergrubbe has quit [Remote host closed the connection]
khushildep has quit [Quit: khushildep]
RichardBaker has joined #ruby
Norrin has joined #ruby
lmickh has quit [Quit: lmickh]
jbpros has quit [Client Quit]
eldariof has quit [Ping timeout: 268 seconds]
sandeepk has quit [Ping timeout: 264 seconds]
DrCode has quit [Remote host closed the connection]
Bry8Star{T2 has quit [Remote host closed the connection]
Mon_Ouie has quit [Ping timeout: 246 seconds]
carraroj has joined #ruby
DrCode has joined #ruby
allanm_ has quit [Read error: Connection reset by peer]
allanm_ has joined #ruby
schickung has joined #ruby
schickung has quit [Client Quit]
camilasan has joined #ruby
carlyle has joined #ruby
Liquid-- has quit [Quit: Computer has gone to sleep.]
pskosinski has joined #ruby
allanm has joined #ruby
erry_ has joined #ruby
xeno_ has quit [Ping timeout: 250 seconds]
Reach has quit [Remote host closed the connection]
zoee has quit [Quit: Leaving]
pskosinski has quit [Client Quit]
^Chris^ has quit [Read error: No route to host]
wald0 has quit [Quit: Lost terminal]
Thanatermesis has quit [Quit: ɯlɐɔ uı ʞɹoʍ oʇ ƃuıoƃ]
Bry8Star{T2 has joined #ruby
erry_ has left #ruby [#ruby]
Runkle has joined #ruby
<Runkle> hiya.
zoee has joined #ruby
<Runkle> i'm a rubynooby and i heard the term "RBN" but from the github page i'm unsure of what it is.
allanm_ has quit [Ping timeout: 260 seconds]
rickmasta is now known as Rickmastaa
duggiefresh has joined #ruby
mmitchell has joined #ruby
Thanatermesis has joined #ruby
johnnyfuchs has joined #ruby
percival__ has joined #ruby
burlyscudd has quit [Quit: Leaving.]
<havenwood> Runkle: What Github page? I've never heard of RBN. How did you hear of it?
embryoconcepts has joined #ruby
tris has quit [Excess Flood]
aspiers has quit [Read error: Operation timed out]
<havenwood> Runkle: I don't think that is a "thing" Rubyists will be generally familiar with, but maybe I'm just odd man out. :P
jrhe has joined #ruby
<MrZYX> I second that :P
<MrZYX> (the first part)
tris has joined #ruby
jondkinney_afk is now known as jondkinney
<havenwood> Yeah, dunno why i said the last part, since I know it isn't true. Seems harsh sometimes to be clear in what you're saying though.
maxamillion has joined #ruby
poikon has quit [Ping timeout: 246 seconds]
<maxamillion> random question, but is highline the defacto-standard rubygem for building command line apps or is there something more common(or better)? thor? $other?
<havenwood> We've got plenty of three-letter gibberish initialisms, just not that combo. :P
heftig has quit [Ping timeout: 264 seconds]
<MrZYX> hmmm, irb, pry, what else?
bean__ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
heftig has joined #ruby
<MrZYX> oh gem of course, if you want to count that in
<havenwood> drb
<havenwood> rom
myappleguy has joined #ruby
<MrZYX> hm, see, rom, I'm out already :P
hiall has quit [Quit: hiall]
<havenwood> i guess rom is an acronym not an initialism
<havenwood> i was just thinking irb and drb
Grantlyk has joined #ruby
Grantlyk has left #ruby [#ruby]
Rickmasta has joined #ruby
<havenwood> <3 pedantry
<MrZYX> so two is already plenty? ;P
<havenwood> rbx
Desert_eagle has quit [Quit: Leaving]
<havenwood> MrZYX: More than plenty!
<havenwood> MrZYX: Our need for them was low to start with. Supply being low is no prob.
AleksEst_ has joined #ruby
Rickmastaa has quit [Remote host closed the connection]
<havenwood> i'm glad Pry and Gem are words not char to work mappings
<havenwood> word*
<MrZYX> yeah
Skelz0r has quit [Ping timeout: 244 seconds]
petey has quit [Remote host closed the connection]
yourmysin has joined #ruby
Skelz0r has joined #ruby
duggiefresh has quit [Ping timeout: 252 seconds]
<havenwood> I'd love to see Pry in the stdlib. I think the biggest impediment to that is its deps.
mmcdaris has quit [Quit: mmcdaris]
petey has joined #ruby
Bry8Star{T2_ has joined #ruby
eyckelbo1m has joined #ruby
SirFunk has quit [Ping timeout: 244 seconds]
eyckelboom has quit [Ping timeout: 244 seconds]
Bry8Star{T2 has quit [Ping timeout: 240 seconds]
jrhe has quit [Ping timeout: 246 seconds]
AleksEst has quit [Ping timeout: 244 seconds]
jrhe_ has joined #ruby
typicalbender has quit [Quit: Leaving.]
duggiefresh has joined #ruby
forced_request has quit [Ping timeout: 244 seconds]
A124 has quit [Ping timeout: 244 seconds]
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
drumsrgr8forn8 has quit []
<Runkle> nm. rbenv it what i heard him say
<havenwood> Runkle: Ahh. A tool to switch between using different Ruby implementations.
lfox has joined #ruby
pel_daniel has joined #ruby
typicalbender has joined #ruby
SirFunk has joined #ruby
<havenwood> Runkle: I prefer ruby-install and chruby instead of ruby-build and rbenv. RVM is the other popular option.
SJr has quit [Ping timeout: 244 seconds]
SJrX has joined #ruby
A124 has joined #ruby
mrsolo has joined #ruby
aganov has quit [Remote host closed the connection]
clusterfoo has joined #ruby
petey has quit [Ping timeout: 252 seconds]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Bry8Star{T2_ has quit [Ping timeout: 240 seconds]
maxamillion has left #ruby ["http://quassel-irc.org - Chat comfortably. Anywhere."]
<havenwood> maxamillion: Seems you hear more about Thor these days. But yeah, I think Highline is popular. I think just an option parser upgrade like Slop or Trollop is enough for small tools. I think of Highline as the most burly option, but I need to look more closely at Thor.
camilasan has quit [Remote host closed the connection]
philtr has joined #ruby
philtr_ has quit [Ping timeout: 244 seconds]
iaj has quit [Read error: Connection reset by peer]
iaj_ has joined #ruby
camilasan has joined #ruby
<havenwood> maxmanders: Some of the stuff that was only in Highline is in Ruby now, which does make it easier to go it on your own.
digital-ghost has joined #ruby
jlast has quit [Remote host closed the connection]
<havenwood> Oops, mixing up my maxs, sorry!
<maxmanders> ;-)
farn has quit [Ping timeout: 244 seconds]
carraroj has quit [Read error: Operation timed out]
<clusterfoo> I have a module Workers, and a class Tasks::Foo inside modue Tasks. I'm trying to call Workers::Bar from inside Tasks::Foo, but I keep gettin "uninitialized constant Workers" because it looks fo Tasks::Workers... I've tried "include Workers" inside Foo, but it will keep looking inside the Tasks scope. How do I call a module from inside another module?
farn has joined #ruby
ShellFu has joined #ruby
mmcdaris has joined #ruby
<havenwood> clusterfoo: ::Workers::Bar
<MrZYX> that should just work, are you sure the files that define the workers module are actually loaded?
mneorr has joined #ruby
<clusterfoo> <havenwood> tried that too... I guess my problem is something else?
<havenwood> clusterfoo: show the code?
<clusterfoo> hold on I'll gist it.
Aloysius1 has quit [Remote host closed the connection]
bean has joined #ruby
cburyta has joined #ruby
drumsrgr8forn8 has joined #ruby
camilasan has quit [Ping timeout: 272 seconds]
heftig_ has joined #ruby
Grantlyk has joined #ruby
heftig_ has quit [Remote host closed the connection]
zoee has quit [Quit: This computer has gone to sleep]
heftig has quit [Ping timeout: 246 seconds]
decoponio has quit [Quit: Leaving...]
n4dir has joined #ruby
<clusterfoo> https://gist.github.com/CLUSTERfoo/7489502 ... I haven't rubied in a while and I'm scarily rusty...
n4dir has left #ruby [#ruby]
<clusterfoo> @<havenwood> ^
cburyta has quit [Ping timeout: 272 seconds]
<MrZYX> clusterfoo: so again, are you sure app/models/tasks/database_processor.rb is loaded before app/models/tasks/importer.rb?
atno has quit [Read error: No route to host]
law has joined #ruby
zoee has joined #ruby
Grantlyk has quit [Ping timeout: 252 seconds]
<law> hey, can anyone recommend some reading that would help me further understand procs, blocks, and lambdas?
atno has joined #ruby
<clusterfoo> <MrZYX> derp, that's probably the problem. right. thanks.
<law> yaaay! thank you
<typicalbender> if i remember t hat article is pretty good
<typicalbender> np
Xeago has joined #ruby
jrhe_ has quit [Quit: jrhe_]
jhaals has joined #ruby
iliketurtles has joined #ruby
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood> i prefer my lambdas stabby
mlpinit has quit [Remote host closed the connection]
macmartine has joined #ruby
olivier_bK has quit [Ping timeout: 268 seconds]
mlpinit has joined #ruby
gasbakid has joined #ruby
mikepack has joined #ruby
jlebrech has quit [Quit: Konversation terminated!]
nobitanobi has joined #ruby
tvw has joined #ruby
petey has joined #ruby
<nobitanobi> prova = { "255,244,233" => 2, "433,222,333" => 3 }; prova.max_by { |k,v| v }; Why would this max_by return an Array?
momomomomo has quit [Quit: momomomomo]
mojjojo has quit [Read error: Connection reset by peer]
diegoviola has joined #ruby
<MrZYX> nobitanobi: because it's a method from Enumerable and Hash#each yields [key, value]
<nobitanobi> it treats each element (k,v) of the hash as an array?
jhaals has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<nobitanobi> oh ok.
jrhe has joined #ruby
<MrZYX> if you want the maximum value in the hash: hash.values.max
nanoyak has joined #ruby
<nobitanobi> I actually need the key
<MrZYX> ok, then just add .first
mikepack has quit [Read error: Operation timed out]
<MrZYX> to what you have
<nobitanobi> yup
<nobitanobi> I was doing .keys.first
<nobitanobi> :P
<nobitanobi> thanks
AlSquire has joined #ruby
<law> I'm just having trouble trying to think of use cases where I would use procs/lambdas
evenix has quit [Remote host closed the connection]
<law> my ruby-fu is quite weak, but I'm going through the codeschool.com courses
jbw has quit [Ping timeout: 272 seconds]
<MrZYX> law: store passed code for later execution for example
aspiers has joined #ruby
<coldmethod> law: procs are to automate the use "blocks".. lambdas do the same .. with one difference
evenix has joined #ruby
<law> what makes code 'passed'?
<law> keep in mind, I'm a sysadmin who mainly uses Ruby for scripting :-)
mlpinit_ has joined #ruby
<MrZYX> defined by the caller, like a block or a passed proc/lambda of course
<law> I'm sort of starting to come around to 'yield' and how that works, but it's slow going
<coldmethod> law: lamda passes the control back to the invoking method
<coldmethod> that's the only difference
atno has quit [Remote host closed the connection]
ckinni has joined #ruby
<coldmethod> law: do you know what's a block?
<law> i read stuff like "lambas and procs are just drop-in code snippets", and I think to myself "isn't that what we call a 'function'?"
<law> err, 'blocks and procs', not lambdas and procs, sorry
krz has quit [Quit: krz]
zipper has joined #ruby
mjs2600 has joined #ruby
<DouweM> procs and blocks are lambdas. a lambda is, indeed, an unnamed function
failshel_ has joined #ruby
mlpinit has quit [Ping timeout: 260 seconds]
atno has joined #ruby
<law> I'll figure it out, eventually. it'll just take a real-life "oh, this is TOTALLY what blocks/procs/lambdas are for, this makes things so much easier!"
<coldmethod> law: you basically need to first understand what truly a block is.. before you move ahead.. what you said is logically right but technically there are "methods" in Ruby.. but blocks are very agile rudimentary thing.. seems like you don't know those yet
<coldmethod> yes, start with a block
<MrZYX> law: did you use #each yet?
evenix has quit [Ping timeout: 268 seconds]
ddd has quit [Ping timeout: 252 seconds]
<law> when I think of 'block', I think of stuff like 'somearray.each do |variable| puts variable end'
Tarential has quit [Excess Flood]
<law> yeah, I get 'each' and have used it often
drumsrgr8forn8 has quit [Remote host closed the connection]
Tearan has joined #ruby
AleksEst has joined #ruby
Tarential has joined #ruby
<coldmethod> nice then law
drumsrgr8forn8 has joined #ruby
jbw has joined #ruby
<law> so, I get how to *use* 'each', but I guess I don't know how 'each' works under the hood to the point where I can say 'this is how each operates'
AleksEst_ has quit [Ping timeout: 260 seconds]
p8952 has joined #ruby
<coldmethod> law: consider blocks as "arguments" that come after "methods" (anything with a dot, like .each, .map, yada yada)
aagdbl has joined #ruby
<coldmethod> what material are you referencing / reading? (i may guide you to the correct resource for beginning things out)
surrealanalysis has joined #ruby
aryaching has joined #ruby
<DouweM> law: do you know JS and its forEach or underscore's _.each ?
<MrZYX> def each; while element = get_next_element; yield element; end; end;, basically
failshell has quit [Ping timeout: 246 seconds]
aryaching_ has quit [Ping timeout: 252 seconds]
Advocation has joined #ruby
<Xeago> MrZYX: [false].each would yield nothing
<Xeago> :3
<law> DouweM: I do not. I speak bash and Ruby, pretty much. I've done a fair bit of Perl back in the day, but that's about it
<MrZYX> Xeago: sure, not the point ;)
<law> coldmethod: right now I'm just going through the coldschool.com courses
<Xeago> :D
failshel_ has quit [Ping timeout: 272 seconds]
<law> I just finished RubyBits 1, and the very last course was procs/blocks/lambdas. I *barely* made it through
zipper has quit [Ping timeout: 272 seconds]
<Xeago> that sounds like a very weird ordering of concepts law
zipper has joined #ruby
<law> how so?
jlast has joined #ruby
drumsrgr8forn8 has quit [Ping timeout: 246 seconds]
bklane has quit [Quit: Leaving...]
jalcine has quit [Excess Flood]
<coldmethod> law: last time i checked codecademy.com, this stuff was better explained there
lmickh has joined #ruby
<law> oooOOOOOoo, I will check there too
<law> thank you
<coldmethod> law: np
<Xeago> because these required deeper knowledge of ruby internals
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
momomomomo has joined #ruby
lmickh has quit [Client Quit]
<Xeago> whereas you are getting started with ruby internals
<law> the codeschool.com courses went from "yep, I know and have done this a few dozen times now" to "....great googly moogly, talk about 100 miles an hour!" VERY quickly
<coldmethod> Xeago: right said.. the whole point of starting OOP takes a little bit of time at first
Davey has quit [Quit: Computer has gone to sleep.]
<Xeago> have you tried ruby-warrior?
<law> I have not
lmickh has joined #ruby
<Xeago> I recommend it
* law Googles
<Xeago> also a very nice tune :3
<law> I'm learning that I'm a project-based learner
<law> if that helps at all
zipper_ has joined #ruby
<law> I can't just read something and go "Huh, that's interesting" and then go out and use it. I tend to need to build something (or several things) with it before it starts to sink into my thick skull
<iajrz> law: rubymonk has several problems
<coldmethod> Codecademy is free and gets straight to coding.. for beginners I recommend that .. you might find OOP quite intriguing or confusing at first, but that's natural if you have never heard or read about it.. just Google stuff out
<iajrz> it's kind of fun... I'm using it to compliment what I learnt with rubykoans
zipper has quit [Ping timeout: 261 seconds]
jkhwan has quit [Remote host closed the connection]
<Xeago> ruby-warrior is very oop'y
motto has joined #ruby
jkhwan has joined #ruby
burlyscudd has joined #ruby
<coldmethod> law: Keep in mind almost everything in Ruby is an object, meaning it has something to do with OOP. Sooner or later you may wanna familiarize yourself with that. But do that gradually.
zipper_ is now known as zipper
m8 has quit [Ping timeout: 272 seconds]
<Xeago> I hands down think that ruby-warrior is a very very good thing to go through with people that have problems with oop
iliketurtles has quit [Quit: zzzzz…..]
burlyscudd has quit [Read error: Connection reset by peer]
* coldmethod checking what Xeago is saying
mikepack has joined #ruby
burlyscudd has joined #ruby
<law> I kinda sorta think I 'get' the whole 'everything is an object' part of OOP
<law> here's a script I wrote awhile ago to help me more quickly create Puppet manifests - http://pastebin.com/ihftz4hQ
<Xeago> coldmethod: it is a game cli-game
<Xeago> https://www.bloc.io/ruby-warrior is an online version of it
typicalbender has quit [Quit: Leaving.]
taternuts has quit [Read error: Connection reset by peer]
<iajrz> omg, nice retro music
* iajrz falls in love
jlast has quit [Ping timeout: 272 seconds]
* coldmethod likes ruby-warrior
<Xeago> law: line 12 reads so much better if you do not use parentheses around the argument
* coldmethod and approves it
stkowski has quit [Quit: stkowski]
<Xeago> f.write <<EOF is fine
<coldmethod> law: Go ahead and try ruby-warrior
<law> I already am
<Xeago> :D
<law> jammin' to that funky music :-)
CreativeEmbassy has quit [Ping timeout: 265 seconds]
jkhwan has quit [Ping timeout: 272 seconds]
aspiers has quit [Read error: Operation timed out]
taternuts has joined #ruby
jkhwan has joined #ruby
Liquid-- has joined #ruby
kaspergrubbe has joined #ruby
<Xeago> I can play this on drums and a harmonica
<Xeago> :D
Advocation has quit [Quit: Advocation]
mikepack has quit [Remote host closed the connection]
<yxhuvud> law: I would really recommend breaking out a method for the whole create a file with a class thing. You are repeating yourself, and it messes heavily with your indentation
mansi has joined #ruby
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SteveBenner9 has joined #ruby
btanaka has joined #ruby
bradsmith has quit []
DanBoy has quit [Ping timeout: 240 seconds]
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
DanBoy has joined #ruby
kaspergrubbe has quit [Ping timeout: 264 seconds]
Kamuela has joined #ruby
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
_phansch has joined #ruby
sepp2k has joined #ruby
jbw has quit [Ping timeout: 268 seconds]
dnyy has joined #ruby
zoee has quit [Quit: This computer has gone to sleep]
Guest39676 has quit [Ping timeout: 246 seconds]
Grundell has joined #ruby
macmartine has quit []
relix has joined #ruby
momomomomo has quit [Quit: momomomomo]
apeiros has quit [Remote host closed the connection]
digital-ghost has quit []
zipper has quit [Ping timeout: 272 seconds]
apeiros has joined #ruby
mansi has quit [Read error: Connection reset by peer]
zipper has joined #ruby
mansi has joined #ruby
Grundell has quit [Remote host closed the connection]
sayd has left #ruby ["WeeChat 0.4.2"]
phansch has quit [Ping timeout: 268 seconds]
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
kirun has joined #ruby
AleksEst has quit [Ping timeout: 260 seconds]
OdNairy has joined #ruby
levity_island has joined #ruby
AleksEst has joined #ruby
zoee has joined #ruby
Fire-Dragon-DoL has quit [Quit: Leaving.]
bean has joined #ruby
dhruvasagar has quit [*.net *.split]
jmeeuwen has quit [*.net *.split]
bazaretas has quit [*.net *.split]
eka has quit [*.net *.split]
coldmethod has quit [*.net *.split]
peteyg__ has quit [*.net *.split]
radic_ has quit [*.net *.split]
greenrose has quit [*.net *.split]
tonni_ has quit [*.net *.split]
sam113101 has quit [*.net *.split]
Bofu2U has quit [*.net *.split]
rellin has quit [*.net *.split]
Nilium has quit [*.net *.split]
joshu has quit [*.net *.split]
flowerhack has quit [*.net *.split]
virtual|a has quit [*.net *.split]
withnale_ has quit [*.net *.split]
wmoxam has quit [*.net *.split]
epic has quit [*.net *.split]
SeySayux has quit [*.net *.split]
fivethreeo has quit [*.net *.split]
devdazed has quit [*.net *.split]
snath has quit [*.net *.split]
thelamest has quit [*.net *.split]
ndngvr has quit [*.net *.split]
parus has quit [*.net *.split]
MonsieurApple has quit [*.net *.split]
jcarouth has quit [*.net *.split]
levity_island has quit [Client Quit]
ndngvr has joined #ruby
Ox6abe has quit [Remote host closed the connection]
epic has joined #ruby
<Kamuela> hi friends
fivethreeo has joined #ruby
jcarouth has joined #ruby
dhruvasagar has joined #ruby
thelamest has joined #ruby
stkowski has joined #ruby
MonsieurApple has joined #ruby
wmoxam has joined #ruby
virtualize has joined #ruby
MonsieurApple has quit [Changing host]
MonsieurApple has joined #ruby
bazaretas has joined #ruby
wmoxam has quit [Changing host]
wmoxam has joined #ruby
flowerhack has joined #ruby
sam113101 has joined #ruby
tonni has joined #ruby
radic has joined #ruby
parus has joined #ruby
nobitanobi has quit [Read error: Connection reset by peer]
peteyg_ has joined #ruby
joshu has joined #ruby
rellin has joined #ruby
devdazed has joined #ruby
jmeeuwen has joined #ruby
gr33n7007h has joined #ruby
Nilium has joined #ruby
gr33n7007h has quit [Max SendQ exceeded]
withnale has joined #ruby
gr33n7007h has joined #ruby
snath has joined #ruby
gr33n7007h has quit [Max SendQ exceeded]
Ox6abe has joined #ruby
coldmethod has joined #ruby
jhulten has quit []
SeySayux has joined #ruby
gr33n7007h has joined #ruby
eka has joined #ruby
gr33n7007h has quit [Max SendQ exceeded]
eka has quit [Max SendQ exceeded]
jrhe_ has joined #ruby
jrhe has quit [Read error: Connection reset by peer]
jrhe_ is now known as jrhe
Elfix has joined #ruby
eka has joined #ruby
zipper has quit [Ping timeout: 264 seconds]
mmitchell has quit [Remote host closed the connection]
lkba has quit [Ping timeout: 257 seconds]
zipper has joined #ruby
gr33n7007h has joined #ruby
greenrose has joined #ruby
zipper is now known as Guest33786
mansi has quit [Remote host closed the connection]
nanoyak has quit [Quit: Computer has gone to sleep.]
cburyta has joined #ruby
surrealanalysis has quit [Quit: surrealanalysis]
mansi has joined #ruby
Guest33786 has quit [Changing host]
Guest33786 has joined #ruby
nobitanobi has joined #ruby
surrealanalysis has joined #ruby
aagdbl has quit [Quit: This computer has gone to sleep]
TigerWolf has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Guest33786 is now known as zipper
marr has joined #ruby
jbw has joined #ruby
BizarreCake has quit [Quit: Leaving]
embryoconcepts has quit [Quit: Leaving]
ExCa|iBuR has quit [Quit: I was using serenepIRCh http://www.serenity-irc.net/ :-]
agorman has joined #ruby
JimmyNeutron has joined #ruby
heftig has joined #ruby
cburyta has quit [Ping timeout: 246 seconds]
mansi has quit [Ping timeout: 272 seconds]
myappleguy has quit [Ping timeout: 260 seconds]
mansi has joined #ruby
drumsrgr8forn8 has joined #ruby
zipper has quit [Ping timeout: 252 seconds]
<agorman> Having some issues with my ruby install. Hope this is the right place to ask. Here is what I'm seeing: https://gist.github.com/agorman/7490485
Bofu2U has joined #ruby
<agorman> Running make install again fixes it for a day or two then the error returns.
javos_ has joined #ruby
lethjakm1 is now known as lethjakman
lolmaus has joined #ruby
<lolmaus> Hi! Is there a more elegant way of saying: `if (defined? external_var && external_var)` ?
nanoyak has joined #ruby
reset has joined #ruby
Es0teric has joined #ruby
watermel0n has quit []
Mars has joined #ruby
<MrZYX> lolmaus: where does external_var come from?
mmcdaris_ has joined #ruby
Mars is now known as Guest90389
mmcdaris has quit [Read error: Connection reset by peer]
mmcdaris_ is now known as mmcdaris
<MrZYX> because it'll always be defined unless you're inside eval'd code
scarolan has quit [Ping timeout: 272 seconds]
momomomomo has joined #ruby
dhruvasagar has quit [Read error: Operation timed out]
javos_ has quit [Client Quit]
<lolmaus> MrZYX, just as the previous time asked, it comes from a call to Middleman/Padrino partials: `partial('partialName', locals: { external_var: 'foo' })`. It's not defined if not mentioned in the call.
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mmitchell has joined #ruby
<MrZYX> well, then my recommendation stays the same
scarolan has joined #ruby
<iajrz> aw, ruby warrior is so short
alvaro_o has joined #ruby
rezzack has joined #ruby
lmadrigal has joined #ruby
zipper has joined #ruby
Grantlyk_ has joined #ruby
<lolmaus> MrZYX, to not use Middleman? :(
Guest90389 has quit [Ping timeout: 260 seconds]
<lolmaus> Or to explicitly name ALL variables in ALL calls of ALL partials?
<MrZYX> to place sane defaults at the top if you can't get the users of your partials to define the vars
ckinni has joined #ruby
<MrZYX> also it should be a rare case that a var is optional, maybe rethink your partials
<MrZYX> or what you pass to them
coldmethod has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
jbw has quit [Ping timeout: 260 seconds]
hadees has joined #ruby
<lolmaus> MrZYX, so there's no way to say `defined? external_var && external_var` with a single clause?
<MrZYX> no
<MrZYX> and that's a good thing
<MrZYX> doing that is supposed to be ugly
hiyosi has quit [Ping timeout: 260 seconds]
jb41 has quit [Ping timeout: 260 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
mansi has quit [Read error: Connection reset by peer]
mansi has joined #ruby
<lolmaus> MrZYX, why is that ugly for local vars but not ugly for array/hash elements? `{}[:foo]` => nil
brtdv has quit []
<MrZYX> I say it's ugly to have optional parameters for partials
<lolmaus> MrZYX, uhm... why? What if my partial accepts a JSON-like structure to render?
nouitfvf has joined #ruby
blackmes1 has joined #ruby
<MrZYX> because your partial should represent one thing, like a user in your system, or an entry in a todo list etc.
<MrZYX> something you ideally have floating around as object
mercwithamouth has quit [Ping timeout: 272 seconds]
Reach has joined #ruby
<MrZYX> (and I won't even ask why you'd want to render JSON with html or whatever)
jrhorn424 is now known as zz_jrhorn424
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<lolmaus> MrZYX, let me finish a page, i'll push it to server and show you
<nobitanobi> When we do.. Ticket.new -> how do we know if 'new' it's a singleton method or it's actually inherited from its parent?
blackmesa has quit [Ping timeout: 240 seconds]
myappleguy has joined #ruby
<nobitanobi> is there any way to know that?
achru has quit []
aspiers has joined #ruby
erinb has joined #ruby
<MrZYX> Ticket.singleton_methods
<nobitanobi> +1 thanks MrZYX
maletor has joined #ruby
jbw has joined #ruby
<MrZYX> nobitanobi: just for introspection I hope
<nobitanobi> yeah hehe
aknewhope has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
<nobitanobi> I'm trying to completley understand the whole Class/Object paradigm
aley has joined #ruby
cburyta has joined #ruby
interactionjaxsn has joined #ruby
<nobitanobi> MrZYX, do you call them class methods, or singleton methods of a class?
evenix has joined #ruby
<MrZYX> mmh, both I'd say. If you want to be precise ruby has no class methods though
<nobitanobi> ok, just wondering
failshell has joined #ruby
jlast has joined #ruby
mjs2600 has quit [Ping timeout: 265 seconds]
nullsign has quit [Quit: Changing server]
nullsign has joined #ruby
<nobitanobi> it's interesting. I started working with Ruby on Rails, and every time I am most interested in learning Ruby than RoR :P
nullsign has quit [Client Quit]
<MrZYX> because Ruby is so much nicer, isn't it? :P
<nobitanobi> I like it a lot.
<nobitanobi> I just feel so comfortable working with it
<nobitanobi> I've never had that experience with any other language
<MrZYX> yeah
cescalante is now known as ce_afk
jrhe has quit [Quit: jrhe]
sambao21 has joined #ruby
interactionjaxsn has quit [Ping timeout: 252 seconds]
atmosx has joined #ruby
<gr33n7007h> %w+this is a statement+.map { |word| word.upcase } How can I shorten this with the ampersand?
aknewhope has left #ruby ["Leaving"]
pedda has joined #ruby
<MrZYX> .map(&:upcase)
scarolan has quit [Ping timeout: 260 seconds]
typicalbender has joined #ruby
<gr33n7007h> MrZYX, Brilliant thanks man
jibi has joined #ruby
<nobitanobi> MrZYX, where can I read about that notation (&:) - what does actually do?
failshell has quit [Ping timeout: 260 seconds]
mjs2600 has joined #ruby
<MrZYX> hm, didn't see a good resource yet
<h0rrorvacui> I've seen it in the pickaxe book I think
<MrZYX> but it's actually not too complicated to explain here
mmitchell has quit [Remote host closed the connection]
capicue has joined #ruby
<nobitanobi> I really need to read more on proc and lambdas
<MrZYX> first of all, you can pass a proc to a method as a block: upcase = -> {|word| word.upcase }; array.map(&upcase)
nullsign has joined #ruby
<atmosx> net-ssh is the only choice when it comes to executing or retrieving files via ssh right?
nanoyak has quit [Ping timeout: 264 seconds]
<MrZYX> the & syntax calls to_proc on the passed object, so it's map(&upcase.to_proc) if you so will
<MrZYX> :upcase is a Symbol and an object like everything else
Guedes0 has joined #ruby
<nobitanobi> oh shut
<nobitanobi> but that is a "coincidence" no?
<MrZYX> Symbol#to_proc returns a proc that's defined like -> {|arg| arg.send self }
<nobitanobi> I mean, that symbol#to_proc returns that thing
<MrZYX> so upcase = :upcase.to_proc, map(&upcase) or map(&:upcase) in short
<h0rrorvacui> nobitanobi: perhaps but its idiomatic none the less
<nobitanobi> it's pretty neat yes
nanoyak has joined #ruby
<nobitanobi> pretty hacky ;)
<h0rrorvacui> doesn't feel that way to me
<MrZYX> iirc it got introduced with 1.9 because people were doing class Symbol def to_proc; ...; end; end; all the time ;)
mikepack has joined #ruby
<nobitanobi> h0rrorvacui, no?
typicalbender has quit [Ping timeout: 260 seconds]
jlast has quit [Ping timeout: 268 seconds]
mjs2600 has quit [Ping timeout: 272 seconds]
<h0rrorvacui> Its nice to do something like array = [1, 2, 3, 4, 5]; array.keep_if(&:even?)
<Kamuela> does a proc have a fully-expanded word
<Kamuela> like procurement or process or something
<h0rrorvacui> it's almost like reading a sentence
<MrZYX> Kamuela: procedure I think
lnormous has joined #ruby
mikepack has quit [Remote host closed the connection]
mikepack has joined #ruby
<BraddPitt> what is &:even?
<MrZYX> BraddPitt: scroll up, I just explained that ;)
<Kamuela> yeah, so what does & do? pass a block?
<h0rrorvacui> :P MrZYX just explained it
<BraddPitt> oops, thanks
<lolmaus> MrZYX, have a look at this: http://lolmaus.bitbucket.org/alumconnect-middleman/profile/ Each section, except for "Networking interests" and avatar) is generated from a single partial. Here's how this page's template looks like: https://gist.github.com/lolmaus/7491016
<ShellFu> BraddPitt, man I wish you were the real one so I could tell you how much I was disappointed with WWZ!
<nobitanobi> h0rrorvacui, I think it's hacky because you are "forcing" to be a Symbol, trying to take advantage of how the to_proc of Symbol will do that for you, but is not actually why to_proc of Symbol is that way
<nobitanobi> I guess ~~
<BraddPitt> ShellFu who says I'm not?
<h0rrorvacui> How do you know that to be true?
<ShellFu> pfft he couldnt script his way out of an already open paper bag
<BraddPitt> also has anyone read Beginning Ruby before?
<BraddPitt> by Peter Cooper
<h0rrorvacui> I mean a lot of things we take for granted were at one point hacks that became accepted use.
gazarsgo has joined #ruby
<nobitanobi> h0rrorvacui, that's true.
momomomomo has quit [Quit: momomomomo]
<law> alright block-folk, here's a concrete example of what's confusing the hell out of me about these things
<gazarsgo> if i puts an object and it's formatted like [#<Namespace::Class…..] shouldn't I be able to parse it again with Marshall.load? I get a version problem
dayepa has quit [Quit: dayepa]
asobrasil has left #ruby [#ruby]
<atmosx> BraddPitt: even numbers I think, not sure if he implemented the method or exists for fixnum (probably exists)
<law> take this example code: http://pastebin.com/wAkJpBtt
<atmosx> oops
<atmosx> lag
<law> why bother doing it the first way instead of just doing it the second way?
dayepa has joined #ruby
tris has quit [Excess Flood]
edwardly has quit [Ping timeout: 246 seconds]
tris has joined #ruby
<MrZYX> law: that's not the best example granted. lets say you're actually reading the message to tweet from that block
<MrZYX> and generating is very very very expensive
<MrZYX> *generating the message
<MrZYX> you don't want do it until you're sure you can actually post it
<MrZYX> so you postpone until the authentication succeeded
erinb has quit [Quit: My Mac has gone to sleep. ZzZzZz...]
<law> right, that's what the 'if' statement is for
binaryplease has joined #ruby
<law> 'if authenticate succeeds, THEN do whatever'
<h0rrorvacui> I feel like you are also missing a benefit from doing it the block way
<MrZYX> and what I missed is that there are no two ways that are the same to generate the message
<MrZYX> but as said that example isn't the best one
RichardBaker has quit [Quit: RichardBaker]
lnormous has quit [Ping timeout: 264 seconds]
edwardly has joined #ruby
<MrZYX> it really comes down to "I want to run a user defined action here" instead of a predefined action
<shevy> guys, it's time again
<shevy> get undressed!!!
<shevy> law where is order?
<Kamuela> what's going on?
<MrZYX> lolmaus: so for my taste that are waaay too many parameters
<Kamuela> too cold to be playing around with this nudity ish
<shevy> Kamuela you should live in canada man
nicoulaj has joined #ruby
<shevy> they have trucks sliding over ice streets
typicalbender has joined #ruby
<law> alright, let me try a different example
<Kamuela> yeah screw that
<MrZYX> lolmaus: I'd consider two things: extract the parameters into a class and/or define a bunch of subtype partials that call the general partial, filling in the defaults
jlast has joined #ruby
christopherdupon has joined #ruby
<lolmaus> MrZYX, i'm not familiar with this technique. :( Is there an article over the web that describes it? I'm kinda new to Middleman.
<MrZYX> I never used middleman
<atmosx> I need to retrieve data from RPi clients via VPN. They all have ssh enabled.. I actually need to read a small file, sqlite3 database... usually it's less than 100 kb. You think it's better to scp the file to the server or work remotely?
<MrZYX> lolmaus: I'd rather call this technique "OOP"
<atmosx> I was even thiking to write a client/server app but imho it's an overkill :-/
christopherdupon is now known as _Chris
<atmosx> what is middleman?
<atmosx> lol
Guedes0 has left #ruby ["Saindo"]
<shevy> atmosx the guy that accepts the money and then gives it to the assassin
<talntid> ^ truf
TDJACR has quit [Ping timeout: 245 seconds]
reset has quit [Quit: Leaving...]
<h0rrorvacui> seriously though I think middleman maybe referring to http://middlemanapp.com/
<MrZYX> lolmaus: on a side note, while your use is not forbidden, <fieldset> is intended to group controls: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset
<h0rrorvacui> I too have not used middleman
<atmosx> shevy: I knew that
<law> alright, second example: http://pastebin.com/8WteQfeP
mjs2600 has joined #ruby
CaptainJet has quit []
<law> why the first way and not the second?
<lolmaus> MrZYX, i think OOP is about programming, not HTML templates.
tannerburson has quit [Quit: tannerburson]
<MrZYX> you're putting a fair amount of logic in there already
benwoody has quit [Quit: benwoody]
<MrZYX> so I'd say you're beyond writing plain html
<atmosx> my girlfriend is watching this Turkish tv-series which makes me wanna kill myself
<atmosx> the monologues are NEVER-FUCKING-ENDING
<Hanmac> shevy: "its that time again" http://www.youtube.com/watch?v=EDkZRu_u5NU
<atmosx> I mean NEVER, the guy (which-ever-guy) talks like 45 minutes straight... wtf
mansi has quit [Remote host closed the connection]
<shevy> Hanmac you scare me
TDJACR has joined #ruby
<atmosx> hmm I got it. I'll use rsync...
momomomomo has joined #ruby
momomomomo has quit [Client Quit]
* atmosx puts his cheap low-level sony headphones one
<atmosx> shit on/one/s
pragmatism has quit [Quit: Leaving...]
mansi has joined #ruby
<h0rrorvacui> atmosx: what does rsync have to do with a turkish tv-series?
AleksEst has quit [Ping timeout: 260 seconds]
gasbakid has quit [Remote host closed the connection]
AleksEst has joined #ruby
<lolmaus> MrZYX, i'm not putting any logic. Just inserting data from variables, that's the most basic usage of templating.
<atmosx> h0rrorvacui: you are clearly not a programmer
mansi has quit [Remote host closed the connection]
ezkl has joined #ruby
ezkl has quit [Max SendQ exceeded]
mansi has joined #ruby
ezkl has joined #ruby
saarinen has joined #ruby
Mars has joined #ruby
gr33n7007h has quit [Ping timeout: 252 seconds]
<MrZYX> lolmaus: so this is all data anyway, it should come from the place where you call the root view. Now if you properly describe this data with objects, like a ProfileField class, your view will even get shorter, because all you need to do then is iterating over the array of ProfileField objects you'll get and pass each to the partial. Many templating languages even support a syntax to their render/partial for further simplifying that
<MrZYX> hm, grew that to big?
Mars is now known as Guest74546
gr33n7007h has joined #ruby
gr33n7007h has quit [Client Quit]
sambao21 has quit [Quit: Computer has gone to sleep.]
mmitchell has joined #ruby
gr33n7007h has joined #ruby
<h0rrorvacui> lolmaus: I agree with MrZYX that you could clean that up even if it is just filling in a template. The best way to do that is break it up into some objects.
_phansch has quit [Remote host closed the connection]
mansi has quit [Read error: Connection reset by peer]
<h0rrorvacui> It just seems ugly
mansi_ has joined #ruby
<billy_ran_away> Can anyone help me with this? "hey \xAE".force_encoding("UTF-8").blank? raises an exception ArgumentError: invalid byte sequence in UTF-8
kcombs has quit [Remote host closed the connection]
gr33n7007h has quit [Max SendQ exceeded]
<shevy> atmosx why would anyone wanna watch turkish videos... have you seen turkish comedy? it's not funny!
gr33n7007h has joined #ruby
<h0rrorvacui> atmosx: I still don't see the answer to why rsync and turkish tv series have in common.
<atmosx> shevy: I have no idea. No I don't watch videos usually.
ezkl has quit [Client Quit]
<h0rrorvacui> Is there some use of rsync that I do not know of.
gr33n7007h has quit [Read error: Connection reset by peer]
<atmosx> h0rrorvacui: sure, read the manual.
<shevy> billy_ran_away that string works for me
interactionjaxsn has joined #ruby
<shevy> >> "hey \xAE".force_encoding("UTF-8")
<eval-in> shevy => "hey \xAE" (https://eval.in/68624)
<shevy> billy_ran_away the bot also likes it
aspires has quit [Quit: sudo making a sandwich]
<billy_ran_away> Add a .blank?
<shevy> class String does not have this method
<billy_ran_away> >> "hey \xAE".force_encoding("UTF-8").blank?
<eval-in> billy_ran_away => undefined method `blank?' for "hey \xAE":String (NoMethodError) ... (https://eval.in/68625)
<h0rrorvacui> I mean its a simple fucking question? Are you compressing it or what?
<shevy> :)
<billy_ran_away> >> "hey \xAE".force_encoding("UTF-8").strip(' ')
<eval-in> billy_ran_away => wrong number of arguments (1 for 0) (ArgumentError) ... (https://eval.in/68626)
<h0rrorvacui> I mean you don't have to be an ass about it.
Tuxist has quit [Remote host closed the connection]
nouitfvf has quit []
zigomir has joined #ruby
<billy_ran_away> >> "hey \xAE".force_encoding("UTF-8").split(' ')
<eval-in> billy_ran_away => invalid byte sequence in UTF-8 (ArgumentError) ... (https://eval.in/68627)
<billy_ran_away> There we go!
<law> the only way I could see it even beginning to make sense is if I wanted to print different 'Sent!' messages depending on where in the program I would send a successful tweet
nouitfvf has joined #ruby
<shevy> hmmmmm
<law> other than that, I kind of see it as 'what's the point?'
<shevy> billy_ran_away weird
<h0rrorvacui> atmosx: and to be clear the unix world doesn't include all programmers
<atmosx> h0rrorvacui: only the skilled ones. (sic)
<shevy> Hanmac, why does the code above not work? ^^^
tharindu has quit [Quit: Leaving...]
<atmosx> h0rrorvacui: I'm just trolling, ndr
<billy_ran_away> cool bot though
<billy_ran_away> and page... I didn't know about that
vlad_starkov has joined #ruby
tsykoduk is now known as zz_tsykoduk
<shevy> atmosx do you dance to "simarik"? :)
<Hanmac> shevy because split likes to have a valid encoding
<Hanmac> >> "hey \xAE".split(' ')
<eval-in> Hanmac => invalid byte sequence in UTF-8 (ArgumentError) ... (https://eval.in/68628)
<Hanmac> >> "hey \xAE".b.split(' ')
<shevy> I am confused
anderson has left #ruby ["Leaving"]
<shevy> how gay is that?
sooli has joined #ruby
<shevy> in 1.8.x that was never a problem
<atmosx> blah
mixel_ has joined #ruby
zipper has quit [Ping timeout: 252 seconds]
mixel has quit [Ping timeout: 252 seconds]
mixel_ is now known as mixel
jkhwan has quit [Remote host closed the connection]
mansi_ has quit [Remote host closed the connection]
ItSANg___ has quit [Quit: Leaving...]
hiyosi has joined #ruby
<billy_ran_away> >> "hey \xAE".encode('UTF-8', 'binary', invalid: :replace, unef: :replace, replace: '').split(' ')
<eval-in> billy_ran_away => "\xAE" from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError) ... (https://eval.in/68629)
jkhwan has joined #ruby
mansi has joined #ruby
<shevy> hehehe
surrealanalysis has quit [Quit: surrealanalysis]
yfeldblu_ has joined #ruby
Guest74546 has quit [Read error: Connection reset by peer]
sambao21 has joined #ruby
aryaching has quit [Ping timeout: 246 seconds]
cody-- has quit [Quit: derp]
<billy_ran_away> >> "hey \xAE".encode('UTF-8', 'binary', fallback: Hash.new('?')).split(' ')
<eval-in> billy_ran_away => ["hey", "?"] (https://eval.in/68630)
interactionjaxsn has quit [Remote host closed the connection]
<billy_ran_away> boom!
<shevy> how does this work
<shevy> you encode into UTF-8 but also into binary?
interactionjaxsn has joined #ruby
<billy_ran_away> Not sure...
<shevy> >> "hey \xAE".encode('ascii', 'binary', fallback: Hash.new('?')).split(' ')
<eval-in> shevy => ["hey", "?"] (https://eval.in/68631)
yfeldblum has quit [Ping timeout: 272 seconds]
<shevy> I guess the first argument is disregarded
<billy_ran_away> The doc is not clear what those first parameters are... http://apidock.com/ruby/String/encode
mansi has quit [Ping timeout: 252 seconds]
mikeg has joined #ruby
<shevy> I am wrong
Jetchisel has joined #ruby
<shevy> >> "hey \xAE".encode('ascii', 'binary', fallback: Hash.new('?')).split(' ').join.encoding
<eval-in> shevy => #<Encoding:US-ASCII> (https://eval.in/68632)
hiyosi has quit [Ping timeout: 268 seconds]
<Evan_Donovan> i'm running CentOS 5 and i just installed the capistrano gem, but when i run cap production deploy, it says "-bash: cap: command not found"
jkhwan has quit [Ping timeout: 272 seconds]
<shevy> >> "hey \xAE".encode('UTF-8', 'binary', fallback: Hash.new('?')).split(' ').join.encoding
<eval-in> shevy => #<Encoding:UTF-8> (https://eval.in/68633)
<Evan_Donovan> what am i missing here?
<shevy> Evan_Donovan does capistrano come with this binary
<shevy> "binary"
<shevy> a file in bin/ directory
mansi has joined #ruby
bazaretas has quit [Ping timeout: 252 seconds]
zipper has joined #ruby
<shevy> I just installed it
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> it comes with bin/cap and bin/capify
interact_ has joined #ruby
<shevy> Evan_Donovan if I were you, I would try to find out where capify is
mikeg has quit [Remote host closed the connection]
<shevy> my guess is it is not in your $PATH
jkhwan has joined #ruby
<shevy> for me it works
<Evan_Donovan> ok that is a fair assumption to make; i will check
ckinni has joined #ruby
mikeg has joined #ruby
scarolan has joined #ruby
<shevy> on my system it is at /Programs/Ruby/Current/lib/ruby/gems/1.9.1/cache/capistrano-3.0.1.gem
interactionjaxsn has quit [Read error: Connection reset by peer]
<shevy> for default ruby it should be in /usr/lib/ruby* etc...
<shevy> for home installations, it should be in $HOME, perhaps .rvm or somewhere else
<shevy> some crazy people have it installed in /usr/local/lib
burlyscudd has quit [Quit: Leaving.]
<Evan_Donovan> i am using rvm
<shevy> :-)
nanoyak has quit [Quit: Computer has gone to sleep.]
yalue has quit [Quit: Leaving]
thumpba_ has joined #ruby
<Evan_Donovan> where would it go with rvm? i am still a newbie to this
Zeeo has joined #ruby
Andrevan has joined #ruby
elux has quit [Quit: Bye!]
surrealanalysis has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<shevy> Evan_Donovan surely your home dir
<shevy> but on linux you can find it anyway
pragmatism has joined #ruby
<shevy> find / -name capify
<shevy> or your home dir rather than /
p8952 has quit [Write error: Broken pipe]
typicalbender has quit [Quit: Leaving.]
<lolmaus> MrZYX, :collection just lets you combine multiple partial calls into one.
<MrZYX> which is my entire point m(
zz_tsykoduk is now known as tsykoduk
platypine has joined #ruby
platypine has joined #ruby
platypine has quit [Changing host]
<lolmaus> h0rrorvacui, so i have a lot of small partials. In page template, do you suggest that i manually assemble the required structure with those small partials?
benzrf has joined #ruby
<Evan_Donovan> home/edonovan/.rvm/gems/ruby-1.8.7-p371@chrisvol_on_rails/bin/cap
bassclef has joined #ruby
<benzrf> i think
sambao21 has joined #ruby
<benzrf> i MIGHT
<benzrf> be trying to write haskell in ruby
<benzrf> is there a support group for that
<h0rrorvacui> lolmaus: It maybe there is no need. You'll only know more down the road.
* Hanmac smells an outdated ruby version
bassclef is now known as Guest23222
<Evan_Donovan> shevy: so why is that not being recognized as part of my path?
<benzrf> why would a ruby program cause my computer to freeze, btw? memory usage?
thumpba_ has quit [Remote host closed the connection]
<Hanmac> benzrf: maybe the winter is coming or it try to make a Christmas theme?
_Chris has quit [Read error: Connection reset by peer]
emocakes has joined #ruby
Guest23222 is now known as fluffheadsr
jibi has quit [Ping timeout: 268 seconds]
<benzrf> har
aspiers has quit [Ping timeout: 246 seconds]
<benzrf> i doubt it, i'm agnostic and/or jewish
<benzrf> no christmas here in my life
aspires has joined #ruby
<Evan_Donovan> shevy: ok, i was just in the wrong rvm environment...it was a different one that the one i was trying to use
thelorax123 has quit [Remote host closed the connection]
saarinen has quit [Quit: saarinen]
<nobitanobi> shevy, today I learnt something really nice: http://pragdave.pragprog.com/pragdave/2005/11/symbolto_proc.html
<benzrf> nobitanobi: &:foo
<nobitanobi> yup
ce_afk is now known as cescalante
<benzrf> what i want is composition & sections & currying
<benzrf> is this so much to ask
bazaretas has joined #ruby
<Hanmac> benzrf: normaly memory usage would not cause a freeze, or how much memory is the process using? ... does it have a loop where its waiting for something?
<benzrf> no, my COMPUTER freezes
<benzrf> one sec ill show you my code
<benzrf> you may want to wear sunglasses to prevent eye damage
thelorax123 has joined #ruby
saarinen has joined #ruby
<nobitanobi> lol
<nobitanobi> shiny code?
<benzrf> no, overly-functional code
<benzrf> perhaps
<benzrf> im doing a challenge on codewars, the details are here:
scarolan has quit [Ping timeout: 272 seconds]
<benzrf> /bin/sh: 1: lclip: not found
<benzrf> oops
jbw has quit [Ping timeout: 272 seconds]
<benzrf> ^my code
andrewvos has left #ruby ["WeeChat 0.3.7"]
aspiers has joined #ruby
jibi has joined #ruby
lkba has joined #ruby
<shevy> Evan_Donovan I could not tell you why it is not recognized, I do not use and do not believe in rvm. I compile programs into "versioned app-dirs" into /Programs directory. my different rubies are at /Programs/Ruby/VERSION_HERE
sn0wb1rd has quit [Quit: See ya]
<shevy> benzrf perhaps a big loop
bazaretas has quit [Quit: Leaving]
bazaretas has joined #ruby
surrealanalysis has quit [Quit: surrealanalysis]
mengu has joined #ruby
mengu has joined #ruby
<benzrf> shevy: look at muh code?
tharindu has joined #ruby
reset has joined #ruby
sn0wb1rd has joined #ruby
mary5030 has quit [Remote host closed the connection]
* iajrz dances as he starts learning rails
<iajrz> thanks for being here, guys, learning ruby feels less lonely
<shevy> why do you use bpaste.net
<shevy> there are no colours
<benzrf> shevy: cuz of my #python background
<benzrf> and there are
mary5030 has joined #ruby
capicue has quit [Quit: Leaving...]
maletor has quit [Quit: Computer has gone to sleep.]
<benzrf> my pasting program is wrong atm
<benzrf> it tries to paste it as plaintext for some reason
<benzrf> maybe it does not recognize ruby syntax
<benzrf> 1 sec repasting thru the website
<iajrz> why not gist?
steinsgate is now known as dreamchaser
<benzrf> pfft, gist
cescalante is now known as ce_afk
<benzrf> im way too hipster to use something THAT popular
<shevy> benzrf you mentioned colours, can you show me http://oi39.tinypic.com/2q0ikhy.jpg
nanoyak has joined #ruby
Grantlyk_ has quit [Remote host closed the connection]
d45h has quit [Ping timeout: 268 seconds]
lnormous has joined #ruby
<benzrf> again, my pasting utility is failing to tell the site to use ruby coloring
Grantlyk has joined #ruby
<shevy> oh damn... I am logged in
mrsolo has quit [Quit: This computer has gone to sleep]
<benzrf> ^colored
<shevy> GOOD
<shevy> it's still an awful paste site but at least it shows colours now
<benzrf> D:
<benzrf> oh wait this is outdated code
<benzrf> bluh one sec
<shevy> end.all?
<shevy> awful
<benzrf> wait nvm
<benzrf> pffft
tharindu has quit [Ping timeout: 268 seconds]
<shevy> .collect_concat
mary5030 has quit [Ping timeout: 260 seconds]
<shevy> what is that
lmadrigal has quit [Quit: Computer has gone to sleep.]
<shevy> who invented it
<shevy> who must die
<shevy> tell me
<benzrf> >> [1, 2, 3].collect_concat {|n| [n,n,n]}
<eval-in> benzrf => [1, 1, 1, 2, 2, 2, 3, 3, 3] (https://eval.in/68636)
<benzrf> it looked friendly
<shevy> this must be an addition past 1.8.x
nazty has joined #ruby
<shevy> benzrf btw do you not use classes?
scarolan has joined #ruby
<benzrf> hm?
<shevy> it seems rather procedural
<shevy> method1
<benzrf> rly?
<shevy> method2
<shevy> method3
<shevy> finished script
superscott[8] has joined #ruby
<benzrf> why should i use a class for this
<benzrf> ._.
<benzrf> what would it gain me
<shevy> do you want to build a castle made from sand or made from granite
jbw has joined #ruby
<nobitanobi> hahaha
<benzrf> that's not a concrete nswer
<shevy> sure it is
tobyink has joined #ruby
<benzrf> why should i use a class
<shevy> you build on sand
<benzrf> how should i use it
<benzrf> you sound like a person stuck in an OO frame of mind
<benzrf> you use OO for when OO makes sense
<shevy> it's almost the same as non-class usage, except that you put things into a namespace for once (your class) and lend your code towards easier reusability
nitish has joined #ruby
Grantlyk has quit [Ping timeout: 272 seconds]
nitish has quit [Client Quit]
<shevy> I use OO because it is efficient
<nobitanobi> benzrf... shevy is a pretty open minded man
<benzrf> o rly
lmadrigal has joined #ruby
<tobyink> Maybe dumb question but, if I have a mixin module X and a class Y, how can I check if Y includes X. (And if a parent class of Y includes X, that does count!)
<shevy> benzrf just look at a living organism
<benzrf> classes are for defining a class of object
<benzrf> which is not something im doing here
<shevy> benzrf every cell is like a little minicomputer
atmosx has quit [Quit: computer went to sleep...]
<benzrf> shevy: have you accepted FP into your heart yet
<shevy> tobyink hmm tried with .ancestors yet? not sure if that covers it
<shevy> benzrf I don't see FP in biology, sorry
<shevy> it's more for mathematicians
gtc has quit [Quit: kill -9 gtc]
<benzrf> pfft yeah RIGHT
<benzrf> well OOP is more for engineers
<shevy> benzrf other than .all? and concat_concat your code seems fine
<tobyink> shevy: that does look like it will work - thanks!
JohnBat26 has quit [Ping timeout: 252 seconds]
<benzrf> whats wrong with all?
<benzrf> and collect_concat
<benzrf> also it runs real slow
<benzrf> and it has interesting issues
<shevy> benzrf depends on which kind of OOP, I don't like the C++ OOP much. my favourite guy on OOP is Alan Kay
gtc has joined #ruby
<shevy> the problem with .all? is that you chain it to end
<benzrf> when run that way, it freezes my comp
<shevy> where are the colours
atmosx has joined #ruby
<shevy> benzrf that code looks scary
cek has joined #ruby
<cek> i'd like to add some stuff to yaml emitter output
<Eiam> I have a website that I cannot get to give me a json feed for anything, so I need to scrape its content
angusiguess has quit [Ping timeout: 245 seconds]
<Eiam> anyone recommend a gem for doing that or should I just start regexing html?
<cek> i've done that in syck, now psych doesn't take that quick_emit method properly. Any guidelines on that?
<benzrf> ;p
<shevy> benzrf I don't actually know the card game rules but I would really try to turn it into a class and use some @ivars, at least for me that is much easier to debug or analyze. with benchmark module you can also see the bottlenecks, right now I dont know what is happening
ezkl has joined #ruby
<shevy> I still have not understood .concat_fattard
ezkl has quit [Client Quit]
Bry8Star{T2 has joined #ruby
<shevy> cek dunno, psych is still the reason I am not on 2.x :(
<benzrf> >> [1, 2, 3].collect {|n| [n, n, n]}
<eval-in> benzrf => [[1, 1, 1], [2, 2, 2], [3, 3, 3]] (https://eval.in/68637)
<cek> piece ofcrap
<benzrf> >> [1, 2, 3].collect_concat {|n| [n, n, n]}
<eval-in> benzrf => [1, 1, 1, 2, 2, 2, 3, 3, 3] (https://eval.in/68638)
<shevy> so that is like...
mary5030 has joined #ruby
<shevy> >> [1,2,3].map {|n| [n, n, n]}.flatten
<eval-in> shevy => [1, 1, 1, 2, 2, 2, 3, 3, 3] (https://eval.in/68639)
<shevy> why didn't you say so!
<benzrf> flatten *1*
<shevy> now it's simple
anderson has joined #ruby
jbw has quit [Ping timeout: 246 seconds]
<benzrf> it is like concat . map
<benzrf> in hs
<benzrf> ;)
<shevy> it's map in ruby too
<h0rrorvacui> benzrf: what is this card game doing?
<benzrf> h0rrorvacui: http://bpaste.net/show/150063/
<benzrf> oops
<benzrf> wrong one
<shevy> that is the problem, people who use .collect come from lazy programming corner :>
<shevy> h0rrorvacui I think it is blackjack
<benzrf> i would use .map_concat but it isnt a thing
<shevy> yes, map_concat is also awful
<shevy> benzrf we need a new programming language
mary5030 has quit [Remote host closed the connection]
typicalbender has joined #ruby
<benzrf> shevy: may i recommend haskell
<shevy> no
<Reach> why haskell?
<shevy> the ghc requires like 100 MB download
deception has quit [Quit: Goodbye]
<benzrf> because it rox
mary5030 has joined #ruby
<benzrf> shevy: you mean the haskell platform
<shevy> I dont need an OS
<tobyink> Haskell is nice enough if you don't want to do any IO.
d45h has joined #ruby
<benzrf> which includes a package manager & stuff
<benzrf> tobyink: it is
<shevy> what means "platform", what is the minimal haskell download?
<benzrf> it is also niced for IO
<benzrf> ;)
<benzrf> shevy: platform includes docs, package manager, & other stuff
<benzrf> like gem + ruby + ri + other stuff
<shevy> good, I dont need docs. I want something like php python lua ruby perl offer
<h0rrorvacui> I'm finding myself desiring classes as well
* tobyink can't stand the monad stuff. IO really doesn't sit well with the functional paradigm.
<benzrf> tobyink: monad stuff isnt that hard
typicalbender has quit [Read error: No route to host]
graydot has quit [Ping timeout: 252 seconds]
boboc has joined #ruby
typicalbender has joined #ruby
<tobyink> It's not hard; it's just an artificial way to pretend you can do IO and still have side-effect free programming.
<shevy> benzrf one thing makes me curious
<shevy> benzrf why are you not using haskell more?
<tobyink> It's an abstraction too far for me.
<benzrf> because i suck at it
mneorr has quit []
graydot has joined #ruby
<shevy> ok but you use python... you use ruby ...
<benzrf> shevy: actually i dont use ruby much
<shevy> how can you be good in other languages and not good in haskell
<tobyink> It offends my sense of taste.
<benzrf> ive been acclimating to it
<benzrf> shevy: because ive been doing programming for like 9 years
<shevy> benzrf see how easy it goes with ruby
<benzrf> and haskell is totally different from other languages
<shevy> like lisp!
<benzrf> so ive been doing [other languages] for 9 years, and haskell for about 6 months
<h0rrorvacui> Well have you been programming in an academic setting?
<benzrf> therefore, obv ill suck more
<benzrf> h0rrorvacui: never
boboc has quit [Client Quit]
<tobyink> Haskell is not much different from, say, Miranda.
<benzrf> tobyink: well, ok, pure fp langs
<benzrf> ;p
<shevy> the chat program?
boboc has joined #ruby
<h0rrorvacui> What language did you use? It seems you hate OOP.
<benzrf> i don't, at all
<h0rrorvacui> Reminds me of someone writing c in ruby
<benzrf> OOP is great for some things
<benzrf> and bad for other things
<benzrf> it's great for representing a lot of similar things that contain shared behavior
<benzrf> but not so much for 3 functions that use no new data types
<benzrf> :P
<h0rrorvacui> Sounds like a pythonista :P
<shevy> hey
<benzrf> sounds like a sane person
<benzrf> LD
<shevy> they use OOP too
<benzrf> * :D
<benzrf> yes, everything is an object in python
<shevy> he sounds more like a haskell person
<h0rrorvacui> shevy: yeah but they prefer to defer oop till they need it
<benzrf> including functions!
mikeg has quit [Ping timeout: 268 seconds]
petey has quit [Remote host closed the connection]
<shevy> benzrf how can you love haskell yet you code so much in non-haskell :D
<benzrf> i may have mentioned that i suck at haskell
<benzrf> also it's not good for scripting
maletor has joined #ruby
snkcld has joined #ruby
<benzrf> or at least i have yet to see a good scripting lang for it
<benzrf> *lib
<shevy> h0rrorvacui well as long as python's OOP model is better than perl's ...
typicalbender has quit [Ping timeout: 260 seconds]
<h0rrorvacui> pythonistas tend to prefer the use of functions unless you need to hand state and behavior together
<benzrf> shevy: way way way better
keen___ has quit [Read error: Connection reset by peer]
<h0rrorvacui> then they use classes
<benzrf> h0rrorvacui: well that is the point of objs
<benzrf> why use them for anything else?
<h0rrorvacui> true
keen_ has joined #ruby
<benzrf> that's like using closures to store state
<benzrf> *using classes to store funcs
mjs2600 has quit [Remote host closed the connection]
<benzrf> i enjoy python's philosophy, it's the lack of fp that im sad about
<benzrf> truly gvr is a tyrant
<benzrf> :-D
<Kamuela> I feel like learning the associations in rails is 80% of the battle
<shevy> benzrf does ruby lack fp too?
<h0rrorvacui> no
<h0rrorvacui> depends who you ask
<benzrf> shevy: heck no
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Kamuela> almost becomes pointless to have someone else do your coding if you can engineer your product well enough. it's like taking notes
<benzrf> by FP i mainly mean HOF i guess
<benzrf> *HOFs
thelorax123 has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
<h0rrorvacui> benzrf: I suggest you read poodr book
<benzrf> maybe i am defining this overly narrowly
<benzrf> h0rrorvacui: poodr?
Jetchisel has quit [Quit: Unfortunately time is always against us -- *Morpheus*]
<Eiam> meh will use nokogiri
thumpba_ has joined #ruby
mary5030 has joined #ruby
<h0rrorvacui> Sandi Metz's book
<shevy> Kamuela one reason: lack of time
Mars has joined #ruby
Mars is now known as Guest95462
thelorax123 has joined #ruby
jbw has joined #ruby
<Kamuela> shevy, yeah exactly. it comes down need someone else to process all your ideas faster than you can type em lol
<Kamuela> to needing*, hmm, my fingers are lazier than I am I think
d45h has quit [Ping timeout: 265 seconds]
danman has quit [Quit: danman]
mjs2600 has joined #ruby
simoz has joined #ruby
aspires has quit [Quit: sudo making a sandwich]
Grantlyk has joined #ruby
mjs2600 has quit [Remote host closed the connection]
typicalbender has joined #ruby
watermel0n has joined #ruby
thumpba_ has quit [Remote host closed the connection]
<nobitanobi> Say I have a Hash object, and I want it to pass to several functions to fill it up. Is it ok ("ok" Ruby) if those functions don't return anything, but just fill the Hash up?
mary5030 has quit [Ping timeout: 263 seconds]
<benzrf> nobitanobi: !!!
<benzrf> nobitanobi: GOOD LORD HOW AWFUL
d45h has joined #ruby
<nobitanobi> benzrf, ?
<benzrf> jk
<benzrf> but seriously, imo at least a method should only ever mutate self
<benzrf> and nothing else
boboc has quit []
<benzrf> *nothing else that persists outside of the method
capicue has joined #ruby
<benzrf> otoh sometimes that leads to bad performance
<benzrf> its your callf
ner0x has quit [Quit: Leaving]
stringoO has quit [Quit: stringoO]
vlad_sta_ has joined #ruby
<shevy> Kamuela I would do that, but right now I only have time, not money ;)
typicalbender has quit [Client Quit]
mjs2600 has joined #ruby
mjs2600 has quit [Remote host closed the connection]
nateberkopec has quit [Quit: Leaving...]
<shevy> nobitanobi I dont quite grok it yet
<benzrf> nobitanobi: anyway mutation of state is a major cause of bugs
<benzrf> WHICH IS WHY YOU SHOULD USE HASKELL
<benzrf> 8D
<shevy> nobitanobi you can use methods to populate your hash with valid data, sure
hiyosi has joined #ruby
<nobitanobi> shevy, ok
four33 has quit [Remote host closed the connection]
<shevy> nobitanobi ruby is all about data structures anyway
<benzrf> shevy: what if you momentarily forget that it mutates, though?
<benzrf> you could get nasty bugs
mikeg has joined #ruby
<shevy> benzrf mutates what or how
<shevy> my hash?
<benzrf> also, the code is less clear to outsiders
<Kamuela> shevy, I'm actually looking for a rails prototyper on odesk right now :)
<benzrf> the hash passed in
<shevy> sure it must change my hash and I will ensure with my own code how it does so
diegoviola has quit [Quit: WeeChat 0.4.2]
<shevy> benzrf my code is clear :)
<benzrf> if I say:
<benzrf> foo = {}
<benzrf> bar(foo)
vlad_starkov has quit [Ping timeout: 265 seconds]
<shevy> what is this shit
<benzrf> in general, foo being different is more confusing than not
<benzrf> foo = bar(foo) is more clear
<shevy> I would never do that
<atmosx> shit
<benzrf> do what?
<shevy> either that
<benzrf> ??
<nobitanobi> shevy, how would u do it?
<atmosx> neither I
<shevy> benzrf first off you don't use @ivars here!
<benzrf> wat
<benzrf> he is asking about that
<atmosx> I eat nutella
* atmosx is a ninja
<benzrf> if it is ok to write a function that takes a hash and populates it directly
<shevy> atmosx fat ninja
<benzrf> i.e. mutation of argument
<benzrf> i.e.
<benzrf> foo = {}
Tarential has quit [Excess Flood]
<benzrf> bar(foo)
<benzrf> # foo is different now
<shevy> benzrf yeah as said, it makes little sense what he wants to do but he should do what he wants to do
<benzrf> pfft
<atmosx> shevy: hey, you take that back... I'm a little fat lately.
Tarential has joined #ruby
<atmosx> I need to do some sort of diet
<shevy> atmosx and jogging
snatch has joined #ruby
vlad_starkov has joined #ruby
nateberkopec has joined #ruby
<benzrf> if we let everybody do what they wanted to, code would be unreadbable!
<benzrf> *ignore that first b
<shevy> benzrf it already is in ruby :(
<benzrf> HA
* snatch bans benzrf
<snatch> I could do w/e I want
Guest95462 has quit [Ping timeout: 265 seconds]
* snatch sees myself out
<benzrf> snatch: excuse me but i subscribe to the zen of python
clusterfoo has quit [Ping timeout: 272 seconds]
<benzrf> python -c 'import this'
aspiers has quit [Ping timeout: 260 seconds]
mikeg has quit [Remote host closed the connection]
<nobitanobi> shevy, how would you do it though?
<benzrf> 1-27: they do not write functions that mutate their args
mjs2600 has joined #ruby
<benzrf> :p
<benzrf> atmosx: 1 is true for me; python
<benzrf> i should hope most people go for 2
<shevy> nobitanobi I dont know what you are trying to solve, it just barely comes to me. I let the objects solve such things, what they use internally is never an issue for me
myappleguy has quit [Ping timeout: 264 seconds]
danshult_ has quit [Remote host closed the connection]
<benzrf> i try for 3
vlad_sta_ has quit [Ping timeout: 252 seconds]
<benzrf> ok 4 is not true for me >.>
<Eiam> damn I fail at #1. I don't know any languages inside an out
mikepack has quit [Ping timeout: 272 seconds]
danshultz has joined #ruby
<shevy> Eiam haha same here
<benzrf> i know python real good
<shevy> I speak a bit python
<Eiam> I fail at almost all of these, good thing I'm not a professional programmer =p
<benzrf> if python just had HOFs like ruby it would be easily my favde
<shevy> sshss zzss Szshh?
<benzrf> *fave
danshultz has quit [Read error: Connection reset by peer]
<benzrf> shevy: sshhhhhsss zzzhhhsssh
<shevy> damn you are better
mjs2600 has quit [Remote host closed the connection]
<nobitanobi> shevy, ok...
<nobitanobi> :)
<Eiam> i interviewed a guy the other day and he said "well we call ourselves Engineers don't we"
hiyosi has quit [Ping timeout: 252 seconds]
mjs2600 has joined #ruby
<benzrf> Eiam: ...
<Eiam> I thought man, I sure hope we learned to call ourselves "programmers" or "Developers" to not disparage real engineering~!
<shevy> my cat occupies my learning chair :(
nanoyak has quit [Quit: Computer has gone to sleep.]
binaryplease has quit [Ping timeout: 246 seconds]
<h0rrorvacui> Eiam: I prefer developer over software engineer tbh.
<Eiam> yes, I don't like the word engineer being used to describe software dudes
<shevy> engineer are those guys that build skyscrapers no?
<benzrf> shevy: FP is all about flow of data & messing with functions
<shevy> benzrf sounds like ruby
<Eiam> I build sky scraping code, its big & heavy!
<Eiam> and probably uses some regex to scrape something somewhere =)
<benzrf> shevy: the key part of FP is reusability and combinability & stuff
<h0rrorvacui> Though its reasonable that some people are applying engineering principles to software development and are software engineers
<benzrf> genericness etc
<Eiam> h0rrorvacui: yeah for me engineer implies a set of rigor and officialness that I don't think programming generally has.
<shevy> benzrf yup, totally ruby now
<shevy> :)
<benzrf> well that's a feature of most modern paradigms
<h0rrorvacui> Just most of what we call software engineers are not really doing any engineering in that sense.
RichardBaker has joined #ruby
<benzrf> FP & OOP are both approaches to this
<h0rrorvacui> FP just doesn't model the real world as well :P
<h0rrorvacui> lol
<benzrf> In FP it's more about writing simpler functions that can be composed and reused in interesting ways
<benzrf> h0rrorvacui: pfft
<h0rrorvacui> FP is like a utopia in programming.
<Evan_Donovan> i've got the following line of code throwing a 500 Error: referer_data = cookies[:"_pk_ref.3.d77e"]
<shevy> ruby could be made simpler
<h0rrorvacui> Thats why something in-between is best imo
<shevy> benzrf can you become a guru in C and make a better language?
<benzrf> shevy: haskell is incredibly bare bones as languages go really
<Evan_Donovan> the error is NoMethodError (private method `gsub' called for ["", "", "1384552632", "https://www.google.com/"]:Array):
<benzrf> shevy: what are you asking
mjs2600 has quit [Ping timeout: 265 seconds]
<shevy> benzrf create a new programming language
<benzrf> shevy: why dont you tell me what you want in a language
<h0rrorvacui> we could really do that if you watn
<h0rrorvacui> want*
<benzrf> then ill tell you why haskell can do that for you
<benzrf> ( ͡° ͜ʖ ͡°)
<shevy> Evan_Donovan you have an array and you try .gsub on it, which does not exist on array
<h0rrorvacui> List the features lets do ti.
<h0rrorvacui> it*
zoee has quit [Quit: This computer has gone to sleep]
snatch has left #ruby ["Leaving"]
<shevy> benzrf hmm that's quite a long list of features
<benzrf> ^^wasbeing facetious
jbpros has joined #ruby
<h0rrorvacui> no really list them
<benzrf> shevy: ok what do you not like about ruby
sooli has quit [Ping timeout: 260 seconds]
mjs2600 has joined #ruby
<Evan_Donovan> i thought that cookies in ActionDispatch was supposed to return a value (i.e., a string)
<shevy> benzrf basically something that very closely resembles real biological cells. but in addition to that, also allows for pragmatic solving of problems with terse/succint syntax
<shevy> benzrf I hate that modules and classes are artifically separated
<benzrf> the latter resembles haskell for me
<benzrf> ;p
ItSANgo has joined #ruby
<benzrf> what in ruby does not sound like real biological cells?
<benzrf> can you be more detailed
<shevy> benzrf uh didn't you say haskell does not store state? but a biological cell always has state, the genome. if you combine this in a multicellular organism, you have like a collection of minicomputers with different internal data
<h0rrorvacui> some reason that made me think of turing machines and the finite state representations
<shevy> benzrf ruby is very far away from being anywhere close to biological cells
aryaching has joined #ruby
<h0rrorvacui> maybe because the drawings look like little cells
<h0rrorvacui> lol
<benzrf> basically in haskell, you cannot set state outside of your current function
<benzrf> nor can you mutate anything
zipper has quit [Ping timeout: 272 seconds]
<shevy> benzrf I think for one, you would need to be able to make reliable snapshots of everything at all time. If you use marshall, I dont think you can restore the original code that gave rise to the object
<benzrf> so data flow happens entirely through function arguments
<benzrf> shevy: oh haskell has that
<h0rrorvacui> currying
watermel0n has quit []
<benzrf> like compeltely
lnormous has quit [Ping timeout: 252 seconds]
<h0rrorvacui> ?
<h0rrorvacui> ohh
heidi has joined #ruby
<benzrf> shevy: by 'lack of state', the real meaning is that data cannot move through any means other than function args & returns
<h0rrorvacui> You want to be able to unmarshall the code?
<benzrf> most other usages of state work
<shevy> h0rrorvacui I want to restore everything all the time and continue to work and modify it. a bit like that squeak thing of smalltalk, that would be cool
<benzrf> shevy: so you cannot set an ivar, then see it from another functoin without returning anything
platzhirsch has joined #ruby
nouitfvf has quit []
mjs2600 has quit [Remote host closed the connection]
<benzrf> shevy: one cool thing about haskell is that since there is no universal state and no side effects, functoins will ALWAYS behave the same, regardless of context
<benzrf> so you can rely more on the behavior of your program
allsystemsarego has quit [Quit: Leaving]
<benzrf> this also allows better compiler optimization
sexist has joined #ruby
<sexist> >> class Woman; end; Woman.new.is_a? Object
<eval-in> sexist => true (https://eval.in/68659)
sexist has left #ruby ["WeeChat 0.4.1"]
<h0rrorvacui> benzrf: what do you not like about haskell then?
<shevy> hehehe
<shevy> that it's not a scripting language
nanoyak has joined #ruby
<h0rrorvacui> It seems you don't need another language
lancepantz has quit [Ping timeout: 245 seconds]
<benzrf> h0rrorvacui: I'm just too new to it and its ideas
<benzrf> and it doesnt seem so good for quick n dirty programs
<shevy> 6 months haskell
d4heyDU has quit [Quit: d4heyDU]
<benzrf> ive been coding procedural and imperative for like 9 years
<h0rrorvacui> What about lua?
<shevy> and you still can't find a good use for it
dubsteph has joined #ruby
<benzrf> i'm too used to it to jump over this sec
<shevy> ok
<h0rrorvacui> What does it lack?
<shevy> we ask you every new month
bean has quit [Ping timeout: 264 seconds]
<benzrf> h0rrorvacui: why SHOULD I use lua?
<h0rrorvacui> no functional purity?
<shevy> lua's biggest problem is
<Hanmac> shevy my reaction about working golfed ruby code: https://i.chzbgr.com/maxW500/7901128704/h376631F3/
<shevy> it does not use # for comments
<shevy> :(
<shevy> Hanmac how do you find these
<shevy> these are SO UGLY
platypine has quit [Ping timeout: 246 seconds]
<h0rrorvacui> I like that Lua is so small you could grok the whole thing in a short time
<benzrf> h0rrorvacui: have you seen Io
<benzrf> it looks pretty awesome
lancepantz_ has joined #ruby
lancepantz_ is now known as lancepantz
<h0rrorvacui> Yes
<benzrf> but not so practical
<h0rrorvacui> What about Go?
bean has joined #ruby
<benzrf> I think my ideal language might be Io, with pythonic syntax, and lots of HOFs in the stdlib
<benzrf> h0rrorvacui: idk about go
<Hanmac> shevy: http://geek.cheezburger.com/cartoons for sample
<benzrf> it looks boring
<benzrf> :I
<h0rrorvacui> I don't either
<h0rrorvacui> What does it lack in the functional department?
<benzrf> which?
teoric has joined #ruby
ngoldman has joined #ruby
clusterfoo has joined #ruby
<benzrf> Io or go?
<h0rrorvacui> go-lang
tobyink has quit [Ping timeout: 272 seconds]
<benzrf> dunno
<benzrf> havent looked at it much
teoric has quit [Client Quit]
<benzrf> it looks kinda c-like
<benzrf> But with more modern conveniences
<h0rrorvacui> what about Rust?
nhmood has quit [Ping timeout: 246 seconds]
<benzrf> havent really learned it
<benzrf> i only know it by rep mostly
<emocakes> go is nice
rudisimo has quit [Quit: Leaving.]
<emocakes> honestly just started using it last night
clusterfoo has left #ruby [#ruby]
<emocakes> stayed up till 4am having heaps of fun
<emocakes> its really fun
<emocakes> and freaking fast oob
<benzrf> emocakes: sounds like me starting python
<benzrf> except the last one
<emocakes> :p
<benzrf> then again my go-to lang was java before it
drag00n has quit [Ping timeout: 265 seconds]
<emocakes> well i started with php
<emocakes> then went to ruby
<benzrf> i dislike timtowtdi
gigetoo has quit [Remote host closed the connection]
<h0rrorvacui> Rust is fun too.
<emocakes> and now im thinking of just doing go and maybe some ruby
hamakn has joined #ruby
<emocakes> never played rust
<benzrf> probably because of my pathological need to be right
<xibalba> you guys work as devs?
<h0rrorvacui> Check it out. I think rust has a future in the game development world.
<emocakes> used to xibalba
<emocakes> at the moment i dont know what im doing
<h0rrorvacui> It could be a great language for game development when it matures.
<h0rrorvacui> Rust even looks like ruby at times
kcombs has joined #ruby
<h0rrorvacui> or well with the iterators and stuff
<h0rrorvacui> it looks more like C though
<benzrf> i used to do minecraft modding
<benzrf> maybe if i ever learn scala ill go back to it
tharindu has joined #ruby
* Kamuela reminds h0rrorvacui that Ruby is C
<benzrf> Kamuela: u wot
<h0rrorvacui> it is implemented in c
carraroj has joined #ruby
<h0rrorvacui> thats different
<xibalba> Ruby is Ruby
<xibalba> Ruby isn't C
jerius has quit []
<xibalba> C is C
lmadrigal has quit [Quit: Computer has gone to sleep.]
<xibalba> C isn't Ruby
mrsolo has joined #ruby
drumsrgr8forn8 has quit []
pixelgremlins has quit [Ping timeout: 272 seconds]
<benzrf> ok, so if my prog is freezing my computer, how can I limit its resources to figure out what it's using so much of?
atmosx has quit [Quit: Lost in trance]
<benzrf> [ruby[
<h0rrorvacui> Variables in Rust are immutable by default
<benzrf> oh neat
<xibalba> benzrf, linux/windows?
lmadrigal has joined #ruby
<h0rrorvacui> so that should make you like it even more benzrf
<benzrf> xibalba: what do you think from what youve heard coming out of my mouth
<benzrf> :D
<xibalba> benzrf, if linux 1st/easiest step is to Re-Nice the process
<benzrf> *keyboard
<geggam_> ulimits
<benzrf> xibalba: i know little about [re]nice
<xibalba> open `top` as root
<xibalba> re-nice the process
maletor has quit [Quit: Computer has gone to sleep.]
<xibalba> hit 'r', then i think the NICE #, then the PId
<benzrf> what number?
<xibalba> try NICE NUM of 20 (lowest priority)
hamakn has quit [Ping timeout: 268 seconds]
<benzrf> see you if this crashes me
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby
<emocakes> erlang!!
jbpros has quit [Quit: jbpros]
Jetchisel has joined #ruby
tharindu has quit [Ping timeout: 272 seconds]
Tearan has quit [Quit: Sleepy Badger....]
<h0rrorvacui> emocakes: erlang for a scripted feeling functional language?
kaspergrubbe has joined #ruby
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Bry8Star{T2 has quit [Remote host closed the connection]
DanBoy has quit [Remote host closed the connection]
DrCode has quit [Remote host closed the connection]
nhmood has joined #ruby
nhmood has quit [Max SendQ exceeded]
capicue has quit [Ping timeout: 272 seconds]
nhmood has joined #ruby
nhmood has quit [Max SendQ exceeded]
d45h has quit []
_FL1SK has quit [Read error: Connection reset by peer]
nhmood has joined #ruby
nhmood has quit [Max SendQ exceeded]
FL1SK has joined #ruby
blackmes1 is now known as blackmesa
nhmood has joined #ruby
nhmood has quit [Max SendQ exceeded]
havenwood has quit [Ping timeout: 260 seconds]
nhmood has joined #ruby
ckinni has joined #ruby
petey has joined #ruby
Bry8Star{T2 has joined #ruby
maletor has joined #ruby
DrCode has joined #ruby
heidi has quit [Quit: Leaving.]
benzrf_ has joined #ruby
<benzrf_> hello
<benzrf_> it froze
<h0rrorvacui> well
<benzrf_> i pressed ctrl+alt+F1, which took 5 minutes
<benzrf_> then i killall -KILL'd it
<benzrf_> vt7 is still not responding except for the mouse
CaptainKnots has quit [Quit: bazinga!]
<benzrf_> oh it's starting to function
CaptainKnots has joined #ruby
banghouse2 has joined #ruby
snkcld has quit [Ping timeout: 272 seconds]
DanBoy has joined #ruby
jbw has quit [Ping timeout: 252 seconds]
carlyle has quit [Remote host closed the connection]
aspires has joined #ruby
<benzrf> there we go
<benzrf> still a bit slow
No1_Tah has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
benzrf_ has quit [Client Quit]
tharindu has joined #ruby
Grantlyk has quit [Read error: Connection reset by peer]
Grantlyk_ has joined #ruby
<benzrf> 'ruby-prof tmp.rb | tail -n +7 | head -n -2 | sort -n -k 2 | less'
<benzrf> that deadly, deadly command
<benzrf> :B
ShellFu has quit [Quit: Leaving]
camilasan has joined #ruby
simoz2 has joined #ruby
<benzrf> oh hey firefox is still froze
<benzrf> ;-;
simoz has quit [Ping timeout: 260 seconds]
dnyy has quit [Read error: Connection reset by peer]
dnyy has joined #ruby
camilasan has quit [Remote host closed the connection]
camilasan has joined #ruby
mjs2600 has joined #ruby
No1_Tah has quit [Client Quit]
carraroj has quit [Quit: Konversation terminated!]
tharindu has quit [Ping timeout: 245 seconds]
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nateberkopec has quit [Quit: Leaving...]
yfeldblu_ has quit [Ping timeout: 260 seconds]
nbouscal has quit [Quit: IRCRelay - http://ircrelay.com]
nitish has joined #ruby
nitish has joined #ruby
nitish has quit [Changing host]
ivanoats has quit [Quit: IRCRelay - http://ircrelay.com]
Kudos has quit [Quit: IRCRelay - http://ircrelay.com]
yfeldblum has joined #ruby
linguini has joined #ruby
agorman has left #ruby ["Leaving"]
camilasan has quit [Ping timeout: 245 seconds]
h0rrorvacui has quit [Quit: ZQ]
gazarsgo has quit [Ping timeout: 272 seconds]
<linguini> RubyVm.total_memory # does something like this exist?
simoz has joined #ruby
simoz2 has quit [Ping timeout: 252 seconds]
yfeldblum has quit [Remote host closed the connection]
Mars has joined #ruby
jonathanwallace has quit [Ping timeout: 245 seconds]
jbw has joined #ruby
Mars is now known as Guest1054
mlpinit_ has quit [Quit: Leaving...]
<benzrf> >> RubyVm
<eval-in> benzrf => uninitialized constant RubyVm (NameError) ... (https://eval.in/68672)
yfeldblu_ has joined #ruby
<Hanmac> >> RubyVM
<eval-in> Hanmac => RubyVM (https://eval.in/68673)
macmartine has joined #ruby
valesk has joined #ruby
lmadrigal has quit [Quit: Computer has gone to sleep.]
heidi has joined #ruby
aa47f8_ has quit [Quit: aa47f8_]
ngoldman has quit [Remote host closed the connection]
yfeldbl__ has joined #ruby
<platzhirsch> What's the printf variable to fill up remaining space with whitespace?
<platzhirsch> %40s or so
mansi has quit [Remote host closed the connection]
jimmy_birer has joined #ruby
<jimmy_birer> Man, this sucks
<shevy> >> '%10s' % '1'
<eval-in> shevy => " 1" (https://eval.in/68674)
<jimmy_birer> I want a documentation for Ruby
<jimmy_birer> not tutorials
<jimmy_birer> Like for C or PHP
<jimmy_birer> a manual
jbw has quit [Read error: Operation timed out]
_maes_ has joined #ruby
<platzhirsch> man pages?
<platzhirsch> there is ri
mansi has joined #ruby
<jimmy_birer> no not that
<DanBoy> the ruby way
jbw has joined #ruby
<DanBoy> might fit your needs
<jimmy_birer> you know i am hungry to know everything about it
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jimmy_birer> and i dont want detail-lacking documentation
<jimmy_birer> i have an extreme interest for the language
RichardBaker has quit [Quit: RichardBaker]
<jimmy_birer> :)
sailias has quit [Ping timeout: 272 seconds]
<shevy> jimmy_birer memorize this http://ruby-doc.org/core-2.0.0/String.html then continue with Array Hash Object Kernel
fixl has joined #ruby
s_e has quit [Excess Flood]
maletor has quit [Quit: Computer has gone to sleep.]
<platzhirsch> maybe http://rubyspec.org/
<platzhirsch> that's the closest you get to a language specification
ngoldman has joined #ruby
<shevy> yes, memorize the ruby spec after that too
yfeldblu_ has quit [Ping timeout: 240 seconds]
cgore has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
<jimmy_birer> Will do.
<shevy> people are so eager to learn everything
<jimmy_birer> Especialy the String one
<platzhirsch> I was kind of confused with RubySpec, because I read over "executable specification" and expected something similar to the Java Language Specification
<shevy> back in the day it was sufficient to just write ruby scripts
s_e has joined #ruby
interact_ has quit [Remote host closed the connection]
<jimmy_birer> shevy: i dont see anything bad with that
<platzhirsch> some implementation specifics are not even documented in English, but in Japan
<platzhirsch> japanese
randomnick_ has joined #ruby
<platzhirsch> jimmy_birer: don't dig too deep. You might not like what you find
<shevy> jimmy_birer if you have a lot of time sure, but when one does not it becomes difficult to want to know everything
banister has joined #ruby
<jimmy_birer> well i understand the need to grasp only what's useful
<shevy> I didnt read the rubyspec
<jimmy_birer> when you need to get stuff done
<jimmy_birer> but i am getting work done in ruby etc
<jimmy_birer> i want ruby as a hobby language to play with
<platzhirsch> :o)
banisterfiend is now known as banister`
banister is now known as banisterfiend
mansi has quit [Ping timeout: 252 seconds]
<jimmy_birer> i am getting work done in php etc*
<benzrf> D:
<platzhirsch> You mean getting shit done? Being productive
<jimmy_birer> yup
<jimmy_birer> productivity using php / mysql etc (I am a Web Dev)
sriehl has quit [Quit: Leaving...]
RichardBaker has joined #ruby
<jimmy_birer> might even learn rails
<jimmy_birer> after this
<platzhirsch> I feel very uncool with Rails, like the Party is over and I am drinking from the half empty-cups
<shevy> hehe
ngoldman has quit [Ping timeout: 272 seconds]
<platzhirsch> no idea what the cool kids are doing that day. Probably I should write Go libraries
ngoldman has joined #ruby
RichardBaker has quit [Client Quit]
OdNairy has quit []
lmadrigal has joined #ruby
RichardBaker has joined #ruby
<Kamuela> remember that ultimately rails is rooted in ruby
ivanoats has joined #ruby
amacgregor has quit [Read error: Connection reset by peer]
<Kamuela> at first, i didn't think much of that. but damn, ruby is so awesome that it becomes hard to ignore
amacgregor has joined #ruby
Liquid-- has quit [Quit: Computer has gone to sleep.]
<platzhirsch> sure, Ruby puts the fun in function
<Kamuela> haha
<shevy> except that it uses methods
<Kamuela> it pretty much has to use methods right
<Kamuela> since everything is an object
<shevy> hmm
<platzhirsch> yeah, I mean the fun in functions of a DSL written in Ruby
<shevy> there is UnboundMethod
<benzrf> Kamuela: python has eiao
<Kamuela> i'm thinking of how Java categorized things though
<benzrf> and it uses first class functoins
<benzrf> like js
johnnyfuchs has quit [Quit: Leaving.]
<shevy> Kamuela, see
RichardBaker has quit [Client Quit]
<shevy> >> Array.instance_method("pop").class
<eval-in> shevy => UnboundMethod (https://eval.in/68675)
<shevy> >> Array.instance_method("pop").class.ancestors
<eval-in> shevy => [UnboundMethod, Object, Kernel, BasicObject] (https://eval.in/68676)
simoz has quit [Ping timeout: 252 seconds]
<shevy> well
<shevy> seems as if UnboundMethod is a subclass of Object
banisterfiend has quit [Quit: Textual IRC Client: www.textualapp.com]
<Kamuela> shevy, what is that showing me? can you use instance_method to define a function?
<shevy> Kamuela, I thought an unbound method was free
<platzhirsch> wow, 53 people in #go. This language is super hipster stuff
<shevy> like a function
simoz has joined #ruby
<shevy> platzhirsch google must die in a fire
<platzhirsch> oh the board game, nvm
<shevy> lol
<zigomir> platzhirsch, why even bother what "cool kids" are using?
<Kamuela> shevy, ok then yeah ruby does seem to have functions technically
<SloggerKhan> Maybe go is so amazing it doesn't need people chatting about it in IRC.
<shevy> Kamuela I am not sure...
<platzhirsch> 875 people, yeah more like it
<shevy> Kamuela, lemme try to find out
<Kamuela> zigomir, it's funny you say that. I went looking at Dart the other day...
mrsolo has quit [Quit: This computer has gone to sleep]
banister has joined #ruby
<shevy> CAN ANYONE HERE GIVE ME OF A TRUE FUNCTION EXAMPLE IN RUBY?
<shevy> the OF was too much
<benzrf> shevy: explain
<shevy> benzrf a function in ruby
<benzrf> ruby has methods
<Kamuela> zigomir, and I found that even though I've only been using rails for a week and a half, and ruby for the same time, wow. what a stupid-ass clumsy DSL dart is
<platzhirsch> zigomir: because I want to constantly move on and not spent my last days coding COBOL
<benzrf> they are mostly equivalent with functions in most imperative langs
<shevy> benzrf is there any function in ruby?
<benzrf> if you consider methods to be functions, then yes
banister is now known as banisterfiend
<platzhirsch> zigomir: no seriously, I think there are languages which teach overarching concepts and you can learn from them
<shevy> are methods functions and are functions methods?
thesheff17 has quit [Ping timeout: 252 seconds]
<platzhirsch> Ruby does not distinguish between methods and functions, does it
havenwood has joined #ruby
<benzrf> shevy: depends on your definition
<zigomir> i think you can learn a lot from ruby, it won't do you any bad to learn it and move this knowledge to next platform you'll use
elux has joined #ruby
<Kamuela> shevy, yeah, as a definition, i tend to think of it the java way: e.g. that functions are procedural and methods are OOP
<Kamuela> shevy, that methods have mommies and daddies
Astralum has quit [Ping timeout: 272 seconds]
<Kamuela> or i suppose "nouns" rather
<jimmy_birer> ^Croot@debian:~# gem rdoc --all --ri --no-rdoc
<jimmy_birer> ERROR: No matching gems found
<jimmy_birer> ^ Why does this happen?
<zigomir> platzhirsch, if it can solve your problems of today I wouldn't spent too much time of seeking "the cool one" just yet
nicoulaj has quit [Remote host closed the connection]
jkhwan has quit [Remote host closed the connection]
jkhwan has joined #ruby
Fire-Dragon-DoL has joined #ruby
<platzhirsch> zigomir: well then I could have sticked savely to Java :D I learned Ruby more out of interest and employabability
nisstyre has joined #ruby
* Eiam doesn't think Ruby is a good "first language"
* platzhirsch agrees
<zigomir> sure... maybe you're right. I'm always for learning new stuff ... but learning or doing something new just for the cause sometimes seems not a good option
<jimmy_birer> my first was C
talntid has quit []
<Eiam> I love ruby, its totally my favorite language right now
<Eiam> but I don't recommend it to new programmers.
<Eiam> jimmy_birer: mine was C++ ha =/
<platzhirsch> zigomir: Sorry, I overstated that a bit ;) I was mildly joking
<benzrf> holy shit Array#uniq is slow
kaspergrubbe has quit [Remote host closed the connection]
<benzrf> how should i check for repeat elements in an array quickly?
<Eiam> benzrf: depending on what you are doing you may try doing a set intersection
<benzrf> alright
ivanoats has quit [Quit: IRCRelay - http://ircrelay.com]
<Eiam> & and |
<benzrf> also, why would Array#hash be called?
<benzrf> is that for ==?
<Eiam> it tends to be faster (for some cases)
<benzrf> or for uniq
<zigomir> Kamuela, so you were turned off by Dart? I've seen some videos online and it looked nice ... but when I tried it, the DartEditor was enough for me to run away :D
danshultz has joined #ruby
agent_white has joined #ruby
mengu has quit [Remote host closed the connection]
<Kamuela> zigomir, turned off by dart just by the syntax alone. seemed archaic compared to Das Rube
<DouweM> benzrf: AnyObject#hash is used by Hash
simoz has quit [Ping timeout: 252 seconds]
<platzhirsch> so, shouldn't we recruit from #ruby-lang in the obvious danger of #go-nuts having more peoples in their room?
<benzrf> DouweM: hmm
<benzrf> I am not using hashes though
<Reach> recruit?
<benzrf> would it be used by == or by uniq
<jimmy_birer> Huh
<Reach> I'm looking for a recruition
<benzrf> *that is, would either use it
<jimmy_birer> 871 people in #go-nuts
emocakes has quit [Quit: Leaving...]
<jimmy_birer> lol
<benzrf> which #golang ->
jkhwan has quit [Ping timeout: 272 seconds]
<jimmy_birer> Why the hell people would gathet there instead of here btw
<DouweM> benzrf: Array#== wouldn't use it directly, but it could be some object in the array uses hash as a result of Array#==, which calls obj#== on its elements
simoz has joined #ruby
ivanoats has joined #ruby
<benzrf> hmm
<benzrf> is there a way to save from less
<zigomir> #go-ruby-nuts http://www.goworker.org/ :>
<platzhirsch> so first we should declare the independence of #ruby-lang for void, then we decapitate the current OP and kidnap all the users
mrsolo has joined #ruby
mmitchell has quit [Remote host closed the connection]
maletor has joined #ruby
danshultz has quit [Ping timeout: 272 seconds]
<jimmy_birer> I want a Ruby book
<jimmy_birer> That doesnt treat me like a kid with down syndrome
<jimmy_birer> Who got a lobotomy
<havenwood> jimmy_birer: The Ruby Programming Language
<platzhirsch> jimmy_birer: not cool :) but I enjoyed Well grounded Rubyist a lot
<benzrf> how can i optimize?
<jimmy_birer> thank you based torrent god
bruno- has quit [Ping timeout: 252 seconds]
lnormous has joined #ruby
stringoO has joined #ruby
kirun has quit [Quit: Client exiting]
bruno- has joined #ruby
duggiefresh has quit [Remote host closed the connection]
<havenwood> benzrf: [*0...cards.length]
<benzrf> ?
<Kamuela> what are 3d game engines that are written in ruby?
<havenwood> benzrf: instead of `(0...cards.length).to_a` do `[*0...cards.length]` and instead of `(0...cards[0].length).to_a` do `[*0...cards[0].length]` etc
kaspergrubbe has joined #ruby
<benzrf> ok but that's not a significant speed increase
<havenwood> benzrf: well, for that part it is :P
<benzrf> http://bpaste.net/show/150101/ shows what's taking time
<havenwood> benzrf: and more idiomatic
baroquebobcat has quit [Quit: baroquebobcat]
<havenwood> benzrf: just the first thing i got to
capicue has joined #ruby
claymore has quit [Quit: Leaving]
<Kamuela> platzhirsch, i'm looking at gosu right now for 2d :D
<havenwood> benzrf: collect_concat >.>, flat_map!
baroquebobcat has joined #ruby
nbouscal has joined #ruby
<benzrf> thats a thing
<benzrf> derp
EHLOVader has quit [Read error: Operation timed out]
<benzrf> >> [[[1]], [[2]], [[3]]].flat_map {|a|a}
<eval-in> benzrf => [[1], [2], [3]] (https://eval.in/68682)
<havenwood> benzrf: you could try: possible_answers.keep_if
EHLOVader has joined #ruby
<havenwood> bench #keep_if or #select! over #select
<benzrf> i already did profiling
<benzrf> check the link
<benzrf> >:P
petey has quit [Ping timeout: 272 seconds]
<benzrf> can I somehow memoize ?
terrellt has quit [Ping timeout: 260 seconds]
h0rrorvacui has joined #ruby
jkhwan has joined #ruby
kevinykchan has joined #ruby
osvico has joined #ruby
<platzhirsch> Has someone a bit or a lot experience with Ruby development at work in a team? I am really curious how well Ruby does in maintaining a code base
<havenwood> platzhirsch: seems good to me, but admittedly i've never been on a *big* team
popl has joined #ruby
popl has joined #ruby
popl has quit [Changing host]
gr33n7007h has joined #ruby
gr33n7007h has quit [Client Quit]
simoz has quit [Ping timeout: 268 seconds]
gr33n7007h has joined #ruby
jrhe has joined #ruby
gr33n7007h has quit [Max SendQ exceeded]
<dgarstang3> What's the best way for ruby to execute and external program and read the output line by line?
mjs2600 has quit [Remote host closed the connection]
<benzrf> dgarstang3: like a shell thing?
<dgarstang3> benzrf: yah
<benzrf> >> `echo i think this works`
<eval-in> benzrf => (https://eval.in/68683)
<benzrf> perlism
phus1on has quit [Quit: Textual IRC Client: www.textualapp.com]
mjs2600 has joined #ruby
<havenwood> dgarstang3: You could IO#popen and read each line out, or yeah, save result of `` and parse it line at a time.
mjs2600 has quit [Remote host closed the connection]
<dgarstang3> havenwood: right, just been trying to find an example of how to do that
Kudos has joined #ruby
Kudos has joined #ruby
Kudos has quit [Changing host]
pushpak has quit [Quit: Linkinus - http://linkinus.com]
gigetoo has joined #ruby
hadees has quit [Read error: Connection reset by peer]
jbw has quit [Ping timeout: 252 seconds]
Liquid-- has joined #ruby
<havenwood> dgarstang3: Like for the first two lines of `ls` output: IO.popen('ls') { |io| puts io.gets; puts io.gets }
<dgarstang3> havenwood: Well, it's gotta be in a loop...
<havenwood> dgarstang3: IO.popen('ls') { |io| puts io.readlines }
ngoldman has quit [Remote host closed the connection]
tharindu has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
ngoldman has joined #ruby
<havenwood> dgarstang3: #readlines would return an array - whatcha trying to do?
<dgarstang3> havenwood: hang on
<dgarstang3> havenwood: ouch
jalcine has joined #ruby
Grantlyk_ has quit [Remote host closed the connection]
banister` has quit [Ping timeout: 264 seconds]
Grantlyk has joined #ruby
<platzhirsch> that took a while. String formatting with % takes an array. "%s%s" % ("a","b") ... "%s%s" % ["a","b"]
emocakes has joined #ruby
<dgarstang3> pvdisks.rb:4:in `<<': can't convert IO into String (TypeError)
zigomir has quit [Ping timeout: 268 seconds]
devdazed has quit [Quit: Bye]
tharindu has quit [Ping timeout: 240 seconds]
shawnjgoff has quit [Ping timeout: 246 seconds]
emocakes has quit [Client Quit]
Grantlyk has quit [Ping timeout: 245 seconds]
stringoO has quit [Quit: stringoO]
<Hanmac> dgarstang3: the block parameter from popen is a IO not a line
gr33n7007h has joined #ruby
gr33n7007h has quit [Max SendQ exceeded]
lethjakm1 has joined #ruby
carlyle has joined #ruby
<Hanmac> dgarstang3: i think you want this: out = IO.popen( "lsblk -r") { |io| io.read }
kaspergrubbe has quit [Remote host closed the connection]
<dgarstang3> Hanmac: trying
<dgarstang3> *sigh* I just don't get ruby. By far the most unintutive programming language in a 17 year career. The { and } .... do I need those if split over multiple lines?
<dgarstang3> where did 'do' go?
jbw has joined #ruby
<platzhirsch> dgarstang3: you don't need it, no. But it's a syntactical choice
lethjakman has quit [Ping timeout: 272 seconds]
cek has quit [Ping timeout: 260 seconds]
<platzhirsch> you can write { } over multiple lines, too. It's just very uncommon to do so
<Hanmac> dgarstang3: do ... end and {} are very similar ... i prefer {} because do ... end can make problem because the priority of both are different
<dgarstang3> ok, so now io looks like a object.... how do I get it's value?
<dgarstang3> got it
carlyle has quit [Ping timeout: 245 seconds]
<dgarstang3> what about... in python I can do regex grouping. how about in ruby?
nobitanobi has quit [Quit: Leaving]
<dgarstang3> screw it. i'll split the lines by whitespace.... just as soon as I figure out how
jbw has quit [Read error: Operation timed out]
mansi has joined #ruby
<Hanmac> dgarstang3: regex grouping
<Hanmac> >> "abc".match(/(\w)\w(\w)/)
<eval-in> Hanmac => #<MatchData "abc" 1:"a" 2:"c"> (https://eval.in/68684)
brunto has quit [Ping timeout: 268 seconds]
<Hanmac> more funny regex grouping
<Hanmac> >> /(?<one>\w)\w(?<two>\w)/ =~ "abc" ? [two, one] : nil
<eval-in> Hanmac => ["c", "a"] (https://eval.in/68685)
_maes_ has quit [Ping timeout: 252 seconds]
<h0rrorvacui> dgarstang3: why don't you use back ticks instead?