Huey
December 27, 2024

Lobsters

The CAP Theorem of Clustering: Why Every Algorithm Must Sacrifice Something

As software engineers, we use clustering algorithms all the time. Whether it's grouping similar users, categorizing content, or detecting patterns in data, clustering seems deceptively simple: just group similar things together, right? You might have used k-means, DBSCAN, or agglomerative clustering, thinking you just need to pick the right algorithm for your use case.But here's what most tutorials won't tell you: every clustering algorithm you choose is fundamentally flawed. Not because of poor implementation or wrong parameters, but because of...

about 2 hours ago

Lobsters

Debugging memory corruption: Who wrote ‘2’ into my stack?

"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.

about 2 hours ago

Lobsters

sudo-rs: A memory safe implementation of sudo and su

A safety oriented and memory safe implementation of sudo and su written in Rust. Sudo-rs is being developed further; features you might expect from original sudo may still be unimplemented or not planned. If there is an important one you need, please request it using the issue tracker. If you encounter any usability bugs, also please report them on the issue tracker. Suspected vulnerabilities can be reported on our security page. An audit of sudo-rs version 0.2.0 has been performed...

about 2 hours ago

Lobsters

38C3: Illegal Instructions Streaming

Live streams will be available here once it has started. Please check back later.

about 3 hours ago

Lobsters

Efficient Programming with Components

[ previous, contents, next ] Course by: Alexander A. Stepanov (2013) Notes by: Justin Meiners (2021) Source: GitHub Foreword Acknowledgments FAQ [ previous, contents, next ]

about 6 hours ago

Lobsters

Write your Own Virtual Machine

By: Justin Meiners and Ryan Pendleton View the final code and other resources in the GitHub repo. In this tutorial, I will teach you how to write your own virtual machine (VM) that can run assembly language programs, such as my friend’s 2048 or my Roguelike. If you know how to program, but would like to gain a deeper understanding of what is going on inside a computer and better understand how programming languages work, then this project is for...

about 6 hours ago

Lobsters

Running NetBSD 10.1 on a 1998 Toshiba laptop

Here are my notes on running NetBSD 10.1 on my first personal laptop that I still keep, a 1998 i586 Toshiba Satellite Pro with 81Mb of RAM and a 1Gb IBM 2.5" IDE HD. In summary, the latest NetBSD runs well on this old hardware using an IDE to CF adapter and several changes to the i386 GENERIC kernel. During the holiday break time of year I take out my old hardware and make sure it passes a threshold: it...

about 7 hours ago

Lobsters

A Simple ELF

Let's write a simple program for Linux. How hard can it be? Well, simple is the opposite of complex, not of hard, and it is surprisingly hard to create something simple. What is left when we get rid of the complexity from the standard library, all the modern security features, debugging information, and error handling mechanisms? • • • Let's start with something complex: #include <stdio.h> int main() { printf("Hello Simplicity!\n"); } Wait, what?! It doesn't look very complex, does...

about 10 hours ago

Lobsters

AI-generated tools can make programming more fun

I want to tell you about a neat experience I had with AI-assisted programming this week. What’s unusual here is: the AI didn’t write a single line of my code. Instead, I used AI to build a custom debugger UI… which made it more fun for me to do the coding myself. I was hacking on a Prolog interpreter as a learning project. Prolog is a logic language where the user defines facts and rules, and then the system helps...

about 12 hours ago

Lobsters

Perfect Desk

Early in my computer related life – that means being 15+ years old – especially at parents house – I had a prefabricated desk with stand for monitor and for all other possible things. Printer on top. CD/DVD all over the place. Things like that. The Past Some time later my room needed complete ‘rework’ and I had some VERY temporary setup before all things were back to ‘normal’ 🙂 After buying a house with a mortgage loan in 2011...

about 12 hours ago

Lobsters

ChatGPT search vs. Google: A deep dive analysis of 62 queries

The emergence of ChatGPT search has led to many questions about the quality of the overall results compared to Google.  This is a difficult question to answer, and in today’s article, I will provide some insights into how to do just that.  Note that our understanding is that the technology that makes it possible for OpenAI to offer a search capability is called SearchGPT, but the actual product name is ChatGPT search.  In this article, we will use the name...

about 12 hours ago

Lobsters

Use of Time in Distributed Databases (part 2): Use of logical clocks in databases

This is part 2 of our "Use of Time in Distributed Databases" series. We talk about the use of logical clocks in databases in this post. We consider three different approaches:vector clocksdependency graph maintenanceepoch service In the upcoming posts we will allow in physical clocks for timestamping, so there is no (almost no) physical clocks involved in the systems in part 2.   1. Vector clocksDynamo employs sloppy quorums and hinted hand-off and uses version vector (a special case of vector clocks)...

about 13 hours ago

Lobsters

CobolCraft: A Minecraft server written in COBOL

A Minecraft server written in COBOL. It supports Minecraft 1.21.4 (the latest version at time of writing). The following features are already working: Note that blocks with multiple states, orientations, or interactive blocks require large amounts of specialized code to make them behave properly, which is way beyond the scope of this project. Some are supported, however: torches (all variants) slabs (all variants) stairs (non-connecting) rotated pillars, such as logs or basalt buttons (non-interactive) doors (including interaction) trapdoors (including interaction)...

