zerl
zig-clap
zerl | zig-clap | |
---|---|---|
1 | 3 | |
41 | 1,204 | |
- | 6.7% | |
9.0 | 7.5 | |
about 1 month ago | 1 day ago | |
Zig | Zig | |
The Unlicense | 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.
zerl
-
Show HN: Lyceum – An MMO game built with Zig and Erlang
Hey HN, this is a small project myself and closer friends have been building on our free time (https://github.com/Dr-Nekoma/lyceum), it finally reached 0.1.0, we are open to feedback!
The original idea was to experiment with Zig + Raylib, eventually we wrote a small server in Erlang as well. We started by first interacting with Erlang via its C bindings, but this eventually led to some of us to prototyping our own tooling to better integrate Zig types with Erlang, we called such tool "zerl" as its avaliable here https://github.com/dont-rely-on-nulls/zerl.
All the developers are NixOS users, to the tooling heavily relies on Nix as well.
zig-clap
-
After a day of programming in Zig
Zig and Rust both promote explicit error handling, however their mechanisms are different. Rust uses Result enums, while Zig uses a (global) error set type (though similar to an enum) and error propagation. Similarly, Rust uses the Option enum for optional types, while Zig uses a type modifier (?T). Both offer modern, syntactic sugar to handle those (call()? and if let Some(value) = optional {} in Rust, try call() and if (optional) |value| {} in Zig). Since Rust uses the standard library to implement error handling and options, users have the possibility to extend those systems which is quite powerful. However, I like the approach Zig takes in providing those things as language features. While their approach fits well into the C universe, I dislike that there is no pragmatic way to add more context to an error (but well, no allocations). Libraries like [clap](https://github.com/Hejsil/zig-clap) solve this by implementing a diagnostics mechanism.
-
Is it too early to use Zig for CLI tooling ideas?
It's somewhat early, but there are libraries like https://github.com/Hejsil/zig-clap that can make writing CLIs a bit easier.
-
Docco for printing, getting input, cmdline args?
Command line args: std.process or the zig-clap library
What are some alternatives?
hyperzig - HypergraphZ - A Hypergraph Implementation in Zig [Moved to: https://github.com/yamafaktory/hypergraphz]
zig-args - Simple-to-use argument parser with struct-based config
lyceum - An MMO game written in Erlang (+ PostgreSQL) + Zig (+ Raylib)
sdk - TinyVG software development kit
hypergraphz - HypergraphZ - A Hypergraph Implementation in Zig
zf - a commandline fuzzy finder and zig module designed for filtering filepaths