Skip to content

1000copy/zlisp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZLisp 0.1

Wow, ZLisp is a LISP interpreter consisting of approximately 300 lines of code, written in the Zig programming language.

Why choose to implement LISP?

This is because LISP has an extremely concise syntax while also offering very flexible and powerful expressive capabilities.

Why choose to implement it in Zig?

I previously implemented a LISP interpreter in the C language. Now, I want to learn the Zig language and take the opportunity to compare the characteristics of the two languages. My conclusion is that Zig is a better alternative to C.

Current implementation progress?

  1. Parsed the basic syntax of LISP language
  2. Implemented 4 LISP primitives, including addition, subtraction, multiplication, and division

What features are planned for the future?

  • Support for more syntax, including strings, annotations, and references

  • Support for more LISP primitives, including

    append, begin, car, cdr, cons, =, length, list, not, print, define, setq, repeat, load, eval

How to contribute to the project?

  1. Sign into GitHub
  2. Fork the project repository
  3. Clone your fork
  4. Navigate to your local repository and code or fix
  5. Run passed $zig build test
  6. Make your Pull Request

ZLisp Zen

I adhere to the philosophy of a straightforward implementation without any unnecessary techniques.

little footprint

  • 897k with zig build
  • 90K with zig build -Doptimize=ReleaseSmall

References

Peter Norvig's LISP implementation in Python: https://www.norvig.com/lispy.html

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages