Sketching Janet 2
Jan 2026 - Alex Alejandre

We must be the change you want to be

Grow

Implementation

  • bakpakin said the current memory model is somehow unfixable (without breaking), so fix it
  • implement directly on linux system calls to have no dependencies, not even c? https://github.com/lone-lang/lone but then how to extend?
  • intermediary representation / simplified assembly based on Common Lisp or Go’s, maybe? Wasm? Or what to do with the bytecode?

Bakpakin does not approve of renaming things much, although the community often did think and discuss it.

; # break holy and sacrosanct tradition!

  • weird naming:
    • https://github.com/janet-lang/janet/issues/626
    • https://github.com/janet-lang/janet/discussions/1251
    • any? is not a predicate but a functional or, also any
    • any, some, all
    • inconsistent theming: freeze, thaw vs immutable
    • sort, sorted, yet reverse, reverse! Bakpakin doesn’t want many !
      • more without a ! put, set, update, array/push, array/insert, array/remov
      • n.b. they return stuff, so they’re useful in pipelines etc.
    • chr confuses people who want it named byte
    • accumulate - could be named scan or folding-map
      • reduce, reduce2, accumulate2
    • keep-syntax and keep-syntax! - the ! isn’t mutable but rather coerces the types!

change by accretion, add new, don’t break old (this made me think of a rationalization library, aliasing functions with better names e.g. set!)

  • next - i think this is effectively the same as asking if something is not empty
  • invert - i think this can be used to make a table from an indexed value that is effectively a sort of set

I am reluctant to use these as-is in my own code to express the meanings above because i suspect i will rapidly forget their intent…thereby leaving my future self with puzzles i could have avoided

Such fixes are blocked to not break holy backwards compatability, which right, nevertheless sad. It is currently possible to just alias over (almost) everything and e.g. manipulate doc strings but that serves little purpose without fundamental improvements.

I thing the problem with adopting the ! suffix is that so many functions in the core mutate inputs that it would just become extra noise in the code. It works in Clojure because most functions don’t mutate inputs.

Anyways, what I will not do is append ! to all functions that mutate their input for the sake of bike shedding. - Bakpakin

Why did people leave Janet?

Its a combination of language features out of the box and the frameworks and libraries at the time.

  • How do I compress and resize images? In JS the winning library for image manipulation is sharp. But sharp isn’t available everywhere, like Cloudflare workers. Workers has their own image manipulation tool now too. 
  • How do I hash something for deduplication? I solved that with janetls at the time. JS has its own language-built-in crypto set of functions. 
  • How do I parse cookies? How do I authenticate cookie sessions or the like? 
  • How do I do access control? (Firmly in the land of frameworks)
  • How do I parse markdown and make my own html with it? How do I recognize my own special token to inject a component unique to my environment?
  • And the usual “Hey this guy in IRC / Matrix made this library I like and suddenly they’re not around anymore”

Speaking of parsing, the tools Janet has are incredible. But nigh undebuggable. I found Parsec in Haskell to be much more enjoyable, honestly.