Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I was looking for this and didn't realize it. I'm designing a fantasy console and wanted to include a modern-syntax, small, interpreted language that has many independent implementations - a new BASIC or Pascal. Lua comes close to this but attention is really centered around the PUC-Rio and LuaJIT implementations and not on being easily reimplemented, and every "classic" option one might think of(including Lisps and Forths) falls a bit outside today's mainstream.

I may be getting the book soon...



I would argue for a Lisp. If you’re asking the user to use a language they’re not familiar with, it might as well be one that will expand their horizons, despite the potentially offputting syntax. It would be really cool if you added a key that switched from s-expressions to Sweet expressions[0] (and vice-versa). Forth is painful to use for anything more than a toy and no matter what language you choose it would be awesome to see a live-updating (graphical?) REPL.

[0] https://readable.sourceforge.io


Expanding PL horizons is not a goal for this project. The goal for this specific usercode layer(of which there are four: WASM bytecode, the I/O memory map, the lower level operating system language, and the higher level interpreted language) is to achieve a mix of sustainability and familiarity. A language defined by a book explaining its implementation, while also being in the "looks-like-an-Algol" ballpark, falls very close to that mark.

If you want a Lisp, it's possible, just rewrite the OS layer.



Wren is small, and the language is aesthetically appealing, but it's small in the specific way of its C implementation being a small SLOC while implementing nifty features, not "anyone could study this codebase and port it to a new environment". It relies extensively on the preprocessor.

(I speak from experience.)


Racket has an embedded shell language, Rash

https://docs.racket-lang.org/rash/index.html


Also consider looking at SOM - nine implementations http://som-st.github.io.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: