GeistHaus
log in · sign up

https://blogger.com/feeds/19303585/posts/default

atom
25 posts
Polling state
Status active
Last polled May 19, 2026 01:34 UTC
Next poll May 20, 2026 04:21 UTC
Poll interval 86400s
ETag W/"aff9979970690f691b041b9cd3adc446175744604489e9111e7a4d17ce151e96"
Last-Modified Mon, 18 May 2026 17:16:14 GMT

Posts

The aperiodic table
pseudo-randomness
Show full content

XKCD 3242 is titled "The aperiodic table" and looks like this:


Which is cool, but it's not aperiodic like a Penrose tiling. So, with a little (a lot) of help from Claude I create aperiodictable.com your one true resource for the periodic table on a Penrose P3 tiling. Click and drag the canvas to place the periodic table wherever you fancy. Hit Print to print your own Aperiodic Table.


It's a single page that's hosted on Cloudflare Pages.

tag:blogger.com,1999:blog-19303585.post-1852883091736792774
Extensions
Raspberry Pi as an isolated AI coding server
hardwaresecurity
Show full content

I've been working quite a bit with Claude Code and OpenCode on a project and really wanted a way to run both without having to constantly approve use of tools. That's quite possible with Claude's claude --permission-mode bypassPermissions [1] (I'd like to use claude --enable-auto-mode but it's not available on my plan level (Max) [2]).

But, either way, I don't want Claude or OpenCode doing whatever they wants on my main machine. Various options exist: VMs, containers, sandboxes. Some people seem to have decided that a Mac mini is how you run AI tools (such as OpenClaw). But for what I'm doing a Raspberry Pi 5 works fine.

The set up is as follows:

    Raspberry Pi 5 16GB

    Joy-IT aluminium case with fan

    Debian Trixie installed via the Raspberry Pi Imager

    root password set on Raspberry Pi and default user removed from sudoers by deleting /etc/sudoers.d/010_pi-nopasswd

    Claude Code run with bypassPermissions

    A new SSH key on the Raspberry Pi for GitHub access

    iptables firewall preventing local network access but allowing Internet and incoming SSH

    Local network access also blocked on my home network firewall

I SSH into altair-iv and use GNU screen to leave my Claude or OpenCode session running. 


Supply chain attacks also worry me and running this isolated development server helps isolated the blast radius. Plus for npm I am running with: 

    krell@altair-iv:~ $ cat .npmrc
    save-exact=true
    ignore-scripts=true
    min-release-age=21

[1] https://code.claude.com/docs/en/permission-modes#skip-all-checks-with-bypasspermissions-mode

[2] https://code.claude.com/docs/en/permission-modes#eliminate-prompts-with-auto-mode

tag:blogger.com,1999:blog-19303585.post-3060475110203474364
Extensions
Maistro
Show full content

Back in 2012 I wrote a blog post titled just Programmer about both my job title and a company I'd just joined as a Programmer. I was very happy to be called a Programmer until quite recently. In the last few months, with the assistance of AIs like Kimi 2.5 and Claude, I've become something else. Something that uses my experience as a programmer by amplifies it massively. And, at the same time, makes me spend most of my time on the design and features of what I'm building and not the code. 

What is this called?

Maybe it's a still a "software engineer" (for those who like that title). But the engineering is being done with new tools. But I don't think that quite captures it because the balance between the "writing code" and "designing architecture and choosing features" has shifted to the latter. 

I'm more like the conductor of an orchestra but working with two AIs (one writing code, the other writing tests) to get something built rather than getting an orchestra of many to produce something beautiful. But conductor still doesn't feel quite right because this new job is heavily skewed towards creation (and not interpretation and expression).

I think the right word is a "maestro" or, if the pun can be forgiven, a maistro.

maistro (n): a software engineer who uses AI tools to create software by focusing on design, architecture, testing, and features.

tag:blogger.com,1999:blog-19303585.post-6997313712403024466
Extensions
The European Schuko socket bothers me
hardwarepseudo-randomnessrants and raves
Show full content
Because it isn't polarized, and that can lead to a situation where something is switched "off" but there's 230V of electricity still present. Take a look at this thing:

At the bottom you have a standard European Schuko socket and Plugged into the socket is the power strip on the right. Plugged into the power strip is the lightbulb on the left that I've mounted and wired so I can measure the voltages between live, neutral and earth. 
Above the power is on to the strip, but the switch in the power strip for the light off. Unsurprisingly, the lightbulb is lit off. Even less of a surprise is that turning the switch to on lights the light.

For the rest of the blog I'll remove the lightbulb and just concentrate on what voltages are present at the lightbulb holder. When off there's no voltage (or rather a tiny phantom voltage) between live and neutral (brown and blue).

But when the switch is on, the multimeter is showing 230V AC between live and neutral. So, no surprise that the light comes on when the switch is on!

