| Bill Allombert on Wed, 20 Jul 2005 11:43:50 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: New experimental GP parser release |
On Tue, Jul 19, 2005 at 02:46:10PM +0200, Alain SMEJKAL wrote:
> Here is some bugs found in normal or stressed use.
> I also have noticed a nice improvement, it is possible to write all a small
> function in one line,
You can do that with standard GP, you just need to omit the braces.
test()=print(sin(a));kill(a);
> bug #1: crash in unexpected allowed use of reserved keywords as variables
> ? sin=1
> %1 = 1
> ? sin(1)
>
> *** sin: bug in GP (Segmentation Fault), please report
Need to be taken care of...
> bug #2 : global variable assignment trouble in scripts when used as function
> parameter
> ? a=3.14;
> ? testaux(b)=
> {print(a);print(b);}
> ? test()=
> {testaux(a);}
> ? test
> a
> 3.140000000000000000000000000
global variables are not implemented currently. All variables are
block-local. The only practical effect of local(A) is to set A to 0.
This is part of the experiment. The normal behaviour can be easily
reinstated, but I do not really like it.
> bug #3 : unexpected killed variable behavior in scripts (okay in interactive
> mode)
> ? a=3.14;
> ? test()=
> {print(sin(a));kill(a);}
> ? test
> 0.0015926529164869525405
> ? test
> #<32> - 1/6*#<32>^3 + 1/120*#<32>^5 - 1/5040*#<32>^7 + 1/362880*#<32>^9 -
> 1/3991
> 6800*#<32>^11 + 1/6227020800*#<32>^13 - 1/1307674368000*#<32>^15 +
> O(#<32>^17)
>
> *** can't kill that.
>
> ? test
>
> *** bug in GP (Segmentation Fault), please report
This breaks the entry caching performed by the interpretor.
The kill function is rather a bug by itself, so I do not consider this
bug important.
> bug #4 : error behavior changes (note: there is also a trouble in Pari with
> this vector print form, see wishlist #115)
> ? print(" " [1])
>
> *** object has no components.
> ? print(" " [1,2])
>
> *** object has no double components.
> ? print("" [1,2,3])
>
> *** parse error, unexpected ',': print(""[1,2,3])
> ^----
This looks correct. I cannot generate the exact same error messages in all
cases. In fact the message generated by standard GP look wrong.
> bug #5 : unexpected display
> ? print("1)
> 1)
> 1
This was a bug in the lexer. Fixed.
Thanks a lot for experimenting with it.
Cheers,
Bill.