ChanServ changed the topic of #zig to: zig programming language | https://ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
zags has quit [Ping timeout: 246 seconds]
<mikdusan1> re building with 6GB of ram; comparing two 'zig0' ... one (and it's llvm deps) built with Release vs MinSizeRel. I didn't expect it to impact max-RSS but on macos:
<mikdusan1> 7142372 KB vs 6167180 KB, respectively
<mikdusan1> and watching Activity Monitor.app, "memory" maxes out at 5.98 GiB vs 5.44 GiB, respectively
<mikdusan1> but big penalty in performance. 51 seconds vs over 3 minutes
<mikdusan1> is it enough to help? doubt it.
lunamn has quit [Read error: Connection reset by peer]
ave_ has quit [Remote host closed the connection]
linuxgemini has quit [Read error: Connection reset by peer]
nvmd has quit [Quit: Later nerds.]
Swahili has quit []
<v0idify> mikdusan1, did you send another message?
<mikdusan1> nope
<v0idify> why the : though
<v0idify> or maybe i didn't get something
<mikdusan1> ah 1 sec
<v0idify> mikdusan1, good to know, so -O ReleaseSmall or -Drelease-small ? i'll try it later
<v0idify> thanks!
<v0idify> honestly i just want to try it out so if I can get my hands on an x86_64 linux binary..
<mikdusan1> it's a cmake thing. so involves rebuilding llvm+clang+lld as `-DCMAKE_BUILD_TYPE=Release` vs `-DCMAKE_BUILD_TYPE=MinSizeRel`
<mikdusan1> but not clear it really will help
<v0idify> ok
mikdusan2 has joined #zig
mikdusan1 has quit [Ping timeout: 264 seconds]
CommunistWolf has quit [Ping timeout: 240 seconds]
osa1 has quit [Ping timeout: 265 seconds]
CommunistWolf has joined #zig
gazler has joined #zig
gazler_ has quit [Ping timeout: 246 seconds]
mikdusan2 has quit [Read error: Connection reset by peer]
mikdusan2 has joined #zig
xackus has joined #zig
xackus_ has quit [Ping timeout: 256 seconds]
_whitelogger has joined #zig
terinjokes has quit [Quit: ZNC 1.8.1 - https://znc.in]
terinjokes has joined #zig
<andrewrk> got all the stage2 test cases passing in ast-memory-layout branch :) now it's just finishing zig fmt
<v0idify> andrewrk, i haven't followed, what is this branch about? sounds cool
<andrewrk> if you scroll through some of the comments there are a few benchmarks
<v0idify> ooh benchmarks
<andrewrk> I'm about to have some fun doing a silly benchmark of 1 million print() calls :)
<v0idify> fun fun fun
<andrewrk> 20,390 lines added, −17,148 lines deleted, and it took all of 30 minutes to debug the 4 regressions in the stage2 test cases
<andrewrk> this is the magic of zig
<v0idify> the secret sauce
<v0idify> why does compiling stage2 have a -Denable-llvm flags? is it using llvm for some parts right now?
<v0idify> i actually got it to compile but only without the flag and it can't compile anything
<andrewrk> have a look in the test/stage2/ directory for some examples of test cases that are supported by stage2. it's not a large percent of language features
<v0idify> well I meant that it literally would fail instantly with "no entry point found"
<andrewrk> in answer to your other question, stage2 currently has the following backends, to varying degrees of completeness: aarch64, arm, x86_64, LLVM, C, riscv64, spirv, spu-mk2, wasm
<andrewrk> the LLVM one requires -Denable-llvm
<v0idify> how can i get it working with any backend? i assume it didn't work because it didn't have any backend?
<v0idify> any backend as in, i just want to see it compile, ideally something i can run on my machine, without llvm
<andrewrk> the behavior you are observing is it working properly, however it does not support start.zig yet, so you have to export your own _start function
<v0idify> ahh that makes sense. can I just manually import start.zig?
<v0idify> or i guess it uses language features it doesn't work with yet
<andrewrk> no because stage2 is not capable of handling it yet
<v0idify> got it
<andrewrk> you may be interested in playing with the C backend. try passing: -ofmt=c
<andrewrk> have a look at some of the supported test cases: https://github.com/ziglang/zig/blob/master/test/stage2/cbe.zig
<v0idify> very interesting, thx
ky0ko has quit [Remote host closed the connection]
marler8997 has joined #zig
<v0idify> how can i make zig fmt put if statements with many and/or in multiple lines?
<marler8997> huh, Zig has nameless tests now?
<g-w1> yep, for module wide stuff
earnestly has quit [Ping timeout: 240 seconds]
<marler8997> g-w1, I got ziget to work with schannel by the way
<marler8997> having troubles using it with zigup at the moment because "zig build" is trying to create a symlink for some reason
<andrewrk> marler8997, nameless tests are never filtered out with --test-filter, so they can be used to import other files and have --test-filter work when using zig test to discover the entire source tree
<andrewrk> v0idify, put a newline after the )
<andrewrk> v0idify, oh you mean there are `and` and `or` clauses? you can put a newline after any infix operator such as `and` and `or`
<marler8997> andrewrk, is it easy to update the windows Zig+llvm+clang binaries? they don't build since the nameless tests were added
<andrewrk> yeah sure I'll take care of that tomorrow. in the meantime the wiki lists a workaround
<marler8997> I've been spoiled by this awesome all-in-one sdk, I never want to go back to msvc
<andrewrk> I'm doing everybody's favorite benchmark, printing hello world 1 million times xD
<v0idify> I mean it's what developers will first try! it has to be as fast as possible
<andrewrk> ha! this branch takes us from 1.2s to 0.9s
<v0idify> that's actually quicker than i thought
<v0idify> what std thing is a precise timer for benchmarking?
<mikdusan2> speaking of building the Windows Zig Compiler Dev Kit, here's a repo that apparently (haven't tried it yet) walks one through building on non-windows host against
<mikdusan2> copied windows SDK headers and Visual Studio headers:
<mikdusan2> i bet this could work with `zig cc` or `zig cl` someday
<marler8997> that's great, a whole bunch of cmake files
<mikdusan2> hahah
<marler8997> challenge, translate all these cmake files to build.zig
<mikdusan2> cmake has a motto that goes something like "resistence is futile" :P
<v0idify> well zig could copy it
<marler8997> has anyone tried to build LLVM/Clang with zig cc?
<mikdusan2> sure that's what zig-bootstrap does?
<marler8997> does it work?
<mikdusan2> I assume so. I really should try it out.
<marler8997> this gives me ideas of enhancing zig to be able to autobuild llvm/clang/lld when requested by the user
<marler8997> when buildin the zig compiler to be specific
<marler8997> zig build ... Error: unable to locate LLVM, add -Dbuild-llvm to build it here
<mikdusan2> if you look at `build` in zig-bootstrap, in theory can download bin-tarball from ziglang.org and jump to line 54
<mikdusan2> well if cross-compiling you'd have to run a nested llvm/cmake to build host (native) versions of llvm-tblgen and clang-tblgen
noam has quit [Ping timeout: 240 seconds]
<andrewrk> Cadey, ^
Thalheim has quit [Ping timeout: 264 seconds]
<marler8997> Zig showtime about the techniques you used here, you're using data-oriented design techniques if I recall yes?
vktec has joined #zig
<vktec> Is there any way to return a tuple from a function?
<vktec> I can't figure out what return type to use
<andrewrk> I did a decent stream on it I think
<andrewrk> if you skip past the part where I had to reset my router
<marler8997> oh shoot, I will look that up then
a_chou has joined #zig
<andrewrk> don't be intimidated by the length, there is unrelated stuff here
<marler8997> shoot I didn't get notified about this stream
<mikdusan2> wait. whut. over 1 meeeelion lines per second. /me queues up doom3 port to .zig ... :P (sorry couldn't resist)
<v0idify> vktec, [2]type or make an anonymous struct
<vktec> v0idify: I can't pass either of those to a function expecting a tuple though
<v0idify> are we as fast as vlang yet? l0l
a_chou has quit [Client Quit]
<v0idify> vktec, what is a tuple in this context? i'm confused
<vktec> There doesn't seem to be a whole lot of documentation on them, but they're mentioned in this section of zig learn: https://ziglearn.org/chapter-1/#anonymous-structs
<v0idify> ah well, .{item, item} doesn't work?
<v0idify> that's an anonymous structs! it's anonymous structs all the way down :P
<mikdusan2> marler8997: give it a few years (or less). we'll see doom and rtcw and enemy territory ports to zig and vulkan
<vktec> But what's the type of that?
<v0idify> it's anonymous, except you define it, there's no _defined_ type
<v0idify> you can use .{} for it though
<vktec> I want to return one, so I need a type for it
<v0idify> functionThatTakesTuple(.{my, items});
<marler8997> I think you can do something like this struct { @"0": u32, @"1": []const u8 }
<marler8997> or maybe @TypeOf(.{ 0, "hello"})
<v0idify> fn func() struct { value: u32, other_value: u32 } { return .{ 1, 2 }; }
<marler8997> Maybe we should add a Tuple function to std.meta that lets' you do this Tuple(.{u32, size_t, []const u8})
<marler8997> nicer than typing struct { @"0": u32, @"1": size_t, @"2": []const u8 }
<vktec> marler8997: First one gives "array access of non-array type", second gives "type does not support array initialization"
<marler8997> I'm pretty sure I did this once before, I'll give it a try
<andrewrk> zig translate-c is pretty far along, I wonder where it gets stuck on doom
<mikdusan2> marler8997: std.meta.Tuple takes a `[]const type` does that work?
<andrewrk> I don't think anyone has tried it lately and we've seen quite a few nice contributions
<vktec> Oh there already is a std.meta.Tuple, I'll try that
<marler8997> ah, I guess someone already had my idea :)
<mikdusan2> zig is known for that ^
<vktec> Unfortunately it still gives "type does not support array initialization"
<marler8997> looks like it works if you do this: .{ .@"0" = ..., .@"1" = ... }
<marler8997> obviously that's silly, but it seems Zig thinks it's an array rather than a tuple
<marler8997> maybe zig doesn't support returning tuples from functions?
<marler8997> I think the one time I tried to do this, I may have ended up using a real struct instead, with named fields
<vktec> That seems like the simpler option at this point
<vktec> I'll just return a struct and repack it into a tuple after
<marler8997> yeah sorry it feels like something you should be able to do: fn f() Tuple(&[_]type{u32, u32}) { return .{1, 2}; }
<marler8997> I think there's a proposal out there to rework tuple/array literals a bit, maybe it applies here
<vktec> It's still significantly easier than doing this kind of thing in C :)
<vktec> So I'll take it
<marler8997> it's like you got a shiny new car and it has a smudge on it, but then you realize your old car was basically just one big smudge :)
<vktec> I've been using Zig for a total of about 4 hours, but so far it's been great :)
<marler8997> welcome vktec, it's good to have new users
<vktec> Seems very well thought out and carefully designed, which is a nice change from a lot of other languages around nowadays haha
<marler8997> yes, simplicity is one of the primary goals, checkout "zig zen" as well for what's driving the direction.
<vktec> It feels a lot like Go in that regard, except it fixes some of my more significant issues with Go
<vktec> Namely error handling, generic programming (though Go should be getting that soon) and lack of low-level control
<marler8997> yeah Go was a non-starter for me, it sacrificed too much and it's metaprogramming was weak
<marler8997> and I think it requires a runtime?
<marler8997> One of the things I like most about Zig is the tooling
<vktec> And yeah zig zen is very nice. A really nice summary of the language, and all points I wholeheartedly agree with :)
<vktec> Yeah, Go needs a pretty hefty runtime, since it includes both a GC and a scheduler
<marler8997> yeah that kinda puts it in a different category than Zig, it's just much higher level
<vktec> Yep
<marler8997> and they put it at that high level for the sake of faster development, but with Zig that difference may no longer be measurable
<marler8997> andrewrk are you looking for a big project to test the compiler perf with?
<marler8997> If so, you should try zigwin32: https://github.com/marlersoft/zigwin32
<marler8997> zig test src/win32.zig
<marler8997> it's 83 MB of zig source code
<marler8997> that's over 4 times bigger than the standard library!
<g-w1> marler8997 just looked at some of the files in api, you can replace test "" { with test {
<marler8997> sure I'll do that
<marler8997> done
proteusguy has quit [Remote host closed the connection]
osa1 has joined #zig
cole-h has quit [Ping timeout: 240 seconds]
<andrewrk> marler8997, not yet - this is stage2 so the next step before we can test that is to make stage2 support more language features
craigo_ has joined #zig
xackus_ has joined #zig
swills has quit [Ping timeout: 240 seconds]
xackus has quit [Ping timeout: 240 seconds]
swills has joined #zig
zags has joined #zig
cole-h has joined #zig
swills has quit [Ping timeout: 240 seconds]
swills has joined #zig
swills has quit [Ping timeout: 246 seconds]
swills has joined #zig
swills has quit [Ping timeout: 246 seconds]
swills has joined #zig
jokoon has joined #zig
swills has quit [Ping timeout: 240 seconds]
earnestly has joined #zig
jjido has joined #zig
hnOsmium0001 has quit [Quit: Connection closed for inactivity]
swills has joined #zig
proteusguy has joined #zig
sord937 has joined #zig
geemili has quit [Ping timeout: 260 seconds]
sord937 has quit [Quit: sord937]
zags has quit [Quit: leaving]
lunamn has joined #zig
ave_ has joined #zig
linuxgemini has joined #zig
jokoon has quit [Read error: Connection reset by peer]
<Cadey> andrewrk: oh my god that's incredible
<ikskuh> marler8997: wow, that's one big chungus
wootehfoot has joined #zig
<ifreund> that's the only person I have blocked on the zig discord so far...
<ikskuh> i am not allowed to block :D
eax has joined #zig
eax has quit [Remote host closed the connection]
eax has joined #zig
eax has quit [Remote host closed the connection]
eax has joined #zig
Thale20 has joined #zig
wootehfoot has quit [Read error: Connection reset by peer]
<Thale20> Hello everyone,
<Thale20> I started writing some software with zig, but there are some pretty fundamental things I can't really figure out with the documentation of the std library.
<Thale20> Not sure if this is a good place to ask questions?
<ifreund> this is a fine place to ask questions
<ifreund> note that the autogenerated std docs are very incomplete, it's better to just read the source code
<Thale20> Yes, I had that feeling. I think most of these would be answered easily by seing some example code too. I know the tetris example, but it is very small,
<Thale20> so I was wondering if there is some bigger zig code base that you could recommend having a look at?
<ifreund> well, the standard library qualifies I think :P
<ifreund> there's also my project (https://github.com/ifreund/river) and many others on github
<Thale20> Cool, I will hav a look at that!
<ifreund> ziglings might be a nice way to get started
jjido has quit [Quit: Connection closed for inactivity]
josias has joined #zig
vktec has quit [Quit: WeeChat 3.0.1]
klltkr has joined #zig
Snaffu has joined #zig
m4r35n357 has joined #zig
<marler8997> ikskuh yeah the Win32 api is massive
<marler8997> andrewrk I was thinking to test tokenization/parsing perf
<marler8997> it is an odd use case because it's only declarations, no actual Zig code in there
<ikskuh> heh
<ikskuh> i wonder how well "zig fmt" will work
<marler8997> My build.zig file for zigup requires that the user select an ssl backend, but that makes "zig build -h" not work without a backend selected
<marler8997> I could check whether or not the "help" is being enabled, if that's available, does this sound correct?
<ikskuh> marler8997: why does "zig build" require ssl?
<marler8997> it requires the user to select an ssl backend they want to build with
<ikskuh> yeah, so?
<ikskuh> if none is selected, error out
<marler8997> I'm now adding a new target that doesn't require an ssl backend
<ikskuh> it will allow "zig build --help"
a_chou has joined #zig
<marler8997> zig build --help doesn't work unless an ssl backend is selected now, which is not what I want
<marler8997> zig build -h should work whether or not they've specified a backend
<marler8997> is there a way to add a callback to a target just before it builds?
<marler8997> I could run the check in there
<marler8997> wait, maybe I can make these exe steps depend on a check step?
<marler8997> ooo I think I'm on to something
<ifreund> yeah custom steps are the only way to add lazy actions
<marler8997> yeah this is what I needed
m4r35n357 has quit [Quit: Ex-Chat]
xackus has joined #zig
xackus_ has quit [Ping timeout: 264 seconds]
<marler8997> I'm adding a step in my build.zig to build binaries for multiple platforms, I'm a bit confused in outputdir vs installdir
<marler8997> is output_dir supposed to be a relative dir to install prefix?
<marler8997> oh I see dest_dir, maybe that's what I want
<ifreund> what's your goal?
<marler8997> my build.zig file is building a bunch of variants of the same exe
<marler8997> for the purposes of uploadeing to github
<ifreund> ok, and you want to put them somewhere without overwriting each other?
<marler8997> yes
<ifreund> dest_dir only exists to handle the DEST_DIR environment variable often used for distro packaging
<ifreund> output dir is relative to the install prefix afaik, as you said
<marler8997> is output dir supposed to be for build or install?
<marler8997> I see .o files in it, so it seems like it's for build, but if it's relative to install prefix, then it's for install, hence the confusion
<marler8997> is it for both?
<ifreund> for build
<marler8997> ok great, that answers one question
<marler8997> in that case, it doesn't have anything to do with install prefix right?
<ifreund> yeah your're right, sorry this stuff is a bit of a mess
<ifreund> out_dir is set whatever cache directory in zig-cache the zig compiler invocation returns
<marler8997> ok that make sense with everything else
<ifreund> I don't think std/build.zig supports installing to multiple prefixes with a single invocation
<marler8997> that's fine
<marler8997> the goal is simple here, just build a bunch of exe variants
<ifreund> simplest way is probably to just give each a different name tbh
<ifreund> marler8997: oh, I think I actually implemented something that will do what you want, see LibExeObjStep.override_dest_dir
<ifreund> set that to something different for each of your binaries
<marler8997> I'm still confused about output_dir
<marler8997> it doesn't go into zig-cache
<marler8997> it looks like it goes into cwd?
<g-w1> marler8997, do you think it would be a good idea to setup a github actions to automatically compile the latest zigup and package it in github releases? I can do that if you want?
<ifreund> marler8997: output dir won't be set until the objects are built...
<marler8997> maybe but I still want to build the binaries with build.zig
<g-w1> yeah, once you have this, it would be easy to make a github action to package it i think
<marler8997> ok, so I've confirmed setOutputDir is relative to CWD
<marler8997> but I'm confused why it puts .o files in there? wouldn't those go into the cache, not the output dir?
<marler8997> I'm still unclear what Zig thinks the output dir is for, and/or the install prefix for that matter at this point
Thalheim has joined #zig
<marler8997> where does alexnask hang out? Is he here on irc or dicord?
xackus_ has joined #zig
<g-w1> sometimes here, sometimes discord, sometimes neither
<ifreund> marler8997: the output dir is where the output of zig compiler invocations go. The install dir is where these artifacts will be copied to when you do zig build install
<marler8997> I thought zig would put the output of compiler invocations in the cache
<ifreund> it does unless you tell it to do otherwise by setting out_dir
<marler8997> ah I see
<ifreund> and when it puts them in the cache it sets out_dir to whatever specific cache path was used
xackus has quit [Ping timeout: 264 seconds]
<marler8997> not the exe though, which is what is causing the problem
<marler8997> when using cache, .o files and exe files are handled different
<marler8997> when using outputdir, they are handled the same
Akuli has joined #zig
<marler8997> might be unnecessary complexity, not sure
<marler8997> in any case, I think setOutputDir will work, thanks for the help
<ifreund> no problem
<ifreund> I think the zig build system could really use a teardown and rewrite once the language is more stable tbh
<ifreund> it's quite crufty
<marler8997> yeah, it's fundamental design and features are really good. There are however some oddities that can be improved
<ifreund> agreed
<marler8997> enum value to string?
<marler8997> comptime string
<marler8997> ah @tagName
bitmapper has quit [Quit: Connection closed for inactivity]
<marler8997> I think I'll have to wait to get iguana working before releasing static prebuilt binaries of zigup, depending on openssl and trying to make that work on all distributions is going to require some "reloader" magic that I don't feel like dealing with
a_chou has quit [Remote host closed the connection]
<Thale20> What is the easiest way to read a given number of bytes from a file into a memory adress? Somehow I really struggle with the concept of slices here.
<ifreund> doesn't ikskuh have BearSSL bindings that you could use to build statically?
<Thale20> Like essentially I want to do sth like this:
<Thale20> pub fn readFloat(file: *const fs.File, result: *f32) !usize {
<Thale20>     const read = try file.reader().read(result, 4);
<Thale20>     return read;
<marler8997> ifreund...oooo, didn't know about that...will look
<Thale20> }
<Thale20> But I can't figure out how to do it in zig
<marler8997> Thale20, mmap?
<ifreund> Thale20: you can think of slices as a struct { ptr: [*]u8, len: usize }
<Thale20> can I create a slice like that? with a pointer and the length?
<ifreund> yes
<Thale20> ahh
<marler8997> so along with wolfssl, there is also bearssl
hnOsmium0001 has joined #zig
<ifreund> Thale20: my_ptr[0..my_len] will give you a slice
<marler8997> I like this convention, we should keep going, I wanna see lionssl, and walrusssl and so on
<Thale20> well except that will give me a [4]u8 and the function wants a []u8
<marler8997> Thal20, nope, my_ptr[0..my_len] give you []u8
<ifreund> well, if my_len is comptime know it will give you a *[my_len]u8 which coerces to []u8
<ifreund> *[4]u8 is a pointer to an array of 4 u8s
<marler8997> ah didn't know that
<ifreund> Thale20: you probably just need to take the address of what you're passing with & so that it will coerce
<ifreund> arrays are semantically values in Zig unlike C
<marler8997> ok going to add bearssl, my guess is it takes an hour
<ifreund> nice :)
<Thale20> ok, so this works:
<Thale20> const buffer: []u8 = @ptrCast(*[4]u8, result)[0..4];
<Thale20> but it seems a bit complicated, so not sure it is the best way to get from a *f32 to a []u8
<ifreund> *f32 is a pointer to *one* f32 semantically, you probably want [*]f32 which is a pointer to many f32s
<Thale20> well for now it is just one, the many case was probably the next step
<Thale20> but assume I jhust want to read a single float
<Thale20> in which case probably copying it after wouldnt be so bad
<Thale20> but still
<ifreund> with the function signature you pasted above, just do: return file.reader().readAll(@ptrCast(*[4]u8, result));
<Thale20> pub fn readFloats(file: *const fs.File, result: [*]f32) !usize {
<Thale20>     const buffer: []u8 = @ptrCast(*[*]u8, result)[0..4*result.len];
<Thale20>     const reader = file.reader();
<Thale20>     const read = reader.read(buffer);
<Thale20>     return try read;
<Thale20> }
<Thale20> This would be the multiple version, correct?
<ifreund> for multiple: fn readFloats(file: fs.File, result: []f32) !void { return file.reader.readAll(std.mem.sliceAsBytes(result)); }
<Thale20> cool, thanks!
Swahili has joined #zig
Thale20 has quit [Quit: Connection closed]
bitmapper has joined #zig
eax has quit [Quit: eax]
<marler8997> anyone familair with bearssl online that can explain to me the lifetime of a couple things?
<marler8997> ikskuh you're not available are you?
<ikskuh> here
<ikskuh> i can try :D
<marler8997> so i've got a stream that references Client, I assume client needs to outlive stream
<marler8997> does the engine passed into Client.init need to outlive Client as well?
<ikskuh> yeah
<ikskuh> lifetimes are nested
<ikskuh> yes
<marler8997> ok thanks
<marler8997> this is the PR by the way if you're interested in taking a look: https://github.com/marler8997/ziget/pull/8/files
<ikskuh> ah yeah
dreda has quit [Ping timeout: 240 seconds]
<marler8997> hmmm, ld.lld: error: undefined symbol: br_ec_p256_m64
dreda has joined #zig
noam has joined #zig
<g-w1> what advantages does bearssl have over iguanatls?
<ifreund> it's a lot more mature for one
Snaffu has quit [Quit: leaving]
gpanders has quit [Remote host closed the connection]
gpanders has joined #zig
tomku has quit [Quit: Lost terminal]
<andrewrk> maturity is extra important when using a library where security is a primary feature
<earnestly> openssl is that
<earnestly> Or is it so mature that it has gone moldy? :p
tomku has joined #zig
tomku has quit [Quit: Lost terminal]
<marler8997> ikskuh I think there's a bug in your zig-bearssl, I think write cannot return 0, it creates an infinite loop in std.io.Writer.writeAll
<marler8997> it looks like bearssl might have a "br_sslio_write_all" function for this purpose
<marler8997> oh no that's not what supposed to be called, but returning 0 does cause an infinite loop
<marler8997> I think Writer is expecting write not to return 0 ever...not sure
emptee has joined #zig
tomku has joined #zig
tomku has quit [Client Quit]
emptee_ has joined #zig
emptee has quit [Ping timeout: 272 seconds]
<emptee_> Is there a way to bundle all tests under a single test suite? So that several "All N tests passed" are aggregated into a single line? Currently I am adding tests in a for loop to the "test" target.
<ikskuh> emptee_: not really, tests are just different executables run
<ikskuh> marler8997: happy to accept PRs
<emptee_> Ok, thanks. It is not really a big deal, it is just sightly annoying me for some reason.
tomku has joined #zig
klltkr has quit [Ping timeout: 256 seconds]
tomku has quit [Quit: Lost terminal]
tomku has joined #zig
<marler8997> stil not sure it's actually a bug though, was wondering if anyone knew more
<marler8997> like, maybe it's a bug in writeAll?
klltkr has joined #zig
<ifreund> marler8997: write should never return 0 on posix conformant systems
<ifreund> if no bytes have been written before the write is interruped, EINTR should be set as errno and -1 returned
<marler8997> ifreund thanks for the clarification
Akuli has quit [Quit: Leaving]
DarkUranium has quit [Quit: ZNC 1.8.2 - https://znc.in]
DarkUranium has joined #zig
emptee_ has quit [Quit: Konversation terminated!]
<g-w1> anyone know why I am getting these build errors recently? https://clbin.com/i8s1A
<ifreund> g-w1: did you update your compiler?
DarkUranium has quit [Quit: ZNC 1.8.2 - https://znc.in]
DarkUranium has joined #zig
DarkUranium has quit [Remote host closed the connection]
<g-w1> maybe? im using nix so idk
<g-w1> why would that matter?
DarkUranium has joined #zig
DarkUranium has quit [Remote host closed the connection]
<g-w1> it seems to be using gcc
<g-w1> 9.3
<ifreund_> g-w1: compiler warnings aren’t stable. Usually if new warnings seem to appear out of nowhere it’s because you are using a newer, smarter compiler