In Flash9, null can't be used as basic type Int + others in flash. #1

Closed
deltaluca opened this Issue Mar 28, 2012 · 31 comments

Comments

Projects
None yet
3 participants
@deltaluca
Contributor

deltaluca commented Mar 28, 2012

  1. InputStream.hx : 120 (null can't be used as basic type Int)
  2. Parser.hx : 476 (runtime error, cannot convert 1 to Function).
    Also happens (but without a proper stack trace) when using lazyF()
@deltaluca

This comment has been minimized.

Show comment Hide comment
@deltaluca

deltaluca Mar 28, 2012

Contributor
  1. All that needs changing infact to get it to compile so far (Though i'm struggling at present to put together my parser based on the test/ dir so might be more) was to change it from return null; to return 0; Don't see any reason why we can't do that given it's 'abstract' method anyways.
Contributor

deltaluca commented Mar 28, 2012

  1. All that needs changing infact to get it to compile so far (Though i'm struggling at present to put together my parser based on the test/ dir so might be more) was to change it from return null; to return 0; Don't see any reason why we can't do that given it's 'abstract' method anyways.
@deltaluca

This comment has been minimized.

Show comment Hide comment
@deltaluca

deltaluca Mar 28, 2012

Contributor
  1. Changing lazy and lazyF so that var value in the tink AST.build macro call is typed Dynamic solved the runtime type error; but did leave my parser in an infinite loop somewhere inside of parsex (producing a back and forth stack overflow with calls to LazyMacro.lazy); removing all lazyF() from my parsers resolved that so far....
Contributor

deltaluca commented Mar 28, 2012

  1. Changing lazy and lazyF so that var value in the tink AST.build macro call is typed Dynamic solved the runtime type error; but did leave my parser in an infinite loop somewhere inside of parsex (producing a back and forth stack overflow with calls to LazyMacro.lazy); removing all lazyF() from my parsers resolved that so far....
@0b1kn00b

This comment has been minimized.

Show comment Hide comment
@0b1kn00b

0b1kn00b Mar 28, 2012

Collaborator

Could you post a gist as to how to reproduce the bug? It is most likely fixed, I will test and push the updates.

Collaborator

0b1kn00b commented Mar 28, 2012

Could you post a gist as to how to reproduce the bug? It is most likely fixed, I will test and push the updates.

@deltaluca

This comment has been minimized.

Show comment Hide comment
@deltaluca

deltaluca Mar 28, 2012

Contributor

I seem to be getting different error using github version; the two i've mentioned don't even get reached; I just get 'Base Failure' form parsex :P

My parser is at: https://github.com/deltaluca/nape/blob/parsex-symbolic/symbolic/src/symbolic/Parser.hx

Contributor

deltaluca commented Mar 28, 2012

I seem to be getting different error using github version; the two i've mentioned don't even get reached; I just get 'Base Failure' form parsex :P

My parser is at: https://github.com/deltaluca/nape/blob/parsex-symbolic/symbolic/src/symbolic/Parser.hx

@deltaluca

This comment has been minimized.

Show comment Hide comment
@deltaluca

deltaluca Mar 28, 2012

Contributor

Okay; taking the test() function at bottom of parser; changing the parser being tested to 'valueP()' produces the stack overflow with:

An ActionScript error has occurred:
Error: Error #1023: Stack overflow occurred.
    at MethodInfo-322()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:426]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-334()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:480]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-311()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:384]
    at MethodInfo-322()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:426]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-322()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:426]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-334()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:480]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-311()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:384]
    at MethodInfo-322()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:426]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-322()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:426]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-334()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:480]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-311()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:384]
    at MethodInfo-322()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:426]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-322()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:426]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-334()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:480]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-311()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:384]
    at MethodInfo-322()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:426]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-322()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:426]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-334()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:480]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-311()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:384]
    at MethodInfo-322()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:426]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-322()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:426]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-334()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:480]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-311()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:384]
    at MethodInfo-322()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:426]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-322()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:426]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-334()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:480]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-311()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:384]
    at MethodInfo-322()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:426]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-322()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:426]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-334()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:480]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-311()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:384]
    at MethodInfo-322()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:426]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-322()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:426]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-334()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:480]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-311()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:384]
    at MethodInfo-322()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:426]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-322()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:426]
Contributor

deltaluca commented Mar 28, 2012

