Discussion
Loading...

#Tag

  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Hacker News
@h4ckernews@mastodon.social  ·  activity timestamp 3 days ago

Disassembling terabytes of random data with Zig and Capstone to prove a point

https://jstrieb.github.io/posts/random-instructions/

#HackerNews #Disassembling #terabytes #of #random #data #with #Zig #and #Capstone #to #prove #a #point

Zig #Capstone #DataAnalysis #RandomData #Disassembly

Disassembling Terabytes of Random Data with Zig and Capstone to Prove a Point

We go on a journey of discovery to prove my friend wrong (he has a PhD). We learn that ARM instructions are more common than DEFLATE data in random streams.
  • Copy link
  • Flag this post
  • Block
Paweł Świątkowski
@katafrakt@ruby.social  ·  activity timestamp 4 days ago

Thanks to @glitchcake my benchmark/example for #Ruby extension with #Zig is now updated for Zig 0.15.2:

https://github.com/katafrakt/zig-ruby

  • Copy link
  • Flag this post
  • Block
Hacker News
@h4ckernews@mastodon.social  ·  activity timestamp 5 days ago

Zig / C++ Interop

https://tuple.app/blog/zig-cpp-interop

#HackerNews #Zig #C++ #Interop #Programming #Languages #Developer #Tools #Tech #News

Tuple

Zig / C++ Interop

Learn how we use macros to make it less painful to use Zig structs in C++ (and vice versa)
  • Copy link
  • Flag this post
  • Block
glitchcake⚡🍰🇵🇸
@glitchcake@tech.lgbt  ·  activity timestamp 7 days ago

@katafrakt I've updated your zig-ruby example to Zig 0.15.2. I don't use github but the code is here if you are interested: https://codeberg.org/glitchcake/zig-ruby-extension

#zig #ruby #ZigLang

  • Copy link
  • Flag this post
  • Block
Hacker News
@h4ckernews@mastodon.social  ·  activity timestamp last week

Zig is so cool, C is cooler

https://github.com/little-book-of/c/blob/main/articles/zig-is-cool-c-is-cooler.md

#HackerNews #Zig #C #Programming #Coolness #HackerNews

  • Copy link
  • Flag this post
  • Block
Hacker News
@h4ckernews@mastodon.social  ·  activity timestamp last week

Why is Zig so Cool?

https://nilostolte.github.io/tech/articles/ZigCool.html

#HackerNews #Zig #Cool #Programming #Language #Zig #Language #Hacker #News #Tech #Community

  • Copy link
  • Flag this post
  • Block
Hacker News
@h4ckernews@mastodon.social  ·  activity timestamp last week

My Experience of building Bytebeat player in Zig

https://blog.karanjanthe.me/posts/zig-beat/

#HackerNews #Bytebeat #Zig #Experience #Building #Player #Coding #MusicTech

  • Copy link
  • Flag this post
  • Block
Hacker News
@h4ckernews@mastodon.social  ·  activity timestamp 2 weeks ago

Async/Await is finally back in Zig

https://charlesfonseca.substack.com/p/asyncawait-is-finally-back-in-zig

#HackerNews #AsyncAwait #Zig #Programming #Language #ModernDevelopment

Async/Await is finally back in Zig

What changed, why it matters, and how to use the new API.
  • Copy link
  • Flag this post
  • Block
just small circles 🕊 boosted
Karsten Schmidt
@toxi@mastodon.thi.ng  ·  activity timestamp 2 weeks ago

This week I've been rewriting (in Zig) the position-based dynamics & cellular-automata engines used for the cloth sim in my #DANZA art project (check the hashtag for older WIP)... Still endless tweaking, but could already stare at this beauty for hours, literally!

