YakshaLisp – Lisp dialect and macros for Yaksha lang
YakshaLisp – Lisp dialect and macros for Yaksha lang
YakshaLisp is a sub-language embedded in Yaksha compiler. Allowing you to do things like below. See the link for updated documentation. What is your opinion about lisp dialect for defining macros in a off-side rule language? # ╔═╗┌─┐┌┬┐┌─┐┬┬ ┌─┐ ╔╦╗┬┌┬┐┌─┐ # ║ │ ││││├─┘││ ├┤ ║ ││││├┤ # ╚═╝└─┘┴ ┴┴ ┴┴─┘└─┘ ╩ ┴┴ ┴└─┘ # ╔═╗┬┌─┐┌─┐ ╔╗ ┬ ┬┌─┐┌─┐ # ╠╣ │┌─┘┌─┘ ╠╩╗│ │┌─┘┌─┘ # ╚ ┴└─┘└─┘ ╚═╝└─┘└─┘└─┘ macros!{ (defun to_fb (n) (+ (if (== n 1) "" " ") (cond ((== 0 (modulo n 15)) "FizzBuzz") ((== 0 (modulo n 3)) "Fizz") ((== 0 (modulo n 5)) "Buzz") (true (to_string n)) ))) (defun fizzbuzz () (list (yk_create_token YK_TOKEN_STRING (reduce + (map to_fb (range 1 101)))))) (yk_register {dsl fizzbuzz fizzbuzz}) } def main() -> int: println(fizzbuzz!{}) return 0 This is available in latest release - https://github.com/YakshaLang/Yaksha/releases/tag/v0.0.4 (I recommend using release.py in compiler/scripts if you want to locally compile it)
Share cardActual performance
Launch Intel predictions
Analyze your own launch →Incorrect prediction on native model
Similar products
Synesthesia – Optimizing brainfuck compiler implemented as Nim macros
YakshaLisp – Macros for Yaksha and Lisp Dialect
Zig's defer/errdefer for c99 and gnu11 C via macros
Phases, Scala macros for multiphase classes
8cc.cr – compile-time C compiler implemented as Crystal macros
Same-tbh – vim-like macros for bash
A set of dbg() macros for C
Unbug – Rust macros for programmatically invoking breakpoints
Clojure Macros – Lessons from unspoken symbols
Keysmith – Create macros for your Mac (and the web)