Skip to content
joha2 edited this page Apr 9, 2022 · 17 revisions

Welcome to the cosmicos wiki!

Some Questions (pre FAQ)

In the following I want to ask some questions about CosmicOS.

Message in general

  • Did you ever hand the message over to some person which should decode it like the test message in the METI initiative http://www.dearet.org/ (i.e. without any knowledge of it)?

This is a good idea, I'll look into it. - aw1231

I don't know of anyone has done this. I personally have had fun trying to decode other people's messages, including dearet - https://github.com/paulfitz/dearet/blob/master/outcome.scm - paulfitz

This is really cool! How long did you need to decode? Did you do it by hand or did you write some algorithm? (see next question ;-)) - joha2

  • Is it possible to decode the message in an automated way (without to many assumptions), i.e. to generate a parsing tree or to perform a lexical analysis? Are there results or tools in computer science which allow that? Since an AI or ET who receives your message should have such a tool or result at hand, at least approximately ;-)

I'm sure it is possible. The decoder script that you wrote kinda starts on this in some capacity.

  • Connected with Question no. 2: Should ET or AI compile the message to receive an implementation like cosh.js at the end of the day?
  • Are the bitcodes prefix free? Would that be an improvement for the decoding?
  • Did you already think about redundancy in the message body in case there are some signal errors?
  • I am not really into Scheme but for a more coherent syntax I would suggest to formulate every line of code in a nested form of (command parm1 parm2 ... parmn) such that a recursive decoding per line is possible. This should also be no problem for the is:int stuff (is:int (unary (1) (0))). Is there any problem with such a syntax unification which I am not aware of?

Message specific

  • Would it be a good idea to use blocks like in the METI initiative consisting of 8 numbers (for redundancy reasons) to encode your 0, 1, 2, 3 alphabet?
  • Would it also be possible to encode the "end-of-command" ; by another value instead of using (()) or 2233 (e.g. 4)? Comment: From an automatic translation view maybe the commands should also be embraced in ( and ) instead of being finalized by a new symbol.
  • When I tried to decode your message without putting to much knowledge into the decoder, I first tried to find the separators. I saw that 2 and 3 appear nearly equally often and therefore are good candidates for separators. When I substituted them 2 -> ( and 3 -> ) I wondered why the line statements themselves were not embraced by (). I also wondered what the expression 0() means. Could you please explain your encoding philosophy a bit more?
  • Why did you start the message with this is:int stuff? Isn't it more intuitive to start with comparisons and afterwards do this "number", "square", "prime" stuff? (I know in a C++ program one writes int a = 1; before using a ;-))

Unary

  • Why did you name this operator "unary"? I thought an "unary" operator has only one operand? The "unary" operator in cosmicos has arbitrarily many operands.
  • Why is "unary" not defined by "intro"?
  • Did you use "unary" as some kind of of "no-op" operator?

Real numbers

  • I wondered why you care about real numbers? Is it not possible to rewrite all floating point (rational) numbers into the form (div int int)? A friend of mine mentioned that real numbers themselves might be a more or less cultural product whereas natural numbers, integer numbers, or rational numbers are not. I could ask him for a reference.
  • Irrational real numbers like pi, e, and sqrt(2) can be formulated recursively (by using the appropriate series representations)
    • Perhaps one can introduce an approximation operator which approximates the result by a (div int int) form? Like (= (approx (pi) (div 1 10)) (div 22 7)) -> True
    • [NEW] Irrational real numbers can also be provided as an infinite continued fraction, which is maybe more appropriate for a formulation in a programming language https://en.wikipedia.org/wiki/Continued_fraction (e = [2; 1, 2, 1, 1, 4, 1, 1, 6, ...]; the golden ratio is phi = [1; 1, 1, 1, 1, 1, 1, ...]). Here an example code for the conversion of a continued fraction representation into a rational number. It is implemented in racket such that it is maybe easy to be translated into Scheme:
#lang typed/racket

(: continued-fraction-regular ((Listof Integer) . -> . Number))
(define (continued-fraction-regular list-of-integers)
  (if (empty? list-of-integers)
      0
      (let ([first-element (first list-of-integers)])
        (if (= (length list-of-integers) 1)
            first-element
            (+ first-element
               (/ 1 (continued-fraction-regular (rest list-of-integers))))))))
> (exact->inexact (continued-fraction-regular '(3)))
3.0
> (exact->inexact (continued-fraction-regular '(3 7)))
3.142857142857143
> (exact->inexact (continued-fraction-regular '(3 7 15)))
3.141509433962264
> (exact->inexact (continued-fraction-regular '(3 7 15 1)))
3.1415929203539825
> (exact->inexact (continued-fraction-regular '(3 7 15 1 292)))
3.1415926530119025
  • I saw that div in your implementation is able to perform the integer division. We need a symbol for a rational numbers, e.g., (frac 22 7) -> (frac 22 7) or (frac 25 5) -> (frac 5 1) -> 5.

  • Another implementation for floating point numbers in a simple form maybe something like (float -5 1 1 2 1 3) which is equivalent to (the -5 indicates to start at 1e-5) 3*1e-5 + 1*1e-4 + 2*1e-3 + 1*1e-2 + 1*1e-1 = 0.11213. Such constructions can be easily implemented in an object-oriented approach. It is for sure not the best way but you can circumvent constructions like (. v1 v2) which are difficult to interpret (e.g. is the integer v2 the fractional part itself or is it a fancy encoding?).

  • Btw. this (float ...) construction can also be used to encode floating point numbers in basis 2. Maybe one could introduce (floatbin -5 1 1 1 0 1 1 0 1 0) = 0*2^-5 + 1*2^-4 + 0*2^-3 + 1*2^-2 + 1*2^-1 + 0*2^0 + 1*2^1 + 1*2^2 + 1*2^3

  • I would suggest for introducing floating point numbers:

    • First introduce integers in the manner it is already done in the message.
    • Second introduce integer division (div ...) as it is already done.
    • Third introduce rational numbers (frac ...) by relating them to integer division (div ...) and afterwards show some calculation rules (by using variables and show equations).
    • Fourth introduce the (float ...) [or (floatbin ...)] operation by relating it to is:int, (div ...), (frac ...) in this order.
    • Five show some mixed operations with integers, div, fracs, floats
  • Do you already have a symbol for infinity or is there an implementation for limiting procedures?

  • [NEW] For communicating physical laws which are typically written down in terms of differential equations (which is only appropriate in very late part of the message), maybe we need some concepts like infinity or limits.

  • [NEW] Can we distinguish between parts of the message which are more or less universal (I can imagine natural numbers are) and anthropocentric concepts (like things which are based on our experience and conception of reality)? Should we introduce such a distinction?