This is just a very quick experiment with Michiel Borkent's Reagami package.
I found it an astonishingly easy way to build a web GUI. To play with this:
- Create a reagami app as documented here, but do not start it:
npm create reagami-app my-appThe Jolt language is an experimental Clojure source to native executable compiler built on Chez Scheme. This Gist describes how I got it running on Debian Trixie.
Firstly, in the jolt repository, the file bin/joltc is a (clever) shell script wrapper. It assumes that the chez scheme executable on your system will be invoked as chez. If you install chez scheme using the Debian package manager, it will be installed as chezscheme, and consequently the script won't find it. I intend to submit a pull request to make the shell script try a number of possible variant names for the chez scheme executable, but I haven't yet done so and, even if I do, it may not be accepted.
I tried creating a symbolic link /home/simon/bin/chez → /usr/bin/chezscheme but this did not work, apparently because the executable constructs the path to its boot file as a relative path from its ex
| (ns are-you-lazy | |
| "Sometimes it's useful to check whether an object is lazy without | |
| exploring the whole of it!" | |
| (:import [clojure.lang IPending LazilyPersistentVector LazySeq])) | |
| (defn lazy? | |
| "Return `true` if this `coll` lazy, else `false`. | |
| **NOTE THAT** Probably all lazy sequences are instances of | |
| `clojure.lang.LazySeq`, but `LazySeq` implements an interface `IPending` |
| (defn map-interval | |
| "Like `map` -- apply function `f` to each element in `col` in turn and | |
| return the values returned in sequence, but in a single thread and pausing | |
| between each invocation of `f`. | |
| Useful for example in circumstances where you're querying a rate-limited | |
| service." | |
| [f col interval] | |
| (let [a (atom ())] | |
| (doseq [x col] |
| #!/bin/bash | |
| # Script to set all origin URLs of all my projects in my workspace to the new | |
| # (forgejo) URL, replacing previous GitHub URLs. | |
| # Background: I keep all my active projects as subdirectories of the | |
| # directory `workspace`. You need to clone all the projects from GitHub to | |
| # Forgejo **first**, before running this script; but this is simply done | |
| # through the Forgejo user interface. See | |
| # https://www.journeyman.cc/blog/posts-output/2025-03-08-installing-forgejo/ |
WARNING: These are very crude tests. Note in particular that I should really average times over about fifty runs, because they do vary; and I have not done this.
Recursive performance in Common Lisp is very good — better on this test than iterative performance, which surprises me. Note that the iterative algorithm takes about one third more processor cycles, and slightly more store.
| (ns fibs.fibonacci | |
| "Compute Fibonacci sequences. | |
| The motivation for writing this was reading a presentation by Stuart | |
| Sierra on Fibonacci sequences in which he showed both recursive and tail | |
| recursive solutions in Clojure, both of which he correctly noted blew up | |
| for large values of `n`, but did not show a `reduce` based solution which | |
| would seem efficient, idiomatic and (relatively) robust. | |
| Stuart's presentation is here: |
| (ns latest-version | |
| "Find the most current stable version identifier of a Clojure (and Java) package." | |
| ;; This builds on Yannick Scherer's [ancient-clj](https://github.com/xsc/ancient-clj), | |
| ;; which in turn builds on Chas Emerick's | |
| ;; [pomegranate](https://github.com/clj-commons/pomegranate/). It goes without saying | |
| ;; that I could not have done this without them. | |
| ;; Usage: (latest-stable-version 'org.jmonkeyengine/jme3-core) | |
I decided to move back from Ubuntu (23.04) to Debian (Bookworm), essentially because the Snap package management system just annoyed the hell out of me. The one significant thing that broke was Shotwell. Debian Stable is stable precisely because it's not at the bleeding edge, and the version of Shotwell it ships with is older than that in Ubuntu 23.04, to the extent that the databases are incompatible.
| (ns getstarstar | |
| (:require [camel-snake-kebab.core :refer [->camelCase ->kebab-case-keyword]]) | |
| (:import [clojure.lang Keyword] | |
| [java.io File])) | |
| ;; What this is about: Ertuğrul Çetin's [jme-clj](https://github.com/ertugrulcetin/jme-clj) | |
| ;; contains a very elegant `get*` macro which constructs the name of a java | |
| ;; gatter instance method on the fly and then calls that method. This allows you to get | |
| ;; an arbitrary instance value from a java 'bean'. It's very neat. But sometimes | |
| ;; you will want to get many instance values from the same object, and to return them as |