/pages

Computing

There is nothing here yet.

All Computing Pages

/computing Stream

June 9, 2024

/stream /computing /reading

Read Folk Interfaces by Maggie Appleton, an exploration on the way people will bend software to their needs in ways their author didn't intend.

One concept that stood out to me was the claim that modern software is "monolithic apps" produced by "large California-based compaines" that design for a global audience, and how these tools could never work for anyone exactly right.

Another was the notion of thinking of software not as the golden path it was designed for, but as a bundle of "raw material" that is malleable. This resonates with the way I've been thinking about things like the /coalescent computer, and more recently with my thoughts on a "vernacular database".

November 14, 2023

/stream /computing /programming /hare

Over the past few days, I've been starting to get acquainted with the Hare programming language. Someone on Merveilles mentioned something about it, and after looking it up something really clicked about it for me. I'd been really starting to sour a bit on Rust, especially the complexity of the ecosystem, and was thinking that I should start to learn 'C'. So finding the Hare language, which is an opinionated 'C' replacement whose opinions heavily match my own, has been a joy.

From what I can tell so far, the core idea behind Hare is that "Understandability of the Toolchain" should be the highest goal. You can bootstrap the compiler with gcc in about 30 seconds, with about 30k lines of source code. That's faster than building most simple Rust binaries with an empty cache. In terms of language features, it is focused on proven ideas implemented well, and consistency over syntactic sugar. As an example of its philosophy, its implementation of tagged unions turn a very basic type system into something that punches way above its weight class in terms of capabilities and program correctness. It makes a big leap from something like C towards something like Rust, but with an order of magnitude less complexity.

So far, the only things close to a "dealbreaker" is the limited editor integrations, like in-editor compiler warnings, and autocomplete/autoformatting. Perhaps I can try my hand at an LSP implementation...

November 11, 2023

/stream /computing /imac-2013

Acquired another new computer today, a 21.5" /iMac (2013). I'm writing this update from that computer, having moved over all of my tools and configuration. I'm not sure it's really a useful skill to be able to configure an old mac as a personal linux machine, but I'm getting pretty good at it. I appreciate the smaller footprint and lower power consumption than the 27" /iMac (2020) that it replaces. All of my transition towards linux as my daily driver operating system has occured on laptops so far, so this is the first time bringing my work to my desk on a (slightly) bigger screen.

A 21.5-inch iMac sitting on top of a desk riser, with a light bar above it, and two keyboards on the desk in front of it.

It's nice to finally have a linux desktop, though I'm bummed that my layout on my split keyboard does not translate at all from macOS to Linux. There are way too many hot-key changes, and so many programs implicitly rely on the QWERTY layout, that my custom configuration and ColemakDH layout were painful, and I've temporarily reverted back to a standard-issue Apple keyboard. I'll have to slowly redesign and (readjust to) the layout as I continue using my environment at a desktop setting.

November 8, 2023

/stream /computing /permacomputing /repair /macbook-2007

Disassembled the /MacBook (2007) today to give a proper internal dusting and a fresh application of thermal paste. Even after all the work done on the /MacBook Pro (2006), I still find myself using the /MacBook (2007) as my daily driver now, because it's smaller, lighter, and the plastic doesn't burn my legs as much as the metal case on the Pro. However, I've noticed that the CPU still seems to get quite hot, and I figured the 16 year old thermal paste wasn't helping much.

After the application, I noticed that peak thermals were much lower: ~68C as opposed to the ~80C I was seeing before when doing something like compiling a rust binary. The stable idle temperature during a work session hasn't changed much (~58C), but it takes much longer to reach that temperature (about 20 minutes of working), and temperature recovery back to baseline after a spike is also noticably better.

Hopefully this preventative maintenance extends the life of this computer even further than it was on track to go.

September 15, 2023

/stream /computing /permacomputing /repair /macbook-pro-2006

