_elia has quit [Quit: Computer has gone to sleep.]
elia has joined #opal
elia has quit [Quit: Computer has gone to sleep.]
elia has joined #opal
f-3r has joined #opal
f-3r has quit [Remote host closed the connection]
elia has quit [Read error: Connection reset by peer]
elia has joined #opal
meh` has quit [Ping timeout: 260 seconds]
e_dub has quit [Quit: ZZZzzz…]
Moon4u has joined #opal
e_dub has joined #opal
f-3r has joined #opal
Moon4u has quit [Quit: Page closed]
f-3r has quit [Ping timeout: 245 seconds]
f-3r has joined #opal
meh` has joined #opal
j_mcnally has joined #opal
e_dub has quit [Quit: ZZZzzz…]
davispuh has joined #opal
elia has quit [Ping timeout: 272 seconds]
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
e_dub has joined #opal
j_mcnally has joined #opal
j_mcnally has quit [Client Quit]
_whitelogger has joined #opal
j_mcnally has joined #opal
elia has joined #opal
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
elia has quit [Quit: Computer has gone to sleep.]
elia has joined #opal
<elia>
adambeynon, you around?
<adambeynon>
hey elia
<elia>
hey! how's it going?
<elia>
adambeynon, was looking at some generated source and wondering if there's a better way to process blocks
<elia>
like at the end of the arguments
<adambeynon>
elia: I have thought about that before. It does become tricky trying to distinguish between a block and a proc passed as a last param
<adambeynon>
fun fact, originally blocks were always passed as the first argument, aka a method call with no block would look like: obj.$foo(null, 1, 2, 3)
<adambeynon>
good old days...
<elia>
that's a good one for the imdb page trivia
<elia>
:D
<adambeynon>
lol
<elia>
adambeynon, what I was thinking initially was to use $$p as just a flag and then pass the block as the last arg
<adambeynon>
$$p as a flag on the method?
<elia>
even better would be to have a special wrapper, like ary.$map($opal.block(function(e){…}))
<elia>
flag version could look like this: ary.$map.$$p = true; ary.$map(function(e){…})
<adambeynon>
then ary.$map would grab the block, and then unset the flag (so the next call without a block wouldnt fail?)
<elia>
exactly
<elia>
adambeynon, now works the same, but the block comes before the invocation and looks odd
<adambeynon>
elia: yes, it makes things very difficult to debug atm
<elia>
the wrapper wold be even prettier and could also take care of setting self
<elia>
or not
<elia>
no, maybe not
<adambeynon>
$opal.block(function() {}, self)
<adambeynon>
I guess the ordering of the block before the args is breaking source maps quite a bit as well
<elia>
yeah that looks good
<elia>
(adambeynon, talking about source maps, remember to give a look at passing the original source along with fragments)
<adambeynon>
ah yes, will do that
<elia>
trying to fix Kernel.require_tree now :)
elia has quit [Quit: Computer has gone to sleep.]
elia has joined #opal
ryanstout has joined #opal
elia has quit [Quit: Computer has gone to sleep.]
elia has joined #opal
f-3r has quit [Remote host closed the connection]
e_dub has quit [Quit: ZZZzzz…]
pebble` has quit [Remote host closed the connection]
pebble` has joined #opal
elia has quit [Quit: Computer has gone to sleep.]
pebble` has quit [Remote host closed the connection]
pebble` has joined #opal
StephenA1 has joined #opal
StephenA1 has quit [Client Quit]
davispuh has quit [Remote host closed the connection]