alg
zig-infix-parser
alg | zig-infix-parser | |
---|---|---|
4 | 2 | |
24 | 12 | |
- | - | |
2.6 | 1.1 | |
over 2 years ago | about 1 year ago | |
Zig | Zig | |
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.
alg
-
Learning Zig
> comptime doesn't allow you to create domain specific macros
Sure it does!
Zig's string format function is written using comptime. It parses the format string and validates the arguments at compile time. See https://github.com/ziglang/zig/blob/master/lib/std/fmt.zig
I also toyed around with turning a math equation dsl into compiled statements at https://github.com/Laremere/alg I got matrix math working so, eg, if you multiply a 1by2 matrix by a 2by1 matrix, it returns a matrix which is typed to 2x2.
-
Problems of C, and how Zig addresses them
Last year I dabbled in making a DSL like solution for operator overloading: https://github.com/Laremere/alg
It ends up slightly more verbose in usage, but the statements themselves remain concise. Unfortunately I got a real job that isn't using Zig, so I've stopped working on this. Others can feel free to take up the torch, though.
-
A work-around for no operator overloading
I did this at the beginning of the year: https://github.com/Laremere/alg
-
Limited Operator Overloading
I have a new project which implements a kind of operator overloading:
zig-infix-parser
- Interesting (mis-)use cases for comptime
-
A work-around for no operator overloading
I wrote a proof of concept here https://github.com/markisus/zig-infix-parser that computes f64 expressions but could be extended to do matrix multiplication.
What are some alternatives?
zig-gamedev - Main monorepo for @zig-gamedev libs and example applications
zig - General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.
bun - Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
ziglings - Learn the Zig programming language by fixing tiny broken programs.
zvm - zvm (Zig Version Manager) lets you easily install/upgrade between different versions of Zig.
tigerbeetle - The distributed financial transactions database designed for mission critical safety and performance.
ZigPong - GUI Pong written in Zig, using Raylib
Rustlings - :crab: Small exercises to get you used to reading and writing Rust code!