1764: XKCDE

Explain xkcd: It's 'cause you're dumb.
(Redirected from 1764)
Jump to: navigation, search
XKCDE
4. They unplug the root machine but the thousands of leaf VMs scatter in the wind and start spinning up new instances wherever they land
Title text: 4. They unplug the root machine but the thousands of leaf VMs scatter in the wind and start spinning up new instances wherever they land

Explanation[edit]

Randall has created a theoretical software environment named XKCDE (a portmanteau on xkcd and CDE (Collaborative Development Environment)), which relies on the user creating a series of nested virtual machines inside each other (creating sort of a digital version of the Droste effect), which would likely cause extreme strain on the resources of the machine running it. This strain is explained in 676: Abstraction, at least for the normal case.

"Virtual Machines" are software which pretend to be PC hardware so that a "guest" operating system can run inside of them, under a "host" operating system. Nesting VMs is the process of making a guest also be a host to yet another guest. Generally this is considered wasteful of resources, especially beyond one or two layers deep, and is not done except in a test lab for very specific purposes.

"Containers" are a lighter form of PC abstraction. Instead of emulating the entire physical hardware, they only emulate the software stack sitting on top of the kernel. A containerization tool will have its own standard library, software-stack and installed programs, but delegates all system calls to the host kernel. This is more efficient because no hardware needs to be emulated, but the disadvantage is reduced isolation between host and guest. A misbehaving guest can induce kernel crashes that take the host with them. The most well-known example of container software is Docker.

Randall derives humor from repeating the nesting ad absurdum in a never-ending fractal of nested VMs, thus trapping the follower of the instruction forever, in a form of Nerd Sniping: Any external observer, such as your boss, who sees you doing this is likely to fire you for wasting company time (An outcome which is undesirable, though still better than being hit by a truck[citation needed]).

A software environment which disables both the machine it runs on and the user that runs it could be thought of as a useless machine.

The title-text is a joke on the words root and leaf as used in abstract data structures, drawing an analogy of cutting down a tree (unplugging the root machine) scattering leaves (the nested VMs). A subtle pun is hidden in 'spinning': several tree species use spinning leaves to scatter their seeds. The autorotation due to the special shape of the leaves helps the seeds travel farther on the wind from their parent tree. Randall mixes this meaning of 'spinning' with the act of "spinning up a VM", the colloquial phrasing for starting up a new instance of a guest virtual machine. As a seed grows into a new tree where it lands, so apparently do the scattered VMs spin up new instances of themselves wherever they land.

In this case, a literal interpretation would be that turning off the computer the VMs are running on would make all the VMs without any VMs running in them propagate themselves through a network and install themselves on other computers, which at the end of the day would be a very inefficient method of creating a virus.

Real Life Practice[edit]

In 'normal' software development, spinning up a (single, non-nested) VM is a practice to ensure that the development environment is identical between developers, thus minimizing hard-to-reproduce bugs due to local machine differences, such as unmatching library versions, locale settings or additional installed or missing software. The single VM image is shared between all developers, who each spin up their own instance on their personal workstation. In such cases, spinning up the VM is the first step in bringing up a local development environment, after which additional steps will usually instruct which programs to open, which configuration settings to change, etc.

Someone got 4 levels deep with this.

Transcript[edit]

Installing the xkcd development environment
[Inside a frame three instructions are shown:]
1. Spin up a VM
2. Spin up a VM inside that VM
3. Continue spinning up nested VMs and containers until you get fired


comment.png add a comment! ⋅ comment.png add a topic (use sparingly)! ⋅ Icons-mini-action refresh blue.gif refresh comments!

Discussion

The title text reminds me of the Dust Theory in Greg Egan's _Permutation City_. 141.101.104.72 07:45, 25 November 2016 (UTC)

It reminds me of Mushroom Spawns.--162.158.91.71 11:52, 25 November 2016 (UTC)

Nested virtualization to three layers... --162.158.133.150 09:46, 25 November 2016 (UTC)

Possible pun on existing desktop environments: KDE, CDE, LXDE, XFCE,... -> XKCDE (relies on conics using only upper-case letters). --JakubNarebski (talk) 10:51, 25 November 2016 (UTC)

