Skip to content
/ Crux Public

Crux is a dynamically typed interpreted programming language.

Notifications You must be signed in to change notification settings

Sebight/Crux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Crux

Crux is a dynamically typed interpreted programming language.

Why?

I wrote this project to familiarize myself with inner workings of interpreted programming languages. I followed Robert Nystrom's Crafting Interpreters, which was a very valuable resource.

My initial goal was to create a language that I could use to solve Advent of Code 2024, however due to other circumstances, I was not able to finish the project in time.

Implemented features of Crux:

  • Math operations
  • Functions
  • Branches
  • Loops
  • Classes (with inheritance)
  • Lists
  • Support for native C++ functions

Example program written in Crux

var list = List();

for (var i = 0; i < 10; i += 1) {
  list.push(i);
}

var avg = 0;

for (var i = 0; i < list.size; i += 1) {
  avg += list.get(i);
}

avg = avg / list.size;

print(avg);

Takeaways

It was a lot of fun to see the features of Crux being added and it slowly becoming a somewhat usable programming language. This project definitely sparked an interest in programming language development and integration. One day, I would love to create a programming language running in a VM and ultimately a compiled language.

However, this project also made me interested in implementation of scripting languages into existing C++ codebases or game engines, which is something I would also love to explore.

About

Crux is a dynamically typed interpreted programming language.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published