3 ms·
Show HN: The Milho Language
- celso_ 5y agoMilho is a language that I've been working with a friend for a while. The idea is to a be an easy-to-implement LISP with various implementations (we have Haskell, Rust, Go and OCaml for now). Documentation and language specs are still WIP, but we are slowly working on it.
- JoelMcCracken 5y agoCool! How would you describe its features?
- celso_ 5y agoThank you! It's being quite a fun experience for me! Most of the features are inspired by racket (we've never used a LISP before starting the project, and a friend of mine suggested to use it). Right now we have: - Numbers (rationals) and arithmetic operations - Strings and some basic operations like split and concatenation - Error raising/handling via the raise and call-with-error-handler special forms - Anonymous (via fn) and named (via defn) functions, both single-arity, variadic, and multi-arity - Definitions via the def special form (replaces the whole reference in the variable table) - Local definitions via the let special form - Mutation via the set! special form (gets the reference, replaces its value) - Local state mutation via a combination of let + set! - A simple macro system that only handles basic variable replacing and spreading of lists - cons/car/cdr as it's a LISP after all - Boolean operators and a `if` special form - A simple import system that we're working on right now There are some examples of functions built with the language inside the `std/` folder, I've created `map`, `filter`, `foldl`, `foldr`, and a mutable list using the functions, and `or`, `and` and `guard` macros using the macro system.
- romanlab 5y agoAny more implementations in the pipeline? Python or JS maybe?
- celso_ 5y agoI’m planning on writing a racket one in the near future, no plans for Python or JS on my side, but you can join the milho train if you want