libxo
zig
libxo | zig | |
---|---|---|
17 | 902 | |
337 | 39,860 | |
0.3% | 1.2% | |
0.0 | 10.0 | |
17 days ago | about 1 hour ago | |
C | Zig | |
BSD 2-clause "Simplified" License | 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.
libxo
-
jc: Converts the output of popular command-line tools to JSON
> In FreeBSD, this problem was solved with libxo[0]:
Libxo happens to be in the base system, but it is generally available:
* https://github.com/Juniper/libxo
* https://libxo.readthedocs.io/en/latest/
- Libxo: The Easy Way to Generate Text, XML, JSON, and HTML Output
-
Getting work done with PowerShell on Linux
Or make it flexible:
> libxo - A Library for Generating Text, XML, JSON, and HTML Output
* https://github.com/Juniper/libxo/
* https://wiki.freebsd.org/LibXo
Want structure? Ask for JSON or XML and parse. Otherwise it's the regular text output.
- Libxo: Generate text/XML/JSON structured output in one code path
-
Jc – JSONifies the output of many CLI tools
Can you trust it? Cli tool output is not exactly stable. I thought that's why libxo exists?
https://github.com/Juniper/libxo
- Libxo: Library for Generating Text, XML, JSON, and HTML Output
-
Curl gets a --json flag
Please consider https://github.com/Juniper/libxo or something even better than that.
-
You shouldn't parse the output of ls(1)
That would look a lot like FreeBSD. Many of the FreeBSD userland tools are set up to use the excellent libxo (https://github.com/Juniper/libxo) to allow the user's choice of how things are output.
- The growth of command line options, 1979-Present
- Tips on Adding JSON Output to Your CLI App
zig
-
Zig paradigm shift – initial Writergate
Actually, nobody.
Here is the commit where Reader/Writer was introduced: https://github.com/ziglang/zig/commit/5e212db29cf9e2c06aba36...
This is a few months after `git init`. You can see I was really just working on the parser, with a toy example to get things started.
Over time, I merged contributions that made minor changes and shuffled things around, and these APIs evolved to kind of work okay. But nobody really considered "the Zig IO stack" as a whole and put in design effort. That is happening for the first time right now.
- Allocators Are Monkeys with Typewriters
-
Bzip2 crate switches from C to 100% rust
This list's Zig as an entry, despite the Zig project having very clear plans[0] for a 1.0 release. That's not 0ver, it's just the beta stage of semver.
[0] https://github.com/ziglang/zig/milestone/2
-
Show HN: Dk – A script runner and cross-compiler, written in OCaml
I usually structure teaching the same way done in https://www.writethedocs.org/videos/eu/2017/the-four-kinds-o.... So "the Quick Walkthrough Guide will explain what dk scripts are and give you small examples to run" is simply a learning-oriented tutorial which is mostly about giving students confidence and visual feedback. And simultaneously it an explanation of nothing (the video has a great explanation for why to do that). So, I agree that an explanation of threads + Internet + cross-compilation would quite nuts, but for an experienced developer I'd expect to see a meaty example (take a look at https://ziglang.org/ for comparison).
One concrete action may be to make two distinct Quick Start guides ... one for the experienced and one for the inexperienced students though. Is that your thinking?
- Zig Devlog: Self-Hosted x86 Back End Is Now Default in Debug Mode
-
Low-Level Optimization with Zig
> I feel like I can write powerful code in any language, but the goal is to write code for a framework that is most future proof, so that you can maintain modular stuff for decades.
I like Zig a lot, but long-term maintainability and modularity is one of its weakest points IMHO.
Zig is hostile to encapsulation. You cannot make struct members private: https://github.com/ziglang/zig/issues/9909#issuecomment-9426...
Key quote:
> The idea of private fields and getter/setter methods was popularized by Java, but it is an anti-pattern. Fields are there; they exist. They are the data that underpins any abstraction. My recommendation is to name fields carefully and leave them as part of the public API, carefully documenting what they do.
You cannot reasonably form API contracts (which are the foundation of software modularity) unless you can hide the internal representation. You need to be able to change the internal representation without breaking users. I hope Zig reverses this decision someday and supports private fields.
-
Why Use Structured Errors in Rust Applications?
> Did Zig really do that?
https://github.com/ziglang/zig/issues/544#issuecomment-61807...
> In order to simplify everything, tabs are not allowed. Spaces are necessary; we can't ban spaces.
They seem to be open to the alternative but not to a solution that isn't forced on people:
> Maybe someday, we'll switch to tabs for indentation, spaces for alignment and make it a compile error if they are incorrectly mixed
Zig already has a builtin code formatter that automatically changes formatting to their preference, but that's not enough.
-
A new language inspired by Go
Zig solved this by not having a string type at all and not shipping full Unicode support in std: https://github.com/ziglang/zig/issues/234#issuecomment-27630....
- Learning C3 (As a Zig User)
-
What is Bun? The Node.js Alternative Explained
Bun is written from scratch in Zig, a low-level language focused on performance and safety. Instead of using V8 (the engine behind Node and Deno), Bun runs on JavaScriptCore, the engine used in Safari. This choice helps it stay fast and efficient, both in terms of memory and startup time.
What are some alternatives?
PSScriptAnalyzer - Download ScriptAnalyzer from PowerShellGallery
ssr-proxy-js - A Node.js tool for Server-Side Rendering (SSR) and Static Site Generation (SSG) using headless Chrome via Puppeteer
pdfalto - PDF to XML ALTO file converter
Odin - Odin Programming Language
jtbl - CLI tool to convert JSON and JSON Lines to terminal, CSV, HTTP, and markdown tables
v - Simple, fast, safe, compiled language for developing maintainable software. Compiles itself in <1s with zero library dependencies. Supports automatic C => V translation. https://vlang.io