tsoding / porth

It's like Forth but in Python
628 stars 50 forks source link

get rid of `sim` subcommand in favor of `com -r` #46

Closed drocha87 closed 2 years ago

drocha87 commented 2 years ago

This commit removes completely the simulation subcomand sim from Porth. We also introduces a new subcommand run which is just an alias to com -r -s.

Now we can use the run command like this:

$ cat program.porth
34 35 + print
$ ./porth.py run program.porth
69

I fixed the tests.py to reflect these changes.

I also introduced a better error report in cmd_call_echoed so we can report a better error message in case the user is missing something to run the command.

drocha87 commented 2 years ago

As we talked on discord, this PR should be postponed to the future as the language is still in the early stages and we are not sure about the benefits of it.