Elektrine lite

← Feed

Wilfred Hughes

wilfredh@mastodon.social

<p>Programming languages, human factors, and a healthy dose of Emacs.</p>

Posts

  • Post #3554193

    Language design question: what type should `while True {}` have? Bottom: It doesn&#39;t contain any `break` statements. Unit: Treat loops with/without `break` consistently. I already have lints that warn on unreachable code after diverging loops, so the Unit case feels surprising.

  • Post #1857008

    Difftastic 0.69 is out! This is a pretty big release: * Semantically insignificant commas are now ignored * Difftastic now respects .gitattributes * Added assembly support and improved 13 other languages https://github.com/Wilfred/difftastic/releases/tag/0.69.0

  • Post #1775771

    I sometimes see blog posts lamenting how inconsistent UIs are in modern apps. When did consistency peak? Windows 3? After the release of Aqua for macOS? The era when Bootstrap was the default CSS framework for many web developers?

  • Post #1099752

    Writing type params with &amp;lt;&amp;gt; (e.g. List&amp;lt;Int&amp;gt;) seems the most natural to me: probably because I encountered that syntax first. Between C++, Java and TypeScript I think it&amp;#39;s the most common too. List[Int] seems to be next most common (Scala, Python) but TIL Gleam uses List(Int)!

  • Post #1099751

    What is the lowest resolution image that is still recognisable? I made a space invader craft project at one point and spent a bunch of time wondering if I had enough materials.

  • Post #1099750

    Are there any developer experience advantages for `x := 1` over `let x = 1`? A `let` keyword probably improves parsing error behaviour, and makes declarations more visible. := is more concise though.

  • Post #1099749

    Really elegant developer tool: Go&amp;#39;s inline IDE feature is used with deprecation markers, so call sites are autofixed from OldApi() to NewApi() based on the implementation of OldApi. https://go.dev/blog/inliner

  • Post #1099748

    I&amp;#39;m adding uptime data to my personal LLM bot. Does this information belong in the system prompt? That was my initial plan, but I&amp;#39;m thinking that a tool would be better. Tools let me see information provenance (&amp;quot;queried the uptime tool&amp;quot;). There&amp;#39;s also a small caching benefit.

  • Post #1099747

    I&amp;#39;ve started naming my servers digiocean1.example.com, digiocean2.example.com and so on. I wish I&amp;#39;d done this much earlier. I already have domain names for the actual deployed services, but it quickly gets confusing when you start moving things around.

  • Post #1099746

    I&amp;#39;m experimenting with imitating window UI elements when showing code snippets on my website. What do you think? Do the familiar dots of the title bar help, or is it just confusing decoration? First image is the current style, the second image has the window UI.

  • Post #1099745

    Excellent series on Self, both the programming model and the tool chain. I love how opening an inspector on a value (e.g. nil) then shows a link to all occurrences of the value in other open inspectors! https://blog.rfox.eu/en/Programming/Series_about_Self/Environment_and_the_programming_language_Self_part_one_environment.html

  • Post #1099744

    I&amp;#39;m surprised there aren&amp;#39;t more tools out there for starting a new project with some default config files. There&amp;#39;s `cargo new` but it&amp;#39;s Rust specific and very minimal. create-react-app is React specific. The only option I know of is cookiecutter. Surely it&amp;#39;s a common problem?

  • Post #1099743

    My 3.5yo is learning to use a mouse, and it&amp;#39;s super interesting. He&amp;#39;s mastered clicks and drags, but he hasn&amp;#39;t yet figured out lifting up the mouse when run out of mouse pad. That&amp;#39;s a tricky case where you deliberately break the relationship between mouse and cursor movement.

  • Post #1099742

    The author of rust-analyzer discussing how language features help or hinder fast IDEs. If you allow `from m import *` you can&amp;#39;t analyse files in isolation, and it&amp;#39;s even harder in Rust. https://matklad.github.io/2026/02/25/against-query-based-compilers.html

  • Post #1099741

    Reviewing some of my earliest web projects: they have a mix of Postgres, MySQL and Mongo. These days I just use sqlite for all my personal projects. It&amp;#39;s really good at my scale and makes deploying very easier.

  • Post #1099740

    LLMs have been really helpful for me porting some JS projects to TS. Since the types are erased and annotations are optional, I can go gradually and safely with more minimal human oversight. (I&amp;#39;m not sure if it&amp;#39;ll significantly help robustness, but it&amp;#39;s lovely for navigation.)

  • Post #1099739

    Some excellent safety improvements in C++26: hardening the standard library against out-of-bounds bugs, and a safer semantics for uninitialised local variables: https://herbsutter.com/2026/03/29/c26-is-done-trip-report-march-2026-iso-c-standards-meeting-london-croydon-uk/

  • Post #1099738

    Rust and RISC-V both feel like they&amp;#39;ve reached critical mass and I&amp;#39;d guess that they&amp;#39;ll be used more in 5 years than they are today. What other technologies fit this description?

  • Post #868327

    I&amp;#39;ve released difftastic 0.68! A smaller update, but still worth upgrading: * Improved Bash, C, Go, Lua, Nix, Perl, Python, Rust, Scala, Swift and YAML parsing. * Minor display and git compatibility fixes. https://github.com/Wilfred/difftastic/releases/tag/0.68.0

  • Post #480792

    I enjoyed this article about personal project programming, but I particularly liked this definition: &amp;quot;Production code has a phone number to call when it breaks&amp;quot; https://hannahilea.com/blog/houseplant-programming/