The same voltage is present between live and earth. In a standard European or UK house the earth and neutral wires are joined together (called "bonded") somewhere close to where the power comes into the house. The live and neutral wires are two halves of the circuit and electricity needs to flow from one to the other for the light to come on. In this standard set up the neutral and earth have (theoretically) the same "potential" of 0V. When the light is on the idea is that electricity flows from the live to the neutral.
If you touch live and neutral you'll electrocute yourself, but also if you just touch live because the electricity will run through you to earth. 

Between neutral and earth there's close to 0V of difference. The multimeter is showing tiny phantom voltages induced in the wires.

The important thing to remember is that the voltage in a home is "referenced to earth" and thus will run to earth (potentially through you) given the chance. That's why you get an electric shock if you touch a live wire. The current flows through you to earth. You do not want that to happen. In theory you could touch the neutral wire and not get electrocuted because it's at the same voltage/potential as earth: 0V. BUT DO NOT DO THIS EVER. EVER. YOU DO NOT KNOW THAT NEUTRAL IS ACTUALLY 0V.
Take a look at this; all I've done is unplugged the power strip at the bottom and plugged it back in the other way around. Suddenly, there's apparently 230V between neutral and earth, and that's with the power strip turned off!

That's because the little power switch on the strip does not cut both the live and neutral wires when turned off; it cuts off one of them. If you plug the strip in one way you might get lucky and cut live, but you can easily plug it in the other way round and find that what looks like it's neutral as actually live and has 230V. THIS IS ANOTHER REASON NEVER TO TOUCH SOMETHING YOU THINK IS NEUTRAL. Also, imagine you've turned this off and are changing the lightbulb. The same 230V is present inside the light fitting just waiting for a human finger to become a conductor!
You can see that despite there being 230V present the lightbulb does not glow. But there are dangerous voltages present. In fact, with the lightbulb present it's even worse, because the "live" and "neutral" wires coming out of the light fitting are 230V because the 230V has passed through the light and is now present on the wire on the other side of it.

