Ya

YakshaLisp – Macros for Yaksha and Lisp Dialect

Hacker News

YakshaLisp – Macros for Yaksha and Lisp Dialect

YakshaLisp is a sub-language embedded in Yaksha compiler. Allowing you to do things like below (fizzbuzz). 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) Few more examples: - embedding a text file macros! { (defun load_string (file) (list (yk_create_token YK_TOKEN_STRING (io_read_file (map_get file "value"))))) (yk_register {dsl load_string load_string}) } def main() -> int: println(load_string!{"test.txt"}) return 0 - importing a macro import import_me as magic def main() -> int: println(magic.counter!{}) println(magic.counter!{}) println(magic.counter!{}) return 0 Looking for ideas/advice/criticism :)

Share card

Actual performance

5points
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Hacker NewsStrong engagement from HN community · Strong signals: ide, io · Missing: https docs, excited, just released
52%52% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
Product HuntUnlikely to reach the leaderboard · Strong signals: mac, using · Missing: agents, macos, agent
47%47% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Missing: plus, platform, intuitive
42%42% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Indie HackersIH features products with proven revenue · Missing: supports, reddit linkedin, podcasting
41%41% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Missing: mobile apps, ios, personal
32%32% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
13%13% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
4%4% predicted probability of success on BetaList, based on ML models trained on real launch data.

Incorrect prediction on native model

Similar products

Sy
Synesthesia – Optimizing brainfuck compiler implemented as Nim macros69%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Synesthesia – Optimizing brainfuck compiler implemented as Nim macros

Hacker News33
Ya
YakshaLisp – Lisp dialect and macros for Yaksha lang60%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

YakshaLisp – Lisp dialect and macros for Yaksha lang

Hacker News2
Zi
Zig's defer/errdefer for c99 and gnu11 C via macros74%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Zig's defer/errdefer for c99 and gnu11 C via macros

Hacker News2
Ph
Phases, Scala macros for multiphase classes44%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Phases, Scala macros for multiphase classes

Hacker News1
8c
8cc.cr – compile-time C compiler implemented as Crystal macros71%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

8cc.cr – compile-time C compiler implemented as Crystal macros

Hacker News9
Sa
Same-tbh – vim-like macros for bash60%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Same-tbh – vim-like macros for bash

Hacker News5
A
A set of dbg() macros for C51%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

A set of dbg() macros for C

Hacker News3
Un
Unbug – Rust macros for programmatically invoking breakpoints56%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Unbug – Rust macros for programmatically invoking breakpoints

Hacker News96
Cl
Clojure Macros – Lessons from unspoken symbols48%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Clojure Macros – Lessons from unspoken symbols

Hacker News3
Ke
Keysmith – Create macros for your Mac (and the web)66%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Keysmith – Create macros for your Mac (and the web)

Hacker News12