Elektrine lite

← Feed

Ole Begemann

ole@chaos.social

<p>Swift, squirrels, cycling, cities for people not cars. My book: Advanced Swift. Berlin. Languages: de/en.</p><p>Invisible characters: When posting code, I sometimes insert a zero-width space (U+2060) to prevent things from turning into hashtags or mentions. Example: `@⁠escaping #⁠line`. Beware when copy-pasting such code into your editor.</p>

Posts

  • View post

    @marijn Hey Marijn, I just discovered your work via a link to ProseMirror (and I’ve been a CodeMirror user for years through Obsidian). I just wanted to say thank you for and congratulations on all your work, and especially how incredibly fast all your websites are, including your Forgejo instance. It’s immediately noticeable when every page loads instantly, and it’s a shame when you think that the entire web could (and should) be this fast.

  • View post

    I love this Slo Mo Guys video about camera shutters. Incredibly detailed footage, combined with great explanations how mechanical and electronic shutters work, what rolling shutter is, flash photography etc. https://www.youtube.com/watch?v=8nyQWmflve4

  • View post

    Very nerdy article about YAML by @pjb, well worth reading if you work with YAML. I love the history deep dive about YAML’s implicit typing rules and how early they were removed (in 2002, way before the spec hit 1.0). https://sharkey.slugcat.systems/notes/aqzbrmwqrr1l0007 And good advice: if your program ingests loosely structured data such as YAML, your code should deserialize it through a strongly typed schema (e.g. using Codable in Swift). This automatically avoids YAML’s “Norway problem”.

  • View post

    @marhei Danke!

  • View post

    @cocoaphony@mastodon.social There is `swift inspect dump-concurrency`, but I don’t know anything about it beside these two forum posts from @ktoso@mastodon.social and Johannes Weiss. I have no idea if this can inspect iOS apps in the simulator or even on device. • https://forums.swift.org/t/task-debugging/64181/2 • https://forums.swift.org/t/asyncthrowingstream-unexpectedly-hanging/81890/5

  • View post

    I didn’t know binaries could embed LLDB-specific bytecode for formatting custom data types nicely in the debugger, as shown in this swift-collections PR: https://github.com/apple/swift-collections/pull/607. The code also uses fancy new Swift features to place the bytecode in a specific linker section: @⁠section(&amp;quot;.lldbformatters&amp;quot;) @⁠used let __BasicContainers___RigidArray______formatter: (UInt8, UInt8, …, UInt8) = …

  • View post

    I just found out that the Text Replacements feature in macOS is somewhat case-sensitive in an interesting way. Example: • In System Settings &amp;gt; Keyboard &amp;gt; Text Replacements, add an entry to replace &amp;quot;:sigma&amp;quot; with &amp;quot;σ&amp;quot;. • This works as expected when you type &amp;quot;:sigma&amp;quot;. *But also*, when you type &amp;quot;:Sigma&amp;quot; with a capital S, it gets replaced with &amp;quot;Σ&amp;quot;, i.e. the corresponding capital letter. (Observed...

  • View post

    Useful Mac/Unix/Linux terminal command for listing a directory by size (incl. subdirs): du -h -d 1 &amp;lt;DIR&amp;gt; | sort --sort=human-numeric This will list every file/dir in &amp;lt;DIR&amp;gt; with its total size, with the biggest items sorted last (where you don’t have to scroll to see them).

  • View post

    I wish Sparkle (the Mac app update framework) would keep displaying the release notes after you click the Install button. I often click the button reflexively before actually reading what changed. And the brief wait time while the update is downloading is the perfect reading time.

  • View post

    I recently learned that German company Telefunken arguably invented the computer mouse. They offered a “Rollkugelsteuerung” (“rolling ball control”) for one of their mainframes in 1968, months before Douglas Engelbart’s “mother of all demos”. Telefunken’s mouse was also more advanced than Engelbart’s mouse as it used a ball instead of two wheels. (Photo credit: Marcin Wichary, CC-BY 2.0, https://www.flickr.com/photos/8399025@N07/2322838281 and https://www.flickr.com/photos/mwichary/2322836557/)

  • View post

    Pro tip if you’re running a Swift-based web/app server: Watch the Server ∕ Security Updates category on the Swift Forums to get an email notification about new security issues. Click the bell icon and set the status to Watching. https://forums.swift.org/c/server/security-updates/50

  • View post

    1. German crime reporter asks MS Copilot what it knows about him. 2. Copilot falsely accuses him of child abuse, fraud, theft. 3. Copilot asserts “it is unfortunate that someone with such a criminal past has a family” and provides his (correct!) address and phone number. 4. Reporter files a libel complaint, but prosecutors refuse to take on the case: it’s not a criminal offense because no person committed it. Must be great to be a big tech company. https://www.swr.de/swraktuell/baden-wuerttembe...

  • View post

    Apple Passwords.app data loss PSA: If you edit an entry in Passwords.app and then quit the app without clicking the Save button first, your edits are lost. The app will just quit without popping up a confirmation dialog. Observed on macOS 26.2.