Sunday, July 30, 2023
Show HN: YakshaLisp – Lisp dialect and macros for Yaksha lang https://ift.tt/ChBkZlw
Show HN: 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://ift.tt/1iAEaOj (I recommend using release.py in compiler/scripts if you want to locally compile it) https://ift.tt/CH1QZUV July 30, 2023 at 10:06PM
Subscribe to:
Post Comments (Atom)
Show HN: Aqua Voice 2 – Fast Voice Input for Mac and Windows https://ift.tt/jid7bxP
Show HN: Aqua Voice 2 – Fast Voice Input for Mac and Windows Hey HN - It’s Finn and Jack from Aqua Voice ( https://withaqua.com ). Aqua is f...
-
Show HN: High school robotics code/CAD/design binder release Hello HN! My name is Patrick, and I am a junior at my High School’s FRC robotic...
-
Show HN: D&D meets Siri – Interactive voice adventure Hey HN! I've been building tooling for voice-driven apps over the past few mon...
-
Show HN: I Made an AI Social Media Manager to Automate Content Creation Hey HN, I am a Solopreneur, and I love building apps to automate bor...
No comments:
Post a Comment