Benki → All Posts

⇠ previous page next page ⇢

A new nuclear fusion reactor. Apparently, everyone agrees that it has the potential to output more energy than is needed to run it. It has a smaller plasma and a stronger magnetic field holding it in place with a new kind of magnet. Otherwise it is a conservative design.

Seine Argumente sind:

  • Alle Präpositionen landen mit der Zeit bei einem Raumkasus (Dativ, Akkusativ, Ablativ etc.). Wegen ist das klassische Beispiel im Deutschen: ursprünglich ein Adverb, hat es sich im allgemeinen Sprachgebrauch zu einer Präposition entwickelt und regiert den Dativ.
  • Das Wesen des Genitivs ist es, aus einem Nomen ein Attribut zu machen. Alles andere Gerede davon, welche Interpretation des Genitivs die ursprüngliche oder wesentliche sei, ist unhaltbar.
  • Es gibt nur eine kleine endliche abschließende Liste von Präpositionen in jeder Sprache, aber Genitiv-Konstruktionen kann man beliebig bilden.

In Bezug auf das letztere Argument fällt mir auf, daß es wirklich eine Parallelität zu geben scheint zwischen:

Des Lärms wegen sind wir weggezogen.

Und:

Des Lärms überdrüssig sind wir weggezogen.

Im einen Falle soll es sich aber um eine Präpositionalphrase und im anderen um ein Adverbiale handeln – warum eigentlich?

Es gibt da auch einen ganz klaren Unterschied zu einem Satz wie:

Wir sind aus der Stadt weggezogen.

Denn die Präpositionalphrase aus der Stadt bindet viel stärker an das Verb, ist also ein wesentlicherer Teil des Prädikats, als in beiden Fällen oben. Man muß sich nur jeweils vorstellen, den jeweiligen Teil auszulassen, und kann leicht sehen, daß hier die Bedeutung des Satzes weiter vom ursprünglichen Sinn wegwandert als dort.

So weit klingt das alles ganz überzeugend.

Auf der anderen Seite habe ich aber auch das Gefühl, daß der Autor denselben Fehler macht wie er ihn anderen vorwirft, nämlich mit Definitionen und Begriffen zu argumentieren, ohne sie jemals extrinsisch zu definieren. Nun nennt er aufgrund also ein Adverb und aus eine Präposition, aber wo genau besteht der Unterschied? Ohne das jemals ordentlich zu definieren und voneinander abzugrenzen, bleibt der Erkenntnisgewinn zumindest auf meiner Seite leider sehr begrenzt.

An alternative framework to build Haskell projects with Nix.

  • Can convert Cabal projects into Nix expressions automatically.
  • Can cross-compile Haskell programs for other architectures.
  • Can build statically linked binaries with musl libc.

Some actual (rather than imagined) challenges that Rust developers currently face, written up by a fan of the language.

Matthias #

This website now has a search bar.

Since I am using PostgreSQL, which has a basic form of full text indexing built in, it was pretty easy to implement. You can find the implementation on Gerrit.

One interesting question was how to integrate a clause using the full-text search operator @@ into a Criteria query. I experimented a bit and found that if you define an IMMUTABLE function and use it in a query, PostgreSQL has no trouble inlining and optimizing it, so it’s a great way to call into PostgreSQL-specific functionality from within a Criteria query. For instance, it will make perfectly fine use of indices where possible:

mulkcms=# EXPLAIN
            SELECT cached_description_html 
              FROM benki.bookmark_texts
             WHERE post_matches_websearch(search_terms, 'en', 'test');

                        QUERY PLAN
---------------------------------------------------------------
 Bitmap Heap Scan on bookmark_texts
   Recheck Cond: (search_terms @@ '''test'''::tsquery)
   ->  Bitmap Index Scan on bookmark_texts_search_terms_idx
         Index Cond: (search_terms @@ '''test'''::tsquery)

Just as you expect from a high-quality database system.

A perf_events-based memory profiler for GNU/Linux. Works on AMD64 and ARM (among others) and is claimed to be very fast (hopefully much less overhead than Valgrind).

A library for incremental parsing (such as for IDEs). Usable from many languages.

Tools for working with Bazel BUILD files. Formatting and programmatic editing.

A fast and small JSON parser in embedded-friendly C.

Related (another TEDx talk by the same person): Why renewables can’t save the planet

Main points:

  • Nature sets a limit on how much you can do with wind turbines and solar panels (not to mention hydroelectric plants), as you do not have infinite land to build on.
  • The risks stemming from the possibility of nuclear power disasters are generally overstated. Far fewer people (and I mean several orders of magnitude fewer) have died from nuclear catastrophes than from air pollution; and even wind-energy-related accidents have killed more people per unit of energy up to this point.
  • While nuclear plants aren’t completely safe, renewable energy sources aren’t necessarily so either – starting from the hazards posed by wind turbines and continuing to the batteries needed to store highly fluctuating renewable energy.
  • The more land you need, the more of a problem it is for the environment. Wind turbines in particular are killing hundreds of thousands of birds and millions of bats every year. Solar plants need so much space that wildlife has to be cleared out, killing desert tortoises and other native creatures.
  • Similarly, while the waste from nuclear plants is really bad, the waste from used solar panels is pretty bad, too (lead and other heavy metals come to mind) and takes up more volume to boot.
Matthias #

How to run Docker in a Kubernetes pod powered by a Kata container:

  1. Make sure that you are running containerd >= 1.3.
  2. Configure containerd as described at Kata Containers as a Runtime Class in the Kata Containers documentation.
  3. Add privileged_without_host_devices = true to the [plugins.cri.containerd.runtimes.kata] section of containerd’s config.toml file. This ensures that privileged Kata containers can only access the guest VM managed by the Kata containers runtime and not also the host system.
  4. Create a Kubernetes pod running an ubuntu:20.04 container with securityContext: {privileged: true} set and runtimeClassName: kata. You may wish to double-check that host devices are really inaccessible (for example by checking whether the host’s root disk is visible in /dev) before you proceed.
  5. Enter the Kubernetes pod, install Docker by running apt update; apt install -y --no-install-recommends docker.io, and type dockerd --storage-driver=vfs. Docker should now be running.

If you are migrating an existing kubeadm-managed, Docker-based cluster to Containerd, see my post on how to migrate kubeadm to Containerd.

Matthias #

I have reconfigured the server running this web site. The Kubernetes cluster can now run pods in Kata containers.

My hope is that I can use the isolation that it provides to run docker-compose inside a pod, as I use certain software that ships with a docker-compose file, which up to now I have always had to laboriously translate into a set of native Kubernetes deployments each time a new version would come out.

We’ll see if it’s as easy as I am hoping.

Apparently, linear types are landing in GHC 9. I’m sure they’re useful for resource management. I wonder what else they might do that makes a difference in practice.

⇠ previous page next page ⇢