diff options
| -rw-r--r-- | atom.xml | 62 | ||||
| -rw-r--r-- | index.gmi | 3 | ||||
| -rw-r--r-- | log-240211-1.gmi | 200 |
3 files changed, 232 insertions, 33 deletions
@@ -2,7 +2,7 @@ <feed xmlns="http://www.w3.org/2005/Atom"> <id>gemini://l-3.space/</id> <title>l-3.space</title> - <updated>2021-10-06T22:28:53.414000+00:00</updated> + <updated>2024-02-11T12:13:00+00:00</updated> <author> <name>tslil</name> <email>hello@l-3.space</email> @@ -10,63 +10,63 @@ <link href="gemini://l-3.space/atom.xml" rel="self"/> <link href="gemini://l-3.space/" rel="alternate"/> <entry> - <id>gemini://l-3.space/log-201204-1.gmi</id> - <title>Experiencing a classic for the first time: DOOM (1993)</title> - <updated>2020-12-04T17:35:50.643000+00:00</updated> - <link href="gemini://l-3.space/log-201204-1.gmi" rel="alternate"/> + <id>gemini://l-3.space/log-210226-1.gmi</id> + <title>Burnout & the slow climb back</title> + <updated>2021-02-26T17:44:00+00:00</updated> + <link href="gemini://l-3.space/log-210226-1.gmi" rel="alternate"/> </entry> <entry> <id>gemini://l-3.space/log-201206-1.gmi</id> <title>Emacs + gemini ==> automatic footnotes</title> - <updated>2020-12-06T22:30:28.697000+00:00</updated> + <updated>2020-12-06T22:30:00+00:00</updated> <link href="gemini://l-3.space/log-201206-1.gmi" rel="alternate"/> </entry> <entry> - <id>gemini://l-3.space/log-210226-1.gmi</id> - <title>Burnout & the slow climb back</title> - <updated>2021-02-26T17:44:13.020000+00:00</updated> - <link href="gemini://l-3.space/log-210226-1.gmi" rel="alternate"/> - </entry> - <entry> - <id>gemini://l-3.space/log-210317-1.gmi</id> - <title>Hindsight is always 20-20</title> - <updated>2021-03-17T15:28:20.567000+00:00</updated> - <link href="gemini://l-3.space/log-210317-1.gmi" rel="alternate"/> + <id>gemini://l-3.space/log-201204-1.gmi</id> + <title>Experiencing a classic for the first time: DOOM (1993)</title> + <updated>2020-12-04T17:35:00+00:00</updated> + <link href="gemini://l-3.space/log-201204-1.gmi" rel="alternate"/> </entry> <entry> - <id>gemini://l-3.space/log-210415-1.gmi</id> - <title>Modding my Thinkpad x230</title> - <updated>2021-04-15T17:06:04.403000+00:00</updated> - <link href="gemini://l-3.space/log-210415-1.gmi" rel="alternate"/> + <id>gemini://l-3.space/log-201116-1.gmi</id> + <title>Plausible authorship deniability</title> + <updated>2020-11-16T15:49:00+00:00</updated> + <link href="gemini://l-3.space/log-201116-1.gmi" rel="alternate"/> </entry> <entry> <id>gemini://l-3.space/dwm.gmi</id> <title>Why tiling</title> - <updated>2021-04-20T18:22:32.170000+00:00</updated> + <updated>2023-12-23T13:59:51.221083+00:00</updated> <link href="gemini://l-3.space/dwm.gmi" rel="alternate"/> </entry> <entry> + <id>gemini://l-3.space/tak.gmi</id> + <title>Tak</title> + <updated>2023-12-23T13:59:51.267749+00:00</updated> + <link href="gemini://l-3.space/tak.gmi" rel="alternate"/> + </entry> + <entry> <id>gemini://l-3.space/split-keys.gmi</id> <title>Qubes split-SSH</title> - <updated>2021-04-20T18:23:16.337000+00:00</updated> + <updated>2023-12-23T13:59:51.267749+00:00</updated> <link href="gemini://l-3.space/split-keys.gmi" rel="alternate"/> </entry> <entry> - <id>gemini://l-3.space/log-210421-1.gmi</id> - <title>l-3.space is now automatically compiled to the web</title> - <updated>2021-04-21T18:50:32.944000+00:00</updated> - <link href="gemini://l-3.space/log-210421-1.gmi" rel="alternate"/> + <id>gemini://l-3.space/log-211006-1.gmi</id> + <title>Play Tak against a bot over Gemini!</title> + <updated>2021-10-06T22:28:00+00:00</updated> + <link href="gemini://l-3.space/log-211006-1.gmi" rel="alternate"/> </entry> <entry> <id>gemini://l-3.space/log-211004-1.gmi</id> <title>Switched to gmnisrv</title> - <updated>2021-10-06T03:03:30.476000+00:00</updated> + <updated>2021-10-04T01:35:00+00:00</updated> <link href="gemini://l-3.space/log-211004-1.gmi" rel="alternate"/> </entry> <entry> - <id>gemini://l-3.space/log-211006-1.gmi</id> - <title>Play Tak against a bot over Gemini!</title> - <updated>2021-10-06T22:28:53.414000+00:00</updated> - <link href="gemini://l-3.space/log-211006-1.gmi" rel="alternate"/> + <id>gemini://l-3.space/log-240211-1.gmi</id> + <title>Finally an APL for my flying saucer?</title> + <updated>2024-02-11T12:13:00+00:00</updated> + <link href="gemini://l-3.space/log-240211-1.gmi" rel="alternate"/> </entry> </feed> @@ -22,6 +22,7 @@ Contact: hello@l-3.space ## Recent posts +=> gemini://l-3.space/log-240211-1.gmi 2024-02-11 - Finally an APL for my flying saucer? => gemini://l-3.space/log-211006-1.gmi 2021-10-06 - Play Tak against a bot over Gemini! => gemini://l-3.space/log-211004-1.gmi 2021-10-04 - Switched to gmnisrv => gemini://l-3.space/log-210421-1.gmi 2021-04-21 - l-3.space is now automatically compiled to the web @@ -31,8 +32,6 @@ Contact: hello@l-3.space => gemini://l-3.space/log-201206-1.gmi 2020-12-06 - Emacs + gemini ==> automatic footnotes => gemini://l-3.space/log-201204-1.gmi 2020-12-04 - Experiencing a classic for the first time: DOOM (1993) => gemini://l-3.space/log-201116-1.gmi 2020-11-16 - Plausible authorship deniability -=> gemini://l-3.space/dwm.gmi 2020-09-04 - A ramble on DWM and my Qubes-specific glue -=> gemini://l-3.space/split-keys.gmi 2020-09-02 - Keeping keys separate from the VMs that use them ## Indices diff --git a/log-240211-1.gmi b/log-240211-1.gmi new file mode 100644 index 0000000..2d151ab --- /dev/null +++ b/log-240211-1.gmi @@ -0,0 +1,200 @@ +Time-stamp: <2024-02-11 12h13 UTC> + +# Finally an APL for my flying saucer? + +> Let's postpone the why and what of BQN, and address the how + +Suppose that you're interested in using + +=> https://mlochbaum.github.io/BQN/index.html BQN + +but you're troubled by not having any. Well, if you're an Arch linux and using emacs, the following should see you through + +## Building and installing + +### CBQN + +I found the AUR package for CBQN lacking, in that it didn't compile the shared libraries which i wanted for the LSP integration below. To that end, here's what i'm using + +``` +$ cat PKGBUILD +# Maintainer: Firegem <mrfiregem [at] protonail [dot] ch> +pkgname=cbqn-git +pkgver=r2743.8c18fddd +pkgrel=1 +pkgdesc="A BQN implementation in C." +arch=('x86_64' 'i686' 'aarch64' 'arm') +url="https://github.com/dzaima/CBQN" +license=('Apache' 'Boost' 'GPL3' 'MIT') +depends=('glibc' 'libffi') +optdepends=('ttf-bqn386: BQN and APL compatible font') +makedepends=('git' 'clang') +provides=("${pkgname%-git}") +conflicts=("${pkgname%-git}") +source=("${pkgname%-git}::git+${url}.git") +md5sums=('SKIP') + +pkgver() { + cd "${srcdir}/${pkgname%-git}" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +build() { + cd "${srcdir}/${pkgname%-git}" + make PIE='-pie' o3n + make PIE='-pie' shared-o3 +} + +package() { + cd "${srcdir}/${pkgname%-git}" + make PREFIX="${pkgdir}/usr/" install +} +``` + +the changes to build() and package() are minor, but appear to be necessary. + +With that it should be possible to install a functioning BQN compiler and REPL. + +#### BQN LSP + +=> https://git.sr.ht/~detegr/bqnlsp + +Cloning and building this should work now that the above PKGBUILD puts /usr/lib/libcbqn.so onto the file system. Not too much to say here, other than copy the resulting bqnlsp into your path somewhere + +## Emacs integration + +Fortunately for us, all of the hard work has already been done + +``` +(use-package bqn-mode + :ensure t + :defer + :bind (:map bqn-mode-map + ("M-TAB" . expand-abbrev) + ("C-c r r" . bqn-comint-eval-dwim) + ("C-c r b" . bqn-comint-eval-buffer)) + :hook (bqn-mode . (lambda () (eglot-ensure) (bqn-comint-buffer))) + :config + (require 'bqn-keymap-mode) + (require 'bqn-glyph-mode)) +``` + +Note that the first time this is run eglot may ask for the path of bqnlsp, simply provide it. + +### Bonus round: abbrev-mode for entering symbols + +At first when using BQN i found that while i could remember the names of the various glyphs in which i was interested, i could not recall where they were on the "BQN Keyboard"---a task not aided by the fact that i don't use QWERTY⁰. To that end i wrote some abbrev aliases so that i could type the names and press either space or whatever the favourite abbrev trigger was to replace the word with the glyph + +``` +(define-abbrev-table 'bqn-mode-abbrev-table + '( ;; funtions + ("abs" "│") + ("assert" "!") + ("ceiling" "⌈") + ("classify" "⊐") + ("conj" "∧") + ("couple" "≍") + ("deduplicate" "⍷") + ("depth" "≡") + ("deshape" "⥊") + ("dgrade" "⍒") + ("disj" "∨") + ("divide" "÷") + ("drop" "↓") + ("dsort" "∧") + ("enlist" "⋈") + ("find" "⍷") + ("floor" "⌊") + ("group" "⊔") + ("gt" ">") + ("gte" "≥") + ("indices" "/") + ("join" "∾") + ("left" "⊣") + ("length" "≠") + ("lshift" "«") + ("lt" "<") + ("lte" "≤") + ("match" "≡") + ("maximum" "⌈") + ("member" "∊") + ("minimum" "⌊") + ("minus" "¯") + ("modulus" "│") + ("multiply" "×") + ("neg" "¬") + ("neq" "≠") + ("nmatch" "≢") + ("occurrence" "⊒") + ("pair" "⋈") + ("pick" "⊑") + ("power" "⋆") + ("prefix" "↑") + ("range" "↕") + ("recip" "÷") + ("replicate" "/") + ("reshape" "⥊") + ("reverse" "⌽") + ("right" "⊢") + ("root" "√") + ("rshift" "»") + ("select" "⊏") + ("shape" "≢") + ("sign" "×") + ("solo" "≍") + ("span" "¬") + ("sqrt" "√") + ("suffix" "↓") + ("take" "↑") + ("transpose" "⍉") + ("ugrade" "⍋") + ("usort" "∨") + ;; combinators + ("atop" "∘") + ("catch" "⎊") + ("choose" "◶") + ("constant" "˙") + ("lhook" "⊸") + ("over" "○") + ("rhook" "⟜") + ("self" "˜") + ("swap" "˜") + ("under" "⌾") + ("valence" "⊘") + ;; 1-modifiers + ("cell" "˘") + ("each" "¨") + ("fold" "´") + ("insert" "˝") + ("scan" "`") + ("table" "⌜") + ("undo" "⁼") + ;; 2-modifiers + ("depth" "⚇") + ("rank" "⎉") + ("repeat" "⍟") + ;; syntax + ("define" "←") + ("export" "⇐") + ("change" "↩") + ("nothing" "·") + ("sep" "⋄") + ;; constants + ("pi" "π") + ("infty" "∞"))) +``` + +to make this not irritating i found myself also setting + +``` +(setq save-abbrevs 'silently) +``` + +and adding (abbrev-mode) to the bqn-mode hook. + +Happy BQN'ing! + +--- + +⁰ For the curious +=> https://git.sr.ht/~tslil/keyboard |
