This week in Mainz was JAX 2023 again, organized by Software & Support. It was nice, because slowly the conferences are getting more full, more real again. JAX was also hybrid and the organizers put a lot of effort into streaming all workshops and talks in parallel and connecting visitors at home via chat. But it’s just not the same as being on site, sharing, discussing, laughing, eating and drinking.
I’m happy to share with you some news about the new release v0.3.0 of the Tideland Go Actor. This new version comes with a handful of exciting updates and improvements that make it easier and more efficient to work with Actors in Go. One important change in this release is the addition of the Repeat() method. This new feature allows developers to run background Actions in intervals, making it easier to handle long-running tasks in the background.
So far I had not missed generics in Go. Much could be solved via interfaces or closures. And with the disgusting syntactic aberrations of other languages when dealing with generics, I was rather afraid that the elegant simplicity of Go could be lost. As of Go 1.18, Google’s language now handles generics after much discussion.
I have always appreciated the implicit simplicity with which, for example, types in a statement like
As you know from time to time, I do have the chance to give a talk about an interesting topic. Sometimes it’s pretty close to my work, sometimes it’s just inspired by my own ideas. In this case it’s a mix.
The conference this time had been the betterCode() API on 27.04.2022. Here I had the talk “Let the computer do it - Usage of declarative APIs”. It describes the troubles of today usual imperative APIs and how to use them in a declarative way.
The package Tideland Go Wait reached version 0.2.0 due to a new added feature. It now contains the type Throttle to provide a limited processing of events per second, e.g. for web handlers. The events are simple closures or functions with a given signature. The limit and a burst size for the maximum number of events during one call are defined at throttle creation.
Example A throttled wrapper of a http.
There are times when you find a bug in your software. Today it had been in my testing library TIdeland Go Audit. Here the assertion ErrorContains() reacted with a panic in case of a nil error. So I fixed it like I already had done it earlier in ErrorMatch(). Interestingly I found in testing that I didn’t verified it there. So this test is now also changed.
Additionally during tests for a different library with high concurrency I, or better go test during the tests, discovered a race condition.
As described a few days ago, I am migrating individual packages of the Tideland libraries to owb repositories. I have already described my motivation for this. In the meantime, two more packages have been migrated to the main level: Tideland Go Actor and Tideland Go Wait.
The package Tideland Go Actor pursues the idea to realize concurrency in Go not only via CSP, but also with the Actor Model. It picks up a bit the concept of the Erlang/OTP module gen_server.
A look at the Tideland Go repositories shows that these today are libraries for individual topics with various packages included. One problem with this form of organization is that these packages are difficult to find. At the same time, their individual histories and their versions are tied to those of the entire library. This must be improved.
Therefore, the reconstruction of these projects has now begun. So some of the packages from the repositories move to the main level and become independent projects.
While step by step reorganizing the Tideland Go libraries the one for testing your projects reached a new version. I’ve just released the Tideland Go Audit v0.5.0. As it already is a very robust and complete library there are only few changes.
The asserts package now provides the additional assertions NotOK() and AnyError(). In case of asserting tests and using Failable like testing.T their provided Logf() and Errorf() will be used for output.
Last Monday I gave a remote workshop about Go programming. It has been an interesting experience, not yet done something similar before. Sadly I needed too much time for the basic topics. So I had not enough time in the end to dive into my example. This has been a module containing a little declarative environment for components, a bit like Kubernetes. As a result I decided to create an online training for Go based on an improved version of that example.