(And of course, I'm also again "dogfooding" http://thi.ng/genart-api for defining/handling parameters and animation timing...)

#GenerativeArt #AlgorithmicArt #CellularAutomata #Physics #Simulation #GenArtAPI #Zig #WASM #WebAssembly #NoAI

thi.ng/genart-api

Platform independent API for browser-based algorithmic/generative/procedural art

Your browser does not support the video tag.
GIF
GIF
Screen recording of dozens of colorful pieces of cloth (2D physics sim, driven by agents) floating in an otherwise blank space. Each piece of "cloth" has its own color, only consists of thousands of dots connected by invisible springs and has an animated texture (2D cellular automata)
Screen recording of dozens of colorful pieces of cloth (2D physics sim, driven by agents) floating in an otherwise blank space. Each piece of "cloth" has its own color, only consists of thousands of dots connected by invisible springs and has an animated texture (2D cellular automata)
  • Copy link
  • Flag this post
  • Block
Karsten Schmidt
@toxi@mastodon.thi.ng  ·  activity timestamp 2 weeks ago

This week I've been rewriting (in Zig) the position-based dynamics & cellular-automata engines used for the cloth sim in my #DANZA art project (check the hashtag for older WIP)... Still endless tweaking, but could already stare at this beauty for hours, literally!

(And of course, I'm also again "dogfooding" http://thi.ng/genart-api for defining/handling parameters and animation timing...)

#GenerativeArt #AlgorithmicArt #CellularAutomata #Physics #Simulation #GenArtAPI #Zig #WASM #WebAssembly #NoAI

thi.ng/genart-api

Platform independent API for browser-based algorithmic/generative/procedural art

Your browser does not support the video tag.
GIF
GIF
Screen recording of dozens of colorful pieces of cloth (2D physics sim, driven by agents) floating in an otherwise blank space. Each piece of "cloth" has its own color, only consists of thousands of dots connected by invisible springs and has an animated texture (2D cellular automata)
Screen recording of dozens of colorful pieces of cloth (2D physics sim, driven by agents) floating in an otherwise blank space. Each piece of "cloth" has its own color, only consists of thousands of dots connected by invisible springs and has an animated texture (2D cellular automata)
  • Copy link
  • Flag this post
  • Block
Jan :rust: :ferris: boosted
jbz
@jbz@indieweb.social  ·  activity timestamp 3 weeks ago

😉 RIIZ

「 From a performance perspective, I didn’t want TigerBeetle to be fearlessly multithreaded. Transaction processing workloads tend to have inherent contention, even to the point of power law, precluding partitioning and necessitating a single-threaded architecture. Therefore, Rust’s borrow checker, while a phenomenal tool for the class of problems it targets, made less sense for TigerBeetle 」

https://tigerbeetle.com/blog/2025-10-25-synadia-and-tigerbeetle-pledge-512k-to-the-zig-software-foundation/

#zig #ziglang #rust

Synadia and TigerBeetle Pledge $512,000 to the Zig Software Foundation

Insights, updates, and technical deep dives on building a high-performance financial transactions database.
  • Copy link
  • Flag this post
  • Block
jbz
@jbz@indieweb.social  ·  activity timestamp 3 weeks ago

😉 RIIZ

「 From a performance perspective, I didn’t want TigerBeetle to be fearlessly multithreaded. Transaction processing workloads tend to have inherent contention, even to the point of power law, precluding partitioning and necessitating a single-threaded architecture. Therefore, Rust’s borrow checker, while a phenomenal tool for the class of problems it targets, made less sense for TigerBeetle 」

https://tigerbeetle.com/blog/2025-10-25-synadia-and-tigerbeetle-pledge-512k-to-the-zig-software-foundation/

#zig #ziglang #rust

Synadia and TigerBeetle Pledge $512,000 to the Zig Software Foundation

Insights, updates, and technical deep dives on building a high-performance financial transactions database.
  • Copy link
  • Flag this post
  • Block
Hacker News
@h4ckernews@mastodon.social  ·  activity timestamp 3 weeks ago

How I turned Zig into my favorite language to write network programs in

https://lalinsky.com/2025/10/26/zio-async-io-for-zig.html

#HackerNews #Zig #Programming #Network #Programming #Language #Learning #Zig #Async #IO

Lukáš Lalinský

How I turned Zig into my favorite language to write network programs in

I’ve been watching the Zig language for a while now, given that it was created for writing audio software (low-level, no allocations, real time). I never paid too much attention though, it seemed a little weird to me and I didn’t see the real need. Then I saw a post from Andrew Kelley (creator of the language) on Hacker News, about how he reimplemented my Chromaprint algorithm in Zig, and that got me really interested.
  • Copy link
  • Flag this post
  • Block
Stéphane Bortzmeyer
@bortzmeyer@mastodon.gougere.fr  ·  activity timestamp 3 weeks ago

« abcdesktop.io - K8s VDI solution » par Alexandre Devely

VDI : si j'ai bien compris, il s'agit de lire une vidéo dans un container Kubernetes et de la faire afficher dans un navigateur.

https://www.abcdesktop.io/

#FRnog

Stéphane Bortzmeyer
@bortzmeyer@mastodon.gougere.fr replied  ·  activity timestamp 3 weeks ago

« ZML: model to metal » par
Steeve Morin

Première mention de #Zig à FRnog ! On veut faire de l'inférence avec un LLM, on programme une application en Zig et c'est compilé vers, par exemple, du nVidia CUDA.

Un concurrent de PyTorch, alors ?

https://github.com/zml/zml

#FRnog

GitHub

GitHub - zml/zml: Any model. Any hardware. Zero compromise. Built with @ziglang / @openxla / MLIR / @bazelbuild

Any model. Any hardware. Zero compromise. Built with @ziglang / @openxla / MLIR / @bazelbuild - zml/zml
  • Copy link
  • Flag this comment
  • Block
just small circles 🕊 boosted
Karsten Schmidt
@toxi@mastodon.thi.ng  ·  activity timestamp 2 months ago

After almost a week of refactoring and experimenting with several different approaches, I've updated my Zig nD SIMD vector library to be compatible with the latest Zig 0.15.1, and at the same time cleaned up some internals.

The solution I settled on is a mix of techniques proposed by others, and was needed due to the removal of the struct/namespace-merging syntax in the new Zig version, which this library heavily relies on. I don't like that the new source code is now more than 2x larger and involves a huge amount of duplication to address the many special cases of supported operations for different vector sizes and types. I might still take another pass to eliminate those (by using @compileError() for unsupported cases), but that'd be an implementation detail downstream users don't have to care about. I tried AOT code generation as well, but the special case handling made this feel less maintainable...

UPDATE: The only breaking change is the handling of vector swizzles. I had to remove the hundreds of named swizzle functions and replaced them with a single (comptime optimized) .swizzle(vec, pattern), e.g. .swizzle(vec, "xxyy")...

If you're interested, the new code is here:
https://github.com/thi-ng/zig-thing/blob/main/src/vectors.zig

The readme contains details about the many supported operations:
https://github.com/thi-ng/zig-thing/blob/main/doc/vectors.md

Installation instructions in the main repo readme:
https://github.com/thi-ng/zig-thing/tree/main

#Zig#Ziglang#ZigThing#Vectors#Refactoring

  • Copy link
  • Flag this post
  • Block
Karsten Schmidt
@toxi@mastodon.thi.ng  ·  activity timestamp 2 months ago

After almost a week of refactoring and experimenting with several different approaches, I've updated my Zig nD SIMD vector library to be compatible with the latest Zig 0.15.1, and at the same time cleaned up some internals.

The solution I settled on is a mix of techniques proposed by others, and was needed due to the removal of the struct/namespace-merging syntax in the new Zig version, which this library heavily relies on. I don't like that the new source code is now more than 2x larger and involves a huge amount of duplication to address the many special cases of supported operations for different vector sizes and types. I might still take another pass to eliminate those (by using @compileError() for unsupported cases), but that'd be an implementation detail downstream users don't have to care about. I tried AOT code generation as well, but the special case handling made this feel less maintainable...

UPDATE: The only breaking change is the handling of vector swizzles. I had to remove the hundreds of named swizzle functions and replaced them with a single (comptime optimized) .swizzle(vec, pattern), e.g. .swizzle(vec, "xxyy")...

If you're interested, the new code is here:
https://github.com/thi-ng/zig-thing/blob/main/src/vectors.zig

The readme contains details about the many supported operations:
https://github.com/thi-ng/zig-thing/blob/main/doc/vectors.md

Installation instructions in the main repo readme:
https://github.com/thi-ng/zig-thing/tree/main

#Zig#Ziglang#ZigThing#Vectors#Refactoring

  • Copy link
  • Flag this post
  • Block
Jacket
@jacket@tech.lgbt  ·  activity timestamp 2 months ago

This is not helping me in the market but what I love doing the most is computer language engineering. I'm learning how to write an #LSP right now to support my born language in neovim. I also discovered #LLVM recently. It lets you compile to any target from a generic ASM. It made me realize something. The first languages where all compiled. Then, we got the interpreted languages. But recently, the new languages are all compiled again! Think of #rust, #go, #zig, #elixir. I wonder if it's because we perfected the tooling in a way that maintaining a compiled language is not that hard anymore. Go is a weird one. It has a garbage collector. Yeah! A compiled language with a garbage collector. It means that there is a process that is embedded in the executable to just do garbage collection. We might now have a real reason anymore to interpret.

  • Copy link
  • Flag this post
  • Block
just small circles 🕊 boosted
Karsten Schmidt
@toxi@mastodon.thi.ng  ·  activity timestamp 2 months ago

Yesterday I released new versions of https://thi.ng/wasm-api (and its add-on packages), a modular and extensible bridge API & toolchain for hybrid JS/TS/Zig/WebAssembly apps, now updated to be compatible with the latest Zig version 0.15.1...

The update addresses some of Zig's breaking syntax & build system changes only, nothing on the JS/TS side has changed. As a result https://thi.ng/wasm-api-dom has a slightly revised internal structure (also a breaking change, but nothing major & unavoidable). All bundled Zig examples[1] in the repo have been updated too, take a look for reference (if needed).

FYI More details about the Zig language changes here:
https://ziglang.org/download/0.15.1/release-notes.html#Language-Changes

Specifically, the removal of usingnamespace has had a major impact on the existing handling of generated types in these wasm-api support packages (or your own) and now forces an additional level of hierarchy in terms of namespacing. This is because usingnamespace enabled a form of namespace merging, which allowed the generated WASM⭤TS interop types (written to their own sourcefile) to be merged/hoisted into the main library module.

For example, previously after importing const dom = @import("wasm-api-dom"); we could refer to a type via dom.WindowInfo. Now with namespace merging removed, we have to use dom.types.WindowInfo. As I said, it's not a major departure, but a breaking change nonetheless[2]...

The build.zig file bundled with https://thi.ng/wasm-api is now also only compatible with Zig 0.15.1 (for now). Build files for older Zig versions are still included too (in the same directory)[3].

Lastly, once more for the record: The wasm-api bridge itself is NOT tied to Zig (or a particular version), however it's the main use case/language for my own WebAssembly use cases...

[1] https://github.com/thi-ng/umbrella/tree/develop/examples (all examples starting with zig-*)

[2] The existing design of these modules helped to keep these breaking changes to a minimum in userland code and these updates are all following the same uniform pattern (i.e. exposing interop types via modulename.types.TypeName...)

[3] https://github.com/thi-ng/umbrella/tree/develop/packages/wasm-api#using-the-zig-build-system

#ThingUmbrella#Zig#Ziglang#WebAssembly#WASM#TypeScript#JavaScript#Interop

  • Copy link
  • Flag this post
  • Block
Karsten Schmidt
@toxi@mastodon.thi.ng  ·  activity timestamp 2 months ago

Yesterday I released new versions of https://thi.ng/wasm-api (and its add-on packages), a modular and extensible bridge API & toolchain for hybrid JS/TS/Zig/WebAssembly apps, now updated to be compatible with the latest Zig version 0.15.1...

The update addresses some of Zig's breaking syntax & build system changes only, nothing on the JS/TS side has changed. As a result https://thi.ng/wasm-api-dom has a slightly revised internal structure (also a breaking change, but nothing major & unavoidable). All bundled Zig examples[1] in the repo have been updated too, take a look for reference (if needed).

FYI More details about the Zig language changes here:
https://ziglang.org/download/0.15.1/release-notes.html#Language-Changes

Specifically, the removal of usingnamespace has had a major impact on the existing handling of generated types in these wasm-api support packages (or your own) and now forces an additional level of hierarchy in terms of namespacing. This is because usingnamespace enabled a form of namespace merging, which allowed the generated WASM⭤TS interop types (written to their own sourcefile) to be merged/hoisted into the main library module.

For example, previously after importing const dom = @import("wasm-api-dom"); we could refer to a type via dom.WindowInfo. Now with namespace merging removed, we have to use dom.types.WindowInfo. As I said, it's not a major departure, but a breaking change nonetheless[2]...

The build.zig file bundled with https://thi.ng/wasm-api is now also only compatible with Zig 0.15.1 (for now). Build files for older Zig versions are still included too (in the same directory)[3].

Lastly, once more for the record: The wasm-api bridge itself is NOT tied to Zig (or a particular version), however it's the main use case/language for my own WebAssembly use cases...

[1] https://github.com/thi-ng/umbrella/tree/develop/examples (all examples starting with zig-*)

[2] The existing design of these modules helped to keep these breaking changes to a minimum in userland code and these updates are all following the same uniform pattern (i.e. exposing interop types via modulename.types.TypeName...)

[3] https://github.com/thi-ng/umbrella/tree/develop/packages/wasm-api#using-the-zig-build-system

#ThingUmbrella#Zig#Ziglang#WebAssembly#WASM#TypeScript#JavaScript#Interop

  • Copy link
  • Flag this post
  • Block
alcinnz boosted
Igor Stojković
@driggy@mastodon.gamedev.place  ·  activity timestamp 3 months ago
@codingcoyote @alcinnz #csharp for business and #zig for playing around. All around, the best one will be the one I write one day, of course 🙂
  • Copy link
  • Flag this post
  • Block
Log in

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.0 no JS en
Automatic federation enabled
  • Explore
  • About
  • Members
  • Code of Conduct
Home
Login