Website of Martin Sústrik, creator of ZeroMQ, nanomsg, libdill, Cartesian.

Musings about random stuff. No attempt at scientific rigor. Take with a grain of salt.

All the opinions stated here are my own. Any resemblance to opinions of other people, living or dead, is purely coincidental.

Equivalence of State Machines and Coroutines

In the past I often referred to the equivalence between state machines and coroutines as a kind of obvious fact that doesn't need any additional explanation. It was brought to my attention, however, that that may not always be the case. This article therefore doesn't attempt to express and deep and ground-breaking truth, rather, it illustrates the equivalence of state machines and coroutines using a practical example. The example is stolen from Wikipedia's article on finite state machines: A...

Comments: 4

On Rigorous Error Handling

In my long career as a programmer I've seen a lot of projects with a lot of error handling practices and, sadly, almost none that actually worked. We are facing facing few high-level problems here: For many applications error handling is not critical. Error handling code is rarely executed. Consequently, it looks like it works until it doesn't. Programmers want to implement new features. Writing error handling is just an annoyance that slows them down. Who cares about error handling? For many...

Comments: 0

Two Approaches to Structured Concurrency

I am the author of libdill, a library that brings structured concurrency to C language. However, the concept of structured concurrency is still evolving and we haven't yet reached the final consensus on what's the right way of doing it. To broaden my horizon, I've recently played with Trio), a library for strucutured concurrency in Python. Also, to be able to compare the two approaches I've implemented Happy Eyeballs algorithm (RFC 8305) using libdill, so that it can be compared to Trio's...

Comments: 4

Unikernels: No Longer an Academic Exercise

Introduction I've been following the unikernel area for years and I really liked the idea, but I was unconvinced about the possibility of the wide-scale adoption of the technology. The cost was just too high. It required you to forget everything you knew, to drop all the existing code on the floor, to rewrite all your applcations and tools and start anew. (I am exaggerating, but not by much.) If microkernels never made it, the unikernels are not going to either. Whatever the benefits, the cost...

Comments: 9

Update on Structured Concurrency

Since I've written the article on structured concurrency and implemented libdill the progress went on. Most importantly, Nathaniel J. Smith has published his Notes on structured concurrency, or: Go statement considered harmful article. (If you prefer to watch a video, go here.) It's better, more detailed and more eloquent than anything I have ever written on the topic. If you want to read one thing about structured concurrency go read Nathaniel's article. After C-based libdill we've also got...

Comments: 24

Coordination Problems in Evolution: The Rise of Eukaryotes

Introduction This is a series of posts about coordination problems, as they appear in the course of biological evolution. It is based on the book The Major Transitions in Evolution by John Maynard Smith and Eörs Szathmáry. Previous part, discussing Eigen's paradox as well as the origin of chromosomes, can be found here. In this part we are going to look at the origin of eukaryotic cell, specifically at its acquisition of endosymbiotic organelles, and at the origin of multicellularity....

Comments: 0

Coordination Problems in Evolution: Eigen's Paradox

Introduction Lately I've written couple of posts that discuss coordination problems. Not the idealized, game-theoretical stuff but rather the real, messy coordination problems encountered by real people in the real world. Here, I will explore very different territory. I will look at coordination problems between between molecules, chromosomes, cells and individuals as they occurred and as they were solved in the course of biological evolution. This article is based on the book The Major...

Comments: 0

One-person Universe

One day, professor Wheeler from Princeton called Richard Feynman and exclaimed: Feynman, I know why all electrons have the same charge and the same mass! Why? asked Feynman. Because they are all the same electron, travelling back and forth in time! Upon hearing this story, Zarathustra said: Wheeler was right. Likewise, all the living men are the same man, revived after he dies and carried back in time, for ever and ever, infinitely. October 9th, 2018

Comments: 4

What Can Philosophers Learn from Programmers?

On Definitions At the college were studying a lot of maths. The books were quite boring. All they contained was a never-ending sequence of definitions, lemmas, theorems and proofs. Later on we've had lectures on logic where we learned how the sausage machine works. We've learned a lot of what's true and what's false , what's a theorem and how to construct a proper proof. However, there was nothing about how to make a good definition. On occasions I spoke about this omission with random people...

Comments: 6

Anti-social Punishment

Introduction There's a trope among Slovak intellectual elite depicting an average Slovak as living in a village, sitting a local pub, drinking Borovička, criticizing everyone and everything but not willing to lift a finger to improve things. Moreover, it is assumed that if you actually tried to make things better, said individual would throw dirt at you and place obstacles in your way. I always assumed that this caricature was silly. It was partly because I have a soft spot for Slovak rural life...

Comments: 5

