Weekly log 2019, week 13

Estimated reading time: 6 minutes

Life, anime and nature

My boyfriend Reptifur discovered a nice little indie game: Dig Deep. It started as a mobile game and is now available for free on computers. It reminded me a bit of Downwell, which I really like because it has very simple mechanics but they are used in very interesting ways. Dig Deep doesn’t seem as… deep, but quite fun still.

This week I played my cello for 7 hours and 30 minutes, that’s a great increase in stamina! I even practiced for 2:30 in one single day, that’s probably my personal best! I didn’t want to take a break this week because I’m not going to be able to play for a while, but I’m starting to feel a bit tired and achy.

Regarding our evening screenings, we finished watching The Legend of Korra… and we can now definitely say that it was crap. We both hated the whole series: the characters are uninteresting, never learn anything and never evolve. The scenario can fit on a stamp. It was a huge letdown compared to the original series The Last Airbender, which was just amazing.

Fortunately our friends introduced us to One Punch Man. We watched it in only two evenings with them and we all enjoyed it very much.

We also followed some of the The Legend of Zelda: Ocarina of Time Randomizer tournament. The matches were pretty tense and skills were really impressive, since most participants are speed runners of one kind or another.

This week I also planted some vegetables for the first time in my life, at a friend’s mother house. We planted onions, garlic, shallots and salads. It was a relaxing experience. I also spent some time outdoors at the local parks. I feel like spring is putting some life back into me as well as into the plants.

Lets’ talk about code now!

Code and CHICKEN Scheme news

Youbi found a crash in Ensemble that occurred when trying to send a message containing only a slash. I fixed it as soon as possible.

At first I planned on sharing a little CHICKEN trick with you: lint your code csc -A -m whatever your-file.scm but then I found out about the chicken-lint tool (from the beaker egg) which does the same and more. Among other things, it warns you about unused imports and possible problems in conditionals and mutation expressions. It found some unused imports and a few bugs in Ensemble that might have been hiding.

It doesn’t support generalized set! yet, I’ll try to make a patch later.

Hiro told me about FluidLite and I’m really interested in it! I might someday add it as an add-on module for the Hypergiant sound system I’m working on.

Lets talk about that sound system real quick, because I mentioned it in the last post already.

My plans for it are to make a very simple DSP (digital signal processing) library, a bit like PureData only not using a graphical language, but using s-expressions. It would sit on top of the Portaudio library for real-time sound input and output, and I want to ship it with useful primitives for games like sound file loading and streaming, most certainly using the Opus format and library. Some proofs-of-concept of these ideas are present in my Confiture de Fraises and Smlilme game jam games.

The DSP part of it would resemble what glls does for OpenGL shaders: it would translate a domain specific language into tight C code that can be fed to portaudio’s very restrictive callback system (you can’t allocate memory or do system calls in them, for example)

On the CHICKEN side of things, I wanted to talk a little bit about a new feature coming in 5.1: embedding C libraries into eggs.

It’s really easy to use, you just have to declare all the C files you want to link into your library as c-objects components, and declare that you want to link them into your library using the objects property.

For example, my gl-math egg is split into a pure C library doing all the calculations, called hypermath, and the gl-math Scheme module. Here is how this translates into the egg file:

  (c-object hypermath
    (source "hypermath/src/hypermath.c")
    (csc-options -C "-Ihypermath/include -O3"))
  (extension gl-math
    (objects hypermath)
    (csc-options -d0 -O3 -C "-Ihypermath/include -O3"))))

These declarations make chicken-install create a gl-math.a archive and gl-math.so shared object for both static and dynamic linking support.

This feature still has a few little bugs but I patched some of them already.

I also sent a patch for set-file-position! that didn’t clear the end-of-file flag on ports.

Here are the eggs that got released this week:

SaarCHICKEN is only a few days away now!