^ This is a more plausible explanation ([CDE: Common Desktop Environment: https://en.wikipedia.org/wiki/Common_Desktop_Environment) than "Collaborative Development Environment) mentioned in the explanation above. SabreWolfy (talk) 09:44, 26 November 2016 (UTC)

The title text is a take on poetry. It extends from the abstract tree (which is a digram and a datastructure type) to an actual tree with unpluggable roots and leafs which scatter in the wind and finally land spinning. Sebastian --162.158.91.97 11:00, 25 November 2016 (UTC)

Title text may bear an oncology reference, with the "root machine" being a primary tumor and the "leaf VMs" its metastases, which also (can) proliferate to form a new tumor on whatever tissue they land (even long after the primary tumor is destroyed). 162.158.234.218 13:26, 25 November 2016 (UTC)

The "Pastels.com" link is already broken, and this comic is new for today??? Either somebody forgot to check the link or whoever owned the domain brought it down rather abruptly. --162.158.75.95 18:39, 25 November 2016 (UTC)

Humans have used similar stacking arrangements in many different ways before. From Shakespeare's plays within plays, TV shows within shows, or characters within a story writing about an author writing a book. In the case of a book author, the 4th step might actually work - other authors, or fan-fiction writers might continue to tell stories about a character long after the original author is dead. A webcomic might be made satirizing a Krillin fanfic, that is referring to the character from Dragonball, a story whose main character is Goku, based on Sun Goku from the Journey to the West which is a retelling of Xuanzang's own account, Great Tang Records on the Western Regions which contains Buddist parables that describe a Master teaching a Student about the nature of Buddha a state of being exemplified by the achievements of Siddhartha Buddha who gain enlightenment after meditating on the lives of thousands of people. I think we as humans are good at stacking such virtual environments because it is a prerequisite of properly developed empathy, which requires tracing, sometimes long and elaborate, chains of relationships based on what someone else thinks another person might think of somebody else's behavior. 162.158.214.231 19:42, 25 November 2016 (UTC)

I wonder how many xkcd comics contain lowercase letters (like 's' in "VMs")... --172.68.54.123 19:36, 25 November 2016 (UTC)

we need to go deeper162.158.59.173 04:27, 27 November 2016 (UTC)Guest User that doesn't know what they're doing

The current explanation doesn't clarify "containers;" I expect Randall is thinking of a software container which allows you to deploy a service such as a database engine in isolation from other services using a minimum of resources. This comic makes me think of my experience trying to use Docker on Windows. Docker is among the most popular software container systems, but is tightly bound to Linux, so deploying a Docker container under Windows (or Mac OS X) requires that you first deploy a virtual machine, thus negating some of the benefit of using containers and pushing the software running in the container down yet another level. Davidhbrown (talk) 19:11, 27 November 2016 (UTC)

Protecting seeds, especially light ones that autorotate, from fall damage seems pretty far-fetched. The autorotation of seeds more likely serves to increase the time they take to fall, thus increasing the distance they travel in the wind. 108.162.241.53 13:14, 28 November 2016 (UTC)

I wrote this a while back which nests KVM indefinitely -- or at least in theory, in practice I can only get to L4 on hardware I have available. http://git.annexia.org/?p=supernested.git;a=summary 141.101.98.219 18:12, 28 November 2016 (UTC)

A slightly simpler, but more error prone script.

#!/bin/bash
# If you hate yourself, (DO NOT DO THIS) set file=/dev/sda and add this script to init. Expect corruption.
# Untested, though I came close to running it on accident.
VM_Drive='format=raw,file=__Enter_A_Modified_Run_From_Ram_Img__,if=virtio'
MemAvail=$(free -m | grep '^Mem:' | awk '{print $7}')
MemUsed=$(free -m | grep '^Mem:' | awk '{print $3}')
VM_Mem=$(echo "$MemAvail - 10" | bc -l)
ProcessorCnt=$(grep '^processor' /proc/cpuinfo | wc -l)

if [[ "$VM_Mem" -ge "$MemUsed"  ]] ; then
  echo "-------------Still have ${MemAvail}M and only using ${MemUsed}M. Spinning up another!-------------"
  qemu-system-x86_64 --enable-kvm -cpu host -smp $ProcessorCnt -m $VM_Mem -drive $VM_Drive
else
  echo "!!!!!!!!!!!!!Only have ${MemAvail}M and using ${MemUsed}M.  Not spinning up any more!!!!!!!!!!!!!!"
fi

108.162.221.117 13:27, 29 November 2016 (UTC)