Because of the relatively poor state of multithreading in Nim and the reliance on external libraries like Arraymancer for heavy numerical workloads (also the performance issues with boxed values due to `ref object` everywhere), I started writing a language from scratch, with built-in support for concurrency via parallel blocks (without macros) and a C backend, similar to Nim.
GC is optional and the stdlib will work with or without the GC.
The idea is to make things like accessing shared memory concurrently a trivial process by automating the generation of thread synchronization code.
Also there are parallel fors, like so:
parallel for x = 1 to 5:
print "x = %d" | x
parallel for y = 10 to 20:
print "y = %d" | y
sleep 0.1
print "Nested parallel for loop completed."
It is not ready for use at all currently, though will likely see further development until it is.
Compiler implemented in Go, originally with Participle, recursive-descent approach. All examples in the examples directory compile.
ljchen•23m ago
Interesing idea. I am wondering what are the use cases on top of your head? I am asking because in my understanding people who care concurrency and parallelism are often those who care performance.
renox•6m ago
That's a minor detail but C's "%d" isn't something to copy in a new language, python's format/template string is much better.
death_eternal•2h ago
Because of the relatively poor state of multithreading in Nim and the reliance on external libraries like Arraymancer for heavy numerical workloads (also the performance issues with boxed values due to `ref object` everywhere), I started writing a language from scratch, with built-in support for concurrency via parallel blocks (without macros) and a C backend, similar to Nim.
GC is optional and the stdlib will work with or without the GC.
Example:
The idea is to make things like accessing shared memory concurrently a trivial process by automating the generation of thread synchronization code.Also there are parallel fors, like so:
It is not ready for use at all currently, though will likely see further development until it is.Compiler implemented in Go, originally with Participle, recursive-descent approach. All examples in the examples directory compile.