home.social

#janetlang — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #janetlang, aggregated by home.social.

fetched live
  1. (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.

    salsa.debian.org/freedombox-te

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

    #JanetLang #RakuLang

  2. 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

  3. Awesome Janet: Curated list of libraries and tooling for the Janet programming language. ~ Matthew Carter. github.com/ahungry/awesome-jan #JanetLang #FunctionalProgramming

  4. I'm new to Mastodon. Here's some stuff I like and might post about:

    - Theology (I am very Christian)
    - Amateur Category Theory (bad)
    - Programming in #janetlang
    - Philosophy (anti-platonism)
    - Note-taking/PKM ( #roamresearch )
    - Data Analysis (self-taught, bad)
    - Cool Etymologies
    - Literary Criticism
    - Desktop Automation ( #autohotkey )
    - Now Reading/Watching/Listening to/Playing
    - Complaining about Microsoft products
    - Misc. side projects (I write #vscode extensions)

  5. Wanted to look up something about #janetlang and the top search autocomplete was "Janet Lang Obituary"

    And like an idiot I clicked it thinking "oh no did the project die?"

    Anyways FYI Janet Lang died peacefully in her home at the age of 95 (RIP), but the programming language is still ok.

  6. @fosskers Here's my point-free solution in #JanetLang using PEG

    I guess Janet doesn't have a uniqueness function? I couldn't find it at least.

    Also posted this on the Doom Emacs Discord

    (def grammar
    ~{:main (* :words -1)
    :words (any (+ ,;ignored-terms ':word 1))
    :word (at-least 3 :a)})

    (def run (comp keys frequencies |(peg/match grammar $) string/ascii-lower))

  7. I finally wrote my #AdventOfCode solution in a different language than my main. In this case in #JanetLang.

    It took me surprisingly long time, but it's there. I used to be better at writing code in Janet.

    github.com/katafrakt/advent_of

  8. #janetlang 裡怎麼沒有可以計算字串中有幾個字符的函式... zzz

    姑且先用 length...