<nakilon>
or actually the main issue is one and the rest are too obvious derivative, but: when you change the structure of the vector you call to a block how do you edit the code? you simply look at the |...| thing and when args are normally named it's pretty clear to see "aha, they are now in another order" or "there is now this one added in between..." --
<nakilon>
and you do edit just in this one place; now when they are just numbers you have do edit the whole block, replacing _1 with _2, _3, with _1, etc. -- it's error-prone and it's absolutely not obvious which part of the block you've already fixed, it's all just literally obfuscated
<nakilon>
when they are named at any point of time you can just check if args are passed correctly without even knowing what the code does (it can be not your code for example), but when you have to check if the external edit of the structure of passed vector complies the numbered args you have to reread the block and understand what it's doing that is just
<nakilon>
a waste of time
<nakilon>
basically the named args are a FEATURE, and using indexes instead of names is a STEP BACK to some low level stone age where language does not support it and you just pass args as arrays like in some ASM or idk, not even C
gggp_ has joined #ruby
<neshpion>
kwargs best args
<nakilon>
so it's literally more like codegolf obfuscation rather than a useful addition to Ruby that is supposed to be the most understandable language
gggp has quit [Ping timeout: 252 seconds]
xall has quit [Quit: Client closed]
gggp__ has joined #ruby
gggp_ has quit [Ping timeout: 240 seconds]
gggp_ has joined #ruby
moo has quit [Quit: moo]
moo has joined #ruby
gggp__ has quit [Ping timeout: 258 seconds]
gggp_ has quit [Ping timeout: 268 seconds]
drincruz_ has joined #ruby
drincruz_ has quit [Ping timeout: 265 seconds]
reset has quit [Quit: reset]
psb is now known as tree
reset has joined #ruby
neshpion has quit [Quit: neshpion]
ur5us has quit [Ping timeout: 268 seconds]
gggp has joined #ruby
llua has quit [Ping timeout: 240 seconds]
Oxfuxxx has quit [Quit: leaving]
Oxfuxxx has joined #ruby
Oxfuxxx has quit [Client Quit]
llua has joined #ruby
Oxfuxxx has joined #ruby
Oxfuxxx has quit [Client Quit]
Oxfuxxx has joined #ruby
reset has quit [Quit: reset]
gggp_ has joined #ruby
gggp has quit [Ping timeout: 256 seconds]
teclator has joined #ruby
gggp__ has joined #ruby
gggp_ has quit [Ping timeout: 258 seconds]
gggp__ is now known as gggp
yxhuvud has quit [Read error: Connection reset by peer]
yxhuvud has joined #ruby
gggp has quit [Read error: Connection reset by peer]
Oxfuxxx_ has joined #ruby
Oxfuxxx_ has quit [Client Quit]
jetchisel has joined #ruby
Oxfuxxx_ has joined #ruby
Oxfuxxx has quit [Ping timeout: 276 seconds]
marahin- is now known as marahin
marahin has quit [Changing host]
marahin has joined #ruby
fossdd has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
gggp has joined #ruby
gggp_ has joined #ruby
fandre1986 has joined #ruby
gggp has quit [Ping timeout: 272 seconds]
Bounga has joined #ruby
goldfish has joined #ruby
ur5us has joined #ruby
fossdd has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
fossdd has quit [Ping timeout: 240 seconds]
goldfish has quit [Ping timeout: 265 seconds]
gggp_ has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
jhass[m] has quit [Quit: Bridge terminating on SIGTERM]
ckrailo has quit [Quit: Bridge terminating on SIGTERM]
mewfree[m] has quit [Quit: Bridge terminating on SIGTERM]
<weaksauce>
rapha well anything can be a key if it supplies an eql? and hash method
fossdd has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
fossdd has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
<rapha>
hmm, okay, now in search of a one-liner that will make h={"foo":{1:2,3:4}, "bar":{2:3,4:5}} into a=[["foo",1,2], ["foo",3,4], ["bar",2,3], ["bar",4,5]] ... is that possible? can't get it done in less than three lines :(
wei1 has quit [Ping timeout: 258 seconds]
<rapha>
hmm, down to 1 but only with ; ... bagh
<rapha>
:w
<rapha>
whoops
Bounga has quit [Ping timeout: 240 seconds]
fossdd has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
<leftylink>
that is very possible.
<leftylink>
flat_map.
nemesit has joined #ruby
fossdd has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
orbyt has joined #ruby
easbarbosa has joined #ruby
fossdd has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
Guest6189 has joined #ruby
Guest6189 has quit [Client Quit]
pgib has joined #ruby
fossdd has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
lunarkitty has joined #ruby
wei1 has joined #ruby
rhe has quit [Ping timeout: 245 seconds]
jetchisel has joined #ruby
fossdd has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
easbarbosa has quit [Remote host closed the connection]
rhe has joined #ruby
goldfish has joined #ruby
fossdd has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
tv- has quit [Quit: WeeChat 2.9]
Oxfuxxx has quit [Ping timeout: 240 seconds]
Oxfuxxx has joined #ruby
fossdd has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
fossdd has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
fossdd has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
finsternis has quit [Remote host closed the connection]