CosmicOS: a Coder's Contact Message

CosmicOS is a way to create stand-alone messages suitable for conversations across large gulfs of time and space. It is a preamble you can borrow to bootstrap up to a decent shared vocabulary, without making too many assumptions. CosmicOS is inspired by Hans Freudenthal's language, Lincos, and Carl Sagan's book, Contact.


The message so far communicates:

The idea is to communicate the usual math and logic basics, then use that to show how to run programs, then send interesting programs that demonstrate behaviors and interactions, and start communicating ideas through ”theater” rather than dry logic. This is inspired by Freudenthal's idea of staging conversations between his imaginary characters Ha and Hb.

Message in plain text form

The message can be rendered in plain text. This is not the form in which it would be transmitted!

0introduce numbers (in unary notation)MATH
1introduce equality for unary numbersMATH
2now introduce other relational operatorsMATH
3introduce the NOT logical operatorMATH
4introduce additionMATH
5introduce subtractionMATH
6introduce multiplicationMATH
7introduce non-unary representation of numbersMATH
8show some syntax variantsMATH
9show local assignmentMATH
10demonstrate existence of memoryMATH
11use equality for truth valuesMATH
12show mechanisms for branchingMATH
13introduce the AND logical operatorMATH
14introduce the OR logical operatorMATH
15illustrate pairsMATH
16introduce mutable objects, and side-effectsMATH
17illustrate lists and some list operatorsMATH
18describe changes to the implicit interpreter to allow new special formsHACK
19introduce sugar for letMATH
20build up functions of several variablesMATH
21show map function for applying a function across the elements of a listMATH
22end of part 1, start of part 2NOTE
23show an example of recursive evaluationMATH
24some pure lambda calculus definitions - optionalMATH
25introduce universal quantifierMATH
26introduce existential quantifierMATH
27introduce logical implicationMATH
28introduce sets and set membershipMATH
29introduce graph structuresMATH
30show how to execute a sequence of instructionsMATH
31introduce environment/hashmap structureMATH
32introduce simple mutable structuresOBJECT
33introduce method handler wrappersOBJECT
34introduce turing machine modelTURING
35introduce simple form of typing, for ease of documentation.OBJECT
36an example object -- a 2D pointOBJECT
37an example object -- a containerOBJECT
38expressing inheritanceOBJECT
39adding a special form for classesOBJECT
40wrapper class for cellsOBJECT
41playing around with doors and roomsMUD
42end of part 2, start of part 3NOTE
43simulating unless gatesGATE
44testing alternate primer based on gates: cos_not circuitGATE
45testing alternate primer based on gates: cos_and circuitGATE
46testing alternate primer based on gates: cos_or circuitGATE
47testing alternate primer based on gates: cos_nor circuitGATE
48testing alternate primer based on gates: cos_osc circuitGATE
49testing alternate primer based on gates: cos_sr circuitGATE
50testing alternate primer based on gates: cos_d circuitGATE
51probing networks of unless gatesGATE
52end of part 3, start of part 4NOTE
53a mechanism for referring to parts of the messageSELF
54some preparatory work for integrating with Java codeJAVA
55class translation 'COS_JavaTest'JAVA
56check that automatic conversion is workableJAVA
57another simple little text-adventure spaceMUD
58native implementation of a Java list, hash classesJAVA
59testing the JList classJAVA
60basic iterator implementationJAVA
61class translation 'COS_JDoor'JAVA
62class translation 'COS_JThing'JAVA
63class translation 'COS_JRoom'JAVA
64class translation 'COS_JNamed'JAVA
65class translation 'COS_JWorld'JAVA
66class translation 'COS_JRobo'JAVA
67test JRoom, JDoor, JThing, etcJAVA

Message in 4-symbol form

Traditionally, CosmicOS has been represented as a long sequence of four symbols. Labeling them arbitrarily as 0, 1, 2, and 3, the message begins like this:

see full 281170-symbol message

Estimating message entropy by compressing this message, we get: 22 kB. This message form has some major revisions pending to ease comprehension. Please be forgiving. It'll all get fixed in an instant of galactic time.

General structure

The message is organized as follows:

The message uses the following syntax (shown in plain-text form):

  symbol   meaning
     (     marks beginning of an expression
     )     marks end of an expression
     |     opens a parenthesis which will self-close at the next parenthesis.
           (A B | C | D) is another way to write (A B (C (D))).
           This greatly simplifies complex expressions.
     $     $A is shorthand for (A).
     ;     marks end of a statement

There are also numbers and arbitrary symbols. If there's no other syntax between two of these, they must be separated from each other by whitespace. How all of this is encoded is subject to change. Originally, CosmicOS converted all arbitrary symbols into numbers, and encoded numbers in binary. The message will remain compatible with this, but the encoding of symbols is being changed.



I've chosen the GPL for whimsical reasons. If it is a problem for you just file an issue. I'm a license push-over.

The CosmicOS software is licensed under the CC-GNU GPL.
Creative Commons License
The CosmicOS webpages are licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Fork me on GitHub