I peridocially fall of the wagon and get drawn back into playing Minecraft. I’ve decided that, in order to make this time not wasted, I need to do something constructive with this urge. Last time I played Minecraft, I found the MultiMC launcher would no longer work. Being a fan of C++ and open source projects, I was not happy with this state. A friend suggested I try the PrismLauncher fork of the code base.
Prism does not seem to have a native Debian based build available, although I admit I did not look very hard. I don’t want to install flatpacks or other binary management software just for one app. So, I figured I would build from sources.
Category Archives: Software
How big a matrix can we fit?
Many of the big scientific computing problems can be solved using matrix mathematics. One of my favorite problems to tackle is implementation of vector times matrix = vector. This has utility in many places, one of which is inference in neural networks.
Since an ARM processor has some support for vector and matrix mathematics, I started wondering what were the size limitations we would hit when trying to solve big problems. Here are some notes:
Diff between Code review versions
Bottom line up front: create a tag with each version of a code review you post, to be able to see changes between versions.
Git commits come in (at least) three flavors.
First is the personal flavor, where you commit to git in order to not lose some quantum of behavior you have just implemented. These commits are small, and may be breaking commits. They are not meant for upstream consumption in the long term.
Bogotá
“Get out”
That was my sister, telling me via chat to get out of the cab I had just gotten in to. In her defense, I had screwed up her instructions, which was to go to the Imperial Cab counter at the airport, prepay for a ride to her apartment, and in no case was I to get directly into a cab.
Table of contents
Converting a Shell Script to Python
We have a build system that has grown organically. It started as a shell script. We needed to run it from gitlab, so we wrote helper scripts to insulate our code from gitlab. Then we added some helper functions to mimic the gitlab interactions when working with them from the comand line. The helper functions grew until you could not practically run the original shell script without them.
It is a mess.
I want to refactor it.
Refactoring Shell is painful.
I want objects. I want python.
So I am rewriting the gitlab and functions layer in python with an eye to rewriting the whole thing. Here’s what I have learned;
Continue readinggitlab section headings in python
What a way to spend an evening.
As I attempted to rewrite some Gitlab automation from bash to python, I stumbled over what should have been a trivial thing: collapsing section headers. They were not trivial.
Reading envvars using plumbum
One of my new years resolutions this year was to try and replace bash scripting with python in some of my projects. The reasons for this include the ability to use objects to group parameters together.
At today’s (Jan 19, 2025) Python over Coffee meetup, Ricardo suggested that I look at the plumbum library as a tool to help make that transition. In my first hack at using it, I came across an issue: I need to read in environment variables.
Setting column width on Apache default index pages
If you can’t read the text on the default index page of your Apache HTTPD server, you can make it larger with a .htaccess file.
cat .htaccess
IndexOptions NameWidth=80
If you put this in the root of the troublesome tree, it will server for that directory and all directories below it.
GitPython do two files differ in different branches
Not quite as succinct as I would have liked, but this does work. This is a one liner in Bash, and I had hoped to do it with a single python call once I had the repo object established. In general, diffs are not simple to do on blob objects. I had trouble using the difflib and set approaches to diffing the two files, possibly due to the fact that I was originally not decoding the streams. Thus all the splitlines work probably can be simplified.
Continue readingBuilding the Linux Kernel on one machine, deploying on another
Software Development flow is an elusive beast, easily frightened away. The easiest way to lose the flow is to have a long development cycle. Building the entire Linux Kernel takes time. If you are developing a single driver that can be built as a stand alone module, you do not want to have to rebuild the entire Kernel each time you make a change to that module. If that module crashes the machine when it runs into an error, you do not want to have to wait for that machine to reboot before digging in to the debugging process.
These two guidelines lead to a pattern of building on one machine and deploying on another. Here is one way to go about this process.