This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (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] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (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? @{}) | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # `(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]) | |
| # => |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (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 |
- Disassembling a Cortex-M raw binary file with Ghidra - Niall Cooling
- Understanding the C runtime memory model - Niall Cooling
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| * 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| > 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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 |
NewerOlder