Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a21b627759662308

Jump to content

CosmicOS

From Wikipedia, the free encyclopedia

CosmicOS is a self-contained message designed to be understood primarily by treating it as a computer program and executing it. It is inspired by Hans Freudenthal's Lincos and resembles the programming language Scheme in many ways.

The message is written with only four basic symbols representing the binary digits one and zero and open and close brackets. Numbers are represented as a string of binary digits between a pair of brackets and expressions are represented as a string of numbers between brackets. Identifiers for operations are arbitrarily assigned numbers and their functions can be defined within the message itself.

Self-contained messages are of interest for CETI research, but there is much difference of opinion over the most appropriate encoding and broadcast medium to use. CosmicOS is released in modular form, so that the basic message can be adapted to a particular concrete instantiation. The message is released under the GPL licence.[1]

Syntax

[edit]

The core language of the message is a stripped-down Lisp called Fritz.

It is written as space-separated lists of names and numbers with nesting e.g.: * 3 (+ 1 (+ 2 3))

Shorthand:

  • The "|" symbol nests to end of expression: (+ 1 | + 2 3) is equivalent to (+ 1 (+ 2 3))
  • "$x" is equivalent to "(x)"

Lists are evaluated by calling the first element with each of the others in turn. If the first element of the list is a name or number, it is treated as a lookup. Exception: "? x body" makes a function if condition A B evaluates to A if condition is true, otherwise B "define x v" means that looking up $x will return v

SymbolMeaning when calledExample
falsenot true= (> 10 20) $false
truenot false= (> 20 10) $true
<is one integer less than another< 41 42
=test for integer equality= 42 42
>is one integer greater than another> 42 41
not? x | if $x 0 1not (> 41 42)
*multiply two integers* 2 21
+add two integers+ 22 20
-subtract one integer from another- 44 2
?create an anonymous function? x | - $x 1
@define an expression in memory@ decrement | ? x | - $x
assignmemory within expressionassign x 15 | = $x 15
ifconditional evaluationif (> $x 1) (dec $x) $x
andtrue if both arguments are trueand (> 42 41) (< 41 42)
ortrue if either arguments is trueor (> 42 41) (< 42 41)

See also

[edit]

References

[edit]
  1. "CosmicOS source". GitHub. Retrieved 2026-06-07.
[edit]