Minis
Random things I wanna write down
2026-04 April🔗
2026-04-16 Thursday🔗
Using Org-Mode🔗
Trying out Org-Mode after a while, will try to use it for minis, as that’s probably the simplest way to start gradually.
It should also allow me to easily include:
-
tables even in the middle of lists
A B 1with links 34 5 6 scriptssuperdoublesub α Footnotes1 -
equations $$ \sum_{0}^{\inf} \frac{1}{k^2} $$
2026-04-21 Tuesday🔗
Unix Lossage🔗
Back when reading the Unix Hater’s Handbook I learnt a fun little term “Unix Lossage”. It might mean various things to various people, however I’ll use it to generally mean when I accidentally burn time or money due to something I don’t think is entirely my fault.
My First two examples were:
cat,less,grep,findand many other commands behave like variadics and just list or operate on one file after another.xxdhowever… does not do that, it’s signature isxxd [options] [infile [outfile]]. Which means that if you use it like the others,xxd file.txt bar.txtyour second file gets irretrievably overwritten. Now, luckily I do have very good backups so something like this didn’t set me back but the fact that one has to guess because every program has its own way of interpreting its arguments is something I’m not exactly happy with.avs.a/is interpreted weirdly differently by different programs.
2026-03 March🔗
2026-03-14 Sunday🔗
@ Syntax🔗
Ada has a neat syntax since 2021.
X := @ * 2;
The @ always signifies the LHS of the assignment. Even in more complex situations like this:
Cursor(3, Next) := @ * 2 + Sqrt(@);
It’s a very nice way of doing all the +=, *=, |=, <<=, etc. which seems slightly more readable to me, for the basic cases I still learnt to see :=@+ as a +=, and in the more complex expressions where you don’t actually want to just have the final operation be + the old value, it comes in way more handy.
Ofc doing this with macros is trivial.
OCaml has curried keywords🔗
I spoke about keywords improving readability in an older post.
And actually found something that does it close to what I described.
OCaml calls it “Labelled Arguments”:
# x + y;;
# add ~x:2 ~y:4;;
- : int = 6
# add ~y:2 ~x:5;;
- : int = 7
# add ~y:4;;
- : x:int -> int = <fun>
Sadly you can’t do something like add ~x to remove the label from the argument, it’s a labelled argument, it’s a different type and that’s that unless you wrap it in a lambda.
They also have an interesting approach to optional arguments, where you can just skip over them when applying a later label? This of course means you need a sentinel value if there are no non-optional arguments and also that optional arguments come first rather than last.
2026-03-07 Sunday🔗
CFFI Struct Vectors🔗
Footnotes🔗
1 Of Quality