Instagram filter used: Lo-fi
Photo taken at: Sir Adam Beck Hydroelectric Generating Stations

Instagram filter used: Lo-fi
Photo taken at: Sir Adam Beck Hydroelectric Generating Stations
Printing from computers goes through waves of being difficult to being easy, then back to difficult again. This is likely due to the cycles of technology, complexity and user demand flow in and out of sync. I think we’re at peak annoyance right now.
It’s even harder with Raspberry Pis, as when printer drivers support Linux, 90% of them are for x86 or x86_64 computers only (Canon: ಠ_ಠ). ARM doesn’t get a look in. But one technology does actually seem to help: network printers that support IPP — Internet Printing Protocol.
We had an old Brother laser printer that just got slower and crankier and less useful as a printer, so yesterday I got a new Brother DCP-L2550DW to replace it. It says it supports Linux in the spec, but I knew not to be too optimistic with my Raspberry Pis. And indeed, it was seen on the network but no driver was found. I had a sad.
What turned my frown upside down was finding out about Raspbian’s cups-ipp-utils package. For desktop use, install it this way:
sudo apt install cups cups-ipp-utils system-config-printer
(leave off system-config-printer if you’re running from the terminal.)
Update: while you’re here, you might also want to install the print-to-PDF driver too. This allows you to print without wasting paper. Install it (and the IPP driver) with:
sudo apt install cups cups-ipp-utils system-config-printer printer-driver-cups-pdf
In many cases, this might be all you need to do: the network printers should be automatically found and added as devices.
On the desktop, open up Preferences → Print Settings and add a new printer. Yes, it prompts for your user password which you may have forgotten. I’ll wait while you try to remember it …
Now under Network Printers, you should see a device you recognize. Pick the one that says IPP network printer somewhere:

Here’s where the magic happens: you actually want to pick the generic driver for once:

And again, the IPP utilities package will have picked the right driver for you:

Changing the name and location is optional:

Hit Apply, and you should be printing!
(Hey, printer manufacturers have been known to be evil and make good, working stuff suddenly not work. IPP is supposed to make everything sparkly again, but I can’t guarantee that something wicked won’t come this way.)
Update: After a few months of using the Brother DCP-L2550DW, I don’t recommend you buy it. It’s a perfectly capable printer, but it takes ‘chipped’ toner cartridges that:
To get around (1), select Continue instead of Stop in the Toner Out configuration menu.
Update, January 2020: with sales and all needing a printer for work, the DCP-L2550DW will go with me to the office. I now have a MFC-L2750DW at home that scans to network, amongst other things. IPP proved it was magic yet again by the new printer being found and just worked with all my machines as soon as I added it to the network.

Only umpteen years late, I bring you the
QBasic Online Help Index — https://scruss.com/qbasic_hlp/
It’s the QuickHelp file from Microsoft’s ancient-but-still-useful QBasic interpreter for MS-DOS. I converted it to HTML, and made some minor cleanups so it would work better on the web.
So if you’ve got a hankering to understand the parameters for MKSMBF$ or know the syntax of PRINT USING, I’ve got your back.
The greatest common divisor (gcd) of two natural numbers is the largest number that evenly divides both. For instance gcd(8, 12) is 4. There are many clever and efficient ways to calculate the gcd of two numbers on a Linux machine. The method presented here is not among them.
#!/bin/bash
gcd(){ comm -12 --nocheck-order <(factor $1|sed 's/^[^ ]*/1/;s/ /\n/g') <(factor $2|sed 's/^[^ ]*/1/;s/ /\n/g')|tr '\n' \*|sed 's/.$/\n/'|bc;}
gcd $1 $2
(Contrived) example:
gcd.sh 24691357802469135780246913578 61728394506172839450617283945
12345678901234567890123456789
Which breaks down as:
| prime factors of 24691357802469135780246913578 |
prime factors of 61728394506172839450617283945 |
| 2 | |
| 3 | 3 |
| 3 | 3 |
| 3 | 3 |
| 5 | |
| 7 | 7 |
| 13 | 13 |
| 31 | 31 |
| 37 | 37 |
| 211 | 211 |
| 241 | 241 |
| 2161 | 2161 |
| 3607 | 3607 |
| 3803 | 3803 |
| 2906161 | 2906161 |
Multiply the factors common to both:
3 × 3 × 3 × 7 × 13 × 31 × 37 × 211 × 241 × 2161 × 3607 × 3803 × 2906161 = 12345678901234567890123456789
I’m sure someone else has used the output of factor and comm in this way before. The hard part was getting coprime numbers to output 1.
So I picked up this large boy from the MSU Surplus Store:

You get about 7 high-resolution pictures on a disk. And high resolution by 1998 standards means this:




1024×768 whole pixels: that’s huge! The camera is autofocus with image stabilization, so it was quite a nifty unit at the time.
Pre-dating EXIF, its image metadata is limited. There’s an external ‘411’ thumbnail file that looks a bit like this:

If you care to dig about in such an ancient file, I’ve got a matching image and its 411 file here: MVC-005X.zip. And manuals? Here: Sony_Mavica-FDC91-W0007229M.pdf
Most annoyingly, the camera really only likes real Sony batteries, or it shuts down with an “InfoLithium” battery error (swearies in link). As this battery format is now used in generate photo lighting systems and Sony don’t make it any more, this may be a camera that dies from DRM before anything else.
Years back I wrote something about HSV colour cycling for Arduino. Things have moved on: we’re all writing code in MicroPython/CircuitPython now and 8-bit micro-controllers are looking decidedly quaint. Yes, yes; some of you must still write code in PIC assembly language and I’m sure that’s very lovely for you indeed don’t @ me.
If you look at the output of a typical HSV to RGB algorithm, the components map something like this:

These lines remind me so much of sine waves, if very blocky ones. The red trace in particular is just the cosine function, with the input range of 0..2Ï€ and the output range of -1..1 both mapped to 0..1. The green and blue traces are just the red trace shifted horizontally by â…“ and â…” respectively.
Since we have transcendental functions in MicroPython, we don’t have to fossick about with linear approximations. The common RGB LED function wheel() uses similar linear interpolation as the graph above. Why make do with blocky cogwheels when you can have a smooth colour wheel?
def cos_wheel(pos):
# Input a value 0 to 255 to get a colour value.
# scruss (Stewart Russell) - 2019-03 - CC-BY-SA
from math import cos, pi
if pos < 0:
return (0, 0, 0)
pos %= 256
pos /= 255.0
return (int(255 * (1 + cos( pos * 2 * pi)) / 2),
int(255 * (1 + cos((pos - 1 / 3.0) * 2 * pi)) / 2),
int(255 * (1 + cos((pos - 2 / 3.0) * 2 * pi)) / 2))

Quite elegant, I thought. Yeah, it may be computationally expensive, but check next year when we’ll all be running even faster µcs. Certainly none of the mystery switch statements or nested conditionals you’ll see in other code. Just maths, doing its thing.

Simple things like fasteners don’t seem to be invented. It’s almost as if they’ve always been around. Like T-nuts — those hammer-in furniture nuts that also find use as 3D printable tripod mounts — someone invented those?
Sure enough, it seems that local company Sigma Tool & Machine have a lot to do with T-nut development. They’re now on Nantucket Blvd just north of me, and they used to be at 96 Crockford Blvd very close by.