A superflat vector drawing of a ceramic throne.
Kaka Farm!

The Kaka Farm Blog!

Work On guile-git And Therefore GNU Guix SHA256 Hash Function Support.

Date published:

(Amateurtip: If you are confused by pkg-config's inability to provide you with flags for a certain library, remember to use pkg-config --list-all to list all available package names.)

Recently you had the bright idea of using the guile-irc library for writing an IRC bot.

The library did not work.

What do you do?

You go in and copy its source, try to make sense of it, adapting it for your use as you trace its logic.

At a certain point you see how messages coming from the server are parsed, using regular expressions, and you do not like it.

It seems much nicer to use a nice looking PEG defined in clearly named symbolic expressions.

What do you do?

You attempt to rewrite the parsing of these messages using the PEG library library provided with GNU Guile.

But another problem appears - the RFC defines the syntax of these messages in terms of bytes, but the GNU Guile PEG library only deals with strings.

What do you do?

You take the GNU Guile PEG library and convert it to use bytevectors instead of strings.

Now that most of the work is done, you want to package it in a GNU Guix package.

Problem is - the guile-bytevector-peg repository is an SHA256 hash function object based git repository and GNU Guix does not yet support this kind of git repository.

What do you do?

You start working on getting SHA256 hash function based git repository support into guile-git, which is the GNU Guile git library used by GNU Guix.

Here you hit the basalt rock of your rabbit hole spelunking.

libgit2 only has experimental support for SHA256 git repositories and would only declare stable SHA256 git repository support in the next major release, that is - libgit2 v2.0.0.

You still try building and using the latest version of libgit2, that is v1.9.0.

You killyank the libgit2-1.8 package definition from the GNU Guix repository, tweak it a bit, and place it in your personal Guix Channel.

This result in at least two pains in your arse:

Okay, this post is too long, you think.

What do you do?

You end it abruptly.

Tag feeds:

Kaka Farm by Yuval Langer is licensed under Attribution-ShareAlike 4.0 International