Brain Phrye

code cooking diy fiction personal photos politics reviews tools


APC tic tac toe

The text programs have been amusing, but this video shows the one I really want to port. I’m not generally a front-end dev, and this was about as close as I ever got to doing it. Some things to background info about what’s there: First, IIRC, the project was to demonstrate how to use two dimensional arrays. I obviously understood the concept of “feature creep” before I learned the term. Read more

APC to fpc - notes

Some notes on the conversion: My coding style was far less consistent back then and that makes it harder to read the code. In this first pass I’ve made one-line summaries of the code as I’ve ported them and my style back then has made some programs a bit unscrutible. Indenting varied so following program flow is a bit harder. Pascal is not case-sensitive and my capitalisation varied which makes it hard to find variables and include files. Read more

APC to fpc

After my initial research I filed two bugs (35596 and 35597), decided to put graphics aside and tried getting non-graphics programs running. And I’ve had good success so far. I’ve ported 15 so far. The fpc compiler has various modes which includes a Turbo Pascal mode. However that’s somewhere around Turbo Pascal 7 - definitely not all the way back to version 3.01a like we were using. This isn’t a huge stumbling block though. Read more

APC Research Phase

I came across a bunch of code I wrote in high school. So I decided I could see if I could get the programs running again. I have them running inside of DOSBox but I was wondering if I could get them running natively. And sure enough, there’s a Free Pascal project. It’s targeted at “newer” versions of Turbo Pascal than I used. Amusingly I already hit an issue with the systems runtime library. Read more

Activity - a one-off script

So after using Go to do the initial activity collection, I went a bit more old school for extracting it from git repos directly. Note that this and the previous post use the data capabilities of hugo.

Yep, shell, sed, awk, sort and uniq baby! It’s not ideal, but this script only runs once so good enough.

The reason for this one-off extraction is because both gitlab and github restrict the time period they save activity data (two years for gitlab, 90 days for github - though some gitlab instances hold more and some less). Future activity recording will be done via the Go programs described before; this just runs once-ish. If I find older code repos I’ll likely add them to this.

Read more

Activity

Added some activity graphs to this ( linked off my about page ). Currently they just look at activity on a set of gitlab servers I use. I’m going to try and add github later. And then maybe raid some other data sources.

Just a quick explanation of how I did it.

Read more

Reconsidering Facebook

[posted this on facebook originally, this is the start of a series on migrating off facebook] I first joined facebook around a decade ago because someone told me there were other Kevin Lyda’s here and that just seemed wrong. And then, horrifyingly, I learned my 20 year high school reunion was happening. Now, ten years on I’ve finally booked tickets so I can actually go to a high school reunion. horrors And I’m beginning to think about being on this site. Read more

Supervolcanoes

On cable channels you’ll find loads of “documentaries” breathlessly telling you about supervolcanoes and how Yellowstone is going to kill everyone. Possibly also involving aliens. So it was nice to see this public lecture on supervolcanoes and what they actually are (and are not), their history in the Pacific northwest and the science behind it all. It’s an hour and a bit long and makes for a good listen on a lazy weekend morning. Read more

Importing an old code repo

I’ve converted code repos a number of times through my career. From cvs to subversion, from subversion to mercurial and git, from mercurial to git. However until the other day, I’d never converted from cvs to git directly. In this case it was converting an old CVS repo I’d found in some old backup cdroms which were being tossed out. It went well but there were a few hiccups. First there are a number of methods to do this. Read more


Avengers Endgame (no spoilers)

Like quite a few Galway geeks it appears, I queued up early to see Avengers Endgame. Queuing for Endgame  This was taken around 10pm as we waited for the one past midnight showing. For once I walked in pretty unspoiled and it was well worth the wait. I can’t go into what I liked without spoilers but can say that I was surprised, I laughed a fair bit, I teared up and was just plain wowed in parts. Read more

Vim scp://

Thanks to mpk today I learned that vim can work with scp “urls.” So vim scp://remote-host/kittens.txt works kind of as you’d expect. It can edit existing files - and for zsh tab completion will work here - or completely new files. By default it’s going to edit files relative you your home dir - you’d need to do a double slash to edit a file from the root dir.

Miscellaneous Pix

Some left over pictures I didn’t categorise when going through all my photos .

Tag Cloud

In the new site design I wanted a subtle and simple tag cloud. I initially did it by ordering tags in the footer by how common they were. However alphabetical order exists for a reason, so it was clear that wasn’t the best choice. Tag clouds normally show popularity with font size. Not being a huge CSS person, I hadn’t realized font size was another thing you could specify relative to everything else - but you can! Read more

Terraforming Gandi

I use gandi for all my DNS needs and while I used to run my own dns it got tiresome after a while. So a long time ago I switched to using gandi to do it. Back then they had an api I was able to manipulate rather easily with python. But a few years ago they changed to a new api and I put it on the long finger to migrate over. Read more

Openssl Annoyances

OpenSSL 1.1.0 introduced some incompatible changes for symetric encryption. I use it for some code repos to store secrets in lieu of other options. It works just fine for a single developer, but obviously doesn’t work very well beyond that. Recently those projects started breaking and I wasn’t sure why. The commands I used to encrypt and decrypt were, respectively, as follows: 1 2 3 4 openssl enc -aes-256-cbc -pass "pass:$SECRET" \ -in . Read more

Initial pass at git-ls

In Google there was (and possibly still is) a tool called “sourcerer” that let you browse through a repo. One nice feature it had was that deleted files and directories were shown struch through in red - and you could even follow down deleted dirs. I’ve long wanted that view of a git repo. And today while digging through a rather old, imported work project it turned out that was useful to have. Read more

Older House Pix

Pictures of my house and my mom’s house as they were being built. Month by month build photos for my mom’s house here .

Search

I’ve mentioned before this is a static site so how is it there’s now a search function. The magic of javascript! I’d seen a search box on hugo sites so I looked around and found these two articles 1 2 on adding search and they each built on each other using lunr. I tweaked the index building to try and squash it down a bit. The javascript I use to build the lunr prebuilt indexes (search/index. Read more

The Unix Way

I was reminded of this article which is a nice little example of how to use shell tools in Unix to solve problems faster than if you were to “write a program.” You’re still coding in shell, it’s just that each “line” is a pretty powerful function. Plus each function has a pretty simple interface: it will take a text stream and some positional or named arguments and it will produce two text streams (one is usually “the output” and the other is usually an “out of band” stream) and an integer. Read more