mal-crystal
Version, currently main branch1 version
- main branchlatestDec 26, 2020
github.com/stereobooster/crystal-lisp
No description declared in shard.yml.
Installation
# Add this to your shard.yml
dependencies:
mal-crystal:
github: stereobooster/crystal-lisp
branch: mainmain is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
- no constraint declared
Dependencies
Runtime Dependencies
README
MAL in Crystal
Forked from https://github.com/kanaka/mal/tree/master/impls/crystal
Why Crystal?
My previous experiment was to build MAL in Pony. Pony is a nice language, but its type system is a bit "rigid", which slows down me. I want to experiment and iterate fast.
I want a compiled fast language, but not C. My options are:
- Go - I don't want to deal with the absence of generics
- Rust - I don't want to deal with the borrow checker
- Chez Scheme or sbcl or clasp - may be, but there is no static type checker?
- Zig
- Crystal
I decided to go with Crystal because it is a bit more flexible than Zig. Also, I heard that they want to rewrite the Ponylang compiler from C to Crystal, so I was curious.
Ideas
Ideas I want to explore:
- Write reader with new Pytonish syntax, which would compile input to the SExpressions, that MAL's
evalexpect - ...
About Lisp syntax
There were a million attempts to create an alternative to SExpressions. See:
- History of alternative syntaxes for Lisp
- Readable Lisp S-expressions Project
- LISP Infix Syntax Survey
- wisp: Whitespace to Lisp
- Curly infix, Modern-expressions, and Sweet-expressions: A suite of readable formats for Lisp-like languages
- nonelang
- LSIP: An operator-based syntax for Racket programs; O-expressions
- rhombus-brainstorming
Parsers
Crystal libs
- http://crystalshards.xyz/?filter=parser
- arborist
- pars3k
- crystal-pegmatite - no documentation
- pegasus - regexp
Lisp, Sheme, Clojure BNF/EBNF
Grammars
- The Packrat Parsing and Parsing Expression Grammars Page
- Language Grammar
- Confluent Orthogonal Drawingfor Syntax Diagrams
- Guy Steele on Computer Science Metanotation
Brainstorming
- operator precedence rules is hard to remeber. Pony doesn't have it
- punctuation-signs as operators are hard to search
- I don't think that prefix notation is a problem, almost all functions except math operators and special operators like in Haskell use it. See: operators
- In Scheme it is possible to use
[]and{}in addition to(), which makes it more readable - In Clojure
[]denotes a vector (doesn't evaluate like application),{}denotes a hashmap,:...denotes a keyword (doesn't evaluate like a variable, more like Ruby's symbol)
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
main- Seen
- Dec 26, 2020
- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/stereobooster/crystal-lisp
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 15, 2026
- Synced
- Aug 15, 2026
- Versions
- 1