From 8cfe656fbb312398244d6f0e820d4f179db3cfc7 Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Thu, 11 Jul 2019 18:10:53 +0200 Subject: Move some things around --- README.md | 10 +- guides/setups/bunsenlabs.md | 52 +++++ guides/setups/dotfiles.md | 22 ++ guides/setups/emacs.md | 42 ++++ guides/setups/fonts.md | 49 +++++ guides/setups/package-management.md | 42 ++++ guides/writing.md | 44 ++++ itches/bulk.md | 43 ++++ itches/emacs/bulk.md | 273 ++++++++++++++++++++++++ itches/emacs/emoji.org | 26 +++ itches/emacs/form-feed.md | 56 +++++ itches/emacs/language-support.org | 59 ++++++ itches/emacs/narrow-lighter.md | 209 ++++++++++++++++++ itches/emacs/unfiltered.org | 8 + personal/itches/bulk.md | 43 ---- personal/itches/emacs/bulk.md | 273 ------------------------ personal/itches/emacs/emoji.org | 26 --- personal/itches/emacs/form-feed.md | 56 ----- personal/itches/emacs/language-support.org | 59 ------ personal/itches/emacs/narrow-lighter.md | 209 ------------------ personal/itches/emacs/unfiltered.org | 8 - personal/setup/bunsenlabs.md | 52 ----- personal/setup/dotfiles.md | 22 -- personal/setup/emacs.md | 42 ---- personal/setup/fonts.md | 49 ----- personal/setup/package-management.md | 42 ---- personal/writing.md | 44 ---- reviews/articles.md | 76 +++++++ reviews/blog-roll.md | 114 ++++++++++ reviews/linux.conf.au-2017.md | 330 +++++++++++++++++++++++++++++ reviews/linux.conf.au-2018.md | 136 ++++++++++++ reviews/mailing-lists.md | 68 ++++++ reviews/talks.md | 81 +++++++ technical/blog-roll.md | 114 ---------- technical/reviews/articles.md | 76 ------- technical/reviews/linux.conf.au-2017.md | 330 ----------------------------- technical/reviews/linux.conf.au-2018.md | 136 ------------ technical/reviews/mailing-lists.md | 68 ------ technical/reviews/talks.md | 81 ------- 39 files changed, 1735 insertions(+), 1735 deletions(-) create mode 100644 guides/setups/bunsenlabs.md create mode 100644 guides/setups/dotfiles.md create mode 100644 guides/setups/emacs.md create mode 100644 guides/setups/fonts.md create mode 100644 guides/setups/package-management.md create mode 100644 guides/writing.md create mode 100644 itches/bulk.md create mode 100644 itches/emacs/bulk.md create mode 100644 itches/emacs/emoji.org create mode 100644 itches/emacs/form-feed.md create mode 100644 itches/emacs/language-support.org create mode 100644 itches/emacs/narrow-lighter.md create mode 100644 itches/emacs/unfiltered.org delete mode 100644 personal/itches/bulk.md delete mode 100644 personal/itches/emacs/bulk.md delete mode 100644 personal/itches/emacs/emoji.org delete mode 100644 personal/itches/emacs/form-feed.md delete mode 100644 personal/itches/emacs/language-support.org delete mode 100644 personal/itches/emacs/narrow-lighter.md delete mode 100644 personal/itches/emacs/unfiltered.org delete mode 100644 personal/setup/bunsenlabs.md delete mode 100644 personal/setup/dotfiles.md delete mode 100644 personal/setup/emacs.md delete mode 100644 personal/setup/fonts.md delete mode 100644 personal/setup/package-management.md delete mode 100644 personal/writing.md create mode 100644 reviews/articles.md create mode 100644 reviews/blog-roll.md create mode 100644 reviews/linux.conf.au-2017.md create mode 100644 reviews/linux.conf.au-2018.md create mode 100644 reviews/mailing-lists.md create mode 100644 reviews/talks.md delete mode 100644 technical/blog-roll.md delete mode 100644 technical/reviews/articles.md delete mode 100644 technical/reviews/linux.conf.au-2017.md delete mode 100644 technical/reviews/linux.conf.au-2018.md delete mode 100644 technical/reviews/mailing-lists.md delete mode 100644 technical/reviews/talks.md diff --git a/README.md b/README.md index c2ce2d3..3b00a20 100644 --- a/README.md +++ b/README.md @@ -33,10 +33,10 @@ that makes them… gestating? [a bunch of things]: personal/interests.md -[blogging bandwagon]: technical/blog-roll.md -[list of itches]: personal/itches.md -[trying to keep up with my industry]: technical/reviews/ -[screwing around with my computers]: personal/setup/ -[lots of silly things]: personal/entertainment.md +[blogging bandwagon]: reviews/blog-roll.md +[list of itches]: itches/ +[trying to keep up with my industry]: reviews/ +[screwing around with my computers]: guides/setups/ +[lots of silly things]: reviews/entertainment/ [fuckload]: http://www.imdb.com/title/tt1131729/quotes/qt0536137 diff --git a/guides/setups/bunsenlabs.md b/guides/setups/bunsenlabs.md new file mode 100644 index 0000000..523fdaa --- /dev/null +++ b/guides/setups/bunsenlabs.md @@ -0,0 +1,52 @@ +Things I always tweak after installing a Bunsenlabs system. + +# Keyboard + +Cf. keyboard(5): + +- add `ctrl:nocaps` in /etc/default/keyboard +- run `udevadm trigger --subsystem-match=input --action=change` +- run `setupcon` in a TTY + +# Desktop + +## Conky + +- changed window type to "desktop" so that W-d does not hide Conky +- see dotfiles + +## ClipIt + +- disable hotkeys + +## Openbox + +### `rc.xml` + +- comment A-m and A-r out +- undecorate all windows: + + ``` xml + + no + + ``` + +### WM preferences + +- appearance: uncheck "windows retain a border when undecorated" +- desktops: 4 + +## tint2 + +- remove launcher and exit panel items +- add date (time2) + +## Calendar + +Make weeks begin on Monday by using the British locale: + +- uncomment `en_GB.UTF-8 UTF-8` in /etc/locale.gen +- `sudo locale-gen` +- `force_lang = en_GB.utf8` in `~/.config/gsimplecal/config` + diff --git a/guides/setups/dotfiles.md b/guides/setups/dotfiles.md new file mode 100644 index 0000000..c51f4cb --- /dev/null +++ b/guides/setups/dotfiles.md @@ -0,0 +1,22 @@ +Some day all of these will live in my dotfiles repository. + +Until then… + +# `~/.bash_aliases` + +``` bash +# Make Bash expand aliases before running sudo. +alias sudo='sudo ' +``` + +# `.gitconfig` + +``` ini +[user] + name = … + email = … +[alias] + root = rev-parse --show-toplevel + forget = update-index --assume-unchanged + remember = update-index --no-assume-unchanged +``` diff --git a/guides/setups/emacs.md b/guides/setups/emacs.md new file mode 100644 index 0000000..53fb75f --- /dev/null +++ b/guides/setups/emacs.md @@ -0,0 +1,42 @@ +# Compiling + +This script seems to handle most cases I care about: + +- a freshly cloned copy of the repository, +- a repository where compilation has already happened, +- a repository where I want to change the `configure` flags… + +``` bash +#!/bin/bash + +set -eux + +MAKE="make -j$(nproc --all)" +CONFIGURE_FLAGS="--with-xwidgets --with-cairo" + +if ! test -f Makefile +then + ${MAKE} configure +fi + +check-config () +{ + if ! test -f src/config.h + then + return 1 + fi + + local pattern='#define EMACS_CONFIG_OPTIONS "'${CONFIGURE_FLAGS}'"' + grep "${pattern}" src/config.h +} + +if ! check-config +then + ./configure ${CONFIGURE_FLAGS} +fi + +if ! ${MAKE} +then + ${MAKE} bootstrap +fi +``` diff --git a/guides/setups/fonts.md b/guides/setups/fonts.md new file mode 100644 index 0000000..30e7739 --- /dev/null +++ b/guides/setups/fonts.md @@ -0,0 +1,49 @@ +Fonts I find useful, plus messy configuration details. + +# Symbola + +Symbola seems to cover most characters I care about (although it does +not handle fancy emoji ligatures), and new versions are released +fairly soon after each revision of the Unicode standard. + +Since distributions may not include the latest version, I often get it +directly from [the author's website](http://users.teilar.gr/~g1951d/). + +# Installing fonts with Fontconfig + +Gee, it sure is convenient to be able to install new fonts simply by +dropping them in `~/.fonts` and running `fc-cache`! + +`/etc/fonts/fonts.conf`: + + + ~/.fonts + +😨 + +Bunsenlabs symlinks `~/.fonts` to `~/.local/share/fonts`, but this +path is not mentioned anywhere in `/etc/fonts`. What's the deal? + +`/etc/fonts/fonts.conf`: + + fonts + +fonts-conf(5): + +> ## `` +> +> This element contains a directory name which will be scanned for +> font files to include in the set of available fonts. If 'prefix' is +> set to "xdg", the value in the `XDG_DATA_HOME` environment variable +> will be added as the path prefix. please see XDG Base Directory +> Specification for more details. + +[XDG Base Directory Specification](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html): + +> `$XDG_DATA_HOME` defines the base directory relative to which user +> specific data files should be stored. If `$XDG_DATA_HOME` is either +> not set or empty, a default equal to `$HOME`/.local/share should be +> used. + +Seems legit then. + diff --git a/guides/setups/package-management.md b/guides/setups/package-management.md new file mode 100644 index 0000000..e6afc7a --- /dev/null +++ b/guides/setups/package-management.md @@ -0,0 +1,42 @@ +Here are some things that I do often enough that I want to remember +how to do them properly, yet rarely enough that I will probably forget +this stuff if I do not write it down. + +# Package managers + +## APT + +Add deb-src repositories to get: + +- `changelog` +- `build-dep` +- `source` + +# Installing stuff under `$HOME` + +E.g. pandoc (compiled from source tarball with stack because there is +no 32-bit release) and ripgrep: + +- programs: + - install in `~/.local/bin` + - add this folder to `$PATH` (in `.profile` and `.xsessionrc`) + +- manpages: + - install in `~/.local/share/man/man1` + - in `~/.manpath`: + + MANPATH_MAP ~/.local/bin ~/.local/share/man + + - run `mandb --user-db` + +- bash completion scripts: + - install in `~/.local/share/bash-completion` + - in `~/.bash_completion` (sourced by + `/usr/share/bash-completion/bash_completion`): + + ``` bash + for f in ~/.local/share/bash-completion/* + do + [ -f "$f" ] && . "$f" + done + ``` diff --git a/guides/writing.md b/guides/writing.md new file mode 100644 index 0000000..de68ed4 --- /dev/null +++ b/guides/writing.md @@ -0,0 +1,44 @@ +I worry a lot about how efficient my writing is. I want to keep it as +straightforward (maximizing signal-to-noise ratio) and accurate +(citing sources and assumptions) as I can. + +Since I keep catching myself making the same mistakes, and I do not +have automated tools to warn me about them yet, I figured I should +write down all the things I want to watch out for. + +# Decruftification + +## Sentences + +- Watch out for verbs which hide the action (e.g. try, allow). +- Use simpler words as long as they are not more vague. + +## Mails + +- Pick your battles: people only have time for so many subjects. + Focus on symptomatic relief; hint at systemic problems but wait + until prompted before ranting. +- Tricks to make mails more digestible: + - condense the point(s) into a tl;dr; + - move details (investigation, alternatives, rationale) into + footnotes or attachments; + - spin new threads. + +# Logic + +When expressing causation, check that all causes have been explicitly +stated. Be wary of assumptions^[I felt like adding "protect yourself +against misquotations", but those will probably happen anyway]. + +Conversely, if C can be deduced from A alone, consider rewriting +"since A and B, C" into "since A, C". Unnecessary Bs can be +detrimental to the discussion and make it to go off-topic; beware: + +- humorous overstatements that might be taken seriously; +- subconscious attempts at shoehorning a point that feels essential + but is not actually relevant. + +# Resources + +- [IEEE's "Write Clearly and Concisely"](http://sites.ieee.org/pcs/communication-resources-for-engineers/style/write-clearly-and-concisely/) +- [Gitlab's Technical Writing Handbook](https://about.gitlab.com/handbook/product/technical-writing/) diff --git a/itches/bulk.md b/itches/bulk.md new file mode 100644 index 0000000..ce646ca --- /dev/null +++ b/itches/bulk.md @@ -0,0 +1,43 @@ +# XFCE + +- xfwm: hide/remove titlebar/decorations + +# Spell checkers + +- update dictionaries? + +# Conky + +Cannot use `${eval $${somefunc ${gw_iface}}}` more than once: + + conky.text = [[ + ${eval ${gw_iface}} + ${eval ${gw_iface}} + ]] + ⇒ + wlp20 + (null) + +See [GitHub issue][conky-issue-461]. Partially fixed by this [pull +request][conky-pull-571], which allows using both `*speedf` functions +together; `*graph` functions still trigger the bug though, e.g. with: + + ${goto 20}${upspeedf ${gw_iface}}KiB/s${goto 90}↑${goto 100}${upspeedgraph ${gw_iface} 12,0 678b8b ffffff -t} + ${goto 20}${downspeedf ${gw_iface}}KiB/s${goto 90}↓${goto 100}${downspeedgraph ${gw_iface} 12,0 678b8b ffffff -t} + +[conky-issue-461]: https://github.com/brndnmtthws/conky/issues/461 +[conky-pull-571]: https://github.com/brndnmtthws/conky/pull/571 + +# Bunsenlabs + +- use https for sources.list files +- some manpages for `bl-…` utilities feature a buggy DESCRIPTION + section, e.g. `bl-kb`: + + DESCRIPTION + Traceback (most recent call last): + File "./bin/bl-kb", line 50, in + + from lxml import etree + + ImportError: No module named 'lxml' diff --git a/itches/emacs/bulk.md b/itches/emacs/bulk.md new file mode 100644 index 0000000..2de60f4 --- /dev/null +++ b/itches/emacs/bulk.md @@ -0,0 +1,273 @@ +# Emacs + +- center/top point when + - moving to text/tag search hit + - going to man page section + - opening eww on an anchor + - visiting a function from its Help buffer +- make font-lock stop background at fill-column or max(len(line) for + line in paragraph) rather than window-width when text spans >1 lines +- shell-mode + - add faces instead of reusing font-lock-{comment,string} + - understand `autocd` and `cd !$` + - use Bash completions (e.g. `ls TAB` in a folder with one file) +- [.dir-locals changed priorities][bug#30008] between subfolder and + major mode from 25 to 26 +- eshell: `ls --group-directories-first` does not color folders +- eww, gnus-article: adapt filling to window width changes +- scroll-lock-mode + - cursor stuck on lines wrapped by visual-line-mode + - cursor stuck on lines with 😛 + - scroll when going down newline with forward-… +- matching-paren analysis fails: `;; (here is\n;; a comment)` +- some modes redefine C-M-h, which makes this binding hard to + override; could mark-defun consult functions/values exposed by major + modes instead? +- Man-mode: make isearch skip end-of-line hyphens +- when opening `.gpg` files in a TTY, some characters (e.g. TAB) are + swallowed by Emacs instead of being forwarded to the gpg prompt; + these characters are then inserted in the decrypted file's buffer + (see `epa-file-insert-file-contents`) +- let TRAMP fetch Google Drive credentials from .authinfo.gpg +- icomplete's C-j does not choose the first completion as advertised + on empty input; it chooses ".", which AFAICT comes from the fact + that icomplete-exhibit calls completion-pcm--filename-try-filter + while icomplete-force-complete-and-exit simply calls + minibuffer-force-complete-and-exit + - likewise, if a folder contains foo.c and foo.o, "C-x C-f foo" + hides foo.o, yet C-j completes to foo.o +- calendar uses default X resources when run in its own frame; see + `calendar-frame-parameters`, `x-handle-named-frame-geometry`, + `(make-frame '((name . "")))` vs `(make-frame '((title . "")))` +- use compilation-mode-line-… faces for compilation-num-… indicators +- "é" is not erased with a single DEL stroke, despite [Unicode + conventions] +- sort tar archive members by name; serving suggestion: + + ``` elisp + (defun my/tar-sort (info) + (sort info (lambda (a b) (string< (tar-header-name a) (tar-header-name b))))) + ;; Apply to tar-parse-info in tar-summarize-buffer. + ``` + +- add a command or minor mode to highlight marks; serving suggestion: + + ``` elisp + (save-excursion + (dolist (m mark-ring) + (goto-char (marker-position m)) + (pulse-momentary-highlight-region (point) (point-at-eol)) + (sit-for 0.1))) + ``` + +- StackOverflow-like suggestions when reporting bugs +- match data vs. `:eval` during redisplay: cf. [bug#31586] +- make vc honour `.gitignore` so that `project-find-file` completion + is not cluttered with ignored files +- in a folder with a .git folder and a .gitignore file, + - `C-x C-f .gi TAB` completes to .gitignore + - `C-x C-f .git TAB` says "not unique" +- add some Custom machinery to save additions/removals to list + variables; as things stand, once I add/remove items and save the + variable, I miss out on changes to the variable's default value: + e.g. `git-commit-setup-hook` recently added `bug-reference-mode`, + but I never realized it because I customized the hook to add some + personal functions +- completions in python.el's comint buffer get confused when + readline's completion-prefix-display-length is set: candidates + become elided, maybe python-shell-completion-native-get-completions + is not ready for that? +- some bindings advertised by `describe-mode` in texinfo-mode are + invalid: + - `C-c C-s` runs `Texinfo-insert-node` instead of + `texinfo-show-structure` + - `C-c C-e` runs `Texinfo-environment` instead of being a prefix + command for `texinfo-format-{buffer,region}` +- [bug#31666]: visual-line-mode adds newlines before words that end up + being split anyway +- `gnus-group-make-group` uses `message-y-or-n-p`, which relies on + `message-talkative-question`; the message might be too wide for the + temporary buffer where it is displayed, and `y-or-n-p` prevents the + user from moving to the buffer and looking at the rest of the + message. + +[bug#30008]: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=30008 +[bug#31586]: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31586 +[bug#31666]: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31666 +[Unicode conventions]: https://lists.gnu.org/archive/html/emacs-devel/2018-07/msg00961.html + +## Dired + +- allow "columns" to be toggled; more specifically, make it possible + to hide ownership, permissions, number of hard links… + +- make the filename stand out + +- `% r` does not support some `\` constructs (`\#`, `\,`) + +- add a face for broken symbolic links + +## ERC + +- move timestamp to a better position (see `stamp` module) +- play well with whitespace-mode + +## Org + +- dissociate sub- and super-script fontification from everything else + in org-toggle-pretty-entities + +- org-clocktable trips on DST: + + ``` org + #+BEGIN: clocktable :scope file :maxlevel 2 :step day :stepskip0 t :tstart "[2018-10-15]" :tend "[2018-11-15]" + #+END: + + * foo + :LOGBOOK: + CLOCK: [2018-10-26 Fri 08:00]--[2018-10-26 Fri 17:00] => 9:00 + :END: + + * bar + :LOGBOOK: + CLOCK: [2018-10-29 Mon 08:00]--[2018-10-29 Mon 17:00] => 9:00 + :END: + ``` + +- make org-ctrl-c-ctrl-c call `(org-clock-update-mode-line t)` when + point is on the clocked-in heading + +- new command `org-clock-in-late` to clock out x minutes ago from + previous task, and clock in x ago on task at point + +## read-passwd + +- prevent kills from ending up in the clipboard +- add command to temporarily reveal password + +## whitespace-mode + +- skip line/wrap-prefix variables and properties + +- highlights the adaptive-wrap prefix, although weirdly enough the + whitespace *faces* are not applied + +- in org-indent-mode, adds a spurious (unfaced) space marker before + paragraphs; somehow transient-mark-mode knows not to highlight this + space, maybe the answer lies there + +## Ellipses customization + +Make ellipses for "invisible" text easily customizable (src/xdisp.c). +Make them default to "…" when `(char-displayable-p ?…)`. + +Use-cases: + +- ibuffer truncation +- hideshow +- outline (org) +- rgrep +- magit-process + +## xref + +- search gz-compressed Elisp files when calling `xref-find-references` + from an Elisp buffer: from a user perspective, if + `xref-find-definitions` can visit those files, + `xref-find-references` should work too (even though technically they + don't rely on the same mechanisms) + +- defun-building macros seem hard to understand for xref: e.g. `M-.` + on `rg` does not jump to `rg-define-search rg` + +## External libraries + +### adaptive-wrap + +- a commented-out line with no space between the comment delimiter and + its text will get padded with the comment delimiter: + + ;(some very long line) + ;; ⇒ wrapped with adaptive-wrap-extra-indent set to 4: + ;(some very + ;;;;;long line) + +### debbugs + +- asynchronous bug fetching + +### magit + +- customize current-tag function so that one can add `--first-parent` +- prevent section highlight overlay from hiding tag face background +- when quitting ediff conflict resolution, the "save buffer" prompt is + out of focus, one must ALT-TAB out of the ediff control panel first + (noticed in Emacs 27; 25.1 works fine); possible culprits: + - magit + - ediff + - smerge + - yes-or-no-p + - read-answer +- make status buffer understand and display `typechange` e.g. when + replacing a replacing a regular file with a symlink +- when ignoring a file in a subdirectory, magit attempts to + `git add .gitignore` (i.e. toplevel `.gitignore`), which fails +- if the `-n` log option is set in the status buffer, the "unpulled + from origin/…" section shows an invalid commit count if the `-n` + limit is lower than the actual number of commits +- for repos with dozens of old branches, it would be nice to have a + way to hide or distinguish "stale" branches from active ones, a la + + +#### transient + +- cannot use the full domain of `--find-renames` (e.g. 1%) +- cannot call transient-save for all transients (e.g. would like to + always `fetch --prune`) + +### markdown-mode + +- support [shortcut reference links] +- move point past header after C-c C-t !/@ +- update sub-superscript regex to allow L~i+1~ +- make justification work with indented blockquotes +- add "ini ↦ conf-mode" to markdown-code-lang-modes + +[shortcut reference links]: http://spec.commonmark.org/0.27/#shortcut-reference-link + +### rg-mode + +- make -project DTRT in dired + +### page-break-lines + +- borked in magit-diff + +### diff-hl + +- colored fringe line is discontinued on lines featuring faces with + heights greater than 1 + + ``` shell + $ git init + $ echo "* foo" > README.org + $ git add README.org ; git commit -m README.org README.org + $ echo "* bar" >> README.org + $ echo "* baz" >> README.org + ``` + + ``` elisp + (load-file "…/diff-hl.el") + (global-diff-hl-mode) + (set-face-attribute 'org-level-1 nil :height 1.2) + (find-file "README.org") + ``` + +- in Org buffers with org-indent-mode, lines before point will "dance" + around while editing, i.e. while I type, they stick to the left + margin, then when I stop typing, they become indented again. + +### wgrep + +`C-c C-d` (`wgrep-mark-deletion`) could move to the next line, just +like `d` moves to the next line in Dired buffers. diff --git a/itches/emacs/emoji.org b/itches/emacs/emoji.org new file mode 100644 index 0000000..a66ec87 --- /dev/null +++ b/itches/emacs/emoji.org @@ -0,0 +1,26 @@ +Support for color fonts [[https://lists.gnu.org/archive/html/emacs-devel/2019-04/msg00996.html][has landed]] on version 27.0 (master). +Remaining issues: + +* DONE Fix font-hinting =--with-cairo= + +Bug#35781 fixed by Yamamoto Mitsuharu. + +* TODO Check whether combining sequences work + +For example:, regional flags, ZWJ sequences from + +- ZWJ sequences from + : + - 🧟‍♂️, 🧟‍♀️ + - 🐕‍🦺 +- regional indicators: 🇪🇺, 🇫🇷 + +* TODO Add a convenient way to set a font for all emojis + +AFAICT there is no convenient way to =set-fontset-font= e.g. Noto + Color Emoji for "all emojis"; valid TARGETs for this function are + - single characters + - character ranges + - scripts, as defined in =script-representative-chars= + - charsets + - nil = any character not already covered by another font-spec diff --git a/itches/emacs/form-feed.md b/itches/emacs/form-feed.md new file mode 100644 index 0000000..61fd48b --- /dev/null +++ b/itches/emacs/form-feed.md @@ -0,0 +1,56 @@ +# Better out-of-the-box display for FORM FEED + +By default, FORM FEED is displayed as a dumb `^L` glyph. This is +surprising considering it shows up in so many places: + +- Emacs source files (C and Elisp), +- help buffers: + - `describe-mode`, + - `describe-bindings`, + - `view-emacs-news`, +- log buffers: + - `*Compile-Log*`, + - `*Dired log*`, +- … + +You can even see it in source files of other GNU projects, like GCC. + +"Pages" are important enough to have their own navigation and +narrowing commands, yet their default delimiter is displayed as an +unassuming control character. + +I like the way form feeds are displayed with [`page-break-lines`]; +magit's `show-lines` blaming style achieves a similar look. + +Having this kind of display by default would make it more obvious that +this character has actual navigation semantics; as it stands, it looks +no different from some stray CARRIAGE RETURN. + +This hypothetical thin-line display could be re-used by e.g.: + +- `describe-symbol`, which uses the following method to visually break + up multiple symbol definitions: + + ``` lisp + (insert "\n\n" + (eval-when-compile + (propertize "\n" 'face '(:height 0.1 :inverse-video t))) + "\n") + ``` + +- Custom buffers, where sections are delimited visually with a + 999-character wide underlined space. + +(See [emacs-devel][emacs-devel-thin-line] for a use-case recap.) + +Full disclosure +: This reflection started because moving over this underlined space + with `truncate-lines` on causes the screen to jump horizontally. + This specific problem should be fixable without dragging FORM FEED + display into the discussion, but I feel like the latter is the + more interesting issue ([who on Earth] enables `truncate-lines` by + default anyway). + +[`page-break-lines`]: https://github.com/purcell/page-break-lines +[emacs-devel-thin-line]: https://lists.gnu.org/archive/html/emacs-devel/2019-05/msg00268.html +[who on Earth]: https://gitlab.com/peniblec/dotfiles/blob/master/.emacs-custom.el diff --git a/itches/emacs/language-support.org b/itches/emacs/language-support.org new file mode 100644 index 0000000..8d007d3 --- /dev/null +++ b/itches/emacs/language-support.org @@ -0,0 +1,59 @@ +* Python +** Fix builtin/keyword fontification for Python 3 +E.g. =print= became a builtin. +*** TODO add fontification tests +*** TODO have dedicated font-lock styles for Python 2, 3 and "mixed" +Default to "mixed" (rely on tests to ensure user-visible change). +**** TODO create font-lock styles +**** TODO create variable to choose style +Users could customize it or set it wiht directory-local variables. +*** TODO add heuristic to pick the "right" style +** Fontify f-strings +E.g. =f'an {expression} that should be highlighted'=. + + +* Shell scripts +** Fix builtin/keyword fontification +- =continue= and =break= are /builtins/. +** Fontify variables within strings +E.g. ="an ${expression} that should be highlighted"=. +** Do not highlight single-quoted command substitutions +E.g. ='this $(call) should not be highlighted'=. +** Fix indentation on continuation lines +#+BEGIN_SRC shell +# cf +# - electric-indent-post-self-insert-function +# - indent-according-to-mode +# - indent-line-function => smie-indent-line +# - smie-indent-functions +# - smie-indent-exps +# => calls smie-backward-sexp, which does not skip over ${foo} +foobar \ + indentis4 +foo_bar \ + indentisstill4 +${foo}bar \ + indentisfoobar +#+END_SRC + + +* Makefile +** Recognize [[http://austingroupbugs.net/view.php?id=330][POSIX "immediate-expansion"]] operator ~::=~ + + +* Assembly +** =C-o= inserts a tab despite =indent-tabs-mode= being nil +This seems to come from the mode setting =fill-prefix=. The mode also +does not adhere to the "~RET~ = smart newline, ~C-j~ = dumb linefeed" +convention for no good reason AFAICT. + + +* TeX +** electric-pair-mode and $inline math$ +e-p-m inserts a closing $ after point, but inserts a new pair instead +of overwriting when pressing $ again. +** AUCTeX +*** electric-pair-mode does not work +**** pressing ="= on active region does not surround it with quotes even with electric-pair-mode +TeX-insert-quote erases the region and inserts =``= instead. +**** pressing =$= inserts a single $ diff --git a/itches/emacs/narrow-lighter.md b/itches/emacs/narrow-lighter.md new file mode 100644 index 0000000..e5987b8 --- /dev/null +++ b/itches/emacs/narrow-lighter.md @@ -0,0 +1,209 @@ +# Make " Narrow" lighter customizable + +The " Narrow" string comes from `src/xdisp.c:decode_mode_spec`: + +``` c +case 'n': + if (BUF_BEGV (b) > BUF_BEG (b) || BUF_ZV (b) < BUF_Z (b)) + return " Narrow"; +``` + +This is probably just a matter of returning the contents of a Lisp +variable instead of this constant string. + +TODO: + +1. get the string value of a variable in C +2. define a customizable string variable +3. write a news entry +4. write a patch +5. extra credits: display string properties + +## Get the string value of a variable in C + +`decode_mode_spec` has some relevant snippets: + +- Given a `Lisp_Object obj`, `SSDATA(obj)` gives the string value as a + `char*`. + +- How to get a variable's `Lisp_Object`? + - `BVAR` works for buffer-local variables + - `V${lispname//-/_}` + +## Define a customizable string variable + +### Defining variables visible to C code + +The C macro `DEFVAR_LISP(string-name, field-name)` does the following: + + define a static `Lisp_Objfwd` variable v + get the address of globals._f##field-name &f + + defvar_lisp(v, string-name, &f) + +As explained in the comments above `DEFVAR_LISP`, `globals` is a +global variable defined in `globals.h`, which is "auto-generated by +make-docfile" and exposes fields, `#define`s and `Lisp_Object`s for +every global variable. + +make-docfile (`lib-src/make-docfile.c`) takes C files as input and +searches all occurences of `^ +DEFSYM[ \t(]`, `^ +DEFVAR_[ILB]` or +`^DEFU`, analyses what comes after and generates appropriate +definitions for `globals.h`. + +`defvar_lisp` allocates a symbol using `Fmake_symbol`. + +### Making it customizable + +`lisp/cus-start.el` defines customizable properties of symbols defined +by C code. + +AFAICT, there is no need to assign the default value right after +defining the variable with `DEFVAR_LISP`: e.g. `shell-file-name` is +`DEFVAR_LISP`ed in `src/callproc.c` and its default value is set in… +Mmm. Not in `cus-start.el`. There is this snippet in +`callproc.c:init_callproc`: + + ``` c +sh = getenv ("SHELL"); +Vshell_file_name = build_string (sh ? sh : "/bin/sh"); + ``` + +But when starting with `SHELL=rofl emacs -Q`, Custom says that the +value "has been changed outside Customize". Changed from what to +what? + +`cus-start.el` may contain a hint: + +``` elisp +;; Elements of this list have the form: +;; … +;; REST is a set of :KEYWORD VALUE pairs. Accepted :KEYWORDs are: +;; :standard - standard value for SYMBOL (else use current value) +;; … +``` + +Except that nope, this does not work. Giving `:standard " Narrow"` +and looking at the variable in Custom yields + + narrow-lighter: nil + [State]: CHANGED outside Customize. (mismatch) + +A better example might be `overlay-arrow-string`, whose default value +is set right after `DEFVAR_LISP` by calling `build_pure_c_string`. + +Why `build_pure_c_string` and not `build_string`? From "(elisp) Pure +Storage": + +> Emacs Lisp uses two kinds of storage for user-created Lisp objects: +> “normal storage” and “pure storage”. Normal storage is where all +> the new data created during an Emacs session are kept (see Garbage +> Collection). Pure storage is used for certain data in the preloaded +> standard Lisp files—data that should never change during actual use +> of Emacs. +> +> Pure storage is allocated only while ‘temacs’ is loading the +> standard preloaded Lisp libraries. In the file ‘emacs’, it is +> marked as read-only (on operating systems that permit this), so that +> the memory space can be shared by all the Emacs jobs running on the +> machine at once. + +"(elisp) Building Emacs" explains that "temacs" is the minimal Elisp +interpreter built by compiling all C files in `src/`; temacs then +loads Elisp sources and creates the "emacs" executable by dumping its +current state into a file. + +## Debug stuff + +### Unicode characters represented as octal sequences + +Trying to customize the new variable to any string with non-ASCII +characters fails: they show up as sequences of backslash-octal codes. +For some reason they show up fine in the Help and Custom buffers. + +Things to investigate: + +1. Should the `Lisp_Object` be created with something other than + `build_pure_c_string`? 🙅 +2. What does the code calling `decode_mode_spec` do with the returned + string? **🎉** +3. (Does `SSDATA` make some transformation before returning the + string? 🤷) +4. (Should a specialized Custom setter be defined? 🤷) + +#### Should the `Lisp_Object` be created with something other than `build_pure_c_string`? + +Maybe this would work? + +``` c +Vnarrow_lighter = make_multibyte_string(" Narrow", strlen(" Narrow"), + strlen(" Narrow)"); +``` + +That looks too ugly though, let's try something else. + +Maybe `STRING_SET_MULTIBYTE(Vnarrow_lighter)` would help? + +*compiles and tries* + +… Nope, it does not. + +#### What does the code calling `decode_mode_spec` do with the returned string? + +``` c +spec = decode_mode_spec (it->w, c, field, &string); +multibyte = STRINGP (string) && STRING_MULTIBYTE (string); +``` + +*slowly turns around* + +*finds `string` standing right there with a blank stare* + +Gah! How long have you been there? + +``` c +/* Return a string for the output of a mode line %-spec for window W, + generated by character C. […] Return a Lisp string in + *STRING if the resulting string is taken from that Lisp string. + […] */ +static const char * +decode_mode_spec (struct window *w, register int c, int field_width, + Lisp_Object *string) +{ + Lisp_Object obj; + /* … */ + obj = Qnil; + *string = Qnil; + + switch (c) + { + /* … */ + } + + if (STRINGP (obj)) + { + *string = obj; + return SSDATA (obj); + } + else + return ""; +} +``` + +Alright then: + +``` c +case 'n': + if (BUF_BEGV (b) > BUF_BEG (b) || BUF_ZV (b) < BUF_Z (b)) + obj = Vnarrow_lighter; + break; +``` + +### Why do string properties not show up? + +🤷 + +## Extra credit + +Maybe it would be simpler to have the narrowing lighter work like the +" Compiling" lighter (cf. `compilation-in-progress` variable), i.e. adding an entry to `minor-mode-alist`. diff --git a/itches/emacs/unfiltered.org b/itches/emacs/unfiltered.org new file mode 100644 index 0000000..8bc9b52 --- /dev/null +++ b/itches/emacs/unfiltered.org @@ -0,0 +1,8 @@ +* eglot + pyls: how to add myproject/src to path so that definition/completion works? +* rg/deadgrep: add user-customizable predicate to control default +--no-ignore (eg nil by default = don't add the flag; or user-function +to add it whenever project-root is ~) +* add "fr10x" to quail-keyboard-layout-alist +then try to figure out how to input dot and comma with russian-computer input method (with describe-input-method) + + diff --git a/personal/itches/bulk.md b/personal/itches/bulk.md deleted file mode 100644 index ce646ca..0000000 --- a/personal/itches/bulk.md +++ /dev/null @@ -1,43 +0,0 @@ -# XFCE - -- xfwm: hide/remove titlebar/decorations - -# Spell checkers - -- update dictionaries? - -# Conky - -Cannot use `${eval $${somefunc ${gw_iface}}}` more than once: - - conky.text = [[ - ${eval ${gw_iface}} - ${eval ${gw_iface}} - ]] - ⇒ - wlp20 - (null) - -See [GitHub issue][conky-issue-461]. Partially fixed by this [pull -request][conky-pull-571], which allows using both `*speedf` functions -together; `*graph` functions still trigger the bug though, e.g. with: - - ${goto 20}${upspeedf ${gw_iface}}KiB/s${goto 90}↑${goto 100}${upspeedgraph ${gw_iface} 12,0 678b8b ffffff -t} - ${goto 20}${downspeedf ${gw_iface}}KiB/s${goto 90}↓${goto 100}${downspeedgraph ${gw_iface} 12,0 678b8b ffffff -t} - -[conky-issue-461]: https://github.com/brndnmtthws/conky/issues/461 -[conky-pull-571]: https://github.com/brndnmtthws/conky/pull/571 - -# Bunsenlabs - -- use https for sources.list files -- some manpages for `bl-…` utilities feature a buggy DESCRIPTION - section, e.g. `bl-kb`: - - DESCRIPTION - Traceback (most recent call last): - File "./bin/bl-kb", line 50, in - - from lxml import etree - - ImportError: No module named 'lxml' diff --git a/personal/itches/emacs/bulk.md b/personal/itches/emacs/bulk.md deleted file mode 100644 index 2de60f4..0000000 --- a/personal/itches/emacs/bulk.md +++ /dev/null @@ -1,273 +0,0 @@ -# Emacs - -- center/top point when - - moving to text/tag search hit - - going to man page section - - opening eww on an anchor - - visiting a function from its Help buffer -- make font-lock stop background at fill-column or max(len(line) for - line in paragraph) rather than window-width when text spans >1 lines -- shell-mode - - add faces instead of reusing font-lock-{comment,string} - - understand `autocd` and `cd !$` - - use Bash completions (e.g. `ls TAB` in a folder with one file) -- [.dir-locals changed priorities][bug#30008] between subfolder and - major mode from 25 to 26 -- eshell: `ls --group-directories-first` does not color folders -- eww, gnus-article: adapt filling to window width changes -- scroll-lock-mode - - cursor stuck on lines wrapped by visual-line-mode - - cursor stuck on lines with 😛 - - scroll when going down newline with forward-… -- matching-paren analysis fails: `;; (here is\n;; a comment)` -- some modes redefine C-M-h, which makes this binding hard to - override; could mark-defun consult functions/values exposed by major - modes instead? -- Man-mode: make isearch skip end-of-line hyphens -- when opening `.gpg` files in a TTY, some characters (e.g. TAB) are - swallowed by Emacs instead of being forwarded to the gpg prompt; - these characters are then inserted in the decrypted file's buffer - (see `epa-file-insert-file-contents`) -- let TRAMP fetch Google Drive credentials from .authinfo.gpg -- icomplete's C-j does not choose the first completion as advertised - on empty input; it chooses ".", which AFAICT comes from the fact - that icomplete-exhibit calls completion-pcm--filename-try-filter - while icomplete-force-complete-and-exit simply calls - minibuffer-force-complete-and-exit - - likewise, if a folder contains foo.c and foo.o, "C-x C-f foo" - hides foo.o, yet C-j completes to foo.o -- calendar uses default X resources when run in its own frame; see - `calendar-frame-parameters`, `x-handle-named-frame-geometry`, - `(make-frame '((name . "")))` vs `(make-frame '((title . "")))` -- use compilation-mode-line-… faces for compilation-num-… indicators -- "é" is not erased with a single DEL stroke, despite [Unicode - conventions] -- sort tar archive members by name; serving suggestion: - - ``` elisp - (defun my/tar-sort (info) - (sort info (lambda (a b) (string< (tar-header-name a) (tar-header-name b))))) - ;; Apply to tar-parse-info in tar-summarize-buffer. - ``` - -- add a command or minor mode to highlight marks; serving suggestion: - - ``` elisp - (save-excursion - (dolist (m mark-ring) - (goto-char (marker-position m)) - (pulse-momentary-highlight-region (point) (point-at-eol)) - (sit-for 0.1))) - ``` - -- StackOverflow-like suggestions when reporting bugs -- match data vs. `:eval` during redisplay: cf. [bug#31586] -- make vc honour `.gitignore` so that `project-find-file` completion - is not cluttered with ignored files -- in a folder with a .git folder and a .gitignore file, - - `C-x C-f .gi TAB` completes to .gitignore - - `C-x C-f .git TAB` says "not unique" -- add some Custom machinery to save additions/removals to list - variables; as things stand, once I add/remove items and save the - variable, I miss out on changes to the variable's default value: - e.g. `git-commit-setup-hook` recently added `bug-reference-mode`, - but I never realized it because I customized the hook to add some - personal functions -- completions in python.el's comint buffer get confused when - readline's completion-prefix-display-length is set: candidates - become elided, maybe python-shell-completion-native-get-completions - is not ready for that? -- some bindings advertised by `describe-mode` in texinfo-mode are - invalid: - - `C-c C-s` runs `Texinfo-insert-node` instead of - `texinfo-show-structure` - - `C-c C-e` runs `Texinfo-environment` instead of being a prefix - command for `texinfo-format-{buffer,region}` -- [bug#31666]: visual-line-mode adds newlines before words that end up - being split anyway -- `gnus-group-make-group` uses `message-y-or-n-p`, which relies on - `message-talkative-question`; the message might be too wide for the - temporary buffer where it is displayed, and `y-or-n-p` prevents the - user from moving to the buffer and looking at the rest of the - message. - -[bug#30008]: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=30008 -[bug#31586]: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31586 -[bug#31666]: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31666 -[Unicode conventions]: https://lists.gnu.org/archive/html/emacs-devel/2018-07/msg00961.html - -## Dired - -- allow "columns" to be toggled; more specifically, make it possible - to hide ownership, permissions, number of hard links… - -- make the filename stand out - -- `% r` does not support some `\` constructs (`\#`, `\,`) - -- add a face for broken symbolic links - -## ERC - -- move timestamp to a better position (see `stamp` module) -- play well with whitespace-mode - -## Org - -- dissociate sub- and super-script fontification from everything else - in org-toggle-pretty-entities - -- org-clocktable trips on DST: - - ``` org - #+BEGIN: clocktable :scope file :maxlevel 2 :step day :stepskip0 t :tstart "[2018-10-15]" :tend "[2018-11-15]" - #+END: - - * foo - :LOGBOOK: - CLOCK: [2018-10-26 Fri 08:00]--[2018-10-26 Fri 17:00] => 9:00 - :END: - - * bar - :LOGBOOK: - CLOCK: [2018-10-29 Mon 08:00]--[2018-10-29 Mon 17:00] => 9:00 - :END: - ``` - -- make org-ctrl-c-ctrl-c call `(org-clock-update-mode-line t)` when - point is on the clocked-in heading - -- new command `org-clock-in-late` to clock out x minutes ago from - previous task, and clock in x ago on task at point - -## read-passwd - -- prevent kills from ending up in the clipboard -- add command to temporarily reveal password - -## whitespace-mode - -- skip line/wrap-prefix variables and properties - -- highlights the adaptive-wrap prefix, although weirdly enough the - whitespace *faces* are not applied - -- in org-indent-mode, adds a spurious (unfaced) space marker before - paragraphs; somehow transient-mark-mode knows not to highlight this - space, maybe the answer lies there - -## Ellipses customization - -Make ellipses for "invisible" text easily customizable (src/xdisp.c). -Make them default to "…" when `(char-displayable-p ?…)`. - -Use-cases: - -- ibuffer truncation -- hideshow -- outline (org) -- rgrep -- magit-process - -## xref - -- search gz-compressed Elisp files when calling `xref-find-references` - from an Elisp buffer: from a user perspective, if - `xref-find-definitions` can visit those files, - `xref-find-references` should work too (even though technically they - don't rely on the same mechanisms) - -- defun-building macros seem hard to understand for xref: e.g. `M-.` - on `rg` does not jump to `rg-define-search rg` - -## External libraries - -### adaptive-wrap - -- a commented-out line with no space between the comment delimiter and - its text will get padded with the comment delimiter: - - ;(some very long line) - ;; ⇒ wrapped with adaptive-wrap-extra-indent set to 4: - ;(some very - ;;;;;long line) - -### debbugs - -- asynchronous bug fetching - -### magit - -- customize current-tag function so that one can add `--first-parent` -- prevent section highlight overlay from hiding tag face background -- when quitting ediff conflict resolution, the "save buffer" prompt is - out of focus, one must ALT-TAB out of the ediff control panel first - (noticed in Emacs 27; 25.1 works fine); possible culprits: - - magit - - ediff - - smerge - - yes-or-no-p - - read-answer -- make status buffer understand and display `typechange` e.g. when - replacing a replacing a regular file with a symlink -- when ignoring a file in a subdirectory, magit attempts to - `git add .gitignore` (i.e. toplevel `.gitignore`), which fails -- if the `-n` log option is set in the status buffer, the "unpulled - from origin/…" section shows an invalid commit count if the `-n` - limit is lower than the actual number of commits -- for repos with dozens of old branches, it would be nice to have a - way to hide or distinguish "stale" branches from active ones, a la - - -#### transient - -- cannot use the full domain of `--find-renames` (e.g. 1%) -- cannot call transient-save for all transients (e.g. would like to - always `fetch --prune`) - -### markdown-mode - -- support [shortcut reference links] -- move point past header after C-c C-t !/@ -- update sub-superscript regex to allow L~i+1~ -- make justification work with indented blockquotes -- add "ini ↦ conf-mode" to markdown-code-lang-modes - -[shortcut reference links]: http://spec.commonmark.org/0.27/#shortcut-reference-link - -### rg-mode - -- make -project DTRT in dired - -### page-break-lines - -- borked in magit-diff - -### diff-hl - -- colored fringe line is discontinued on lines featuring faces with - heights greater than 1 - - ``` shell - $ git init - $ echo "* foo" > README.org - $ git add README.org ; git commit -m README.org README.org - $ echo "* bar" >> README.org - $ echo "* baz" >> README.org - ``` - - ``` elisp - (load-file "…/diff-hl.el") - (global-diff-hl-mode) - (set-face-attribute 'org-level-1 nil :height 1.2) - (find-file "README.org") - ``` - -- in Org buffers with org-indent-mode, lines before point will "dance" - around while editing, i.e. while I type, they stick to the left - margin, then when I stop typing, they become indented again. - -### wgrep - -`C-c C-d` (`wgrep-mark-deletion`) could move to the next line, just -like `d` moves to the next line in Dired buffers. diff --git a/personal/itches/emacs/emoji.org b/personal/itches/emacs/emoji.org deleted file mode 100644 index a66ec87..0000000 --- a/personal/itches/emacs/emoji.org +++ /dev/null @@ -1,26 +0,0 @@ -Support for color fonts [[https://lists.gnu.org/archive/html/emacs-devel/2019-04/msg00996.html][has landed]] on version 27.0 (master). -Remaining issues: - -* DONE Fix font-hinting =--with-cairo= - -Bug#35781 fixed by Yamamoto Mitsuharu. - -* TODO Check whether combining sequences work - -For example:, regional flags, ZWJ sequences from - -- ZWJ sequences from - : - - 🧟‍♂️, 🧟‍♀️ - - 🐕‍🦺 -- regional indicators: 🇪🇺, 🇫🇷 - -* TODO Add a convenient way to set a font for all emojis - -AFAICT there is no convenient way to =set-fontset-font= e.g. Noto - Color Emoji for "all emojis"; valid TARGETs for this function are - - single characters - - character ranges - - scripts, as defined in =script-representative-chars= - - charsets - - nil = any character not already covered by another font-spec diff --git a/personal/itches/emacs/form-feed.md b/personal/itches/emacs/form-feed.md deleted file mode 100644 index 61fd48b..0000000 --- a/personal/itches/emacs/form-feed.md +++ /dev/null @@ -1,56 +0,0 @@ -# Better out-of-the-box display for FORM FEED - -By default, FORM FEED is displayed as a dumb `^L` glyph. This is -surprising considering it shows up in so many places: - -- Emacs source files (C and Elisp), -- help buffers: - - `describe-mode`, - - `describe-bindings`, - - `view-emacs-news`, -- log buffers: - - `*Compile-Log*`, - - `*Dired log*`, -- … - -You can even see it in source files of other GNU projects, like GCC. - -"Pages" are important enough to have their own navigation and -narrowing commands, yet their default delimiter is displayed as an -unassuming control character. - -I like the way form feeds are displayed with [`page-break-lines`]; -magit's `show-lines` blaming style achieves a similar look. - -Having this kind of display by default would make it more obvious that -this character has actual navigation semantics; as it stands, it looks -no different from some stray CARRIAGE RETURN. - -This hypothetical thin-line display could be re-used by e.g.: - -- `describe-symbol`, which uses the following method to visually break - up multiple symbol definitions: - - ``` lisp - (insert "\n\n" - (eval-when-compile - (propertize "\n" 'face '(:height 0.1 :inverse-video t))) - "\n") - ``` - -- Custom buffers, where sections are delimited visually with a - 999-character wide underlined space. - -(See [emacs-devel][emacs-devel-thin-line] for a use-case recap.) - -Full disclosure -: This reflection started because moving over this underlined space - with `truncate-lines` on causes the screen to jump horizontally. - This specific problem should be fixable without dragging FORM FEED - display into the discussion, but I feel like the latter is the - more interesting issue ([who on Earth] enables `truncate-lines` by - default anyway). - -[`page-break-lines`]: https://github.com/purcell/page-break-lines -[emacs-devel-thin-line]: https://lists.gnu.org/archive/html/emacs-devel/2019-05/msg00268.html -[who on Earth]: https://gitlab.com/peniblec/dotfiles/blob/master/.emacs-custom.el diff --git a/personal/itches/emacs/language-support.org b/personal/itches/emacs/language-support.org deleted file mode 100644 index 8d007d3..0000000 --- a/personal/itches/emacs/language-support.org +++ /dev/null @@ -1,59 +0,0 @@ -* Python -** Fix builtin/keyword fontification for Python 3 -E.g. =print= became a builtin. -*** TODO add fontification tests -*** TODO have dedicated font-lock styles for Python 2, 3 and "mixed" -Default to "mixed" (rely on tests to ensure user-visible change). -**** TODO create font-lock styles -**** TODO create variable to choose style -Users could customize it or set it wiht directory-local variables. -*** TODO add heuristic to pick the "right" style -** Fontify f-strings -E.g. =f'an {expression} that should be highlighted'=. - - -* Shell scripts -** Fix builtin/keyword fontification -- =continue= and =break= are /builtins/. -** Fontify variables within strings -E.g. ="an ${expression} that should be highlighted"=. -** Do not highlight single-quoted command substitutions -E.g. ='this $(call) should not be highlighted'=. -** Fix indentation on continuation lines -#+BEGIN_SRC shell -# cf -# - electric-indent-post-self-insert-function -# - indent-according-to-mode -# - indent-line-function => smie-indent-line -# - smie-indent-functions -# - smie-indent-exps -# => calls smie-backward-sexp, which does not skip over ${foo} -foobar \ - indentis4 -foo_bar \ - indentisstill4 -${foo}bar \ - indentisfoobar -#+END_SRC - - -* Makefile -** Recognize [[http://austingroupbugs.net/view.php?id=330][POSIX "immediate-expansion"]] operator ~::=~ - - -* Assembly -** =C-o= inserts a tab despite =indent-tabs-mode= being nil -This seems to come from the mode setting =fill-prefix=. The mode also -does not adhere to the "~RET~ = smart newline, ~C-j~ = dumb linefeed" -convention for no good reason AFAICT. - - -* TeX -** electric-pair-mode and $inline math$ -e-p-m inserts a closing $ after point, but inserts a new pair instead -of overwriting when pressing $ again. -** AUCTeX -*** electric-pair-mode does not work -**** pressing ="= on active region does not surround it with quotes even with electric-pair-mode -TeX-insert-quote erases the region and inserts =``= instead. -**** pressing =$= inserts a single $ diff --git a/personal/itches/emacs/narrow-lighter.md b/personal/itches/emacs/narrow-lighter.md deleted file mode 100644 index e5987b8..0000000 --- a/personal/itches/emacs/narrow-lighter.md +++ /dev/null @@ -1,209 +0,0 @@ -# Make " Narrow" lighter customizable - -The " Narrow" string comes from `src/xdisp.c:decode_mode_spec`: - -``` c -case 'n': - if (BUF_BEGV (b) > BUF_BEG (b) || BUF_ZV (b) < BUF_Z (b)) - return " Narrow"; -``` - -This is probably just a matter of returning the contents of a Lisp -variable instead of this constant string. - -TODO: - -1. get the string value of a variable in C -2. define a customizable string variable -3. write a news entry -4. write a patch -5. extra credits: display string properties - -## Get the string value of a variable in C - -`decode_mode_spec` has some relevant snippets: - -- Given a `Lisp_Object obj`, `SSDATA(obj)` gives the string value as a - `char*`. - -- How to get a variable's `Lisp_Object`? - - `BVAR` works for buffer-local variables - - `V${lispname//-/_}` - -## Define a customizable string variable - -### Defining variables visible to C code - -The C macro `DEFVAR_LISP(string-name, field-name)` does the following: - - define a static `Lisp_Objfwd` variable v - get the address of globals._f##field-name &f - - defvar_lisp(v, string-name, &f) - -As explained in the comments above `DEFVAR_LISP`, `globals` is a -global variable defined in `globals.h`, which is "auto-generated by -make-docfile" and exposes fields, `#define`s and `Lisp_Object`s for -every global variable. - -make-docfile (`lib-src/make-docfile.c`) takes C files as input and -searches all occurences of `^ +DEFSYM[ \t(]`, `^ +DEFVAR_[ILB]` or -`^DEFU`, analyses what comes after and generates appropriate -definitions for `globals.h`. - -`defvar_lisp` allocates a symbol using `Fmake_symbol`. - -### Making it customizable - -`lisp/cus-start.el` defines customizable properties of symbols defined -by C code. - -AFAICT, there is no need to assign the default value right after -defining the variable with `DEFVAR_LISP`: e.g. `shell-file-name` is -`DEFVAR_LISP`ed in `src/callproc.c` and its default value is set in… -Mmm. Not in `cus-start.el`. There is this snippet in -`callproc.c:init_callproc`: - - ``` c -sh = getenv ("SHELL"); -Vshell_file_name = build_string (sh ? sh : "/bin/sh"); - ``` - -But when starting with `SHELL=rofl emacs -Q`, Custom says that the -value "has been changed outside Customize". Changed from what to -what? - -`cus-start.el` may contain a hint: - -``` elisp -;; Elements of this list have the form: -;; … -;; REST is a set of :KEYWORD VALUE pairs. Accepted :KEYWORDs are: -;; :standard - standard value for SYMBOL (else use current value) -;; … -``` - -Except that nope, this does not work. Giving `:standard " Narrow"` -and looking at the variable in Custom yields - - narrow-lighter: nil - [State]: CHANGED outside Customize. (mismatch) - -A better example might be `overlay-arrow-string`, whose default value -is set right after `DEFVAR_LISP` by calling `build_pure_c_string`. - -Why `build_pure_c_string` and not `build_string`? From "(elisp) Pure -Storage": - -> Emacs Lisp uses two kinds of storage for user-created Lisp objects: -> “normal storage” and “pure storage”. Normal storage is where all -> the new data created during an Emacs session are kept (see Garbage -> Collection). Pure storage is used for certain data in the preloaded -> standard Lisp files—data that should never change during actual use -> of Emacs. -> -> Pure storage is allocated only while ‘temacs’ is loading the -> standard preloaded Lisp libraries. In the file ‘emacs’, it is -> marked as read-only (on operating systems that permit this), so that -> the memory space can be shared by all the Emacs jobs running on the -> machine at once. - -"(elisp) Building Emacs" explains that "temacs" is the minimal Elisp -interpreter built by compiling all C files in `src/`; temacs then -loads Elisp sources and creates the "emacs" executable by dumping its -current state into a file. - -## Debug stuff - -### Unicode characters represented as octal sequences - -Trying to customize the new variable to any string with non-ASCII -characters fails: they show up as sequences of backslash-octal codes. -For some reason they show up fine in the Help and Custom buffers. - -Things to investigate: - -1. Should the `Lisp_Object` be created with something other than - `build_pure_c_string`? 🙅 -2. What does the code calling `decode_mode_spec` do with the returned - string? **🎉** -3. (Does `SSDATA` make some transformation before returning the - string? 🤷) -4. (Should a specialized Custom setter be defined? 🤷) - -#### Should the `Lisp_Object` be created with something other than `build_pure_c_string`? - -Maybe this would work? - -``` c -Vnarrow_lighter = make_multibyte_string(" Narrow", strlen(" Narrow"), - strlen(" Narrow)"); -``` - -That looks too ugly though, let's try something else. - -Maybe `STRING_SET_MULTIBYTE(Vnarrow_lighter)` would help? - -*compiles and tries* - -… Nope, it does not. - -#### What does the code calling `decode_mode_spec` do with the returned string? - -``` c -spec = decode_mode_spec (it->w, c, field, &string); -multibyte = STRINGP (string) && STRING_MULTIBYTE (string); -``` - -*slowly turns around* - -*finds `string` standing right there with a blank stare* - -Gah! How long have you been there? - -``` c -/* Return a string for the output of a mode line %-spec for window W, - generated by character C. […] Return a Lisp string in - *STRING if the resulting string is taken from that Lisp string. - […] */ -static const char * -decode_mode_spec (struct window *w, register int c, int field_width, - Lisp_Object *string) -{ - Lisp_Object obj; - /* … */ - obj = Qnil; - *string = Qnil; - - switch (c) - { - /* … */ - } - - if (STRINGP (obj)) - { - *string = obj; - return SSDATA (obj); - } - else - return ""; -} -``` - -Alright then: - -``` c -case 'n': - if (BUF_BEGV (b) > BUF_BEG (b) || BUF_ZV (b) < BUF_Z (b)) - obj = Vnarrow_lighter; - break; -``` - -### Why do string properties not show up? - -🤷 - -## Extra credit - -Maybe it would be simpler to have the narrowing lighter work like the -" Compiling" lighter (cf. `compilation-in-progress` variable), i.e. adding an entry to `minor-mode-alist`. diff --git a/personal/itches/emacs/unfiltered.org b/personal/itches/emacs/unfiltered.org deleted file mode 100644 index 8bc9b52..0000000 --- a/personal/itches/emacs/unfiltered.org +++ /dev/null @@ -1,8 +0,0 @@ -* eglot + pyls: how to add myproject/src to path so that definition/completion works? -* rg/deadgrep: add user-customizable predicate to control default ---no-ignore (eg nil by default = don't add the flag; or user-function -to add it whenever project-root is ~) -* add "fr10x" to quail-keyboard-layout-alist -then try to figure out how to input dot and comma with russian-computer input method (with describe-input-method) - - diff --git a/personal/setup/bunsenlabs.md b/personal/setup/bunsenlabs.md deleted file mode 100644 index 523fdaa..0000000 --- a/personal/setup/bunsenlabs.md +++ /dev/null @@ -1,52 +0,0 @@ -Things I always tweak after installing a Bunsenlabs system. - -# Keyboard - -Cf. keyboard(5): - -- add `ctrl:nocaps` in /etc/default/keyboard -- run `udevadm trigger --subsystem-match=input --action=change` -- run `setupcon` in a TTY - -# Desktop - -## Conky - -- changed window type to "desktop" so that W-d does not hide Conky -- see dotfiles - -## ClipIt - -- disable hotkeys - -## Openbox - -### `rc.xml` - -- comment A-m and A-r out -- undecorate all windows: - - ``` xml - - no - - ``` - -### WM preferences - -- appearance: uncheck "windows retain a border when undecorated" -- desktops: 4 - -## tint2 - -- remove launcher and exit panel items -- add date (time2) - -## Calendar - -Make weeks begin on Monday by using the British locale: - -- uncomment `en_GB.UTF-8 UTF-8` in /etc/locale.gen -- `sudo locale-gen` -- `force_lang = en_GB.utf8` in `~/.config/gsimplecal/config` - diff --git a/personal/setup/dotfiles.md b/personal/setup/dotfiles.md deleted file mode 100644 index c51f4cb..0000000 --- a/personal/setup/dotfiles.md +++ /dev/null @@ -1,22 +0,0 @@ -Some day all of these will live in my dotfiles repository. - -Until then… - -# `~/.bash_aliases` - -``` bash -# Make Bash expand aliases before running sudo. -alias sudo='sudo ' -``` - -# `.gitconfig` - -``` ini -[user] - name = … - email = … -[alias] - root = rev-parse --show-toplevel - forget = update-index --assume-unchanged - remember = update-index --no-assume-unchanged -``` diff --git a/personal/setup/emacs.md b/personal/setup/emacs.md deleted file mode 100644 index 53fb75f..0000000 --- a/personal/setup/emacs.md +++ /dev/null @@ -1,42 +0,0 @@ -# Compiling - -This script seems to handle most cases I care about: - -- a freshly cloned copy of the repository, -- a repository where compilation has already happened, -- a repository where I want to change the `configure` flags… - -``` bash -#!/bin/bash - -set -eux - -MAKE="make -j$(nproc --all)" -CONFIGURE_FLAGS="--with-xwidgets --with-cairo" - -if ! test -f Makefile -then - ${MAKE} configure -fi - -check-config () -{ - if ! test -f src/config.h - then - return 1 - fi - - local pattern='#define EMACS_CONFIG_OPTIONS "'${CONFIGURE_FLAGS}'"' - grep "${pattern}" src/config.h -} - -if ! check-config -then - ./configure ${CONFIGURE_FLAGS} -fi - -if ! ${MAKE} -then - ${MAKE} bootstrap -fi -``` diff --git a/personal/setup/fonts.md b/personal/setup/fonts.md deleted file mode 100644 index 30e7739..0000000 --- a/personal/setup/fonts.md +++ /dev/null @@ -1,49 +0,0 @@ -Fonts I find useful, plus messy configuration details. - -# Symbola - -Symbola seems to cover most characters I care about (although it does -not handle fancy emoji ligatures), and new versions are released -fairly soon after each revision of the Unicode standard. - -Since distributions may not include the latest version, I often get it -directly from [the author's website](http://users.teilar.gr/~g1951d/). - -# Installing fonts with Fontconfig - -Gee, it sure is convenient to be able to install new fonts simply by -dropping them in `~/.fonts` and running `fc-cache`! - -`/etc/fonts/fonts.conf`: - - - ~/.fonts - -😨 - -Bunsenlabs symlinks `~/.fonts` to `~/.local/share/fonts`, but this -path is not mentioned anywhere in `/etc/fonts`. What's the deal? - -`/etc/fonts/fonts.conf`: - - fonts - -fonts-conf(5): - -> ## `` -> -> This element contains a directory name which will be scanned for -> font files to include in the set of available fonts. If 'prefix' is -> set to "xdg", the value in the `XDG_DATA_HOME` environment variable -> will be added as the path prefix. please see XDG Base Directory -> Specification for more details. - -[XDG Base Directory Specification](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html): - -> `$XDG_DATA_HOME` defines the base directory relative to which user -> specific data files should be stored. If `$XDG_DATA_HOME` is either -> not set or empty, a default equal to `$HOME`/.local/share should be -> used. - -Seems legit then. - diff --git a/personal/setup/package-management.md b/personal/setup/package-management.md deleted file mode 100644 index e6afc7a..0000000 --- a/personal/setup/package-management.md +++ /dev/null @@ -1,42 +0,0 @@ -Here are some things that I do often enough that I want to remember -how to do them properly, yet rarely enough that I will probably forget -this stuff if I do not write it down. - -# Package managers - -## APT - -Add deb-src repositories to get: - -- `changelog` -- `build-dep` -- `source` - -# Installing stuff under `$HOME` - -E.g. pandoc (compiled from source tarball with stack because there is -no 32-bit release) and ripgrep: - -- programs: - - install in `~/.local/bin` - - add this folder to `$PATH` (in `.profile` and `.xsessionrc`) - -- manpages: - - install in `~/.local/share/man/man1` - - in `~/.manpath`: - - MANPATH_MAP ~/.local/bin ~/.local/share/man - - - run `mandb --user-db` - -- bash completion scripts: - - install in `~/.local/share/bash-completion` - - in `~/.bash_completion` (sourced by - `/usr/share/bash-completion/bash_completion`): - - ``` bash - for f in ~/.local/share/bash-completion/* - do - [ -f "$f" ] && . "$f" - done - ``` diff --git a/personal/writing.md b/personal/writing.md deleted file mode 100644 index de68ed4..0000000 --- a/personal/writing.md +++ /dev/null @@ -1,44 +0,0 @@ -I worry a lot about how efficient my writing is. I want to keep it as -straightforward (maximizing signal-to-noise ratio) and accurate -(citing sources and assumptions) as I can. - -Since I keep catching myself making the same mistakes, and I do not -have automated tools to warn me about them yet, I figured I should -write down all the things I want to watch out for. - -# Decruftification - -## Sentences - -- Watch out for verbs which hide the action (e.g. try, allow). -- Use simpler words as long as they are not more vague. - -## Mails - -- Pick your battles: people only have time for so many subjects. - Focus on symptomatic relief; hint at systemic problems but wait - until prompted before ranting. -- Tricks to make mails more digestible: - - condense the point(s) into a tl;dr; - - move details (investigation, alternatives, rationale) into - footnotes or attachments; - - spin new threads. - -# Logic - -When expressing causation, check that all causes have been explicitly -stated. Be wary of assumptions^[I felt like adding "protect yourself -against misquotations", but those will probably happen anyway]. - -Conversely, if C can be deduced from A alone, consider rewriting -"since A and B, C" into "since A, C". Unnecessary Bs can be -detrimental to the discussion and make it to go off-topic; beware: - -- humorous overstatements that might be taken seriously; -- subconscious attempts at shoehorning a point that feels essential - but is not actually relevant. - -# Resources - -- [IEEE's "Write Clearly and Concisely"](http://sites.ieee.org/pcs/communication-resources-for-engineers/style/write-clearly-and-concisely/) -- [Gitlab's Technical Writing Handbook](https://about.gitlab.com/handbook/product/technical-writing/) diff --git a/reviews/articles.md b/reviews/articles.md new file mode 100644 index 0000000..82dc7ee --- /dev/null +++ b/reviews/articles.md @@ -0,0 +1,76 @@ +# Phillip Rogaway - The Moral Character of Cryptographic Work + +:::: tags +- Cryptography +- Society +:::: + +An appeal to cryptographers to ponder on the [Russell-Einstein +manifesto], consider the moral implications of their work, take a step +back from "crypto-for-crypto", and focus on "crypto-for-privacy" (or, +to name the threat more explicitly, "anti-surveillance research"). + +Harps on FBI Director James Comey's "law-enforcement framing": + +> 1. Privacy is *personal* good. It's about your desire to control +> personal information about you. +> 2. Security, on the other hand, is a *collective* good. It's about +> living in a safe and secure world. +> 3. Privacy and security are inherently in conflict. As you +> strengthen one, you weaken the other. We need to find the right +> *balance*. +> 4. Modern communications technology has destroyed the former +> balance. It's been a boon to privacy, and a blow to security. +> Encryption is especially threatening. Our laws just haven't kept +> up. +> 5. Because of this, *bad guys* may win. The bad guys are +> terrorists, murderers, child pornographers, drug traffickers, and +> money launderers. The technology that we good guys use - the bad +> guys use it too, to escape detection. +> 6. At this point, we run the risk of Going Dark. Warrants will be +> issued, but, due to encryption, they'll be meaningless. We're +> becoming a country of unopenable closets. Default encryption may +> make a good marketing pitch, but it's reckless design. It will +> lead us to a very dark place. + +This framing is dismissed as "inconsistent with the history of +intelligence gathering, and with the NSA's own mission statement", +without further explanation. + +I wish the author had spent some prose explaining how exactly this +framing is fallacious. There is a footnote providing some references, +but as far as I can tell these references mainly reinforce the point +that the NSA's surveillance methods are a threat to privacy; it is not +obvious how "the NSA overreaches" contradicts "it's harder to catch +bad guys once they get better crypto". + +For what it's worth, I found that [Aaron Brantly's +article](#aaron-brantly---banning-encryption-to-stop-terrorists-a-worse-than-futile-excercise) +does a better job at showing the shortsightedness of this line of +reasoning, as does this footnote: + +> When crypto is outlawed only outlaws will have crypto. + +[Russell-Einstein manifesto]: https://en.wikipedia.org/wiki/Russell%E2%80%93Einstein_Manifesto + +# Aaron Brantly - Banning Encryption to Stop Terrorists: A Worse than Futile Excercise + +:::: tags +- Cryptography +- Society +:::: + +The debate can be phrased as follows: + +> Is increasing security in one narrow area worth degrading it in +> every other? + +Answering "yes" overlooks two things: + +1. Weakening officially distributed encryption will not impact + terrorists, who will simply move to new, unregulated platforms. + +2. Once they have done that, we end up in a situation where lawful + citizens are stuck with insecure communication channels, and + terrorists are the only ones benefiting from state-of-the-art + confidentiality/integrity/authenticity. diff --git a/reviews/blog-roll.md b/reviews/blog-roll.md new file mode 100644 index 0000000..a56cc6c --- /dev/null +++ b/reviews/blog-roll.md @@ -0,0 +1,114 @@ +This is a list of blog-ish websites where I found insightful stuff +that I would like not to forget. + +# [LispCast] + +Eric Normand's musings on programming paradigms and their application, +with a soft spot for functional programming. + +[When in doubt, refactor at the bottom] +: Quoting Sandi Metz: + + > Duplication is far cheaper than the wrong abstraction. + + The point being that blindly following the letter of the DRY law + can lead developers to add complexity to extracted functions + because "it almost does what I want; if I could add just one more + parameter to it…". + + Normand and Metz encourage developers to "mechanically" extract + small pieces of logic; even if they are not re-usable, bundling + things together and naming them helps make the potential + abstractions more visible. + +[Programming Paradigms and the Procedural Paradox] +: A discussion on our tendency to conflate *paradigms* with their + *features*; for example, when trying to answer "can this language + express that paradigm?", we often reduce the question to "does + this language possess those features?". + + Normand wonders whether we do this because the procedural + paradigm's metaphor (a series of steps that each may contain any + number of sub-tasks) maps so well to its features (sequential + statements, subroutines) that it trained us to mix those up. + +[LispCast]: https://lispcast.com/category/writing/ +[When in doubt, refactor at the bottom]: https://lispcast.com/refactor-bottom/ +[Programming Paradigms and the Procedural Paradox]: https://lispcast.com/procedural-paradox/ + +# [null program] + +Chris Wellons's in-depth looks into a fairly wide range of programming +techniques and applications. The articles often come with +illustrative code samples, which are always broken down into +bite-sized chunks that are easy to grok. + +Some recurring topics I enjoy reading about: + +- GNU/Linux plumbing + - [Raw Linux Threads via System Calls] + - [Appending to a File from Multiple Processes] + - [A Magnetized Needle and a Steady Hand] + +- C programming tricks + - [Global State: A Tale of Two Bad C APIs] + - [C Closures as a Library] + - [How to Write Portable C Without Complicating Your Build] + - [A Tutorial on Portable Makefiles] + +- Algorithmics + - [Inspecting C's qsort Through Animation] + - [A Branchless UTF-8 Decoder] + - [Render Multimedia in Pure C] + +- Emacs Lisp plumbing + - [Some Performance Advantages of Lexical Scope] + - [What's in an Emacs Lambda] + +[null program]: http://nullprogram.com/index/ +[Raw Linux Threads via System Calls]: https://nullprogram.com/blog/2015/05/15/ +[Appending to a File from Multiple Processes]: https://nullprogram.com/blog/2016/08/03/ +[A Magnetized Needle and a Steady Hand]: https://nullprogram.com/blog/2016/11/17/ +[Global State: A Tale of Two Bad C APIs]: https://nullprogram.com/blog/2014/10/12/ +[C Closures as a Library]: https://nullprogram.com/blog/2017/01/08/ +[How to Write Portable C Without Complicating Your Build]: https://nullprogram.com/blog/2017/03/30/ +[A Tutorial on Portable Makefiles]: https://nullprogram.com/blog/2017/08/20/ +[Inspecting C's qsort Through Animation]: https://nullprogram.com/blog/2016/09/05/ +[A Branchless UTF-8 Decoder]: https://nullprogram.com/blog/2017/10/06/ +[Render Multimedia in Pure C]: https://nullprogram.com/blog/2017/11/03/ +[Some Performance Advantages of Lexical Scope]: https://nullprogram.com/blog/2016/12/22/ +[What's in an Emacs Lambda]: https://nullprogram.com/blog/2017/12/14/ + +# [Et tu, Cthulhu] + +[A hash table re-hash] +: A benchmark of hash tables that manages to succinctly explain + common performance issues and tradeoffs with this data structure, + to show results across a wide range of implementations, and to + provide very understandable interepretations for those results. + +[Et tu, Cthulhu]: https://hpjansson.org/blag/ +[A hash table re-hash]: https://hpjansson.org/blag/2018/07/24/a-hash-table-re-hash/ + +# [Evanmiller.org] + +I mostly only read the articles dealing with programming languages. +The down-to-earth commentary made me feel like the author both +appreciates the thought process that went into the design, and has +enough hindsight to find where that thought process fell short. + +[A Taste of Rust] +: An overview of some of the language's features. Some comments + resonated particularly well with me, e.g. on nested functions: + + > With other languages, I’m never quite sure where to put + > helper functions. I’m usually wary of factoring code into + > small, “beautiful” functions because I’m afraid they’ll end + > up under the couch cushions, or behind the radiator next to + > my car keys. With Rust, I can build up a kind of organic + > tree of function definitions, each scoped to the place where + > they’re actually going to be used, and promote them up the + > tree as they take on the Platonic form of Reusable Code. + +[Evanmiller.org]: https://www.evanmiller.org/ +[A Taste of Rust]: https://www.evanmiller.org/a-taste-of-rust.html diff --git a/reviews/linux.conf.au-2017.md b/reviews/linux.conf.au-2017.md new file mode 100644 index 0000000..9eb8da7 --- /dev/null +++ b/reviews/linux.conf.au-2017.md @@ -0,0 +1,330 @@ +# linux.conf.au 2017 + +## General comments + +Re-stating the audience's questions before replying is helpful. + +## Choose Your Own Adventure, Please! + +Keynote by Pia Waugh. + +Warns against short-sighted itch-scratching; wants to encourage more +long-lasting systemic change. To contrast with Maciej Cegłowski, who +warns against [ivory-tower wank] in Sillicon Valley, where no-one +seems interested in working on the severe poverty problems nearby. + +(To be fair, Pia does say we need both "symptomatic relief" and +systemic change.) + +41:30 + +> My favourite story from my studies with martial arts was actually +> about two monks walking around. They're walking along, elder one, +> younger one, and when they get to the river, a person comes and says +> "I'm being chased by robbers, can you help me across the river +> please?". The older monk says "Yep, not a problem", picks them up +> and carries them across (because they're hurt). The person gets +> away. And they're walking along, still in silence, and the younger +> monk says: "… You know, back at the river back there"; the older +> monk says "Yeah?"; the younger monk says "I thought we had taken a +> vow of silence". The other goes, "Yeah?". "… Should you have +> spoken to that person?", and the older monk says: "I put that person +> down back at the river. Why haven't you?" + +That story appeals to me: it's got some sort of +Jesus-ish-unconditional-forgiveness-Zen vibe that feels reassuring, +"it's OK to make mistakes, as long as you aimed for the Greater Good, +focus on the Spirit of the Law instead of upholding the Letter". But +slippery slope turns that into "move fast and break things", +consequences and accountability be damned. + +You can even link that to ["fussy" compilers] and false alarms: why +should Buddhist GCC warn on Vow-of-Silence violation if it's not +actually a problem? The warning should be refined, the diagnosis +should be smarter, the standard amended, otherwise how do you +distinguish between the shades of red? + +["fussy" compilers]: https://lists.gnu.org/archive/html/emacs-devel/2016-04/msg00190.html +[ivory-tower wank]: http://idlewords.com/talks/superintelligence.htm + +## Stephen King's practical advice for tech writers + +By Rikki Endsley. + +Lots of pointers, e.g. [The Care and Feeding of the +Press](http://netpress.org/care-feeding-press/). + +Suggested outline: + +- intro (invite the reader in) +- state the problem (background) +- solution +- (for tech article, tutorial, whitepaper: technical stuff (howto, FAQ)) +- conclude (important dates, action items) + +Parasite words: "very", "some". Be mindful of slang. + +## Sharing the love: making games with PICO-8 + +By John Dalton. + +> Sad old people, longing for the glory days + +PICO-8 restores the "Democracy of Creating". + +Kids get the point of sharing without having to be "encouraged" by +licences. + +## Writing less, saying more: UX lessons from the small screen + +By Claire Mahoney. + +- "mobile" is not necessarily "on the move" +- a "mobile" app does not have to be a "diet" version of the original + +Users do not expect the functionality to be diminished. + +> Context can be better than words + +(I feel like there is a connection to be made here with namespaces in +programming languages.) + +Patterns are good, repetition is not. + +Defining purpose with "when X, I want Y so I can Z" helps "keeping it +real" and reminding you of the user out there. + +## Mamas Don't Let Your Babies Grow Up to Be Rock Star Developers + +By Rikki Endsley. + +When writing job descriptions, stop asking for rock stars. Focus on: + +- job requirements +- job environment + +Makes it easier for people to figure whether they will fit in. + +Look for developers interested in making *others* succeed, learning +*new* skills; make sure they are accessible, they use the best tool +for the job, and they are able to innovate, lead, and collaborate with +a diverse mix of people. + +If you have a rockstar on your hands, make sure the janitors still get +some credits. + +## Why haven't you licensed your project? + +By Richard Fontana. + +"Post open-source" has actually been a thing for a while: the term +describes the widespread trend of not attributing a license to one's +project. + +Berne convention says that copyright is automatic, so this POSS +software might be implicitly "proprietary". Why worry? There is a +lot of proprietary software already. + +Not putting on a license constitutes a statement for some developers. + +Some attempts at public-domain dedication: + +- [WTFPL](http://www.wtfpl.net/) +- [Unlicense](http://unlicense.org/) +- [0-clause BSD](http://landley.net/toybox/license.html) +- [BOLA](https://blitiri.com.ar/p/bola/) +- [CC0](https://creativecommons.org/share-your-work/public-domain/cc0/) + +## Handle Conflict, Like a Boss! + +By Deb Nicholson. + +Conflict mostly comes from missing information, mismatched goals. + +Avoidance, accomodation and assertion each have their own issues as +conflict-handling strategies. + +Using historical motivations can help give credit to new ideas. + +Hypotheticals such as "What's the worst that could happen?" help +identify the root issues people will not directly talk about. + +No ad hominem. No name-calling. Period. Beware of [Contempt Culture]. + +Setting expectations can help enforce a civil tone and constructive +criticism. + +[Contempt Culture]: (https://blog.aurynn.com/2015/12/16-contempt-culture). + +## The journey of a word: how text ends up on a page + +By Simon Cozens. + +Very interesting explanations on the lengths Unicode must go to in +order to turn humanity's sprawling mess of written communication +methods into rigorous rules that a computer can understand. + +Some diacritics can be encoded either with a single code point or a +vowel plus a combining code point; this is because Unicode intends to +have one code point for *every character that other encodings have +ever contained*. + +Cozens is publishing a free online book on the subject: [Fonts and +Layout for Global Scripts]. + +[Fonts and Layout for Global Scripts]: https://simoncozens.github.io/fonts-and-layout/ + +## Surviving the Next 30 Years of Free Software + +By Karen Sandler. + +Is copyright assignment to big organizations (Canonical, FSF?) the +solution to problems we cannot anticipate? + +Wills are tricky: recipients might be taxed on the "monetary value" of +the "legacy". + +Using a trust as a "legal hack": would build a "registry" of free +software; the trust can map handles to contact information to preserve +anonymity. + +The idea is vaporware for now, since this trust cannot be built +without debating a lot of finer points. + +> The best gift you can give to the people you love is to make sure +> they're prepared for when you're gone. + +## The relationship between openness and democracy + +By Pia Waugh. + +Openness creates a natural incentive for "doing the right thing". + +Some people think shady deals which allow politicians to make huge +amounts of money from the industry are fair game, since they have to +get the investments they made during their campaign back. + +On "policy-based evidence" as an alternative to evidence-based policy: + +> That's rather funny'n'clever'n'witty… Oh shit, you're serious. + +How representative and legitimate are elected individuals? Never mind +the participation rate, most people vote for (or against) one or two +things, not the whole program. + +> (13:00) Everyone loves to kick public servants; **everyone**. + +> (14:30) I was gonna start a cartoon. And the first thing was gonna +> be someone saying "I'm surprised that you're working in government, +> I would've thought you'd disagree with X, Y, Z." OK. +> +> The second panel somone saying to me "I just can't believe you're +> working in government! I thought you had *integrity*! I thought +> you would disagree with all of these things!" … *OK*. +> +> The third person says "YOU MOTHER-"… Anyway, goes on a complete +> tirade, I'll probably get hit on the head. +> +> The fourth panel is me running off in the distance. Into the +> sunset. And the three people saying to each other "Why are there no +> good people in government?" + +"Consulting the public" used to be a point on a checklist, not +intended to yield useful outputs. + +## JavaScript is Awe-ful + +By Katie McLaughlin. + +In JavaScript, functions have to add `var` explicitly to their local +variable declarations, otherwise they will assign to global variables. + +``` javascript +> [] + [] +"" +> [] + {} +[object Object] +> {} + [] +0 +> {} + {} +NaN +``` + +JavaScript is a registered trademark; ECMAScript is the actual, +*standardised*, **versioned** language. + +Some examples of things which can be accomplished without JavaScript: +. + +Cross-compilers alleviate some of the pain; one has to be careful with +their prefered language's warts though. + +In Ruby, `&&` and `and` do not have the same precedence with respect +to `not`. + +## Data Structures and Algorithms in the 21st Century + +By Jacinta Catherine Richardson. + +Voronoi diagrams have a lot of applications: + +- modeling the capacity of wireless networks +- robot navigation +- mouse hoverstate + +Fourier transforms help with data compression. Naively: O(n²); from +the sixties onward: O(n log(n)). Nearly Optimal Sparse Fourier +Transform (2012): O(k log(n)), helps on-the-fly data compression. + +Singular Value Decomposition helps with pattern recognition/comparison +by allowing to express e.g. rotations. + +> New stuff! + +Evolutionary algorithms (a form of AI/machine learning) to find +optima: + +- a function to tell "is this good enough?" + +Genetic algorithms (a form of evolutionary): + +- fitness criteria +- swap information ("breed") +- random-ish variations + +> Setting up the fitness criteria and the initial conditions for +> genetic algorithms […] is as much art as it is science. + +Artificial Immune Systems (90s) is used in computer security. + +Swarm algorithms: agents share the value of their findings and +converge. Used e.g. to locate cancer; considered for e.g. traveling +sales person problem, unmanned cars. + +Bacterial Foraging Optimization; Shuffled Frog Leaping; +Teaching-Learning-Based Optimisations. + +[Foldit](http://fold.it) is an experiment consisting in making humans +solve hard problems (e.g. protein folding) through competitive gaming. + +Graph isomorphism is *hard*. Easy to verify, hard to solve. Until a +week ago: we can now solve them in quasi-polynomial time. + +## My personal fight against the modern laptop + +By Hamish Coleman. + +Ports, durability, keys are getting worse. + +Plugging an older keyboard on newer Thinkpads presents issues: + +- the motherboard sends in high-voltage current to enable backlight +- some keys don't work; the firmware must be changed (and then + re-encrypted) + +Sharing firmware patches is challenging; most end-users have no idea +what these even are; some of them run Windows and cannot easily use +the patching tools. + +Newer firmwares seem to be signed; this will probably make them harder +to tweak. diff --git a/reviews/linux.conf.au-2018.md b/reviews/linux.conf.au-2018.md new file mode 100644 index 0000000..657bb64 --- /dev/null +++ b/reviews/linux.conf.au-2018.md @@ -0,0 +1,136 @@ +# linux.conf.au 2018 + +## Making Technology More Inclusive Through Papercraft and Sound + +By Andrew Huang. + +I like how the talk goes over a range of cross-domain topics: + +- high-level motivations + +Improving inclusiveness is necessary to make open-source actually +empower people; right now a very small subset of the population is +computer-savvy enough to take advantage of it. If the situation does +not improve, a handful of developers will hold a lot of power over +lots of alienated users, and lawmakers may resort to "preposterous" +solutions to attempt to regain control, e.g. license bonds for +software developments. + +- Kickstarter campaign management +- design choices & rationale + - "China-ready" + - "patience of a child" constraint +- gory hardware details +- the end result + +## QUIC: Replacing TCP for the Web + +By Jana Iyengar. + +Starts by introducing impressive application performance improvements, +although where were those measured? E.g. rural areas? + +Advantage that can already be inferred from the layer view: QUIC needs +fewer handshakes than TCP+TLS. + +Achieves 0-RTT when the server's cryptographic credentials are known. + +Supports "stream multiplexing": the upper layer (e.g. HTTP) can +transfer multiple objects independently in a single connection. +Losing part of one object does not block the others: retransmission is +managed at the stream level, not at the connection level. + +On top of UDP: allows userspace (Chrome) implementation. + +> If you think of layers as a set of functions, things that you want +> done, UDP is not a transport protocol. + +I.e. UDP does not provide reliability, same-order delivery… + +Jana was "in the SCTP bandwagon". + +They actually have *better performance improvements* for *bigger +latencies*? Nice. + +> § QUIC improvements by country + +👏 + +(Of course the end goal is probably to make sure regions with poor +connections do not miss out on the adfest; still, these remain welcome +technical improvements) + +Transport headers are encrypted to prevent "middlebox ossification". +They left a *single* byte unencrypted (the flags byte): this allowed +middleboxes to observe that it kinda had the same value on most +connections, assume that this was a "nominal" value, and block traffic +when this value differed. + +## You Can't Unit Test C, Right? + +By Benno Rice. + +- Mentions [Check](https://libcheck.github.io/check/) and + [Kyua](https://github.com/jmmv/kyua). +- Factor your boilerplate into libraries, especially the ugly hacks. +- Keep `main` small so that you don't need to test it so much. + +## Changing the world through (fan-)fiction + +By Paul Fenwick. + +Reading fiction is a convenient way to get us to think through +concepts we had not considered before. By re-purposing a familiar +setting, *fan*fiction lowers the barrier to entry to the writing +exercise: it makes it easier for the writer to get their point across +and to reach their audience. + +Some recommendations: + +- The Last Ringbearer +- [My Little Pony: Friendship is Optimal] +- [Harry Potter and the Methods of Rationality] + +Our media teaches us what is normal. Hence fiction opens up ways to +improve the status quo by acquainting us to new ideas. + +Another recommendation: Steven Universe. + +Mainstream and folklore stories feature a fair amount of unhealthy +relationships; this is problematic because repeated exposure helps +normalization[^I find that SMBC is a positive example of this effect: +it regularly (and, AFAICT, fairly randomly) features gay couples in +comics where the joke is *not* about homosexuality]. + +In Japan, doujinshi is considered normal and "adding value to the +brand", whereas similar things are flagged as "copyright infringement" +in other countries. + +[My Little Pony: Friendship is Optimal]: https://www.fimfiction.net/story/62074/Friendship-is-Optimal +[Harry Potter and the Methods of Rationality]: http://www.hpmor.com/ + +## Lessons from three years of volunteering to teach students code + +By David Tulloh. + +Takeways: + +1. Volunteering in schools is easy and fun. +2. We should care about what is taught in schools. +3. We should get involved and support schools teaching IT. + +CSIRO: Australian program to get professional developers to teach in +schools. + +[Pixees](https://pixees.fr/) seems to be a French equivalent. + +Tried to move students from "programmers" to "developers" by evoking: + +- automated testing +- version control +- bug tracking +- code review + +An audience member noted that while programs ala CSIRO are helpful, +this should be organized at the government policy level. + diff --git a/reviews/mailing-lists.md b/reviews/mailing-lists.md new file mode 100644 index 0000000..c63d376 --- /dev/null +++ b/reviews/mailing-lists.md @@ -0,0 +1,68 @@ +# Emacs + +## 2019-01 + +### [Apropos 54f297904e0c: Temporarily comment out CC Mode from tests which are incompatible with it.][cc-mode/electric-pair] + +A thread that feels very representative of the friction between +"keeping things working as they always did" vs. "simplifying that huge +lumbering beast of a codebase". I find [Stefan Monnier's +intervention][cc-mode/electric-pair-stefan] helpful because it +captures both sides of the argument quite well: + +> >> I understand that there's a transition needed between these two and this +> >> intermediate state can require more work, but it's important to keep the +> >> long term goal in mind when designing the current solution. +> > Whose long term goal? +> +> At the very least mine. +> +> > My goal, both long and short term, is to keep CC Mode +> > working properly. +> +> That's orthogonal. +> +> To give you a similarly general goal, my own goal is to make it so that +> **any feature which makes sense in many major mode be implemented once and +> then used in the relevant major modes, rather than being implemented +> independently for those major modes.** +> +> This is both for uniformity between major modes, and because it both +> simplifies and improves many major modes (which would otherwise either +> not provide the feature or only in very primitive ways). +> +> **And those maintainers like you who did go to the trouble of being early +> implementers of the feature suffer through the pain of having to adapt +> their code once the generic version of the feature becomes available.** +> Sometimes even at the cost of having the new feature working slightly +> worse in some corner cases. +> +> But many of them are quite happy to be able to drop their old code and +> get rid of that responsibility (i.e. bug reports about regressions can +> be redirected to Emacs maintainers). + +On a non-technical note, this thread allowed RMS to advertise the [GNU +Kind Communications Guidelines][gnu-kind-communication]: + +> To ask "who started it" is to oversimplify. Often what happens +> is that a little harshness creeps into a discussion, then people +> react to that in a way that is a little more harsh. So nobody +> "started it" but multiple people exacerbated it. +> +> **Thus, part of the effort is, when we feel harshness coming at us, +> to damp it down rather than hitting back.** + +[cc-mode/electric-pair]: https://lists.gnu.org/archive/html/emacs-devel/2019-01/msg00360.html +[cc-mode/electric-pair-stefan]: https://lists.gnu.org/archive/html/emacs-devel/2019-01/msg00518.html +[gnu-kind-communication]: https://www.gnu.org/philosophy/kind-communication.html + +### [Documentation about the completion framework][completion-documentation] + +Helpful pointers for whoever wants to dig into completion plumbing. +Personally, I struggled to get to grips with it when [debugging some +`icomplete` issue][icomplete-issue], relying on the source for +information, and giving up while trying to write an automated test +case. + +[completion-documentation]: https://lists.gnu.org/archive/html/emacs-devel/2019-01/msg00504.html +[icomplete-issue]: https://gitlab.com/peniblec/memory-leaks/commit/dcc0c05dc1f6a22645bf9355b72aa44b49776620 diff --git a/reviews/talks.md b/reviews/talks.md new file mode 100644 index 0000000..ed272c8 --- /dev/null +++ b/reviews/talks.md @@ -0,0 +1,81 @@ +# Sandi Metz - Nothing is Something + +:::: tags +- OOP +- Ruby +:::: + +Some insightful thoughts on OOP. + +Clever examples of message-passing to get rid of conditionals. + +Prefer composition with dependency injection to inheritance: +inheriting to override a method really means that the parent class had +a default "null" behaviour that can be injected explicitly. + +Name the role, make an interface for it, and make classes that +implement each behaviour (the null one and the specialiazed one). +This will make it easier to compose specializations (i.e. save you +from multiple inheritance). + + +# Sandi Metz - Rules + +:::: tags +- OOP +- Ruby +:::: + +Some theory-crafting on rule-following, then the actual rules, which +amount to + +- small classes, +- tiny methods, +- few parameters. + +At the 16-minute mark, an interesting interaction between Metz and a +programmer starting to apply these rules: the programmer wonders when +they will be able to understand the new application "the same way" +they understood the old one. I.e. will they ever reach a point where +they have a complete mental map of every interaction between every +object, the same way they used to have a complete mental map of the +old monolithic, sequential application? + +Metz's response is that nope, this will never happen; they will "cease +to care" instead. In exchange, they will be able to make localized +changes without worrying about breaking the whole application. + + +# Fred George - The Secret Assumption of Agile + +:::: tags +- Agile +- OOP +- programming methods +- project management +- training +:::: + +Advice on when to refactor: + +- *after* design, *before* writing unit tests for the new stuff: + prepare ground for the addition to fit right in; + +- *after* implementing the new behaviour, *before* integrating. + +Goes over the usual code smells taught during the training he gives +(conditionals, getters & setters, class names ala "Manager", too many +instance variables) + +Mentions a requirement for training "retention": skills must be +applied within a month after receiving the training, otherwise the +rationale will be lost. + +Questions: + +- Does he know of open-source projects that showcase this style of + programming? + - Smalltalk, some NodeJS libraries + +- Does he rely on naming conventions? + - Quite a lot. diff --git a/technical/blog-roll.md b/technical/blog-roll.md deleted file mode 100644 index a56cc6c..0000000 --- a/technical/blog-roll.md +++ /dev/null @@ -1,114 +0,0 @@ -This is a list of blog-ish websites where I found insightful stuff -that I would like not to forget. - -# [LispCast] - -Eric Normand's musings on programming paradigms and their application, -with a soft spot for functional programming. - -[When in doubt, refactor at the bottom] -: Quoting Sandi Metz: - - > Duplication is far cheaper than the wrong abstraction. - - The point being that blindly following the letter of the DRY law - can lead developers to add complexity to extracted functions - because "it almost does what I want; if I could add just one more - parameter to it…". - - Normand and Metz encourage developers to "mechanically" extract - small pieces of logic; even if they are not re-usable, bundling - things together and naming them helps make the potential - abstractions more visible. - -[Programming Paradigms and the Procedural Paradox] -: A discussion on our tendency to conflate *paradigms* with their - *features*; for example, when trying to answer "can this language - express that paradigm?", we often reduce the question to "does - this language possess those features?". - - Normand wonders whether we do this because the procedural - paradigm's metaphor (a series of steps that each may contain any - number of sub-tasks) maps so well to its features (sequential - statements, subroutines) that it trained us to mix those up. - -[LispCast]: https://lispcast.com/category/writing/ -[When in doubt, refactor at the bottom]: https://lispcast.com/refactor-bottom/ -[Programming Paradigms and the Procedural Paradox]: https://lispcast.com/procedural-paradox/ - -# [null program] - -Chris Wellons's in-depth looks into a fairly wide range of programming -techniques and applications. The articles often come with -illustrative code samples, which are always broken down into -bite-sized chunks that are easy to grok. - -Some recurring topics I enjoy reading about: - -- GNU/Linux plumbing - - [Raw Linux Threads via System Calls] - - [Appending to a File from Multiple Processes] - - [A Magnetized Needle and a Steady Hand] - -- C programming tricks - - [Global State: A Tale of Two Bad C APIs] - - [C Closures as a Library] - - [How to Write Portable C Without Complicating Your Build] - - [A Tutorial on Portable Makefiles] - -- Algorithmics - - [Inspecting C's qsort Through Animation] - - [A Branchless UTF-8 Decoder] - - [Render Multimedia in Pure C] - -- Emacs Lisp plumbing - - [Some Performance Advantages of Lexical Scope] - - [What's in an Emacs Lambda] - -[null program]: http://nullprogram.com/index/ -[Raw Linux Threads via System Calls]: https://nullprogram.com/blog/2015/05/15/ -[Appending to a File from Multiple Processes]: https://nullprogram.com/blog/2016/08/03/ -[A Magnetized Needle and a Steady Hand]: https://nullprogram.com/blog/2016/11/17/ -[Global State: A Tale of Two Bad C APIs]: https://nullprogram.com/blog/2014/10/12/ -[C Closures as a Library]: https://nullprogram.com/blog/2017/01/08/ -[How to Write Portable C Without Complicating Your Build]: https://nullprogram.com/blog/2017/03/30/ -[A Tutorial on Portable Makefiles]: https://nullprogram.com/blog/2017/08/20/ -[Inspecting C's qsort Through Animation]: https://nullprogram.com/blog/2016/09/05/ -[A Branchless UTF-8 Decoder]: https://nullprogram.com/blog/2017/10/06/ -[Render Multimedia in Pure C]: https://nullprogram.com/blog/2017/11/03/ -[Some Performance Advantages of Lexical Scope]: https://nullprogram.com/blog/2016/12/22/ -[What's in an Emacs Lambda]: https://nullprogram.com/blog/2017/12/14/ - -# [Et tu, Cthulhu] - -[A hash table re-hash] -: A benchmark of hash tables that manages to succinctly explain - common performance issues and tradeoffs with this data structure, - to show results across a wide range of implementations, and to - provide very understandable interepretations for those results. - -[Et tu, Cthulhu]: https://hpjansson.org/blag/ -[A hash table re-hash]: https://hpjansson.org/blag/2018/07/24/a-hash-table-re-hash/ - -# [Evanmiller.org] - -I mostly only read the articles dealing with programming languages. -The down-to-earth commentary made me feel like the author both -appreciates the thought process that went into the design, and has -enough hindsight to find where that thought process fell short. - -[A Taste of Rust] -: An overview of some of the language's features. Some comments - resonated particularly well with me, e.g. on nested functions: - - > With other languages, I’m never quite sure where to put - > helper functions. I’m usually wary of factoring code into - > small, “beautiful” functions because I’m afraid they’ll end - > up under the couch cushions, or behind the radiator next to - > my car keys. With Rust, I can build up a kind of organic - > tree of function definitions, each scoped to the place where - > they’re actually going to be used, and promote them up the - > tree as they take on the Platonic form of Reusable Code. - -[Evanmiller.org]: https://www.evanmiller.org/ -[A Taste of Rust]: https://www.evanmiller.org/a-taste-of-rust.html diff --git a/technical/reviews/articles.md b/technical/reviews/articles.md deleted file mode 100644 index 82dc7ee..0000000 --- a/technical/reviews/articles.md +++ /dev/null @@ -1,76 +0,0 @@ -# Phillip Rogaway - The Moral Character of Cryptographic Work - -:::: tags -- Cryptography -- Society -:::: - -An appeal to cryptographers to ponder on the [Russell-Einstein -manifesto], consider the moral implications of their work, take a step -back from "crypto-for-crypto", and focus on "crypto-for-privacy" (or, -to name the threat more explicitly, "anti-surveillance research"). - -Harps on FBI Director James Comey's "law-enforcement framing": - -> 1. Privacy is *personal* good. It's about your desire to control -> personal information about you. -> 2. Security, on the other hand, is a *collective* good. It's about -> living in a safe and secure world. -> 3. Privacy and security are inherently in conflict. As you -> strengthen one, you weaken the other. We need to find the right -> *balance*. -> 4. Modern communications technology has destroyed the former -> balance. It's been a boon to privacy, and a blow to security. -> Encryption is especially threatening. Our laws just haven't kept -> up. -> 5. Because of this, *bad guys* may win. The bad guys are -> terrorists, murderers, child pornographers, drug traffickers, and -> money launderers. The technology that we good guys use - the bad -> guys use it too, to escape detection. -> 6. At this point, we run the risk of Going Dark. Warrants will be -> issued, but, due to encryption, they'll be meaningless. We're -> becoming a country of unopenable closets. Default encryption may -> make a good marketing pitch, but it's reckless design. It will -> lead us to a very dark place. - -This framing is dismissed as "inconsistent with the history of -intelligence gathering, and with the NSA's own mission statement", -without further explanation. - -I wish the author had spent some prose explaining how exactly this -framing is fallacious. There is a footnote providing some references, -but as far as I can tell these references mainly reinforce the point -that the NSA's surveillance methods are a threat to privacy; it is not -obvious how "the NSA overreaches" contradicts "it's harder to catch -bad guys once they get better crypto". - -For what it's worth, I found that [Aaron Brantly's -article](#aaron-brantly---banning-encryption-to-stop-terrorists-a-worse-than-futile-excercise) -does a better job at showing the shortsightedness of this line of -reasoning, as does this footnote: - -> When crypto is outlawed only outlaws will have crypto. - -[Russell-Einstein manifesto]: https://en.wikipedia.org/wiki/Russell%E2%80%93Einstein_Manifesto - -# Aaron Brantly - Banning Encryption to Stop Terrorists: A Worse than Futile Excercise - -:::: tags -- Cryptography -- Society -:::: - -The debate can be phrased as follows: - -> Is increasing security in one narrow area worth degrading it in -> every other? - -Answering "yes" overlooks two things: - -1. Weakening officially distributed encryption will not impact - terrorists, who will simply move to new, unregulated platforms. - -2. Once they have done that, we end up in a situation where lawful - citizens are stuck with insecure communication channels, and - terrorists are the only ones benefiting from state-of-the-art - confidentiality/integrity/authenticity. diff --git a/technical/reviews/linux.conf.au-2017.md b/technical/reviews/linux.conf.au-2017.md deleted file mode 100644 index 9eb8da7..0000000 --- a/technical/reviews/linux.conf.au-2017.md +++ /dev/null @@ -1,330 +0,0 @@ -# linux.conf.au 2017 - -## General comments - -Re-stating the audience's questions before replying is helpful. - -## Choose Your Own Adventure, Please! - -Keynote by Pia Waugh. - -Warns against short-sighted itch-scratching; wants to encourage more -long-lasting systemic change. To contrast with Maciej Cegłowski, who -warns against [ivory-tower wank] in Sillicon Valley, where no-one -seems interested in working on the severe poverty problems nearby. - -(To be fair, Pia does say we need both "symptomatic relief" and -systemic change.) - -41:30 - -> My favourite story from my studies with martial arts was actually -> about two monks walking around. They're walking along, elder one, -> younger one, and when they get to the river, a person comes and says -> "I'm being chased by robbers, can you help me across the river -> please?". The older monk says "Yep, not a problem", picks them up -> and carries them across (because they're hurt). The person gets -> away. And they're walking along, still in silence, and the younger -> monk says: "… You know, back at the river back there"; the older -> monk says "Yeah?"; the younger monk says "I thought we had taken a -> vow of silence". The other goes, "Yeah?". "… Should you have -> spoken to that person?", and the older monk says: "I put that person -> down back at the river. Why haven't you?" - -That story appeals to me: it's got some sort of -Jesus-ish-unconditional-forgiveness-Zen vibe that feels reassuring, -"it's OK to make mistakes, as long as you aimed for the Greater Good, -focus on the Spirit of the Law instead of upholding the Letter". But -slippery slope turns that into "move fast and break things", -consequences and accountability be damned. - -You can even link that to ["fussy" compilers] and false alarms: why -should Buddhist GCC warn on Vow-of-Silence violation if it's not -actually a problem? The warning should be refined, the diagnosis -should be smarter, the standard amended, otherwise how do you -distinguish between the shades of red? - -["fussy" compilers]: https://lists.gnu.org/archive/html/emacs-devel/2016-04/msg00190.html -[ivory-tower wank]: http://idlewords.com/talks/superintelligence.htm - -## Stephen King's practical advice for tech writers - -By Rikki Endsley. - -Lots of pointers, e.g. [The Care and Feeding of the -Press](http://netpress.org/care-feeding-press/). - -Suggested outline: - -- intro (invite the reader in) -- state the problem (background) -- solution -- (for tech article, tutorial, whitepaper: technical stuff (howto, FAQ)) -- conclude (important dates, action items) - -Parasite words: "very", "some". Be mindful of slang. - -## Sharing the love: making games with PICO-8 - -By John Dalton. - -> Sad old people, longing for the glory days - -PICO-8 restores the "Democracy of Creating". - -Kids get the point of sharing without having to be "encouraged" by -licences. - -## Writing less, saying more: UX lessons from the small screen - -By Claire Mahoney. - -- "mobile" is not necessarily "on the move" -- a "mobile" app does not have to be a "diet" version of the original - -Users do not expect the functionality to be diminished. - -> Context can be better than words - -(I feel like there is a connection to be made here with namespaces in -programming languages.) - -Patterns are good, repetition is not. - -Defining purpose with "when X, I want Y so I can Z" helps "keeping it -real" and reminding you of the user out there. - -## Mamas Don't Let Your Babies Grow Up to Be Rock Star Developers - -By Rikki Endsley. - -When writing job descriptions, stop asking for rock stars. Focus on: - -- job requirements -- job environment - -Makes it easier for people to figure whether they will fit in. - -Look for developers interested in making *others* succeed, learning -*new* skills; make sure they are accessible, they use the best tool -for the job, and they are able to innovate, lead, and collaborate with -a diverse mix of people. - -If you have a rockstar on your hands, make sure the janitors still get -some credits. - -## Why haven't you licensed your project? - -By Richard Fontana. - -"Post open-source" has actually been a thing for a while: the term -describes the widespread trend of not attributing a license to one's -project. - -Berne convention says that copyright is automatic, so this POSS -software might be implicitly "proprietary". Why worry? There is a -lot of proprietary software already. - -Not putting on a license constitutes a statement for some developers. - -Some attempts at public-domain dedication: - -- [WTFPL](http://www.wtfpl.net/) -- [Unlicense](http://unlicense.org/) -- [0-clause BSD](http://landley.net/toybox/license.html) -- [BOLA](https://blitiri.com.ar/p/bola/) -- [CC0](https://creativecommons.org/share-your-work/public-domain/cc0/) - -## Handle Conflict, Like a Boss! - -By Deb Nicholson. - -Conflict mostly comes from missing information, mismatched goals. - -Avoidance, accomodation and assertion each have their own issues as -conflict-handling strategies. - -Using historical motivations can help give credit to new ideas. - -Hypotheticals such as "What's the worst that could happen?" help -identify the root issues people will not directly talk about. - -No ad hominem. No name-calling. Period. Beware of [Contempt Culture]. - -Setting expectations can help enforce a civil tone and constructive -criticism. - -[Contempt Culture]: (https://blog.aurynn.com/2015/12/16-contempt-culture). - -## The journey of a word: how text ends up on a page - -By Simon Cozens. - -Very interesting explanations on the lengths Unicode must go to in -order to turn humanity's sprawling mess of written communication -methods into rigorous rules that a computer can understand. - -Some diacritics can be encoded either with a single code point or a -vowel plus a combining code point; this is because Unicode intends to -have one code point for *every character that other encodings have -ever contained*. - -Cozens is publishing a free online book on the subject: [Fonts and -Layout for Global Scripts]. - -[Fonts and Layout for Global Scripts]: https://simoncozens.github.io/fonts-and-layout/ - -## Surviving the Next 30 Years of Free Software - -By Karen Sandler. - -Is copyright assignment to big organizations (Canonical, FSF?) the -solution to problems we cannot anticipate? - -Wills are tricky: recipients might be taxed on the "monetary value" of -the "legacy". - -Using a trust as a "legal hack": would build a "registry" of free -software; the trust can map handles to contact information to preserve -anonymity. - -The idea is vaporware for now, since this trust cannot be built -without debating a lot of finer points. - -> The best gift you can give to the people you love is to make sure -> they're prepared for when you're gone. - -## The relationship between openness and democracy - -By Pia Waugh. - -Openness creates a natural incentive for "doing the right thing". - -Some people think shady deals which allow politicians to make huge -amounts of money from the industry are fair game, since they have to -get the investments they made during their campaign back. - -On "policy-based evidence" as an alternative to evidence-based policy: - -> That's rather funny'n'clever'n'witty… Oh shit, you're serious. - -How representative and legitimate are elected individuals? Never mind -the participation rate, most people vote for (or against) one or two -things, not the whole program. - -> (13:00) Everyone loves to kick public servants; **everyone**. - -> (14:30) I was gonna start a cartoon. And the first thing was gonna -> be someone saying "I'm surprised that you're working in government, -> I would've thought you'd disagree with X, Y, Z." OK. -> -> The second panel somone saying to me "I just can't believe you're -> working in government! I thought you had *integrity*! I thought -> you would disagree with all of these things!" … *OK*. -> -> The third person says "YOU MOTHER-"… Anyway, goes on a complete -> tirade, I'll probably get hit on the head. -> -> The fourth panel is me running off in the distance. Into the -> sunset. And the three people saying to each other "Why are there no -> good people in government?" - -"Consulting the public" used to be a point on a checklist, not -intended to yield useful outputs. - -## JavaScript is Awe-ful - -By Katie McLaughlin. - -In JavaScript, functions have to add `var` explicitly to their local -variable declarations, otherwise they will assign to global variables. - -``` javascript -> [] + [] -"" -> [] + {} -[object Object] -> {} + [] -0 -> {} + {} -NaN -``` - -JavaScript is a registered trademark; ECMAScript is the actual, -*standardised*, **versioned** language. - -Some examples of things which can be accomplished without JavaScript: -. - -Cross-compilers alleviate some of the pain; one has to be careful with -their prefered language's warts though. - -In Ruby, `&&` and `and` do not have the same precedence with respect -to `not`. - -## Data Structures and Algorithms in the 21st Century - -By Jacinta Catherine Richardson. - -Voronoi diagrams have a lot of applications: - -- modeling the capacity of wireless networks -- robot navigation -- mouse hoverstate - -Fourier transforms help with data compression. Naively: O(n²); from -the sixties onward: O(n log(n)). Nearly Optimal Sparse Fourier -Transform (2012): O(k log(n)), helps on-the-fly data compression. - -Singular Value Decomposition helps with pattern recognition/comparison -by allowing to express e.g. rotations. - -> New stuff! - -Evolutionary algorithms (a form of AI/machine learning) to find -optima: - -- a function to tell "is this good enough?" - -Genetic algorithms (a form of evolutionary): - -- fitness criteria -- swap information ("breed") -- random-ish variations - -> Setting up the fitness criteria and the initial conditions for -> genetic algorithms […] is as much art as it is science. - -Artificial Immune Systems (90s) is used in computer security. - -Swarm algorithms: agents share the value of their findings and -converge. Used e.g. to locate cancer; considered for e.g. traveling -sales person problem, unmanned cars. - -Bacterial Foraging Optimization; Shuffled Frog Leaping; -Teaching-Learning-Based Optimisations. - -[Foldit](http://fold.it) is an experiment consisting in making humans -solve hard problems (e.g. protein folding) through competitive gaming. - -Graph isomorphism is *hard*. Easy to verify, hard to solve. Until a -week ago: we can now solve them in quasi-polynomial time. - -## My personal fight against the modern laptop - -By Hamish Coleman. - -Ports, durability, keys are getting worse. - -Plugging an older keyboard on newer Thinkpads presents issues: - -- the motherboard sends in high-voltage current to enable backlight -- some keys don't work; the firmware must be changed (and then - re-encrypted) - -Sharing firmware patches is challenging; most end-users have no idea -what these even are; some of them run Windows and cannot easily use -the patching tools. - -Newer firmwares seem to be signed; this will probably make them harder -to tweak. diff --git a/technical/reviews/linux.conf.au-2018.md b/technical/reviews/linux.conf.au-2018.md deleted file mode 100644 index 657bb64..0000000 --- a/technical/reviews/linux.conf.au-2018.md +++ /dev/null @@ -1,136 +0,0 @@ -# linux.conf.au 2018 - -## Making Technology More Inclusive Through Papercraft and Sound - -By Andrew Huang. - -I like how the talk goes over a range of cross-domain topics: - -- high-level motivations - -Improving inclusiveness is necessary to make open-source actually -empower people; right now a very small subset of the population is -computer-savvy enough to take advantage of it. If the situation does -not improve, a handful of developers will hold a lot of power over -lots of alienated users, and lawmakers may resort to "preposterous" -solutions to attempt to regain control, e.g. license bonds for -software developments. - -- Kickstarter campaign management -- design choices & rationale - - "China-ready" - - "patience of a child" constraint -- gory hardware details -- the end result - -## QUIC: Replacing TCP for the Web - -By Jana Iyengar. - -Starts by introducing impressive application performance improvements, -although where were those measured? E.g. rural areas? - -Advantage that can already be inferred from the layer view: QUIC needs -fewer handshakes than TCP+TLS. - -Achieves 0-RTT when the server's cryptographic credentials are known. - -Supports "stream multiplexing": the upper layer (e.g. HTTP) can -transfer multiple objects independently in a single connection. -Losing part of one object does not block the others: retransmission is -managed at the stream level, not at the connection level. - -On top of UDP: allows userspace (Chrome) implementation. - -> If you think of layers as a set of functions, things that you want -> done, UDP is not a transport protocol. - -I.e. UDP does not provide reliability, same-order delivery… - -Jana was "in the SCTP bandwagon". - -They actually have *better performance improvements* for *bigger -latencies*? Nice. - -> § QUIC improvements by country - -👏 - -(Of course the end goal is probably to make sure regions with poor -connections do not miss out on the adfest; still, these remain welcome -technical improvements) - -Transport headers are encrypted to prevent "middlebox ossification". -They left a *single* byte unencrypted (the flags byte): this allowed -middleboxes to observe that it kinda had the same value on most -connections, assume that this was a "nominal" value, and block traffic -when this value differed. - -## You Can't Unit Test C, Right? - -By Benno Rice. - -- Mentions [Check](https://libcheck.github.io/check/) and - [Kyua](https://github.com/jmmv/kyua). -- Factor your boilerplate into libraries, especially the ugly hacks. -- Keep `main` small so that you don't need to test it so much. - -## Changing the world through (fan-)fiction - -By Paul Fenwick. - -Reading fiction is a convenient way to get us to think through -concepts we had not considered before. By re-purposing a familiar -setting, *fan*fiction lowers the barrier to entry to the writing -exercise: it makes it easier for the writer to get their point across -and to reach their audience. - -Some recommendations: - -- The Last Ringbearer -- [My Little Pony: Friendship is Optimal] -- [Harry Potter and the Methods of Rationality] - -Our media teaches us what is normal. Hence fiction opens up ways to -improve the status quo by acquainting us to new ideas. - -Another recommendation: Steven Universe. - -Mainstream and folklore stories feature a fair amount of unhealthy -relationships; this is problematic because repeated exposure helps -normalization[^I find that SMBC is a positive example of this effect: -it regularly (and, AFAICT, fairly randomly) features gay couples in -comics where the joke is *not* about homosexuality]. - -In Japan, doujinshi is considered normal and "adding value to the -brand", whereas similar things are flagged as "copyright infringement" -in other countries. - -[My Little Pony: Friendship is Optimal]: https://www.fimfiction.net/story/62074/Friendship-is-Optimal -[Harry Potter and the Methods of Rationality]: http://www.hpmor.com/ - -## Lessons from three years of volunteering to teach students code - -By David Tulloh. - -Takeways: - -1. Volunteering in schools is easy and fun. -2. We should care about what is taught in schools. -3. We should get involved and support schools teaching IT. - -CSIRO: Australian program to get professional developers to teach in -schools. - -[Pixees](https://pixees.fr/) seems to be a French equivalent. - -Tried to move students from "programmers" to "developers" by evoking: - -- automated testing -- version control -- bug tracking -- code review - -An audience member noted that while programs ala CSIRO are helpful, -this should be organized at the government policy level. - diff --git a/technical/reviews/mailing-lists.md b/technical/reviews/mailing-lists.md deleted file mode 100644 index c63d376..0000000 --- a/technical/reviews/mailing-lists.md +++ /dev/null @@ -1,68 +0,0 @@ -# Emacs - -## 2019-01 - -### [Apropos 54f297904e0c: Temporarily comment out CC Mode from tests which are incompatible with it.][cc-mode/electric-pair] - -A thread that feels very representative of the friction between -"keeping things working as they always did" vs. "simplifying that huge -lumbering beast of a codebase". I find [Stefan Monnier's -intervention][cc-mode/electric-pair-stefan] helpful because it -captures both sides of the argument quite well: - -> >> I understand that there's a transition needed between these two and this -> >> intermediate state can require more work, but it's important to keep the -> >> long term goal in mind when designing the current solution. -> > Whose long term goal? -> -> At the very least mine. -> -> > My goal, both long and short term, is to keep CC Mode -> > working properly. -> -> That's orthogonal. -> -> To give you a similarly general goal, my own goal is to make it so that -> **any feature which makes sense in many major mode be implemented once and -> then used in the relevant major modes, rather than being implemented -> independently for those major modes.** -> -> This is both for uniformity between major modes, and because it both -> simplifies and improves many major modes (which would otherwise either -> not provide the feature or only in very primitive ways). -> -> **And those maintainers like you who did go to the trouble of being early -> implementers of the feature suffer through the pain of having to adapt -> their code once the generic version of the feature becomes available.** -> Sometimes even at the cost of having the new feature working slightly -> worse in some corner cases. -> -> But many of them are quite happy to be able to drop their old code and -> get rid of that responsibility (i.e. bug reports about regressions can -> be redirected to Emacs maintainers). - -On a non-technical note, this thread allowed RMS to advertise the [GNU -Kind Communications Guidelines][gnu-kind-communication]: - -> To ask "who started it" is to oversimplify. Often what happens -> is that a little harshness creeps into a discussion, then people -> react to that in a way that is a little more harsh. So nobody -> "started it" but multiple people exacerbated it. -> -> **Thus, part of the effort is, when we feel harshness coming at us, -> to damp it down rather than hitting back.** - -[cc-mode/electric-pair]: https://lists.gnu.org/archive/html/emacs-devel/2019-01/msg00360.html -[cc-mode/electric-pair-stefan]: https://lists.gnu.org/archive/html/emacs-devel/2019-01/msg00518.html -[gnu-kind-communication]: https://www.gnu.org/philosophy/kind-communication.html - -### [Documentation about the completion framework][completion-documentation] - -Helpful pointers for whoever wants to dig into completion plumbing. -Personally, I struggled to get to grips with it when [debugging some -`icomplete` issue][icomplete-issue], relying on the source for -information, and giving up while trying to write an automated test -case. - -[completion-documentation]: https://lists.gnu.org/archive/html/emacs-devel/2019-01/msg00504.html -[icomplete-issue]: https://gitlab.com/peniblec/memory-leaks/commit/dcc0c05dc1f6a22645bf9355b72aa44b49776620 diff --git a/technical/reviews/talks.md b/technical/reviews/talks.md deleted file mode 100644 index ed272c8..0000000 --- a/technical/reviews/talks.md +++ /dev/null @@ -1,81 +0,0 @@ -# Sandi Metz - Nothing is Something - -:::: tags -- OOP -- Ruby -:::: - -Some insightful thoughts on OOP. - -Clever examples of message-passing to get rid of conditionals. - -Prefer composition with dependency injection to inheritance: -inheriting to override a method really means that the parent class had -a default "null" behaviour that can be injected explicitly. - -Name the role, make an interface for it, and make classes that -implement each behaviour (the null one and the specialiazed one). -This will make it easier to compose specializations (i.e. save you -from multiple inheritance). - - -# Sandi Metz - Rules - -:::: tags -- OOP -- Ruby -:::: - -Some theory-crafting on rule-following, then the actual rules, which -amount to - -- small classes, -- tiny methods, -- few parameters. - -At the 16-minute mark, an interesting interaction between Metz and a -programmer starting to apply these rules: the programmer wonders when -they will be able to understand the new application "the same way" -they understood the old one. I.e. will they ever reach a point where -they have a complete mental map of every interaction between every -object, the same way they used to have a complete mental map of the -old monolithic, sequential application? - -Metz's response is that nope, this will never happen; they will "cease -to care" instead. In exchange, they will be able to make localized -changes without worrying about breaking the whole application. - - -# Fred George - The Secret Assumption of Agile - -:::: tags -- Agile -- OOP -- programming methods -- project management -- training -:::: - -Advice on when to refactor: - -- *after* design, *before* writing unit tests for the new stuff: - prepare ground for the addition to fit right in; - -- *after* implementing the new behaviour, *before* integrating. - -Goes over the usual code smells taught during the training he gives -(conditionals, getters & setters, class names ala "Manager", too many -instance variables) - -Mentions a requirement for training "retention": skills must be -applied within a month after receiving the training, otherwise the -rationale will be lost. - -Questions: - -- Does he know of open-source projects that showcase this style of - programming? - - Smalltalk, some NodeJS libraries - -- Does he rely on naming conventions? - - Quite a lot. -- cgit v1.2.3