8000 GitHub - zakwilson/nucleus: Nucleus is a homoiconic systems programming language that can serve as a drop-in replacement for C · GitHub
[go: up one dir, main page]

Skip to content
zakwilsonPublic

About

Nucleus is a homoiconic systems programming language that can serve as a drop-in replacement for C

Resources

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

nucleus

Nucleus is a new systems programming language. I initially conceived of it as "a replacement for C" adding syntactic abstraction with Lisp-style structural macros, but it has grown beyond that concept. It still aims to be a drop-in replacement for C with full ABI compatibility and no mandatory runtime overhead, but it adds modern capabilities:

  • Guaranteed non-null reference types
  • Maybe/match semantics for nullables
  • Polymorphic functions dispatched on argument types
  • Protocols for constraining polymorphic matches
  • Optional lexically-enforced lifetimes to prevent both memory leaks and use-after-free
  • Lisp-style macros

While it already has most of the capabilities required for serious use like hosting its own compiler, using it for anything important is risky at this stage. Breaking changes are likely to happen without warning, and it's probably buggy.

building

You'll need LLVM and clang. The compiler bootstrap IR is the boot submodule, which make fetches if you cloned without --recurse-submodules. Run

make

and you'll have bin/nucleusc. You can run

sudo make install

for system-wide installation. It should compile on Windows and Mac OS too, but this is untested.

About

Nucleus is a homoiconic systems programming language that can serve as a drop-in replacement for C

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

0