On Server Side RenderingPermalink

Alexander Petros:

When I advise people on how they should structure a web service, I always start from the same place: make a server that responds to HTTP requests with HTML text. That is the most durable, cost-effective, and user-friendly way to build a web service. Most web services should be built this way absent an excellent reason not to.

Upon hearing this, web developers often reply “oh, you like server-side rendering,” to which I usually wince and answer “more or less.” You have to pick your battles when chipping away at a decade of miseducation. At least people know what I’m talking about.

But “server-side rendering” is a horrible term. It implies that the server is not just doing more work, but doing hard work, work that’s best left to the experts. None of this is true. You, too, can do server-side “rendering,” with essentially no effort, in whatever programming language you prefer.

Once you understand that, you’ll start to see the web the way I do: as the simplest, easiest, and most powerful interface for computation ever created.

I’d not thought about things this way before, since the server often is rendering templates to generate the HTML sent to the client, but it’s a good point.

Just getting a couple letters on the page requires layout math that most web developers have never even considered. All this is learnable (that’s what the book is for), but web rendering is astoundingly complex. Imagine trying to implement kerning; instead, you get it for free.

I chuckled at this bit because I have implemented kerning, but the point remains: getting text onto a computer display is amazingly complex and a testament to how fast computers are.

An AlphaStation's SROMPermalink

The AlphaStation 500 is a workstation from Digital, circa 1996. Mine is a 500 MHz model and has an Alpha 21164A processor (aka EV56). And the way it boots is weird.

On your common-or-garden PC, there has always been some kind of ROM chip. It holds a piece of firmware known as the BIOS. This ROM chip is available at a well-known location in the processor’s address space (remembering that any PC processor boots up in 16-bit, 8088 compatible mode, with a 1 MiB address space, just like an IBM PC 5150) and the processor just starts executing code in it after reset.

The Alpha (or at least this AlphaStation 500 - although I think they mostly worked like this) is different.

There is a serial ROM (SROM) on the main board, and after reset, some logic internal to the CPU kicks in to generate a clock pulse. This drives an (external) counter, which provides consecutive addresses into the ROM. The 1-bit output of the ROM is sent into the processor, in sync with the clock pulse. The Alpha processor stores this data in its internal Instruction Cache. Once the code load is complete, the processor then executes the code, from its cache. The code is just enough to get the processor to configure its external memory bus, and find a memory-mapped parallel ROM, which it will then hand-over execution to.

But wait, how do you find a 1-bit wide ROM chip? Aren’t most ROM chips at least 8 bits wide? Yes, they are.

Well that’s certainly an interesting take on booting. The rest of the post is about trying to decipher an SROM dump in order to work out why a system might not be booting. It even includes some DEC Alpha assembly—that’s not something you see everyday.

Run Early Versions of Mac OS X in Your Browser With Infinite MacPermalink

Mihai Parparita:

Infinite Mac can now run early Mac OS X, with 10.1 and 10.3 being the best supported versions. It’s not particularly snappy, but as someone who lived through that period, I can tell you that it wasn’t much better on real hardware. Infinite HD has also been rebuilt to have some notable indie software from that era.

As Mihai notes they take a while to boot, but are fairly usable one up and running. It was a great blast from the past to poke around these this evening. There’s some familiar apps on the Infinite HD—a good reminder of how many great indie apps were available from really early on.

Screenshot of Mac OS X 10.1 from Infinite Mac running in Firefox on Linux. The About This Mac window is open, along with Terminal, Finder, and CPU Monitor.
Mac OS X 10.1

Mac OS X was what got me back into the Mac after a few years on Windows 98. I started with Public Beta and continued with each new release until 2017.

Screenshot of Mac OS X 10.3 from Infinite Mac running in Firefox on Linux. The About This Mac window is open, along with Finder and System Preferences.
Mac OS X 10.3

I was surprised to be reminded of how quickly the UI evolved. I knew that it was iterated upon with every major new version, but even by 10.3 here it’s looking quite clean. Not sure the brushed metal holds up but the refined version of Aqua is pretty great.

New PebbleOS Watches Available for Pre-OrderPermalink

Eric Migicovsky:

We’re excited to announce two new smartwatches that run open source PebbleOS and are compatible with thousands of your beloved Pebble apps.

  • Core 2 Duo has an ultra crisp black and white [e-Paper] display, polycarbonate frame, costs $149 and starts shipping in July.
  • Core Time 2 has a larger 64-colour [e-Paper] display, metal frame, costs $225 and starts shipping in December.

I passed by the original Pebble watches, dismissing them as weak compared to the Apple Watch. However, in the years since I’ve come to have much more appreciation for hardware that affords its owner large amounts of customisability, especially when paired with open-source firmware. The new rePebble watches are both of these things, so I have pre-ordered a Core 2 Duo in white.

Eric also has a related post setting expectations for iOS users:

I want to set expectations accordingly. We will build a good app for iOS, but be prepared - there is no way for us to support all the functionality that Apple Watch has access to. It’s impossible for a 3rd party smartwatch to send text messages, or perform actions on notifications (like dismissing, muting, replying) and many, many other things.

It’s things like this that help make my switch to Android last year feel worth it.

Neut Functional Programming Language With Static Memory ManagementPermalink

Neut is a functional programming language with static memory management.

Its key features include:

  • Full λ-calculus support
  • Predictable automatic memory management
  • The absence of annotations to the type system when achieving both of the above

Neut doesn’t use GCs or regions. Instead, it takes a type-directed approach to handle resources.

This looks quite full-featured and complete with documentation, formatter, LSP server, and a handful of sample applications written in it. It’s good to see another language offering some of the benefits of Rust, but potentially easier to learn and write.

I haven’t been able to try it myself yet as I’m travelling with my Windows ARM laptop and there’s no Windows support at the moment. Also the pre-compiled binaries appear to need glibc, so it doesn’t run in my Chimera Linux WSL instance. It’s implemented in Haskell, but ghc hasn’t been packaged for Chimera, so can’t build from source either.