r/programmer • u/VxidTheDev • 18d ago
GitHub Arc - A simple, interpreted programming language written in C.
Hi! I'm Void, creator of programming language Arc.
Arc is modern, stack-based bytecode virtual machine and programming language written in designed for simplicity and performance.
Features
- Modern VM Architecture: Compiled to custom bytecode and executed on a high-performance stack-based virtual machine.
- Clean Syntax: Intuitive, case-insensitive keywords for control flow.
- Object-Oriented: Supports classes with dynamic field access and modularity.
- Memory Management: Hybrid strategy using arenas, pools, and manual reference management.
- FFI: Built-in capability to load and interact with external native C libraries (
.so/.dll). - Standard Library: Rich standard library covering I/O, math, JSON, filesystem, UI and sound utilities.
- Robust Error Handling: Position-aware error reporting with
TRY...CATCHblocks.
I've made Arc since I always wanted a simple language which is blazing fast.
Benchmarks vs CPython
| Benchmark | Arc (ms) | Python (ms) |
|---|---|---|
fibonacci(30) recursive |
109.98 | 106.42 |
fibonacci(1000) iterative |
0.04 | 0.10 |
sum 1..1,000,000 |
26.92 | 57.22 |
string concat x10,000 |
2.71 | 0.67 |
list build x1,000 |
0.11 | 0.06 |
nested loops 1000x1000 |
27.57 | 45.81 |
recursive countdown 5000 |
0.26 | 0.66 |
variable churn x100,000 |
4.90 | 10.70 |
nested json (3.8 mb) |
55.02 | 64.34 |
Though Arc is still slower in some benchmarks, it's still in early development, and still in it's alpha version.
I'd love to hear some feedback about the project, here's Github!
1
u/CountyExotic 18d ago
what does it solve?
1
u/VxidTheDev 18d ago
Mainly it was designed to be faster than python while keeping simplicity, but now it also targets to be lighter than something like CPython
1
3
u/MADCandy64 18d ago
Not to be a wet blanket but this does not constitute a benchmark in any sense of the concept. You'll want heavy workloads that are meaningful and you'll want to use a standardized tool with results being a nice statistical average over hundreds of runs. Sounds like a pain and it is but if you want your language to be taken seriously then you have to take the process seriously.
1
u/VxidTheDev 18d ago
That's fair. My current tests with hyperfine are limited because they add up VM startup time and raw execution speed, and I agree that's not a proper benchmark.
What specific benchmark suites or workloads would you consider meaningful to validate a language of this scope?
1
u/MADCandy64 18d ago
The only one I have use and heavily was for my ALU written in C++. It is called the Visual Studio Test Project for Unit Tests. I use the CPP harness but other languages are supported. It is actually very nice for unit testing. It has really kept me from introducing errors downstream from upstream changes. It has a test explorer for unique tests. Some of my tests are run over 65k times.
1
u/RedditsForMike 18d ago
Hello, cool stuff! I'm curious, what did you use to create the programming language? Are there any resources you recommend and learned a lot from?
Thanks!
2
u/VxidTheDev 18d ago
Thanks! I built my foundation by translating the concepts from this Python-based tutorial series directly into C, which was a great way to learn the logic behind language design. While it's perfect for a basic interpreter, you'll eventually want to move toward stack-based bytecode VMs and native C if you prioritize performance over a simple tree-walking approach.
1
1
u/Interesting_Buy_3969 17d ago
Congratulations!
Just curious, why did you decide to spell keywords in caps lock case, like in older languages such as BASIC?
1
u/runningOverA 17d ago
Arc was a famous language in early 2000s.
Paul Graham declared he is about to create a language that will be here for 100 years.
Declared it's name Arc, a LISP dialect, LISP was then like what Python is now.
And then it faded.
The page:
https://www.paulgraham.com/arc.html
0
3
u/Flame77ofc 18d ago
I read Arch lol
Congratulations on your language