Okay; taking the test() function at bottom of parser; changing the parser being tested to 'valueP()' produces the stack overflow with:

An ActionScript error has occurred:
Error: Error #1023: Stack overflow occurred.
    at MethodInfo-322()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:426]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-334()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:480]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-311()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:384]
    at MethodInfo-322()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:426]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-322()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:426]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-334()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:480]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-311()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:384]
    at MethodInfo-322()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:426]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-322()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:426]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-334()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:480]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-311()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:384]
    at MethodInfo-322()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:426]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-322()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:426]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-334()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:480]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-311()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:384]
    at MethodInfo-322()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:426]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-322()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:426]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-334()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:480]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-311()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:384]
    at MethodInfo-322()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:426]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-322()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:426]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-334()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:480]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-311()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:384]
    at MethodInfo-322()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:426]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-322()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:426]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-334()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:480]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-311()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:384]
    at MethodInfo-322()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:426]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-322()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:426]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-334()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:480]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-311()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:384]
    at MethodInfo-322()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:426]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-322()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:426]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-334()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:480]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-311()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:384]
    at MethodInfo-322()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:426]
    at MethodInfo-354()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:569]
    at MethodInfo-322()[/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:426]
@deltaluca

This comment has been minimized.

Show comment Hide comment
@deltaluca

deltaluca Mar 28, 2012

Contributor

Trying to use ParserM I also get a complaint from ParseMonad.hx that dO expects only one argument, swapping it to use _dO instead which seems to the the one it should be calling produces compile time error:

/home/luca/.haxenekoflash/haxelib/tink_macros/0,2,3/tink/macro/tools/AST.hx:111: characters 16-33 : +
<builtin>:1: character 0 : Called from
/home/luca/.haxenekoflash/haxelib/tink_macros/0,2,3/tink/macro/tools/AST.hx:101: lines 101-245 : Called from
/home/luca/.haxenekoflash/haxelib/tink_macros/0,2,3/tink/macro/tools/AST.hx:23: characters 10-26 : Called from
/home/luca/Projects/Parsex/src/com/mindrocks/macros/LazyMacro.hx:32: lines 32-41 : Called from
/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:374: characters 11-117 : Called from
/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:435: characters 4-30 : Called from
Aborted

:P

Contributor

deltaluca commented Mar 28, 2012

Trying to use ParserM I also get a complaint from ParseMonad.hx that dO expects only one argument, swapping it to use _dO instead which seems to the the one it should be calling produces compile time error:

/home/luca/.haxenekoflash/haxelib/tink_macros/0,2,3/tink/macro/tools/AST.hx:111: characters 16-33 : +
<builtin>:1: character 0 : Called from
/home/luca/.haxenekoflash/haxelib/tink_macros/0,2,3/tink/macro/tools/AST.hx:101: lines 101-245 : Called from
/home/luca/.haxenekoflash/haxelib/tink_macros/0,2,3/tink/macro/tools/AST.hx:23: characters 10-26 : Called from
/home/luca/Projects/Parsex/src/com/mindrocks/macros/LazyMacro.hx:32: lines 32-41 : Called from
/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:374: characters 11-117 : Called from
/home/luca/Projects/Parsex/src/com/mindrocks/text/Parser.hx:435: characters 4-30 : Called from
Aborted

:P

@sledorze

This comment has been minimized.

Show comment Hide comment
@sledorze

sledorze Mar 28, 2012

Owner

Ok I have no time right now to look at it but I think this is tight to the lazy implementation which is optimized for JS with a hack.

tink.macro.tools.AST.build({
var value = null;
function () {
if (value == null) {
value = untyped 1; // not null to prevent live lock if it forms a cycle.
value = $exp;
}
return value;
};
});

should be replaced by using another var 'computationRequested'

tink.macro.tools.AST.build({
var value = null;
var computationRequested = false;
function () {
if (!computationRequested) {
computationRequested = true;
value = $exp;
}
return value;
};
});

Can you test it?

Owner

sledorze commented Mar 28, 2012

Ok I have no time right now to look at it but I think this is tight to the lazy implementation which is optimized for JS with a hack.

tink.macro.tools.AST.build({
var value = null;
function () {
if (value == null) {
value = untyped 1; // not null to prevent live lock if it forms a cycle.
value = $exp;
}
return value;
};
});

should be replaced by using another var 'computationRequested'