about 14 hours ago

Lobsters

Arcan 0.7 – The All Tomato

Just as we concluded our first NLnet grant, it is also time to say goodbye to the second phase of the project, ‘anarchy on the desktop’, and enter the third and final one. As per the old roadmap, 0.7 is the last window of opportunity for any trailing features. For 0.8 we finally get to pull out the performance tuning tricks, 0.9 for hardening the attack surfaces, to be followed by me disappearing in a puff of smoke. I am...

about 14 hours ago

Lobsters

Ghostty 1.0

about 15 hours ago

Lobsters

Lua is so underrated

26 Dec, 2024 The more I learn about Lua's design and implementation, the more impressed I am. It's very rare to see software that does so much with so little code. Unfortunately, Lua doesn’t have the same level of marketing and hype as some other languages. This lack of promotion means that fewer developers are aware of Lua’s capabilities and benefits. It is often perceived as a niche language, primarily used in gaming and embedded systems. Consequently, Lua may not...

about 16 hours ago

Lobsters

The Matrix Holiday Special 2024

Hi all, Once again we celebrate the end of another year with the traditional Matrix Holiday Special! (see also 2023, 2022, 2021, 2020, 2019, 2018, 2017, 2016 and 2015 just in case you missed them). This year, it is an incredible relief to be able to sit down and write an update which is overwhelmingly positive - in stark contrast to the rather mixed bags of 2022 and 2023. This is not to say that things are perfect: most notably,...

about 21 hours ago

Lobsters

Seconds Since the Epoch

This is not at all news, but it comes up often enough that I think there should be a concise explanation of the problem. People, myself included, like to say that POSIX time, also known as Unix time, is the number of seconds since the Unix epoch, which was 1970-01-01 at 00:00:00. This is not true. Or rather, it isn’t true in the sense most people think. For example, it is presently 2024-12-25 at 18:54:53 UTC. The POSIX time is...

about 21 hours ago

Lobsters

The Unbearable Slowness of Being: Why do we live at 10 bits/s?

View PDF HTML (experimental) Abstract:This article is about the neural conundrum behind the slowness of human behavior. The information throughput of a human being is about 10 bits/s. In comparison, our sensory systems gather data at ~10^9 bits/s. The stark contrast between these numbers remains unexplained and touches on fundamental aspects of brain function: What neural substrate sets this speed limit on the pace of our existence? Why does the brain need billions of neurons to process 10 bits/s? Why...

about 21 hours ago

Lobsters

USB-C head-to-head comparison

Apple’s new iPhone 15 marks a disruptive departure from previous models. The 11-year reign of the Lightning cable is over, and the USB-C era has begun — leaving us wondering what sets one charger apart from another. Does Apple’s Thunderbolt 4 cable really warrant its $129 price tag? Or does a $5 cable get the job done just as well? We’ve used our Neptune industrial X-ray CT scanner to uncover the hidden engineering differences between them.Apple Thunderbolt 4 (USB‑C) Pro cableThe...

about 22 hours ago

Lobsters

Accurate Timekeeping in a DAW (2022)

Published on: 21 Nov 2022 Among the many things a DAW needs to do, keeping track of when events (i.e. midi notes, automation nodes, the start and end of audio clips, etc.) should occur is one of them. I want to share the solution I've come up with for my DAW engine. It was partly inspired by this article by the Ardour team, as well as their source code if you want some further reading. In short, the problem is...

1 day ago

Lobsters

Catching up with async Rust

fasterthanlime Dec 25, 2024 20 min #rust · #async · #traits exclusive In December 2023, a minor miracle happened: async fn in traits shipped. As of Rust 1.39, we already had free-standing async functions: pub async fn read_hosts() -> eyre::Result<Vec<u8>> { // etc. } ...and async functions in impl blocks: impl HostReader { pub async fn read_hosts(&self) -> eyre::Result<Vec<u8>> { // etc. } } But we did not have async functions in traits: use std::io; trait AsyncRead { async fn...

1 day ago

Lobsters

Can AI do maths yet? Thoughts from a mathematician

So the big news this week is that o3, OpenAI’s new language model, got 25% on FrontierMath. Let’s start by explaining what this means. A language model, as probably most people know, is one of these things like ChatGPT where you can ask it a question and it will write some sentences which are an attempt to give you an answer. There were language models before ChatGPT, and on the whole they couldn’t even write coherent sentences and paragraphs. ChatGPT...

1 day ago

Lobsters

One day with Zig, Raylib, and jj

2024-12-25 Merry Christmas! Back from the mission, first semester at MIT is in the books! Now I am at home, with family, on a break from school. A couple days ago, I was telling my younger brother how cool Zig (the programming language) was. He was like, “if Zig is so cool, why don’t you … like, use it?” Oof. So I installed Zig, pulled in some neat bindings for raylib, and spent the afternoon writing a little interactive scrabble...

1 day ago

Lobsters

Reads causing writes in Postgres

