Discussion
Loading...

Discussion

  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Joseph Nuthalapati :fbx:
@njoseph@social.masto.host  ·  activity timestamp 3 months ago

Tried porting a small script to Janet. It's a tiny Clojure-like Lisp implementation with functional programming not enforced. It doesn't have Clojure's immutable data structures either.

It's the same number of lines as the Python version of the script and just as readable. I used spork and sh libraries in Janet, though not required. The core isn't batteries-included, but just 1 MB.

P.S. There's a Raku version of the script that's only half the lines. Bash script can be a one-liner.

#JanetLang

  • Copy link
  • Flag this post
  • Block
Joseph Nuthalapati :fbx:
@njoseph@social.masto.host replied  ·  activity timestamp 3 months ago

(2/2) Uploaded the Janet script as a snippet in Debian Salsa. I had to use curl because the spork library can't do HTTPS yet.

https://salsa.debian.org/freedombox-team/toolbox/-/snippets/807

This also includes a Raku version I wrote last year. The original Python version is in the repository itself.

#JanetLang#RakuLang

  • Copy link
  • Flag this comment
  • Block
Samuel Chase
@samebchase@fantastic.earth replied  ·  activity timestamp 3 months ago
@njoseph good stuff. 🤓
  • Copy link
  • Flag this comment
  • Block
Log in

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.0 no JS en
Automatic federation enabled
  • Explore
  • About
  • Members
  • Code of Conduct
Home
Login