Skip to content

Instantly share code, notes, and snippets.

View frenchy64's full-sized avatar

Ambrose Bonnaire-Sergeant frenchy64

  • Madison, Wisconsin
  • 01:13 (UTC -05:00)
View GitHub Profile
@frenchy64
frenchy64 / malli-2026-proposal.md
Created March 20, 2026 05:27
Malli: ref schema Performance Optimizations (Clojurists Together 2026 proposal)

Malli: ref schema Performance Optimizations

In my previous Clojurists Together work for malli I improved the performance of validating recursive refs, bounding the amount of memory required for validation regardless of the depth of input values. This is implemented by eagerly expanding recursive schemas until recursive points are discovered, instead of lazily realizing and caching (an unbounded number of) new levels of recursion as inputs require.

While this increases the reliability of long-running systems by preventing memory leaks caused by validating large inputs, it came with the drawback that more memory was required upfront during validator compilation. This is an obstacle Metabase has been navigating when testing this optimization. While they are excited to see

@frenchy64
frenchy64 / 01_prompt.md
Last active October 26, 2025 03:33
Race condition confirmation prompt

@copilot please concentrate on reproducing and describing the race condition in ./script/test-clr. I can't reproduce your results but it's happened several times in a copilot session (reported here clojure/clr.core.cli#4).

I conjecture that the race condition is here in ensure-git-dir (https://github.com/clojure/clr.core.cli/blob/9a09d7e73a15ecefec15c697eb1aff7d54392082/src/dotnet/Cljr/clojure/tools/gitlibs/impl.cljr):

(defn git-clone-bare
  [url ^DirectoryInfo git-dir]                                                                     ;;; ^File
  (printerrln "Cloning:" url)
  (let [git-path (.FullName git-dir)                                                               ;;; .getCanonicalPath
        {:keys [exit err] :as ret} (run-git "clone" "--quiet" "--mirror" url git-path)]
@frenchy64
frenchy64 / schema.md
Last active August 16, 2022 19:04
Schema generative testing

(This is a really long answer to feedback on plumatic/schema#445)

Sorry, I don't understand from here down.

My bad, there's a ton of implicit decisions and I'm only explaining the tiny details :) I'll try writing this again.

Are you basing this design off an existing language or library that I can read about to get a better understanding?

This is a combination of several ideas and tradeoffs.

@frenchy64
frenchy64 / macrovich-case.md
Last active February 22, 2022 02:45
Macrovich case explanation
typed.clj.refactor=> (refactor-form-string "+" {})
"clojure.core/+"
typed.clj.refactor=> (refactor-form-string "(defn foo [a] (+ a 3))" {})
"(clojure.core/defn foo [a__#0] (clojure.core/+ a__#0 3))"
typed.clj.refactor=> (refactor-form-string "(defmacro foo [a] `(+ ~a 3))" {})
"(clojure.core/defmacro foo [a__#0] `(+ ~a__#0 3))"
@frenchy64
frenchy64 / hidden.md
Last active July 21, 2019 01:17
Venue: Keynote for Compose :: Melbourne, September 2nd 2019 (http://www.composeconference.org/)

The Hidden Data Flow in Types

On the surface, function types simply describe inputs and outputs—indeed, that's how they're used in most type systems. But there's more to function types!

Fascinatingly, a function type can be transformed into a data flow graph that predicts the inner workings of any function that has that type. Using this graph, intricate dependencies between function inputs and outputs can be inferred

@frenchy64
frenchy64 / README.md
Last active July 27, 2025 16:50
RFC: Animation for cljfx

RFC: Animation for cljfx

This is an initial attempt at supporting animations in cljfx. Running instructions are below.

The actual animation logic is here under the Demo comment.

The original code is here.

Running

@frenchy64
frenchy64 / notes.md
Last active July 8, 2019 18:05
Notes on JavaScript prototypes

Why Objects were successful

https://www.cs.cmu.edu/~charlie/courses/15-214/2014-fall/slides/25-history-oo.pdf

  • essense of objects is (dynamic) dispatch
  • dispatch provides interoperability
  • first-class interoperability is critical to frameworks and ecosystems
  • frameworks and ecosystems are economically critical to the software industry
  • likely a significant factor in objects' success
  • Also talks about early mistakes in Simula

Why objects are inevitable

@frenchy64
frenchy64 / Io Example Problems
Created June 25, 2019 18:23 — forked from jezen/Io Example Problems
The example problems have gone missing from the Io language website, so here’s a backup.
#Sample code
#Hello world
"Hello world!" print
#Factorial
factorial := method(n, if(n == 1, 1, n * factorial(n - 1)))
99 bottles of beer
(ns colored-lti-clj.core)
(defalias List
(TFn [a]
'{:match (All [b] [(ListVisitor a b) :-> b])}))
(defalias ListVisitor
(TFn [a b]
'{:caseNil (All [:-> b])
:caseCons (All [a (List a) :-> b])}))