forgot-password has quit [Ping timeout: 240 seconds]
dingenskirchen has quit [Remote host closed the connection]
dingenskirchen has joined #zig
forgot-password has joined #zig
aerona has joined #zig
aerona has quit [Read error: Connection reset by peer]
aerona has joined #zig
Mulugruntz has joined #zig
craigo has quit [Ping timeout: 264 seconds]
forgot-p1ssword has joined #zig
forgot-password has quit [Ping timeout: 256 seconds]
stripedpajamas has joined #zig
ur5us has joined #zig
stripedpajamas has quit [Quit: sleeping...]
stripedpajamas has joined #zig
waleee-cl has quit [Quit: Connection closed for inactivity]
discipulus has joined #zig
plumm has joined #zig
dddddd has quit [Ping timeout: 260 seconds]
aerona has quit [Quit: Leaving]
stripedpajamas has quit [Quit: sleeping...]
forgot-p1ssword has quit [Ping timeout: 264 seconds]
stripedpajamas has joined #zig
ur5us has quit [Ping timeout: 256 seconds]
stripedpajamas has quit [Quit: sleeping...]
discipulus has left #zig [#zig]
Mulugruntz has quit [Ping timeout: 246 seconds]
<lemmi>
wonderfull.. now i have this supposetly uber hashmap with tons of speedup because of vecorization and it works best with a vector length of 1 :D
Mulugruntz has joined #zig
cole-h has quit [Quit: Goodbye]
<lemmi>
the moment i use something different that vectorsize 1 it takes about a third longer. it then gets a little faster for 32 and it actually emits avx code.
dermetfan has joined #zig
<lemmi>
hm.. might be the @ptrCast(*const bitmaskType, &v).* that's causing the slowdown. lots of mov instructions for nothing after the actual vector instructions
<lemmi>
so there is hope that once the compiler bug is fixed this might work out just fine
<pixelherodev>
Structure support is still hotly debated IIRC
<pixelherodev>
@reify might support structs, it might not
<KoljaKube>
I'm currently trying to create wrappers around shader uniform blocks, and having that feature would be awesome
<KoljaKube>
An alternative would probably be accessors (i.e. something like operator=), but I guess that's contrary to the design goals of zig
<pixelherodev>
Very much so, yeah
<pixelherodev>
There's nothing stopping you from defining a function for it though
<pixelherodev>
e.g. `.@"="()`
<KoljaKube>
Is @ syntax I don't know or a placeholder?
<pixelherodev>
@"" lets you put arbitrary unicode as an identifier
<pixelherodev>
e.g. @"角" (an example I used because I had that kanji on screen at the time, not for any real reason :)
<KoljaKube>
Ah, I see, thanks
<KoljaKube>
Maybe I'm also overlooking other possibilities. What I need is a packed struct containing a variable number of fields of variable types, and at the same time fill out some C structs with metadata about that struct
<KoljaKube>
I've been trying to go from the metadata to the type, but I guess I should look into @typeInfo and doing it the other way around
waleee-cl has joined #zig
josias has joined #zig
<josias>
How do I get the length of a zero-terminated string?
<daurnimator>
josias: mem.lenZ
<daurnimator>
josias: though you probably want to just turn it into a slice? in which case mem.spanZ
Mulugruntz has quit [Quit: ZZZzzz…]
Akuli has joined #zig
heitzmann has quit [Ping timeout: 264 seconds]
Akuli has quit [Ping timeout: 264 seconds]
_whitelogger has joined #zig
wootehfoot has joined #zig
heitzmann has joined #zig
josias has quit [Quit: Quit]
frett27 has joined #zig
<pixelherodev>
just span should work, no? assuming the string type is sentineled
<ifreund>
yes
Akuli has joined #zig
aerona has joined #zig
<lemmi>
daurnimator: well the flamegraph is telling me that i'm wasting my time in my map implementation. and that's something i knew already :D
<lemmi>
most of the small stuff is inlined and so the stack traces all just report one function, so that's useless
<lemmi>
i need to watch that tracy video again, i hope i can get it running
cole-h has joined #zig
xackus has joined #zig
SimonNa has quit [Remote host closed the connection]
<leeward>
User (not maintainer) documentation that doesn't fit with a particular symbol should be in //! comments.
<scientes>
so really the documentation belongs somewhere else
<leeward>
scientes: I'm not sure what you mean by that. Documentation definitely belongs in the source so it can be generated.
<forgot-password>
leeward: Okay, so when I want to show some examples and explain the overall idea of a file this all goes in the top level doc comments
<leeward>
forgot-password: exactly
<scientes>
leeward, i am saying that the documentation should mention that the parser doesn't care after the first two //
<leeward>
The doc generator parser certainly does care.
<forgot-password>
Will zig fmt format the code snippets eventually? Or maybe it already does that... Zig surprises me every single day
<leeward>
Which code snippets?
<leeward>
In comments?
<forgot-password>
The code blocks in the doc comments
<leeward>
scientes: Yep, that looks like a test that ensures it does the dumb thing.
<leeward>
Also, that signal handler test ensures that it doesn't emit an sei. That seems to be the only difference between signal and interrupt.
<leeward>
Indeed, when I use callconv(.Signal) for my interrupt, it doesn't emit the sei.
SimonNa has joined #zig
<leeward>
Yep, the ISR is functionally exactly the same as what GCC emits with ISR when I use callconv(.Signal). I think this is an llvm bug.
ur5us has joined #zig
<stripedpajamas>
should I be able to get ReturnType of a bound fn? currently it throws during compile with "type does not support field access"
Ekho- is now known as Ekho
<andrewrk>
stripedpajamas, the language isn't really decided on what happens with bound functions beyond anything but calling them directly. I suggest to use the non-bound function for your purposes
wootehfoot has quit [Quit: Leaving]
<stripedpajamas>
usecase is passing an iterator to a function and that function calling next and maybe returning the value
<stripedpajamas>
i suppose i could hard code the return type for now
heitzmann has quit [Quit: WeeChat 2.8]
Akuli has quit [Quit: Leaving]
<forgot-password>
Does a string literal of size n not automatically cast to [n]u8?
heitzmann has joined #zig
<leeward>
[n]const u8?
xackus_ has quit [Quit: Leaving]
<forgot-password>
Then it says 'const qualifier invalid on array type'
<leeward>
Huh, weird.
<leeward>
const arr: [7]u8 = "1234567".*;
<leeward>
but it looks like string literals want to be slices.
<leeward>
const arr: []const u8 = "1234567";
<forgot-password>
leeward: []const u8 works with a declaration, but not in a struct field, which is why it fails for me
<forgot-password>
Is there a reason for that?
<forgot-password>
Oh what, sorry, that's a slice...
<forgot-password>
Haha, well, brain switched off for a second. Ignore my last three messages
aerona has quit [Read error: Connection reset by peer]
stripedpajamas has quit [Quit: sleeping...]
Mulugruntz has joined #zig
knebulae has quit [Read error: Connection reset by peer]
Mulugruntz has quit [Quit: ZZZzzz…]
Mulugruntz has joined #zig
knebulae has joined #zig
<pixelherodev>
andrewrk: how's the register allocator coming along?
<pixelherodev>
Rather, how's the addition + test?
<andrewrk>
it's solved on paper, but not in code yet
<andrewrk>
you might call it... paperware
<fengb>
And I thought my jokes were bad
<pixelherodev>
I'm getting to work on CBE within ten minutes :D
<pixelherodev>
Just finished some major improvements to scas :)
<andrewrk>
having to give up my main dev laptop was pretty disruptive to my productivity on the register allocation stuff. that's why I switched over to a task that requires less focus, like the hash map thing
<andrewrk>
dell promised me less than 5 business days to get it back. we'll see
dermetfan has quit [Ping timeout: 244 seconds]
bastienleonard has quit [Ping timeout: 272 seconds]