vwoo has quit [Quit: Computer has gone to sleep.]
vwoo has joined #opal
fkchang has quit [Ping timeout: 276 seconds]
vwoo has quit [Quit: Computer has gone to sleep.]
vwoo has joined #opal
vwoo has quit [Quit: Computer has gone to sleep.]
e_dub has joined #opal
e_dub has quit [Ping timeout: 264 seconds]
e_dub has joined #opal
e_dub has quit [Ping timeout: 264 seconds]
e_dub has joined #opal
e_dub has quit [Quit: Leaving]
elia has joined #opal
meh` has joined #opal
kludge` has quit [Ping timeout: 245 seconds]
kludge` has joined #opal
elia has quit [Quit: Computer has gone to sleep.]
zmike123 has joined #opal
elia has joined #opal
elia has quit [Quit: Computer has gone to sleep.]
elia has joined #opal
elia has quit [Client Quit]
elia has joined #opal
elia has quit [Quit: Computer has gone to sleep.]
zmike123 has quit [Ping timeout: 264 seconds]
zmike123 has joined #opal
elia has joined #opal
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
zmike1234 has joined #opal
zmike123 has quit [Ping timeout: 240 seconds]
adambeynon has joined #opal
e_dub has joined #opal
e_dub has quit [Ping timeout: 240 seconds]
elia has quit [Quit: Computer has gone to sleep.]
<meh`> adambeynon, hey
e_dub has joined #opal
chap has joined #opal
chap has quit [Quit: bb]
aflatter has joined #opal
<adambeynon> hi meh`, sorry, forgot to logout - i will be back later (2 hours time??), but i will be here then for a while
<adambeynon> any questions/problems, post them here, and I will read them when im back ;)
<adambeynon> back in a bit.
<meh`> ~roger
chap has joined #opal
chap has quit [Quit: bb]
GitHub10 has joined #opal
<GitHub10> [opal] adambeynon pushed 1 new commit to master: http://git.io/m33i7A
GitHub10 has left #opal [#opal]
<GitHub10> opal/master b7355f6 Adam Beynon: Support case statements with empty expression (fixes #322)
travis-ci has joined #opal
<travis-ci> [travis-ci] opal/opal#812 (master - b7355f6 : Adam Beynon): The build passed.
travis-ci has left #opal [#opal]
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/9812616
elia has joined #opal
<meh`> adambeynon, blocks are definitely broken
<meh`> adambeynon, now Enumerable is proper
<meh`> but blocks can't handle basic destructuring
<meh`> >> proc { |a, b| a + b }.call([2, 2])
<meh`> => 4
<meh`> and that's not an edge case like |a, (b, c)|
vwoo has joined #opal
vwoo has quit [Ping timeout: 264 seconds]
<meh`> adambeynon, I think we need an extravagantly gay prelude
<adambeynon> meh`: block args are not going to be fun to implement :D
<adambeynon> which is why I have avoided it for so long ;)
<adambeynon> everytime I think I fully understand them, I re-read rubyspec for procs and Im lost again
<adambeynon> ok, I think I get it
zmike1234 has quit [Quit: ~]
<adambeynon> meh`: the only problem we are going to have is how to turn a proc/block into a lambda
<adambeynon> the argument logic will need to be embeded in a proc
<adambeynon> but then converting that to lambda style args is…well, tricky
<meh`> adambeynon, what's the difference with lambda?
<adambeynon> also, using a proc in #define_method
<meh`> mh
<adambeynon> meh`: lambda doesnt deconstruct arguments
<meh`> right
<meh`> what if we add a property to blocks
<meh`> and check that to do the prelude or not?
<meh`> or something
<meh`> adambeynon, we could wrap a function in another function
<meh`> to have a local hidden variable
<meh`> then have a special parameter to the function
<meh`> to change it
<meh`> so we can change a proc to a lambda whenever we want
<meh`> and the other way around
<adambeynon> well, both of those would work
<meh`> Opal.to_lambda = {}; Opal.to_block = {}; and send it as single parameter to the block
<meh`> that changes the outer thing
<meh`> yeah, just throwing ideas
<adambeynon> I think the property is probbaly a good bet. We already have a hidden _isLambda property
<adambeynon> proc { |a, b, c| … } => tmp = function(a, b, c) { if (!tmp._isLambda) { deconstruct() } …. }
<adambeynon> that is a good idea meh`
<meh`> :)
<adambeynon> 1 simple "if" check
<adambeynon> meh`: and if im right, a block accepting just 1 arg doesnt do any deconstructing anyway, yeah?
<meh`> yes
<meh`> >> proc { |a,| a }.call([2, 2])
<meh`> => 2
<meh`> unless you have that :P
<adambeynon> wtf?
<adambeynon> oh
<adambeynon> commar
<adambeynon> sneaky
<meh`> yeah, like masgn
<meh`> it supports the same thing
<meh`> >> a, = [1, 2]
<meh`> => [1, 2]
<meh`> => 1
<meh`> >> a
<adambeynon> well hopefully we can resuse this block compiler code to fix our masgn as well
<meh`> yeah, let's hope so
<adambeynon> so, what you call a block with (1 or 2 or whatever) args doesnt matter, its just what the block's arguments are that are deterministic ?
e_dub has quit [Ping timeout: 245 seconds]
<meh`> adambeynon, yes
e_dub has joined #opal
<meh`> adambeynon, what worries me is that we should clone the block when passing it to define_method
<meh`> or something
vwoo has joined #opal
elia has quit [Quit: Computer has gone to sleep.]
elia has joined #opal
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
vwoo has quit [Quit: Computer has gone to sleep.]
vwoo has joined #opal
elia has quit [Quit: Computer has gone to sleep.]