July 10th 2026 - Things I Worked On

Added showing human readable file sizes in ibuffer

(with-eval-after-load 'ibuffer
  (define-ibuffer-column size
    (:name "Size"
           :inline t
           :header-mouse-map ibuffer-size-header-map)
    (file-size-human-readable (buffer-size))))

Added mod to Hith

(mod 5 2)
;; => 1

Added hash to Hith

This is in preparation to do sets and hash tables.

(hash "test")
;; => 958817860231810080

Add num? predicate to Hith

(num? 1.23)
;; => t

Added starting a Hith REPL from Emacs

(defun my/shell-send-string (str)
  "Send the given STR to the default shell."
  (ghostel-send-string str))

(defun my/start-hith-repl ()
  "Start a hith repl."
  (interactive)
  (cd "/path/to/hith")
  (my/create-shell)
  (my/shell-send-string "python hith.py\n"))

(evil-leader/set-key
  "r h r" 'my/start-hith-repl)

Switched to NIL and T for internal representations in hith

All the code now uses NIL and T instead of Nil() and BooleanTrue()

Added char-to-ord and ord-to-char to Hith

(char-to-ord "A")
;; => 65

(ord-to-char 72)
;; => H

Added putting expenses in a table

Expenses are now shown like this:

|-------------+---------+-----------|
| Description | Expense | Converted |
|-------------+---------+-----------|
| lunch       |     170 |      2.76 |
| baguette    |      98 |      1.59 |
| water       |      79 |      1.28 |
| chips       |      48 |      0.78 |
|-------------+---------+-----------|
(defun budget--entry (line)
  (split-string line " "))

(defun budget--entry-description (entry)
  "Return the description part of the entry."
  (s-join " " (take (- (length entry) 2) entry)))

(defun budget--entry-expense (entry)
  "Return the expense part of the entry."
  (car (last entry 2)))

(defun budget--entry-converted (entry)
  "Return the converted part of the entry."
  (car (last entry)))

(defun budget--draw-table ()
  "Put data in a table."
  (save-excursion
    (let ((at-end-of-file nil))

      (goto-char (point-min))
      (insert "|---\n")
      (insert "| Description | Expense | Converted |\n")
      (insert "|---\n")

      (while (not at-end-of-file)
        (let* ((entry (budget--entry (budget--get-line))))

          (budget--replace-line
           (format "|%s|%s|%s|"
                   (budget--entry-description entry)
                   (budget--entry-expense entry)
                   (budget--entry-converted entry)))

          (setq at-end-of-file (eobp))
          (unless at-end-of-file
            (next-line))))

      (insert "\n|---")))

  (org-mode)
  (org-table-align))

(defun budget--replace-line (new-text)
  "Conveniene function to replace the current line with the NEW-TEXT."
  (delete-region (line-beginning-position) (line-end-position))
  (insert new-text))