Alex Jesipow2024-12-21It is good practice to regularly inspect the statements running in the hot path of your Postgres instance. One way to do this is to examine the pg_stat_statements view, which shows various statistics about the SQL statements executed by the Postgres server.Among many other interesting columns, you will find the shared_blks_dirtied and shared_blks_written columns. They keep track of how many blocks, Postgres' smallest unit of I/O, in the shared buffer cache are modified by a statement and (ultimately) written...

1 day ago

Lobsters

Server-Sent Events (SSE) Are Underrated

25 Dec, 2024 Most developers know about WebSockets, but Server-Sent Events (SSE) offer a simpler, often overlooked alternative that deserves more attention. Let's explore why this technology is underrated and how it can benefit your applications. What are Server-Sent Events?SSE establishes a one-way communication channel from server to client over HTTP. Unlike WebSockets' bidirectional connection, SSE maintains an open HTTP connection for server-to-client updates. Think of it as a radio broadcast: the server (station) transmits, and clients (receivers) listen. Why...

1 day ago

Lobsters

what's some of your favorite software?

Merry Christmas, Lobsters! I’ve been spending lot of time complaining (in meat space) lately about crappy software I have to use, and I want to take a little time to focus instead on software that I quite like, seems well-made, and measurably makes my life better. Paprika - simple recipe management, grocery lists, and meal planning. Intuitive UI and well-thought-out flourishes make this app a pleasure to use and more than worth the 5USD to me. I love being able...

1 day ago

Lobsters

Racket School 2019: How to Design Languages

7.4.0.4Matthias Felleisen, Matthew Flatt, Robby Findler, Jay McCarthy, Jesse TovThis summer school track introduces attendees to the Racket way of language-oriented programming and language building.The table below presents a concise summer school schedule. Most sessions will consist of a lecture part and a hands-on lab. Our goal is to lecture for less than 90 minutes and to give you at least 120 minutes of lab time. The lectures will introduce basic ideas. The labs will provide you with a chance...

1 day ago

Lobsters

Faster Positional-Population Counts for AVX2, AVX-512, and ASIMD

Skip to main content View PDF HTML (experimental) Abstract:The positional population count operation pospopcnt() counts for an array of w-bit words how often each of the w bits was set. Various applications in bioinformatics, database engineering, and digital processing exist. Building on earlier work by Klarqvist et al., we show how positional population counts can be rapidly computed using SIMD techniques with good performance from the first byte, approaching memory-bound speeds for input arrays of as little as 4 KiB....

1 day ago

Lobsters

I Thought I Found a Bug…

So I was working on improving a DOS emulator, when I found that something seemingly trivial wasn’t working right when COMMAND.COM was asked to do the following: echo AB> foo.txtecho CD>> foo.txt Instead of ABCD, foo.txt contained ABBC. I verified that yes, the right data was being passed to fwrite(), with the big caveat that what COMMAND.COM was doing wasn’t quite as straightforward as one might think: Open foo.txt Write ‘AB’ Close foo.txt Open foo.txt Seek one byte backward from...

1 day ago

Lobsters

Electronics Test Gear on the Cheap

It is amazing to me how inexpensive electronics test gear has become, and yet these devices work well. Certainly they are good enough if you are just entering the hobby, and not sure you want to spend hundreds, if not thousands, on a piece of test equipment. Here are some inexpensive test equipment in order how important I find them to be. Multi-Meter You cannot survive without a multi-meter and you will probably end up wanting several so you can...

1 day ago

Lobsters

Gathering Data On TLS Power Draw Measurements

On Christmas Eve 2024, I got into an argument on the Lobste.rs IRC channel, in which a user insinuated that "unnecessary" TLS encryption is a notable contributor to global warming. When challenged on this claim, they engaged in bad-faith arguments right off the bat. Names have been changed to save the guilty the embarrassment. <iloveoil> i wonder how much all the unnecessary tls encryption worldwide had contributed to the global warming <me> very little because it's all hardware accelerated <iloveoil>...

1 day ago

Lobsters

Rust and WebAssembly (2019)

This small book describes how to use Rust and WebAssembly together. This book is for anyone interested in compiling Rust to WebAssembly for fast, reliable code on the Web. You should know some Rust, and be familiar with JavaScript, HTML, and CSS. You don't need to be an expert in any of them. Don't know Rust yet? Start with The Rust Programming Language first. Don't know JavaScript, HTML, or CSS? Learn about them on MDN. You should read the motivation...

1 day ago

Lobsters

ncurses-rs has been archived

Merry Christmas, folks. I’m just dropping a heads up that I have archived https://github.com/jeaye/ncurses-rs and will not be developing it further. I first made ncurses-rs nearly 11 years ago and both Rust and its library ecosystem were incredibly different back then. Over the past decade, my attention has shifted to focus on other projects and ncurses-rs has received some love from the community to help it along. For that, I’m grateful. These days, with Rust’s rich and thriving library ecosystem,...

1 day ago

Lobsters

Into CPS, never to return

CPS, or continuation-passing style, is an intermediate representation for programs, particularly functional programs. It’s used in compilers for languages such as SML and Scheme. In CPS, there are two rules: first, that function/operator arguments must always be trivial; second, that function calls do not return. From this, a lot falls out. In this post, we’ll introduce CPS by building a simple (Plotkin1) CPS transform from a small Scheme-like language. We’ll sketch some optimizations on the IR. Then we’ll look at...

