More from Paolo Amoroso's Journal
<![CDATA[GravityLoops, my gravity simulator in Interlisp and LOOPS, can finally show something on the screen. The program now animates a body of mass like the Moon interacting under gravity with a body of mass like the Earth. The dots in the simulation window here are the bodies after 180 days of simulated time, with the Earth at left. Watch the full run. Screenshot of a still frame of a simulation of a body like the Earth and one like the Moon interacting under the muatal gravity. Well, that's not much. But the code confirms the simulation loop with an offscreen buffer works well. After putting in place some infrastructure, to get there I wrote the simulation loop, tweaked a few methods, wrote a demo function that sets up the simulation, and fixed a few bugs. There's a lot more to do. I need to make the graphics of the body markers more complete and explanatory, control the speed of the animation, fix more bugs, and refactor to decouple some interclass dependencies. And, of course, GravityLoops will also have a user interface to control the simulation and enter the parameters. #GravityLoops #Interlisp #Lisp a href="https://remark.as/p/journal.paoloamoroso.com/early-simulations-with-gravityloops"Discuss.../a Email | Reply @[email protected] !--emailsub--]]>
<![CDATA[I started working on the class Universe of GravityLoops, my gravity simulator in Interlisp and LOOPS. I defined the class itself and the main methods, Universe.Register and Universe.Simulate. The class represents a collection of bodies and manages the parameters and state of the simulation. Universe.Register adds a body to a universe, Universe.Simulate runs the simulation. In the C++ code of the article my design draws inspiration from, an instance variable of the class UNIVERSE holds a pool of bodies in an array, with the most recently added body indexed by another instance variable. In GravityLoops the corresponding instance variable bodyPool is a list which, as the article notes, is more versatile and doesn't need the index. Universe.Simulate, just a stub for now, is the core method. It will update the state of the simulation, display the bodies in a graphical window along with status information, and check whether the user interrupts the simulation. The C++ program runs the simulation until the user presses a specific key and GravityLoops will have a similar feature. I'll also have the program accept a number of time ticks to step the simulation through. For Universe.Simulate I'll mostly follow the C++ code. But I plan to revisit the decision after I have something running to experiment with. I may want to split the simulation functionality into more than one method to separate the simulation itself from output, or redesign control around LOOPS' active values. #GravityLoops #Interlisp #Lisp a href="https://remark.as/p/journal.paoloamoroso.com/representing-the-universe-of-gravityloops"Discuss.../a Email | Reply @[email protected] !--emailsub--]]>
<![CDATA[I started working on GravityLoops, a software that simulates a collection of bodies interacting under the mutual gravity. I develop it on Medley in Interlisp and its object extension LOOPS, the Lisp Object-Oriented Programming System. GravityLoops will show an animation of the bodies and their motions, along with facilities for defining the parameters of the system and controlling the simulation. Motivation I've been meaning to do a LOOPS learning project but none of the ideas I initially came up with clicked. I wanted something more complex than a toy but easy enough to implement with reasonable effort. The project should also incorporate naturally the features of LOOPS, such as the gauges library of graphical meters and dials for displaying quantities. I finally stumbled upon the gravity simulator described in the article Force-Based Simulations by Todd King in the September, 1989 issue of Dr. Dobbs Journal. It's just perfect. I'm adapting to LOOPS the design of the sample C++ code that comes with the article. It's nice as it reads like an object-oriented domain specific language for simulation. The code is so short and clean I can fully understand it despite my minimal C++. I never thought I would say that of C++. There is much to like of King's program starting from its domain, astronomy and physics, which overlaps with some of my passions. The project is period accurate too as when Dr. Dobb's Journal published the article LOOPS was still under development. And, along with window systems, simulation was among the killer applications object-oriented programming proponents pointed to. The program comprises only two, hierarchically unrelated classes, a shallow inheritance design more in line with the later evolution of object-oriented programming. But the application does offer other potential classes that are a good fit for LOOPS. For example, I plan to specialize the LOOPS class Window to represent the simulaton window. I will likely need more classes for the GUI, such as dialogs for entering the simulation parameters. LOOPS is one of the subsystems best integrated with the Interlisp environment and comes with good documentation. I want to experience this high integration, the ability of combining tools designed to work together that comes natural once you're familiar with the environment. Adapting King's program to the Interlisp environment is also an opportunity to employ useful programming techniques like screen buffering to improve animation fluidity. Plus, anything that draws pretty graphics is fun. Design To adapt Todd's design to LOOPS I create matching classes with similar instance variables and methods, named according to the LOOPS style. I will rename a few confusing methods, such as UNIVERSE::service() to register a body with a universe which I'll call Universe.Register, and UNIVERSE::big_bang() to run the simulation which will become Universe.Simulate. The C++ code represents a 2D vector as a struct that I map to an Interlisp record. A class seems overkill. Todd's program outputs to the MS-DOS text console via the conio library. GravityLoops instead will draw graphics in a window. So far the code implements the Body class that represents a body. I'm about to start working on the Universe class that holds a collection of bodies and manages the parameters and state of the simulation. Once the core classes are in place I will turn to implementing the animated simulation. #GravityLoops #Interlisp #Lisp a href="https://remark.as/p/journal.paoloamoroso.com/gravityloops-a-gravity-simulator-in-interlisp-and-loops"Discuss.../a Email | Reply @[email protected] !--emailsub--]]>
<![CDATA[Insphex adds the Hexdump item to the File Browser menu to view the hex dump of the selected files. The initial implementation called the public API for adding commands at the top level of the menu. To later move the item to the See sumbenu that groups various file viewing commands I resorted to list surgery, as the API doesn't support submenus. The problem is internal system details can and do change, which happened to the File Browser menu and led to an Insphex load error. I fixed the issue by reverting the public API call and now the item is back at the top level of the menu. Insphex is a hex dump tool similar to the Linux command hexdump. I wrote it in Common Lisp on Medley Interlisp. #insphex #CommonLisp #Interlisp #Lisp a href="https://remark.as/p/journal.paoloamoroso.com/rearranging-the-file-browser-menu-for-insphex"Discuss.../a Email | Reply @[email protected] !--emailsub--]]>
More in programming
by Natalia Markoborodova In the history of HTMHell, 35 entries in the Hell collection and about 130 Advent Calendar articles since 2021, the <canvas> element has never been roasted. Not once. This is probably because there was never much to roast. Until Chrome 157, a canvas full of text and buttons was, as far as HTML was concerned, a single element: the text and buttons were just pixels, with no markup behind them. You can't write bad markup if there's no markup. Canvas wasn't in HTMHell. Like the souls in limbo, the first circle of Dante's hell, it did nothing wrong. It was just shut out on a technicality. This year, the deal changed. Chrome 157 shipped the HTML-in-Canvas API, and before it even shipped, the web lost its mind over it. Let's talk about what it is, and, more interestingly, why so many people cared. Welcome to canvas hell Bad markup gets you into HTMHell. No markup gets you here: <!-- 🔥 Canvas hell 🔥 --> <canvas id="wishlist" width="600" height="400" aria-hidden="true"></canvas> <script> const ctx = wishlist.getContext("2d"); ctx.font = "24px serif"; ctx.fillText("Dear Santa, I would like:", 20, 40); ctx.fillText("1. A puppy", 20, 80); // ...and now hand-roll a text input. With a caret. And selection. // And IME support. And right-to-left text. Good luck. </script> Those are pixels pretending to be words. To an unsuspecting user, the result looks like a regular web page, but under the hood, there are no text nodes, no elements, and nothing in the accessibility tree behind it. The disguise falls apart as soon as the user tries to interact with the content: screen readers can't help, Ctrl+F finds nothing, and Santa can't select items from your wishlist, copy it, or translate it. If you want real interactive content in a canvas, like text fields, links, or buttons, you've had two options: Rebuild the browser yourself: Draw text fields, carets, and selection highlights with canvas calls, handle every keystroke in JavaScript, and maintain a second, invisible DOM so assistive technology has something to read. Many apps do exactly this, and this means building and keeping in sync two UIs. For example, Google Docs moved to canvas rendering in 2021, reassuring users that screen readers, braille devices, and screen magnification would not be affected (although a warning that some Chrome extensions might stop working was in place). Float real HTML on top of the canvas and recalculate its style.transform every frame. It jitters when the camera moves, it can never sit behind a 3D object, and the browser re-parses CSS strings every frame for every overlay. The first option makes accessibility a separate project that you have to build and maintain yourself. The second keeps the HTML accessible, but turns visual sync into a constant battle. And neither is fun. Welcome to HTML-in-Canvas heaven HTML-in-Canvas flips this around. You put real HTML inside the <canvas> element and ask the browser to draw it: <canvas id="canvas" width="600" height="400" content="drawable"> <form id="letter" drawable> <h2>Dear Santa,</h2> <label for="wish">I would like:</label> <input id="wish" name="wish" autocomplete="on" value="a puppy"> <button>Send to the North Pole</button> </form> </canvas> const ctx = canvas.getContext("2d"); canvas.onpaint = () => { ctx.reset(); ctx.drawElementImage(letter, 20, 20); }; content="drawable" on the <canvas> tells the browser to lay out its children. drawable marks an element that you can draw independently. drawElementImage() paints that element's pixels into the canvas. In 2D, it also keeps the DOM geometry in sync with where you drew it, so clicks, focus, and hit testing land in the right place. The <form> is still a <form>. It's in the accessibility tree. Tab moves focus into it. Autofill fills it. Ctrl+F highlights "puppy" in the canvas. Translate translates it. DevTools inspects it. CSS styles it, so your wishlist can be responsive, zoom-friendly, and even follow forced colors mode. And because these are still canvas pixels, you can do what canvas does best: run them through WebGL or WebGPU shaders, wrap them around 3D meshes, melt them, shatter them, or hang them on a cloth that waves in the wind. In 3D you calculate the transform yourself and tell the browser where the element ended up: canvas.updateElementGeometry(letter, { canvasTransform: matrix }); No CSS string parsing, no style recalculation, no overlay drift. Try the demo in Chrome 157+: If you're reading this in a browser without support, open the <details> in the demo above. (Yes, the fallback is in a <details> element. HTMHell has published an article about <details> on December 23rd three years in a row: 2023, 2024, 2025. I'm just keeping the tradition alive.) The viral part Here's what surprised me most. New web platform APIs usually arrive quietly: an explainer, a spec issue, a few polite thumbs-up emoji, and a demo by the person who wrote the spec. HTML-in-Canvas did the opposite. While it was still an experimental origin trial, with an API that changed under people's feet (as with any emerging API, attributes and methods were renamed along the way based on the discussions with browser vendors and engineers who know the Web by heart), the community: Starred the explainer on GitHub about 2,400 times in a single month. The count went from roughly 650 to over 3,000 in April 2026, and it's now past 4,000. That makes it the second most-starred repository in the history of the WICG, the W3C group where new web features incubate. Only Web Components has more, and it had a ten-year head start. Built libraries before the API was stable. Three.js, Babylon.js, PlayCanvas, and PixiJS all added support, and people built new libraries such as CanvasUI specifically for UI components powered by HTML-in-Canvas. Made demos. So many demos: A to-do list that's also a Duck Hunt game. Buttons that wobble like jelly. Compiz-style page transitions (remember the spinning desktop cube?). A form on a piece of cloth inside a 3D world that you can still type into. A landing page that shatters and heals. Liquid-glass UI with live DOM inside it. Signed up for the origin trial in record numbers. HTML-in-Canvas saw one of the highest numbers of Chrome origin trial sign-ups in years. Wrote headlines like "The Web Is Fun Again." So why this API? I'd love to say it's because it finally makes canvas accessible. That was the point all along. But accessibility alone doesn't usually make a spec go viral. So instead, I have three hypotheses. Feel free to roast them. Hypothesis 1: It unlocks the effects we were told not to want For years, the "serious" advice was: keep visuals in CSS, keep interactivity in HTML, and if you reach for canvas, accept that you're leaving accessibility behind. That's good advice! But it meant entire categories of creative work had to pick a side. HTML-in-Canvas removes the trade-off. Shaders on real text. Real forms inside 3D scenes. Readable books in WebXR. Distortion, ripple, and glitch effects, applied to content that's still semantic. Designers and creative coders who had been stuck working around the platform suddenly had a primitive built for them. Hypothesis 2: Developers like to work smart, not hard Developers didn't skip canvas accessibility because they didn't care. They skipped it because canvas made it absurdly hard. The built-in way was "fallback content": child elements between the <canvas> tags that the browser never draws but that assistive technology can read. That means building a second, invisible version of your UI and keeping it in sync with every pixel you paint. The numbers show how that went. Chrome's public usage counters, quoted in the explainer's GitHub discussions, show <canvas> on about 45% of page loads, but only about 0.4% of page loads put any HTML between the <canvas> tags. The 45% likely includes lots of invisible canvases that scripts create behind the scenes, like WordPress checking emoji support, fingerprinting, and ads, which never need fallback content. Still, the gap is striking. HTML-in-Canvas makes the right thing the easy thing: you write HTML, and the browser does the rest. Developers may not star a repo for accessibility, but they love it when the platform does the hard work for them. Hypothesis 3: It's for humans This is the one I keep coming back to. Look at what's dominated web development conversations over the last couple of years: making sites "agent-ready", exposing tools to AI agents, structuring content so it can be consumed by models, generating whole interfaces with a prompt. There's an endless stream of talks, guides, and checklists about making the web more agentic. This work is genuinely useful; I'm not here to dunk on it (and HTML-in-Canvas content is still in the DOM, so crawlers and agents can now read the HTML drawn into the canvas, too). But HTML-in-Canvas isn't about agents. It doesn't make anything faster for a bot. Its whole point is to make something delightful for a human: a form that waves, a button that wobbles, a 3D scene you want to show a friend. In the same year that agent APIs dominated the conversation, this human-first API drew a comparable wave of attention. Maybe because it's for humans. I read that as a signal. Under all the "make your site machine-readable" hype, there's a large, loud community that still wants the weird, expressive, and fun web. And the best part is that this time, the fun parts don't have to come at the cost of the people who use screen readers, translation, or keyboard navigation. Accessibility was the point all along The shaders won the audience's hearts. But go back to the very first version of the explainer, from August 2024, back when the API was still called placeElement. Its first paragraph says the goal is to let canvas "benefit from all of the styling, layout and behaviors of HTML, including interactive elements and built-in accessibility." And it said the quiet part out loud: "The current status quo is that it's impossible for developers to 'do the right thing', i.e., text in 3D contexts — for example — is currently always inaccessible. This API would allow developers to do the right thing." That's the problem behind the numbers from earlier. Even if many of those canvases are invisible helpers, the tiny share of pages with fallback content suggests that developers often skip the chore of building an accessible fallback for the canvases people actually see. Accessibility didn't just motivate the API. It reshaped it, in public. Accessibility experts raised concerns within the first month, and again in the middle of the origin trial, pointing out, for example, that drawing only direct children of <canvas> would force authors to flatten their markup. That 36-comment discussion is why the API now has the drawable attribute, which lets you draw any descendant and keep the semantic structure around it, and why each drawn element's on-screen position is passed to the accessibility tree (see the explainer's Accessibility section). So the semantic version of my Santa letter isn't a workaround. It's the design: <canvas id="canvas" content="drawable"> <figure> <img drawable id="puppy" src="puppy.png" alt="A small, very fluffy puppy"> <figcaption drawable id="caption">Exhibit A: what I want for Christmas.</figcaption> </figure> </canvas> The <figure> keeps the image and caption together for assistive technology, even though they're drawn separately, maybe on two different walls of a 3D gallery. Hellish markup you can write now The other hellish thing is the markup that HTML-in-Canvas lets you write. The question I get asked most, usually as a joke, is: "Can I put a canvas in the HTML that's in the canvas?" Yes, you actually can! It's even in the web-platform-tests, three levels deep: <canvas content="drawable"> <div drawable> <canvas content="drawable"> <div drawable> <canvas content="drawable"> <div drawable>🎄 Help, I'm trapped in a canvas factory</div> </canvas> </div> </canvas> </div> </canvas> Change the innermost <div>, and paint fires on all three canvases, innermost first, so each level can redraw the one inside it. Here are some other cursed-but-legal things you can do: A whole web page on a spinning cube. Same-origin <iframe>s inside a drawable element are painted into the canvas, so you can wrap a live page around a 3D mesh. (Cross-origin content in the iframe stays blank. See the security section of the explainer for why.) Video inside HTML inside canvas. Put a <video> in a drawable element and paint fires as frames change, so you can run a playing video through a shader. HTML inside SVG inside canvas inside HTML. <foreignObject> works in a drawable <svg>. The nesting hell continues. Your modal escapes. Call showModal() on a <dialog> inside the canvas and it goes to the top layer, rendered by the page, not by your shader. Your beautifully warped 3D UI opens a perfectly flat, perfectly normal dialog. This is intended, and honestly, your users will thank you. Rendering off the main thread. captureElementImage() gives you a transferable snapshot that a Web Worker can draw into an OffscreenCanvas. Export it all. toBlob() and captureStream() turn your HTML-in-canvas scene into an image or a video, which makes a nice holiday card. Not everything is heaven (yet) To keep this honest: Browser support. HTML-in-Canvas shipped in Chromium-based browsers. Use feature detection and a fallback (static rendering, overlays, or a library) for other browsers. The API is at Stage 3 (Committed) in the WHATWG process, meaning that the API shape is approved. Undrawn content is still content. Everything inside <canvas content="drawable"> is in the accessibility tree, even what you never draw. Hide stale views, closed panels, and leftovers with hidden or inert, or remove them from the DOM. 3D needs your help. In 2D, drawing an element updates its on-screen position automatically. In WebGL and WebGPU, the browser can't know where your texture ended up, so call updateElementGeometry() to synchronize the DOM and the pixels. No support for non-linear transformations (yet). Shaders can bend your HTML any way you like, but hit testing only follows linear transforms, so clicks won't track text wrapped around a sphere. Main thread only (for now). There's no support for threaded animations yet, so your scene is tied to main-thread performance. Some content stays blank. For privacy, the browser doesn't paint cross-origin images and iframes into the canvas, or private details like visited links. No video captions. Captions and video controls aren't painted into the canvas, so a video run through a shader loses its captions. Provide them some other way, for example as drawable HTML text next to the video. Motion. Wobbly, shattering UIs are fun until they make someone sick. Respect prefers-reduced-motion. Conclusion For years, canvas sat in limbo. Now it's full of real markup, and it's getting the kind of attention few web APIs ever get. Welcome to HTMHell, canvas. You've earned it. You know what to do. Put a <form> on a snowflake. Wrap an <article> around a planet. Make your <button> wobble. To get started: HTML-in-Canvas documentation HTML-in-Canvas in Chrome 157 Awesome HTML-in-Canvas community demos Share feedback on GitHub Merry Christmas, and may your canvases be interactive and accessible. 🎄
For the first time in human history, capital and labor are becoming directly fungible for more tasks
Last week, I released version 5.2.0 of RestAssured.Net. It contains fixes for no less than 23 issues, the largest number of bug fixes in a single release by a long margin. All 23 bugs were found and fixed by Claude, under my strict supervision. I will describe the process I used to find and fix the issues in more detail in an upcoming newsletter issue, but I think it could be useful to give a short overview of all the fixes in 5.2.0 beyond what’s in the CHANGELOG, so here goes. Sending requests Requests without a body no longer send a JSON content type (#161) GET, DELETE and HEAD requests (and any other request without a body) used to be sent with Content-Type: application/json and an empty body, which some servers, gateways and firewalls reject. Requests without a body are now sent without one, so what goes over the wire is what you wrote in your test. Values in the request now take precedence over the request specification (#153, #179) When a header, content type or other setting was set both in a RequestSpecification and in the request itself, the specification won. It’s now the other way around: a specification provides defaults, and the request can always override them. The path in a base URI is no longer dropped (#160) WithBaseUri("http://host/api") silently ignored the /api part, so requests went to the wrong path. The path is now included, and the BaseUri property of the specification shows the URI you configured. Relative endpoints with a query string are sent to the right path (#159) With a request specification, Get("/users?id=1") was sent to /users%3Fid=1, because the question mark was encoded as part of the path. The query string is now sent as a query string. Trailing slashes in endpoints are kept (#172) With a request specification, Get("/users/") was sent to /users. Some APIs treat these as different resources, so the slash is now kept. Collections in query parameters send their values (#167) Passing a list as a query parameter value sent the name of the collection type (System.Collections.Generic.List...) instead of its contents. Each value is now sent as a separate parameter, for example ?id=1&id=2. Square brackets that aren’t path parameters are left alone (#154) Any text between square brackets in an endpoint, such as filter[name]=x, was treated as a path parameter placeholder. Only placeholders for path parameters you actually supplied are replaced now, and their values are no longer HTML-encoded. Basic authentication supports non-ASCII characters (#168) Credentials were encoded as ASCII, so characters like ü or € were sent as ? and authentication failed. Credentials are now encoded as UTF-8. Your own cookies are no longer modified (#175, #183) A Cookie object passed to a request was changed while the request was sent: its domain was set to the request host. A cookie reused for another host then silently wasn’t sent. RestAssured.Net now works on a copy, and request cookies are logged with the domain they’re actually sent for. Using your own HttpClient Timeouts, cookies and other settings now work with your own HttpClient (#156) When you passed your own HttpClient, timeouts and cookies were silently ignored, and setting a timeout could even crash on a client that had already been used. Timeouts and cookies now work without changing your client. Proxy, SSL and NTLM settings can’t be applied to a client you created yourself, so setting them on the request now throws a clear exception instead of being ignored; settings from a specification or the global configuration log a warning. Verifying and extracting responses Cookie checks only pass for cookies the server actually set (#155) The cookies you sent with the request were mixed with the cookies in the response, so verifying or extracting a cookie could pass even when the server never set it. Only cookies set by the server are seen as response cookies now. All response headers can be verified and extracted (#162) Headers that describe the body, such as Content-Disposition, Content-Type and Last-Modified, couldn’t be found with Header(), because .NET stores them separately. Header() now finds every header in the response. XML and HTML assertions work the same on every machine (#163) A value like 1.5 in an XML or HTML body was read using the language settings of the machine, so on a Dutch or German machine it became 15 and assertions failed. Values are now always read the same way, regardless of the machine’s culture. Response body length is measured in bytes (#169) ResponseBodyLength() was documented as counting bytes, but counted characters, which differs for bodies with non-ASCII characters. It now counts bytes, so the value matches the Content-Length header. Square brackets in custom error messages are kept (#170) Custom error messages treated any text in square brackets as a template tag, so a message like [TICKET-123] status was [actual] lost its ticket reference. Only [expected] and [actual] are replaced now; all other text stays as you wrote it. Errors keep their original cause (#165) When a request failed, for example because the connection was refused or the certificate was invalid, the original exception was thrown away and every error was reported as “Unhandled exception”. The original exception is now kept as the inner exception, which makes failures in CI much easier to diagnose. Logging Masking sensitive data can no longer be bypassed (#158) Headers and cookies configured as sensitive could still end up in the logs, for example when the casing of the header name differed, or as part of a Cookie or Set-Cookie header. Sensitive values are now masked in all of these cases. Logging no longer crashes on invalid JSON or XML (#157) With body logging enabled, a response labeled as JSON or XML that wasn’t valid (an HTML error page from a gateway, for example) made the request fail. Bodies that can’t be parsed are now logged as they are. All content headers are logged (#185) Only Content-Type and Content-Length were logged from the headers that describe the body, so headers like Content-Disposition and Content-Encoding were missing from the log. All of them are logged now, and they can be masked like any other header. Response times are logged the same way everywhere (#182) The response time in the log used the decimal separator of the machine’s culture, for example 3,75 ms on a Dutch machine. It’s now always logged with a period, so logs look the same on every machine. The logger is only called when there’s something to log (#174) With logging switched off, a custom logger was still called twice per request, with empty messages. It’s now only called when there is actually something to log. As you can see from the list above, RestAssured.Net just got a lot better and/or more consistent and/or more compliant with documented HTTP behaviour with version 5.2.0. There are still quite a few open issues, but I decided to leave those for the next release, which hopefully sees the light of day in the next few weeks.
A former Amazon engineer sees signs that the ‘six-pager’ documents used to promote good decision making are increasingly AI-generated and AI-read, and warns it’s not a positive development.
In October 2026 Jenni was acquired by Digital Science. A personal reflection on four years as founding designer, from $4k to $730k in monthly revenue.