All Projects → MarioSieg → Corium

MarioSieg / Corium

Licence: Apache-2.0 License
Corium is a modern scripting language which combines simple, safe and efficient programming.

Programming Languages

C++
36643 projects - #6 most used programming language
rust
11053 projects
python
139335 projects - #7 most used programming language
CMake
9771 projects
assembly
5116 projects
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Corium

MultiHttp
This is a high performance , very useful multi-curl tool written in php. 一个超级好用的并发CURL工具!!!(httpful,restful, concurrency)
Stars: ✭ 79 (+338.89%)
Mutual labels:  high-performance, concurrency, parallel, multithreading
java-multithread
Códigos feitos para o curso de Multithreading com Java, no canal RinaldoDev do YouTube.
Stars: ✭ 24 (+33.33%)
Mutual labels:  concurrency, parallel, parallel-computing, multithreading
Hamsters.js
100% Vanilla Javascript Multithreading & Parallel Execution Library
Stars: ✭ 517 (+2772.22%)
Mutual labels:  concurrency, parallel, parallel-computing, multithreading
jingle
🔔 Jingle is a dynamically-typed, multi-paradigm programming language designed for humans and machines.
Stars: ✭ 34 (+88.89%)
Mutual labels:  interpreter, virtual-machine, jit-compiler
Object threadsafe
We make any object thread-safe and std::shared_mutex 10 times faster to achieve the speed of lock-free algorithms on >85% reads
Stars: ✭ 280 (+1455.56%)
Mutual labels:  high-performance, concurrency, multithreading
Napajs
Napa.js: a multi-threaded JavaScript runtime
Stars: ✭ 8,945 (+49594.44%)
Mutual labels:  runtime, parallel, multithreading
Openmp Examples
openmp examples
Stars: ✭ 64 (+255.56%)
Mutual labels:  parallel, parallel-computing, multithreading
Openj9
Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Stars: ✭ 2,802 (+15466.67%)
Mutual labels:  interpreter, runtime, virtual-machine
Ph7
An Embedded Implementation of PHP (C Library)
Stars: ✭ 422 (+2244.44%)
Mutual labels:  interpreter, runtime, virtual-machine
Pget
The fastest file download client
Stars: ✭ 724 (+3922.22%)
Mutual labels:  fast, concurrency, parallel
thread-pool
BS::thread_pool: a fast, lightweight, and easy-to-use C++17 thread pool library
Stars: ✭ 1,043 (+5694.44%)
Mutual labels:  concurrency, parallel, multithreading
noroutine
Goroutine analogue for Node.js, spreads I/O-bound routine calls to utilize thread pool (worker_threads) using balancer with event loop utilization. 🌱
Stars: ✭ 86 (+377.78%)
Mutual labels:  concurrency, parallel, multithreading
openj9
Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Stars: ✭ 2,973 (+16416.67%)
Mutual labels:  interpreter, runtime, virtual-machine
Umka Lang
Umka: a statically typed embeddable scripting language
Stars: ✭ 308 (+1611.11%)
Mutual labels:  interpreter, virtual-machine, concurrency
Pelagia
Automatic parallelization (lock-free multithreading thread) tool developed by Surparallel Open Source.Pelagia is embedded key value database that implements a small, fast, high-reliability on ANSI C.
Stars: ✭ 1,132 (+6188.89%)
Mutual labels:  parallel, parallel-computing, multithreading
Quickjs
The official repo is at bellard/quickjs.
Stars: ✭ 1,429 (+7838.89%)
Mutual labels:  interpreter, runtime, virtual-machine
Taskflow
A General-purpose Parallel and Heterogeneous Task Programming System
Stars: ✭ 6,128 (+33944.44%)
Mutual labels:  parallel, parallel-computing, multithreading
Vc
SIMD Vector Classes for C++
Stars: ✭ 985 (+5372.22%)
Mutual labels:  parallel, parallel-computing, avx
Duckstation
Fast PlayStation 1 emulator for x86-64/AArch32/AArch64
Stars: ✭ 2,888 (+15944.44%)
Mutual labels:  emulator, fast, jit-compiler
ultra-sort
DSL for SIMD Sorting on AVX2 & AVX512
Stars: ✭ 29 (+61.11%)
Mutual labels:  fast, parallel, simd-parallelism

The Corium programming language

image

Corium is a modern, fast and simple scripting language,
empowering easy but powerful programming with high performance.
A language for everyone for everything.

The goal is to create a new programming language,
which is easy to learn for new developers and
for developers comming from other languages. The language is also very flexible and fast
thus a good choise for many different projects.


Core features

  • Simple
  • Safe and test driven
  • Statically typed with type inference
  • Builtin parallelism using the parallel keyword
  • Builtin GPU computing using the compute keyword
  • Fast scripting and prototyping
  • Cross-platform
  • Workspace system for complex projects
  • Simple but powerful types
  • Builtin package manager

The project

The project was started around February in 2021,
to create a new programming language for the world.
A language for beginners and experts, for desktop and mobile.
Trying to unite different tech-stacks.
This year (2021/2022) I will participate with Corium as my project in Jugend Forscht,
a German science competition.

