Autology is a programming language created in 2025 by Dave Kimber.
#3744on PLDB | 0Years Old |
git clone https://github.com/Kimbsy/autology
Autology is a Lisp with access to its own interpreter.
(bind (;; grab a copy of the `:atl/eval-list` section of the
;; interpreter which is responsible for evaluating lists.
original (get-marker *i* :atl/eval-list)
;; define a case test+body for use when the list expression
;; starts with our function special form, in this case `位`.
位-form (qu (位 (let [[_位 params body] e]
(fn [& values]
(autology.core/evaluate
body
(reduce (fn [acc-env [s v]]
(assoc acc-env s v))
env
(zipmap params values)))))))
;; rebind `*i*` to be a new interpreter with the
;; `:atl/eval-list` section replaced with a version that
;; includes our lambda handling special form.
*i* (replace-marker *i* :atl/eval-list
(list :atl/eval-list
(concat (butlast original)
位-form
(list (last original)))))
;; We can now immediately define functions since the
;; interpreter will have already been updated to evaluate the
;; remaining bindings like this one.
double (位 (n)
(+ n n)))
;; Finally we can invoke our new function!
(double (double (double (double (double 1.3125))))))