Hex (Discworld)
Hex is a fictional computer featured in the Discworld novels by Terry Pratchett. First appearing in Soul Music, Hex is an elaborate, magic-powered and self-building computer and is housed in the basement of the High Energy Magic Building at the Unseen University in the twin city of Ankh-Morpork.
Hex is a computer unlike any other the Disc has ever seen, which is not particularly exceptional since previously all other "computers" on the Disc had consisted of druidic stone circles. Programmed via 'Softlore', Hex runs and evolves under the watchful eyes of wizard Ponder Stibbons, who becomes the de facto IT manager at UU because he's the only one who understands what he's talking about.
Origins and evolution
Hex has its origins in a device that briefly appeared in Soul Music, created by Ponder Stibbons and some student Wizards in the High Energy Magic building. In this form it was simply a complex network of glass tubes, containing ants. The wizards could then use punched cards to control which tubes the ants could crawl through, enabling it to perform simple mathematical functions.By the time of the next novel, Interesting Times, Hex had become a lot more complex, and was constantly reinventing itself. Part of it is now clockwork, which interfaces with the ant-farm via a paternoster lift the ants can ride on that turns a significant cogwheel. Its main purposes were, in a sense, data compression and information retrieval: to analyse spells, to see if there were simpler "meta-spells" underlying them, and to help Stibbons with his study of "invisible writings" by running the spells used to bring the writings into existence.
In The Last Continent it was explained that the invisible writings were snippets of books that were written a long time ago and lost, snippets of books that hadn't been written yet, and snippets of books that would never be written. The theory behind this was, all books are tenuously connected, due to the fact that every book ever written cites information from every other book, whether the writers mean to or not. Hex helps Stibbons by magically trawling the ether for these scraps of information.
In Hogfather Hex contained several things that nobody remembered installing, and was asking about electricity. It was at around this time that the wizards become concerned that it may be trying to become something they didn't understand.
By The Science of Discworld Hex was capable of "once and future computing": increasing its abilities simply by deducing that the required processing power would exist eventually. Presumably this requires a high expenditure of magic, as it has not been mentioned again; at the time, there was a massive excess of magic available due to a near catastrophic overload of the university's experimental thaumic reactor. This virtual memory appeared as translucent silver towers superimposed onto the real Hex. Hex was sufficiently intelligent by this time not to tell the wizards what it was doing, in case it worried them.
By Unseen Academicals, Ponder Stibbons has placed a mask on the wall to communicate with, even though Hex's voice seems to come from everywhere as it travels in blit space.
By the time of Stibbons has hooked Hex up to the University's clacks tower. Hex has worked out all the codes, meaning the University can now use the clacks for free, and has the Disc's first modem. It is, however, debatable whether-or-not the Patrician, Lord Havelock Vetinari, knows.
In The Art of Discworld, Pratchett explains that "the wizards invented something sufficiently computer-like that computerness entered into it."
Structure and technology
Currently, Hex is activated by "initializing the GBL," which Ponder Stibbons reluctantly admits means "pulling the Great Big Lever". This is also a reference to the IBM Mainframe terminology for booting, known as IPL. This action releases millions of ants into a much more complex network of glass tubes that makes up the bulk of Hex, hence the sticker on Hex that reads "Anthill inside": a pun on Intel's ad slogan "Intel Inside". Hex "thinks" by controlling which tubes the ants can crawl through, thus allowing it to perform increasingly complex computations if enough ants are provided. This is a reference to Douglas Hofstadter's Gödel, Escher, Bach in which there exists a sentient ant colony, with the ants acting as neurons. Hex can now be given input through a huge wooden keyboard, in analogue writing by means of a complicated mechanical eye designed by Hex itself, or vocally through an old hearing trumpet, and gives output by means of a series of wooden blocks and later a quill on a hinged lever.It is all powered by a waterwheel covered in male sheep skulls, i.e. RAM. When it is particularly busy, an hourglass comes down on a spring – another sideways reference to Windows. Another apparently important feature is an aquarium, so the operator has something to watch when Hex is working. Hex's long-term memory storage is a massive beehive contained in the next room. The presence of the bees makes this secure memory, because attempting to tamper with it would result in being "stung to death". As a further advantage, when Hex is turned off for the summer, the beehive will provide quite a lot of honey.
There is also a mouse that has built its nest in the middle of Hex. It doesn't seem to do anything, but Hex stops working if it is removed, or if Ponder forgets to feed it cheese. Hex also stops working if the FTB is removed/disengaged; "FTB" stands for "Fluffy Teddy Bear," which was Hex's Hogswatchnight gift when Death stood in for the Hogfather. Stibbons is concerned by these signs that Hex might be alive, but dismisses these thoughts, insisting that Hex only thinks it is alive.
Hex can apparently be shut down completely by means of a Big Red Lever. This seems to worry it further, indicating sentient life because it is afraid of death. An example of this appears in Hogfather: when Death approaches Hex, it asks if it is "Big Red Lever time".
Other Discworld computers
According to , another Hex-like machine has been invented by the smaller magical university of Brazeneck College. This is much simpler than the original, however; according to Stibbons, Hex is technically a Very Big Thing, while the Brazeneck device is barely a Quite Big Thing..The Hex-like machine was mentioned again in Unseen Academicals, as constructed by the staff of the Higher Energy Magic Building at Brazeneck college, and was given the name Pex. Pex was apparently powered by chickens rather than ants, a technology which was considered superior as the eggs it provided were edible. Adrian Turnipseed was responsible for its construction and maintenance, using various technologies he had learned from Ponder while helping to build the original Hex. However, he had apparently not learned well enough, as a seventy-foot chicken broke out of the Higher Energy Magic Building and demolished much of Pseudopolis, and presumably Pex as well.
Messages
Hex has a habit of spewing bizarre messages. Its "Out of Cheese" error from Interesting Times caught the fancy of many information technology employees, turning up in real-world systemsand in programming books.
It alludes to the many confusing error messages that technology users have had to put up with in the Information Age. "Out of Paper" is familiar to many office workers. "Redo From Start" was the somewhat unhelpful error message produced by the BASIC interpreter in many early home computers when non-numeric characters were entered in response to a prompt for numerical input. Other inscrutable Hex-talk includes:
+++Mr. Jelly! Mr. Jelly!+++
+++Error At Address: 14, Treacle Mine Road, Ankh-Morpork+++
+++MELON MELON MELON+++
+++Divide By Cucumber Error. Please Reinstall Universe And Reboot +++
+++Whoops! Here Comes The Cheese! +++
+++Oneoneoneoneoneoneone+++
Hex's messages are often delimited by the sequence +++, which recalls the escape sequence in the Hayes command set, a standard used in dial-up modems.
In the videogame Discworld II: Missing, Presumed..., if the player asks the question "Why?", Hex spits out various error messages different from those in the books:
*Blip* *Blip* *Blip* End of Cheese Error
*Blip* *Blip* *Blip* Can Not Find Drive Z:
*Blip* *Blip* *Blip* Unknown Application Error
*Blip* *Blip* *Blip* Please Reboot Universe
*Blip* *Blip* *Blip* Year Of The Sloth *Blip* *Blip* *Blip*
This echoes the science-fiction "does not compute" cliché, in which the protagonist confuses, locks up, or destroys a dangerous computer by giving it riddles or making paradoxical statements such as "everything I say is a lie".
Appearances
Hex appears in the books Interesting Times, Soul Music, Hogfather, The Last Continent, Going Postal, The Science of Discworld I, II and III, Making Money and Unseen Academicals and in the video gameReal world connections
The inspiration for Hex, which evolves through seemingly unexplainable upgrades like extra cheese, the FTB protocol, a CWL, and "small religious pictures", came from Pratchett's own early experiments with upgrades on his ZX-81.The name is a play on several meanings of the word "hex": a hex can be a witch or a magical spell, and "hex" is slang for hexadecimal, the base 16 system used to simplify the representation of binary numbers and widely used in the IT world. "Hex" also denotes the number of legs ants have; and refers to Hex, a game that encourages strategy and planning.
In 2001, a new Silicon Graphics Origin 2800 supercomputer was installed as part of the University of Leicester's Centre for Mathematical Modelling and, with Pratchett's blessing, named HEX.
In 2019, Hex GBL was provided as an answer for a practice exam associated with Chapter 6 of Western Governors University's "Managing Cloud Security" course.