It appears that, in spite of what I said in my last post on the matter, my Pimoroni NVMe Base Duo for Raspberry Pi 5 is not going to just sit on the shelf for a couple of months.
Continue readingCategory Archives: Tech
Mastodon
I am – for the time being at least – now on the mastodon.social Mastodon instance as ‘@chrisrc‘.
Pimoroni’s Raspberry Pi 5 NVME x2 Kit
Having done absolutely nothing with the Pimoroni Raspberry Pi 5 NVME Kit I bought at Christmas, it seemed eminently sensible to buy it’s bigger brother – the NVMe Base Duo for Raspberry Pi 5! And I’m certain this kit will also enjoy spending the next three months on a shelf!
Continue readingGetting Red Hat Linux 5.2 up and running on 86Box
Introduction
One of my longer-running goals for Period Sites in Period Browsers was to include a good number of non-Windows hosted web browsers and the first stage in that is the creation of a functioning instance of the operating system hosted within an easily managed virtual machine. Unfortunately, whenever I’ve tried to install premillennial versions of linux within QEMU, I have categorically failed.
And, given the lack of guides on the internet, I’m not the only one.
In this guide we’re going to install and configure a working (albeit non-perfect) version of 1998’s Red Hat Linux 5.2. By the end of this guide we will produce a Red Hat Linux 5.2 install with a working network connection and functioning XWindows/Desktop environment.
Continue readingThe Strange Death of the Square Checkbox’d UI
This is a nice little potted history of the use of the square checkbox. It ends noting that Apple appears to have abandoned the use of the square checkbox and chosen to use an icon very similar to a radio button in their new VisionOS – which feels like a big step back in usability.
Period Sites with Period Browsers – Machines No. 99 and 100
I’ve just added two somewhat interesting machine/browser combinations to Period Sites in Period Browsers.
Machine 99 – Windows 98 RTM x86 with Grail 0.6
Grail 0.6 running on the release to manufacturing version of Windows 98. Grail 0.6 is interesting as it’s a cross platform browser written by Guido van Rossum in Python and uses the Tcl/Tk windowing toolkit for display. Was Windows 98 the ideal platform for Grail? Probably not, but it did run and it did pretty well with pre-millennial web pages…
Continue readingMissing Objects from Go Channels or: The coder is an idiot and used a queue like a slice…
This is probably self-evident to most sensible, educated people out there but… Golang Channels are queues and not slices!
An Idiot Writes…
So the following code looks superficially right – push the numbers 0 to 33 into a queue and then read them out with a loop, printing them to the screen as you go – except, when run, you’ll only get the numbers 0 to 16. Try it here and see.
package main
import (
"fmt"
)
func main() {
c := make(chan int, 100)
for i := 0; i < 34; i++ {
fmt.Println(i)
c <- i
}
fmt.Println("===")
fmt.Println("length")
fmt.Println(len(c))
fmt.Println("===")
for i := 0; i < len(c); i++ {
a := <-c
fmt.Println(a)
}
fmt.Println("===")
}
So what’s the problem? Well, c – our Go Channel – doesn’t stay the same length after you interact with it. Why? a := <-c (the command to get the first object in the channel) alters the size of the channel as it removes the retrieved object – so a 34 object channel becomes a 33 object channel after we retrieve our first number meanwhile our counter, i, continues to count upwards until i is high enough that i < len(c) fails and the for-loop ends before the channel has properly drained.
Enlightenment…
The simple solution is to get the length of the channel once and to use that for your counter. Try it here.
package main
import (
"fmt"
)
func main() {
c := make(chan int, 100)
for i := 0; i < 34; i++ {
fmt.Println(i)
c <- i
}
fmt.Println("===")
fmt.Println("length")
fmt.Println(len(c))
fmt.Println("===")
max := len(c)
for i := 0; i < max; i++ {
a := <-c
fmt.Println(a)
}
fmt.Println("===")
}
More…
And why was I using a loop with a counter in it? Because I wanted to produce a numbered list of results and I was too lazy to read it out into a slice and then work with that. A better solution would probably involve replacing our channel reading loop definition as follows…
for i := 0; len(c) > 0; i++
Counting Chrome Tabs on MacOS (Or, I have an open tabs problem!)
Another aide-mémoire; open Chrome tabs can, on MacOS, be counted via the following incantation. This particular incantation will pull the tab count from all open windows – minimised or otherwise – without the need to activate Chrome in any way.
osascript -e{'set text item delimiters to linefeed','tell app"google chrome"to url of tabs of windows as text'} | wc -l
Which, when run on my currently open set of tabs, comes back with a number slightly higher than 4,000.
Continue readingPimoroni Raspberry Pi 5 NVME Kit
So I picked up one of the Pimoroni Raspberry Pi 5 M.2 NVME kits. While there is supposed to be an official adapter coming from the Raspberry Pi foundation, the Pimoroni kit is well priced for what it claims to offer.
Continue readingPeriod Sites in Period Browsers Machine Number 90 – Windows XP Home x86 with Amaya 6.0
It’s been a little while since I’ve posted about Period Sites in Period Browsers but, given I’ve just added my 90th combination of Operating System and Browser, it feels like a good time to flag it again.
Continue reading