After coming to the conclusion that GRUB2 was the only way to boot, my only remaining option to get the GPU working on /MacBook Pro (2006) was to go through the process of extracting the firmware from a BIOS boot, and then patching the radeon kernel module to manually load that firmware from a file. I tried for a long time to make a BIOS-bootable USB drive of an old Ubuntu 10 live CD, but the computer refused to boot from it. From what others had written online, it seemed like booting from a DVD was the easiest path forward, so I hunted down a blank DVD and burned that 32bit Ubuntu 10 image to it.

Unfortunately, when trying to boot from the DVD I came to the conclusion that the DVD drive was broken. My /MacBook (2007) easily booted from the DVD, but the /MacBook Pro (2006) did not. My solution: open up both machines, hook up the working drive from the MacBook to the MacBook Pro, boot into Ubuntu and extract the firmware, and put everything back together. To make a long story short: it worked, miraculously. After a long morning of open-heart surgery, I still had two working laptops and a "vbios.bin" file that would be the key to a working GPU.

I spent a little time after the firmware extraction looking into patching the kernel, but didn't make it too far.

September 8, 2023

/stream /computing /permacomputing /repair /macbook-pro-2006

After a bit of a break, I came back to the project of getting the /MacBook Pro (2006) GPU functional in arch linux again. With the time away, I'd had more time to think about what the problem was, and to come up with new approaches. Essentially, I understood that the GPU driver needed to be able to see the GPU firmware, which was only exposed during certain boot conditions. I came to the conclusion that if I could boot directly into an EFISTUB that the firmware would be visible, and so I made it my goal to try and do that.

Unfortunately, the main problem with this machine is that it has two oddities with its EFI: it uses 32bit EFI hardware to boot into a 64bit CPU, and it is also an Apple-specific EFI 1.10 implementation and not a modern UEFI standard implementation. I think I ended up believing that there have been advances in both the linux kernel and also things like systemd-boot that would have overcome the 32bit -> 64bit mismatch, but I kept running into boot errors anyway. My final takeaway is that it was the custom EFI 1.10 implementation that was breaking the boot process due to missing hooks. If you're reading this in the future, I don't think that this machine will ever get any better boot options due to its proprietary and opaque EFI 1.10 implementation, unless someone takes the time to reverse-engineer Apple's implementation.

This means that I'm left relying on GRUB2 and its EFI Handover Protocol method of booting "mixed-mode" on this particular hardware. I also discovered that newer versions of GRUB2 (starting at r566 I believe) have issues with this boot mode, so I ended up pinning grub to an older version (2.04) in pacman and now booting works every time. By adding "reboot=pci" to the kernel parameters, rebooting also works every time, and the laptop never has any strange boot issues. All that's left now is to figure out how to get the GPU firmware loaded manually.

July 10, 2023

/stream /computing /programming

A few days ago I watched this video about the performance differences between stack machine VMs and register machine VMs (when running on a physical register machine). The takeaway was that due to pipelining, a stack machine VM runs slower since it is always reusing the top of the stack, and none of the work can be done in parallel. For example, the equation ( 1 + 2 ) * ( 3 + 4 ) on a stack machine could be 1 2 + 3 4 + *, but all 7 instructions have to be run sequentially; on a register machine ( 1 + 2 ) and ( 3 + 4 ) can be decoded and prepped at the same time, since there is no dependency on those calculations (only the '*' must wait).

This, for some reason, made something click about Interaction Nets, in a way that didn't resonate with me the first time I started reading about them. It might have just been because lambda-calculus feels so opaque to me and I didn't have a good visual model in my head, and that this concept of dependencies in calculations gave me that visual. From there, I revisited HVM's github and Devine's interaction net page (linked above), and found myself thinking about rewriting rules again too.

Either way, this all got me thinking about how you might be able to declare "dependencies" for calculations in a stack machine. Could you maybe "branch" a stack into parallel computations with different memory addresses? Could you use that for SIMD operations? Would this be a great way to increase real world performance, or would it make writing code unecessarily complex? Am I just reinventing an obvious idea from a part of computer science that I don't know about?

July 2, 2023

