Re: toy-forth-in-picolisp, and a 32-bit problem

2016-08-29 Thread Alexander Burger
Hi Jon,

> I have now tested your latest “16.8.26 C” version on two Macs, and
> I’ve had no “Segmentation fault: 11”. Seems you’ve fixed it. Thanks.

Great! So it was indeed the 'prin' of anonymous symbols as found by
Mike.


> Do you still want more info re. what caused the problem in the
> previous version?

No, I think it is clear now. Thanks for finding this bug!

♪♫ Alex
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: toy-forth-in-picolisp, and a 32-bit problem

2016-08-28 Thread Jon Kleiser
Hi Alex,

I have now tested your latest “16.8.26 C” version on two Macs, and I’ve had no  
“Segmentation fault: 11”. Seems you’ve fixed it. Thanks.

Do you still want more info re. what caused the problem in the previous version?

/Jon

> On 27. aug. 2016, at 22.13, Alexander Burger  wrote:
> 
> On Sat, Aug 27, 2016 at 10:56:55PM +0300, Mike Pechkin wrote:
>>> 
>>> crashes? What is in the temp stack? Perhaps it is the fixed prin/prinl
>>> issue of anonymous symbols.
>>> 
>>> 
>> ​tempStack is list, look how it prints when not crashed​
>> 
>> http://pastebin.com/mTj51y4B
> 
> Yes, anonymous symbols. That explains all.
> 
> ♪♫ Alex
> -- 
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe



Re: toy-forth-in-picolisp, and a 32-bit problem

2016-08-27 Thread Alexander Burger
On Sat, Aug 27, 2016 at 10:56:55PM +0300, Mike Pechkin wrote:
> >
> > crashes? What is in the temp stack? Perhaps it is the fixed prin/prinl
> > issue of anonymous symbols.
> >
> >
> ​tempStack is list, look how it prints when not crashed​
> 
> http://pastebin.com/mTj51y4B

Yes, anonymous symbols. That explains all.

♪♫ Alex
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: toy-forth-in-picolisp, and a 32-bit problem

2016-08-27 Thread Mike Pechkin
>
> crashes? What is in the temp stack? Perhaps it is the fixed prin/prinl
> issue of anonymous symbols.
>
>
​tempStack is list, look how it prints when not crashed​

http://pastebin.com/mTj51y4B


Re: toy-forth-in-picolisp, and a 32-bit problem

2016-08-27 Thread Mike Pechkin
> Perhaps you can 'trace' to locate the exact place?
>
>
http://pastebin.com/kb6DGxpN


Re: toy-forth-in-picolisp, and a 32-bit problem

2016-08-27 Thread Alexander Burger
On Sat, Aug 27, 2016 at 05:55:45PM +0300, Mike Pechkin wrote:
> As I wrote before, it didnt crash always
> 
> http://pastebin.com/JkVkBjbQ
> ...
> http://pastebin.com/mTj51y4B

I can't produce a crash here :(


Perhaps you can 'trace' to locate the exact place?


At the end of "forth.l" put (traceAll)

   
   (setq *F1 (new '(+Forth))
 *F2 (new '(+Forth)) )

   (traceAll)

   (if *EMUENV
  (activateEmuForthRepl *F1)
  # Normal PicoLisp ...
  (prinl (pack "-> "
 (forthRepl *F1) ) ) )

♪♫ Alex
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: toy-forth-in-picolisp, and a 32-bit problem

2016-08-27 Thread Jon Kleiser
Thanks, Alex! I’ll give it a try a little later, but I’m sure it works.

/Jon

> On 26. aug. 2016, at 18.23, Alexander Burger  wrote:
> 
> On Fri, Aug 26, 2016 at 06:04:22PM +0200, Alexander Burger wrote:
>> Must be my fault. I never had the idea to 'prinl' an anonymous symbol
>> ('prinl' just low-level-outputs the names of symbols, but anonymous
>> symbols don't have a name ;)
>> 
>> Perhaps it works in pil64 just by chance. I'll check (and fix) both
>> versions).
> 
> OK, fixed it in pil32.
> 
> pil64 is all right, it did a proper check. And Ersatz and miniPicoLisp
> are also not affected :)
> 
> ♪♫ Alex
> -- 
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe



Re: toy-forth-in-picolisp, and a 32-bit problem

2016-08-26 Thread Mike Pechkin
to whom it interesting how it was fixed
https://bitbucket.org/mihailp/picolisp/commits/c25c1b79706ac77c1ec5cfd339fd522f49c61a8b#chg-src/io.c

On Fri, Aug 26, 2016 at 7:23 PM, Alexander Burger 
wrote:

> On Fri, Aug 26, 2016 at 06:04:22PM +0200, Alexander Burger wrote:
> > Must be my fault. I never had the idea to 'prinl' an anonymous symbol
> > ('prinl' just low-level-outputs the names of symbols, but anonymous
> > symbols don't have a name ;)
> >
> > Perhaps it works in pil64 just by chance. I'll check (and fix) both
> > versions).
>
> OK, fixed it in pil32.
>
> pil64 is all right, it did a proper check. And Ersatz and miniPicoLisp
> are also not affected :)
>
> ♪♫ Alex
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: toy-forth-in-picolisp, and a 32-bit problem

2016-08-26 Thread Alexander Burger
On Fri, Aug 26, 2016 at 06:04:22PM +0200, Alexander Burger wrote:
> Must be my fault. I never had the idea to 'prinl' an anonymous symbol
> ('prinl' just low-level-outputs the names of symbols, but anonymous
> symbols don't have a name ;)
> 
> Perhaps it works in pil64 just by chance. I'll check (and fix) both
> versions).

OK, fixed it in pil32.

pil64 is all right, it did a proper check. And Ersatz and miniPicoLisp
are also not affected :)

