Skip to content

Instantly share code, notes, and snippets.

;;;
(defvar cycle-date-month-alist
'(("jan" . "01") ("feb" . "02") ("mar" . "03")
("apr" . "04") ("may" . "05") ("jun" . "06")
("jul" . "07") ("aug" . "08") ("sep" . "09")
("oct" . "10") ("nov" . "11") ("dec" . "12")))
(ignore
@sogaiu
sogaiu / parser-exploration.janet
Created October 16, 2025 14:06
some janet parser/* expressions
(comment
(def p (parser/new))
(parser/consume p "[:a {:x 1 :y 2}")
# =>
15
(def state (parser/state p))
@sogaiu
sogaiu / reflections.md
Last active October 15, 2025 13:35
reflections on inclusion criteria for grammar orchard

atm inclusion criteria for grammar orchard lists:

Grammars growing in the orchard must:

  1. be released under the MIT license (and possibly other licenses, at the user's option),
  2. have an accompanying test suite,
  3. have a continuous integration workflow configured on the repository,
  4. use C as the programming language of their external scanner (if any), and not C++,
  5. define the grammar in a JavaScript file (and not TypeScript or any other language),
  6. follow the Conventional Commits specification,
(defn num-digits
[x]
(if (= x 0)
1
(math/floor (inc (math/log10 x)))))
(comment
(num-digits 0)
# =>
@sogaiu
sogaiu / gist:05d58f3691497ab1e98d1341dfe2379f
Last active October 13, 2025 02:51
iphone with usb-c
iphone 15
https://iosys.co.jp/items/smartphone/iphone/iphone15?not=pro&vo=128&l=l
https://iosys.co.jp/items/smartphone/iphone/softbank/iphone15_a3089/303014
https://iosys.co.jp/items/smartphone/iphone/simfree/iphone15_a3089/382843
ネットワーク利用制限
https://iosys.co.jp/guide/support/networkguarantee.html
https://snowyskies.jp/imeiChecking/
@sogaiu
sogaiu / build-qemu-from-source.md
Last active October 10, 2025 11:04
build qemu from source

commands

git clone https://gitlab.com/qemu-project/qemu.git
cd qemu
git checkout v10.1.1
./configure --prefix=$HOME/.local
# a little more than 35 minutes here
time make
@sogaiu
sogaiu / syspath.md
Created October 3, 2025 05:21
syspath
  • general guide
  • .h file locations
    • file collision
  • include "pollution"