tink.macro.tools.AST.build({
var value = null;
var computationRequested = false;
function () {
if (!computationRequested) {
computationRequested = true;
value = $exp;
}
return value;
};
});

Can you test it?

@sledorze

This comment has been minimized.

Show comment Hide comment
@sledorze

sledorze Mar 28, 2012

Owner

the problem above is in the file LazyMacro.hx

Owner

sledorze commented Mar 28, 2012

the problem above is in the file LazyMacro.hx

@deltaluca

This comment has been minimized.

Show comment Hide comment
@deltaluca

deltaluca Mar 28, 2012

Contributor

That is certainly a nicer solutino than just making value Dynamic in the build expression :P

But it doesn't change anything else, what on earth is that live-lock even about?

Contributor

deltaluca commented Mar 28, 2012

That is certainly a nicer solutino than just making value Dynamic in the build expression :P

But it doesn't change anything else, what on earth is that live-lock even about?

@deltaluca

This comment has been minimized.

Show comment Hide comment
@deltaluca

deltaluca Mar 28, 2012

Contributor

unless you mean that the stack overflow is meant to be caused by lazyF/lazy, in which case either using Dynamic or computatinRequested it still happens

Contributor

deltaluca commented Mar 28, 2012

unless you mean that the stack overflow is meant to be caused by lazyF/lazy, in which case either using Dynamic or computatinRequested it still happens

@sledorze

This comment has been minimized.

Show comment Hide comment
@sledorze

sledorze Mar 28, 2012

Owner

Ok, so maybe I've not understood the issue then..
As I'm not able to test it now here, I can't help much ATM.

Owner

sledorze commented Mar 28, 2012

Ok, so maybe I've not understood the issue then..
As I'm not able to test it now here, I can't help much ATM.

@sledorze

This comment has been minimized.

Show comment Hide comment
@sledorze

sledorze Mar 28, 2012

Owner

Usually it can be cause by a lack of lazyness.
Does it works on non Flash targets?

2012/3/28 Luca Deltodesco <
reply@reply.github.com

unless you mean that the stack overflow is meant to be caused by
lazyF/lazy, in which case either using Dynamic or computatinRequested it
still happens


Reply to this email directly or view it on GitHub:
#1 (comment)

Stphane Le Dorze

http://lambdabrella.blogspot.com/
http://www.linkedin.com/in/stephaneledorze
http://twitter.com/stephaneledorzehttps://twitter.com/#!/stephaneledorze/status/74020060125077504

Tel: +33 (0) 6 08 76 70 15

Owner

sledorze commented Mar 28, 2012

Usually it can be cause by a lack of lazyness.
Does it works on non Flash targets?

2012/3/28 Luca Deltodesco <
reply@reply.github.com

unless you mean that the stack overflow is meant to be caused by
lazyF/lazy, in which case either using Dynamic or computatinRequested it
still happens


Reply to this email directly or view it on GitHub:
#1 (comment)

Stphane Le Dorze

http://lambdabrella.blogspot.com/
http://www.linkedin.com/in/stephaneledorze
http://twitter.com/stephaneledorzehttps://twitter.com/#!/stephaneledorze/status/74020060125077504

Tel: +33 (0) 6 08 76 70 15

@deltaluca

This comment has been minimized.

Show comment Hide comment
@deltaluca

deltaluca Mar 28, 2012

Contributor

I don't know how to.. execute JS :P

But i compiled to neko, and it all seems to work fine, including no longer having the weird errors from tink when using ParserM.

sigh :P

flash is unfortunately the main target i'm interested i

Contributor

deltaluca commented Mar 28, 2012

I don't know how to.. execute JS :P

But i compiled to neko, and it all seems to work fine, including no longer having the weird errors from tink when using ParserM.

sigh :P

flash is unfortunately the main target i'm interested i

@sledorze

This comment has been minimized.

Show comment Hide comment
@sledorze

sledorze Mar 28, 2012

Owner

I was never targeting flash but yeah.. this have to work, I'll look at it
when I have free time (if Laurence have not already nailed it down! ;) ).

2012/3/28 Luca Deltodesco <
reply@reply.github.com

I don't know how to.. execute JS :P

But i compiled to neko, and it all seems to work fine, including no longer
having the weird errors from tink when using ParserM.

sigh :P


Reply to this email directly or view it on GitHub:
#1 (comment)

Stphane Le Dorze