♪♫ Alex
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: toy-forth-in-picolisp, and a 32-bit problem

2016-08-26 Thread Alexander Burger
Hi all,

On Fri, Aug 26, 2016 at 06:48:26PM +0300, Mike Pechkin wrote:
> problem is like this code:
> http://pastebin.com/ZzSXgsUa

Oh! This seems to be a bug

   (setq X (new)) (prinl X)

Must be my fault. I never had the idea to 'prinl' an anonymous symbol
('prinl' just low-level-outputs the names of symbols, but anonymous
symbols don't have a name ;)

Perhaps it works in pil64 just by chance. I'll check (and fix) both
versions).

♪♫ Alex
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: toy-forth-in-picolisp, and a 32-bit problem

2016-08-26 Thread Joe Bogner
Hi Jon - also works on windows 64bit version

: : : ff 0 if 77 else 88 then ;
-> +DefineWord
Done defining ff as (0 $200243534)
t
-> tempStack:


-> +DefineWord
Done defining fac as (_dup_ 1 _>_ $200244051)
5 fac .s
-> (120)



On Fri, Aug 26, 2016 at 11:26 AM, Brian Walker  wrote:

> Hi Jon,
>
> works great for me on linux 64bit version.
>
> /taj33n
>
>
> Am 26.08.2016 um 15:53 schrieb Jon Kleiser:
>
>> Hi,
>>
>> This summer I have had some fun trying to figure out how to implement a
>> super simple toy Forth. For a start, I chose PicoLisp as an implementation
>> language. You may find it here:
>>
>> https://github.com/jkleiser/toy-forth-in-picolisp
>>
>> There is one problem, however, occurring quite regularly when I run this
>> forth.l using 32-bit PicoLisp on Mac. As the README.md suggests, I start it
>> by doing this
>>
>> pil path/to/forth.l +
>>
>> If I then enter “: ff 0 if 77 else 88 then ;” (without the quotes), which
>> defines a new word “ff” (which when used always pushes 88 on the stack),
>> and then enter “t”, which is a (non-standard) word just for checking the
>> state of the “tempStack” field (probably empty), then I usually get a
>> “Segmentation fault: 11”.
>>
>> I have not seen that problem when using 64-bit PicoLisp (in Docker).
>>
>> Is this Segmentation fault caused by a bug in 32-bit PicoLisp, or is it
>> me doing something stupid?
>>
>> Have a nice weekend!
>>
>> /JonPԔ  �  )mX��� � �zV�u�.n7�� ���r��e===
>>
>> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: toy-forth-in-picolisp, and a 32-bit problem

2016-08-26 Thread rick
On Fri, 26 Aug 2016 13:53 +, Jon Kleiser wrote:
> Hi,
>
> This summer I have had some fun trying to figure out how to
> implement a super simple toy Forth. For a start, I chose PicoLisp as
> an implementation language. You may find it here:
> 
> https://github.com/jkleiser/toy-forth-in-picolisp

Very cool!  It looks like indeed you had fun.  Thanks, Jon!
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: toy-forth-in-picolisp, and a 32-bit problem

2016-08-26 Thread Mike Pechkin
hi,

My host is CentOS7 x64 (pil32 and pil64).
​1. simpler code is enough to fault:
: f 4 ;
2. important note: pil32 *not* always coredumps
​3.​
​ ​
problem is like this code:
http://pastebin.com/ZzSXgsUa

Mike


Re: toy-forth-in-picolisp, and a 32-bit problem

2016-08-26 Thread Brian Walker

Hi Jon,

works great for me on linux 64bit version.

/taj33n

Am 26.08.2016 um 15:53 schrieb Jon Kleiser:

Hi,

This summer I have had some fun trying to figure out how to implement a super 
simple toy Forth. For a start, I chose PicoLisp as an implementation language. 
You may find it here:

https://github.com/jkleiser/toy-forth-in-picolisp

There is one problem, however, occurring quite regularly when I run this 
forth.l using 32-bit PicoLisp on Mac. As the README.md suggests, I start it by 
doing this

pil path/to/forth.l +

If I then enter “: ff 0 if 77 else 88 then ;” (without the quotes), which 
defines a new word “ff” (which when used always pushes 88 on the stack), and 
then enter “t”, which is a (non-standard) word just for checking the state of 
the “tempStack” field (probably empty), then I usually get a “Segmentation 
fault: 11”.

I have not seen that problem when using 64-bit PicoLisp (in Docker).

Is this Segmentation fault caused by a bug in 32-bit PicoLisp, or is it me 
doing something stupid?

Have a nice weekend!

/JonPԔ � )mX�����zV�u�.n7�����r��e===


--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


toy-forth-in-picolisp, and a 32-bit problem

2016-08-26 Thread Jon Kleiser
Hi,

This summer I have had some fun trying to figure out how to implement a super 
simple toy Forth. For a start, I chose PicoLisp as an implementation language. 
You may find it here:

https://github.com/jkleiser/toy-forth-in-picolisp

There is one problem, however, occurring quite regularly when I run this 
forth.l using 32-bit PicoLisp on Mac. As the README.md suggests, I start it by 
doing this

pil path/to/forth.l +

If I then enter “: ff 0 if 77 else 88 then ;” (without the quotes), which 
defines a new word “ff” (which when used always pushes 88 on the stack), and 
then enter “t”, which is a (non-standard) word just for checking the state of 
the “tempStack” field (probably empty), then I usually get a “Segmentation 
fault: 11”.

I have not seen that problem when using 64-bit PicoLisp (in Docker).

Is this Segmentation fault caused by a bug in 32-bit PicoLisp, or is it me 
doing something stupid?

Have a nice weekend!

/Jon