apeiros changed the topic of #ruby-lang 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
tenderlove has joined #ruby-lang
intellitech has joined #ruby-lang
gregmoreno has quit [Ping timeout: 256 seconds]
_jpb__ has joined #ruby-lang
BobuSumisu has joined #ruby-lang
<BobuSumisu> hi, is it possible to pass a local variable to a select-block? tried `collection.select { |x;var| x.id == var }` but var is nil? :S
mdedetrich has joined #ruby-lang
<drbrain> BobuSumisu: by default a block contains the local variables of the scope it was created in
<drbrain> >> v = 1; p [1].select { |x| x == v }
<eval-in> drbrain => [1] ... (https://eval.in/38425)
<drbrain> >> v = 1; p [1].select { |x;v| x == v }
<eval-in> drbrain => [] ... (https://eval.in/38426)
<drbrain> ;v(ar) says "do not use this variable from the surrounding scope"
wmoxam has joined #ruby-lang
<drbrain> aka "closure"
<BobuSumisu> hm, guess the issue is that this is inside a sinatra block
eugenejen has quit [Quit: eugenejen]
<BobuSumisu> and the var is part of the variables to that block :P
tomzx_mac has quit [Ping timeout: 245 seconds]
brianpWins has quit [Quit: brianpWins]
stardiviner has joined #ruby-lang
torrieri has quit [Quit: Leaving...]
lemon-tree has joined #ruby-lang
<drbrain> can you use a different variable?
lemon-tree has left #ruby-lang [#ruby-lang]
<BobuSumisu> yes, if I just define some random variable before the select-statement
flip_dig_ has quit [Remote host closed the connection]
<BobuSumisu> but I cannot do 'tmp = v' and then use tmp in the select
anonymuse has quit [Remote host closed the connection]
mistym has quit [Remote host closed the connection]
anonymuse has joined #ruby-lang
<BobuSumisu> hm, think I solved it
<BobuSumisu> thanks for the replies! :)
marr has quit [Ping timeout: 246 seconds]
hogeo has joined #ruby-lang
anonymuse has quit [Ping timeout: 268 seconds]
_jpb_ has quit [Quit: leaving]
chendo_ is now known as chendo
_jpb_ has joined #ruby-lang
_jpb___ has joined #ruby-lang
woollyams has quit [Ping timeout: 252 seconds]
_jpb_ has quit [Client Quit]
_jpb___ has quit [Client Quit]
_jpb_ has joined #ruby-lang
_jpb_ has quit [Client Quit]
mistym has joined #ruby-lang
arooni-mobile has joined #ruby-lang
tonni has quit [Remote host closed the connection]
henrikhodne has quit [Ping timeout: 268 seconds]
mootpointer has joined #ruby-lang
mootpointer has quit [Client Quit]
sstrickl_ has joined #ruby-lang
sstrickl_ has joined #ruby-lang
sstrickl_ has quit [Changing host]
mootpointer has joined #ruby-lang
sstrickl has quit [Ping timeout: 248 seconds]
sstrickl_ is now known as sstrickl
ZOGM has joined #ruby-lang
sstrickl has quit [Ping timeout: 276 seconds]
sstrickl has joined #ruby-lang
sstrickl has joined #ruby-lang
sstrickl has quit [Changing host]
iliketurtles has quit [Quit: zzzzz…..]
flip_digits has joined #ruby-lang
tomzx_mac has joined #ruby-lang
joshuawscott has quit [Quit: Leaving.]
_jpb_ has joined #ruby-lang
grumpwork has quit [Remote host closed the connection]
torrieri has joined #ruby-lang
_jpb_ has quit [Quit: leaving]
_jpb_ has joined #ruby-lang
_jpb_ has quit [Client Quit]
mootpointer has quit [Quit: Computer has gone to sleep.]
wmoxam has quit [Ping timeout: 246 seconds]
tkuchiki has joined #ruby-lang
bzalasky has joined #ruby-lang
mrsolo has quit [Quit: Leaving]
mistym has quit [Remote host closed the connection]
mootpointer has joined #ruby-lang
heftig has quit [Quit: Quitting]
poga has quit [Remote host closed the connection]
saarinen has quit [Quit: saarinen]
ZOGM has quit [Remote host closed the connection]
Domon has joined #ruby-lang
flip_digits has quit [Remote host closed the connection]
bzalasky has quit [Remote host closed the connection]
headius has joined #ruby-lang
vivekrai has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 246 seconds]
hahuang65 has quit [Ping timeout: 256 seconds]
lutfidemirci has joined #ruby-lang
_jpb_ has joined #ruby-lang
_jpb_ has quit [Client Quit]
_jpb_ has joined #ruby-lang
_jpb_ has quit [Client Quit]
charliesome has joined #ruby-lang
benanne has quit [Quit: kbai]
lsegal has joined #ruby-lang
_jpb_ has joined #ruby-lang
_jpb_ has quit [Client Quit]
_jpb_ has joined #ruby-lang
_jpb_ has quit [Client Quit]
_jpb_ has joined #ruby-lang
nathanstitt has joined #ruby-lang
matju has joined #ruby-lang
iliketurtles has joined #ruby-lang
_jpb_ has quit [Client Quit]
joshuawscott has joined #ruby-lang
_jpb_ has joined #ruby-lang
woollyams has joined #ruby-lang
dhruvasagar has joined #ruby-lang
matti has quit [Quit: Reconnecting]
matti has joined #ruby-lang
matti has quit [Changing host]
matti has joined #ruby-lang
amerine has quit [Quit: Computer has gone to sleep.]
joshuawscott has quit [Quit: Leaving.]
torrieri has quit [Quit: Leaving...]
agarie has joined #ruby-lang
bzalasky has joined #ruby-lang
xning has joined #ruby-lang
rails_smith has joined #ruby-lang
mistym has joined #ruby-lang
agarie has quit [Remote host closed the connection]
spike|spiegel has quit [Read error: Operation timed out]
rsync_ has joined #ruby-lang
rsync has quit [Ping timeout: 256 seconds]
rsync_ is now known as rsync
xxaM has joined #ruby-lang
spike|spiegel has joined #ruby-lang
mdedetrich has quit [Ping timeout: 248 seconds]
hachiya_ has left #ruby-lang [#ruby-lang]
hachiya has joined #ruby-lang
joshuawscott has joined #ruby-lang
mdedetrich has joined #ruby-lang
grandy has quit [Ping timeout: 240 seconds]
henrikhodne has joined #ruby-lang
ZOGM has joined #ruby-lang
ZOGM has quit [Ping timeout: 256 seconds]
mdedetrich has quit [Quit: Computer has gone to sleep.]
dhruvasagar has quit [Ping timeout: 268 seconds]
mdedetrich has joined #ruby-lang
<postmodern> hey anyone know of a small ruby irc server, similar to python's hircd/miniircd
Oak_ has joined #ruby-lang
woollyams has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
woollyams has joined #ruby-lang
flip_digits has joined #ruby-lang
<flip_digits> are there any (newish) good books on metaprogramming ruby?
headius has quit [Quit: headius]
shinnya has quit [Ping timeout: 264 seconds]
<xuser> Eloquent Ruby
<flip_digits> xuser: I have that one it's not really about metaprogramming
<flip_digits> thanks though!
_jpb__ has quit [Quit: leaving]
joshuawscott has quit [Quit: Leaving.]
<xuser> flip_digits: Metaprogramming Ruby then :)
<bnagy> ruby lang! we has question
<bnagy> >> (1..Float::INFINITY).select {|i| i%13==0}.take(4).to_a
<eval-in> bnagy => (https://eval.in/38472)
<bnagy> why did they not choose to treat range as lazy-able by default?
<xuser> flip_digits: although, almost half o Eloquent is dedicated to metaprogramming
<flip_digits> xuser: thank you
dhruvasagar has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
matju has quit [Quit: matju]
wmoxam has joined #ruby-lang
mistym has quit [Remote host closed the connection]
Domon has quit [Remote host closed the connection]
amerine has joined #ruby-lang
joshuawscott has joined #ruby-lang
Domon has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
wallerdev has joined #ruby-lang
wmoxam has quit [Ping timeout: 264 seconds]
Asher1 has joined #ruby-lang
Asher is now known as Guest83156
Asher1 has quit [Client Quit]
chuck_ has joined #ruby-lang
mootpointer has quit [Quit: Computer has gone to sleep.]
chuck_ has left #ruby-lang [#ruby-lang]
Guest83156 has quit [Ping timeout: 276 seconds]
bzalasky has joined #ruby-lang
Asher- has joined #ruby-lang
Asher- is now known as asher
asher is now known as Asher
Asher has quit [Client Quit]
Asher has joined #ruby-lang
_whitelogger has joined #ruby-lang
apeiros has quit [Remote host closed the connection]
tkuchiki_ has joined #ruby-lang
tkuchiki has quit [Read error: Connection reset by peer]
rickruby has joined #ruby-lang
kristofferrr has joined #ruby-lang
minivan has quit [Ping timeout: 248 seconds]
ledestin has joined #ruby-lang
flip_digits has quit [Remote host closed the connection]
bondar has quit [Read error: Connection reset by peer]
dhruvasagar has quit [Ping timeout: 264 seconds]
charliesome has quit [Read error: Connection reset by peer]
rshetty has quit [Ping timeout: 246 seconds]
rshetty_ has joined #ruby-lang
vlad_starkov has joined #ruby-lang
arooni-mobile has quit [Ping timeout: 248 seconds]
dc5ala has joined #ruby-lang
tkuchiki has joined #ruby-lang
tkuchiki_ has quit [Read error: Connection reset by peer]
hashkey has joined #ruby-lang
hashkey is now known as Guest87599
Domon has joined #ruby-lang
Guest87599 has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Ping timeout: 248 seconds]
hashkey_ has joined #ruby-lang
hashkey_ is now known as hashkey
_jpb_ has quit [Ping timeout: 264 seconds]
Kabaka has quit [Ping timeout: 240 seconds]
mistym has joined #ruby-lang
_jpb_ has joined #ruby-lang
jonahR has quit [Quit: jonahR]
Kabaka has joined #ruby-lang
joshuawscott has quit [Quit: Leaving.]
mbj has joined #ruby-lang
sharma__ has quit [Ping timeout: 264 seconds]
hhatch has joined #ruby-lang
sharma__ has joined #ruby-lang
mbj has quit [Read error: Connection reset by peer]
mistym has quit [Remote host closed the connection]
aaa has left #ruby-lang [#ruby-lang]
iliketurtles has joined #ruby-lang
sharma__ has quit [Quit: This computer has gone to sleep]
Gaelan is now known as GaelanAintAround
cd has joined #ruby-lang
cd is now known as Guest83838
Senjai has quit [Ping timeout: 246 seconds]
workmad3 has joined #ruby-lang
Cremno has quit [Quit: Cremno]
glebm has quit [Quit: Computer has gone to sleep.]
hhatch has quit [Ping timeout: 268 seconds]
iliketurtles has quit [Quit: zzzzz…..]
mbreedlove has joined #ruby-lang
sstrickl has quit [Quit: sstrickl]
mbreedlove has quit [Client Quit]
mbreedlove has joined #ruby-lang
GaelanAintAround is now known as Gaelan
Guest83838 has quit [Quit: This computer has gone to sleep]
fsvehla has joined #ruby-lang
fsvehla has quit [Client Quit]
tenderlove has quit [Remote host closed the connection]
jsullivandigs has quit [Remote host closed the connection]
jsullivandigs has joined #ruby-lang
JohnBat26 has joined #ruby-lang
dhruvasa1ar has joined #ruby-lang
jsullivandigs has quit [Ping timeout: 248 seconds]
mistym has joined #ruby-lang
vlad_starkov has joined #ruby-lang
apeiros has joined #ruby-lang
mbj has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 245 seconds]
lutfidemirci has joined #ruby-lang
lsegal` has joined #ruby-lang
lsegal has quit [Ping timeout: 264 seconds]
GeissT has joined #ruby-lang
benlovell has joined #ruby-lang
mbreedlove has quit [Quit: Konversation terminated!]
wudofyr___ has joined #ruby-lang
wudofyr___ has quit [Remote host closed the connection]
wudofyr has joined #ruby-lang
hakunin has quit [Read error: Connection reset by peer]
mbj has quit [Read error: Connection reset by peer]
hakunin has joined #ruby-lang
shireesh has joined #ruby-lang
tenderlove has joined #ruby-lang
tenderlove has quit [Read error: Connection reset by peer]
zomgbie has joined #ruby-lang
tenderlove has joined #ruby-lang
shireesh has quit [Ping timeout: 245 seconds]
ffio has joined #ruby-lang
workmad3 has quit [Ping timeout: 246 seconds]
whitequark has joined #ruby-lang
netShadow has joined #ruby-lang
tenderlove has quit [Ping timeout: 245 seconds]
tbuehlmann has joined #ruby-lang
shireesh has joined #ruby-lang
dagobah has joined #ruby-lang
mistym has quit [Remote host closed the connection]
rshetty_ has quit [Quit: Sleeping]
mbj has joined #ruby-lang
lutfidemirci has quit [Remote host closed the connection]
adambeynon has joined #ruby-lang
Gaelan is now known as GaelanAintAround
mbj has quit [Read error: Connection reset by peer]
maxmanders has joined #ruby-lang
solars has joined #ruby-lang
tenderlove has joined #ruby-lang
mbj has joined #ruby-lang
minivan has joined #ruby-lang
<whitequark> hi yorickpeterse
netShadow has quit [Quit: netShadow]
mootpointer has quit [Quit: Computer has gone to sleep.]
elia has joined #ruby-lang
amerine has quit [Ping timeout: 256 seconds]
<yorickpeterse> morning
amerine has joined #ruby-lang
hahuang65 has joined #ruby-lang
vlad_starkov has joined #ruby-lang
<whitequark> yorickpeterse: did it ever finish running?
<yorickpeterse> No, I did some server setup changes and once those are finished I'll just let it run on a pizza box
mbj has quit [Read error: Connection reset by peer]
<whitequark> I see
<whitequark> so it finished running on all gemsa
<whitequark> about 1800 testcases found
Domon has quit [Remote host closed the connection]
Domon has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 264 seconds]
mbj has joined #ruby-lang
heftig has joined #ruby-lang
<gnufied> whitequark are you familiar with SAT solvers?
woollyams has quit [Ping timeout: 252 seconds]
<whitequark> gnufied: not really
<gnufied> okay cool.
judofyr has joined #ruby-lang
<gnufied> Bundler should use a SAT solver and there are C libraries for that. but it can't use because it has to be pure ruby.
<judofyr> hey folks
<gnufied> hey judofyr
<judofyr> gnufied: hm. what SAT solver algorithm are you thinking about?
lsegal` has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
<gnufied> so, somebody has to port a well tested/performant SAT solver to pure ruby.
<gnufied> :(
rshetty has joined #ruby-lang
kristofferrr has quit [Quit: ❤]
<gnufied> but if you mean, algorithms then there is DPLL
<gnufied> but a SAT solver apparently is more than a naive implementation of DPLL
<gnufied> I have do have a pure ruby implementation of DPLL and I am pretty sure it is crappy compared to minisat
<gnufied> do have*
<judofyr> cool
<judofyr> have you tried it on Bundler?
<gnufied> I am going to. But I do have heuristic figured out, how I will use a SAT solver etc
mytrile has joined #ruby-lang
hahuang65 has quit [Read error: Connection reset by peer]
flip_digits has joined #ruby-lang
<injekt> moin
hahuang65 has joined #ruby-lang
<judofyr> gnufied: interesting. how would you transform the version dependency system to SAT?
<gnufied> here is my plan:
flip_digits has quit [Ping timeout: 248 seconds]
<gnufied> 1. pick all top level dependencies and transform them into variables
<gnufied> 2. pick all dependencies of dependencies and merge them together.
<gnufied> and for each dependency start marking them as -x or x
<gnufied> to start with simplest example:
<gnufied> foo depends on json >= 1.7.7
<gnufied> bar depends on json <= 1.7.7 and json >= 1.4.4
<gnufied> then, I have an [foo]
<gnufied> [bar]
<gnufied> [json,….] which includes all versions from >= 1.4.4
<gnufied> now, I will build rules
<gnufied> for example for foo it will be:
<gnufied> [foo and (json-1.7.7 or json 1.8.0) and -json1.4.4 and -json1.4.5]
<gnufied> so on and so forth
<gnufied> similarly for bar
<gnufied> and then transform them into a CNF
<gnufied> and feed it into SAT solver
<judofyr> gnufied: so you will include every #{name}-#{version}-#{platform} as separate variables?
<gnufied> yep
<gnufied> that is how SAT solvers work
<gnufied> we can filter out platform though
<gnufied> we can exclude platforms defenitely
<gnufied> Minisat I have seen solving expressions with variables > 12,000 in milliseconds
joeroot has joined #ruby-lang
vlad_starkov has joined #ruby-lang
<judofyr> gnufied: and in pure Ruby? :)
<gnufied> I haven't had a chance
<gnufied> to use it with pure ruby algo yet.
<judofyr> gnufied: btw, you want my compressed cache? it's nice for testing out stuff
Mon_Ouie has joined #ruby-lang
<gnufied> sure, thing.
tkuchiki has quit [Ping timeout: 256 seconds]
<gnufied> my nick here @gmail.com works
<gnufied> or anything else
yfeldblum has quit [Ping timeout: 256 seconds]
<gnufied> I will play around tonight hopefully, at work now.
<judofyr> gnufied: example usage: http://hastebin.com/pinowasequ.rb
<judofyr> gnufied: I should probably gist my downloader script as well
tkuchiki has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
<judofyr> gnufied: what do you mean by "ignoring platform" btw? will always just pick the version for the current platform?
stamina has joined #ruby-lang
hahuang65 has quit [Ping timeout: 264 seconds]
<gnufied> when we construct that variable list, because we already know the current platform, I think we can exclude gems that don't match current platform and there won't be any need to bring them in CNF expression
<gnufied> something like: gem.matches?(current_ruby) solver << [gem]
<gnufied> very roughyly
skade has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 256 seconds]
fosky has quit [Ping timeout: 248 seconds]
<judofyr> but wouldn't you then include both the -ruby and the platform specific version?
yfeldblum has joined #ruby-lang
rsync has quit [Quit: rsync]
<apeiros> gnufied: one problem to be aware of: a different version of a gem may have different dependencies
<apeiros> judofyr: `Marshal.load(open('data/compact.4.8'))` should be `open('data/compact.4.8') { |fh| Marshal.load(fh) }`
<apeiros> at least I don't think Marshal.load closes filehandles
<judofyr> apieros: doesn't matter for small scripts. I'm a lazy bastard.
<apeiros> insert my usual banter about habits
<apeiros> oh, and about cargo-cult/copy-paste culture
<apeiros> ("but I copied that code from judofyr! certainly he knows what he's doing!")
<judofyr> I hope someone copies camping.rb
<apeiros> :-|
<apeiros> :-[
<andrewvos> :~[
<judofyr> :D
<apeiros> =[
<gnufied> I actually did once copied why style of: %w[(json eventmachine blah).each {|r| require r}
<gnufied> still see codes that do it
<apeiros> ≈[
<judofyr> chunky bacon?
<apeiros> mortified longface
<judofyr> close enough
hahuang65 has joined #ruby-lang
t_ has quit [Ping timeout: 248 seconds]
MaddinXx has joined #ruby-lang
wudofyr has quit [Remote host closed the connection]
wudofyr has joined #ruby-lang
axsuul has joined #ruby-lang
mbj has quit [Quit: leaving]
<whitequark> so I found a ruby bug
<whitequark> $ ruby -c -e 'Shoes.app width: 330do end'
<whitequark> Syntax OK
hahuang65 has quit [Ping timeout: 246 seconds]
marr has joined #ruby-lang
<andrewvos> )
<andrewvos> :)
Oak_ has quit [Remote host closed the connection]
<heftig> whitequark: how is that a bug?
<whitequark> heftig: how is that not a bug?
<whitequark> >> "100def foo; end"
<eval-in> whitequark => "100def foo; end" (https://eval.in/38498)
<whitequark> er
<whitequark> >> 100def foo; end
<eval-in> whitequark => /tmp/execpad-c22e48a73bc1/source-c22e48a73bc1:2: syntax error, unexpected keyword_def, expecting keyword_end ... (https://eval.in/38499)
<whitequark> hm
<whitequark> def foo; 100end
<whitequark> >> def foo; 100end
<eval-in> whitequark => /tmp/execpad-b4af236ac44f/source-b4af236ac44f:2: trailing `e' in number ... (https://eval.in/38500)
<whitequark> should be "trailing `d' in number".
<apeiros> >> 330do
<eval-in> apeiros => /tmp/execpad-9ff60fb0ec36/source-9ff60fb0ec36:2: syntax error, unexpected keyword_do, expecting keyword_end (https://eval.in/38501)
<whitequark> >> 100case
<eval-in> whitequark => /tmp/execpad-71ef14d674a3/source-71ef14d674a3:2: syntax error, unexpected keyword_case, expecting keyword_end (https://eval.in/38502)
* whitequark shrugs
<Mon_Ouie> 'e' is part of the syntax for number literals
<Mon_Ouie> (as in 1e6)
<heftig> it's the same way 300+300 works
<heftig> the + isn't separated with whitespace, either
<whitequark> heftig: well, every other language out there doesn't allow numeric literals to be adjacent to *keywords*
<whitequark> neither does ruby in other contexts, as evident with 100end
<heftig> whitequark: no, that's because of the "e"
<apeiros> >> def x(v); yield+v; end; x 330do 10 end
<eval-in> apeiros => 340 (https://eval.in/38503)
<apeiros> seems like it's not a bug
<injekt> >> puts 123do end
<eval-in> injekt => 123 ... (https://eval.in/38504)
<apeiros> just weird that ruby allows to write that code without whitespace
<injekt> apeiros: stop being fancy
<apeiros> ugly IMO
<whitequark> >> if 100then1else2end
<eval-in> whitequark => /tmp/execpad-c5a4b623f9f7/source-c5a4b623f9f7:2: syntax error, unexpected tIDENTIFIER, expecting keyword_then or ';' or '\n' (https://eval.in/38505)
<whitequark> >> if 100then1 else2 end
<eval-in> whitequark => /tmp/execpad-40f4fc802592/source-40f4fc802592:2: syntax error, unexpected tIDENTIFIER, expecting keyword_then or ';' or '\n' ... (https://eval.in/38506)
<whitequark> >> if 100then 1 else2 end
<eval-in> whitequark => /tmp/execpad-ed02e76fdfda/source-ed02e76fdfda:2: syntax error, unexpected tIDENTIFIER, expecting keyword_end ... (https://eval.in/38508)
<whitequark> now why doesn't this work?
<apeiros> madness
<apeiros> that's why
<injekt> you can't do it with else
<Mon_Ouie> >> if 100then 1 else 2 end
<eval-in> Mon_Ouie => 1 (https://eval.in/38509)
<injekt> ^
<heftig> >> 300while false
<eval-in> heftig => nil (https://eval.in/38510)
<injekt> now touch else, it'll break
<whitequark> injekt: and why can't I?
<injekt> whitequark: because ruby hates us all
<heftig> whitequark: because the e is consumed as part of the literal
<Mon_Ouie> Identifiers can have numbers at the end of them
<andrewvos> ruby hates you
<andrewvos> it told me
<whitequark> heftig: I couldn't care less if ruby consumes e or not
<Mon_Ouie> (You can have a variable called class2 or else2)
<whitequark> >> class2 = 1
<eval-in> whitequark => 1 (https://eval.in/38511)
<whitequark> hmpf
hogeo has quit [Remote host closed the connection]
tbuehlmann has quit [Remote host closed the connection]
_jpb_ has quit [Ping timeout: 268 seconds]
_jpb_ has joined #ruby-lang
stef_204 has joined #ruby-lang
<whitequark> maybe not a bug, right. still weird behavior. let's look what matz&co will say
<yorickpeterse> "patches welcome" probably
<yorickpeterse> also man, Rin' makes damn awesome music
Domon has quit [Remote host closed the connection]
<gnufied> Rin is a good soap
kstuart has joined #ruby-lang
<yorickpeterse> wat
dagobah_ has joined #ruby-lang
dagobah has quit [Read error: Connection reset by peer]
Domon has joined #ruby-lang
<yorickpeterse> ha
<yorickpeterse> well, so is Vim
<yorickpeterse> (what's with Google and shit URLs?)
<yorickpeterse> it's like a feature of all their products is to have terrible URLs
<gnufied> well no. Vim is just a bad imitation of a great soap
<apeiros> whitequark: I agree, it's a rather weird antic ruby exhibits there
joonty has joined #ruby-lang
<judofyr> gnufied: I had a look at ruby-minisat; too bad it only exposes the simple `(x or y) and (z or æ)`
mdedetrich has joined #ruby-lang
mdedetrich has quit [Client Quit]
<gnufied> judofyr: okay. I
mdedetrich has joined #ruby-lang
<judofyr> gnufied: I need to learn more about simplifying boolean expression. and I still don't quite know how to encode the dependency graph. maybe I'll look at it later.
<judofyr> face: but it does seem like you understand it better :)
<judofyr> err
<judofyr> face: sorry, wrong guy!
<judofyr> gnufied: ^
<gnufied> judofyr: cool. I will look later, tonight.
xning has quit [Quit: Leaving]
<judofyr> sure
<judofyr> I'll stop bothering
guns has joined #ruby-lang
vlad_starkov has joined #ruby-lang
mdedetrich has quit [Quit: Computer has gone to sleep.]
henrikhodne has quit [Ping timeout: 256 seconds]
guns has quit [Client Quit]
skmp has joined #ruby-lang
hashkey_ has joined #ruby-lang
hashkey has quit [Ping timeout: 264 seconds]
hashkey_ is now known as hashkey
_jpb_ has quit [Ping timeout: 246 seconds]
<whitequark> look:
<whitequark> >> "\M-b\C-\M-@\C-\M-Y"
<eval-in> whitequark => "’" (https://eval.in/38519)
<whitequark> am I insane yet?
_jpb_ has joined #ruby-lang
mbj has joined #ruby-lang
<whitequark> well, that's probably not demonstrating enough
mdedetrich has joined #ruby-lang
dhruvasa1ar has quit [Ping timeout: 264 seconds]
dhruvasagar has joined #ruby-lang
t_ has joined #ruby-lang
axsuul has quit [Ping timeout: 248 seconds]
lutfidemirci has joined #ruby-lang
<yorickpeterse> injekt: if I throw cat pictures at you, will you magically make my test suite faster?
<erikh> injekt: just wrap it all in cinch so the test runs go here
<erikh> probably save him time if he doesn't have to complain about each run
<yorickpeterse> burn?
<yorickpeterse> Just an FYI if you're going to try and be all grumpy on me you'll have to try harder
dhruvasagar has quit [Ping timeout: 268 seconds]
mootpointer has joined #ruby-lang
dhruvasagar has joined #ruby-lang
anonymuse has joined #ruby-lang
lutfidemirci has quit [Read error: Connection reset by peer]
lutfidemirci has joined #ruby-lang
_jpb_ has quit [Ping timeout: 246 seconds]
_jpb_ has joined #ruby-lang
postmodern has quit [Quit: Leaving]
dhruvasagar has quit [Ping timeout: 256 seconds]
dhruvasagar has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
mdedetrich has quit [Quit: Computer has gone to sleep.]
mbj has quit [Ping timeout: 264 seconds]
dhruvasagar has quit [Ping timeout: 246 seconds]
<whitequark> sooo... Hash.new{|_,v|v.chr}.tap{|m|m[34]='\"';m[92]='\\\\';m[127]='\C-?';puts '"'+ARGF.read.strip.each_byte.map{|b|b&128==0?m[b]:('\M-'+(b&96==0?'\C-'+m[b&-129|64]:m[b&-129]))}.join+'"'}
<whitequark> ruby -e it, and feed it an unicode string to stdin
Domon has quit [Remote host closed the connection]
dhruvasagar has joined #ruby-lang
<whitequark> it will output an equivalent ruby string literal consisting only of \C/\M sequences
<whitequark> like this:
<whitequark> $ ruby utf2.rb <<<"проверка"
<whitequark> "\M-P\M-?\M-Q\M-\C-@\M-P\M->\M-P\M-2\M-P\M-5\M-Q\M-\C-@\M-P\M-:\M-P\M-0"
<whitequark> >> "\M-P\M-?\M-Q\M-\C-@\M-P\M->\M-P\M-2\M-P\M-5\M-Q\M-\C-@\M-P\M-:\M-P\M-0"
<eval-in> whitequark => "проверка" (https://eval.in/38526)
<erikh> ha
<erikh> emacs compatible unicode
mdedetrich has joined #ruby-lang
mootpointer has quit [Quit: Computer has gone to sleep.]
_whitelogger has joined #ruby-lang
matthewd has joined #ruby-lang
hackeron has joined #ruby-lang
lele has joined #ruby-lang
hackeron has quit [Changing host]
hackeron has joined #ruby-lang
dagobah has joined #ruby-lang
randym_ has joined #ruby-lang
anekos has joined #ruby-lang
segy has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 268 seconds]
dhruvasagar has joined #ruby-lang
beawesomeinstead has joined #ruby-lang
sonne has joined #ruby-lang
<injekt> yorickpeterse: no, the internet has enough cat pictures
<darix> injekt: u sure?
<injekt> yorickpeterse: anyway it could take months to fix a large test suite, this one is only mind blowing fast because it was a 'thing' right from the start
<injekt> darix: yasrsly
<injekt> I also dont have integration tests because J.B told me they are a scam! (but seriously the article is great and I agree with a lot of it)
dhruvasagar has quit [Ping timeout: 264 seconds]
tkuchiki has quit [Remote host closed the connection]
<darix> injekt: link?
dhruvasagar has joined #ruby-lang
<apeiros> lol?
benlovell has quit [Ping timeout: 246 seconds]
tkuchiki has joined #ruby-lang
mytrile has quit [Remote host closed the connection]
scholar01 has joined #ruby-lang
scholar01 has joined #ruby-lang
scholar01 has quit [Changing host]
<injekt> it's also why I don't use tools like guard/spork which only runs tests you're currently working on. If I change 1 thing in 1 model, I want to run my entire unit test suite again, not just the file i'm working in
<whitequark> ^ that
<injekt> them being fast is of course somewhat of a prerequisite for that
<injekt> it's the difference between changing 5-8 things in an hour, and 10 things in 10 minutes
tkuchiki has quit [Ping timeout: 248 seconds]
<erikh> i usually iterate on guard until I'm happy and then hit enter to run the full suite
<erikh> my problem unfortunately is the reliance on external software with, well, special logic
<injekt> erikh: sure, nothing wrong with that, it's not a bad tool, it just enables bad programmers to do bad things
<erikh> well, heh, computers do that without any hell
<erikh> help
hahuang65 has joined #ruby-lang
_jpb_ has quit [Ping timeout: 256 seconds]
mbj has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 245 seconds]
<judofyr> whitequark: did you see my mention in the Bundler issue?
_jpb_ has joined #ruby-lang
dhruvasagar has joined #ruby-lang
<whitequark> judofyr: I think I did
hahuang65 has quit [Ping timeout: 248 seconds]
<injekt> wow I just found an old blog of mine that has the moto "because toilets are useful"
<judofyr> whitequark: echo 'require "bundler";Bundler::Source::Rubygems::API_REQUEST_LIMIT=200' > crap.rb; RUBYOPT="-r./crap" time bundle
<injekt> lol being young
<judofyr> whitequark: that should speed it up
<judofyr> injekt: aren't you still quite young?
<injekt> judofyr: how old do you think I am?
<judofyr> injekt: 25-ish
mdedetrich has quit [Quit: Computer has gone to sleep.]
<erikh> I feel like grandpa watching this unfold
<injekt> lol
<injekt> yeah 24, 25 in 2 weeks
<injekt> that blog was when I was about 15
<whitequark> 25-year-old inkjet
<injekt> whitequark: heh, even new ones suck!
<whitequark> they got *worse*
dernise has joined #ruby-lang
<erikh> well they're cheap
<erikh> thatsthepoint.jpg
<erikh> or whatever
mootpointer has joined #ruby-lang
<erikh> if you want a high end printer you get a xerox or a laserjet etc
<whitequark> erikh: when it's cheaper to buy a new printer than a new cartridge, you know something's wrong
<erikh> i don't know why I am fucking talking about this
zomgbie has quit [Read error: Connection reset by peer]
<erikh> whitequark: hah, true
<whitequark> also they went full-on Apple
_jpb_ has quit [Ping timeout: 246 seconds]
zomgbie has joined #ruby-lang
<cout> whitequark: new printers don't come with full cartridges so it's not a fair comparison
<cout> but yeah manufacturers charge way too much for cartridges in general
<whitequark> cout: it's still cheaper tho
<erikh> dat china
_jpb_ has joined #ruby-lang
<cout> I get my cartridges off ebay and then it's cheaper
<injekt> I use a ball-point
<whitequark> now add delivery to russia and it becomes cheaper to buy *two* printers
<erikh> injekt: so I got a galaxy note tab
<injekt> erikh: any good?
<judofyr> erikh: as a replacement for a printer?
<cout> would be hard for me to pick up in russia
<erikh> it actually... is not a bad replacement for a paper notepad
dhruvasagar has quit [Ping timeout: 246 seconds]
<injekt> heh
<erikh> the pen is quick and free form so you don't have to worry about any handwriting recognition bs
<erikh> but yeah, I live by paper notepads normally.
<injekt> I can only imagine myself writing like 3 words and it taking up the entire screen (maybe I just write big on those kind of things?)
dhruvasagar has joined #ruby-lang
<injekt> yeah I use paper notepads a lot
<erikh> it's not that bad but yeah, you need to be mindful of it
<erikh> being able to write fast helps too
<erikh> like, not watching the pen's marks catch up
mdedetrich has joined #ruby-lang
PaulePanter has quit [Quit: leaving]
<injekt> heh yeah that could bug me
<erikh> yeah, I had issues with that on old palms
<erikh> not here
<erikh> still trying it out though -- mostly bought it to read ebooks
<injekt> yeah I've been looking for a book reader
<injekt> but can't make my mind up
<erikh> $wife has an ipad and I have this tab, and she had a kindle before that
<erikh> I think we're both happier with the tablets.
<injekt> hm
<erikh> she does netflix and plex on hers though
<erikh> kind of a ghetto tv while she's sleeping (I don't like tv's in the bedroom)
anonymuse has quit [Remote host closed the connection]
<erikh> and she always beats me to bed, so that's how that works.
lutfidemirci has quit [Read error: Connection reset by peer]
anonymuse has joined #ruby-lang
<cout> the bedroom is for seep and sex
<injekt> heh
<cout> sleep
foo_ has joined #ruby-lang
lutfidemirci has joined #ruby-lang
<cout> (according to most sleep doctors I've talked to)
<injekt> yeah I dislike tv's in the bedroom, as does $gf
<erikh> I just don't like falling asleep to noise is all
<cout> it's the light that's the issue
<erikh> yeah, that too.
foo_ is now known as inomataj
<lianj> i thought it was the stupidity on tv
<injekt> I pay way too much for my tivo
<injekt> I hate tv
<erikh> the roku keeps her super happy
<erikh> we have netflix which is $8/mo
<injekt> yeah I love movies, I have netflix and LF
<injekt> but general tv is utter shit
<erikh> and no cable service, and amazon prime has some movies/tv but we got that for the shipping
<erikh> free two day shipping is the tits
lutfidemirci has quit [Read error: Connection reset by peer]
lutfidem_ has joined #ruby-lang
<injekt> yeah I have prime, it's awesome
dernise_ has joined #ruby-lang
<erikh> but yeah, I think after it's all said and done, $100 one time for the roku, about $15/mo if you count amazon prime
vlad_starkov has quit [Ping timeout: 276 seconds]
<erikh> presuming the internet is used for other thigns too, and that's definitely the case here.
anonymuse has quit [Ping timeout: 240 seconds]
dernise has quit [Ping timeout: 246 seconds]
dhruvasagar has quit [Ping timeout: 240 seconds]
ldnunes has joined #ruby-lang
dhruvasagar has joined #ruby-lang
jvrmaia has joined #ruby-lang
ffio has quit [Ping timeout: 245 seconds]
mdedetrich has quit [Quit: Computer has gone to sleep.]
<injekt> I pay like 65gbp just for cable and tivo
<yorickpeterse> injekt: re: integration tests, I agree, fuck em
mdedetrich has joined #ruby-lang
<yorickpeterse> mostly because I can't stand tests breaking because somebody changed an HTML class
chickenflu has joined #ruby-lang
<injekt> right
PaulePanter has joined #ruby-lang
dc5ala has quit [Quit: Ex-Chat]
dhruvasagar has quit [Ping timeout: 240 seconds]
wallerdev has joined #ruby-lang
dhruvasagar has joined #ruby-lang
benlovell has joined #ruby-lang
<judofyr> yorickpeterse: depends. I love integration tests for payments and such
<judofyr> the important parts
lutfidem_ has quit [Ping timeout: 248 seconds]
kitallis-cloud has joined #ruby-lang
inomataj has quit [Remote host closed the connection]
<yorickpeterse> I just don't see the purpose if everything underneath it is already tested
<yorickpeterse> do note that when I talk about intergration tests I'm talking about the whole Capybara crap
<injekt> I hate manually testing payment areas, so monotonous
realDAB has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 240 seconds]
ecnalyr has joined #ruby-lang
dhruvasagar has joined #ruby-lang
scholar01 has quit [Quit: Leaving.]
duphus has joined #ruby-lang
tonni has joined #ruby-lang
duphus has left #ruby-lang [#ruby-lang]
benanne has joined #ruby-lang
dernise_ has quit [Ping timeout: 245 seconds]
cored has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 264 seconds]
dhruvasagar has joined #ruby-lang
hahuang65 has joined #ruby-lang
enebo has joined #ruby-lang
lutfidemirci has joined #ruby-lang
hahuang65 has quit [Ping timeout: 246 seconds]
cd has joined #ruby-lang
cd is now known as Guest32231
dhruvasagar has quit [Ping timeout: 264 seconds]
lutfidemirci has quit [Read error: Connection reset by peer]
ZOGM has joined #ruby-lang
lutfidem_ has joined #ruby-lang
<whitequark> I found a neat thing: http://rubygems.org/gems/cast_off
lutfidem_ has quit [Remote host closed the connection]
lutfidemirci has joined #ruby-lang
enebo has quit [Quit: enebo]
realDAB has quit [Quit: realDAB]
glebm has joined #ruby-lang
hashkey_ has joined #ruby-lang
hashkey is now known as Guest93643
Guest93643 has quit [Killed (wolfe.freenode.net (Nickname regained by services))]
hashkey_ is now known as hashkey
GarethAdams has joined #ruby-lang
gnufied has joined #ruby-lang
lutfidemirci has quit [Ping timeout: 264 seconds]
GarethAdams has quit [Client Quit]
GarethAdams has joined #ruby-lang
jwollert has joined #ruby-lang
anonymuse has joined #ruby-lang
tkuchiki has joined #ruby-lang
_jpb_ has quit [Ping timeout: 276 seconds]
_jpb_ has joined #ruby-lang
mootpointer has quit [Quit: Computer has gone to sleep.]
joshuawscott has joined #ruby-lang
grosscol has joined #ruby-lang
mootpointer has joined #ruby-lang
mootpointer has quit [Client Quit]
rshetty has quit [Quit: Sleeping]
grosscol has quit [Remote host closed the connection]
grosscol has joined #ruby-lang
Guest32231 has quit [Quit: This computer has gone to sleep]
havenwood has joined #ruby-lang
kstuart has quit [Ping timeout: 246 seconds]
<GarethAdams> metaprogramming confuses me - is this possible/the right approach? http://stackoverflow.com/q/17808378/31582
rondale_sc has joined #ruby-lang
rshetty has joined #ruby-lang
breakingthings has joined #ruby-lang
grosscol has quit [Remote host closed the connection]
grosscol has joined #ruby-lang
hashkey_ has joined #ruby-lang
mlangenberg has joined #ruby-lang
amerine has quit [Ping timeout: 268 seconds]
hashkey has quit [Ping timeout: 256 seconds]
<whitequark> why the hell: incompatible character encodings: UTF-32LE and UTF-8 (Encoding::CompatibilityError)
<whitequark> unicode is not compatible with unicode. yeah.
<mlangenberg> I have an object that is either an instance of a specific Class or an Array of instances, which I want to extend / decorate with my own method. Would I use Forwardable or SimpleDelegator for this?
benanne has quit [Quit: kbai]
yalue has joined #ruby-lang
wmoxam has joined #ruby-lang
_jpb_ has quit [Remote host closed the connection]
_jpb_ has joined #ruby-lang
mdedetrich has quit [Quit: Computer has gone to sleep.]
tomzx_mac has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
realDAB has joined #ruby-lang
<mlangenberg> Actually, what is the best way to add a method to an Array? e.g support people.average_age, but also people.select {}
<yorickpeterse> Patch it or use your own type of class
<yorickpeterse> you can also use decorators but meh
<apeiros> something like average_age shouldn't go into Array
Voker57|2 has quit [Changing host]
Voker57|2 has joined #ruby-lang
Voker57|2 is now known as Voker57
<whitequark> mlangenberg: make your own collection class and include Enumerable in it
<yorickpeterse> class PeopleCollection < Array; ....; end
<apeiros> so own class, delegator or use Object#extend
<yorickpeterse> or include Enumerable
dernise has joined #ruby-lang
mdedetrich has joined #ruby-lang
glebm has quit [Ping timeout: 264 seconds]
PaulePanter has quit [Quit: leaving]
<mlangenberg> I guess I could do have class PeopleCollection extend Forwardable and include Enumerable.
PaulePanter has joined #ruby-lang
<judofyr> oh, yeah: who's the ping pong master: http://pong.y3o.no/matches/2013-07-23
hashkey_ is now known as hashkey
<whitequark> you only need one
<yorickpeterse> "Login with Facebook" Yeah I don't think so
<judofyr> yorickpeterse: well, if you're not going to play ping pong with us here in Oslo, it doesn't matter
flip_digits has joined #ruby-lang
grosscol has quit [Remote host closed the connection]
grosscol has joined #ruby-lang
<judofyr> yorickpeterse: oh, or is it protected?
<judofyr> nah, you're thinking about the button on the front page?
<yorickpeterse> http://pong.y3o.no/ <- "LOGIN WITH FACEBOOK"
enebo has joined #ruby-lang
<yorickpeterse> yeah
<judofyr> right
<judofyr> it's only for registering matches
<judofyr> you need to be invited anyway
<yorickpeterse> oh nice, this particular collection of data uses two different ways of storing the country
<yorickpeterse> either a half-assed ISO code or the full country name
<andrewvos> How do I write in colour in weechat?
<mlangenberg> whitequark: Hmm… enumerable does not add [] or last :/
<yorickpeterse> not sure, but most channels have it disable
<yorickpeterse> * disabled
<yorickpeterse> I have a fancy plugin though
<yorickpeterse> (check #pry in a sec)
mdedetrich has quit [Quit: Computer has gone to sleep.]
<judofyr> mlangenberg: forwardable then
<whitequark> mlangenberg: yes
<judofyr> AT LEAST YOU CAN'T DISABLE CAPS
<mlangenberg> judofyr: forward able expects a list of all methods to forward
<whitequark> Enumerable is for abstract streams
<whitequark> it only needs #each to be implemented
<judofyr> mlangenberg: SimpleDelegator?
<yorickpeterse> according to this app the country code for Zimbabwe is zm
<yorickpeterse> wat
<whitequark> yorickpeterse: zorkmids!
<yorickpeterse> heh
grumpwork has joined #ruby-lang
grosscol has quit [Remote host closed the connection]
grosscol has joined #ruby-lang
xxaM has quit [Quit: ZzZz]
elia has joined #ruby-lang
rshetty has quit [Quit: Sleeping]
glebm has joined #ruby-lang
wallerdev has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
dumfries has quit [Quit: ZNC - http://znc.sourceforge.net]
_dumfries has quit [Quit: ZNC - http://znc.sourceforge.net]
<whitequark> yorickpeterse: 800 → 367 testcases!
<whitequark> and eight extremely obscure bugs found
<yorickpeterse> wait, you removed tests?
<whitequark> no, 367 remain to be handled
<whitequark> that is, eight bugfixes made 433 of those testcases pass
<yorickpeterse> ah
<yorickpeterse> noice
<whitequark> fuck encodings.
<whitequark> I just realized that escape sequences must follow the file encoding
<whitequark> that is if I write "\x12\x34", that's interpreted in the file encoding
gnufied has joined #ruby-lang
<judofyr> whitequark: so that's no a \x12-byte, it's a 0x12 codepoint?
<gnufied> grr, unable to connect to irc via znc
<whitequark> judofyr: no, it's a byte.
<whitequark> that is the problem.
<whitequark> the escape sequence reader must be encoding-aware.
grosscol has quit [Remote host closed the connection]
<whitequark> also octals overflow
<whitequark> >> "\777"
<eval-in> whitequark => "\xFF" (https://eval.in/38545)
grosscol has joined #ruby-lang
<whitequark> >> 0o777.to_s(16)
<eval-in> whitequark => "1ff" (https://eval.in/38546)
<erikh> gnufied: znc's ares resolver screws up some times
<erikh> I just use ip addresses
wallerdev has quit [Quit: wallerdev]
<whitequark> erikh: do you perhaps know how can I, given list of lines, count the amount of times these lines occur?
<whitequark> ... or maybe I should write an awk script
<gnufied> erikh: ah
<erikh> uniq -c
<whitequark> erikh: oh, thanks
<erikh> might want to sort -n first
tonni has quit [Remote host closed the connection]
<mlangenberg> When using: class MyClass < DelegateClass(ClassToDelegateTo), how strict is the specification of ClassToDelegateTo? Can it just be Object?
<erikh> mlangenberg: it just has to accept an argument list for initialize
<erikh> I use it with Array and Hash all the time
<erikh> 'cause it's smart yo
<mlangenberg> erikh: well there is a custom class I want to wrap.
<ericwood> you inherit from array and hash all the time?
<erikh> ericwood: I delegate to them, yep
<ericwood> hmmm I actually haven't messed with the delegation stuff >.>
rickruby has quit [Remote host closed the connection]
<erikh> it's pretty neato
<erikh> nice for modelling things which are really just fancy collections.
<erikh> yeah, that's one way to do it
Cakey has joined #ruby-lang
<erikh> so, here's another
<ericwood> do tell
<erikh> a contrived example but I need to get working soon
<ericwood> thanks, I learned something new!
<erikh> basically, when you super it goes through DelegateClass, which allows you to work with the inheriting class that way
<erikh> it avoids whole classes of self/reference crap
<erikh> (that you do not want)
<ericwood> that's awesome!
<ericwood> can't say it's something I've needed before, though :P
grosscol has quit [Remote host closed the connection]
<erikh> generally, avoiding inheriting from core classes is a good idea
grosscol has joined #ruby-lang
ffio has joined #ruby-lang
<injekt> make sure you dont inherit from Object
<erikh> heh
<erikh> injekt: wait -- because delegateclass inherits from object?
<erikh> I'm all confused now
<injekt> erikh: I was being ironic
<erikh> I'm in the mission
<erikh> I'm desensitized to irony
<injekt> I guess if I said BasicObject it would have been more obvious
Kero has joined #ruby-lang
<erikh> no, i'm just dumb
<injekt> <3
<injekt> ITS OK BECAUSE I LOVE YOU loop{}
<erikh> HOLD ME
<erikh> wait
<andrewvos> you guysss
<erikh> there is a mutex joke there
<erikh> it'll come soon
<erikh> andrewvos: yooooouuuuuuu
<injekt> prematurely, no doubt
<erikh> injekt: you are so unabashedly british
<andrewvos> mutex joke here ther is e
<injekt> :D
<injekt> andrewvos: that would be the opposite, no?
nathanstitt has joined #ruby-lang
judofyr has quit [Remote host closed the connection]
<andrewvos> only if you got the mutex right
eugenejen has joined #ruby-lang
<injekt> I have spent the majority of my day fucking with postgresql dumps
<injekt> fml
<injekt> I hate local development
<yorickpeterse> clearly you need a single centralized development machine that everybody logs in to
<yorickpeterse> the joke here is that my previous employer suggested that and firmly believed it was a solution
<injekt> that would only make things 100 times worse
<injekt> which is a good number
<yorickpeterse> whereas the real problem was "dumbass devs using windows"
dhruvasagar has joined #ruby-lang
<andrewvos> A manager has a problem. Instead of talking to people he spends £1million. Now he has 100 problems.
<yorickpeterse> and no money
rwilcox has joined #ruby-lang
rwilcox has quit [Client Quit]
<andrewvos> Actually, now he has a higher budget.
<andrewvos> And he gets promoted for solving a problem
tomzx_mac has quit [Ping timeout: 240 seconds]
<whitequark> What. The. Fuck. Ruby.
<whitequark> does it just chew up -unix/-dos after the encoding?
<yorickpeterse> wat
<whitequark> does it have an Encoding::UTF8_MAC
<whitequark> goddamnit
<whitequark> yes and yes
<yorickpeterse> also why the fuck is this in fucking parse.y?
<whitequark> because fuck you, if it wasnt clear
<whitequark> HAHAHA
<whitequark> because emacs.
<yorickpeterse> eh wat
<yorickpeterse> wat wat wat
<andrewvos> uh
<injekt> lolmacs
<ericwood> ahaha
<ericwood> I'm trying to install elixir
<ericwood> wish me luck
<andrewvos> good luck
<ericwood> thanks
<injekt> why would that take luck? elixir is easy to install
<ericwood> that means a lot to me
<ericwood> injekt: I hear bad things
<injekt> wat
<ericwood> idk
<injekt> what system are you on?
<ericwood> OS X
<injekt> brew install elixir
<injekt> done
<ericwood> I tried that and it didn't work last time
<yorickpeterse> > OS X
<ericwood> but I didn't feel like digging into it
grosscol has quit [Remote host closed the connection]
<injekt> heh
grosscol has joined #ruby-lang
<ericwood> it said it was successful but I couldn't get to the elixir CLI thing
<ericwood> whatever that's called
<injekt> shout at jose otherwise, he's always pretty helpful
<ericwood> or dave thomas :D
<ericwood> are there actually cool elixir libs for stuff yet?
<ericwood> as in, can I do anything practical with it?
<whitequark> won't you just use erlang libs?
<yorickpeterse> hmpf, Rails' order() doesn't escape SQL fragments
<injekt> nope
<yorickpeterse> NOW I HAVE '; -- PROBLEMS
<whitequark> yorickpeterse: yes, a common pitfall
<ericwood> whitequark: oh yeah, those
<ericwood> yorickpeterse: lolololol
<yorickpeterse> whitequark: is there a way to manually escape them, or use placeholders?
<whitequark> yorickpeterse: whitelist them
<whitequark> if params[:order] =~ /\A(foo|bar) (ASC|DESC)\z/
<yorickpeterse> I have that partially but it just occured to me that you can bypass it by injecting SQL code in the table name (as in, "users.derp")
<whitequark> like dat
<whitequark> or you could maybe use arel
<yorickpeterse> hm, I have an idea
Uranio has joined #ruby-lang
<injekt> meh, I have an 'Ordereable' concern which checks column_names
<yorickpeterse> wait, does Arel do any escaping at all?
<yorickpeterse> injekt: so do I
<yorickpeterse> but due to the use of JOINs here and there you have to prefix some fields with the table names
<yorickpeterse> and I right now only whitelist the column names
<injekt> right, mine concern does that too
<yorickpeterse> so I need to slap the table names in ther
<yorickpeterse> * there
<injekt> "#{table_name}.#{attribute}"
<yorickpeterse> ya
<injekt> unless you provide the table name
<injekt> etc
amerine has joined #ruby-lang
bjrohan has joined #ruby-lang
<ericwood> I saw this in our codebase once: exec(params[:foo])
<ericwood> the asshole was trying to get the class object from a string >.>
<yorickpeterse> did the person get fired?
<ericwood> they don't work here anymore, but if they had been here we would have stabbed them probably
<ericwood> it was only a super admin controller, so no damage, but wtf
<ericwood> like, wtf
<ericwood> >> Kernel.get_const('String')
<eval-in> ericwood => undefined method `get_const' for Kernel:Module (NoMethodError) ... (https://eval.in/38555)
<bjrohan> I am trying an example in Why's poignant guide to Ruby. In the example I created a hash in a file, which I saved. I required the file, but the program gives an error that the variable from the hash file is undefined
<ericwood> >> Kernel.const_get('String')
<eval-in> ericwood => String (https://eval.in/38557)
<injekt> const_get
kstuart has joined #ruby-lang
<ericwood> tl;dr idiot was trying to make his own const_Get using exec on unsanitized user input :D:D:D:D
<injekt> bjrohan: might need a little more info
* ericwood dies inside
<yorickpeterse> damn it, where's zzak
<ericwood> moar info plz
<bjrohan> Here is a pastebin of the 2 files: http://paste.ubuntu.com/5904253/
stardiviner has quit [Ping timeout: 264 seconds]
<injekt> and the error?
<bjrohan> injekt, swap.rb:8:in `<main>': undefined local variable or method `code_words' for main:Object (NameError)
<ericwood> do require_relative instead of require
<injekt> heh
<yorickpeterse> haha this snippet again
<bjrohan> :-)
<yorickpeterse> Somebody else asked the same question a few weeks ago
<ericwood> nice
<yorickpeterse> or the same person, not sure
<bjrohan> Not me
<bjrohan> just got to this part in the book
<injekt> I dont remember the poignant guide teaching this
<ericwood> me either
<bjrohan> page 32
<ericwood> but then again I was on acid when I read it
<injekt> no, reading it puts you on acid
grosscol has quit [Remote host closed the connection]
<injekt> so we all were
<injekt> \o/
grosscol has joined #ruby-lang
<yorickpeterse> would be nice for the poignant guide not to teach broken shit
<ericwood> yorickpeterse: to be fair, it's kinda out of date now :(
<yorickpeterse> "Here's how to write Ruby" "It doesn't work!" "THAT'S THE POINT!!!"
<bjrohan> just change the path to require_relative and that will solve it?
stardiviner has joined #ruby-lang
<injekt> I dont even understand what guide gets you to define an lvar and then require it from a different file
<ericwood> just try it for kicks
<bjrohan> ok
benanne has joined #ruby-lang
<ericwood> injekt: _why is not known for his best practices
<ericwood> I only recommend people read the book for the cultural aspect of it
<ericwood> it's a lot of fun to read
<yorickpeterse> injekt: probably used to work in some ancient Ruby version
<ericwood> and the first two chapters are especially hilarious
GeissT has quit [Quit: MillBroChat AdIRC User]
<injekt> I remember enjoying it
<bjrohan> ericwood, same error when I replaced require with require_relative
<ericwood> hmmph
<bjrohan> ericwood, change the file to only the file, not the whole path?
<ericwood> bjrohan: sure
<ericwood> make it relative
stef_204 has quit [Remote host closed the connection]
<injekt> guys
<injekt> this wont work, no matter what you do
<ericwood> what
<bjrohan> ericwood, didn't work :-(
<injekt> it's a local variable
<bjrohan> injekt, what do I need to do to get it to work?
<ericwood> you're a local variable
<injekt> it's not accessible
<injekt> bjrohan: stop using a local variable
<bjrohan> how do I not use a local variable?
<yorickpeterse> prefix it with @
<yorickpeterse> or $
<bjrohan> ok
<injekt> $code_words instead of code_words it's a global variable which is a stupid idea, but so is what you're doing (no offence, it's not your fault)
<yorickpeterse> (for extra comedy)
<ericwood> yorickpeterse: don't bring globals into this D:
<ericwood> he'll do it
<ericwood> an instance variable will do just fine mmk?
<yorickpeterse> muaha
<injekt> using instance variables for this is worse because it's not just bad practice, it makes less sense
<ericwood> makes more sense to me
<injekt> how? what's the instance?
<ericwood> the instance of everything
<yorickpeterse> bjrohan: easiest way is to probably just concat the two files together
<injekt> you're the instance of everything
<bjrohan> well yes, I can just define the has in the file
<ericwood> injekt: let's just say that what he's trying to do is fundamentally a bad practice so an instance variable won't hurt anything :P
<bjrohan> here is what I get when I placed a $code_words: swap.rb:8:in `<main>': undefined method `each' for nil:NilClass (NoMethodError)
<injekt> ericwood: same with globals
<ericwood> bjrohan: change it to $code_words in both files
<bjrohan> ok
<injekt> ^
<injekt> then delete both files
<injekt> are read a different book
<injekt> and*
<ericwood> bjrohan: we all really love WPGTR here, but it's not a good way to learn ruby anymore :(
<ericwood> sorry
<ericwood> but keep reading it, because it's a fun adventure
<ericwood> and listen to the soundtrack as well :D
<ericwood> I love the soundtrack so much
<bjrohan> that worked. injekt I also have Beginning Ruby from Novice to Professional 2nd ed. I do like the comedy of WPGTR
<injekt> well grab a pen and draw some bacon and foxes on your beginning ruby book
<ericwood> oooh that would make it a lot better
realDAB has quit [Quit: realDAB]
<ericwood> I should do that with my copy
Homo-Erectus has joined #ruby-lang
Homo-Erectus has left #ruby-lang [#ruby-lang]
bjrohan has quit [Quit: Leaving]
realDAB has joined #ruby-lang
minivan has quit [Quit: minivan]
mistym has joined #ruby-lang
gcol has joined #ruby-lang
grosscol has quit [Read error: Connection reset by peer]
hahuang65 has joined #ruby-lang
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
hahuang65 has quit [Ping timeout: 246 seconds]
zmike123 has joined #ruby-lang
_jpb_ has quit [Remote host closed the connection]
_jpb_ has joined #ruby-lang
ecnalyr has quit [Ping timeout: 245 seconds]
dernise_ has joined #ruby-lang
cd has joined #ruby-lang
cd is now known as Guest90403
glebm has quit [Quit: Computer has gone to sleep.]
dernise has quit [Ping timeout: 276 seconds]
glebm has joined #ruby-lang
mytrile has joined #ruby-lang
mistym has quit [Remote host closed the connection]
glebm has quit [Client Quit]
imperator has joined #ruby-lang
gcol has quit [Remote host closed the connection]
gcol has joined #ruby-lang
sonicpond has joined #ruby-lang
<imperator> greetings programs!
tkuchiki has quit [Remote host closed the connection]
vbatts has joined #ruby-lang
malev has joined #ruby-lang
<whitequark> that's what is left.
realDAB has quit [Quit: realDAB]
<yorickpeterse> "Encoding is easy" - No sane person, ever
<yorickpeterse> The syntax errors are interesting though
<whitequark> yorickpeterse: no I already fixed almost all of the stuff with Encoding
<whitequark> most of what you see, in particular Encoding::UndefinedConversionError, is shit in comments
<whitequark> which is ignored by MRI but I cannot ignore it
stardiviner has quit [Remote host closed the connection]
mytrile has quit [Remote host closed the connection]
scampbell has joined #ruby-lang
gcol has quit [Remote host closed the connection]
gcol has joined #ruby-lang
jxie has joined #ruby-lang
kristofferrr has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
realDAB has joined #ruby-lang
bzalasky has joined #ruby-lang
<yorickpeterse> HAHAHA CODECLIMATE
<yorickpeterse> check this out
<ericwood> no
dernise__ has joined #ruby-lang
<akahn> Is there a way to check if some ruby code is being run by a human or via a script? I want to show a progress bar if a human is running my code manually, but omit it if it's being run as part of an automated build process
<yorickpeterse> define human
<yorickpeterse> as in, they run it manually?
<whitequark> akahn: STDOUT.tty?
<yorickpeterse> FINALLY, added sorting to all darn tables in this app
<yorickpeterse> that took....3 hours at least
<akahn> whitequark: thanks, I'll give that a shot
<ericwood> someone in #ruby is asking why you'd ever want instance methods
<ericwood> and that class methods should be enough for anyone
<ericwood> whyyyyyyyyyyyyyy
mistym has joined #ruby-lang
<yorickpeterse> obvious troll
<ericwood> how do you even explain that
dernise_ has quit [Ping timeout: 276 seconds]
<ericwood> no he's legitimately asking
<akahn> whitequark: how can I simulate a situation where that returns false?
<ericwood> I'm a professional troll spotter
<imperator> 640k should be enough for him
<ericwood> nobody there knows how to help him :P
<imperator> akahn, you could reopen stdout
<yorickpeterse> akahn: pipes: e.g. `echo "foo" | ruby script.rb`
<whitequark> akahn: ./foo.rb >/dev/null
<whitequark> or >file
<akahn> aaah
<akahn> of course. thanks
rshetty has joined #ruby-lang
<whitequark> ruby WHAT THE FUCK
<gnufied> now!
<whitequark> why do you interpret a literal \0 in the middle of a file as EOF
<ericwood> because \0 is EOF
<whitequark> but a literal \0 in a string as just \0
<ericwood> you should know that
jsullivandigs has joined #ruby-lang
<whitequark> ericwood: no it isn't; eof is eof
<yorickpeterse> \0 != \\0
<ericwood> you're EOF
<yorickpeterse> I'll EOF your face
<ericwood> ouch
<gnufied> \0 isn't EOF
<gnufied> whitequark: examples?
<whitequark> gnufied: well there's just a file with a NUL byte inside
<whitequark> and "<NUL>" is "\0"
_jpb_ has quit [Remote host closed the connection]
<yorickpeterse> >> puts 'hello'; \0; puts 'hhheehehee'
<eval-in> yorickpeterse => /tmp/execpad-97621f93f8b9/source-97621f93f8b9:2: syntax error, unexpected $undefined, expecting keyword_end ... (https://eval.in/38596)
_jpb_ has joined #ruby-lang
<whitequark> but foo=<NUL>1 is a syntax error because <NUL> = eof
<whitequark> yorickpeterse: no.
<yorickpeterse> >> puts 'hello'; "\0"; puts 'hhheehehee'
<eval-in> yorickpeterse => hello ... (https://eval.in/38597)
<whitequark> that's not a literal EOF.
<whitequark> errr
<whitequark> not a literal \0
<yorickpeterse> sample plox
<whitequark> c3RlcF9zdGF0ZTM9ezpuYW1lPT4ic3RlcCAzIiw6b3V0cHV0PT4iACJ9Cg==
<whitequark> base64'd
<whitequark> and b3V0cHV0PQAxCg==
<whitequark> the first has a string with a literal \0 inside, the second just has it in the source
lutfidemirci has joined #ruby-lang
<yorickpeterse> base64, are you a hacker?
benlovell has quit [Ping timeout: 248 seconds]
<yorickpeterse> hm, if I decoded that and write it to a file I can run it fine
gcol has quit [Remote host closed the connection]
gcol has joined #ruby-lang
<whitequark> exactly
<whitequark> hd it
<yorickpeterse> the second one I can't
<yorickpeterse> hd?
<whitequark> yes
tubbo has joined #ruby-lang
<whitequark> hexdump -C
<tubbo> hey guys
<yorickpeterse> oh hexdump
<tubbo> has anyone here ever made their own custom IRB console? i pretty much need one to deal with connecting to a ZMQ socket
<tubbo> among other things
mlangenberg has quit [Quit: mlangenberg]
<yorickpeterse> hm interesting
<yorickpeterse> tubbo: pry isn't suitable?
dhruvasagar has quit [Ping timeout: 256 seconds]
<tubbo> yorickpeterse: i actually didn't even try
<tubbo> yorickpeterse: basically what i want is some kind of ruby console with ffi-rzmq preloaded and a few lines of code executed
mbj has quit [Ping timeout: 264 seconds]
<yorickpeterse> There's also pry-remote which can be used for daemons and such
<tubbo> (the lines of code connect to a ZMQ socket and save the socket handler to `sock`)
<yorickpeterse> Just use Pry for that. `require 'pry'; ..... code ....; Pry.start`
<tubbo> hmm, ok
<yorickpeterse> IRB does that too but Pry > IRB
<yorickpeterse> (IRB.start)
_elia has joined #ruby-lang
<tubbo> agreed
<tubbo> yorickpeterse: actually that's why i came in here, IRB.start wasn't working for me
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
<yorickpeterse> Hm
<yorickpeterse> Is the ZMQ code blocking it?
<yorickpeterse> (as in, a blocking event loop is running)
<tubbo> nah
<tubbo> something else was up, but fuck it i got Pry.start to work so we're all godo
<tubbo> good*
glebm has joined #ruby-lang
daihuws has joined #ruby-lang
<tubbo> had to add my methods into the Kernel module to make them available in the console, however.
<tubbo> yorickpeterse: do you happen to know if i can "trap" the exit out of Pry? i'd like to close up my socket connection and terminate the ZMQ::Context before quitting
<whitequark> at_exit
<tubbo> nice
shireesh has quit [Quit: Leaving]
elia has quit [Ping timeout: 264 seconds]
<tubbo> whitequark: do i just define that? Pry.at_exit = -> { ... }?
<yorickpeterse> No, just regulat at_exit
<yorickpeterse> at_exit { foo }
<tubbo> cool
<yorickpeterse> does AR provide any low level method for manually escaping SQL fragments? Every solution that I can think of for this sorting nonsense has at least one workaround
gcol has quit [Remote host closed the connection]
gcol has joined #ruby-lang
<yorickpeterse> unless I decide to shit up the UX (lol UX of code)
tylersmith has joined #ruby-lang
mbj has joined #ruby-lang
dhruvasagar has joined #ruby-lang
<yorickpeterse> Hm, it seems to have
bjrohan has joined #ruby-lang
<yorickpeterse> SomeModel.sanitize('herp derp user input')
mlangenberg has joined #ruby-lang
imperator2 has joined #ruby-lang
tenderlove has quit [Ping timeout: 264 seconds]
<bjrohan> I am new to Ruby and programming, would Beginning Ruby from Novice to Professional, or Pragmatic Ruby be better?
imperator has quit [Ping timeout: 256 seconds]
mucker has joined #ruby-lang
mlangenberg has quit [Ping timeout: 276 seconds]
lutfidemirci has quit [Remote host closed the connection]
<clov3r> I like rubymonk.com to be honest. I can say that pragmatic ruby is a great book though
glebm has quit [Quit: Computer has gone to sleep.]
mistym has quit [Remote host closed the connection]
diegoviola has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
<realDAB> bjrohan: there's also 'the well-grounded rubyist'
* realDAB is its author
<realDAB> but i still genuinely recommend it :-)
lutfidemirci has joined #ruby-lang
benanne has quit [Quit: kbai]
thmzlt has joined #ruby-lang
gcol has quit [Read error: Connection reset by peer]
gcol has joined #ruby-lang
<yorickpeterse> whitequark: 240 stars for ruby-lint
<yorickpeterse> I'm a Github star!
<yorickpeterse> we're my internet money
<yorickpeterse> * where is
<ericwood> I wish I was that cool
<yorickpeterse> ericwood: just get a t-shirt with the text "Turbolinks" on it
<ericwood> oh awesome
<andrewvos> Watch out for the flock of ladies yorickpeterse
<ericwood> I'd be a hit at rails conferences
<yorickpeterse> ericwood: literally
<ericwood> :|
<bjrohan> thanks clov3r and realDAB I am also working through Code Academy
gcol has quit [Ping timeout: 240 seconds]
kstuart has quit [Ping timeout: 245 seconds]
<yorickpeterse> andrewvos: you should see me doing the groceries while wearing my Pry t-shirt
__butch__ has joined #ruby-lang
<ericwood> oooh they make pry shirts?
<ericwood> I'd wear that
<yorickpeterse> which is actually funny because I can easily spend an hour trying to decide between two types of cheese
gcol has joined #ruby-lang
<yorickpeterse> ericwood: http://devswag.com/collections/pry
<ericwood> niceeee
ledestin has quit [Ping timeout: 248 seconds]
glebm has joined #ruby-lang
bzalasky has joined #ruby-lang
<andrewvos> I still want a black tshirt with faded white text on the front saying binding.pry
<ericwood> I should buy a jQuery shirt for javascript confs
ledestin has joined #ruby-lang
<ericwood> that pisses off all the bigots
lutfidemirci has quit [Remote host closed the connection]
<ericwood> lol
<whitequark> because all of these use slightly different coverage algorithms.
<whitequark> in corner fucking cases.
<whitequark> don't ask.
Senjai has joined #ruby-lang
<yorickpeterse> yeah but missing 3 files seems like a big fat bug
dagobah has quit [Remote host closed the connection]
mistym has joined #ruby-lang
<yorickpeterse> whitequark: hey, you like Python and JS right?
<ericwood> lol
<ericwood> he hates everything
<whitequark> lol
dhruvasagar has quit [Ping timeout: 256 seconds]
<whitequark> you're closer to the truth than you'd think
dernise has joined #ruby-lang
<ericwood> I follow him on twitter, nothing positive comes out of it :P
<yorickpeterse> check that out
<whitequark> oh, I like pypy
<ericwood> if you know a language sufficiently well you'll complain about it a lot
imperator2 has quit [Ping timeout: 245 seconds]
<whitequark> but it's not really python :D
<yorickpeterse> whitequark: no no, read the first two paragraphs
<ericwood> whitequark: you just like the idea of it
<erikh> I pooped
<yorickpeterse> also there's a Java joke in there
<ericwood> whitequark: btw what do you think about elixir?
<whitequark> oh they port python itself to js
<yorickpeterse> "as a kind of runs-everywhere lowest-common-denominator environment "
<whitequark> fuck that
<havenwood> Best use of Python is to implement Ruby. Yay Topaz! :P
<whitequark> ericwood: I actually like PyPy. it's very interesting and promising research.
<whitequark> Topaz has more potential than e.g. JVM for running Ruby
<whitequark> ericwood: elixir is fine.
LauraE has joined #ruby-lang
lutfidemirci has joined #ruby-lang
<yorickpeterse> home tiem
<yorickpeterse> toodies
<tubbo> whitequark: why do you say topaz has more potential than the JVM for running Ruby?
<ericwood> I'm thinking about picking up elixir
dernise__ has quit [Ping timeout: 245 seconds]
<erikh> do you know erlang already?
<ericwood> no
<tubbo> i've been having fun with elixir
<ericwood> I don't really want to learn it
* erikh has been learning erlang
<ericwood> I knew haskell fairly well
<erikh> yeah, I get the feeling that's a lot of elixir people
<erikh> want erlang, don't want to learn erlang
<ericwood> I want all the cool functional shit without the horrible erlang syntax
<erikh> can't say I really blame them, the syntax is atrocious
tenderlove has joined #ruby-lang
<tubbo> erikh: i want the concepts of erlang, but erlang itself is a crappy language.
<tubbo> and by "language" i mean syntax.
<whitequark> tubbo: JVM's object model is very, very, very limited and rigid
<ericwood> I just want the erlang VM
Nisstyre has quit [Ping timeout: 264 seconds]
<tubbo> whitequark: wait java or JVM? i didn't know JVM had an object model.
<whitequark> tubbo: it's more or less Java's
<tubbo> i know Java's object model is a bit more rigid, but JVM is executing Java Bytecode, is JBC object-oriented?
tenderlove has quit [Read error: Connection reset by peer]
<whitequark> yes
<tubbo> hmm, interesting
tenderlove has joined #ruby-lang
<tubbo> i've never used jruby but i can see how it would be beneficial to people who already use other langs on the jvm.
<whitequark> well, right now jruby is the fastest and most interoperable implementation
<ericwood> yep
bzalasky has quit [Remote host closed the connection]
<ericwood> jRuby is awesome
<tubbo> ...except when you need c-extensions :P
<tubbo> hee!
<whitequark> tubbo: ffi
<whitequark> or pure java versions of the same stuff
<tubbo> yup
<tubbo> ugh
firstdayonthejob has quit [Ping timeout: 259 seconds]
bjrohan has quit [Quit: Leaving]
<tubbo> having so much trouble with ZeroMQ...mostly because i'm pretty sure i have rogue socket connections going on
<tubbo> the code itself seems to work..
<tubbo> but i keep getting aborts when i run `rspec`: "Too many open files (signaler.cpp:330)"
<whitequark> close your sockets
<tubbo> i don't know how :O
<whitequark> use your ZMQ API
<tubbo> whitequark: i would but i don't have handlers to them anymore
<tubbo> nor do i even know if they're around.
<tubbo> i really don't know why this "Too many open files (signaler.cpp:330)" error keeps happening
loincloth has joined #ruby-lang
<tubbo> i haven't done much socket programming in my life but this is fun
bzalasky has joined #ruby-lang
gcol has quit [Remote host closed the connection]
gcol has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
<whitequark> tubbo: I guess you have to keep handlers.
firstdayonthejob has joined #ruby-lang
io_syl has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
ecnalyr has joined #ruby-lang
<tubbo> whitequark: yeah...that doesn't help me now though :P
DEac- has quit [Read error: Connection reset by peer]
DEac-_ has joined #ruby-lang
lutfidemirci has quit [Remote host closed the connection]
DarkBushido has joined #ruby-lang
dhruvasagar has joined #ruby-lang
gcol has quit [Remote host closed the connection]
gcol has joined #ruby-lang
achiu2 has quit [Quit: WeeChat 0.4.1]
achiu has joined #ruby-lang
_elia has quit [Ping timeout: 246 seconds]
tenderlove has quit [Remote host closed the connection]
tenderlove has joined #ruby-lang
Squarepy has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
tenderlove has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
lsegal has joined #ruby-lang
gregmoreno has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 264 seconds]
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
elia has joined #ruby-lang
shinnya has joined #ruby-lang
iliketurtles has joined #ruby-lang
torrieri has joined #ruby-lang
torrieri has quit [Changing host]
torrieri has joined #ruby-lang
thmzlt has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
apeiros has quit [Remote host closed the connection]
henrikhodne has joined #ruby-lang
maxmanders has quit [Quit: Computer has gone to sleep.]
gcol has quit [Write error: Broken pipe]
grumpwork has quit [Read error: Connection timed out]
grumpwork has joined #ruby-lang
symm- has joined #ruby-lang
dernise has quit [Ping timeout: 276 seconds]
realDAB has quit [Quit: realDAB]
tkuchiki has joined #ruby-lang
elia has quit [Ping timeout: 246 seconds]
realDAB has joined #ruby-lang
fenicks has joined #ruby-lang
__butch__ has quit [Read error: Connection reset by peer]
grosscol has joined #ruby-lang
pskosinski has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
__butch__ has joined #ruby-lang
dickson66 has joined #ruby-lang
iliketurtles has quit [Quit: zzzzz…..]
dhruvasagar has joined #ruby-lang
grosscol has quit [Remote host closed the connection]
torrieri has quit [Quit: Leaving...]
grosscol has joined #ruby-lang
retro|cz has quit [Ping timeout: 264 seconds]
ecnalyr has quit [Remote host closed the connection]
iliketurtles has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 248 seconds]
Cakey has quit [Ping timeout: 240 seconds]
mrsolo has joined #ruby-lang
JohnBat26 has joined #ruby-lang
LauraE has left #ruby-lang [#ruby-lang]
grosscol has quit [Remote host closed the connection]
ffio has quit [Ping timeout: 256 seconds]
grosscol has joined #ruby-lang
stamina has quit [Ping timeout: 248 seconds]
GaelanAintAround is now known as Gaelan
glebm has quit [Quit: Computer has gone to sleep.]
DarkBushido has quit [Remote host closed the connection]
tockitj has joined #ruby-lang
<eam> I know I can Foo.send("methodname", args)
<eam> but how do I send to a dynamically chosen class?
tockitj has left #ruby-lang [#ruby-lang]
_tockitj has joined #ruby-lang
<_tockitj> is there a way to get list of aliases a class has ?
torrieri has joined #ruby-lang
<Nilium> eam: If you hand it a class object, e.g., some_klass, it's the same.
ffio has joined #ruby-lang
diegoviola has quit [Quit: WeeChat 0.4.1]
ffio is now known as Guest63709
Guest63709 has quit [Client Quit]
ffio_ has joined #ruby-lang
hahuang65 has joined #ruby-lang
tbuehlmann has joined #ruby-lang
rickruby has joined #ruby-lang
<eam> Nilium: I have a string though -- found Kernel.const_get though
<Nilium> A string for what
<eam> (Kernel.const_get "Foo").send("methodname", args)
<Nilium> Why is your bracing made of weird.
<eam> ?
<Nilium> This is not lisp.
<canton7> Kernel.const_get("Foo").send("methodname", args)
<eam> no unfortunately it's not :)
<canton7> (is more idiomatic)
mbj has quit [Ping timeout: 246 seconds]
<Nilium> Trust me, it's pretty fortunate that Ruby isn't lisp
<eam> losing trust in you :)
<Nilium> If it were, the community would be much smaller.
<eam> hah
<Nilium> And possibly much more pretentious.
<Nilium> Though I guess at least it's not Haskell
grosscol has quit [Remote host closed the connection]
grosscol has joined #ruby-lang
Cakey has joined #ruby-lang
intellitech has quit [Ping timeout: 256 seconds]
hanmac has joined #ruby-lang
hanmac has left #ruby-lang [#ruby-lang]
rshetty has quit [Ping timeout: 268 seconds]
<eam> it's still all much ado about a paren
<Nilium> Alls I said was it was weird.
TheMonster has joined #ruby-lang
ezkl has joined #ruby-lang
saarinen has joined #ruby-lang
<eam> at least I didn't write [Kernel.const_get "Foo"].first.send("methodname", args)
<TheMonster> I need to parse a large mailing list archive(mbox format) using Ruby. I found only one gem called mbox-ruby but it's a bit slow when it comes to reading messages at the end of the file first... Do you know any better gem or solution to use for that?
grosscol has quit [Remote host closed the connection]
gcol has joined #ruby-lang
yxhuvud2 has joined #ruby-lang
Cakey has quit [Ping timeout: 256 seconds]
__butch__ has quit [Quit: Leaving.]
marr has quit [Ping timeout: 264 seconds]
yxhuvud has quit [Ping timeout: 264 seconds]
gregmore_ has joined #ruby-lang
mucker has quit [Quit: leaving]
gregmoreno has quit [Ping timeout: 246 seconds]
mbj has joined #ruby-lang
breakingthings has quit [Quit: breakingthings]
jaimef has quit [Excess Flood]
apeiros has joined #ruby-lang
breakingthings has joined #ruby-lang
rwilcox has joined #ruby-lang
rwilcox has quit [Client Quit]
rwilcox has joined #ruby-lang
<andrewvos> Go really only has the for loop
<andrewvos> ?
arooni-mobile has joined #ruby-lang
<nikky> TheMonster: The problem is that mbox files don't have any sort of indexing, so it pretty much has to scan the entire file to find one near the end. I suppose you could keep all of the messages in a RDBMS (or even a noSQL), and only use mbox-ruby to do the initial loading and subsequent incremental updates.
<Nilium> Yes, but it's sort of an ambiguous loop.
<Nilium> To andrewvos.
<Nilium> It's worth keeping in mind that, for the most part, every other loop in C, for example, is basically just recreating a for loop. Exception is sort of do {} while(..)
jaimef has joined #ruby-lang
<TheMonster> OK. Thanks nikky :)
<Nilium> do while is just weird.
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
benanne has joined #ruby-lang
apeiros has quit [Ping timeout: 246 seconds]
retro|cz has joined #ruby-lang
joeroot has quit [Quit: Leaving...]
<andrewvos> Nilium: Seems pretty limited
kristofferrr has quit [Quit: ❤]
<Nilium> Not really.
vlad_starkov has joined #ruby-lang
gcol has quit [Remote host closed the connection]
maxmanders has joined #ruby-lang
gcol has joined #ruby-lang
flip_digits has quit [Remote host closed the connection]
maxmanders has quit [Max SendQ exceeded]
maxmanders has joined #ruby-lang
mbj has quit [Read error: Connection reset by peer]
firstdayonthejob has quit [Ping timeout: 246 seconds]
gcol has quit [Remote host closed the connection]
gcol has joined #ruby-lang
__butch__ has joined #ruby-lang
JohnBat26 has joined #ruby-lang
<andrewvos> Nilium: Go seems quite nice
<andrewvos> Nilium: I mean, not that bad.
<andrewvos> Not as pretty as ruby
<Nilium> I haven't used it extensively, so I don't know. I just know people very happy with it and my own tiny amount of time spent in it.
vlad_starkov has quit [Remote host closed the connection]
<whitequark> yorickpeterse: ha, I seem to have managed to tackle the problem of "non-ascii shit in comments which ruby 1.9 ignores" !
<Nilium> Far as I know, it's excellent at what it was made for
glebm has joined #ruby-lang
<whitequark> though in 2.0, it *will* fail if you feed it like windows-1252 (mri won't)
realDAB has quit [Quit: realDAB]
samuelkadolph has quit [Ping timeout: 260 seconds]
<whitequark> like 95% of that non-ascii stuff is ⓒ and umlauted letters in copyright notices
vlad_starkov has joined #ruby-lang
<whitequark> yorickpeterse: !!! was: 308 now: 181
nwjsmith has joined #ruby-lang
mbj has joined #ruby-lang
<Nilium> Grrr, people not using (c)
<yorickpeterse> whitequark: that reminds me, I have that server to set up
<whitequark> also: Your branch is ahead of 'origin/master' by 17 commits.
<whitequark> dat bugfixes
samuelkadolph has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
apeiros has joined #ruby-lang
setmeaway2 has quit [Quit: Leaving]
forrest has joined #ruby-lang
dernise has joined #ruby-lang
intellitech has joined #ruby-lang
glebm has quit [Quit: Computer has gone to sleep.]
TheMonster has quit [Ping timeout: 248 seconds]
scottschecter has quit [Quit: WeeChat 0.4.0]
dernise has quit [Ping timeout: 240 seconds]
gcol has quit [Remote host closed the connection]
gcol has joined #ruby-lang
brianpWins has joined #ruby-lang
tkuchiki has quit [Remote host closed the connection]
scottschecter has joined #ruby-lang
arooni-mobile has quit [Ping timeout: 260 seconds]
gcol has quit [Remote host closed the connection]
gcol has joined #ruby-lang
<yorickpeterse> HAHA wtf
<yorickpeterse> Running ansible-playbook with -C spits out the info using cowsay
<whitequark> yorickpeterse: what
<yorickpeterse> that's amazing
TheMonster has joined #ruby-lang
TheMonster has quit [Read error: Connection reset by peer]
<ericwood> lol
<ericwood> why would you ever disable that
<yorickpeterse> well it *does* produce a bit too much output
<yorickpeterse> man I should totally add a cowsay presenter to ruby-lint
pskosinski has quit [Quit: Til rivido Idisti!]
<yorickpeterse> http://hastebin.com/raw/misacohidi this would be amazing
<ericwood> oh goodness
<ericwood> you should add a Matz say
<yorickpeterse> hahaha
<ericwood> I'd download that
<tubbo> haha matzsay
flip_digits has joined #ruby-lang
Robby_ has joined #ruby-lang
<yorickpeterse> well, if somebody can provide me with a decent ascii image of Matz' head I might be able to make a .cow out of it
<ericwood> couldn't manage to generate decent ascii art out of it
<ericwood> I love that picture, though
<ericwood> so awesome
crankharder has quit [Read error: Operation timed out]
<Robby_> Hi guys, how's it going?
<yorickpeterse> found a decent app, lets see
<ericwood> I want to frame that picture of matz and put it on my desk
<yorickpeterse> hmpf
<brownies> this is interesting
gcol has quit [Remote host closed the connection]
gcol has joined #ruby-lang
<ericwood> ugh what's the answer?
yfeldblum has quit [Read error: Connection reset by peer]
<ericwood> SOMEONE TELL ME THE ANSWER
yfeldblum has joined #ruby-lang
<yorickpeterse> all 4 of them
<Robby_> Can someone point me in the right direction to how I can set up a web host to run ruby apps?
<yorickpeterse> but probably what it does is `(lvar :config) ||= (send :config)`
retro|cz has quit [Ping timeout: 245 seconds]
<daihuws> Robby: Have you tried Heroku? You can run a basic app on there for free.
flip_digits has quit [Remote host closed the connection]
joeroot has joined #ruby-lang
_jpb_ has quit [Ping timeout: 256 seconds]
torrieri has quit [Quit: Leaving...]
gcol has quit [Remote host closed the connection]
_jpb_ has joined #ruby-lang
flip_digits has joined #ruby-lang
judofyr has joined #ruby-lang
<Robby_> Hi daihuws, yes I'm currently playing around with heroku, but I eventually wanted to set up my own environment on a remote server, just because I like to know how it all works :)
nwjsmith has quit [Remote host closed the connection]
jbsan has quit [Quit: jbsan]
<judofyr> yorickpeterse: I'm pretty sure that does (lvar :config) ||= (lvar :config), but yeah, he probably was aiming for (lvar :config) ||= (send :config)
<judofyr> Robby_: Phusion Passenger is probably the easiest way
<judofyr> Robby_: as for "knowing how it all works", it's not that complex. they start Rails/Rack with a server, and the proxy connections there
<daihuws> Robby_ : Also much cheaper if you set it up yourself. :)
<judofyr> daihuws: unless you can live on the free plan
<Robby_> yeah haha, I'm looking to scale eventually and we can't afford most of the heroku options
<judofyr> too bad Heroku removed Varnish from their stack
<Robby_> but thanks for pointing out Phusion Passenger
elia has joined #ruby-lang
rickruby has quit [Remote host closed the connection]
<yorickpeterse> judofyr: lets find out!
<yorickpeterse> >> def config; 10; end; config ||= config; config
<eval-in> yorickpeterse => nil (https://eval.in/38626)
<yorickpeterse> ha, you're right
<judofyr> yorickpeterse: ;)
<daihuws> I know this is probably a stupidly open-ended question, but I've been looking for an open source Ruby project to contribute to; I'm still learning, so ideally something that a beginner can contribute something useful to. Been browsing random repos on GitHub, but not really seen anything that's grabbed me yet. Anywhere else I ought to be looking?
<whitequark> daihuws: find a problem which bothers you, solve it.
marr has joined #ruby-lang
<Nilium> What he said.
<judofyr> if you can't find a problem: make a problem
<whitequark> I have never seen "find an OSS project you like, contribute to it" effort to have any success.
<judofyr> then solve that
<whitequark> well, that's what computers are about
solars has quit [Ping timeout: 245 seconds]
workmad3 has joined #ruby-lang
<Nilium> Or just reinvent a wheel.
<Nilium> Sometimes it turns out it's not actually a wheel but a turkey that someone molded into a wheel.
<Nilium> Reinventing wheels is fun. Sometimes the wheel sucks.
<Nilium> Basically just do whatever the hell you want.
<yorickpeterse> daihuws: what is a problem that currently bothers you and that could potentially be solved using Ruby?
<daihuws> Well, yeah, I'm trying to make a point of using Ruby to solve everyday problems. I can't think of a good example off the top of my head; normally fairly mundane stuff to do with text formatting &c.
saarinen has quit [Quit: saarinen]
<yorickpeterse> Well there's your task :)
<yorickpeterse> Go fix that mundane part
* lupine enjoys protocol parsers
<lupine> if there's a protocol you know about that doesn't have a ruby library, well, go write one
gcol has joined #ruby-lang
vikhyat has joined #ruby-lang
<daihuws> Cool, I'll have a look into that. Thanks. :)
<toretore> judofyr: (send :config) - now i get it..
_jpb_ has quit [Ping timeout: 264 seconds]
_jpb_ has joined #ruby-lang
<judofyr> toretore: hm? oh, yeah, we're talking in AST
<judofyr> ruby-parse -e config # => (send nil :config)
<toretore> judofyr: i just saw the post and couldn't understand the intention behind the code
<judofyr> toretore: ah right. I'm guessing some caching related code
<judofyr> toretore: or maybe: def foo(config = nil); config ||= self.config; end
<toretore> i knew what it would do, and all i could think was "well, that's stupid"
<judofyr> or something
<toretore> yeah, config ||= config() makes sense
glebm has joined #ruby-lang
<judofyr> toretore: how're doing btw? long time no IRC!
<toretore> doing great! how about you?
jbsan has joined #ruby-lang
<toretore> i stay mostly in #rubyonrails, but i shouldn't
<judofyr> brave man
<Nilium> That be the land of the dead right there.
<judofyr> I'm doing great as well. just bought a 3DS, so I've been playing Animal Crossing. also: started a new blog.
<toretore> i have this hope that one day i can get the message through..
<toretore> 3ds, nintendo?
<Nilium> How is the new Animal Crossing?
elia has quit [Quit: Computer has gone to sleep.]
<judofyr> I haven't played the old one
<Nilium> Keep hearing about it, but I can't decide if it'd be worth getting a 3DS for
<judofyr> so I can't compare
<toretore> judofyr: where's the new blog?
<judofyr> I do love the 3D effect
<judofyr> toretore: tail-f.org
elia has joined #ruby-lang
<toretore> judofyr: i like it
<judofyr> toretore: more content yesterday (see links at the bottom)
<judofyr> Nilium: I like it. everything happens "tomorrow" though. I got it yesterday so I still haven't got my house proper.
gcol has quit [Remote host closed the connection]
<Nilium> So do you owe any absurd amounts of money to a mafia raccoon yet?
gcol has joined #ruby-lang
saarinen has joined #ruby-lang
<judofyr> well, I've paid the first downpayment now!
<judofyr> 10,000 bells
<judofyr> that's all I know
<Nilium> Yeah, that's basically the entire premise of the game.
<Nilium> You are forever in debt to a racoon.
<Nilium> raccoon, even.
Guest90403 has quit [Quit: This computer has gone to sleep]
<judofyr> is Kevin Rose in this game too?
<Nilium> I guess that's a joke I don't get O_o
tonni has joined #ruby-lang
<Nilium> Ah.
<Nilium> Dude just manhandled a raccoon. O_o
<Nilium> God damn.
<judofyr> I'm impressed
<judofyr> take that downpayment!
<Nilium> The set of balls necessary to break up a fight between two animals, much less hurl a raccoon, is beyond me.
iliketurtles has quit [Quit: zzzzz…..]
<judofyr> Nilium: but yeah: I like the game. actually, I often want to play more, but end up putting it down because I want more stuff to happen. e.g. now I just want my house!
<judofyr> but no, I'll have to wait until tomorrow!
<Nilium> Yeah, it usually pays to be patient in the game. Plus you don't really want to obsess over it, or you'll burn out on it really fast.
<judofyr> and I managed to sell my net by mistake, so now I'll have to wait until tomorrow to buy a new one
<Nilium> The other ACs were not the sort of game you'd play for long periods of time in a single day.
<judofyr> yeah, I realize this is a quite long-term game
zmike123 has quit [Quit: ~]
<Nilium> It's more like a chill-out-for-30-minutes sort of game
<judofyr> yes
_jpb_ has quit [Ping timeout: 276 seconds]
elia has quit [Quit: Computer has gone to sleep.]
<judofyr> toretore: no RSS though
speakingcode-wor has joined #ruby-lang
_jpb_ has joined #ruby-lang
<judofyr> it is quite chill
realDAB has joined #ruby-lang
<Nilium> Basically it's pokemon without the implied "and 64 hours later, we found him dead in a pool of spit and mountain dew"
jsullivandigs has quit [Remote host closed the connection]
<judofyr> buying Super Mario 3D Land tomorrow
<Nilium> Oh well, one of these days I'll get a 3DS
jsullivandigs has joined #ruby-lang
<Nilium> Though if Nintendo puts out a new Metroid that isn't Other M, I will buy one instantly.
cored has quit [Ping timeout: 256 seconds]
<speakingcode-wor> hmm what's the difference between this channel and #ruby?
arooni-mobile has joined #ruby-lang
<Nilium> This is the official channel and #ruby is the one for wannabes.
<Nilium> Aside from that, it's basically the same thing with different people.
<speakingcode-wor> o
<judofyr> Nilium: I think the 3D is superb and adds another dimension. although it's often a hit-or-miss depending on the sunlight, how you sit, etc. but when it works it feels like I'm peeking inside a window
cored has joined #ruby-lang
<Nilium> I'm less concerned about that -- I might have to play with it disabled since other 3D stuff gives me a headache -- but I'd just like a handheld system that's got games that're fun.
<judofyr> 3DS is starting to look quite good
<judofyr> you also have a huge selection of DS games
<Nilium> And one with actual, physical controls, since playing games with virtual controls on my iPhone is unpleasant
<judofyr> yeah
<Nilium> I'm still not entirely sure how people put up with virtual thumbsticks and whatnot
<judofyr> iPhone games are great, but I do miss a D-pad a lot
<judofyr> or: I miss the games that have D-pads
<judofyr> or, not D-pad
<speakingcode-wor> surprised no one has come out with an iphone game controller attachment yet on kickstarter or something
<judofyr> that's the left, top, right, bottom-thing right?
<Nilium> There are plenty of good games, just not the ones that don't try to do their own thing with a touchscreen
<Nilium> speakingcode-wor: They have.
<judofyr> what do you call the thumbthingie?
<Nilium> Analog stick
<judofyr> yes
jsullivandigs has quit [Read error: Connection reset by peer]
<Nilium> I think
<judofyr> that thing
<speakingcode-wor> joystick
jsullivandigs has joined #ruby-lang
<judofyr> "An analog stick, sometimes called a control stick or thumbstick"
<Nilium> Thumbstick, joystick, analog stick, all the same thing
<speakingcode-wor> its only an analog stick if it's analog, i guess
<judofyr> true
<judofyr> isn't a joystick bigger?
<speakingcode-wor> although i'm not sure how it would be digital
<judofyr> heh
<Nilium> Could be, though I remember old game consoles with joysticks that had the exact same function as modern analog sticks
<speakingcode-wor> well, yeah it could be digital on the touchscreen but that goes full circle so yeah
<judofyr> speakingcode-wor: I think "analog" really means analog as in "not discrete"
<judofyr> the original meaning of analog
<judofyr> "non-quantized variations"
<speakingcode-wor> yeah. continuous signal
<speakingcode-wor> continuous signals are all analogous
<judofyr> speakingcode-wor: analog as in: you can move it in all directions. buttons are more digital in the sense you either press them or not.
<speakingcode-wor> well i'm probably wrong about that, but all the analog signals are analogous :-D
_jpb_ has quit [Ping timeout: 248 seconds]
<whitequark> you'd still have discretization *somewhere*
duphus has joined #ruby-lang
joeroot has quit [Quit: Linkinus - http://linkinus.com]
<speakingcode-wor> whitequark: yes, it is sampled discretely when the signal is digitized via an ADC
<Nilium> I think I'll try to play some of this new Counter-Strike game
_jpb_ has joined #ruby-lang
jsullivandigs has quit [Ping timeout: 240 seconds]
imperator2 has joined #ruby-lang
<speakingcode-wor> what would happen if you were talking about a DS at the park or something, and random people just walked up and chimed in
<tubbo> hey guys, having some trouble getting IRB to start from within an existing Ruby process
<judofyr> Nilium: new CS?
<tubbo> tried to do IRB.start but got `irb/magic-file.rb:7:in `initialize': No such file or directory - [] (Errno::ENOENT)`
<Nilium> Counter-Strike: Global Offensive
<tubbo> i just did IRB.start
<Nilium> I'll try to find the steam thing for it
<judofyr> Nilium: ah, right. it's not that new is it?
<judofyr> tubbo: try ARGV.clear first
<Nilium> Well, newest
<Nilium> Was released the middle of last year
<judofyr> tubbo: although I think there is another way to start IRB without clearing ARGV. but that's what I've always done.
<Nilium> I played a couple rounds of it yesterday and it was pretty fun
mistym is now known as mistym_lunch
<Nilium> Though after not playing competitive multiplayer games for years, I suck
<judofyr> hey, you're probably still better than me
<speakingcode-wor> thats why i don't game anymore
<speakingcode-wor> takes too much dedication to even be able to hang in the arena
<judofyr> I played causally for two weeks…
gcol has quit [Remote host closed the connection]
<judofyr> speakingcode-wor: well, that's why I don't game competitive multiplayer game
gcol has joined #ruby-lang
<judofyr> games*
jsullivandigs has joined #ruby-lang
<judofyr> Nilium: so is CS:GO kinda between 1.6 and Source gameplay-wise?
<judofyr> or not, gameplay, but how it feels to play it
JohnBat26 has quit [Read error: Connection reset by peer]
<Nilium> I couldn't say anymore, but it feels a lot faster than CS:S though.
<speakingcode-wor> i never did play source
<Nilium> Granted I'm going off something like 6 year old memories here
<judofyr> is 1.6 still big?
<tubbo> judofyr: beautiful. thank you!
<Nilium> I think it's still got players
<tubbo> i hated source
<speakingcode-wor> i quit playing cs around the time they took out bunny hopping and added in the riot shields n such for CTs
<tubbo> CS:S looked good but it didn't play the right way
<tubbo> 1.6 is still the best :P
<judofyr> tubbo: let me know if you find a better solution. I've always used ARGV.clear;IRB.start, but it feels hacky
<tubbo> judofyr: it worked perfectly for me...i guess that's just what you need to do :\
<tubbo> s/it/your soltuon
<Nilium> Oh it's the tubbo
<Nilium> I think I have you on the twitters.
<tubbo> Nilium: oh noes!
<tubbo> :D
<judofyr> heh, this reminds me of Super Smash Bros: the competitive community liked Melee, then Brawl came out with much slower gameplay (it felt more floaty) and everyone hated it.
<judofyr> now the new SSB coming out and it's rumored not be as floaty
<Nilium> I think I also told you you were hellbanned from hackernews
<tubbo> omfg
<tubbo> melee
<tubbo> Nilium: you might have. i've since created a different account. if you're hellbanned from HN, apparently, the site moves way slowe.r
<Nilium> I never really had a problem with any of the Smash Bros games
<tubbo> melee was just like, a whole year of my childhood
<Nilium> I spent absurd amounts of time on the first one, not as much on the others because I stopped having friends.
<judofyr> I think Sakurai explicitly made Brawl more for the casual players. he didn't like the competitive community.
<judofyr> a few years ago I had one good friend that played SSB. we played quite a lot.
<judofyr> now I don't have anyone to play with
<judofyr> or a Wii for that matter
<Nilium> I could sort of understand that. Smash Bros isn't really worth it as a competition thing.
<judofyr> but maybe I'll get the 3DS version
<Nilium> It's just a fun game where you accidentally make your friends go orbital.
vikhyat has left #ruby-lang [#ruby-lang]
<Nilium> And then you laugh for several minutes.
<judofyr> Nilium: "no items. fox only. final destination."
<judofyr> that's the competitive community in a nutshell
<judofyr> and tiers
<judofyr> and discussions about tiers
<Nilium> It's basically the polar opposite of Mario Kart and Mario Party, now that I think about it.
<judofyr> and discussions about why tiers are lame
<Nilium> I just don't get the whole competitive thing in the first place, so I have a hard time understanding it in the first place
<Nilium> I just play games for fun and relaxing
<judofyr> Final Destination: https://www.youtube.com/watch?v=O-7gmds2njg
<Nilium> O_o
<Nilium> I wish I didn't get the yugioh thing.
<Nilium> Something Awful has done horrible things to me.
gcol has quit [Remote host closed the connection]
<judofyr> but yeah, SSB is fun
gcol has joined #ruby-lang
<judofyr> I played the Fire Emblem demo here the other day, and thanks to the soundtrack it reminded me of Brawl…
<judofyr> oh well
<judofyr> it's getting lateish
<judofyr> and darkish
<judofyr> mostly because I'm too lazy to go and turn on the lamp
<judofyr> well, not really dark. I love the long summer here in the north.
<judofyr> summer nights*
<judofyr> so yeah
<judofyr> I'm off
<judofyr> and so are you it seems
<judofyr> ANYWAY
<judofyr> later
<drbrain> judofyr: this is why I added computer control to all my lamp
<drbrain> lamps
<judofyr> drbrain: nice. so now you can sit all day (night) long?
<drbrain> well, I still need to eat and use the bathroom
<Nilium> Please don't add computer control for those.
<judofyr> damn, I forgot to eat today
<judofyr> Nilium: see also: "Mom, Bathroom!" from South Path: https://www.youtube.com/watch?v=C4iAz3XHMhg
yfeldblum has quit [Ping timeout: 264 seconds]
<judofyr> or actually, made you shouldn't see it
<Nilium> I've seen it
Uranio has quit [Quit: while you reading this, a kitty dies]
judofyr has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
s0ber_ has joined #ruby-lang
gregmore_ has quit [Remote host closed the connection]
iliketurtles has joined #ruby-lang
gregmoreno has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
gcol has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
s0ber has quit [Ping timeout: 264 seconds]
s0ber_ is now known as s0ber
maxmanders has quit [Quit: Computer has gone to sleep.]
imperator2 has quit [Ping timeout: 246 seconds]
havenwood has joined #ruby-lang
gregmoreno has quit [Ping timeout: 276 seconds]
iliketurtles has quit [Ping timeout: 268 seconds]
stamina has joined #ruby-lang
tdm00_ has joined #ruby-lang
ZOGM has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
tdm00_ has quit [Client Quit]
tdm00 has joined #ruby-lang
tdm00 has quit [Client Quit]
iliketurtles has joined #ruby-lang
<whitequark> yorickpeterse: any success with the buildbox?
tdm00 has joined #ruby-lang
skmp has quit [Quit: Leaving.]
thepumpkin has joined #ruby-lang
<yorickpeterse> yeah I'm nearing completion with my ansible crap
<yorickpeterse> should be done by tomorrow
stamina has quit [Ping timeout: 276 seconds]
Squarepy has quit [Quit: Leaving]
firstdayonthejob has joined #ruby-lang
gregmoreno has joined #ruby-lang
eleanor has joined #ruby-lang
skmp has joined #ruby-lang
jsullivandigs has quit [Remote host closed the connection]
crankharder has joined #ruby-lang
fatherb has joined #ruby-lang
jsullivandigs has joined #ruby-lang
Robby_ has quit [Ping timeout: 250 seconds]
_jpb_ has quit [Ping timeout: 276 seconds]
_jpb_ has joined #ruby-lang
crankharder has quit [Remote host closed the connection]
jsullivandigs has quit [Ping timeout: 268 seconds]
crankharder has joined #ruby-lang
lutfidemirci has joined #ruby-lang
amerine has quit [Quit: Textual IRC Client: www.textualapp.com]
realDAB has quit [Quit: realDAB]
spectra- has left #ruby-lang [#ruby-lang]
realDAB has joined #ruby-lang
crankharder has quit [Ping timeout: 246 seconds]
crankharder has joined #ruby-lang
<injekt> can anyone simplify this https://gist.github.com/injekt/3e66cbdd042e40190966 I've been using some kind of hybrid Array(obj) with compact and all kinds of shit, but come to the realization it's just simpler doing it this way, but still intrigued
<whitequark> injekt: ugh
* whitequark slaps injekt around a bit with a large trout
<injekt> yeah
<injekt> I know
<whitequark> any solution I may think of is even more horrible
<injekt> :D
<injekt> cool
<tubbo> :P
<injekt> har
<tubbo> i wonder if github admins ever get mad that we fork gists with a 1-line change?
<injekt> also I hate that, if I was going to do the block assign, I'd use begin
<tubbo> because like...that whole thing is a git repo :P
<injekt> they probably love it
<tubbo> injekt: why would you use begin/end there though?
<injekt> tubbo: I dont like path = if
<tubbo> seems like 2 extra lines of syntax
<injekt> it is
<tubbo> oh ok
<injekt> which is why between path = if and if path = else path = i'd still choose the latter :D
duphus has quit [Quit: Leaving.]
ldnunes has quit [Quit: Leaving]
jsullivandigs has joined #ruby-lang
scampbell has quit [Remote host closed the connection]
t_ has quit [Ping timeout: 245 seconds]
realDAB has quit [Quit: realDAB]
fatherb has left #ruby-lang [#ruby-lang]
<_tockitj> injekt, you can also test `Array === obj`
mistym_lunch is now known as mistym
<andrewvos> injekt: Basically it sucks that you have an Array there.
<andrewvos> So all code henceforth, will suck.
<yorickpeterse> just did a git push -f
<yorickpeterse> felt good
realDAB has joined #ruby-lang
<andrewvos> You are all that is man
kalleth has quit [Quit: No Ping reply in 180 seconds.]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
kalleth has joined #ruby-lang
_jpb_ has quit [Ping timeout: 264 seconds]
ffio_ has quit [Quit: WeeChat 0.4.1]
_jpb_ has joined #ruby-lang
<yorickpeterse> yeah right
jvrmaia has quit [Quit: Leaving]
<_tockitj> injekt: ( ([*obj][0,-2] || [current_path]) + [obj[-1]]).join(/middleware/)
kalleth has quit [Client Quit]
<apeiros> code obfuscation contest?
<_tockitj> ^^ "/middleware" that is
kalleth has joined #ruby-lang
<_tockitj> hmmz.. how to split array [1,2,3,4] into [1,2,3] & [4]
<_tockitj> i think there is a method that can be used for this, but I can't find it atm
<apeiros> .pop
<apeiros> oh, no
<apeiros> oh, actually yes
<apeiros> .pop(1)
breakingthings has quit [Quit: breakingthings]
mbull9 has joined #ruby-lang
MaddinXx has quit [Remote host closed the connection]
realDAB has quit [Quit: realDAB]
<_tockitj> obj=[*obj]; ([obj.pop] + (obj.presence || [current_path])).reverse.join('/middleware/')
mbreedlove has joined #ruby-lang
<drbrain> why not Array(obj)
<_tockitj> yeah - that is better
<_tockitj> obj=Array(obj); ([obj.pop] + (obj.presence || [current_path])).reverse.join('/middleware/')
iliketurtles has quit [Quit: zzzzz…..]
<drbrain> (there is a difference in behavior between 1.8 and 1.9 wrt "\n" in strings, but this should not matter for a path)
wmoxam has quit [Ping timeout: 260 seconds]
arooni-mobile has quit [Ping timeout: 264 seconds]
x0f_ has joined #ruby-lang
<_tockitj> same obfuscation level - but more ruby-like (:
torrieri has joined #ruby-lang
x0f has quit [Ping timeout: 256 seconds]
arooni-mobile has joined #ruby-lang
lele has quit [Ping timeout: 245 seconds]
mbreedlove has quit [Remote host closed the connection]
elia has joined #ruby-lang
kstuart has joined #ruby-lang
<injekt> D:
loincloth has quit [Remote host closed the connection]
torrieri has quit [Quit: Leaving...]
marr has quit [Ping timeout: 268 seconds]
torrieri has joined #ruby-lang
<_tockitj> injekt, xD
forrest has quit [Quit: Leaving]
<_tockitj> a=Array(obj); ( (a.slice!(0..-2).presence || [current_path]) + a).join('/middleware')
<_tockitj> this one is even readable
<_tockitj> dunno how to replace ` || [current_path]` part
elia has quit [Quit: Computer has gone to sleep.]
iliketurtles has joined #ruby-lang
flip_digits has quit [Remote host closed the connection]
flip_digits has joined #ruby-lang
<Paradox> anyone have a particular opinion on what options parsing library to use?
intellitech has quit [Quit: intellitech]
<havenwood> Paradox: slop and trollop are both nice syntax, i think
<Paradox> alright thanks :)
<Paradox> i'll play with them
<Paradox> i dont need something as powerful as thor
<Paradox> but i dont want to fight with optparse
<whitequark> Paradox: slop
gregmoreno has quit [Remote host closed the connection]
symm- has quit [Ping timeout: 246 seconds]
gregmoreno has joined #ruby-lang
flip_digits has quit [Ping timeout: 246 seconds]
<_tockitj> Paradox, optionparser from stdlib is least quirky
<Paradox> i've used optionparser
<Paradox> and it isnt quirky
<Paradox> but it isnt sane either
<Paradox> slop looks perfect
<Paradox> has nice support for git-style sub commands
kstuart has quit [Ping timeout: 264 seconds]
flip_digits has joined #ruby-lang
<_tockitj> didn't work so well for me few months ago
<_tockitj> but, can't recall exact issues
ezkl has quit [Ping timeout: 240 seconds]
<_tockitj> design limitations with those git like commands iirc
mbull9 has quit [Remote host closed the connection]
skmp has quit [Read error: Connection reset by peer]
zenspider_ has left #ruby-lang [#ruby-lang]
__butch__ has quit [Quit: Leaving.]
zenspider has joined #ruby-lang
<whitequark> _tockitj: I think there's slop 4 these days
<zenspider> git-style subcommands (not git style... it's far from the first) doesn't need an option parser... it just needs send
<Paradox> while i'm on the topic of slop, how would i go about making non-flagged options, that must always be present
tonni has quit [Remote host closed the connection]
<Paradox> injekt, you around?
flip_digits has quit [Ping timeout: 245 seconds]
<_tockitj> xD
<Paradox> ugh xml
<Paradox> im having to do a ton of xml parsing
<Paradox> terabytes worth
<Paradox> stupid uspto
<Paradox> y u no json
<_tockitj> therefore you are doing enterprise software :X
vlad_starkov has quit [Remote host closed the connection]
<Paradox> it sure feels like it
<Paradox> i could probably just skip rails and dump it into the database
<Paradox> but then i'd have to play with sql and thats a whole nother rabbit hole
<ryanf> Paradox: I think if you use parse! it removes all the parsed options, then you can just do whatever you want with the remaining unflagged params
<Paradox> cool
<Paradox> thanks ryanf
<ryanf> np
anonymuse has quit [Remote host closed the connection]
anonymuse has joined #ruby-lang
enebo has quit [Quit: enebo]
apeiros has quit [Remote host closed the connection]
postmodern has joined #ruby-lang
apeiros has joined #ruby-lang
lutfidemirci has quit [Remote host closed the connection]
<Paradox> i wish amazon would offer a postgres database
<Paradox> tired of shelling out $50 for a heroku database when amazons have more cache for less cash
joshuawscott has quit [Quit: Leaving.]
<Paradox> i'll look at openshift
ilyam has joined #ruby-lang
anonymuse has quit [Ping timeout: 264 seconds]
stamina has joined #ruby-lang
flip_digits has joined #ruby-lang
flip_digits has quit [Read error: Connection reset by peer]
flip_digits has joined #ruby-lang
mbull9 has joined #ruby-lang
torrieri has quit [Quit: Leaving...]
eugenejen has quit [Quit: eugenejen]
towski has joined #ruby-lang
mdedetrich has joined #ruby-lang
torrieri has joined #ruby-lang
netShadow has joined #ruby-lang
nathanstitt has joined #ruby-lang
stamina has quit [Ping timeout: 256 seconds]
tbuehlmann has quit [Remote host closed the connection]
zenspider is now known as zenspider_
zenspider_ is now known as zenspider
<zenspider> _tockitj: I hope you're using that in production
<andrewvos> Holy shit I am a Go convert
<andrewvos> cross-compilation? HELL YEAH
vlad_starkov has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 268 seconds]
<andrewvos> Anyway night
workmad3 has quit [Ping timeout: 268 seconds]
Senjai has quit [Ping timeout: 264 seconds]
nathanstitt has quit [Ping timeout: 256 seconds]
vlad_starkov has quit [Ping timeout: 264 seconds]
nathanstitt has joined #ruby-lang
mootpointer has joined #ruby-lang
killtheliterate is now known as killthe|afk
beerdy1 has joined #ruby-lang
Gaelan is now known as GaelanAintAround
beerdy1 has quit [Quit: Leaving.]
beerdy has joined #ruby-lang
elia has joined #ruby-lang
mbj has quit [Quit: leaving]
woollyams has joined #ruby-lang
mootpointer has quit [Quit: Computer has gone to sleep.]
<_tockitj> zenspider, how is vlad different from mina ?
mdedetrich has quit [Quit: Computer has gone to sleep.]
brianpWins has quit [Quit: brianpWins]
mootpointer has joined #ruby-lang
_jpb_ has quit [Remote host closed the connection]
ZOGM has joined #ruby-lang
beerdy has quit [Quit: Leaving.]
beerdy has joined #ruby-lang
_jpb_ has joined #ruby-lang
mdedetrich has joined #ruby-lang
realDAB has joined #ruby-lang
_jpb_ has quit [Client Quit]
_jpb_ has joined #ruby-lang
<matti> andrewvos: Haha
mbull9 has quit [Remote host closed the connection]
<matti> andrewvos: They are many Ruby refugees using Go ;]
_jpb_ has quit [Client Quit]
beerdy1 has joined #ruby-lang
Senjai has joined #ruby-lang
_jpb_ has joined #ruby-lang
beerdy1 has quit [Client Quit]
<beerdy> hello
henrikhodne has quit [Ping timeout: 268 seconds]
Senjai has quit [Read error: Operation timed out]
grumpwork has quit [Remote host closed the connection]
GaelanAintAround is now known as Gaelan
beerdy has quit [Quit: Page closed]
beerdy has joined #ruby-lang
beerdy has quit [Client Quit]
beerdy has joined #ruby-lang
<beerdy> .
nathanstitt has quit [Ping timeout: 256 seconds]
mootpointer has quit [Quit: Computer has gone to sleep.]
<matti> Hello.