TransWikia.com

First fictional programming language in sci-fi or fantasy?

Science Fiction & Fantasy Asked on September 1, 2021

I’m looking for the first written fictional programming language. This would exclude where a computer interprets human speech, and where we ‘assume’ a human is programming as they can be seen making input to a computer, but we don’t see that input. References by name without code is also acceptable, so long as it’s clearly a programming language.

The code needs to be run by something external to the writer, and should not just be a magic spell (which is equivalent to a computer interpreting speech).

I’ve found SARTRE but that is not in a work of Sci-Fi or Fantasy. I’ve also found ~ATH which would count, but is only from 2018 (as far as I can tell). There is also the computer Hex which first appears in Soul Music (1994) and runs on Softlore, though I don’t know if it’s named as such in the books, or if it first appears in that book. Druid Circles on the Discworld operate like computers, but we never see one being programmed.

12 Answers

The earliest I can find of what I believe is a fictional programming language is in Jurassic Park (1990). We see Dennis Nedry's code and then Ray Arnold digging into it to find the problem. As far as I can tell it doesn't appear to have a name though and neither is it totally consistent. This question about the language goes into a bit more detail on it and we get some snippets in it from the book, for example:

*/Jurassic Park Main Modules/
*/
*/ Call Libs
Include: biostat.sys
Include: sysrom.vst
Include: net.sys
Include: pwr.mdl
*/
*/Initialize
SetMain [42]2002/9A{total CoreSysop %4 [vig. 7*tty]}
if ValidMeter(mH) (**mH).MeterVis return
Term Call 909 c.lev { void MeterVis $303 }  Random(3 #*MaxFid)
on SetSystem(!Dn) set shp_val.obj to lim(Val{d}SumVal)
  if SetMeter(mH) (**mH).ValdidMeter(Vdd) return
  on SetSystem(!Telcom) set mxcpl.obj to lim(Val{pd})NextVal

Jurassic Park

Answered by TheLethalCarrot on September 1, 2021

Programming a computer is often mentioned in (Science) Fiction but rarely any details are given.
It usually isn’t needed for the story itself. And many authors themselves had only a vague idea how ‘programming’ worked. Even if they did know most would realize the vast majority of their reading public wouldn’t know anything about it, so why bother?

I’m not sure if this qualifies by your restrictions, but I offer it anyway:
The Voyage of the Space Beagle by A.E. Van Vogt is from 1950.
It makes reference to ‘Symbolic Logic’ as a tool for structuring information and entering it in computers for automatic processing. It is maybe not a programming language by itself, but if I recall the novel correctly, its usage is vague enough that it could actually be the name of the programming language.

EDIT: I just discovered that the Symbolic Logic and Nexialism concepts by A.E. van Vogt are actually older. "The Voyage of the Space Beagle" is a re-work/expansion of his own short story "Black Destroyer" from 1938. The concepts where already in that short story.

Answered by Tonny on September 1, 2021

Valentina: Soul in Sapphire (Joseph H. Delaney and Marc Stiegler, Baen Books, 1984) talks about MODULISP. Here are a few lines quoting that:

She could write new machine language routines, of course, even though she herself was written in MODULISP, but she didn't know what to write.

A few minutes later she was building a MODULISP kernel.

Valentina put a last series of test programs through the MODULISP interpreter now downloaded onto the Looking Glass.

There's no actual MODULISP code included, but it apparently runs on a variety of platforms. "Looking Glass" in the above quote is a massively parallel architecture with thousands of optical processors.

Answered by Ross Presser on September 1, 2021

What about Gateway from 1977?

Interspersed throughout the book are excerpts from the main character's sessions with an artificially intelligent psychiatrist program (which he calls Sigfrid von Shrink), although those may be more logs than code.

An example showing the mixing of code and logs:

507 .IRRAY.MATURITY.GOTO             26,830
     *M80                            26,835
508 ,C, Maybe maturity is wanting    26,840

It goes on like this, but the line with GOTO is clearly intended to be code.

(page 44, SFBC edition)

Answered by Kryten on September 1, 2021

As @LAK said in a comment that I noticed after I got the book from my library, in the 1989 book "The Wiz Biz" by Rick Cook, Wiz created a forth-like language to execute magical instructions to create spells. This is not "magic interpreting spoken word" but invoking a formal programming language verbally (maybe some writing, it has been a while) that Wiz developed and modifies.

http://www.goodreads.com/book/show/407212.The_Wiz_Biz

See also this question: Fantasy series with a hacker/programmer wizard and female protagonist, similar to Wiz Biz which describes other books with similar magical computer languages.

The source code is not shown (as far as I could see with a flip through the book) but is described as "a mixture of runes, numbers, and mathematical symbols appear[ing] in glowing green fire" (though might have been the object code which the forth-like language compiled to), but here are a few examples of the API (commands) that Wiz issues:

"class drone grep moria"
"$" said the Emac...
"exe," Wiz said...

Answered by Seth Robertson on September 1, 2021

Probably not the first one, but the most advanced (or useful) is Furor. It's an interpreted scripting programming language developed by Viola Zoltán (in eastern name order), also known as Poliverzum and Harold King or Fossil Codeger. Its purpose is to be used (royalty-free) in his new Sci-Fi novels as an esoteric language by some galactic empire (I've only read a fantasy book from him "Kajjám, a Tévedés", so I don't know more about his Sci-Fi books, however I liked that one).

The language itself is Turing-complete, has a weird syntax, and the author promised to open its source code once it's complete. He released a preliminary binary interpreter for Linux (hosted by someone else), that can be downloaded from here (check the .tar.bz2 file).

He's Hungarian, I've read the aforementioned book in Hungarian, but he moved to the US, and writes his new books in English.

Answered by Nyos on September 1, 2021

ICE, from Burning Chrome (1982). ICE stands for Intrusion Counter-measures Electronics. While it's called electronics, the way it's used in the book clearly depicts it as a programming language. This makes sense in the context of the computers that existed at the time, which would often be hard-coded logical circuits used to accomplish specific tasks, such as bank account management and simulations of newtonian movement; in other words, the circuit to accomplish the program was the program. While no name is given to the language(s) the characters actually write in, the book makes it clear that the visuals present in the character's hallucinations are programs created in ICE.

All right, there seems to be some confusion about what a programming language is. I take a very broad view; a programming language is a computer program that provides an abstraction of a logical circuit. Note that it isn't what "creates" a computer program; it creates an abstraction for the logic behind the program. If you wanted to, you could directly construct any computer program you liked out of AND gates, OR gates, and a storage buffer of some kind, and it's never a programming language that does the actual construction of the program anyway; it only serves as the rules for construction. Programming languages do us the kindness of abstracting the idea of a certain combination of those gates into something that makes more sense for humans. Under the header of what I consider a programming language includes Verilog, C, Python, Powerpoint, Minecraft, and the fictional ICE, which is clearly the abstraction of the logic for defense programs in the world of Burning Chrome and Neuromancer.

Okay, I've been downvoted to the pits of stackexchange hell, and apparently no one else seems to think that ICE is a programming language. Instead of deleting the post, I'm just going to see how far we can dig this hole:

  • ICE isn't a programming language, it's a class of software!

So are IDE's. And so are word processors, spreadsheet applications, and the many games that include functions that allow the user to create and run programs within the game, which I also consider programming languages in and of themselves, as they create a different abstraction from other languages of their underlying logic. ICE obviously represents the underlying logic of the defense systems in the world of Burning Chrome, and can be modified on-the-fly by the main characters as they work towards their goal.

  • Programming languages must be written!

See: Scratch, Minecraft, Powerpoint

The idea that a language must be written might also be seen as somewhat offensive by those that speak primarily in a gesture-based language such as ASL, and comes across as just a little tone-deaf considering many of the large number of languages currently on the brink of extinction are unwritten - https://www.nytimes.com/1991/12/31/science/in-a-publishing-coup-books-in-unwritten-languages.html

  • Neuromancer came before Burning Chrome!

Yes, and, no. Burning Chrome the short story was released 1982, Neuromancer was released 1984, and Burning Chrome the short story compilation was released 1986. See https://omnimagazine.com/taking-agency/

Answered by odd135 on September 1, 2021

1983, Superman III

Superman III (DenOfGeek article includes screen caps and discussion of exactly this topic) features Gus Gorman doing some coding.

Whilst it is clearly some variation on BASIC or LISP, equally clearly it does not make functional sense in any known language and therefore by definition is a fictitious language. (In-universe anyway; out-of-universe we know it's just something put together to fill a screen convincingly enough for a couple of seconds of film, of course.) The language itself is not named in the film, but in-universe it exists, apparently works, and can be seen being entered.

Answered by Graham on September 1, 2021

"The Black Cloud", Fred Hoyle, 1957. https://en.wikipedia.org/wiki/The_Black_Cloud

The hero (or at least the chap who consistently made the right decision) pulled an all-nighter writing an astronomical program for the Cambridge mainframe. A fragment of this is shown in the book, it was largely symbolic (but was not APL, which hadn't yet been invented) and basically comprised whatever astronomical/astrological characters the typesetter had available.

The code, on page 32 of the paperback copy, is five lines:

  T Z 
0 A 23 ⊖ 
1 U 11 ⊖ 
2 A 2  F 
3 U 13 ⊖ 

Described as "a short sample of the code by which the computer was instructed." [apparently this is a sample of machine code]

These symbols were transcribed to a punched strip of paper, and "the holes in the paper that constituted the final instructions to the computer."

Answered by Mark Morgan Lloyd on September 1, 2021

I don't know if it can be considered on topic, but at the beginning and ending of Edward Wellen "No other gods" (1972) are listed some lines of a fictional code.
The language is never named, but may be named "QOGIC", since that appears in a REMARKS section on the first page (see below). The language looks almost exactly like COBOL, except that the line numbers begin with the letter Q.

Q01010 IDENTIFICATION DIVISION.  
Q01040 PROGRAM-ID. 'END RUN.'  
Q01060 AUTHOR. COMPUTER.  
Q01080 INSTALLATION. COMMUNICATIONS CENTER AT GALACTIC HUB.  
Q01100 DATE-WRITTEN. YESTERDAY.
Q01120 DATE-COMPILED. TODAY.
Q01140 SECURITY. CLASSIFIED.
Q01160 REMARKS.
Q01161 THIS QOGIC PROGRAM IS FOR THE ESTABLISHING OF TOTAL
Q01162 ENTROPY.

Here it is on Google Books.

Answered by McTroopers on September 1, 2021

This is for consideration since I don't think it fully matches OP's criteria. In "The Lost Worlds of 2001" (1972) one of the draft scripts describes one of the astronauts spending some hours modifying and testing the ship's computer's program to allow him to take one of the pods out, despite none of the others being conscious. The programming language is unnamed, no example is given, and the draft was unpublished.

In one of the sequels, HAL's architecture is described in terms which make it sound like some sort of dataflow machine, with the possibility of "memories in transit" being overlooked by the remedy which removed Hal's psychoses.

Separately, in Imperial Earth (1975) I think there was an example of "if this happens then do that" programming of the protagonist's PDA. Again, I don't have my copy to hand so can't check.

Answered by Mark Morgan Lloyd on September 1, 2021

@RossPresser mentioned Samuel Delaney's "Babel-17" (1966) already, but only to note that the real-life languages ALGOL and FORTRAN appear in the text. Somehow he missed mentioning that Babel-17 is itself the name of a fictional language. It is initially presented in the story as being a natural language that the protagonist must learn, but in a major plot point is later revealed to be a programming language. Now arguably it doesn't fit because the, er, 'machines' being programmed are not mechanical but are other sentient creatures. But it does meet fit the requirement that a human can compose a program in Babel-17 that is run elsewhere, specifically in the brain of a target adversary.

Answered by Ethan on September 1, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP