Discussion
Loading...

Post

  • Log in
  • Sign up
  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Joseph Nuthalapati :fbx:
Joseph Nuthalapati :fbx:
@njoseph@social.masto.host  ·  activity timestamp 8 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

#janetlang
  • Copy link
  • Flag this post
  • Block
Joseph Nuthalapati :fbx:
Joseph Nuthalapati :fbx:
@njoseph@social.masto.host  ·  activity timestamp 8 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
Samuel Chase
@samebchase@fantastic.earth  ·  activity timestamp 8 months ago
@njoseph good stuff. 🤓
  • Copy link
  • Flag this comment
  • Block
Instance logo
bonfire.cafe
Log in Create account
Banner for bonfire.cafe

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire bovenjan · 1.0.3-alpha.10 no JS en
Federation disabled
Instance logo
  • Explore
  • About
  • Members
  • Code of Conduct

Install bonfire.cafe

Get the full app experience

1 Tap Share 2 Add to Home Screen