Skip to content

JLLL v2.5

Latest

Choose a tag to compare

@github-actions github-actions released this 03 Feb 09:37
· 8 commits to master since this release

What's New in JLLL 2.5

Shell Execution Library

Execute shell commands from JLLL and capture output:

;; Execute command, get structured result
(bash "ls -la")
;; => {:stdout "..." :stderr "" :exit-code 0}

;; With options
(bash "npm test" :cwd "/path/to/project" :timeout 60000)

;; Pipe input
(bash "wc -l" :input "line1\nline2\nline3")

;; Environment variables
(bash "echo $MY_VAR" :env (hash-map "MY_VAR" "hello"))

The bash function is also available as an AI tool for LLM-assisted system administration.

See docs/shell.md for full documentation.

Embedded HTTP Server

Lightweight HTTP server using Javalin for exposing web endpoints:

(define server (http-server))

(http-get server "/hello" 
  (lambda (ctx) (http-result ctx "Hello, World!")))

(http-post server "/api/users" 
  (lambda (ctx)
    (define body (http-body-json ctx))
    (http-json ctx (create-user body))))

(http-start server :port 8080)

Features:

  • Full HTTP method support (GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS)
  • Path parameters and query parameters
  • JSON request/response helpers
  • Static file serving
  • Server-Sent Events (SSE) for streaming
  • Before/after filters
  • Error and exception handlers

See docs/web-server.md for full documentation.

Init File Support (~/.jlllrc)

Customize JLLL startup with an initialization file:

;; ~/.jlllrc - loaded automatically when REPL starts
(println "Welcome to my customized JLLL!")

;; Configure AI
(ai-configure :default-tier "fast")

;; Define personal utilities
(define (greet) (println "Hello, " (user-name) "!"))

CLI options:

  • --rc path - Use custom init file
  • --no-rc - Skip init file loading

See docs/init-file.md for full documentation.

System Library

Access system and environment information:

(hostname)              ;; => "my-machine"
(user-name)             ;; => "alice"
(user-home)             ;; => "/Users/alice"
(os-name)               ;; => "Mac OS X"
(os-arch)               ;; => "aarch64"
(java-version)          ;; => "21"

(getenv "PATH")         ;; Get environment variable
(getenv-all)            ;; All env vars as hash-map

(memory-used)           ;; Memory stats
(available-processors)  ;; CPU cores

Format Library

Common Lisp / SRFI-28 style formatted output:

(format "Hello ~a!" "World")           ;; => "Hello World!"
(format "Pi is ~,2f" 3.14159)          ;; => "Pi is 3.14"
(format "Hex: ~x, Binary: ~b" 255 15)  ;; => "Hex: ff, Binary: 1111"

(printf "Value: ~d~%" 42)              ;; Prints with newline
(fprintf port "Log: ~a" msg)           ;; Write to port

Directives: ~a (aesthetic), ~s (write), ~d (decimal), ~x (hex), ~b (binary), ~o (octal), ~f (float), ~% (newline), ~~ (tilde).

Set Library

Efficient set data structure:

(define s (set 1 2 3 4 5))
(set-contains? s 3)                    ;; => true
(set-add! s 6)
(set-remove! s 1)

;; Set operations
(set-union s1 s2)
(set-intersection s1 s2)
(set-difference s1 s2)
(set-subset? s1 s2)

;; Transformation
(set-map (lambda (x) (* x 2)) s)
(set-filter positive? s)

Documentation Improvements

  • Added CHANGELOG.md documenting all releases
  • Added comprehensive docs/ai.md for AI library
  • Reorganized documentation index in docs/README.md

Other Improvements

  • Fixed AGENTS.md documentation accuracy
  • Added ParameterParser utility for keyword argument extraction
  • AI bash tool for LLM shell command execution

Full Changelog: v2.4...v2.5