Menu

GitHub - ThatXliner/rust-but-lisp: Rust but LISP
πŸ“°
0

GitHub - ThatXliner/rust-but-lisp: Rust but LISP

GitHubΒ·ThatXlinerΒ·23 days ago
#SrSvDzwf
Reading 0:00
15s threshold

rlisp Rust semantics with LISP syntax. A transparent s-expression frontend that compiles directly to Rust β€” no runtime, no GC, just (s-expr β†’ .rs β†’ binary) . (struct Point (x f64) (y f64)) (impl Point (fn distance (( &self ) (other &Point )) f64 ( let dx ( - ( . self x) ( . other x))) ( let dy ( - ( . self y) ( . other y))) (( . dx powf 2.0 ) + ( . dy powf 2.0 )) sqrt )) (fn main () () ( let p1 (new Point (x 0.0 ) (y 0.0 ))) ( let p2 (new Point (x 3.0 ) (y 4.0 ))) (println! " Distance: {} " ( . p1 distance (& p2)))) Everything Rust has β€” ownership, borrowing, lifetimes, generics, traits, pattern matching β€” expressed as s-expressions. No semantic gap. rustc does type checking, borrow checking, and optimization. rlisp just handles the syntax. Install git clone https://github.com/ThatXliner/rlisp.git cd rlisp cargo install --path .…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More