(Ignore the multimeter here as it's not connected).
So, in summary:
1. DO NOT TOUCH WIRES IN HOUSEHOLD WIRING EVER.
2. Do not trust power strip switches to actually remove all dangerous voltages from a device.
3. Do unplug things when working on them (e.g. changing a lightbulb)
4. Do buy power strips which have switches that cut both wires when off (such as this Brennenstuhl power strip; not an affiliate link or anything, I just use this one in my lab.).
5. Move to a country that uses the one true great power socket of all time 
OK, that last one's in jest because there are reasonable criticisms of the British plug design, but it, perhaps unreasonably, bothers me that it's possible to turn something off and discover there's 230V present.
tag:blogger.com,1999:blog-19303585.post-6143991865295400825
Extensions
There's a ridiculous amount of tech in a disposable vape
hardwarepseudo-randomness
Show full content

So, I'm walking through a park when I see this thing lying on the ground:

It's a disposable vape that someone has discarded because it's empty. Specifically, it's a "Fizzy Max III 60K Rechargeable Disposable Vape" and I was about to take it to a bin to throw away when I noticed it had USB-C. I know nothing about vapes so that was a total WTF moment. 

Naturally, I took it home, sanitized it, and plugged it in. Not only did this thing have USB-C and a rechargeable battery, it had a small display showing battery percentage and poison vape fluid percentage. It looks kind of cyberpunk.


I ripped the thing apart and discarded the now empty chambers that had contained the fluid. At the bottom there are two circuit boards and a battery. 

The battery is an 800 mAh lipo.

So, wait? This is a disposable device. After 60,000 sucks on the teat you're meant to throw away a battery, display, microprocessor etc. WTF? Turns out that you're meant to recycle it, but it's crazy large amount of technology for nicotine sucking. 

On one side you've got three pairs of pins that are inserted into the chambers containing the vape fluid and are controlled by three transistors on the other PCB. These pins heat the fluid making the vape's vapour. They are activated by the three microphones seen in this picture.

The vape knows you're sucking on the teat in one of six positions by which combination of microphones sense the sucking. This allows it to heat one or two of the chambers providing six flavour combinations.


Three transistors and a small chip that controls charging of the battery. 


Sadly, despite there being some pretty obvious pads connected to the microprocessor (labelled B0081S1) and the fact that those pads are also connected to the USB-C connecter, I have been unable to talk to it via PyOCD or other tools. I was hoping this was a small ARM device that I might be able to hack.
tag:blogger.com,1999:blog-19303585.post-8728350909468966560
Extensions
If you care about security you might want to move the iPhone Camera app
pseudo-randomnesssecurity
Show full content

There's a quirk in the iPhone Camera app that can drive a security conscious iPhone owner crazy: if you touch your finger on the Camera app icon without actually opening the app, the camera starts operating. That causes the little green dot indicator on the iPhone to turn on and then after a few seconds disappear. This can easily make a security-conscious iPhone user worry that some app is nefariously using the camera.

Because touching the Camera app icon without opening the app is enough, it's easy to activate the green dot while swiping between screens or even just holding your phone. This was driving me nuts and I thought some app was using the camera when I didn't want it to.


I enabled Apple's App Privacy Report (under Privacy and Security) in Settings and, sure enough, it confirmed that the little green dot was happening because the camera was being used by the Camera app. Merely swiping while accidentally touching the Camera app's icon was enough to add an entry in the App Privacy Report.


The solution was moving Camera app away from where I was liable to brush it with my fingers or thumb. That reduced the errant green dots to almost zero and reassured me that nothing untoward was happening.


One of the big problems in security is people get used to odd behaviour they can't explain and end up overlooking a real problem masked be the things that "always happen". The accidental green dots could have been hiding actual nefarious use of the camera. Better to be tidy and eliminate the false positives.

(I previously used the term "hover" for what I was experiencing and that was causing confusion. This happens if you touch the Camera app icon without actually opening the app.)
tag:blogger.com,1999:blog-19303585.post-3163403587683936353
Extensions
A couple of handy KNX gadgets
hardwareknx
Show full content

KNX is a European standard used in home automation. It's primarily based around a twisted pair bus transporting DC power (30V) and data at 9600 bits/second. Devices attached to this KNX bus draw power for their operation and receive and send messages called telegrams. The devices are typically things like switches, relays, dimmers, HVAC interfaces, small displays, and blind/shutter controllers.

If you're working with a KNX bus you connect a computer to it via bus interface. These are commonly either a USB interface or an Ethernet/WiFi connection. Either way the computer is able to send and receive telegrams and monitor the bus for debugging. This interface is also used for programming the various KNX devices on the bus (for example, associating pressing a button on a particular switch with a particular light circuit going on or off).

Sometimes it's useful to program devices "off the bus" (i.e. away from the actual installation). For this purpose I put together the simplest of minimal KNX buses: a power supply to inject the necessary 30V, a USB bus interface, and a dangling KNX connector (the red and black thing in this photo) that can be plugged into the device to be programmed.


Normally the power supply (on the left) would be wired in permanently, but here I am just using a standard power cord for desktop programming. The USB bus interface is in the middle. There's nothing special about these devices, there are hundreds of KNX manufacturers that interoperate; I just happen to be using an ABB power supply and ABB bus interface.
This works great: plug the device to be programmed into the connector on the right and hook the PC running the KNX programming software ETS into the bus interface via USB. And apart from the two ABB boxes, all that's needed is a power cord, three WAGO 243-211 connectors, and some twisted pair. I used random wires that were lying around, in the real world of KNX installations you'd use proper shielded twisted pair cables!
The other gadget I built is this custom PCB (possibly the world's simplest PCB):

It just connects four KNX terminals together in parallel. The pins at the top are the standard WAGO 243-131 pins compatible with the WAGO 243-211 connector. When soldered together it looks like this:

In conjunction with a bus interface it lets you tap into an existing KNX bus if there's no bus interface present. Or if it's just more convenient to connect where you are working. You simply unplug some device from the bus, plug the bus into this PCB and then plug the device into the dangling connector.
The bus will work normally and you'll have access for debugging and programming. (Note: you can do this because the KNX bus can be a tree and so it's acceptable to plug in a spur of a couple of devices to the main bus line).

The PCB design is based on Matthias Kleine's KNX Distributor; my version can be found here. (If you build this you'll also need Matthias Kleine's footprint library).
tag:blogger.com,1999:blog-19303585.post-7381284008987393638
Extensions
Protecting your (my) passport from liquid damage
pseudo-randomness
Show full content

After an unfortunate incident involving my passport and some alcohol-based hand gel in my bag, I decided I needed some sort of waterproof passport protection. But searching around for "passport wallets" mostly doesn't result in anything waterproof and all the wallets are large, bulky or ugly. But there is a really simple solution.

A 4 mil ziploc bag of the appropriate size. 

What's the appropriate size? Well, there's an ICAO standard for machine-readable passports which uses the ISO/IEC 7810 ID3 size for the "passport booklet" (what you and I would call a passport).


So, that's 125 x 88mm. Happily, a pretty common ziploc bag size is 10 x 15cm (or 100 x 150mm, if you prefer). That gives you an extra 12mm horizontally (so the passport will slip inside) and 25mm vertically (space for the passport and the area with the ziploc closure).
I mentioned "4 mil" above. Switching to non-metric measures (which seem common for the thickness of plastic) that's four 1/1000s of an inch (note it's not "millimetres", it's "mils"). You also sometimes see plastic measured in microns (which is 1/1000 of a millimetre). 
4 mil bags have a sturdiness to them that thinner plastics do not have. They are sometimes described as "extra thick". In the UK, these folks (not an affiliate link) sell through Amazon and have a variety of bags of the right size and thickness.
And now my (new) passport is carefully protected.

Aside: it turns out I actually once owned a waterproof passport wallet. I was gifted a SÜLgear passport wallet and lost the waterproof liner. The kind folks at SÜLgear pointed out that the waterproof liner was simply a 4" x 6", 4 mil ziploc bag (or, for those of the metric persuasion, 102 x 152mm).

tag:blogger.com,1999:blog-19303585.post-6649151922991432331
Extensions
Is a movie prop the ultimate laptop bag?
pseudo-randomness
Show full content

A while back I attended a Cloudflare board meeting and carried my laptop in a brown paper bag from a grocery store. This elicited a few comments about needing a real bag. But I've often carried my laptop in inconspicuous bags. For me, the ultimate laptop bag is one that looks nothing like a laptop bag; it should look like nothing special at all. 

Unhappily, grocery bags are not very strong, but there is a solution.

Movie prop grocery bags like this:

Looks like a classic brown paper grocery bag, but it isn't. It's actually a silent prop made for a film set where the noise from a crinkling paper bag would overwhelm the dialogue. 

Instead of being made from paper, it's made from fabric and is more robust then an actual paper bag. It's also nearly silent (well, much, much quieter than the real thing).

It's also the ideal size for my trusty and vintage MacBook Pro. Especially when it's in its sleeve.


So, is a movie prop the ultimate laptop bag? No, clearly Betteridge's Law of Headlines applies, but it does fit my criteria for discretion and not being ostentatious
tag:blogger.com,1999:blog-19303585.post-5514750613064903382
Extensions
Ex-X
Show full content

I did have an X.com (username: 6a6763) account and I got bored of it so I deactivated it today. 

tag:blogger.com,1999:blog-19303585.post-9064413465283376346
Extensions
Ode to the anti-Mac: Panasonic Toughbook FZ-40
pseudo-randomness
Show full content

I own two computers that I use regularly. The first is my main machine, a rather old Apple MacBook Pro, the other is a Panasonic Toughbook FZ-40. They are polar opposites. Where the Mac is designed with tightly coupled software and hardware and is all smooth curves and delicate design, the Toughbook is designed to be used wearing gloves, outside and in rough situations that would damage the Mac. 

Its built-in handle is a sign that this thing is heavy and robust.


And where the MacBook has a feeble port selection, my Toughbook has VGA, Serial, two Ethernet sockets, HDMI, a micro SD card, SIM card, USB-A (SS5 and SS10), head and microphone jack, Thunderbolt and USB-C, and built in GPS. There's also a smart card reader.
It feels like it's designed to do stuff where connecting to the real world is involved. 
The camera has a physical cover and all the ports are protected by locking doors.

There are also some special Panasonic buttons (P1 through P4). P2 drops you into "Concealed Mode" which instantly cuts all the light coming from the machine.

P3 drops you into "Night Mode" for all those moments where your submarine is being hunted by the Soviets and you need to preserve your night vision to be able to see the instruments ready. Sadly there's no "one ping" option.

The machine runs Windows 11 (which I don't love) but a lot of industrial software is only available on Windows (along with things like the LEGO MINDSTORMS software which was weak on the Mac and full-featured on Windows). 

I may be the only person in the world programming LEGO on a Toughbook with the option to drop into Night Mode during, uh, LEGO emergencies. But, hey, LEGO worked for Iron Man.

And then there's the red F11 key with a raised bump around it to prevent accidental activation.

tag:blogger.com,1999:blog-19303585.post-417219859113312418
Extensions
Pimping my Casio: Part Deux
clockshardware
Show full content

Close to three years ago I wrote about using Oddly Specific Objects' alternate "motherboard" to modify a classic Casio F-91W watch: Pimping my Casio with Oddly Specific Objects' alternate motherboard and firmware. That blog post goes into the detail of swapping out the guts of the Casio and building and uploading the firmware. 

Happily, Oddly Specific Objects is back with a "Pro" version of their alternative Casio internals which now features an accelerometer and an alternative LCD. The original Sensor Watch used the existing Casio LCD display but the custom LCD allows for more complicated text to be displayed on screen. It's not a dot-matrix display so there are lots of limitations but it's still a fun upgrade.

Also, the Sensor Watch Pro, as it's called, requires no soldering (unlike the original version). Here's one I prepared earlier (that is a Casio F-91W with new internals):


You can see the new display in action there showing the day as FRI. As with the original Sensor Watch there's a browser-based emulator that uses emscripten to get the watch running on your computer. This is pretty important because flashing new firmware to the watch requires dismantling it.

Since there's no soldering the process of upgrading your Casio is simply take it apart and put back in the parts that came in the kit (along with a small piece of metal that's transferred from the original Casio watch to make the battery connection):

Since I bought the optional accelerometer add on it's necessary to put in place a little piece of Kapton tape (you can see if covering the five pads on the image above) and the insert the accelerometer board itself:

The five vertical traces at the top are the micro USB interface used for flashing the firmware. 

I modified the firmware to remove Imperial units and 12 hour clock (which I never want) and to choose my own selection of screens (I added the tally, accelerometer and light sensor screens).

The complete sequence of commands needed to build the firmware was:

brew install --cask gcc-arm-embedded
git clone https://github.com/joeycastillo/second-movement
cd second-movement
git submodule update --init --recursive
make BOARD=sensorwatch_pro DISPLAY=custom

And then to upload to the watch you connect the micro USB, click the tiny switch on the back twice very rapidly and a volume called WATCHBOOT appears on your machine. You can copy the firmware over to the watch with make install. 

To run the emulator you build with emscripten:

brew install emscripten
emmake make BOARD=sensorwatch_pro DISPLAY=custom
python3 -m http.server -d build-sim

And then visit localhost:8000/firmware.html in your browser.

tag:blogger.com,1999:blog-19303585.post-6112484641635671567
Extensions
The discreet charm of the infrastructureless
clocksradio
Show full content

Early in the morning in a European city, I awoke and wondered for a moment where I was. The room was totally black apart from a small glow from the face of my Casio Lineage watch lying on the bedside table. The luminous dial had absorbed sunlight during the day and was now giving off gentle light in the night; enough brightness to read the time.

Infrastructureless #1: sunlight + chemistry = glow in the dark.

The watch had also absorbed sunlight through its face during the day to recharge its battery. In all the time I've owned this watch I've never seen the battery drop below the what Casio calls HI (there are levels MID and LO but I'd only seen MID once when I took the watch from its original packaging)

Infrastructureless #2: sunlight + semiconductors = electrical power.

Clicking the top right button to illuminate the face further I could see the small LED display showing the local time in the European city (the main hands show my home time zone). And on the LED display a little black rectangle under RCVD indicated that somewhere in the night (it turned out at 02:04) the watch had picked up the signal from the DCF77 transmitter in Germany and set itself.

Infrastructureless #3: radio = correct time.

OK, DCF77 isn't totally without infrastructure, but one of the reasons I became a radio amateur is lack of infrastructure. Sure, you're able to read this because of the Internet but it's an incredibly complex system: layers and layers of technology and cooperating entities just so you can read this. 
On the other hand, radio amateurs just send out electromagnetic waves and talk to each other, no intervening infrastructure (well, ok, maybe you can count the ionosphere as infrastructure allowing long distance reception). And that's what DCF77, and the other five transmitters the Casio can receive in the US, UK, China and Japan, are doing: sending waves into the night to be picked up and decoded by whoever is listening.


Also, I'm just fascinated by radio propagation: my ancient Sharper Image clock sometimes picks up the US WWVB in Portugal.
tag:blogger.com,1999:blog-19303585.post-8285350699266665156
Extensions
Low-background Steel: content without AI contamination
pseudo-randomness
Show full content

Somehow I forgot to blog my site: https://lowbackgroundsteel.ai/. I created it back in March 2023 as a clearinghouse for online resources that hadn't been contaminated with AI-generated content. 

Low-background Steel (and lead) is a type of metal uncontaminated by radioactive isotopes from nuclear testing. That steel and lead is usually recovered from ships that sunk before the Trinity Test in 1945. The site is about uncontaminated content that I'm terming "Low-background Steel". The idea is to point to sources of text, images and video that were created prior to the explosion of AI-generated content that occurred in 2022.

It currently contains pointers to a Wikipedia dump from prior to the release of ChatGPT, the Arctic Code Vault, Project Gutenberg, and more.

If you know of other sources of non-contaminated content plus submit them!

tag:blogger.com,1999:blog-19303585.post-6718543456445220885
Extensions
It was time for a dim bulb current limiter
hardwareminitel
Show full content

One of my Minitels (the one that I modified a few years ago to run new firmware) started having power supply problems: the LED was on but nothing else was working. I suspected that the main power/CRT board needed new capacitors and so I recapped it:


Alas, despite some of the older capacitors measuring poorly compared to their specs, that wasn't the problem and so I need to go deeper. The only problem is there are a ton of nasty voltages on this board. Notably the 230V AC input and then the tens of kilovolts generated for the CRT.
Also the board seems to have a short somewhere.
So, it's time to a dim bulb current limiter. Which I didn't have. So I made one. Here it is:

It's a remarkably simple device which plugs into a standard power outlet (230V AC) and puts a lightbulb in series with one of the connections. The two wires coming in then go to a standard socket. Thus you plug your device (e.g. my Minitel) into the socket and the lightbulb limits the current.
These things were super common in the past for anyone working with mains voltages.

Works great if you have an incandescent bulb at, say, 100W. A 100W bulb on 230V AC would have a current running through it of I = V/P -> I = 100/230 (approximately 430mA). Limiting the current that way means you're less likely to damage the device you're working on if there's a short. Naturally, using a different bulb would give you a different current. 60W would give you around 230mA. 150W around 650mA. 
As the Minitel's input fuse is 630mA, my current limiter will keep things well under its blowing current. Also, if there's a complete short then the bulb will glow brightly. 
Here's a look inside:

Power comes in at the top, and goes to a DPST switch. I'm using DPST because it's not easy to know which input wire is live and which is neutral because the European Schuko/Type F plug/socket is not polarized and I like knowing that when I switch something off, it's off! And the DPST has an integrated lamp that gives me a visual reminder that it's on.

Because local power sockets aren't polarised, the power strip I am using for my bench gear uses DPST switches for each socket. It's relatively hard to find one that does this (and says it does). Thanks, Brennenstuhl!

But I digress.
To make my dim bulb current limiter do the right thing, I need a 100W incandescent bulb. These have been on their way to oblivion in the EU since 2009 and were, I believe, eliminated for home use in 2016. It is still possible to buy them, labelled for "industrial use", from some locations. 
So, that limits the current and protects the device I'm working on, but what about protecting me? For that, I pair it with an isolating transformer. If you're not familiar with this then here's the basics. In a house the neutral line is connected to ground (typically at the point at which power comes into your house). This means that the 230V coming out the live wire is relative to ground. If I touch it the power will flow through me to ground. 
The isolating transformer eliminates the link between live, neutral and ground. It's still outputting 230V but that voltage isn't relative to ground and so I won't get a shock if I touch one of the wires coming from the transformer's socket. Of course, touching both would send 230V through me.

So, having built that I can go back to understanding why my Minitel isn't powering on.
tag:blogger.com,1999:blog-19303585.post-3818174933613691655
Extensions
Just one more calculator, bro, just one more, I swear it's the last one
calculators
Show full content


I'm not much of a collector of things. Long ago I decided that on the retro-computing front I would not collect any machines that weren't very significant to me. So, my "collection" consists of a KIM-1, Sharp MZ-80K, Research Machines 380Z and 480Z, BBC Micro Model B, an IBM ThinkPad 701C, and a Minitel (well, two).

But calculators are where I come closest to not being able to resist. Calculators are there for you. They don't change UI because of the whim of some product manager. They don't need updating because their underlying OS is on some new, crazy version. Nothing gets in the way of you using them: no popups, enticements to buy some extra thing, no notifications, nothing. In an insane world, they are the sanest choice.

I've written in the past about restoring my Rockwell 8R and Commodore P50 (and a fun discovery that Sir Roger Penrose had the same calculator and wrote the same program as me: mine was faster, his more elegant (which is probably some sort of metaphor)). And I have my Casio fx-3600p which I used extensively at school.

I also have an original HP 16C (the one for programmers).

Some time ago I discovered a company called SwissMicros that makes modern replicas of classic HP calculators. I bought two of them. I have their version of the HP-42S:


And their version of the HP-16C:

But recently they started making a credit card-sized version of the HP-16C and I was unable to resist ordering one. And so, after dealing with Portuguese Customs, I got this:

And now I have full size and card size side by side:

I'll try to stop collecting calculators there.
tag:blogger.com,1999:blog-19303585.post-1005744146793198691
Extensions
The Via Verde Stick
pseudo-randomness
Show full content

Portugal has an incredibly well executed and efficient system for collecting road tolls called Via Verde. A small transponder in the car either collects a toll at an automated toll booth or, on some motorways, every few kilometres without slowing down at all.

Via Verde can also be used to pay for parking in many locations. 


When entering a car park where Via Verde is an option there are two ways it works: in some car parks it's possible just to wait a few moments for the gate to decide that you've opted for Via Verde and not a ticket, in others you have to press a button.

The parking above has three options: use a card (for residents or people with a subscription), blue button for a ticket, and green for Via Verde. To alleviate difficulty in pressing the green button I created the "Via Verde Stick" from a short length of wooden broom stick handle, some green spray paint, and two felt floor protectors.

The felt floor protectors are on both ends so that it doesn't matter which way the stick is oriented.

I do wonder what the driver behind me thinks when a long, bright green stick appears out the window but...
tag:blogger.com,1999:blog-19303585.post-6192850347732641270
Extensions
Debugging Lotus 1-2-3 by fax
retro
Show full content

There isn't a lot to this story beyond the fact that in around 1990 I helped debug someone's Lotus 1-2-3 set up via fax. But it's a good reminder of how important the Zeroth Law of Debugging is (see below).

Without some sort of online connection with these folks, and with transatlantic phone calls being very, very expensive (I was in the UK, they were in the US) fax was the obvious answer.

I was reminded of this when I came across the actual fax itself:


What I asked them to do was give me the output of /ppomr. Hitting / in 1-2-3 started the menu system and each letter took you down a submenu until you hit an actual menu item. /ppomr is /Print Printer Options Margins Right (read all about it in the Quick Reference) and so I was asking for the size of the right margin when printing. 

Here's what that looks like in action:

And then I instructed the person on the other end to alter the left margin with /ppoml (/Print Printer Options Margins Left). I also told them if they wanted a change to the page headers I'd need to "send them a disc" (i.e. mail a floppy disc to the US!)
If you are going to debug anything you need to tighten the loop between trying something and observing the output of your change. This should be the Zeroth Law of Debugging: get the smallest/fastest test case so you can iterate.
Worst case send faxes across the Atlantic. 
tag:blogger.com,1999:blog-19303585.post-6045805352103665596
Extensions
I have come to loathe acronyms
Show full content

Unless they are widely, widely known they make communication worse. And they have a tendency to make the writer seem pompous, or a member of some special clique, while making a reader who doesn't know the acronym feel foolish. 

They are the opposite of clear communication, and are often accompanied by unclear, complex language.

The writer's goal (whether of a book, an email, or whatever the hell we call a tweet now) should be to be understood. Acronyms are an impediment to that and are often more difficult to read or say than actual words. 

And don't fall into the awful trap of defining an acronym in a document and then using it later. That's a substitute for using plain language. Always use plain language.

Unless your goal is to be misunderstood. 

tag:blogger.com,1999:blog-19303585.post-5795781756177787948
Extensions
Archiving hardware projects
hardware
Show full content

From time to time I do some project involving old hardware that requires connecting it to a modern computer. For example,

    Getting the KIM-1 to talk to my Mac

    Resurrecting a Dataman S4 PROM programmer

    Ripping old mini DV video tapes on a Mac

And I've come to the conclusion that archiving the related hardware is important. For example, I got this Dataman S4 talking to my Mac using a few different cables. I bought a set of cables and archived them in a bag for the next time I need to do this.


The Dataman S4 project required three things: a USB-C to USB-A adapter, a USB-A to RS-232 adapter and a 9 pin to 25 pin serial cable. 

These things are fairly inexpensive making it viable to archive them. Now I only have to worry about the drivers being available!
tag:blogger.com,1999:blog-19303585.post-2972398345099268358
Extensions
Getting the KIM-1 to talk to my Mac
retro
Show full content

I've written before about my 1976 KIM-1 and code I wrote for a similar one long ago. But I hadn't done much with the KIM-1 and strongly believe that old hardware need to be living machines not still lives. But using the KIM-1 directly (via its keypad and little hexadecimal display) is painful. I wanted to be able to use it with a terminal.

Luckily, the KIM-1 was designed to interface to a terminal: a Model 33 ASR Teletype. Teletypes use a type of interface which is unusual to most people (unless you work with industrial machinery where it's pretty common). That interface is a current loop.

A current loop uses current (often 20mA) rather than voltage (such as the voltage levels seen in common serial interfaces). Prior to the creation of RS-232, current loops were very common. Current loops are still used in industrial settings partly because they have good noise immunity, can go for long distances, and are simple and reliable. 

In the KIM-1 manual there's a picture of the way its current loop works when connected to a Teletype: 


When the KIM-1 wants to send data to the Teletype it uses pins S and U of one of its edge connectors. S is permanently connected to +5V via a 150 ohm resistor. When the KIM-1 receives data from the Teletype's keyboard it uses pins R and T. Just like S, R is permanently connected to +5V. The important thing to note is that the KIM-1 is responsible for the current: the Teletype is entirely "dumb". This will matter later in this blog post.
I happened to have lying around a kit to make an adapter between RS-232 and the Siemens SIMATIC S5 current loop

A simple kit to build. Since USB to RS-232 adapters are easy to find I'd be able to communicate with the KIM-1 using it. But first check the circuit diagram of this adapter. There's a small problem on the receive side.

As is pretty common with current loop applications, optoisolators are used. OK1 handles when the device connected to the RS-232 transmits something. And you can see from the diagram, it expects to be getting 5V, 20mA in on its pin 5 and then out again on pin 4. So, that'll work perfectly for the "keyboard" connection to the KIM-1 (pins R and T). 
But the receive side is a different story. It's handled by OK2 and it's expecting 5V, 20mA on pin 1, but pin 2 goes to GND. So, there's no "loop" back to the device. This won't work with the KIM-1 without a small modification.
I built the kit and and tested it against the KIM-1 like this:

Looks messy but it validated the little modification I needed to make and that I could talk to the KIM-1. Here it is talking at 300 baud using the RS-232 to USB adapter seen above. 


So, what's the modification? Well, pin 2 of OK2 goes to ground and we don't want it to, we want it to go the KIM-1's pin U. There are two ways to do this. I could have cut the track on the back of the board that goes from pin 2 to ground, and soldered a wire on the back.

But this kit came with all the chips socketed so I took an even simpler route. Bend pin 2 away from the socket and solder directly to it.

And that worked fine. The kit also came with a nice little box and so the final adapter looks neat.

The grey wire goes to the KIM-1, the white wire is a USB-A cable that I'm using to power the adapter and the KIM-1 itself. 

The KIM-1 will happily communicate as 1200 baud with 7 bit ASCII and 2 stop bits. I'm using minicom to communicate with it. The main thing is to set the delete key to send DEL instead of BS since the KIM-1 needs to receive a DEL on start up so that it can measure the Mac's transmission speed.
One of the Teletype functions available is to load a program from punched tape. I don't have an actual Teletype but I can emulate the punched tape format and that'll allow me to upload programs easily.

The format itself is not complicated.
tag:blogger.com,1999:blog-19303585.post-3528602294442713744
Extensions
Twenty years of the "GNU Make Standard Library"
Show full content

Twenty years ago, on February 3, 2005, I released v1.0.0 of a project I called "GNU Make Standard Library" (GMSL). That first release can still be found in its original location on SourceForge. I moved the project from SourceForge to GitHub and newer releases are there. The latest release is v1.2.2 on March 30, 2024.

The project has its own homepage at https://gmsl.jgc.org/. The page describes the GMSL as "a collection of functions implemented using native GNU Make functionality that provide list and string manipulation, integer arithmetic, associative arrays, stacks, and debugging facilities."

GMSL grew out of work that eventually became my book "The GNU Make Book". What can it do?

Well, things like this:

include gmsl

VAR    := Here is a string with some words in it.
$(info $(VAR))

# Convert VAR to lowercase
LC_VAR := $(call lc,$(VAR))
$(info $(LC_VAR))

# Get the length of LC_VAR as a string
$(info $(call strlen,$(LC_VAR)))

# See if VAR and LC_VAR are the same string
$(info $(if $(call seq,$(VAR),$(LC_VAR)),Same,Different))

# Treat LC_VAR as a list and get the last element
$(info $(call last,$(LC_VAR)))

# Get the number of list elements in LC_VAR
$(info $(call length,$(LC_VAR)))

# Apply the strlen function to each element of LC_VAR
$(info $(call map,strlen,$(LC_VAR)))

# Deduplicate the list of lenghts of elements of LC_VAR
$(info $(call uniq,$(call map,strlen,$(LC_VAR))))

# Split LC_VAR on the letter e and replace with 3
$(info $(call merge,3,$(call split,e,$(LC_VAR))))

# Create an associative array mapping the lengths of words
# in LC_VAR to a count for each length
increment_aa = $(call set,LC_VAR_AA,$1,$(call inc,$(call get,LC_VAR_AA,$1)))
$(call map,increment_aa,$(call map,strlen,$(LC_VAR)))
dump_key = $(info $1: $(call get,LC_VAR_AA,$1))
$(call map,dump_key,$(call keys,LC_VAR_AA))

And a whole lot more. The entire GMSL is written using native GNU Make functionality and pull requests are welcome!

Update 2025-02-05: I decided GMSL was missing a fold function so I added it. So, latest release is today, v1.2.3

tag:blogger.com,1999:blog-19303585.post-8168793316207256718
Extensions
The complete text of "All Watched Over by Machines of Loving Grace"
Show full content

Richard Brautigan's poem "All Watched Over by Machines of Loving Grace" is somewhat well known in tech. circles but I couldn't find a complete PDF of the original 1967 publication of it (and other poems) online. 

The copyright notice in Brautigan's collection reads:

  © Copyright 1967 by Richard Brautigan 

  Permission is granted to reprint
  any of these poems in magazines,
  books and newspapers if they are
  given away free. 

I am interpreting "print" as including the availability of a free PDF and making a scan of the complete book available here. 


tag:blogger.com,1999:blog-19303585.post-8649792458628677830
Extensions
"All your base are belong to us" introduction to my 2004 MIT Spam Conference talk
anti-spam
Show full content

As I've mentioned before my talk at the 2004 MIT Spam Conference was about using one machine learning system to beat another. In that case a spammer using machine learning to beat a machine learning spam filter.

The talk started with a short video playing off the All your base are belong to us meme. I very carefully edited the images to change the text to be about spam and incorporate Paul Graham (who was the instigator of the MIT Spam Conference and an early machine learning spam filter pioneer). 

I thought I'd lost the audio of that introduction and randomly came across it today. So here is the restored introduction to the talk made on a Mac in 2004 (I still haven't found the audio of the actual talk).

tag:blogger.com,1999:blog-19303585.post-4119179139891431895
Extensions