July 6th 2026 - Things I Worked On
Added macros to Hith
Single Argument. Similar to a function:
(defmacro test (arg) arg) (test 5) ;; => 5
Multiple Arguments:
(defmacro test (arg1 arg2) (+ arg1 arg2)) (test 5 10) ;; => 15
Macro with &rest Body:
(defmacro test (&rest body) `(progn ,@body)) (test 5) ;; => 5
Complex Macro with &rest and splice:
(defmacro my-when (test &rest body) `(if ,test (progn ,@body) False)) (defvar x 10) (my-when (> x 5) (setq x (+ x 1)) (setq x (* x 2)) x)
Added random, range, randrange, and choice to Hith
;; Outputs a random number between 0 and 1 (random) ;; Macro for iterating over a range (range i 0 5 (message i)) ;; Outputs a random number between lower and upper bounds (randrange 0 5) ;; Output a random value from the given list (defvar list '(a b c)) (choice list)
Added templating to message in Hith
(message "The sum is %s" (+ 1 2))