1 day ago

Lobsters

150 papers for Software Engineers

You can’t perform that action at this time.

1 day ago

Lobsters

IBM Christmas Virus (1987)

Please try the URL privacy information feature enabled by clicking the flashlight icon above. This will reveal two icons after each link the body of the digest. The shield takes you to a breakdown of Terms of Service for the site - however only a small number of sites are covered at the moment. The flashlight take you to an analysis of the various trackers etc. that the linked site delivers. Please let the website maintainer know if you find...

2 days ago

Lobsters

How I debugged a 2 year old "fake debugged" multithreading bug

"અધૂરું જ્ઞાન હોવા કરતા કશું ન જાણવું વધુ સારું છે." "It's better to know nothing than to have half-knowledge." (translation) -- Frequently forwarded WhatsApp "wiSdoM" This is a story of how I "fake debugged" one of the worst multi-threading bugs we saw at work around 2 years ago and then how I really debugged it yesterday. First signs of trouble Multiple users at work reported getting column "name" is ambiguous errors randomly while doing anything. This is an error reported...

2 days ago

Lobsters

38C3 lobste.rs meetup

Yo, Last year there was some discussion on IRC about a lobste.rs meetup at Chaos Communication Congress. As there are multiple people from this community heading for congress I thought it would be nice to plan another meetup. I’ve looked at the self-organized sessions and there is a free spot in Saal 6, 22:00 - 23:00 Day 3. I’ve reserved (not published it) it in case that would work out for most people, but alternatively we can just have a...

2 days ago

Lobsters

Against a universal definition of ‘type’

This is part of an Advent Series. This is the final entry in the series and I'll be honest, I'm a bit glad it's over. It's been hard to consistently find the time every day to 1) find a paper I'm truly interested in writing about 2) read that paper in a way I can summarize it 3) write something somewhat interesting about the paper. Honestly, I think finding the papers that fit my mood was the hardest part. I...

2 days ago

Lobsters

Expanding what HTTPS means

So you have a device, maybe IoT, or just something that sits in a home somewhere. You want to be able to talk to it with HTTPS. Recall Zooko’s “meaningful, unique, decentralized” naming trichotomy. HTTPS chooses to drop “decentralized”, relying on DNS as central control. In effect, HTTPS follows a pretty narrow definition. To offer a server that works, you need to offer a TLS endpoint that has a certificate that meets a pretty extensive set of requirements. To get...

2 days ago

Lobsters

Interfaces in Go: Simplified with a silly Analogy

Knowledge is Power! Dec 25, 2024 — 3 min read Photo by Trude Jonsson Stangel / Unsplash This is how I finally made sense of interfaces in Go. There are countless resources out there, but fails to simplify how to grasp and implement interfaces effectively, atleast for me. While observing my niece one day (toddlers can be surprisingly inspiring!), an analogy clicked in my mind. Let me walk you through it - please bear with me. lol lol The Analogy...

2 days ago

Lobsters

B800 Text

B800 Text is a text-mode screen dump, and under x86 real mode (such as used by DOS) can be copied byte for byte into video memory starting at B800:0000, causing the data to appear on the screen when the video card is in text mode. It is most often used to display the final text screen after quitting a game, with the DOS prompt appearing on the last line once the game has terminated. File format Full CGA 16-color palette...

2 days ago

Lobsters

Ruby 3.4.0 Released

