Cyclops Lang.org 𐙀



Cyclops or '𐙀' is a programming language written in Linear A, a forgotten/undeciphered script used 3500-4500 years ago on the Greek island of Minos.



Cyclops Code

Pseudocode

help();

print('hello world');
> 'hello world'

44 + 6
> 50

var x = 500
console.log(x - 100);
> 400

function square(param1) {
  return param1 * param1;
}

Types

Commands are individual symbols in Linear A. Multiple characters can be the name of a variable or function. Uses Unicode codepoints for Linear A and Aegean font by George Douros.

Numbers are written in Aegean numerals.

Any non-Minoan characters are interpreted as strings.

Guessing Game

A guessing game written in Cyclops:

𐙀
𐜝 I'm thinking of a number one to one hundred
𐘾𐘾 𐚁
𐙟
    𐘽𐘽 𐝠 Guess a number:

    𐘜 𐘽𐘽
        𐚠 𐘾𐘾
            𐜝 too high
        𐚡 𐘾𐘾
            𐜝 too low
        𐙈 𐘾𐘾
            𐝏
    𐘩
𐙟
𐜝 you guessed correctly! you win!
help();
print("..a number 1-100");
var x = random(1, 100);
while(true) {
    var y = input("Guess:");

      if y > x:
          print("too high");
      if y < x:
          print("too low");
      if y == x:
          break;

}
print("you guessed correctly! you win!")

Installing

npm install cyclops-lang -g
cyclops game.cyc

Plz Help

Can you decipher Linear A?
Can we make a real sample of Linear A work as a compilable program?
There are over 300 symbols in Linear A... what should the rest of our keywords be?

Open Source

Commands

  • 𐙀 = help
  • 𐜝 = print
  • 𐝠 = receive user input (command line or input())
  • 𐚁 = random number (1-100)
  • 𐙟 = loop until flag is raised
  • 𐝏 = raise flag (exit loop)

  • Math

    Math is evaluated left-to-right, without order of operations. So 3 + 2 * 4 == 20 not 11

  • addition done by placing numbers on same line (𐄓𐄊 𐄌 returns the sum 𐄔)
  • 𐝔 = subtract
  • 𐝑 = divide
  • 𐙨 = multiply
  • Conditional

  • 𐘜 = conditional switch
  • 𐘩 = end conditional
  • 𐙈 = equality (===)
  • 𐚠 = greater-than
  • 𐚡 = less-than

    Conditionals if value of variable 𐚨𐚨 is greater than, less than, or equal to 5

    𐘜 𐚨𐚨
        𐚠 𐄉
            𐜝 greater than 3
        𐚠 𐄋
            𐜝 greater than 5, too
        𐚡 𐄋
            𐜝 less than 5
        𐙈 𐄋
            𐜝 equal to 5
    𐘩
  • Functions

    Declare a function with this character 𐛪 that looks like an archer.
    Inside the function, 𐝈 will represent the first parameter passed into the function, followed by 𐝉, 𐝊, 𐝋, and 𐝌

    Write the squaring function f(x) = x * x. Let's name the function 𐝎𐝎.

    𐛪 𐝎𐝎
        𐝈 𐙨 𐝈
    𐛫

    Now call the function:

    𐝎𐝎 𐄊
    > 𐄐𐄌