Skip to content

Instantly share code, notes, and snippets.

@sogaiu
sogaiu / notes.md
Last active February 1, 2026 13:18
sm-n981n note 20 5g
  • basic info

    • model code (from Settings -> About phone -> Status Information): SM-N981NZNEKOO

    • looks like qualcomm snapdragon 8250 (via CPU Info app)

    • specs

    • twrp

(defn path-join
[& parts]
(def bs-land? (let [osw (os/which)]
(or (= :windows osw) (= :mingw osw))))
(def sep (dyn :path-fs-sep (if bs-land? `\` "/")))
#
(string/join parts sep))
(defn make-visitor
[& paths]
(defn visit
``
Traverse directory tree starting at `path`, applying
argument `a-fn` to each encountered file or directory path.
``
[path a-fn]
(assertf (is-dir? path)
"expected dir but got: %n" (os/stat path :mode))
(def seen? @{})
#
@sogaiu
sogaiu / tidbits.janet
Last active January 31, 2026 06:05
janet tidbits
# `(next x)` can be used as a synonym for `(not (empty? x))`
# if `next` returns `nil`, the argument is empty.
(next [])
# =>
nil
# if `next` returns non-nil, the argument is not empty.
(next [:a :b])
# =>
(defn path-join
[& parts]
(def bs-land? (let [osw (os/which)]
(or (= :windows osw) (= :mingw osw))))
(def sep (dyn :path-fs-sep (if bs-land? `\` "/")))
#
(string/join parts sep))
(comment
* refine this file based on conventions adopted for
notes.txt files used for niche and jell
* possibly could split out search-paths so jackal, jargon, and jog can
vendor search.janet from some common place? might be that
walk-dir.janet and search.janet should be merged?
* unexpected...why does path-join show up as result 8 below?
~/src/git-some-janets/repos$ jakl who-calls declare-project
@sogaiu
sogaiu / gist:c165ce74698e31d95615c60c2d2f448d
Created January 27, 2026 08:57
janet-sh limits according to ianthehenry's book chapter
> but Bash still has a lot to recommend it: there’s no equivalent of trap EXIT in Janet, nor is there an analog of the extremely-useful cp foo.bar{,.bup} expansion shorthand. It’s a lot more verbose to set and reference environment variables in Janet, and there’s no ~/foo or ~user/foo shorthand for specifying home directories. You can’t spawn background jobs at all, and Janet has no job control facilities.
* there’s no equivalent of `trap EXIT` in Janet
* there is no analog of the extremely-useful `cp foo.bar{,.bup}` expansion shorthand
* It’s a lot more verbose to set and reference environment variables in Janet
* there’s no `~/foo` or `~user/foo` shorthand for specifying home directories
* You can’t spawn background jobs at all
* Janet has no job control facilities
@sogaiu
sogaiu / gist:58a86e29e584d0f24397b19e0be6eb61
Last active January 16, 2026 09:50
veqq naming and import response fragments
i do also happen to think that there are conditions under which english (/ human language) name being changed would be better for reasons i mentioned before, but this is less of an issue from the perspective of api breakage / use in codebases.
i think not changing english names can lead to a kind of confusion that i think it would be nice to avoid (cf. firefox situation) in communication as well as being potentially misleading.
searching for things later can also become more complicated by not changing names because one can end up with more stuff to sift through.
---
to clarify a bit of why i don't want to talk in terms of `import` so much is at least partly because it has complexities that make discussion and thought more cumbersome. listed at [this page](https://janet-lang.org/docs/modules.html) are relative imports, working directory imports, @-prefixed imports, and imports can be customzied a fair bit as well.
@sogaiu
sogaiu / gist:5ffeb2b969fda83836b3b967a25b8921
Created January 16, 2026 01:10
signal installation on debian-based
# NOTE: These instructions only work for 64-bit Debian-based
# Linux distributions such as Ubuntu, Mint etc.
# 1. Install our official public software signing key:
wget -O- https://updates.signal.org/desktop/apt/keys.asc | gpg --dearmor > signal-desktop-keyring.gpg;
cat signal-desktop-keyring.gpg | sudo tee /usr/share/keyrings/signal-desktop-keyring.gpg > /dev/null
# 2. Add our repository to your list of repositories:
wget -O signal-desktop.sources https://updates.signal.org/static/desktop/apt/signal-desktop.sources;
cat signal-desktop.sources | sudo tee /etc/apt/sources.list.d/signal-desktop.sources > /dev/null