RSSAmplifier

Blog

seh.dev

Recent content on seh.dev

seh.devRSS feed ↗17 posts

Latest posts

Go Patterns - Fanning

Go Patterns - Fanning Background The summer of 2022 I had the chance to explain Go programming patterns I - and I assume others - use regularly in writing concurrent systems to my three interns who had never seen Go before. Although many university courses will talk about threading, they do not necessarily discuss concurrency, rarely if ever Go, and rarely go in depth on parametric polymorphism.…

Writing UTF-8 Programs in Plan 9

Writing UTF-8 Programs in Plan 9 This post was written using 9front/amd64 “COMMUNITY VS INFRASTRUCTURE” as a reference. Programs are built on Plan 9 using the 2c(1) compiler suite. Thus, on amd64: tenshi% 6c rsize.c tenshi% 6l rsize.6 tenshi% 6.out わ 4 4 tenshi% Remember, in C, a char (ASCII character) is almost always 1 byte (8 bits). This document presumes that a non-rune char is 1 byte. Initial…

Creating and Applying 9front Patches (Git Edition)

Creating and Applying 9front Patches (Git Edition) History October 2018, Ori pushes the first commit to git9. April 2019, Ori starts the 9fans thread '[9fans] Git/fs: Possibly Usable'. Late April 2019, Lufia announces their port of unix git on 9fans thread '[9fans] Git client'. June 2019, git9 migrates to git. July 2020, Atlassian deletes all Mercurial repositories without archive or remorse.

Limbo GUI's with Tk

Limbo GUI’s with Tk Motivation GUI programming can be very difficult and documentation for writing graphical programs can be provided with a large number of assumption on pre-existing knowledge, etc. Additionally, compartmentalized examples which do not employ some kind of `other tricks' can be hard to come by. This problem is exasperated for less well-known systems such as Inferno. The…

Polymorphism in Limbo and Go 2

Polymorphism in Limbo and Go 2 Motivation Go has recently announced that it will be receiving a form of polymorphism through generics in Go 2. Prior to and influencing Go (and thus Go 2), the Limbo programming language from the Inferno operating system had implemented a somewhat similar syntax for polymorphism. There are very tangible and crucial differences, but for novelty the two languages are…

Program development in Limbo

Program development in Limbo Motivation Resources covering software development under Inferno are fairly scarce. As such, this post aims to provide a start-to-finish demonstration of program development in Limbo inside Inferno. Introduction This post assumes you’re using Inferno, specifically purgatorio, hosted under linux/amd64 or similar. It’s also possible to use Inferno under…

The Runez Compression Algorithms

The Runez Compression Algorithms In January of 2020 I set about writing a pair of naïve, lossless, compression algorithms inspired by a series of conversations over coffee with a good friend. These algorithms are very naïve, but simple structurally and to that end I will attempt to convey the implementation. There are two algorithms, runez and runez2. The runez2 algorithm is a strictly superior…

Go's History in Code

Go’s History in Code This post intends to showcase programming patterns, or stuff, which is common between Newsqueak, Alef, Plan9 C, Limbo, and Go. All of these code snippets should be complete as shown and compilable/runnable in the state presented. The Alef examples might have subtle typos, but this is due to the fact I had to manually re-type them out from VirtualBox since I didn’t…

Porting Unix Software to Plan9

Porting Unix Software to Plan9 The original source code used in this port: https://github.com/rswier/c4. The final port source code for the port: https://github.com/henesy/c4. The commits for the port starting from my history should vaguely reflect the order and rough increment of changes described in this post. It is recommended to skim the source and changes while reading ☺. Initial reading C…

Playing with Oberon in 2019

Playing with Oberon in 2019 Oberon is the name for an operating system and language pair written by Niklaus Wirth. Oberon is notable for being simple and powerful in a manner which permits Oberon to be pleasant for use with education. Refer to Wikipedia for some history and exposition: https://en.wikipedia.org/wiki/Oberon_(operating_system) Getting Oberon The easiest way to get Oberon up and…

Using p9sk1 authentication in modern 9front

Using p9sk1 authentication in modern 9front Many moons ago 9front moved to dp9ik auth from p9sk1 due to security concerns. However, there may be cases, such as using parts of plan9port, that one may want to enable the old cpu protocol and p9sk1 authentication. Steps to complete: Enable p9sk1 by removing the -N flag from the authsrv(2) init scripts: /rc/bin/service.auth/authsrv.il566…

Intro to Graphics on Plan 9

Intro to Graphics on Plan 9 A common question asked all over the Plan 9 community is that of how to get started making GUI applications, as 9 is closely married to the GUI. While I might get around to a step by step tutorial on GUI programming in another post or location, I’d rather compile some helpful examples and resources for getting started. Some useful programs for reference: 9pong…

Creating and Applying 9front Patches (HG Edition)

Creating and Applying 9front Patches (HG Edition) Creating To create a patch we first pull 9front’s hg repo and bind our files into place: sysupdate bind -a /dist/plan9front / cd / In this example we’re making a patch for rio, any combination of folders should work: bind $home/src/rio /sys/src/cmd/rio To get the latest commit: hg log | sed 5q A first log output example might be:…

Touring Blit in 2018

Touring Blit in 2018 Ever wondered if there was a nice way to get a VAX-grade, semi-authentic, Blit experience? Good news! While 9front ships with a Blit emulator via games/blit you can also connect to UNIX from GNU/Linux with this handy port and plan9port. To get a connection going just run the following on your emulator of choice: blit -t 'tcp!papnet.eu!8888' Choose ken as your username. To…

DiscordFS —- A Tale of Two Clients

DiscordFS – A Tale of Two Clients Around a year ago I worked on my first attempt at a Discord client that would build and function on 9front. Since then the landscape hasn’t changed much and neither has the client. It works well enough for my needs and the two or so other people who use it. Since then however, the number of members in the 9fans Discord Server has grown many times its…

Install Notes for Plan 9 Second Edition

Install Notes for Plan 9 Second Edition A thanks to aap for providing copies of the floppy images and isos used to perform the test installs. None of this would have been able to happen without you. Disclaimer: I have not successfully managed to get Plan 9 2e (2e from hereon) installed in qemu or physical hardware. Qemu has had issues due to the fact that I’m unfamiliar with configuring IDE…

Using Plan9Port Mkfiles

Using Plan9Port Mkfiles Recently I decided to play with the idea of porting Nemo’s semfs (from Ch13 of his book) to *nix as a learning exercise. As a goal I wanted to change as little of the original code as possible. Even with the plan9port 9c/9l bindings however, some portions of the source (unnamed struct members, mostly) did not build and required changing. A notable point of change was…