http://lambdabrella.blogspot.com/
http://www.linkedin.com/in/stephaneledorze
http://twitter.com/stephaneledorzehttps://twitter.com/#!/stephaneledorze/status/74020060125077504

Tel: +33 (0) 6 08 76 70 15

Owner

sledorze commented Mar 28, 2012

I was never targeting flash but yeah.. this have to work, I'll look at it
when I have free time (if Laurence have not already nailed it down! ;) ).

2012/3/28 Luca Deltodesco <
reply@reply.github.com

I don't know how to.. execute JS :P

But i compiled to neko, and it all seems to work fine, including no longer
having the weird errors from tink when using ParserM.

sigh :P


Reply to this email directly or view it on GitHub:
#1 (comment)

Stphane Le Dorze

http://lambdabrella.blogspot.com/
http://www.linkedin.com/in/stephaneledorze
http://twitter.com/stephaneledorzehttps://twitter.com/#!/stephaneledorze/status/74020060125077504

Tel: +33 (0) 6 08 76 70 15

@deltaluca

This comment has been minimized.

Show comment Hide comment
@deltaluca

deltaluca Mar 28, 2012

Contributor

Even the magopP parser which i can never get to work at all on flash is working fine on neko.

Contributor

deltaluca commented Mar 28, 2012

Even the magopP parser which i can never get to work at all on flash is working fine on neko.

@sledorze

This comment has been minimized.

Show comment Hide comment
@sledorze

sledorze Mar 28, 2012

Owner

Ok, would be nice to shrink it down to the smallest possible failing bit of
code and put in a Gist these few lines.

2012/3/28 Luca Deltodesco <
reply@reply.github.com

Even the magopP parser which i can never get to work at all on flash is
working fine on neko.


Reply to this email directly or view it on GitHub:
#1 (comment)

Stphane Le Dorze

http://lambdabrella.blogspot.com/
http://www.linkedin.com/in/stephaneledorze
http://twitter.com/stephaneledorzehttps://twitter.com/#!/stephaneledorze/status/74020060125077504

Tel: +33 (0) 6 08 76 70 15

Owner

sledorze commented Mar 28, 2012

Ok, would be nice to shrink it down to the smallest possible failing bit of
code and put in a Gist these few lines.

2012/3/28 Luca Deltodesco <
reply@reply.github.com

Even the magopP parser which i can never get to work at all on flash is
working fine on neko.


Reply to this email directly or view it on GitHub:
#1 (comment)

Stphane Le Dorze

http://lambdabrella.blogspot.com/
http://www.linkedin.com/in/stephaneledorze
http://twitter.com/stephaneledorzehttps://twitter.com/#!/stephaneledorze/status/74020060125077504

Tel: +33 (0) 6 08 76 70 15

@deltaluca

This comment has been minimized.

Show comment Hide comment
@deltaluca

deltaluca Mar 28, 2012

Contributor

I'll get one in a short bit.

Contributor

deltaluca commented Mar 28, 2012

I'll get one in a short bit.

@deltaluca

This comment has been minimized.

Show comment Hide comment
@deltaluca

deltaluca Mar 28, 2012

Contributor

Here's a way of producing the tink bug; it actually occurs not only in flash, but neko also:

https://gist.github.com/2225595

Contributor

deltaluca commented Mar 28, 2012

Here's a way of producing the tink bug; it actually occurs not only in flash, but neko also:

https://gist.github.com/2225595

@deltaluca

This comment has been minimized.

Show comment Hide comment
@deltaluca

deltaluca Mar 28, 2012

Contributor

And the stack overflow bug:

https://gist.github.com/2225783

I also had problems, both in neko and flash to do with getting errors like 'value is not a function()' which I could only resolve by adding lazyF(); i don't know if that's a bug or expected in some cases.

Contributor

deltaluca commented Mar 28, 2012

And the stack overflow bug:

https://gist.github.com/2225783

I also had problems, both in neko and flash to do with getting errors like 'value is not a function()' which I could only resolve by adding lazyF(); i don't know if that's a bug or expected in some cases.

@0b1kn00b

This comment has been minimized.

Show comment Hide comment
@0b1kn00b

0b1kn00b Mar 28, 2012

Collaborator

Ok, my version is working with BugParser and neko, but there is a flash
bug, and I have had to make an edit to tink to initialise a counter
properly.

LazyF is required to modify the initialisation order where there are
recursive definitions, although Stphane knows more about that than I.