/stream /computing /programming /collect

Spent a good chunk of time today revamping a community website to add a blog, and part of that meant figuring out how to implement a "dynamic root path" for URLs. I had to make some changes to 'collect' for it to work, but I think it's more robust now: it should more fully be able to recurse through contexts looking for objects of a certain name (which in this case is the "root-override").

Adding this feature has made me feel a little bad about 'collect', since with only four months having passed it feels quite sloppy and difficult to reason about the source code. It's definitely not worth rewriting again any time soon, but it's worth keeping in mind as my web projects that rely on it continue to grow.

June 25, 2023

/stream /computing /linux /macbook-pro-2015

After running out of "time budget" to get /MacBook Pro (2006) up and running, I installed Arch Linux on my daily driver laptop, which is a /MacBook Pro (2015). Being somewhat recent, but not too new, the install was quick and painless and has had very few problems.

As I've been shifting my daily computing to Linux, one of the biggest gaps in my daily computer usage was a "stream of thought" note taking tool, which I usually use the Apple Notes.app for. I spent an hour trying to figure out how to write a zsh alias to create a "journal" command, and it turned out really well. `jrnl` creates a temp file, opens $EDITOR, then appends a timestamp and the contents to a file named with the date in the ~/.journal folder.

After that win, I also finally learned how to set up screenshots with the `scrot` tool, mapped it to an unused media key, and send them to ~/.screenshot.

Finally, I decided to learn how rsync works and set up a few more aliases for syncing the journals and screenshots to my home server; now I can replicate the files across all of my machines, and I'm one step closer to a personal "cloud". Most importantly, I can access screenshots on my phone, though I can't yet easily integrate my phone with my new "journal" set up.

June 12, 2023

/stream /computing /permacomputing /repair /macbook-pro-2006

After finally getting Arch installed, booting into it also had many challenges. I have not been able to get a consistent boot, and in fact have only been able to get all the way through to login once. Just like the /MacBook (2007), it frequently immediately hangs from grub on “Loading initial ramdisk”, but the success rate seems far lower than the MacBook. I’ll need to dig much deeper into the boot process to see if this isn’t fixable, but at the moment, /MacBook Pro (2006) does not have a usable linux partition. Hopefully I can get this sorted out, because these old machines are great, and having a reliable arch install would give these machines life for many more years to come.

June 11, 2023

/stream /computing /permacomputing /repair /macbook-pro-2006

Working through trying to completely restore this /MacBook Pro (2006) to a fresh copy of OS X Lion was hell. There was nowhere to download a disk image from, and the machine I was on was missing its Recovery HD partition. I jumped through so many different hoops trying to get figure out how to get things to clean install, but eventually I was able to generate a Lion Bootable USB, change the clock back to 2013, and then boot (and install) from the USB.

Unfortunately, the complete formatting of the drive and fresh install of OS X didn’t make the Arch install go any smoother. I had to mess with kernel parameters to get the arch iso USB to boot, and was eventually able to get the OS installed.

June 10, 2023

/stream /computing /permacomputing /repair /macbook-pro-2006

The last part for my /MacBook Pro (2006) came in today, which was the lower case. Unfortunately, while I’m sure it was a relatively “New OEM” part at one point, its years in storage left it a little bent in places, most notably the slot for the disc drive was collapsed. I looked through the internet and decided there were probably no more “new” parts like this easily purchasable online, and that this part was better than the one I had, so I did my best to bend it back in place and moved on with reassembly.

I never know if I’m doing a good job reapplying thermal paste, but otherwise reassembly went smoothly. My first attempt to boot failed, but it turned out to be from the RAM not being fully seated; I thought it was funny that after completely disassembling the entire laptop and transplanting it into a new case, the final step, and the only one that doesn’t require disassembly was the part that went wrong. After reseating the RAM, the computer booted normally into OSX.

Arch was a different story. I ran into a ton of problems, and ultimately decided that my “clone from a different machine” idea was a bad one. I’ll have to wipe this machine clean and start from scratch.

