https://github.com/schani/forthlisp Skip to content Sign up Sign up * Why GitHub? Features - + Mobile - + Actions - + Codespaces - + Packages - + Security - + Code review - + Project management - + Integrations - + GitHub Sponsors - + Customer stories- * Team * Enterprise * Explore + Explore GitHub - Learn and contribute + Topics - + Collections - + Trending - + Learning Lab - + Open source guides - Connect with others + The ReadME Project - + Events - + Community forum - + GitHub Education - + GitHub Stars program - * Marketplace * Pricing Plans - + Compare plans - + Contact Sales - + Education - [ ] [search-key] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up Sign up {{ message }} schani / forthlisp * Notifications * Star 36 * Fork 5 A Small Lisp in Forth 36 stars 5 forks Star Notifications * Code * Issues 3 * Pull requests 0 * Actions * Projects 0 * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Security * Insights master Switch branches/tags [ ] Branches Tags Nothing to show {{ refName }} default View all branches Nothing to show {{ refName }} default View all tags 1 branch 0 tags Go to file Code Clone HTTPS GitHub CLI [https://github.com/s] Use Git or checkout with SVN using the web URL. [gh repo clone schani] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Go back Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Go back Launching Xcode If nothing happens, download Xcode and try again. Go back Launching Visual Studio If nothing happens, download the GitHub extension for Visual Studio and try again. Go back Latest commit @schani schani Add README ... a5e47c1 Jun 18, 2017 Add README a5e47c1 Git stats * 3 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time README.md Add README Jun 18, 2017 lisp.fs Whitespace fixes Jun 18, 2017 test.scm Initial import Jun 18, 2017 View code Lisp in Forth How to use it README.md Lisp in Forth This is an interpreter for a really simple dynamically scoped Scheme dialect. It only runs with Gforth, because it uses Gforth's structs to implement its data structures. One of the more involved parts of this interpreter is the reader, where I had to do quite a lot of stack juggling to keep everything in line. It doesn't look very involved now but I remember spending quite some time thinking about the stack layout for the reader routines. How to use it Assuming you have Gforth installed (if you're on MacOS you can get it via Brew), start it with gforth lisp.fs There are mainly three words of interest: * lisp-load-from-string reads and evaluates a string. * lisp-load-from-file reads and evaluates a file, given a filename. * lisp-display prints a lisp value. Example: s" (+ 1 2 3)" lisp-load-from-string lisp-display => 6 ok s" test.scm" lisp-load-from-file lisp-display => 4 120 () ok In this example, 4 and 120 are printed in test.scm, and () is the result of the evaluation of the file. About A Small Lisp in Forth Resources Readme Releases No releases published Packages 0 No packages published Languages * Forth 98.3% * Scheme 1.7% * (c) 2021 GitHub, Inc. * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.