<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
<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
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?