0.3.1 • Published 1 year ago

calcium-js v0.3.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 year ago

Calcium is run based on commands.

Each command is represented as a JSON array.

[
  [1, [], "=", ["var", "message"], "Hello, World."],
  [1, [], "print", ["var", "message"]],
  [1, [], "end"]
]

Basically, the commands are equivalent to statements. The meaning of each element in the command is as follows:

  1. Indent (integer)
  2. Option (any)
  3. Command keyword (string)
  4. (After that) Arguments (array)

What is the "indent"?

Indent in Calcium is what the Python language calls indentation. Increase the value of the indent if you need a block, for example if or while.

[
  ...
  [1, [], "if", ["==", ["var", "i"], 10]],
  [2, [], "print", ["var", "i"]],
  ...
]

The code above corresponds to:

if i == 10:
    print(i)

Is the Calcium an esoteric language or just a joke?

No, I don't think so. Here is one of the applications. It is suitable for environments that generate code programmatically.

0.3.0

1 year ago

0.3.1

1 year ago

0.1.0

1 year ago

0.2.0

1 year ago

0.1.1

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago