July 9th 2026 - Things I Worked On

A pretty lisp solution for finding the nth element of a list

I came up with this when trying to implement nth in pure lisp. I can't use it in Hith because nth also needs to work for strings and sadly I don't have a mechanism car and cdr to work on string atoms. So, I'll just put it here as something nice to look at.

(defun nth (index list)
  (defvar idx 0)
  (defvar item nil)

  (while (<= idx index)
    (setq item (car list))
    (setq list (cdr list))
    (setq idx (+ idx 1)))
  item)

Added when to Hith

(when (> 2 1) 1)
;; => 1

Switched position of string-match arguments in Hith

This was done for consistency with other string related functions.

(string-match "test" "e")

Type checks now return BooleanTrue or Nil in Hith

Before they were returning Python True or False.

Added funcall special form to Hith

(defun add10 (x) (+ x 10))
(funcall add10 5)
;; => 15

(defvar my-op '+)
(funcall my-op 1 2)
;; => 3

Changed type checks to end with ? in Hith

I think this reads nicer.

atom?
int?
float?
string?
symbol?