Measures Concepts
GitHub icon

Cyber

Cyber - Programming language

< >

Cyber is a programming language created in 2022.

Source code:
git clone https://github.com/fubark/cyber
#1011on PLDB 2Years Old

Cyber is a new language for fast, efficient, and concurrent scripting.


Example from the web:
import m 'math' worlds = ['World', '世界', 'दुनिया'] worlds.append(m.random()) for worlds each w: print 'Hello, {w}!' func fib(n int) int: coyield if n < 2: return n return fib(n - 1) + fib(n - 2) count = 0 -- Counts iterations. fiber = coinit fib(30) while fiber.status() != #done: res = coresume fiber count += 1 print '{res} {count}'

Language features

Feature Supported Token Example
While Loops
while fiber.status() != #done:
  res = coresume fiber
  count += 1
Integers
count = 0
Line Comments
-- Counts iterations.
Assignment
count = 0
Print() Debugging
print '{res} {count}'
Functions
func fib(n int) int:
   coyield
   if n < 2:
       return n
   return fib(n - 1) + fib(n - 2)
Semantic Indentation
hasForEachLoops
for worlds each w:
  print 'Hello, {w}!'
Strings
'World'
File Imports
import m 'math'

View source

- Build the next great programming language · Search · Add Language · Features · Creators · Resources · About · Blog · Acknowledgements · Queries · Stats · Sponsor · Day 605 · feedback@pldb.io · Logout