I was always bugged by the two language problem:
If you write your code in a simple and high level language,
the productivity will be high but not the performance.
Of course the performance in enough in most cases,
but many performance critical parts are often implemented in a fast language such as C, C++ or Rust.
This is very error prone and requires much more effort from the development team.
There are existing approaches for a simple and fast programming language,
but they are all komplex languages themselves.
Corium aims to just be simple and fast,
using a clean and consistent syntax and a "friendly" compiler.
In my opinion, many languages are too bloated in features,
having multiple ways to do the same thing.


Development state

Corium is in an early development stage.
The compiler is currently prepared for an alpha release,
with basic but solid features.
The Alpha will be available in the next Months for testing and feedback purposes.

Support

If you want to support the project,
feel free to contribute or suggest any idea you would like.
You can also support the project without development, by sponsoring!


Infrastructure

Corium IntelliJ IDEA Plugin Also works with CLion, WebStorm, Rider and any other IDEA based IDE.
Discord Server Join our small and friendly community. Everyone is welcome!


Implementation

The two primary components are:


Sponsors

A special thanks to all of my sponsors!
Thank you very much for supporting my work, this gives me a lot of motivation.
Sponsors in chronological order:


Corium preview

"Talk is cheap. Show me the code." ― Linus Torvalds
Code snippets in Corium to get a quick overview.

Idiomatic conventions

  • No semicolons - new line per statement
  • Keywords are lowercase
  • Mutable variables are lowerCamelCase
  • Immutable variables are SCREAMING_CASE
  • Types and classes are UpperCamelCase
  • Functions and methods are lowerCamelCase
  • Interfaces are IUpperCamelCase with an I as prefix
  • Modules are lowercase
  • Source file names are lowercase with the .cor file extension

Primitive Data Types

There are 4 primitive data types in Corium.
Choosing a type is easy, each primitive type has exactly one purpose.

int

  • A 64-bit signed integer.
  • Can hold values from -9223372036854775808 to 9223372036854775807.
  • Because it it signed, it can also hold negative values.
  • This type is used as the default type for natural number calculations.
  • The equivalent in other C style languages is long.

float

  • 64-bit double precision float.
  • Can hold values from -2.22507•10−308 to approximately 1.79769•10308.
  • This type is used as the default type for real number calculations.
  • The equivalent in other C style languages is double.

bool

  • A boolean type.
  • Can either be true (1) or false (0).

char

  • A 32-bit unsigned UTF-32 encoded character.
  • Can hold any unicode codepoint.

Advanced Data Types

Corium contains multiple advanced data types and structures.
These are implemented in the standard library, but the most important ones are
auto-imported into each file.
  • String
  • List
  • Option
  • Result
  • BigInt
  • BigFloat
  • Object

Comments

# This is a single line comment
#! This
is
a multi line
comment
!#
#@ This is a doc-comment which will appear in the generated documentation.

Hello, world!

The Corium hello world is a one-liner:

print("Hello, world")

The print() function is used to print text to the console.
A new line is appended by default.


Variables

In general, the identifier is written before the type.
For most cases, the type is inferenced from the expression:
Expression Inferred type
10 int
0.5 float
true bool
'C' char
"Muffins" String
new MyClass() MyClass

Of course the type can be explicitly specified.
So
A:

let x = 10

is seen by the compiler as
B:

let x int = 10

In most cases, letting the compiler infer the types is the way to go. (A)
But sometimes, extra type information can be beneficial. (B)

Mutable variables are defined using the let keyword.
They also use lowerCamelCase as naming convention.

let num = 10
let time = 23.45
let food = "Burger"

Immutable variables are defined using the const keyword:
They also use SCREAMING_CASE as naming convention.

const IS_DEBUG = true
const PI = Math.atan2(1.0, 1.0) * 4.0
const FAVOURITE_FOOD = "Lasagne"

Functions

Functions are defined using the function keyword.

A simple function without a parameter or return type:

function simple() {

}

A function with a float x as parameter but no return type:

function simple(x float) {

}

A function with a float x as parameter, return type of type float and a return statement:

function square(x float) float {
    return x * x
}

Conditionals

A simple if-statement:

let isSunshine = true

if isShunshine {
    print("Let's go to the beach")
}

For chained conditions the and, or and not operators are used.

An if-statement with a chained condition:

let isSunshine = true
let isSummer = true
let temperate = 20

if isShunshine or isSummer and not temperature < 18 {
    print("Let's go to the beach")
}

if-statements can also be chained using else and else if

A chained if-statement with an else block:

let isSunshine = true

if isShunshine {
    print("Let's go to the beach")
} else {
    print("It's raining, let's play some games instead")
}

A chained if-statement with an else if and else block:

let isSunshine = true
let temperate = 20

if isShunshine {
    print("Let's go to the beach")
} else if not temperate < 15  {
    print("Let's go for a walk")
} else {
    print("It's raining, let's play some games instead")
}

For long and complex comparisons,
the compare statement can be used.
It resembles a switch-statement from C-like languages,
but is much more powerful.

let grade = 'C'

compare grade {
    'A' => print("Easy"),
    'B' => print("Very good!"),
    'C' => print("It's okay"),
    'D' => print("I'll do better next time"),
    'E' or 'F' => print("Let's try that again"),
    else => print("Grades must be from A to F!")
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].