WLOG - blog something different

tags: ai arduino bass games godot i2c linux plan9 random rv web werc zig
A place to put it all
link | plan9, web | Mon Apr 24 22:23:14 CET 2023 No.10

So, the time has come to scrape together a system for publishing, as we set out to do.

For the base, so far, we have a 9front installed on a first generation Raspberry Pi. For hosting, we’ll use rc-httpd web server, distributed with 9front. For content management we’ll use the Werc framework, used by other plan9 / 9front related sites, with barf plugin for blog and other nifty things.

Not to go into too many details here, since this is a learning experience and information will be improved over time (I’m sure), so notes for web are available separately.

In short, how we got this working so far:

  • (optionally) a new user was created (gotta figure out administration of this thing)
  • werc was installed by cloning it with hg from https://code.9front.org/hg/werc
  • werc was configured by creating appropriate folders in werc/sites dir
  • barf plugin was installed by cloning it with hg from https://code.9front.org/hg/barf in to werc/apps dir
  • barf was configured by creating the appropriate folders and files in _werc subfolder
  • rc-https was configured (/bin/service/tcp80) to run werc on request
    • example files can be found in werc/bin/contrib (tcp80 & rc-httpd/select-handler) or on the werc docs
    • since services in /bin/service are run as an “unprivileged” user none, with no privileges (duh) and werc needs to access to tmp files cor cache or its unhappy, configure the namespace for the service (/bin/service/tcp80.namespace) to include a “world” writable folder binded to /tmp

That got us a working set up, that we can now play around with, and do the “timey wimey” magic and “back port” some notes and posts.


Enjoyment of games
link | games, godot | Mon Apr 10 21:26:38 CET 2023 No.9

For the last little while, nursing a burnout, some time has been spent on the Brotato game.

Now I won’t claim I love rouge games just as much as any other man because then we wouldn’t be here, but I do enjoy them. I also think there is a line between a challenge and being punished.

For example, in Hades I do not mind dying. Sometimes I did in on purpose. The “game” still advances. Effort is not lost. I am not being punished for not learning yet all the enemy moves or an unanswered prayer from rn jesus.

This is not the feeling while playing Brotato. The game is fun! When things go your way. And I do understand the appeal of permanent death and the GiT GuD culture. But sinking in a substantial amount of time to building up a character (slow start before it gets fun when doing it all over again), just to die because TPM spawned an enemy in your path so close you cannot react, kind of crosses the previously mentioned line. Well, I already paid for the game, let’s make it fun.

Before that, on a related note, discovered and experienced while doing this. I did not ever imagine a random number generator could be “too slow” to cause game stuttering. I kid you not: Linux Fix Coming For Recent Stuttering On AMD Ryzen Due To fTPM RNG

Haven’t done any modding in a long while, this was a fun exercise. Once trough, there is not much to it:

  • the game is made in Godot engine
  • the creator was nice enough to include ModLoader framework
  • the community on steam has prepared a very detailed modding guide

The biggest “hurdle”, that no one tells you since every one knows it already, was figuring out you have to restart steam after switching to “modding branch” on steam to publish the mod to steam workshop.

The result of a few hours learning & developing and a “few” hours testing: Second Chance Brotato mod with source for all.


The importance of debugging trees
link | random | Sat Apr 1 08:20:50 CET 2023 No.8

Today’s lesson, or more accurately a rant, on the topic of developing services and products leveraging usage of trees.

Tree structures are great! Efficient at traversing and storing. Not to mention representing hierarchical structure.

But there is a risk when implementing trees. The bugs are hard to find.

Bug hidden in tree leaf

It is specially important to debug your trees early in development or the bugs might grow exponentially.

Big bug in a tree structure

On a tangent, it is downright annoying when you find a bug in a random number generator.

Big bug in a tree structure

If the last joke did not register, I suggest reading The Botany of Desire, to get a better understanding of the world of random mutations, specially regarding apple related development.


Does this count as cross-platform development
link | plan9 | Fri Mar 24 21:55:15 CET 2023 No.7

Tools are important. So let’s try to improve what we have.

There is probably a n-1 more ways to do this, but this one is mine and it’s progress. So, while the first version of histw was coded completely inside acme on 9front in a qemu virtual machine. I now graduated to an actual live plan9 system running on a (let’s be kind and call it spare) original Raspberry Pi.

Plan9 C project opened in VSCode under Linux trough 9P

Network shares, rsync and sshfs are all great, but now “I’m cooking” with 9P.

Sadly, the built-in support for 9P on Linux is kind of lacking, read only support so far. Luckily, there are projects that fix this. A 9pfs that mounts from user space and has mostly everything working.

Now, that the code can be seen in color, I never realized how much that “meta” information is part of my coding and thought process, let’s make histw better. Spoiler alert from the future, it’s now faster with resolved edge cases. Visualizing code helps, at least it does me.

If nothing else, it helped me get this far in learning to use plan9, it might help someone else too.


