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/
jayschwa has quit [Remote host closed the connection]
<leeward> andrewrk: I figured it was something like that, thanks. std.atomic.Queue it is for now.
zippoh has quit [Ping timeout: 256 seconds]
<daurnimator> ^ libgccjit *should* get support for inline asm in GCC11
ur5us has quit [Ping timeout: 244 seconds]
reductum has quit [Quit: WeeChat 2.9]
reductum has joined #zig
ur5us has joined #zig
factormystic has quit [Quit: The Lounge - https://thelounge.chat]
mwgkgk has joined #zig
jjsullivan1 has joined #zig
nephele_ has joined #zig
nephele has quit [Ping timeout: 260 seconds]
nephele_ is now known as nephele
<daurnimator> JimRM: I think there was an issue where compiler-rt was not respecting cpu features when cached. does your issue go away if you delete zig-cache (both in project and in your home dir)?
<daurnimator> JimRM: oh. nevermind, seems you figured it out. you should be able to subtract features from a cpu target in your target string
klltkr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
marnix has joined #zig
drvirgilio has quit [Ping timeout: 260 seconds]
drvirgilio has joined #zig
drewr has joined #zig
isolier has joined #zig
_whitelogger has joined #zig
ur5us has quit [Ping timeout: 260 seconds]
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
marnix has quit [Ping timeout: 256 seconds]
marnix has joined #zig
waleee-cl has quit [Quit: Connection closed for inactivity]
<pixelherodev> hmm. VSCode + ZLS is good, right?
<Nypsie[m]> In my opinion it's really solid
* pixelherodev nods
omglasers2 has joined #zig
cole-h has quit [Quit: Goodbye]
a_chou has quit [Quit: a_chou]
omglasers2 has quit [Client Quit]
omglasers2 has joined #zig
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
marnix has quit [Read error: Connection reset by peer]
mwgkgk has quit [Quit: Connection closed for inactivity]
oxymoron93 has joined #zig
_Vi has quit [Ping timeout: 272 seconds]
ky0ko_ has quit [Ping timeout: 264 seconds]
ky0ko_ has joined #zig
marnix has joined #zig
marnix has quit [Read error: Connection reset by peer]
dermetfan has joined #zig
reductum has quit [Quit: WeeChat 2.9]
wilsonk has quit [Ping timeout: 260 seconds]
wilsonk has joined #zig
marnix has joined #zig
marnix has quit [Read error: Connection reset by peer]
wilsonk has quit [Ping timeout: 258 seconds]
wilsonk has joined #zig
blinghound has joined #zig
marnix has joined #zig
marnix has quit [Read error: Connection reset by peer]
<ifreund> nice, I'm almost done wrangling the build system to do what I want :)
<tsujp> Are there any Zig web frameworks out and under the radar yet?
<tsujp> Similiar to how Flask is for Python, Amber is for Crystal, Sinatra is for Ruby etc
<tsujp> or even how Hugo is for Go but Hugo is purely static iirc, I'm talking general webserver stuff
Piraty has left #zig ["--"]
<ifreund> tsujp: well there's https://github.com/Vexu/routez, there's a lot of room for development in this area though
dddddd_ is now known as dddddd
marnix has joined #zig
marnix has quit [Read error: Connection reset by peer]
cren has quit [*.net *.split]
alexnask[m] has quit [*.net *.split]
eddyb[legacy] has quit [*.net *.split]
wjlroe has quit [*.net *.split]
ovf has quit [*.net *.split]
teqwve has quit [*.net *.split]
dom96 has quit [*.net *.split]
teqwve has joined #zig
eddyb[legacy] has joined #zig
wjlroe has joined #zig
dom96 has joined #zig
alexnask[m] has joined #zig
ovf has joined #zig
ovf has joined #zig
ovf has quit [Changing host]
ovf has quit [Max SendQ exceeded]
ovf has joined #zig
blinghound has quit [Quit: Leaving]
marnix has joined #zig
marnix has quit [Read error: Connection reset by peer]
xd1le has quit [Read error: Connection reset by peer]
xd1le has joined #zig
marnix has joined #zig
marnix has quit [Read error: Connection reset by peer]
_Vi has joined #zig
marnix has joined #zig
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
marnix has quit [Read error: Connection reset by peer]
<ifreund> any tuple experts around? I can't get this to compile https://paste.rs/nSo
<ifreund> using it gives https://paste.rs/1il
<WilhelmVonWeiner> If I want to pass an exit status to the shell, is declaring main as `pub fn main() !u8` correct?
<WilhelmVonWeiner> (I think exit status is 8 bits)
<Nypsie[m]> args[i] doesn't work, you either need to specify it by index such as [0], [1], or inline for over the tuple itself
<Nypsie[m]> iirc
<ifreund> looks like this works https://paste.rs/cHj
<ifreund> i'll see if I can put it in a loop
<Nypsie[m]> ``` inline for (args) |arg, i| buf[i] = if (i < args.len) arg;
<Nypsie[m]> ``` works
<Nypsie[m]> woops
<Nypsie[m]> inline for (args) |arg, i| buf[i] = if (i < args.len) arg;
<Nypsie[m]> should check args.len to buf.len, I forgot that part
<ifreund> nice
oxymoron93 has quit [Quit: Connection closed]
<Nypsie[m]> Btw, not sure if the tuple is user provided, but in that case you may want to ensure the length is correct, or else you may not completely fill the buffer in case they only provide a length of 3.
<ifreund> yeah I have a @compileError length check already
<ifreund> but leaving the buffer unfilled is actually ok
<Nypsie[m]> I see! cool
<ifreund> huh: https://paste.rs/0L9
<ifreund> this is with prctl as https://paste.rs/cxr
<ifreund> os.SEC.... is a comptime_int
<Nypsie[m]> The heck
<ifreund> oh wait i'm being dumb
<ifreund> called os.linux.prctl not os.prctl
<ifreund> builds now
<Nypsie[m]> Oh lawl, didn't even notice
<Nypsie[m]> Nice!
marnix has joined #zig
marnix has quit [Read error: Connection reset by peer]
<ifreund> ugh, the error set for os.prctl is gonna be a little ugly
<ifreund> maybe there's a way to generate it at comptime based on what is passed, as the errors are very dependand on the parameters
<Nypsie[m]> Can't you catch them, and return a more 'generic' error?
<ifreund> no, because that would lose information
<Nypsie[m]> Makes sense
<ifreund> see the errors section in the prctl(2) man page
<Nypsie[m]> Alright, 1 sec
<Nypsie[m]> Hmmm, I see what you mean
<Nypsie[m]> So you want to provide an error for each error case, rather than those 7-8 error codes?
<ifreund> well, it's more like a different error set based on what was passed as the first parameter
<ifreund> maybe I'll just do the single superset for now though, reducing the error set in some cases isn't a very breaking change
<Nypsie[m]> Yeah I think that's the better option. The caller can then still decide to merge/slim down the error set do they wish to do so.
msingle has joined #zig
layneson has joined #zig
factormystic has joined #zig
xackus has joined #zig
marnix has joined #zig
marnix has quit [Read error: Connection reset by peer]
Akuli has joined #zig
marnix has joined #zig
marnix has quit [Read error: Connection reset by peer]
<ifreund> oops, that u16 shoulda been a u31
marnix has joined #zig
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
a_chou has joined #zig
hamoko[m] has quit [Quit: Idle for 30+ days]
layneson has quit [Ping timeout: 240 seconds]
riba has joined #zig
marnix has quit [Ping timeout: 240 seconds]
marnix has joined #zig
omglasers2 has quit [Read error: Connection reset by peer]
cole-h has joined #zig
<WilhelmVonWeiner> is there a reason `_ =` is the canonical way to ignore an expression value as opposed to keyword such as "discard"? or has it just not really been addressed
riba has quit [Ping timeout: 258 seconds]
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
riba has joined #zig
ky0ko_ has quit [Read error: Connection reset by peer]
waleee-cl has joined #zig
<leeward> WilhelmVonWeiner: It's common in other languages.
<leeward> _ is idiomatic in many languages for "I don't care about this value."
<WilhelmVonWeiner> in destructuring i suppose
<WilhelmVonWeiner> i've never thought of it like Zig uses it, makes sense I suppose
<Michcioperz> i think coming from rust i was surprised there was no `let` in front of it
<Michcioperz> i mean, `var` or `const`
<WilhelmVonWeiner> coming from nim I was surprised you couldnt just `discard` it
<leeward> It's not a bad idea though. "discard" is a lot more obvious in its intent to new readers, and one of Zig's goals is to be easy to read.
<WilhelmVonWeiner> so used to discarding in nim
<fengb> It's a special variable. I think there's a proposal to make it a keyword
<WilhelmVonWeiner> I like explitly handling all return values though
<WilhelmVonWeiner> languages should enforce that
<fengb> +1
<leeward> I particularly like that you can't discard errors.
<leeward> At least, not the easy way. "catch {}" is a lot harder to type than "try"
dermetfan has quit [Quit: WeeChat 2.7.1]
marnix has quit [Ping timeout: 260 seconds]
marnix has joined #zig
riba has quit [Ping timeout: 260 seconds]
tsujp has quit [Ping timeout: 260 seconds]
a_chou has quit [Ping timeout: 240 seconds]
marnix has quit [Ping timeout: 240 seconds]
<leeward> Fun story: I have a format string "foo {} {}" and I want it to print either "foo u 1" or "foo d 1" depending on some value. So I create a u8 and assign either 'u' or 'd' to it. Whoopsie.
marnix has joined #zig
_Vi has quit [Ping timeout: 272 seconds]
a_chou has joined #zig
<leeward> I'm taking a slice that I got out of tokenize and passing it to a C function (that needs a [:0]u8). Is there a better way than stuffing it in a new array, writing a 0 to the end, and slicing that?
<leeward> (that's std.mem.tokenize)
lemmi has quit [Ping timeout: 256 seconds]
<leeward> const sliced: [:0]const u8 = copy[0..token.len];
<leeward> I guess there mest be, since that isn't legal.
<Nypsie[m]> Guess you could use std.cstr.addNullByte(allocator, slice)
<leeward> Ahah, I didn't use that (because it wants an allocator) but its code told me what to do. buf[0..len:0]
<leeward> Unfortunately, it looks like the "add a 0 to a copy" is the way to go.
cole-h has quit [Quit: Goodbye]
sawzall has quit [Read error: Connection reset by peer]
sawzall has joined #zig
lemmi has joined #zig
<ifreund> leeward: maybe you want "foo {c} {}"
<ifreund> then in will format the int you pass as an ascii character
<ifreund> i.e. a u8 with the value of 'u' or 'd' would work
cren has joined #zig
<cren> so `anyframe` is a type that represents a pointer to a stack frame
<cren> is there something like a `specificframe` type?
<cren> it's just that the name seems to suggest it
<ifreund> cren: @Frame(foo)
<leeward> ifreund: Yep, that's what I ended up using. I was just being silly.
reductum has joined #zig
<ifreund> nice :)
<fengb> Damn, LemonBoy is on a roll
marnix has quit [Ping timeout: 240 seconds]
marnix has joined #zig
nvmd has joined #zig
marnix has quit [Ping timeout: 258 seconds]
davi2205 has joined #zig
_Vi has joined #zig
dermetfan has joined #zig
<andrewrk> that's package manager progress right there :)
<ikskuh> uuuuh, nice. do i see right that we now have compression/decompression? \o/
<Nypsie[m]> No compression yet afaic
marnix has joined #zig
<andrewrk> not compression
<ikskuh> only decompression? enough formost use cases
marnix has quit [Ping timeout: 246 seconds]
marnix has joined #zig
marnix has quit [Ping timeout: 256 seconds]
<andrewrk> ifreund, if you had waited ~1 more week, a bunch of these PRs would be in stage2 instead of stage1 :D
<andrewrk> (this is not a complaint, just musing)
<ikskuh> time for stage2 hype again?
<ifreund> that would have been more pleasant that hacking on stage1 :P
<ifreund> thanks for all the quick merges by the way, just one more to go and then I'm happy for now
<andrewrk> which one?
<ifreund> https://github.com/ziglang/zig/pull/6325 but with one more commit adding support to the zig build system (which I'm testing not and about to push)
Akuli has quit [Quit: Leaving]
<andrewrk> ah nice, --full-name is already implemented in my branch (as -femit-bin=foo)
<andrewrk> if you can wait on that one it would actually be easier for me to ignore the PR and just try to finish up #6250 (the --full-name one)
<ifreund> oh if we have --full-name/-femit-bin=foo then -omit-lib-prefix is undeeded
<ifreund> though it might be a little nicer to use if you want zig to determine the proper extension based on the target for you
<ifreund> Yeah I think I should probably just wait on #6250
davi2205 has quit [Ping timeout: 265 seconds]
xackus has quit [Quit: Leaving]
_whitelogger has joined #zig
a_chou has quit [Ping timeout: 256 seconds]
<andrewrk> I'm working on it as fast as I can. That branch is a doozy
msingle has quit [Ping timeout: 256 seconds]
davi2205 has joined #zig