Occult aims to be a memory-safe, statically typed programming language with an elegant syntax similar to Rust and the performance of C. It achieves this by cross-compiling Occult code into C and using tinycc as both a just-in-time (JIT) and ahead-of-time (AOT) compiler.
In Occult, dynamic arrays are the default array type, functioning similarly to vectors. These arrays are managed by tgc, a lightweight garbage collector implemented in C. Occult enforces the use of stack-based variables, promoting predictable memory management and reducing the risk of dangling pointers. However, it also allows for heap allocations using tgc's malloc implementation, which the garbage collector automatically frees.
Assuming you have git gcc, and other required dependencies installed, all of this should go smoothly.
Warning
Occult uses tgc which causes undefined behavior but most of the time it should be fine, as per tgc's documentation.
- Run build.sh
Important
Even if you have gcc installed, you must follow this for now!
- Run install_gcc.bat
- Run build_windows.bat
Tip
If you need help use the -h
option!
./occultc <source.occ>
Note
The big overhaul to the language syntax and how it works. v2.0.0-alpha
- Windows support
- OSX Support
- Bootstrapping
- Move away from cross-compilation for just-in-time
- Memory safety as far as we can get it
- Full static analyzer
- Fixing bugs
- Better multidimensional array syntax
- Add string-supported function calls + other types (array, etc.)
- Module system
- Add a "compilerbreakpoint" keyword (stops codegen / program during compilation)