I tend to want to work with three windows side by side. Two have the code I am working with, often production code on the left, test code on the right. The third window is the output from running commands to test the code.
I recently have decide to go all-in on vim, and it is progressing nicely. Thank you the Jake Worth for inspiring this. In Vim, the meta key for for doing windows operations is Ctrl-W. Here are a few commands I have gathered up from the internet. I will collect up the links where I get them at the bottom
My math was wrong
In my last article, I posted a function for calculating one partition of a larger matrix. THe function looked like this
void partial(k, i, g, M, f){
for (m=0; m < n; m++){
j = m * k;
g[i] = g[i] + M[i][j] * f[i];
}
}
This is actually wrong. Lets look where I messed up. It was all the way back in the equation.
Continue readingDecomposing Vector X Matrix
If we want to distribute the mathematical processing of a matrix multiplication we need an algorithm that can be split and performed in parallel. Looking at the algorithm I alluded to in the last article, I think I can see how to do that. Here’s my thinking.
Continue readingJavac for Building the PrismLauncher on Ubuntu
I peridocially fall off 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.
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.