Posted by naruse on 25 Dec 2024 We are pleased to announce the release of Ruby 3.4.0. Ruby 3.4 adds it block parameter reference, change Prism as default parser, adds Happy Eyeballs Version 2 support to socket library, improves YJIT, adds Modular GC, and so on. it is introduced it is added to reference a block parameter with no variable name. [Feature #18980] ary = ["foo", "bar", "baz"] p ary.map { it.upcase } #=> ["FOO", "BAR", "BAZ"] it very much...

2 days ago

Lobsters

Minimal Version Selection Revisited

In this post, I want to highlight one aspect of Go-style minimal version selection that I have missed completely at first. Maybe you missed it too? If you recall, some years ago there was a discussion of various version selection algorithms in the Go and the Rust communities. See this list for a refresher: https://research.swtch.com/vgo Broadly, when you write foo = "1.2.3" in the manifest for your library, what you are specifying is not a specific version of foo, but...

2 days ago

Lobsters

2024 State of the Adélie Linux Distribution

AUSTIN (December 24, 2024) — The Adélie Linux distribution recently celebrated its sixth beta release and is making steady progress toward a 1.0 general release. In the 12 months since the 2023 status update, we’ve released several BETA5 updates and landed BETA6. Press coverage has been notable. We’ve been featured by The Register and DistroWatch, and we’re happy to see retrocomputing enthusiasts and smaller outlets diving in as well. This status update is ambitious. I cannot overstate how significant BETA6...

2 days ago

Lobsters

AI-generated tools can make programming more fun

I want to tell you about a neat experience I had with AI-assisted programming this week. What’s unusual here is: the AI didn’t write a single line of my code. Instead, I used AI to build a custom debugger UI… which made it more fun for me to do the coding myself. I was hacking on a Prolog interpreter as a learning project. Prolog is a logic language where the user defines facts and rules, and then the system helps...

2 days ago

Lobsters

ClipboardManager for macOS which can clip images, text and can sync to your Obsidian vault

A powerful clipboard manager for macOS that seamlessly integrates with your workflow. Copy any content - text, images, or files - and access them quickly through a native macOS app. Optionally sync your clipboard history with Obsidian for permanent storage and organization. Demo on youtube Quick Access: Access your clipboard history instantly through the menu bar Universal Search: Find any copied content quickly with the powerful search interface Rich Content Support: Text with formatting Images and files Source application tracking...

2 days ago

Lobsters

Jujutsu Megamerges and jj absorb

A workflow a number of Jujutsu VCS users have landed on when you have multiple (possibly unrelated) streams of work active in a repository goes like this: Create a branch for each stream of work. Create a merge commit (in Jujutsu, this is just jj new <list of parents>. If you have three branches whose tip commits are c, n, and x, you would write jj new c n x. Create a new commit on top of that merge, which...

2 days ago

Lobsters

What custom keyboard or layout are you using?

The layout, do you use it on all keyboards or devices like phones?

2 days ago

Lobsters

Cashing in on GIF by charging royalties

On December 24, 1994, Compuserve and Unisys tried to give themselves a Christmas gift and make the Internet pay for it. They announced their plans to charge royalties on the GIF file format, which, at the time, was a staple of early web development.Origins of GIFIn 1994, Unisys was losing relevance as a maker of large computers for datacenters. Monetizing the GIF file format proved widely unpopular, however.Originally, GIF was a file format developed by CompuServe so they would have...

2 days ago

Lobsters

Tiny challenges for learning WebAssembly

Tiny programming challenges designed for learning about WebAssembly by writing it by hand. Each challenge has a .wat file where you'll need to implement a WebAssembly module to pass the tests. Run node tests.mjs to run the tests and to see the recommended order for solving the challenges. The challenges have descriptions within their .wat files, but it some cases it will also be useful to look inside tests.mjs to better understand the different test cases. Remove the ;; SOLVE...

3 days ago

Lobsters

Serpent OS Enters Alpha

It's been a few months since hearing anything new out of Serpent OS, the original Linux distribution led by Ikey Doherty, who started Solus Linux and also was involved with Intel's Clear Linux. As a Christmas surprise, Serpent OS has now reached the alpha stage of development. Serpent OS was announced today in alpha form as "a significant step forward in the project’s journey. While the usual disclaimers apply, as a certain level of project fluidity is to be expected,...

3 days ago

Lobsters

Symbolic Execution by Overloading __bool__

A few months ago I saw a talk on buildit, https://buildit.so/ a really neat project that achieves staged metaprogramming as a C++ library. I love the central tenets of being in a mainstream language and not requiring a modified compiler. Right on, brother. One thing I came away with was a neat trick for getting non-overloadable syntax to be overloadable. The interesting observation, which seems clear in hindsight (the best observations are), is that bool conversion is overloadable by writing...

3 days ago

Lobsters

Merry Everything and Happy Holidays my favorite crustaceans

I wish you all an enjoyable time off. Whether it’s off work or work where you’re off your non-working coworker’s. I hope you all get a nice break to rest and reflect. 🦞🦞🦞 P.S.: super special extra appreciation for our admins and mods. You’re the best.

3 days ago

Lobsters

Debian’s approach to Rust - Dependency handling (2022)

Hello, you've been (semi-randomly) selected to take a CAPTCHA to validate your requests. Please complete it below and hit the button! Log in Copyright © 2009-2024 Dreamwidth Studios, LLC. Some rights reserved.

3 days ago

Lobsters

Context-Generic Programming

Overview Welcome to Context-Generic Programming! If you are new here, please read the announcement blog post about the launch of the project. Introduction Context-generic programming (CGP) is a new programming paradigm for Rust that allows strongly-typed components to be implemented and composed in a modular, generic, and type-safe way. In this section, we will walk through some of the advantages CGP provides. Modular Component System CGP makes use of Rust's trait system to define generic component interfaces that decouple code...

3 days ago

Lobsters

Controlling Nondeterminism in Model-Based Tests with Prophecy Variables

December 23, 2024 We have to constantly wrestle with nondeterminism in tests. Model-based tests present unique challenges in dealing with it, since the model must support the implementation’s nondeterministic behavior without leading to flaky failures. In traditional example-based tests, nondeterminism is often controlled by adding stubs, but it’s not immediately clear how to apply this in a model-based context where tests are generated. We’ll look to the theory of refinement mappings for a solution. In model-based testing, we construct a...

3 days ago

Lobsters

ABC: Learning The Alphabet with Java Annotations

By Sergey Tselovalnikov on 23 December 2024Hi, kids, old and young! This Christmas, a couple of friends of mine are visiting me with Jackie, their little one. Jackie is young but is already getting good at mastering the alphabet. Naturally, I decided to prepare this article to help Jackie step the game up during Christmas. After all, nothing says “Christmas spirit” quite like learning the alphabet through Java annotations, right? So, welcome to this Christmas special blog, and I hope...

3 days ago

Lobsters

Lock Files Considered Harmful

This post is about files used by dependency management tools like Yarn, to cache the results of non-deterministic processes (e.g. querying HTTP servers). This post is not about files used as sentinels to prevent concurrent access! TL;DR Why Avoid Lock Files? Lock files are a hack to minimise the use of brittle, slow and insecure legacy tooling. They complicate the development process, and require extra manual interventions. Their presence is a symptom of poor design: good tools should be reliable, fast...

3 days ago

Lobsters

What are you doing?

The title is intended to mirror the frequent "What are you doing today / this weekend / this summer?" topics.I find it very helpful to regularly ask myself "What are you doing?" when something isn't going how I expected. This applies to many things - not just software development.Have you ever gotten upset with someone because they ruined a surprise you were trying to give them?Think about that. What were you trying to do? Make them happy.

4 days ago

Lobsters

postmarketOS v24.12: The One With Androids Cameras, But It's Mainline Linux

December 23, 2024This release is geared mainly towards Linux enthusiasts. We are working hard on stability improvements and automated testing, but if you expect Android or iOS levels of polish, then this is not for you yet. Systemd is coming in the next one.IntroductionOne thing that people have been asking us over and over is, will it be possible to use cameras with postmarketOS on Androids? While of course we all would like to see that, this is a significant...

4 days ago

Lobsters

Efficient, Portable, Census-Polymorphic Choreographic Programming

Skip to main content View PDF Abstract:Choreographic programming (CP) is a paradigm for implementing distributed systems that uses a single global program to define the actions and interactions of all participants. Library-level CP implementations, like HasChor, integrate well with mainstream programming languages but have several limitations: Their conditionals require extra communication; they require specific host-language features (e.g., monads); and they lack support for programming patterns that are essential for implementing realistic distributed applications. We make three contributions to library-level CP...

4 days ago

Lobsters

How to Program a Chess Engine in Lisp

2024-11-06 :: programming, racket, artificial intelligence, lisp, scheme Last updated 2024–11–29 18:48 Table of Contents Introduction Programming a competent chess engine in lisp has been a goal of mine for some time. I finally did so in 2021, and it was a lot of fun! My new goal is to rewrite the code in a step by step way that emphasizes clarity, and to present it as a clear tutorial for writing a chess engine, and as a general Racket...

4 days ago

Lobsters

Hello emacs.tv

█████ ██ ██ ██ █████ ██████ ██████ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ███████ ██ ██ ██ ███████ ██████ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ███████ ████ ██ ██ ██ ██ ██████ December 23, 2024 A few days ago, Sacha Chua mentioned how cool it would be to have an Emacs video index like Ruby Video. I mentioned how I had similarly considered a low-tech solution,...

4 days ago

Lobsters

Building Low-Maintenance Community Websites

I have a confession to make.At the start of this project we said “No New Registries”.Reader, we built one.In our defence, I’d argue this only happened because it came into conflict with another of our principles: “Empower Others”.Before I joined (almost a year ago now), the DPC had already committed to creating a ‘Skills Development Resource’ based on our Digital Preservation Competency Framework. This resource was envisaged as a community-sourced collection of links to training and development activities and resources,...

4 days ago

Lobsters

C++ Is An Absolute Blast

By Zed A. ShawI want you to ask yourself an honest question. When was the last time you actually had fun in programming? Looking back, I don't think I've actually had fun in programming for close to...10 years? I don't have fun with JavaScript, Python, Ruby, C, nothing. When I say "fun" I mean, you genuinely were excited to work on your project and the whole time you work on it you're thinking, "Damn this is a blast. I can't...

4 days ago

Lobsters

Ssh Oauth-like service for CLI apps

██ ██ ███████ ██ ██ ██████ ██ ██ ██████ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ █████ █████ ████ ██████ ██ ██ ██████ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ███████ ██ ██ ██████ ██████ $ ssh keypub.sh about Verified registry linking SSH public keys to email addresses No installation or configuration needed - works with your existing SSH setup Privacy-focused: you control what information is public or private Simple email verification...

4 days ago

Lobsters

From Nix to Eos

This piece explores the evolution of store-based systems and our vision for their future. While I’ve aimed to make it accessible to those not intimately familiar with Nix, I assume some technical foundation—particularly an interest in software distribution at scale. If terms like “reproducible builds” or “supply chain security” don’t pique your curiosity, what follows might feel rather academic. However, if you’re intrigued by how we might tackle the growing complexity of software distribution while maintaining security and sanity, read...

4 days ago

Lobsters

A worked example of copy-and-patch compilation

22nd December 2024 I’ve been working on-and-off on a toy compiler. It started when I thought it would be a good idea to add extra language features to the C compiler I was working on. I eventually decided that was probably a poor idea, but that writing a completely new language made sense (?). Or was at least more fun! In any case, I have been grappling on-and-off with that enjoyable black hole of a project, but it’s still deep...

4 days ago

Lobsters

My colleague Julius

by Ploum on 2024-12-23Do you know Julius? You certainly know who I’m talking about! I met Julius at university. A measured, friendly young man. He always wore a smile on his face. What struck me about Julius, aside from his always perfectly ironed clothes, was his ability to listen. He never interrupted me. He accepted gratefully when he was wrong. He answered questions without hesitation. He attended all the classes and often asked for our notes to "compare with his...

4 days ago

Lobsters

Application blackbox

In aviation, a “black box” is the colloquial term for the flight recorder, a device that records the recent history of a flight. This device is designed to be robust to a potential crash such that the recovered data can be later used during investigation. blackbox applies this idea to software. The principle goal of blackbox is to enable applications to save arbitrary (but structured) data during runtime and allow that data to survive any kind of crash, even SIGKILL....

4 days ago

Lobsters

Making a Trello clone using htmx

In my last article, I looked at front-end technologies and sang the praises of htmx, which I declared is a simpler way of implementing dynamic web applications. Simpler than the prevailing choice of today, which usually means some form of React or Vue, and which forces you to use JavaScript and have complicated build processes in order to get something working. Predictably, I got some reactions from front-end developers. Some of those were positive or ‘positive but’. Many of the...

4 days ago

Lobsters

A Tour of WebAuthn

This book was distributed at the FIDO Authenticate conference in 2024. Its intended format was as a PDF, which you can find here. The following is the contents of the PDF converted to HTML. 1: Introduction Passwords are rubbish. If you’re reading this book then hopefully you’re already on board with this idea, but let’s recap anyway. The typical practice with passwords is to remember a few different ones and re-use them widely. (Password managers support generating random passwords, but...

4 days ago

Lobsters

Debu.gs: Try Inferno without Installing It

Pete Elmore, 2013-04-06 04:22The thing I said here is actually a really real thing. Inferno’s usually easy enough to get up and running. There’s some mkfile tweaking, sometimes there are some platform-specific bugs, you’ll have to adjust your path, etc. It can be a bother. It’s definitely worth it, but you can’t tell that until you go through the effort. Downloads that take three minutes are annoying to people nowadays, and this is 10 minutes of tinkering and compiling. I...

4 days ago

Lobsters

How to collect performance statistics with Cabal

Hécate December 23, 2024 [Cabal] #Performance #Profiling The Cabal Manual now has a guide on how to collect performance statistics of Haskell applications. This guide was very generously contributed by Malte Neuss. It describes the various options you can set in your cabal.project file in order to get a time or space profile of your application. Project Configuration Guide It is the recommended entry point for newcomers into the world of Haskell performance analysis. As you progress through it, you...

4 days ago

Lobsters

Formal Methods: Just Good Engineering Practice?

Earlier this week, I did the keynote at TLA+ conf 2024 (watch the video or check out the slides). My message in the keynote was something I have believed to be true for a long time: formal methods are an important part of good software engineering practice. If you’re a software engineer, especially one working on large-scale systems, distributed systems, or critical low-level system, and are not using formal methods as part of your approach, you’re probably wasting time and...

4 days ago

Lobsters

How Many Hours Can You Code?

How many hours a day can you write code, and at what point does the quality of your work go down? Even more important is how many weeks and months of that max effort you can still be effective.In my life, there have only been three periods where I worked crazy hours, and only two of those were multiple months. Generally, over my forty years, I worked a reasonably regular schedule. The standard forty hours a week rarely involve only...

4 days ago

Lobsters

What are you doing this week?

What are you doing this week? Feel free to share! Keep in mind it’s OK to do nothing at all, too.

4 days ago

Lobsters

Problem Driven Development

Figuring out what to do is a big part of senior tech roles. Senior Engineers and Engineering Managers often struggle to define technical roadmaps. Reasons include: There’s little industry training on how to do it It can be daunting to prioritize against professional PMs who are specifically selected and trained to be persuasive Some organizations expect PMs to be responsible for all prioritization in teams, making Engineering roadmap ownership ambiguous Oftentimes, good technical vision can feel like it has to...

4 days ago

Lobsters

What would it take to add refinement types to Rust?

A few years ago, on a whim, I wrote YAIOUOM. YAOIOUM was a static analyzer for Rust that checked that the code was using units of measures correctly, e.g. a distance in meters is not a distance in centimeters, dividing meters by seconds gave you a value in m / s (aka m * s^-1). YAIOUOM was an example of a refinement type system, i.e. a type system that does its work after another type system has already done its...

4 days ago

Lobsters

Fast LLM Inference From Scratch

Contents Source code for this article on GitHub. Discussion on Hacker News. This post is about building an LLM inference engine using C++ and CUDA from scratch without libraries. Why? In doing so, we can learn about the full stack of LLM inference - which is becoming increasingly importantEspecially as inference compute becomes a new axis with which AI models scale, and models are increasingly deployed locally to devices on the edge. - from CUDA kernels to model architecture, and...

4 days ago

Lobsters

Goodhart's Law Isn't as Useful as You Might Think

This is Part 1 of the Becoming Data Driven in Business series. Goodhart’s Law is a famous adage that goes “when a measure becomes a target, it ceases to be a good measure.” If you’re not familiar with the adage, you can go read all about its history on Wikipedia, and perhaps also read the related entry on the ‘cobra effect’ (which includes a litany of entertaining perverse incentive stories, of which the eponymous cobra anecdote is merely one):The British...

5 days ago

Lobsters

Hacking Life into My Little Counter

I always have fun bringing the digital into the physical world. Things that you can touch and hear give tactile joy - bonus points if there’s no/low-power display. So someone at work posted that the Shopify Counter was available for something like 10% of the manufacturer’s list price, I jumped at the chance to pick one up and hack something together. By default, the counter guides you to configure sales/orders to display, but we can have more fun than that....

5 days ago

Lobsters

On Long Term Software Development

Recently the Dutch Electoral Board (where I am also a very part time advisor) invited me to do a talk reflecting on their open source Abacus vote tabulation software. Much software is now provided as a service, and is typically deployed continuously (CD, continuous deployment), surrounded by enough automated testing (CI, continuous integration) that we can be reasonably sure that a new revision is likely to at least work to some extent. In contrast, there is also still a huge...

5 days ago

Lobsters

Unnecessary Optimization in Rust: Hamming Distances, SIMD, and Auto-Vectorization

Dec 20, 2024 If you're developing an application and find yourself running a benchmark whose results are measured in nanoseconds... you should probably stop and get back to more important tasks. But here we are. I'm using binary vector embeddings to build Scour, a service that scours noisy feeds for content related to your interests. Scour uses the Hamming Distance to calculate the similarity between users' interests and each piece of content. (As a refresher, the Hamming Distance between two...

5 days ago

Lobsters

How bloom filters made SQLite 10x faster

This is the fascinating story of how researchers used Bloom filters cleverly to make SQLite 10x faster for analytical queries. These are my five-minute notes on the paper SQLite: Past, Present, and Future (2022). I’ll also explain some database internals and how databases implement joins.BackgroundSQLite is a B-tree on disk, row-based storage. It internally uses a VM called VDBE to execute queries. It is cross-platform, single-threaded, and runs almost everywhere.SQLite is a general-purpose database, but it excels at OLTP workloads....

5 days ago

Lobsters

Why we use our own hardware at Fastmail

This is the twenty-second post in the Fastmail Advent 2024 series. The previous post was Dec 21: Fastmail In A Box. Check back tomorrow for another post. Why we use our own hardware There has recently been talk of cloud repatriation where companies are moving from the cloud to on premises, with some particularly noisy examples. Fastmail has a long history of using our own hardware. We have over two decades of experience running and optimising our systems to use...

5 days ago

Lobsters

Minimilistic Log Moniitoring System

Minimilistic Log Dashboard for personal projects. Setting up a dashboard for projects at initial stages will save you hastle to integrate and use log aggregators. HueLogs is minimal and quick log monitoring setup for projects at small scale. 1. docker compose up --build 2. open this in browser (default): http://127.0.0.1:5000/ You may directly call an API to send logs, or use a package: curl -X POST http://127.0.0.1:5000/api/add-log \ -H "Content-Type: application/json" \ -d '{"message": "This is a test log"}' install...

5 days ago

Lobsters

Do Not Fix Bugs Reported in Your Open Source Projects

Have you watched The IT Crowd? It’s a hilarious British television sitcom from around 2006 that cast a bunch of IT geniuses at the Reynholm Industries tech support department in London. One of the signature laughs is that every time the phone rang, Roy would pick it up and without waiting say “Have you turned it off and on again?”, then hang up. I often feel like Roy when engaging with users reporting bugs in open-source projects I maintain. Here’s...

5 days ago

Lobsters

Four limitations of Rust’s borrow checker

I’ve been using Rust for hobby projects since 2016 and have been working professionally in Rust since 2021, so I tend to consider myself pretty knowledgeable about Rust. I’m already familiar with all the common limitations of Rust’s type system and how to work around them, so it’s pretty rare that I have to “fight the borrow checker” as new Rust users often struggle with. However, it does still happen on occasion. In this post, I’ll cover four surprising limitations...

5 days ago

Lobsters

sqlite.directory

Running on Hetzner and Ubuntu. Using SQLite for persistence, queue, and cache. Running on DigitalOcean and Ubuntu. Using SQLite for persistence, queue, and cache. Running on Hetzner and Ubuntu. Using SQLite for persistence, queue, and cache. Running on Hetzner and Ubuntu. Using SQLite for persistence, queue, cache, and pubsub. Running on Hetzner and Ubuntu. Using SQLite for persistence. Visit app ↗ View source ↗ Using SQLite for persistence and queue. Visit app ↗ View source ↗ Using SQLite for persistence....

5 days ago

Lobsters

Let's Build Snake with Rust (2020)

Since 2016, Rust has been voted the “most loved programming language” every year in the Stack Overflow Developer Survey by what appears to be a growing margin, and after checking it out for myself, it’s pretty clear why. Rust offers a plethora of features you’d expect from a modern language and addresses pain points that are present in many others. It competes in the same kind of space occupied by C and C++, offering similar performance, but it is also...

5 days ago

Lobsters

UIs Should Be Versioned, Just Like We Version APIs

Every organization that offers an application programming interface almost immediately starts to version it. APIs are essentially contracts between us, service providers, and our users. The bargain is you build your app using our service in some presumably mutually beneficial arrangement, and in exchange we promise to give you a stable platform atop which you will construct your dreams. Everyone agrees that it is extremely rude to break an API. Changing APIs unexpectedly makes our users sad because their robots...

5 days ago