/stream /computing /coalescence /coalescent-computer

I fleshed out the /coalescent computer page pretty significantly, intending to have a deep enough overview on this site to make it worth linking to internally. For the moment, it still suggest readers check out the external Coalescent Computer site, but as the project matures in the future I'll add more information here on this site.

June 9, 2023

/stream /computing /permacomputing /repair /macbook-2006

Stopped in our local reuse shop today hoping that an old Apple Thunderbolt Display that I had seen earlier in the week would still be there, but as I was walking in, someone was walking out with it. As a consolation prize, there was a G4 iBook and a Matte Black /MacBook (2006) in stock. The MacBook was $10 and in need of a battery, but it came with an original MagSafe charger which would be useful for the /MacBook Pro (2006), and my /MacBook (2007) battery could be swapped in for testing and set up.

A matte black macbook sitting on a walnut coffee table, booted to the default geometric blue wallpaper of MacOSX 10.4.

I took it home and checked it out, and it ended up being in great condition. It turned out to be the original Core Duo revision (MacBook 1,1) and not the Core 2 Duo revision from later in 2006, making it my first and only 32 bit computer. It should eventually be a great 32 bit test platform for the /coalescent computer. I luckily had 2GB of RAM sitting around from the /MacBook (2007) before it was upgraded to 3GB, which meant I was able to max out its RAM capacity without any new parts.

/stream /computing /permacomputing /repair /linux /macbook-pro-2006

Set up the SSD for the /MacBook Pro (2006). My current /MacBook (2007) has both Mac OS X Snow Leopard and Arch Linux installed, and uses the native Apple bootloader system to choose between operating systems; it was a pain to set up, especially because that specific chipset uses a 64bit CPU with a 32bit EFI. I decided that the easiest way to set up the new drive would be to clone the SSD from the /MacBook (2007), since it uses the exact same CPU and EFI system as the /MacBook Pro (2006). I booted the /MacBook (2007) from an Arch Linux Live USB, connected the new SSD via USB, and then used dd if=/dev/sdX of=/dev/sdY bs=256K conv=noerror,sync status=progress to clone between the drives.

Unfortunately, though they were both nominally 256GB, the new drive was about 0.1GB smaller than the existing drive so dd failed right at the end. Since I knew that all the data was there, and that the main issues were around the missing backup partition table and the truncated final partition, I manually reconstructed the partition table with gdisk by choosing the same block offset and length as the original disk for all partitions, letting the last one automatically go to the end instead of overflowing. By writing the modified table, the backup partition table was correctly rewritten to the end. gdisk v and fsck let me know that there were no remaining problems. Finally, I used resize2fs to also make sure the filesystem (ext4) in that partition knew that the size had changed, and e2fsck to verify it was clean. For sanity, I also regenerated all of the GPT UUIDs for the disk and partition, and then regenerated the fstab file for linux. I mounted that disk and arch-chrooted to make sure all was well, and then successfully rebooted directly from the drive.

Now, hopefully, it will be ready to drop right in to its new home when the final component arrives.

June 8, 2023

/stream /computing /permacomputing /repair /macbook-pro-2006

Several of the parts that I ordered for the /MacBook Pro (2006) came in today, including the Rear Bezel (the top of the "lid"), the Upper Case (where the keyboard and trackpad are), and the replacement 250GB SSD.

An old macbook pro disassembled in pieces on a coffee table; its guts exposed in the bottom case, with the keyboard and upper bezel sitting seperately next to it.

I removed and cleaned the keyboard from the original upper case along with the bluetooth module, and then reinstalled them on the the new case. It also came with a fresh set of insulation and spacers, which I also installed. I had already removed the rear bezel from the old LCD assembly, so snapping that on and replacing the two screws only took a minute. After about an hour and a half of work, those two parts were fully cleaned and transitioned, and looked good as new.

/stream /reading /computing /permacomputing /degrowth /benign-computing /complex-systems

