Top 1,000 Features Creators Events Podcasts Extensions Blog Explorer CSV Download

Cyber

< >

Cyber is a programming language created in 2022.

#779on PLDB 2Years Old
Download source code:
git clone https://github.com/fubark/cyber

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 · About · Resources · Acknowledgements · Part of the World Wide Scroll