h3rald / min

A small but practical concatenative programming language and shell
https://min-lang.org
MIT License
309 stars 23 forks source link

Empty quotations are not allowed #29

Closed rscarrasco closed 6 years ago

rscarrasco commented 6 years ago

I'm using min 0.15.1, at Linux Mint 18.3.

If you try to push an empty quotation (i.e. () ), it doesn't get on the stack. Instead, nothing happens:

$ ()
{1} -> ()

Is this the expected behaviour? It seems wrong to me since quotations can also represent lists, and an empty list is still a valid one.

h3rald commented 6 years ago

Wow now this is really weird! I cannot reproduce it!

I tried this on my x86 Ubuntu server:

$ min -i 
[/home/h3rald/dev/min]$ ()
{1} -> ()

...and the quotation is there! Does just this simple thing work on your system? Mint is essentially Ubuntu/Debian... is it x64 architecture-wise?

rscarrasco commented 6 years ago

I tried at my home computer, and here it also worked. I'm sure that at my work PC it did not. I am trying to run something like:

:x
x () append

And min complains that there is an int at the top of a stack, but it expected a quotation. I am trying run something like this since last friday. Maybe I'm missing something? I can't be sure now; tomorrow I'll try again at my work PC.

rscarrasco commented 6 years ago

I tried it at my work PC, and it executed as expected. I don't get it, I'm trying this for days. Sorry about that.