Stream: contributing

Topic: where to contribute next?


view this post on Zulip Fabian Schmalzried (Sep 29 2025 at 09:15):

Hey, I'd like to contribute more over the next few weeks. What would be the best way to do that so that we have a working interpreter for AoC?

view this post on Zulip Anton (Sep 29 2025 at 09:16):

Thanks Fabian, how familiar are you with zig?

view this post on Zulip Fabian Schmalzried (Sep 29 2025 at 09:20):

I did ziglings and a few small changes in the compiler. So enough to be dangerous? But I also want to use this as a learning opportunity.

view this post on Zulip Anton (Sep 29 2025 at 09:24):

How do you feel about helping out investigating this general protection fault on the branch upgrade-to-zig-0.15.1:
GeneralProtectionFault.txt

view this post on Zulip Fabian Schmalzried (Sep 29 2025 at 09:32):

Looks challenging, I like it. But no promises I manage to find anything.

view this post on Zulip Anton (Sep 29 2025 at 09:33):

:+1: No promises expected :p

view this post on Zulip Fabian Schmalzried (Sep 30 2025 at 08:55):

I had a quick look at this, but I'm not 100% sure what the problem is exactly. Something with the changes to the Reader and Writer in 0.15.1. Maybe it would make sense to completely move the new ones? Would be a bit of work, but I think it should be done anyway? I will try it out if that fixes it.

view this post on Zulip Anton (Sep 30 2025 at 09:08):

to completely move the new ones

What do you mean exactly?

view this post on Zulip Richard Feldman (Sep 30 2025 at 11:23):

I assume typo - "completely move to the new ones?" :smiley:

view this post on Zulip Fabian Schmalzried (Sep 30 2025 at 11:27):

Richard Feldman said:

I assume typo - "completely move to the new ones?" :smiley:

Yes typo. I thought maybe removing std.io.AnyWriter in favor of std.Io.Writer might help. But I'm not sure anymore. Now I think it's something with zstd.

view this post on Zulip Anton (Sep 30 2025 at 11:58):

I thought maybe removing std.io.AnyWriter in favor of std.Io.Writer might help.

Yeah that may be a good idea to clean things up.

view this post on Zulip Anton (Sep 30 2025 at 13:36):

removing std.io.AnyWriter in favor of std.Io.Writer

I'm going to take care of the merge conflicts on that branch and update to std.Io.Writer after.

view this post on Zulip Anton (Sep 30 2025 at 17:48):

The merge is done (and pushed), I will get on std.io.AnyWriter tomorrow.
The merged code still shows the "General protection exception" by the way.

view this post on Zulip Anton (Sep 30 2025 at 17:49):

The writergate struggle is real :p

view this post on Zulip Fabian Schmalzried (Sep 30 2025 at 21:56):

yeah it's a big change in 0.15.1. I think the CompressingHashWriter will be the biggest rework to support the new API. But there is std.io.Hashed, which could be used together with an CompressingWriter to get an CompressingHashWriter again.

view this post on Zulip Luke Boswell (Sep 30 2025 at 23:35):

I appreciate all the work @Isaac Van Doren and @Anton have been doing getting us up to 0.15 -- looking forward to using the dev backend for x64 :smiley:

view this post on Zulip Anton (Oct 01 2025 at 18:18):

I updated all the deprecated writer/reader things and eventually got all of zig build test to pass on my machine :tada:

view this post on Zulip Anton (Oct 01 2025 at 18:19):

Let's see what CI says...

view this post on Zulip Anton (Oct 01 2025 at 18:21):

Ok, cross-compiling and playground tests don't work but progress was made :p

view this post on Zulip Fabian Schmalzried (Oct 02 2025 at 14:24):

I see that the playground wasm is broken now. I can go and try to fix that.

view this post on Zulip Fabian Schmalzried (Oct 02 2025 at 22:00):

I fixed the playground on my fork. https://github.com/FabHof/roc/tree/upgrade-to-zig-0.15.1
Feel free to pull this in, or I create a PR

view this post on Zulip Richard Feldman (Oct 02 2025 at 22:10):

PR would be great, thank you! :smiley:

view this post on Zulip Fabian Schmalzried (Oct 02 2025 at 22:12):

#8260

view this post on Zulip Fabian Schmalzried (Oct 02 2025 at 22:15):

but roc build still does not work. But it looks like there is a mismatch between the zig_llvm.h and the builder.zig.

view this post on Zulip Brendan Hansknecht (Oct 04 2025 at 20:31):

I wonder what roc will see for compilation speed improvements with 0.15.1:
https://x.com/mitchellh/status/1974240007193047063?t=CTLqDlNDaQGhG1DJVMuELA&s=19

view this post on Zulip Anton (Oct 05 2025 at 04:33):

Very nice, I'm a little busy now but I can check later, zig build roc and zig build work on upgrade-to-zig-0.15.1 . I have not checked the last merged commit, but 0b1fdb5c82008695bacc3c89c6b3e3cfb44b6824 should work.

view this post on Zulip Fabian Schmalzried (Oct 05 2025 at 13:41):

Simple time time zig build roc on my slow machine:
main:

real    1m5,361s
user    1m21,896s
sys     0m8,542s

upgrade-to-zig-0.15.1:

real    0m24,207s
user    0m50,877s
sys     0m7,206s

view this post on Zulip Richard Feldman (Oct 05 2025 at 14:24):

is that an x86-64 machine?

view this post on Zulip Fabian Schmalzried (Oct 05 2025 at 15:14):

yes: Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz

view this post on Zulip Brendan Hansknecht (Oct 05 2025 at 19:55):

Nice. More than 2x

view this post on Zulip Richard Feldman (Oct 09 2025 at 12:15):

what's still needed before we can land the 0.15.1 upgrade?

view this post on Zulip Fabian Schmalzried (Oct 09 2025 at 12:18):

Looks like nothing changes sind ny PR, so roc build probably still fails with an error, that is connected to changes in the zig_llvm.h, if I remember correctly. But I don't understand what those changes are supposed to do, so I didn't feel qualified to fix it.

view this post on Zulip Anton (Oct 10 2025 at 07:57):

I can get back on that next week

view this post on Zulip Anton (Oct 19 2025 at 11:55):

We are on zig 0.15.2 now, I did not wait for someone else to review, because this branch was accumulating merge conflicts all the time. Shoutouts to @Isaac Van Doren, @Fabian Schmalzried and gpt5-codex-high :robot:

view this post on Zulip Brendan Hansknecht (Oct 20 2025 at 02:30):

Just updated the fuzz repo to 0.15.2. Running now, but I think it should all be good and fuzzing should keep running!

view this post on Zulip Luke Boswell (Oct 20 2025 at 02:41):

I'm working on that where clause fuzz crash rn

view this post on Zulip Anton (Oct 20 2025 at 09:12):

We are on zig 0.15.2 now

Some common changes to the codebase with zig 15:

const stderr = std.io.getStdErr().writer();
try stderr.print("...\n", .{bool_type_idx});

After:

var stderr_buffer: [256]u8 = undefined;
var stderr_writer = std.fs.File.stderr().writer(&stderr_buffer);
const stderr = &stderr_writer.interface;
try stderr.print("...\n", .{bool_type_idx});
try stderr.flush();

view this post on Zulip Fabian Schmalzried (Oct 20 2025 at 10:57):

build.zig.zon has still .minimum_zig_version = "0.15.1",. Is that on purpose?

view this post on Zulip Anton (Oct 20 2025 at 11:11):

No it was not, feel free to change it if you'd like to get in the commit under your name.


Last updated: Oct 20 2025 at 12:16 UTC