Read Abstraction, indirection, and Sevareid's Law: Towards benign computing after seeing it mentioned on Damaged Earth Catalog. It provides background on the idea that computing may, in general, be creating more problems than solutions, and proposes a design framework for computing that minimizes that outcome. The core principles are “scale out”, “fail well”, “open design”, and “fractal”. In essence, it promotes small nodes speaking open protocols that are individually resilient, creating an emergent larger network that also exhibits these properties. It prioritizes long term resiliency and harm mitigation over short term costs and maximum availability.

I like the idea of benign computing aiming to mimic how nature *fails*, instead of how it *succeeds*. Placing the emphasis on resilience as opposed to solutions naturally puts you in a defensive and critical position during system design. I think that this framework lends itself well to an analysis of the Coalescent Computer which shares many of these goals, and would benefit from a deeper analysis through this lens.

June 4, 2023

/stream /computing /permacomputing /repair /macbook-pro-2006

Today I completely disassembled the junk shop /MacBook Pro (2006) to inspect for any internal damage before buying a few replacement parts. Everything seemed to be in great shape, so I ordered a replacement top and bottom case from eBay, and a 2.5" SSD to replace the 17 year old spinning hard drive it still had. I had enough old RAM sticks lying around to max out its capacity (3GB), and the battery is actually in pretty good condition.

The CPUs and GPU on the motherboard of the 2006 macbook pro, freshly cleaned of thermal paste and setting on a clean walnut coffee table.

At some point in the next few weeks after cleaning and installing the guts in a new case, reapplying thermal paste, upgrading to an SSD, and setting up Arch Linux, this laptop will be a high performance work machine again, hopefully saved from a landful for another long while.

June 2, 2023

/stream /reading /computing /permacomputing /degrowth /collapse

Following some links led me to The Monster Footprint of Digital Technology on Low Tech Magazine. While the concept of embodied energy (in microchips, or in general) was not new to me, this article did a great job of describing the scale and trends in energy and resource consumption in the manufacturing of modern digital technology.

One aspect in particular stood out to me, which was the claim that "digital technology is a product of cheap energy". I think about this idea from many angles, that there are many aspects of our modern society that have expanded to consume all of the "infinite energy" we've had access to during the fossil fuel era. The proliferation of cars, processed foods, and microchips are all goods that have fundamentally changed the way we have lived, but are (and have always been) unsustainable to produce in the long term since they are fundeamentally born out of an environment with very cheap, portable, and dense energy sources. Trying to maintain that lifestyle without fossil fuels will be nearly impossible due to "Energy Return on Investment" (EROI) calculations and the laws of physics. And yet, at the same time, many people (and our economic system more broadly) have become completely dependent on these goods and this lifestyle, with a looming threat of /collapse if they were to suddenly disappear.

And so I wonder about what computing might look like in a world with more restricted and balanced energy use, if we managed to actually ramp down our energy and resource consumption to a truly sustainable level. Will computing still exist? How accessible would it be?

May 24, 2023

/stream /computing /programming /collect /colophon

As I started fleshing out components of this site, I wanted to add some new features to /collect. I added the ability to reuse the name of a @map as a value using "$NAME", and it can also be interpolated in strings with "@name". I also exposed a list of the @group objects on a @map using the value "@groups" on a @map. The first change reduced redundancies when writing new stream events, and the second made it possible to render all of the groups for each stream event.

May 23, 2023

/stream /computing /programming /colophon

Built out the rough framework for this website, settling on the complimentary "garden" and "stream" metaphors.

May 20, 2023

/stream /computing /permacomputing /repair /macbook-pro-2006

While helping my partner set up her work for a DIY art festival, I found a /MacBook Pro (2006) in a junk shop for $25. It was a 2006 2.16GHz Core 2 Duo model. I took it home and was surprised to find that it worked great after plugging it into an old MagSafe charger I had lying around. The case was a little bent as if someone had sat on it, and consequently the trackpad was a little wonky; otherwise, it seemed like a great machine. I'll need to tear it down at some point to look for any other internal damage before spending more time or money on it.

Start