Skip to content

Instantly share code, notes, and snippets.

@sogaiu
sogaiu / clojure-ts-mode-extras.el
Last active April 7, 2026 15:01
"some option to infer the closing parentheses before it gets passed to whatever tree representation this mode is operating on"
;; from: https://github.com/clojure-emacs/clojure-ts-mode/issues/134#issuecomment-4178337890
;; by: https://github.com/sstraust
;; the thought is to temporarily insert the parens just before sending to
;; treesitter, and then remove them so they don't impact the user's working
;; buffer
(defun treesitter-parens--compute-closing-chars ()
(save-excursion
(save-restriction
@sogaiu
sogaiu / notes.md
Last active March 27, 2026 03:16
trying out clj-android sample

steps

jdk, android sdk, etc.

  • make sure jdk 21+ (<26) is installed
    $ java --version
    openjdk 21.0.10 2026-01-20
    OpenJDK Runtime Environment (build 21.0.10+7-Ubuntu-124.04)
    OpenJDK 64-Bit Server VM (build 21.0.10+7-Ubuntu-124.04, mixed mode, sharing)
    
(comment
(def path-str ":vendored 2 :tag")
# bundle/info.jdn
(def src
``
{:name "ghost"
:url "https://github.com/sogaiu/ghost"
:repo "git+https://github.com/sogaiu/ghost"
@sogaiu
sogaiu / notes.md
Last active March 16, 2026 12:56
slm (zero-attribution) + rag (common corpus code or similar)

it looks like there have been attempts to use small language models with retrieval augmented generation. here is one such effort from 2024 that seems to have had some level of success.

perhaps it's possible to train a small language model on a subset of code that does not require attribution for reuse (e.g. 0-clause bsd, mit no attribution, etc. [1]) and then to have it work with a much larger body of code (i.e. include stuff that requires attribution) via retrieval augmented generation.

the idea is not to replicate the full capabilities of what major dark boxen provide atm, but rather to see what is possible. it would be interesting to see what kinds of tasks this sort of thing could be useful for. i think at least from the legal and ethical perspectives, one might be in the clear because the parts that would require attribution would be traceable [2].


[1] i know there isn't as much of this kind of thing compared to stuff that requires attribution.

2025-12-31

  • Writer Ted Chiang on AI and grappling with big ideas - Avery Keatley, Scott Detrow, Patrick Jarenwattananon
  • ChatGPT Is a Blurry JPEG of the Web - Ted Chiang - version archived elsewhere as original is paywalled

    In 2013, workers at a German construction company noticed something odd about their Xerox photocopier: when they made a copy of the floor plan of a house, the copy differed from the original in a subtle but significant way. In the original floor plan, each of the house’s three rooms was accompanied by a rectangle specifying its area: the rooms were 14.13, 21.11, and 17.42 square metres, respectively. However, in the photocopy, all three

@sogaiu
sogaiu / notes.md
Last active March 11, 2026 10:28
build static janet via qemu + alpine

steps

@sogaiu
sogaiu / gist:0b75094eb94a7e640dc6f46978fa8777
Last active March 9, 2026 13:11
passphrase via terminal for gnupg
# create file
$ echo hello > fun.txt
# symmetric encryption
$ gpg --verbose --verbose --pinentry-mode loopback --symmetric fun.txt
gpg: enabled compatibility flags:
gpg: using cipher AES256.CFB
gpg: writing to 'fun.txt.gpg'
# decryption
$ janet
Janet 1.41.3-dev-8f446736 linux/x64/gcc - '(doc)' for help
repl:1:> (tabseq [i :in [:a :b]] i i)
@{:a :a :b :b}
repl:2:> (defn loop [&] nil)
<function loop>
repl:3:> (tabseq [i :in [:a :b]] i i)
repl:3:9: compile error: unknown symbol i
# reference: https://ianthehenry.com/posts/janet-game/the-problem-with-macros/