What are you doing this week?

8 points by caius


What are you doing this week? Feel free to share!

Keep in mind it’s OK to do nothing at all, too.

caius

Enjoying Scotland. Quite a large amount of it over a few days.

veqq

Working on Janet infrastructure.

Janet's original package manager JPM is being depricated, so we need to better document the replacements' alternative workflows. I'd previously written this. Janet now does the hard work internally, allowing people to easily build package managers with different workflows on top, working with the same data.

I'm expanding the our support for sqlite3's extended API. First I did some refactoring and now I'm building a bunch of random projects to highlight/explore those extended features, with demos/experiments of:

Related to the packaging experiments, I worked out a good workflow (related code) for building a whole tool chain on different commitments, with different flags etc. letting me test optimizations. Due to a mistake, I was comparing my global -O3 native build with unoptimized ones for a bit. So far, I improved equality. Currently, declarative-dsls's test suite runs 25% faster on master and many other whole programs by ~10% compared to the last release!

Basically, I'm twiddling my thumbs waiting for the results of a business trip I just returned from, to bear fruit.

kryptiskt

It's crunch time at work, so I'll be using my brain power on that for this week, and I'll spend my free time on not-so-demanding things like chill video games and reading.

This weekend I looked at editors as related in the weekend thread and I'm going to try out Sublime Text (as jbauer suggested) for a while, it seems to tick most of my boxes. So far, so good. I like open source, but I don't mind spending money on software, especially so for a small developer-driven company.

matthiasportzel

My current programming project is an implementation of the beautifully complex chess-like Veney.

regedit

I've been getting NetBSD 11.0 running on a Netgate SG-1000, the little AM335x box Netgate used to sell as a pfSense appliance.

The stock armv7 image, plus a modified device tree, boots from SD using Netgate's U-Boot without needing any changes to the eMMC. Netgate's Fatboot boot script checks for a UserFatboot variable and runs it if it's set.

The BeagleBone Black device tree sets up the shared pins for MII, but the SG-1000 is wired for RGMII. That seems to have been why I got gigabit link but no inbound traffic. Stripping out the pinctrl setup and fixing the PHY mode and address got one port working.

The second PHY shows up fine in U-Boot, but NetBSD still won't attach it. That's what I'm digging into this week. Reading through the CPSW driver.

I'd like to get a proper board DTS together and build an SD image that other SG-1000 owners can just write to a card and boot.

Loup-Vaillant

I'm currently adding multi-thread support for Argon2 in Monocypher. Without depending on any multi-thread API at all. I'm sticking to the "pure portable C99 with zero dependency" that makes this little library so easy to integrate pretty much everywhere.

Instead I chopped up the API into an init() update() final() structure that let users implement parallelism however they want:

void crypto_argon2_init(crypto_argon2_ctx *ctx, uint32_t hash_size,
                        void *work_area,
                        crypto_argon2_config config,
                        crypto_argon2_inputs inputs,
                        crypto_argon2_extras extras);
void crypto_argon2_segment(const crypto_argon2_ctx *ctx,
                           uint32_t pass, uint32_t slice, uint32_t lane);
void crypto_argon2_final(const crypto_argon2_ctx *ctx, uint8_t *hash);

The single thread implementation goes like this:

void crypto_argon2(u8 *hash, u32 hash_size, void *work_area,
                   crypto_argon2_config config,
                   crypto_argon2_inputs inputs,
                   crypto_argon2_extras extras)
{
	crypto_argon2_ctx ctx;
	crypto_argon2_init(&ctx, hash_size, work_area, config, inputs, extras);

	for (u32 pass = 0; pass < config.nb_passes; pass++) {
		for (u32, slice, 0, 4) {
			// May be done in parallel, one thread per lane.
			for (u32 lane = 0; lane < config.nb_lanes; lane++) {
				crypto_argon2_segment(&ctx, pass, slice, lane);
			}
			// Sync point: wait for all lanes to complete.
		}
	}

	crypto_argon2_final(&ctx, hash);
}

Early experiments with pthreads suggest this should easily accommodate any multi-thread API.

Next step is documentation, and provide a production worthy code example.

stig

Off to Barcelona with my wife for our 25th anniversary on Thursday. It’ll be our first holiday without kid in 15 years. Wednesday will be packing, and preparing the house for in-laws to come and house/babysit.