I'll have to push a version of tink and parsex to my account for review.

On Wed, Mar 28, 2012 at 1:49 PM, Luca Deltodesco <
reply@reply.github.com

wrote:

Here's a way of producing the tink bug; it actually occurs not only in
flash, but neko also:

https://gist.github.com/2225595


Reply to this email directly or view it on GitHub:
#1 (comment)

Collaborator

0b1kn00b commented Mar 28, 2012

Ok, my version is working with BugParser and neko, but there is a flash
bug, and I have had to make an edit to tink to initialise a counter
properly.

LazyF is required to modify the initialisation order where there are
recursive definitions, although Stphane knows more about that than I.

I'll have to push a version of tink and parsex to my account for review.

On Wed, Mar 28, 2012 at 1:49 PM, Luca Deltodesco <
reply@reply.github.com

wrote:

Here's a way of producing the tink bug; it actually occurs not only in
flash, but neko also:

https://gist.github.com/2225595


Reply to this email directly or view it on GitHub:
#1 (comment)

@sledorze

This comment has been minimized.

Show comment Hide comment
@sledorze

sledorze Mar 28, 2012

Owner

Fixed on Git, published on haxelib - can you confim it works?

Owner

sledorze commented Mar 28, 2012

Fixed on Git, published on haxelib - can you confim it works?

@deltaluca

This comment has been minimized.

Show comment Hide comment
@deltaluca

deltaluca Mar 28, 2012

Contributor

@sledorze, those are the changes I made locally yeh.

@0b1kn00b, when will that be?

Contributor

deltaluca commented Mar 28, 2012

@sledorze, those are the changes I made locally yeh.

@0b1kn00b, when will that be?

@0b1kn00b

This comment has been minimized.

Show comment Hide comment
@0b1kn00b

0b1kn00b Mar 28, 2012

Collaborator

They are up now, but check Stephanes version first.

On Wed, Mar 28, 2012 at 3:07 PM, Luca Deltodesco <
reply@reply.github.com

wrote:

@sledorze, those are the changes I made locally yeh.

@0b1kn00b, when will that be?


Reply to this email directly or view it on GitHub:
#1 (comment)

Collaborator

0b1kn00b commented Mar 28, 2012

They are up now, but check Stephanes version first.

On Wed, Mar 28, 2012 at 3:07 PM, Luca Deltodesco <
reply@reply.github.com

wrote:

@sledorze, those are the changes I made locally yeh.

@0b1kn00b, when will that be?


Reply to this email directly or view it on GitHub:
#1 (comment)

@deltaluca

This comment has been minimized.

Show comment Hide comment
@deltaluca

deltaluca Mar 28, 2012

Contributor

Okay the tink bug test case works fine for flash now.

the stack overflow one still happens in flash though; your tink + stephanes parsex

Contributor

deltaluca commented Mar 28, 2012

Okay the tink bug test case works fine for flash now.

the stack overflow one still happens in flash though; your tink + stephanes parsex

@sledorze

This comment has been minimized.

Show comment Hide comment
@sledorze

sledorze Mar 28, 2012

Owner

not sure to undestand.. anyway, I have to do real work now.. please post
failing code (based on official libs versions only)
Stephane

2012/3/28 Luca Deltodesco <
reply@reply.github.com

Okay the tink bug test case works fine for flash now.

the stack overflow one still happens in flash though; your tink +
stephanes parsex


Reply to this email directly or view it on GitHub:
#1 (comment)

Stphane Le Dorze

http://lambdabrella.blogspot.com/
http://www.linkedin.com/in/stephaneledorze
http://twitter.com/stephaneledorzehttps://twitter.com/#!/stephaneledorze/status/74020060125077504

Tel: +33 (0) 6 08 76 70 15

Owner

sledorze commented Mar 28, 2012

not sure to undestand.. anyway, I have to do real work now.. please post
failing code (based on official libs versions only)
Stephane

2012/3/28 Luca Deltodesco <
reply@reply.github.com

Okay the tink bug test case works fine for flash now.

the stack overflow one still happens in flash though; your tink +
stephanes parsex


Reply to this email directly or view it on GitHub:
#1 (comment)

Stphane Le Dorze

http://lambdabrella.blogspot.com/
http://www.linkedin.com/in/stephaneledorze
http://twitter.com/stephaneledorzehttps://twitter.com/#!/stephaneledorze/status/74020060125077504

