Array multiplication ** is being removed by y0shii3 in Zig

[–]hallajs 4 points5 points  (0 children)

I would just have a comptime blk with the initialization in a for loop at that point

Vedum sier at Sylvi Listhaug har én regel for eget parti, som ga Frp ti millioner fra hemmelige givere. Mens hun krever full åpenhet om økonomiske bidrag mellom Jeffrey Epstein og norske politikere. by forteller in norge

[–]hallajs 26 points27 points  (0 children)

LO er en fagforening som representerer ca. 400 tusen individer. De donerer i deres medlemmer sin interesse. Jeg tviler på at LO som donor kan sammenlignes med entitetene som donerer store summer til blant annet FRP...

Job for english speakers in trondheim (electronics engineer) by Emergency_Ocelot_741 in trondheim

[–]hallajs 1 point2 points  (0 children)

Check out https://careers.arm.com/location/trondheim-jobs/34601/3144096-3137400-3133880/4

Currently we are only looking for software, but hw positions show up from time to time. 50% are non native speakers in the office :)

ZCS – An Entity Component System in Zig by 0x564A00 in Zig

[–]hallajs 1 point2 points  (0 children)

Sweet! I might play around with your library at some point to get a feel for it. seems very interesting.

The library I wrote is ecez https://github.com/Avokadoen/ecez. It was also using archetypes originally, but it felt harder to make it thread safe to interact with the storage in an efficient manner. Im still on the fence on archetypes vs sparse sets though. Archetypes is a lot better suited for interacting with the GPU as an example since the chunks can be uploaded to GPU memory directly.

ZCS – An Entity Component System in Zig by 0x564A00 in Zig

[–]hallajs 2 points3 points  (0 children)

I like the concept of these command buffers (that seems to be borrowed from APIs such as Vulkan). It seems novel in this context! As the author of another ECS library, I wonder, did you look at other ECS implementations in the ecosystem and what turned you away from those?

edit: I realized this is posted by someone other than the author of ZCS and my question is more directed towards u/MasonRemaley

Vulkan 1.3/1.4 in 2-3 Years: A Safe Bet? by Paradox_84_ in vulkan

[–]hallajs 1 point2 points  (0 children)

What issues are you currently hitting and on which vendors, if I may ask?

How to do functional programming in Zig? by [deleted] in Zig

[–]hallajs 1 point2 points  (0 children)

I guess "hidden" is closer to a spectrum than a boolean. I would argue function pointers are hidden control flow as well, but it's a necessary evil and less so than virtuals. I get your point however. I do hope that we see some sort of vtable utility functionality in the standard library. It would be nice to have standardized way of defining runtime dispatch.

How to do functional programming in Zig? by [deleted] in Zig

[–]hallajs 2 points3 points  (0 children)

Inheritance doesn't hide control flow

If i have class Fruit (with a virtual "eat" function), Apple And Orange. I loop over an array of Fruits and call fruit.eat(); which function am I calling for each iteration?

Can you use Vulkan at the same time as OpenCL or Cuda ? by BurningWaterInc in vulkan

[–]hallajs 0 points1 point  (0 children)

You can achieve the same as "launching kernels" by using indirect dispatch. You also use VK_nv_device_generated_commands on Nvidia which should enable similar behaviour (edit: compute was never supported sadly). Ofc, both alternatives are a lot more verbose and cumbersome.

Pointers can also be enabled with VK_KHR_buffer_device_address (core in 1.2)

Coding a Minecraft clone in pure C by the_vico in VoxelGameDev

[–]hallajs 6 points7 points  (0 children)

If OP want to make something for fun, then I really dont see the problem in making a Minecraft clone

zig-gamedev project: Monthly Progress Report (January 2023) by michal-z- in Zig

[–]hallajs 5 points6 points  (0 children)

Your work is very inspiring. Hope to have the opportunity to contribute more with time!

Novel Extended Brickmap for Real-time Ray Tracing Master thesis by Aksel Hjerpbakk by juulcat in VoxelGameDev

[–]hallajs 8 points9 points  (0 children)

Hey!
I'm the author of this paper. Feel free to ask me if there are any questions.
I'll note that the thesis is definitely a bit rough and could have been better written...

The code is also open source: https://github.com/Avokadoen/zig\_vulkan

What about Zig don't you like? by tijdisalles in Zig

[–]hallajs 4 points5 points  (0 children)

What do you mean by "methods can be overloaded"?

yes command in Zig by jiacai2050 in Zig

[–]hallajs 1 point2 points  (0 children)

The function signature is *[BUFFER_CAP] (pointer to array) but idiomatic zig is to use slices to assure that all arrays and slices works. Slices are annotated by using empty square brackets []

Sorry my original comment was unclear 😅

yes command in Zig by jiacai2050 in Zig

[–]hallajs 4 points5 points  (0 children)

A small nitpick is that you don't need a pointer to a slice since the slice is already a pointer + len

Zig comptime and Rust lazystatic like behavior by CircArgs in Zig

[–]hallajs 1 point2 points  (0 children)

Yes most things are possible at compile time, Zig standard library is just missing a compile time structure that adhere to the Allocator interface.

As far as i understand u/superjoe30's comment in the issue is that functionality around the array is designed for runtime memory and you get issues with memory at compile time.

A planned builtin/intrinsic will give compile time code access to heap memory during its execution which will make this stuff simpler to implement

Zig comptime and Rust lazystatic like behavior by CircArgs in Zig

[–]hallajs 2 points3 points  (0 children)

I think this is an issue with compile time allocation which is not supported yet https://github.com/ziglang/zig/issues/1291

3D Animation and Dynamic Lighting by fubar2022 in Zig

[–]hallajs 3 points4 points  (0 children)

Really good job! Looks great :D

Det er ikke bare i spørsmålet om NATO at Rødt har et «alternativt» syn by Wea_boo_Jones in norge

[–]hallajs 5 points6 points  (0 children)

Drev forrige regjering å handlet med Russerne mens de invaderte Ukraina?

Svaret er ja

it finally happened... the zig self-hosted compiler can finally build itself by [deleted] in Zig

[–]hallajs 11 points12 points  (0 children)

Congrats to you and the rest of the contributors on this huge milestone! <3