cryptocode

joined 2 years ago
MODERATOR OF
 

This looks like a great demonstration of using io_uring to minimize syscall overhead

 

This is a spec-compliant TOML parser for Zig. According to the README, the following parsers are available:

 

From the README:

A sophisticated test runner for zig, with extra features and modern aesthetics.

  • Colored output logs
  • Supports hooks like @BeforeAll and @AfterAll
  • Bail tests early
  • Time record for each test
  • Pluggable into any existing project
  • Comes with expect(...).equals(...) type matchers
 

From the README:

Zeppelin is a cross-platform 2D graphics and window library in pure Zig*. It features hardware-accelerated vector graphics (through Vulkan), built-in text rendering, and a window system integration for windows and linux (wayland only). Android support is planned.

 

From the README:

Zigft is a small library that lets you perform function transform in Zig. Consisting of just two files, it's designed to be used in source form. Simply download the file you need from this repo, place it in your src directory, and import it into your own code.

Here's one of the examples given:

const std = @import("std");
const fn_transform = @import("./fn-transform.zig");

fn attachDebugOutput(comptime func: anytype, comptime name: []const u8) @TypeOf(func) {
    const FT = @TypeOf(func);
    const fn_info = @typeInfo(FT).@"fn";
    const ns = struct {
        inline fn call(args: std.meta.ArgsTuple(FT)) fn_info.return_type.? {
            std.debug.print("{s}: {any}\n", .{ name, args });
            return @call(.auto, func, args);
        }
    };
    return fn_transform.spreadArgs(ns.call, fn_info.calling_convention);
}

pub fn main() void {
    const ns = struct {
        fn hello(a: i32, b: i32) void {
            std.debug.print("sum = {d}\n", .{a + b});
        }
    };
    const func = attachDebugOutput(ns.hello, "hello");
    func(123, 456);
}
 

A 2D graphics library, written in pure Zig. CPU rendering.

 

This is the second of two simdjson ports for Zig, the other one being simdjzon

From the README:

Welcome to zimdjson: a high-performance JSON parser that takes advantage of SIMD vector instructions, based on the paper Parsing Gigabytes of JSON per Second.

The majority of the source code is based on the C++ implementation https://github.com/simdjson/simdjson with the addition of some fundamental features like:

  • Streaming support which can handle arbitrarily large documents with O(1) of memory usage.
  • An ergonomic, Serde-like deserialization interface thanks to Zig's compile-time reflection. See Reflection-based JSON.
  • More efficient memory usage.
 

From the ingress:

This post can be considered an advanced Zig tutorial. I will be covering some of the more unique aspects of the language, but won’t be explaining the easy part. If you haven’t read the Zig Language Reference, you might start there. Additionally, we will also learn the foundational trick for implementing relational model.

You will learn a sizable chunk of Zig after this post, but this isn’t going to be an easy read, so prepare your favorite beverage and get comfy!

[–] cryptocode@lemm.ee 0 points 2 months ago

yeah I use jj daily myself and for the most part am very happy with it. I still find xit to be a interesting take - been driving it for a day and it seems solid.

 

From the README:

You're looking at xit, a new version control system. Here be dragons, as they say. This is new and unstable software. Maybe one day it will be a worthy successor to git, but for now, only use it if you're adventurous. Here are the main features:

  • git compatible
    • supports the git networking protocol for push/fetch/clone
    • read more about git compatibility
  • combine snapshot-based and patch-based version control
    • merging and cherry-picking uses patches like Darcs and Pijul
    • restoring files and anything sent over the network uses snapshots like git
    • read more about snapshots vs patches
  • built-in TUI
    • all functionality will be exposed via the TUI
    • for now though, it only shows log and status...baby steps!
    • read more about the TUI
  • store large/binary files efficiently
    • uses a modern chunking algorithm (FastCDC) to deltify large files
    • doesn't compress binary files...it has no benefit and can even make them larger
    • read more about chunking
  • universal undo
    • any change to the repo can be cleanly undone
    • this feature is still under development, so it's not available yet
    • read more about the immutable database
  • clean implementation
    • uses no third-party libraries in production...all bugs are our bugs
    • can be easily used as a library in other projects
    • contains a reuseable git implementation in pure Zig
    • read more about xit's internals and using xit as a library
 

From the README:

A Breakout-clone written in Zig.

You can play the web build here: https://arvidsson.io/project-zball.html

 

Tween is a lerp/tween library written in Zig by game developer Mason Remaley*___*

[–] cryptocode@lemm.ee 1 points 3 months ago

Yep, it's a good one and one to follow :)

[–] cryptocode@lemm.ee 2 points 3 months ago

Good memories of Turbo Pascal 5.5 ;)

[–] cryptocode@lemm.ee 1 points 3 months ago (2 children)

Dunno, I was just summarizing and linking the article. What is not mentioned in the article is Zig's upcoming incremental compilation which is bonkers fast. Either way I'll follow this effort with great interest.

[–] cryptocode@lemm.ee 2 points 1 year ago

It appears to be inspired by Redis, but not an API-compatible replacement

[–] cryptocode@lemm.ee 1 points 1 year ago

This looks great!

view more: next ›