sjb3d,
@sjb3d@mastodon.gamedev.place avatar

The experiments continue, still very much liking it.

Dropping random C/C++ files in the build and having it just work is great.

Only minor issue I hit so far is missing syntax to make a slice from a single-item pointer (like slice::from_ref in Rust), but looks like this is getting fixed for 0.12 (https://github.com/ziglang/zig/issues/16075). And can work around in 0.11 with some comptime trickery.

mlugg,

@sjb3d just so you know, you can do that in 0.11, it's just clunky - the coercion *T -> *[1]T is allowed, and of course *[1]T -> []T is too, it's just that coercability in Zig isn't quite transitive. So if you write @as@fosstodon.org(*[1]T, my_ptr) where a []T is expected it'll work!

sjb3d,
@sjb3d@mastodon.gamedev.place avatar

@mlugg ah good to know, thanks!

  • All
  • Subscribed
  • Moderated
  • Favorites
  • zig
  • DreamBathrooms
  • mdbf
  • ngwrru68w68
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • osvaldo12
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • InstantRegret
  • tacticalgear
  • anitta
  • ethstaker
  • provamag3
  • cisconetworking
  • tester
  • GTA5RPClips
  • cubers
  • everett
  • modclub
  • megavids
  • normalnudes
  • Leos
  • JUstTest
  • lostlight
  • All magazines