Skip to content

Instantly share code, notes, and snippets.

@sogaiu
sogaiu / top-level-defs.janet
Last active November 29, 2025 10:50
top-level def extraction test
(import ./lib/location :as l)
(import ./lib/jipper :as j)
(comment
(def an-import
"(import ./analyze :as a)")
(def a-def
"(def a 1)")
@sogaiu
sogaiu / comment-out-import-line.janet
Last active November 29, 2025 07:52
zipper comment out test
(import ./lib/location :as l)
(import ./lib/jipper :as j)
(comment
(def src
(string "(import ./analyze :as a)\n"
"\n"
"(defn main\n"
" [& args]\n"
@sogaiu
sogaiu / edit-twice.janet
Last active November 29, 2025 08:18
zipper modify test
(import ./lib/location :as l)
(import ./lib/jipper :as j)
(comment
(def src
(string "(import ./analyze :as a)\n"
"\n"
"(defn main\n"
" [& args]\n"
@sogaiu
sogaiu / gist:db7968ad2995c744531ad1e5dbe22e92
Last active November 28, 2025 06:36
building emacs from source with user-specific tree-sitter
# XXX: draft
# user-specific tree-sitter installation is doable via use of PREFIX
# assuming so...
cd ~/src
git clone https://github.com/emacs-mirror/emacs emacs-30.2
cd ~/src/emacs-30.2
git checkout emacs-30.2
@sogaiu
sogaiu / names.md
Last active December 7, 2025 07:27
janet tool name ideas
  • jell, jointly, joust, juicer

    • vendoring or compiling a single artifact
  • jog, jolt, jump, jaunt

    • lookup tool
  • enjoin (janet-please)

@sogaiu
sogaiu / notes.md
Last active November 25, 2025 11:59
use of def and let in janet

(sketching out own thoughts -- explicit examples would likely help in making things clearer)

on the topic of my own use of def and let in janet...

  • often default to using def
    • doesn't increase indentation so line lengths are not increased [1]
      • all of the relevant code within a let is shifted to the right
        • the binding bits extend further to the right
  • the body extends further to the right
@sogaiu
sogaiu / notes.md
Last active November 20, 2025 11:40
links from sabine video "ai resistance"...and then some
@sogaiu
sogaiu / notes.md
Last active November 18, 2025 04:09
janet-playground wasm building notes

notes on building janet-playground's wasm file

some used pieces

  • emsdk 4.0.5

results for various versions

1.28.0

  • jpm won't run because of a missing os/isatty
@sogaiu
sogaiu / 0.find-callers-of-demo.txt
Last active November 17, 2025 08:45
find-callers-of.janet demo
$ VISUAL=emacs janet find-callers-of.janet file/write ~/src/git-some-janets/repos 2>/dev/null
# emacs +4 codeberg.org/amano.kenji/j3blocks/j3blocks/modules/cmd.janet
run
# emacs +18 codeberg.org/veqq/deforester/deforester.janet
log
# emacs +40 codeberg.org/veqq/deforester/deforester.janet
set-sink-to-logger!
# emacs +7 git.sr.ht/~nullevoid/jermbox/examples/example.janet
command-loop
# emacs +22 git.sr.ht/~subsetpark/bagatto/demo/vendoring/janet_modules/tester.janet