The Eb

Procopius praises them for being unlike other Huns, less like savage animals, more like civilized men with white bodies and laws to obey. Menander Protector, citing Peter the Patrician, asserts that they were in fact those Huns who decided to return to the east after the fall of Attila. Joshua the Stylite describes their military tactic as being like that of other Huns; they pretend to flee and then turn upon their pursuers killing them mercilessly with long bows and short knives . Despite all...

Comments: 2

On Interstellar Communication

She was nineteen when she joined Gliese Liberation Movement. She didn't fight in the insurgency, of course. She lived at Earth, twenty light years away from the conflict. However, she did attend the protests and she did help with the distribution of leaflets. She had a poster of comandante Iñigo hung above her bed. Part Che Guevara, part Zorro the Avenger, the young daredevil with a wry smile and a submachine gun guarded her sleep. Once, she sent him a letter. Maybe she was a little bit drunk....

Comments: 0

The Garden of Forking Paths

This article is a transcript of a lecture given at BorgesConf 2014 in Viterbo, Italy. Hi, everybody! Before getting to my topic I would like to thank Alvaro for organizing this awesome event. I think that he deserves three huzzas. So here we go: Huzza! Huzza! Huzza! I was also asked to mention that Medioera festival begins here in Viterbo in just few days. Those of you who are interested in digital culture may consider prolonging your stay here. Finally, there's an Alfajor stand beneath the...

Comments: 0

Inadequate Equilibria vs. Governance of the Commons

Introduction In the past I've reviewed Eliezer Yudkowsky's Inadequate Equilibria book. My main complaint was that while it explains the problem of suboptimal Nash equilibria very well, it doesn't propose any solutions. Instead, it says that we should be aware of such coordination failures and we should expect ourselves to fare better than the official institutions in such cases. What Yudkowsky is saying (if I understand him correctly) is that given that the treatment of short bowel syndrome in...

Comments: 3

Soviet-era Jokes, Common Knowledge, Irony

Scott Aaronson, in his blog post about common knowledge, writes: If you read accounts of Nazi Germany, or the USSR, or North Korea or other despotic regimes today, you can easily be overwhelmed by this sense of, “so why didn’t all the sane people just rise up and overthrow the totalitarian monsters? Surely there were more sane people than crazy, evil ones. And probably the sane people even knew, from experience, that many of their neighbors were sane—so why this cowardice?” Once again, it could...

Comments: 5

Musings on Social Capital

I come from Slovakia. Despite being a programer, I grew up and lived in the artist community of Bratislava. Nowadays, though, I am living in Switzerland. I knew that some of the artists from my home city have established ateliers in the old thread factory. Actually, I've spent quite a few days on the premises. But since I moved away, I've heard that the artists haven't managed to make a deal with the owner of the building and that they had to move away. I've also heard that they've decided to...

Comments: 0

Research: Rescuers during the Holocaust

The goal People who helped Jews during WWII are intriguing. They appear to be some kind of moral supermen. Observe how they had almost nothing to gain and everything to lose. Jewish property was confiscated early on and any portable assets Jews may have had have evaporated quickly. Helping Jews, after a short initial period, wasn't a way to get rich. Hoping for compensation after the war didn't work either. At the time it was not obvious that Nazis will lose. Until last couple of years of WWII...

Comments: 1

Structured Concurrency in High-level Languages

Introduction I've recently stumbled upon Nathaniel Smith's article about structured concurrency. It's very nice, very readable and explains the entire problem from the basics, so if you have no idea what structured concurrency is go and read it. I've been dealing with the problem for many years and addressed it in several blog posts. However, I've always tried to keep it down to earth, very low level, partially because I was playing with it in C (maybe with a bit of assembly mixed in) and partly...

Comments: 14

Progressivism vs. Conservatism: A Game-theoretic Approach

Some time ago I've written a blog post about modeling tradition. What I described, naively assuming it's something new, is an established concept of common knowledge . It turns out that among game theorists the concept was, well, a common knowledge. The term was coined in 1969 by David Lewis and he've used it to explain convention. The idea was mathematicalized later by others. Check the wikipedia article for details. Alternatively, here's a great intro to the common knowledge concept by Scott...

Comments: 4

Schooling in your Head

For a long time I've been interested in democratic schools. The idea of democratic schooling is not to treat the kids as some kind of untermenschen, as is the common practice nowadays, but as actual human beings with free will, capable of responsible behaviour and so on. In practical terms it means that children are allowed to do whatever they want unless it's against the rules. The rules themselves are established by a school legislative body consisting of all the citizens of the school, pupils...

Comments: 9

page 1 of 8123...78next »

Website powered by Wikidot.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License