Python Forum
a fun(ny) program i want to make - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Forum & Off Topic (https://python-forum.io/forum-23.html)
+--- Forum: Bar (https://python-forum.io/forum-27.html)
+--- Thread: a fun(ny) program i want to make (/thread-8013.html)



a fun(ny) program i want to make - Skaperen - Feb-03-2018

i tested this and it is possible to make a Python script be an interpreter of another script on the other script's #! line. so what i think i want to do is make a stack-oriented language that has the run-time features of Python.


RE: a fun(ny) program i want to make - Gribouillis - Feb-03-2018

(Feb-03-2018, 04:21 AM)Skaperen Wrote: it is possible to make a Python script be an interpreter of another script on the other script's #! line.
Of course it is possible! This was already used 20 years ago in the famous (and obsolete) peak python framework. They used this feature to create "executable configuration files", files that contain ini file information but have a shebang line pointed to a python application that reads them.


RE: a fun(ny) program i want to make - Skaperen - Feb-04-2018

i never encountered peak or anything else doing this. when i thought about it, rather than ask if it could be done (that there was nothing in python that would break it), i decided to test it since such a test would be simple enough.

anyway, i am think of a stack oriented language (somewhat like Forth) but operates in the Python data space. i would add a stack and operate it in a separate local name space. it would have access to everything a Python script would have access to. an interpreter written in Python should be very simple for this. this is the kind of stuff that is fun for me.