cparser
jstar
cparser | jstar | |
---|---|---|
2 | 4 | |
319 | 105 | |
0.9% | - | |
4.6 | 7.5 | |
6 months ago | 10 days ago | |
C | C | |
GNU General Public License v3.0 only | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
cparser
-
Compiling History: A brief tour of C compilers
> QBE is a new optimizing backend much simpler than LLVM; cproc and cparser are two of the C compilers that target it, in addition to its own minic.
I thought cparser targeted libFirm. That's what their GitHub page says [0].
"It acts as a frontend to the libFirm intermediate representation library."
> We really need a production quality open source C compiler that is actually written in C.
I honestly think cproc or cparser are almost there already. For cproc, you just need to improve the quality of code optimization; it's really QBE you'd need to change. For example, you could change unnecessary multiplications by powers of 2 into left shifts, improve instruction selection so that subtraction is always something like "sub rax, rdi" and not "neg rdi / add rax, rdi" [1]).
For cparser, I notice slightly higher quality codegen; libFirm just needs more architecture support (e.g. AMD64 support appears to work for me, but it's labeled as experimental).
[0]: https://github.com/libfirm/cparser
[1]: I'm pretty sure this is the line of code that generates it, too: https://c9x.me/git/qbe.git/tree/amd64/emit.c#n418
- Cparser – A C99 parser (with GNU extensions) (2020)
jstar
-
-❄️- 2023 Day 1 Solutions -❄️-
[LAUNGUAGE: J*]
-
What is your favorite programming language?
My language, obviously.
- Bamless/jstar: A lightweight embeddable scripting language
-
Implementing a Call Stack
Also, since you are willing to look at non-treewalk interpreters, you can take a look at this: https://github.com/bamless/jstar/blob/master/src/vm.h In this I use two parallel arrays, one for frames and one for variables. The frame contains the instruction pointer of the function and the address of the start of the activation record. Variables are stored packed inside the stack array and are accessed through indexing.
What are some alternatives?
wax - A tiny programming language that transpiles to C, C++, Java, TypeScript, Python, C#, Swift, Lua and WebAssembly 🚀
umka-lang - Umka: a statically typed embeddable scripting language
interpreter - A simple intepreter written in java.
lqsd - LiQuid Screen Dim - Dim your screen smoothly - Mirror of: https://git.korhonen.cc/FunctionalHacker/lqsd
small-vm - A small virtual machine, following the "Write your own virtual machine" : https://justinmeiners.github.io/lc3-vm/ course.
Kwork - Cross-platform bundle for development on low memory machines
Metals - Scala language server with rich IDE features 🚀
frece - Maintain a database sorted by frecency (frequency + recency)
dmd - dmd D Programming Language compiler
BCause - BCause (pronounced "because") is a compiler for the old B programming language (1969) for modern systems.
Nim - Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).
advent-of-code-2023