TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Combining Forth and Lisp

4 pointsby dalyabout 2 years ago
In Jonesforth (https:&#x2F;&#x2F;raw.githubusercontent.com&#x2F;nornagon&#x2F;jonesforth&#x2F;master&#x2F;jonesforth.S) during the discussion of Indirect Threaded Code it is pointed out that words have a &#x27;codeword&#x27; prefix. The codeword prefix is used to define the interpreter for the code, either a list of addresses of words or a direct pointer to assembly code.<p>Expanding on the idea, it is easy to define a third interpreter which interprets the embedded bytes as a lisp s-expression. The original lisp interpreter is about a single page long (see pp 70-71 https:&#x2F;&#x2F;www.softwarepreservation.org&#x2F;projects&#x2F;LISP&#x2F;book&#x2F;LISP%201.5%20Programmers%20Manual.pdf )<p>If you embed your FORTH language in a single LISP array you can use LISP to modify FORTH.<p>Gotta love these amazing languages.

no comments

no comments