[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4762: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4764: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4765: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4766: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
newlispfanclub.alh.net • View topic - if we can see line number in error message

if we can see line number in error message

Q&A's, tips, howto's

if we can see line number in error message

Postby csfreebird » Mon Nov 25, 2013 3:51 am

csfreebird
 
Posts: 107
Joined: Tue Jan 15, 2013 11:54 am
Location: China, Beijing

Re: if we can see line number in error message

Postby rickyboy » Mon Nov 25, 2013 5:26 am

(λx. x x) (λx. x x)
rickyboy
 
Posts: 595
Joined: Fri Apr 08, 2005 7:13 pm
Location: Front Royal, Virginia

Re: if we can see line number in error message

Postby csfreebird » Mon Nov 25, 2013 6:15 am

csfreebird
 
Posts: 107
Joined: Tue Jan 15, 2013 11:54 am
Location: China, Beijing

Re: if we can see line number in error message

Postby Astrobe » Wed Dec 18, 2013 1:08 pm

I second the suggestion of adding line numbers to error messages. The debugger could also use some improvements.

I am an embedded systems programmer, and I'm quite used to debug using only printf, but the lack of support from Newlisp in this area makes things more difficult than it should be.

Since I'm in the process of butchering....errr, I mean hacking the guts of Newlisp, I took a look at the problem. It doesn't seem easy to do, but it has to be done imho.
Astrobe
 
Posts: 39
Joined: Mon Jan 11, 2010 9:41 pm

Re: if we can see line number in error message

Postby conan » Wed Dec 18, 2013 2:57 pm

Some time ago Lutz replied here (i searched for it, but couldn't find it) that it wasn't possible without making newLisp go slower. Also that given the nature of the two step parsing newLisp does, source line numbers get lost.

I'm quoting from memory so maybe this is not exactly what he said. But the general concept I got from there was: can't be done without making a poor quality newLisp.

So maybe the solution would be to provide a fat-newLisp version for development that does not loose this information.

Another possible solution would be to learn how the people who don't complain about this do their development. Maybe there's something we're missing there.
conan
 
Posts: 52
Joined: Sat Oct 22, 2011 12:14 pm

Re: if we can see line number in error message

Postby Lutz » Wed Dec 18, 2013 3:09 pm

Line numbers for errors definitely add to much resource usage for storing them and parsing and loading code would get slower. In my opinion its also just not necessary, I think the stack trace we have is much more usable.

One could build a better debugger using the current debugging facilities and reflective API offered by newLISP and without changing anything inside newLISP. The current debugger was built with the idea in mind, that it can be driven by and outside program. See the old Tcl/Tk based debugger and IDE shipped years back. I think it is still maintained by HPW on this forum.

Ps: in any case, welcome hacking newLISP internals, there are things which can be made faster, smaller or otherwise improved.
Lutz
 
Posts: 5279
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California

Re: if we can see line number in error message

Postby conan » Wed Dec 18, 2013 3:18 pm

conan
 
Posts: 52
Joined: Sat Oct 22, 2011 12:14 pm

Re: if we can see line number in error message

Postby Astrobe » Wed Dec 18, 2013 4:23 pm

Astrobe
 
Posts: 39
Joined: Mon Jan 11, 2010 9:41 pm

Re: if we can see line number in error message

Postby Lutz » Fri Dec 20, 2013 2:31 am

Lutz
 
Posts: 5279
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California

Re: if we can see line number in error message

Postby conan » Fri Dec 20, 2013 2:36 am

Beautiful. Please don't die.
conan
 
Posts: 52
Joined: Sat Oct 22, 2011 12:14 pm

Re: if we can see line number in error message

Postby csfreebird » Tue Dec 24, 2013 2:47 pm

OK. I don't need error line number now because correct highlight is enough.
Thanks.
csfreebird
 
Posts: 107
Joined: Tue Jan 15, 2013 11:54 am
Location: China, Beijing

Re: if we can see line number in error message

Postby Astrobe » Fri Mar 21, 2014 12:25 pm

Debugging and error messages are still a weak point of Newlisp for me.

I could make it slightly easier by inserting a call to getDebuggerInput() at the end of printErrorMessage(). At least one can check the value of local variables, arguments, and even those of the callers if names don't overlap.

Can it be improved?
Astrobe
 
Posts: 39
Joined: Mon Jan 11, 2010 9:41 pm


Return to newLISP in the real world

Who is online

Users browsing this forum: No registered users and 1 guest

cron