Nevkontakte shared a month ago
Nevkontakte shared a month ago

As the layoffs are rolling across the tech industry, a gentle reminder that:

  1. The company is not your family, it never was nor it should ever be.
  2. You can be friends with your colleagues, but not with the company itself.
  3. The business will do what it has to do to protect itself. Your personal happiness is important for you, but for the business it's just a means to higher productivity when things are going well.

Success recipe:

  1. Fuck something up.
  2. Heroically fix it.
  3. Get credit.

Probably one of the toughest part of maintaining GopherJS is that you have to run pretty fast just to stay in one place... There is a new Go release every 6 months and if it includes new language features, we have to find a way to support them. And only then we may have a bit of time to improve on the project itself, which is kind of stressful.

For the past 4 month I've been plugging away on generics support and I think there's only one major unimplemented feature. And a fair amount of bugs to fix. And by the time I'm done, adding Go 1.19 and 1.20 support will be due...

These are the saltiest papers I've ever read:

That said, I understand why the authors feel this way :)

Nevkontakte shared 2 months ago

Wrote a new post on self-hosting a Minecraft server at home:

I wouldn't call it a new year resolution, but I'd like to write more blog posts that I have for the last several years. I notice that I learn a lot, never write it down and eventually have to re-learn, which is silly. I ought to stop treating my blog as a serious scientific paper which only accepts polished papers with novel knowledge. If the knowledge was novel to me, that's reason enough to write it down.

Spent a better part of today updating the theme of my blog... For a long time I wanted to replace the cold blue colors with something nicer and warmer, and I'm pleased with the result. At the same time it's a little bit sad because for the first time since this blog existed I completely abandoned the white-panel-over-blue-gradient style I've faithfully carried through 4 different blog engines. For the comparison, I will include screenshots of the same post with 2011 design and one from yesterday.

While at it, I killed a few sources of unnecessary bloat: applied PurgeCSS to the gigantic Bootstrap stylesheet and replaced 300KiB of js with 311 bytes.

Nevkontakte shared 2 months ago

Reading made me feel not quite so bad about the poor old GCL. Though I wonder which one caused more revenue loss globally :)

The yaml document from hell
Nevkontakte shared 2 months ago
Nevkontakte shared 2 months ago
Nevkontakte shared 2 months ago
Nevkontakte shared 2 months ago

A funny thing about GopherJS that took me a while to figure out: struct data is actually stored in what is technically a runtime representation of a pointer-to-struct type, and the struct object itself almost never exists 😲

You'd say, but wait, no way it works without structs, surely they do exist and are represented by a plain old JavaScript object. Well, sort of. In reality, there is a pointer to a struct type that is represented by a JavaScript object. So when you write something like this:

type S struct { f int }
s := S{} // ← non-pointer type!
ptr := &s
reflect.TypeOf(s) translates into something similar to:

var S = $newType(...., function() { this.f = 0 })
var s = new S.ptr()  // ← actually uses pointer constructor!
var ptr = s; // ← noop, it's already kind of a pointer.
reflect.TypeOf(new S(s))  // ← adds a wrapper with the correct type information when interfaces get involved.

This is counter-intuitive, but also makes sense because JavaScript's pass-by-reference semantics for objects is a lot like a pointer in Go, and GopherJS actually has to take extra steps to emulate value type semantics on top of it.

Tried today for backups of my Minecraft server, and it's looking really nice. Runs fast (our world is fairly small about ~3GiB), uses very little CPU and memory, incremental backups use very little disk space, supports retention advanced policies. Much, much nicer than Textile Backup mod I've been using before.

For the moment backups are just to the local disk, but adding a remote storage won't be too difficult.


Kopia Kopia

Before I became a GopherJS maintainer I had no idea how incredible of an achievement that would be:

Growing an active contributor community is hard. Even harder when it comes to folks willing to do the unfancy, grindy work such as triaging old issues — very few people consider it an enjoyable leisure activity, or are willing to do it regardless of not being paid. So hats off to the Zig authors for getting there, I'm sure it required a lot of persistence.

As for GopherJS, I am truly delighted that virtually all changes that went into 1.18.0-beta2 release came from contributors outside of the core maintainer group. Many of them are non-trivial too. We are still struggling to find volunteers for recurring tasks such as new Go version support, but hey, hopefully we'll get there.

Nevkontakte shared 2 months ago

My wishes for 2023: