Beat Hagenlocher
A digital garden exploring programming, minimalism and learning
Latest posts
The Ultimate Keyboard
Poems I like: Do Not Go Gentle Into That Good Night
Poems I Like: The Road To Wisdom
GNOME Wayland Desktop Portal/Nautilus/Screen Sharing Issues
Over the last week, I learned that it's possible to have multiple desktop portals (implementations, I guess?) for Wayland active, and even specify which one to choose for which one. This is what this looks like: nix title="home.nix" # ... xdg.portal = { enable = true; extraPortals = [ pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-gnome ]; config.common = { # for files, mainly, since my…
Details that make interfaces feel better
A pretty good article on small but meaningful design elements: Details that make interfaces feel better Sweet!
Nutrient Ranking Tool
I just found something pretty cool: A nutrient ranking tool which one can use to filter for basically any ingredient across lots of sources with lots of filters. Here it is: My Food Data | Nutrient Ranking Tool (I discovered this through reading this nice article on glycine on LessWrong) Hope it helps!
UnoCSS
Fluid (Type) Scales
Fluid Scales in Tailwind
Some time ago, I held a lightning talk at our functional programming meetup on [[Fluid Type Scales]] (Where you try and get rid of class="sm:... md:... lg:..." whenever it makes sense). This was, for a long time, a good reason for me to use [[UnoCSS]]. But today, I learned that someone built this for [[Tailwind]], too: - fluid.tw But since this doesn't support Tailwind 4, I'll be using the…
Size Textarea to Content
Today I learned that you can use field-sizing: content to make the shrink and grow with the text in it. Try it out: (If you can, haha ^^) It's not available everywhere as of today (field-sizing: content | Can I use), but that's up to you to decide. :)
Wasm
Lean and Wasm
Today I was thinking about how easy it is to include Lean into a website. Since it compiles via an intermediate [[C]] layer, it shouldn't be that hard to do this via [[Emscripten]], but apparently it's harder than that: Since there's #eval, every function of the language needs to be exported per default (only then it's really a full [[Lean]] compiler), and that apparently hit a limit for the…
Lean and WASM
Better Computer Use
Some time ago, I visited a friend who's fairly well versed in tech (e.g. [[NeoVim]], can code) and watches him struggle with editing a file in Word fast on someone else's Laptop. I asked him whether he knew about for wordwise movement (which he didn't), and was fairly surprised. But in hindsight, I didn't know that for the longest time either. I took this as an example to start writing on [[Better…
Window Switching Made Simple | Part 2
Async Link Fetching in Emacs
Today I finally tackled something that has annoyed me for a while since switching most of my editing/digital gardening/second brain-writing over to Emacs. Whenever I took 30 minutes and tried to get title fetching of links to work, I couldn't get it to work in this self-allotted time. So I asked Opus to do the dumbest thing possible: Just fetch it via curl, and then apply stuff asynchronously.…
SolidJS
Lean
Functional Programming Language, Proof Assistant? Pick two.
AI
New notes
I've been dragging quite a few notes around with me for the last one, two weeks. Here they are! :)
AI And Formal Methods
LLM Usage
Functional Programming
AI Agents
Oxide
Bryan Cantrill
Slidev QRCode Addon
For presentations, I'm using slidev, a pretty cool and versatile tool (Markdown slides with inline HTML/Vue, so you can do basically anything on your slides), which has lots of cool features. One minor annoyance: If you're using either of the QRCode addons and want to add more than one QR Code per slide deck, it breaks. Luckily, with the power of the web, this is pretty easy to fix: We can just…
package.json postinstall scripts
Today I learned that there's magic pre<> and post<> hooks inside npm (and everything npm-compatible): -> https://docs.npmjs.com/cli/v8/using-npm/scripts I think I would've preferred less magic-side-effect-ness, but fair, I guess. So, to run something post install json { "scripts": { // ..., "postinstall": "echo 'hello postinstall'" } } Caveat: For npm, this only works when literally running npm…
TypeScript
Monitoring
(Fuzzy) Search on The Frontend
JavaScript Code Snippets
JS range()
JS doesn't have a range() function or anything, but you can do this: js [...Array(5).keys()]; => [0, 1, 2, 3, 4] ≺≻ [[JavaScript Code Snippets]]
Desktops in the browser
I did not know it's a thing that people are building desktop environments in the browser for fun: - https://webos.js.org/ - https://dustinbrett.com/ Wild.
Harness Engineering
Cognitive Debt
litecli
After getting annoyed by the default sqlite Command Line Interface (it doesn't even support arrow up ≙ last typed command), I found litecli nix title=flake.nix # ... packages = [ # ... pkgs.litecli # ... ]; # ... in every sqlite project from now on :)
Auth
Over the last few weeks, I've spent some time on and off researching a good way to do Authn and Authz, and struggled quite a bit with the number of options available. Not completely understanding what I'm doing/how to search for my requirements, I've first started trying Logto (but that was a UI clicking contest to set up), then going for [[kanidm]] without realizing this doesn't have support for…
Trader/Non-trader in Chrome Web Store
Today, I thought about writing and publishing an extension to the Chrome Web Store. I researched, and found this funny bit: The EU apparently requires you to indicate whether you're a Trader or Non-Trader, when you want to publish extensions on the store. Which is fine, (I guess), but apparently literally no one has a definitive answer to what that means: - Am I a trader or non-trader |…
Setting A DNS Record On A Domain
Setting Up A Server (with NixOS and Clan)
Diffing two directories
Today I learned that you can diff two directories just like you can diff two files: shell diff dir1/ dir2/ # or recursively diff --recursive dir1/ dir2/ Sweet! Comparing the contents of two directories | Stackoverflow
Setting Up Immich On NixOS with Clan
New stuff
Just now I learned - about Shannon, a pentesting agent - and that there's still an ongoing "Emacs in Rust" experiment people are actively working on! -> rune Looking forward to try Shannon out ^^ (rune isn't anything more than an Elisp interpreter right now)
OAuth Playground
Now that it's working again (I couldn't access it some days ago), OAuth playground is just a pretty nice way to understand code flows in [[Auth]].
<a name=""> in HTML
Today I learned there was a name attribute in HTML once.
Dynamic Scoping
The one unambiguously bad design choice in programming languages.
TypeScript Macros
Today I've been playing around with [[Immutable.js]] as a library that supplies immutable collections for [[JavaScript]] and [[TypeScript]]. Something that's relatively annoying at first sight (cause verbose) is how they handle typed Objects (Records). I'm not completely sure yet, but I think in [[TypeScript]] you want to declare sums of products using those records something like this: js import…
selfhostblocks
Today, I lurked a bit around the on the clan gitea, which made me find this nice PR trying to nail down a better clan positioning in the future, which made me find selfhostblocks. Cool! (Though I'm pretty convinced by clan so far)