Tel: +33 (0) 6 08 76 70 15

@deltaluca

This comment has been minimized.

Show comment Hide comment
@deltaluca

deltaluca Mar 28, 2012

Contributor

Using official libs versions, then it's the two gists i posted earlier:

https://gist.github.com/2225595 <-- fixed in github tink
https://gist.github.com/2225783 <-- still broke

Contributor

deltaluca commented Mar 28, 2012

Using official libs versions, then it's the two gists i posted earlier:

https://gist.github.com/2225595 <-- fixed in github tink
https://gist.github.com/2225783 <-- still broke

@deltaluca

This comment has been minimized.

Show comment Hide comment
@deltaluca

deltaluca Mar 28, 2012

Contributor

I managed to implement my parser without triggering the remaining bug.

I havn't actually used either lazyF or commit at all... Guessing that means I will have some issues with error checking (not tested with dirty input) and maybe performance?

Am I right in guessing that to memoize the parser, I only need to use memo() on the final parser?

Contributor

deltaluca commented Mar 28, 2012

I managed to implement my parser without triggering the remaining bug.

I havn't actually used either lazyF or commit at all... Guessing that means I will have some issues with error checking (not tested with dirty input) and maybe performance?

Am I right in guessing that to memoize the parser, I only need to use memo() on the final parser?

@sledorze

This comment has been minimized.

Show comment Hide comment
@sledorze

sledorze Mar 28, 2012

Owner

in fact the problem comes with the way macros work; and the fact that you were doing two lazyF (the combinators are lazy by default).
This is too bad, but I can't find a good idea to fix it easily.. (I would have loved to have Lazy values in the AST).

lazy and commit are not for performance;
lazy is to break cycles in computations whereas commit is to say that a parser may no more backtrack.

memo is just a combinator; it applies on the parser you're applying it on - you may play with left recursive grammars to get an idea of it.

Owner

sledorze commented Mar 28, 2012

in fact the problem comes with the way macros work; and the fact that you were doing two lazyF (the combinators are lazy by default).
This is too bad, but I can't find a good idea to fix it easily.. (I would have loved to have Lazy values in the AST).

lazy and commit are not for performance;
lazy is to break cycles in computations whereas commit is to say that a parser may no more backtrack.

memo is just a combinator; it applies on the parser you're applying it on - you may play with left recursive grammars to get an idea of it.

@sledorze

This comment has been minimized.

Show comment Hide comment
@sledorze

sledorze Mar 28, 2012

Owner

can't/won't fix the remaining issue (the others have been fixed, thanks)

Owner

sledorze commented Mar 28, 2012

can't/won't fix the remaining issue (the others have been fixed, thanks)

@sledorze sledorze closed this Mar 28, 2012

@deltaluca

This comment has been minimized.

Show comment Hide comment
@deltaluca

deltaluca Mar 29, 2012

Contributor

I'm already using my own combinator from parsec chainl1 for left recursive grammars actually :)

Contributor

deltaluca commented Mar 29, 2012

I'm already using my own combinator from parsec chainl1 for left recursive grammars actually :)

@sledorze

This comment has been minimized.

Show comment Hide comment
@sledorze

sledorze Mar 29, 2012

Owner

ok :)

2012/3/29 Luca Deltodesco <
reply@reply.github.com

I'm already using my own combinator from parsec chainl1 for left recursive
grammars actually :)


Reply to this email directly or view it on GitHub:
#1 (comment)

Stphane Le Dorze

http://lambdabrella.blogspot.com/
http://www.linkedin.com/in/stephaneledorze
http://twitter.com/stephaneledorzehttps://twitter.com/#!/stephaneledorze/status/74020060125077504

Tel: +33 (0) 6 08 76 70 15

Owner

sledorze commented Mar 29, 2012

ok :)

2012/3/29 Luca Deltodesco <
reply@reply.github.com

I'm already using my own combinator from parsec chainl1 for left recursive
grammars actually :)


Reply to this email directly or view it on GitHub:
#1 (comment)

Stphane Le Dorze

http://lambdabrella.blogspot.com/
http://www.linkedin.com/in/stephaneledorze
http://twitter.com/stephaneledorzehttps://twitter.com/#!/stephaneledorze/status/74020060125077504

Tel: +33 (0) 6 08 76 70 15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment