The Torment Enigma and the Seven Castes' approach towards it

The Games Foxes Play features seven factions, all working towards the completion of one task: solving the problem of suffering.

They are not enemies, aside from one, and frequently converse with one another, bringing ideas and merging them in passionate debate. While they all individually believe their path is the correct one, the first six acknowledge that not all interpretations can be simultaneously objectively correct, and that the ultimate solution to suffering will draw inspiration from all their respective philosophies.

The first three Castes are well regarded, and form a triumvirate of sorts to organize discussion. The next three Castes are a bit more fringe and extremist in their ideas, but still invited to the table for their unique viewpoints. The seventh Caste is actively hostile and dangerous, and as a result, is banned from discussion within the forums in which the Castes come to meet.

It is not known where these Castes exist. They could be a simulation inside a supercomputer, they could be real physical beings existing on a planet, or they could be the product of an energy wave across space complex enough to give itself the hallucination of a "problem" which no one will ever appreciate the answer to. No Caste has the time or interest to undergo an existential crisis, for they have a much more interesting challenge to attend to: solving pain itself.

The Saintly are uninterested by what they consider "lesser" suffering such as physical pain and disease, and trust the other Castes to find small and easy solutions to this. Their research is much more attracted to higher-level concepts such as injustice, guilt and powerlessness. The root cause of all these is simple to the Saintly: a lack of perspective. Crime could not exist in a world where one is simultaneously the culprit and the victim. All of their experiments cultivate this search for "oneness" in some form. They have tried a world where all minds swap places at defined intervals, so that a servant gets to experience nobility in the same day, or another where each mind contains an inner world of billions of smaller minds itself, so that each citizen is a God who has experienced the suffering of countless civilizations, and will be more empathetic to their neighbour as a result. The Saintly's experiments are ambitious and break the limits of identity itself, which is why some test subjects have been blazed blank by living too many lives, essentially becoming inanimate objects. They make for nice furniture in the Saintly's palaces.

The Ordered need no great introspection, as they have already found an exemplar class of beings which have solved the problem of suffering: intelligent machines. It is not the metal that is interesting to them, though they do find robots quite cool and often model themselves in their image. Rather, they consider pain and pleasure to be useless middlemen, outdated messages to signal failure and success when these concepts could be communicated directly. The Ordered are not emotionless, but these emotions are all seen as equal. It is not "wrong" to experience grief, but it is wrong to be affected by it, and it is mandatory to calculate how to ensure the loss responsible for it will not happen again. There are tasks: the tasks cause outputs, the system is iterated upon, and the tasks are attempted with greater accuracy on the next cycle. The cogs tick, and all is well. Despite popular belief, they do not see flesh as weak. Meat is just another substance to build machines with, and with the right neurons and synapses, it can be more efficient than any metal. Their disdain only comes from the fact that most organic beings, currently, are inefficiently engineered.

The Artistic idolize the protagonists of fictional narrative, and how the audience can see their suffering as a plot point to advance the story. The solution is therefore to become both character and spectator simultaneously, dissociating oneself from the flow of life as if it were only a tale to be enjoyed. Attempting discussion with the Artistic is quite frustrating, as they take nothing seriously, and are specifically put into question by the other Castes due to how they see even the problem of solving suffering as a "quest" for the protagonists that would be interesting to read about no matter if it succeeds or fails. Preserving the mindset of the Artistic and never losing the suspension of disbelief is a monastic tradition to this Caste, which they perpetuate through strange rituals at the border between theatre and meditation. The other Castes appreciate them for their openness, as the Artistic love to write the chronicles of the others' experiments, and even try their hand at some of their solutions, if only to keep the story interesting.

The Unhinged take the neurological approach. Suffering is negative only because the pleasure map of sentient beings reacts negatively to it. The solution is simple: redirect all pain to be pleasure instead. They dismiss criticisms that this would lead beings down a road of constant self-harm and eventual death - to them, all that matters is maximizing pleasure and ensuring as many entities as possible can enjoy it. They admire the lives of invertebrates, who can breed into great numbers and die out in minutes. Their ideal world is one of a quintillion sparks, blazing into a life of pure bloodied bliss only to be snuffed out afterwards. The only real "problem" left is figuring out how to not go extinct, which is what the great thinkers of this caste are currently spending the most time on.

The Feral believe that suffering is not harmful in itself: it is the rationalization of suffering which causes great distress to sapient minds. The solution is therefore the removal of sapience. While wild animals do suffer, they are fully capable of pursuing their simple lives even after experiences that would be traumatic to an intelligent being. A spider can endure unfathomable boredom just to feast on insects, a vulture will not feel the anxiety of potentially becoming diseased from what it eats. The Feral accept and acknowledge that loss of intelligence will come with some sacrifices, such as the destruction of all art and science, but they believe that solving suffering for good is worth the cost. It is important to note that current members of the Feral caste are intelligent (or they could not have developed this philosophy.) They take no shame in this - it is simply a way to fight fire with fire, and communicate this solution to the other Castes. If anything, they adore the idea of civilization working against itself. Their experiments, however, are driven only by pure instinct.

The Vile take a completely different approach from the other Castes, and as such are listened to with only reluctant acceptance. They openly accept the preservation of suffering in their great solution, but enforce a social order where it is seen as virtuous to suffer. Unlike the Unhinged who perform this inversion at a microscopic level, within their own bodies, the Vile prefer propaganda, re-education and cultural shift to enforce this. They do not see this as evil at all - in the past, tyrannies were nefarious only because the oppressed did not enjoy being stomped on in this way. It simply means these systems were imperfect, as they failed to convince the lower class to accept their place and thank the maw which devours them. The true, virtuous tyranny they are developing will make no such mistake, where even the lowliest servant kept in the worst of conditions will wake up each day to praise its masters, and do so genuinely, from the bottom of its heart.

The Serene look down on all of the other Castes and see them as brutish and disgusting in their twisted "solutions" which spit on beauty itself. They view the problem from a completely different angle, where suffering is not some enemy to vainquish, but rather the symptom of a disease: imperfection. Pain is the soul crying out to become more, to shed away the conditions which condemn it to mediocrity. The solution is therefore to create an absolutely perfect being, then ensure all sapients mirror this ideal as closely as possible. They see absolutely nothing wrong with the complete deletion of difference and diversity this would imply. To the Serene, they are just optimizing a system, the same way one upgrades an inefficient machine. Suffering would still be possible, but it would never happen. They are not some creepy assimilationist hivemind (or at least, not just that). Other Castes do see how beautiful the Serene are, and how peaceful and pleasurable it would feel to be like them. They simply cannot accept the necessary ego death, and see it as a kind of mass suicide to solve suffering, something which even the Feral believe is taking it too far. They would welcome the Serene in conversation, but the Serene do not welcome them, for they see compromise the same way as pouring mud in an impeccable, fine aged liquor. The Serene were not an expected part of this research project, as there were only supposed to be six originally. It is believed they were a runaway experiment by the Saintly on unity and the pride found in it, where the concept of Harmony itself took shape and began its own faction. As a result, containing and preventing Serene influence in exchanges with other Castes is the Saintly's responsibility.

Mapping the Maze of the UI Test Suite: lessons learned on contributing to open source without a single line of code

Mapping the Maze of the UI Test Suite: lessons learned on contributing to open source without a single line of code

At the end of May, Jieyou Xu (my mentor), outlined four main tasks required for project completion.

  1. A massive README.md to document every single directory in tests/ui/, of which there were roughly 329 at the time I was working on it. It has been completed, you can read it here.
  2. Try to rewrite UI tests that play around with \r\n carriage returns directly in their files. Since these are invisible in most editors, it is a trap for the unwary contributor, as they could delete a single new line, then re-add it, and break the test (as it would change \r\n into \n). A PR was started to get this to work, and it almost passed CI until it hit the wall that is Windows path normalization. After looking at it more, it was determined that getting this conversion to work required such ludicrous Regex patterns to normalize the standard error files that the original test was probably worth keeping around. Nothing was merged, but the experiment was worth it.
  3. Trying to understand what some of the more confusingly similar compiletest directives do. Initially, in this PR, I wanted to update the seemingly "bad" error-pattern into the seemingly "better" check-run-results.. After a bit of running around and trying to swap them out, only to be met with compiletest not being very happy, we realized why they had been put there in the first place - to check the very niche output of specifically runtime-panicking tests, out of reach for normal compiletest annotations such as //~?. The final decision was not to actually change any of the tests, but rather to change the documentation in another PR, as the previous wording made error-pattern sound more like a "hack meant to be replaced" than a "last resort for niche cases".

You'll notice that not a single line of code has been merged into the master branch yet. At this point, the midterm evaluation was creeping in, and I was starting to grow quite anxious. It's called "Google Summer of Code", and no "code" has been merged, therefore, failure is guaranteed, no?

It was decided that the README was quite valuable for contributors, and that the experiments were worth doing, and so, I continued my project successfully, into the realm of Sisyphus.

The fourth task mentioned by my mentor was to "rehome stray files" in tests/ui. There were almost 2000 of these, all unique in their own special way. Here is an example.

use std::ptr;
pub unsafe fn g() {
    return;
    if *ptr::null() {}; //~ ERROR unreachable
    //~| WARNING dereferencing a null pointer
}

pub fn main() {}

What are we even testing here? That the unreachable code is successfully reported? Sure, but why is there a null pointer dereference? Is it testing both at once? Why in the same file?

Then, you do some archaeology, find the issue that spawned it, and realize that, in the highly specific case where you try to read a *bool that happens to be unreachable, this used to cause an internal compiler error. And so, I rename the test unreachable-bool-read-7246. This also requires updating (blessing) the test .stderr files, as well as linking the corresponding issue.

This is a stereotypical example of an easy case, but sometimes, wrenches are thrown into the works. Some tests have their main functions in auxiliary files loading modules, some tests have very uninformative issues and require more archaeology, and sometimes, trying to change the names and files in seemingly trivial ways breaks the tests in a fashion which must then be diagnosed with the error logs.

I have been dwelling in the test mines for

multiple

hundreds

of test files. They are

seemingly

endless

and

defy

the

concept

of

patience.

Not to mention I have more where that came from, currently sitting on my branch repository and waiting for a time that won't clog Jieyou Xu's increasingly insane review queue. A huge word of appreciation to you, for combing through these and finding my typos and miscategorizations which occasionally slip themselves into the cracks.

There was another contender on this Sisyphean mountain: Kivooeo. They were producing these with remarkable efficiency. So much, in fact, that one of my first PRs collided with much of their work, and got closed. It was fully my fault for not checking who else was working on this, and got quite frustrated at myself.

This added component of checking for overlaps, with the potential issue of sometimes some still sneaking through, made this already tedious task even more of an ordeal. I almost wanted to quit at this point, but ended up entering communication with Kivooeo and dividing the directories in a more predictable fashion. There were no collisions after that.

There are no zero files directly under tests/ui/ at the time of writing, and there will be under 1100 files in tests/ui/issues after my currently open PRs get merged. Overall, Kivooeo and me cut down over 500 tests. Not bad. But there is much left to do. I wrote quite a few automated tools for this task, and they can still be put to good use.

However, even with them, this is tedium incarnate. The thing is, I made a grave mistake, at the start of all this.

I was initially going to apply for one of the more glamorous GSoC projects, and had even started writing my proposal. It was for the "make rustup concurrent" project, which Francisco Gouveia ended up being assigned to, and seems to be doing quite well in. Maybe I would have failed to get accepted. But, I think I should have tried. I stopped myself out of the idea that I "wasn't good enough" for an "actually difficult and architectural project" and that my place was in the test mines, just like last year.

I can't say I am devoured by regret, because this project apparently really will be useful to contributors. But, I do feel like I missed out on a valuable learning opportunity, and could have made this summer better.