What is replacing who
link | ai, random | Mon Mar 13 15:41:17 CET 2023 No.6

No doubt, we live in interesting times. Scary times. Uncertain times even.

It is easy to fall down the hype rabbit hole. And who knows, this might completely miss the mark.

Language models, convolution models, stable diffusion models, …, a new tool, by any other name. Until we learn to live with it, it will be shrouded in mystery and fear. Both potential for progress or disruption, good or bad. But let’s break down our angst to manageable chunks.

The first reaction, for far, have to generate those clickbaits somehow: is it dangerous? Is it going to replace me?

After all is said (on video or podcast) and published (by now you haven’t read any actual research, but you have read all about it on - insert “tech news” site here), it is another tool. From workers disputes during the industrial revolution, kicking (sabotaging) machinery that was taking away their work with wooden shoes (Sabo). To radio displacing Lectors to entertain workers behind a production line. This is not a new state of change. As J.M. Barrie wrote in Peter Pan (or maybe more recently known from the series Battlestar Galactica): “All of this has happened before, and it will all happen again.”. No doubt it will cause disruption and displacement of jobs as a local extreme in time. Sad, annoying, tragic even. But as a trend, this is not yet the global extreme where tools will stop being invented or improved. And we would be lying if we said we don’t like better tools, faster processes, more efficient manufacturing, … And AI is just another tool. Whether it can generate code, sermons, reports, images or videos, we’ll have to learn to use it correctly.

Let me make a point because it just so happened I misused a couple of tools and would hate to have the pictures go to waste:

Shovel broken while removing a tree stomp

The point being: use the right tool for the job. If there are better tools available to you, learn to use them, or suffer the consequences.

The second reaction, by those who gave a thought: can we trust it?

Images and video, generated with photorealistic fidelity. How will we ever trust if something is true anymore? Text generated with such a high level of confidence. How can we ever know if it is or isn’t true?

May I interest you in a subscription free appendix operation:

Dalai language model explaining the benefits of subscription free appendix operation

Just as before, this is not a new problem. What is to say a written or printed word on paper is true? As soon as the Gutenberg industrialized printing with his printing press, sharing of information became cheap and available. True or not. It’s up to you to be the judge in this transaction. Just look at the state of the internet today. How is this working out?

Just because it is the right tool, doesn’t mean it’s good:

Pick, the right tool to pick and pry away hard things, but not good enough

Just as the accountants survived the electric calculator (and spreadsheet software and programming languages and productivity frameworks and …), so we will all adjust to less manual and more intellectual work.

This was spellchecked. We don’t even think about this anymore. A rock, that has the ability to count, possibly (nowadays for sure) thanks to a neural network for grammar, has taken work away from a monk, to save me from the embarrassment of improper spelling. Or was this line crossed, then we could repeatedly print words on paper? Typed them on a typewriter? Edit them on a screen? Who knows?

The reality is, we can never stop learning! And we must not look at the knowledge and experience, now displaced with newer tools, as lost or redundant. But rather a stepping stone to the next big thing.


Seismic simulations can do what
link | bass | Wed Feb 22 21:37:55 CET 2023 No.5

You have to make your own fun. Or do what is fun for you. There is no wrong way to play the game. Something along those lines.

So, while waiting for my fingers to tough up, let’s improve on the instrument “at hand” so to say.

One way to improve the “neck dive” (besides a more grippy strap or changing the locations of the strap buttons) is to add some weights to the instrument on the opposite side. The math tells me to add at least 1.5kg of mass to the instrument to balance it middle way between the strap buttons. That is too much. I don’t hate my back that much. But adding some 400g would move the center of gravity a couple of centimeters, just enough to let the strap hold on with the friction.

But this led to a thought: “will this change how the instrument sounds”. You don’t have to play the Wiki Game to find a plethora of opinions on what will change, ruin or improve “the sound”. I am also aware of the concept of the “produces switch”, which works on way more things than just instruments.

So let’s explore this. Python is good for such quick data science science and simulations. Grab a library for sound propagation, simwave worked in this case. True it is for simulating sound propagation for seismic research, so the scale is a bit off, but nothing that can be adjusted. Learn what the density of required wood and metal are. Learn what Okoume wood is and that as cool as bismuth would be cool for a weight, scavenging local crystal shops for it would be a pain, settle on lead. Make an image of the instrument with different colors for density and see what happens. And because we don’t have all the patience in the world, a 2D sim will be fine.

2D CFD Sound Propagation in Bass with No Weight

Neat, now let’s do this for some weights. The images are links to videos!

2D CFD Sound Propagation in Bass with No Weight

2D CFD Sound Propagation in Bass with No Weight

2D CFD Sound Propagation in Bass with No Weight

2D CFD Sound Propagation in Bass with No Weight

Now, this is far from a proper study, can’t compete with Yamaha and 3D simulation assisted design of chambered bodies.

But something tells me, in the end, no matter what the actual modification will be, it will be fine.