<BoilerOnASurf>
daurnimator the duscussion in the link talk about aligning the array itself, I would like to have an array of aligned items, is that possible?
<daurnimator>
BoilerOnASurf: I think you'd have to turn it into an array of structs.... `[_]struct {a align(4):u8}{.{.a=0}, .{.a=1}, .{.a=2}}`
<daurnimator>
BoilerOnASurf: might be worth a proposal... I've always thought that types should have a customisable alignment....
<BoilerOnASurf>
daurnimator that would be nice, there is any issue already open on that line?
<daurnimator>
i was trying to find one but just found that old issue of mine I already linked.
<BoilerOnASurf>
daurnimator Is not clear to me if in zig the layout is considered part of the type like in C++ of some sort of metadata consumed by the allocator as in Rust?
<BoilerOnASurf>
daurnimator also, the anon struct trick won't compile
<BoilerOnASurf>
yeah the align should be at the end, thanks
BoilerOnASurf has quit [Quit: Connection closed]
cole-h has quit [Quit: Goodbye]
_Vi has quit [Ping timeout: 240 seconds]
BoilerOnASurf has joined #zig
BoilerOnASurf has quit [Client Quit]
bsrd has quit [Quit: WeeChat 2.9]
bsrd has joined #zig
st4ll1 has joined #zig
some_guest_user has joined #zig
ur5us has joined #zig
ronsor has quit [Ping timeout: 240 seconds]
ronsor has joined #zig
some_guest_user has quit [Remote host closed the connection]
klltkr has joined #zig
_Vi has joined #zig
cren has joined #zig
gazler has joined #zig
ur5us has quit [Ping timeout: 260 seconds]
marnix has quit [Ping timeout: 240 seconds]
klltkr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
marnix has joined #zig
Barabas has joined #zig
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
klltkr has joined #zig
<ifreund>
odd, std.os.setuid takes a u32 not a std.os.uid_t
<ifreund>
also, if anyone security minded is around, is it better to setuid(uid) -> mkdir -> setuid(0) to create a directory owned by an unprivileged or to mkdir and then chown it?
klltkr has quit [Read error: Connection reset by peer]
<ifreund>
hrm, uid_t seems to be a u32 on my glibc linux system but std.os.linux has it as an i32
<KoljaKube>
ifreund: Could the second method be exploited by some well-timed attack somehow?
<ifreund>
that's my fear but I'm not sure if it's well grounded or not
<ifreund>
I learned about SECBIT_NO_SETUID_FIXUP though so I'm using that with the first option for now
<ifreund>
(I need the secbit since the parent dir is root-owned)
cren has quit [Ping timeout: 246 seconds]
waleee-cl has joined #zig
drewr has quit [Ping timeout: 240 seconds]
retropikzel has joined #zig
Barabas has quit [Ping timeout: 245 seconds]
retropikzel has quit [Ping timeout: 265 seconds]
ifreund has quit [Read error: Connection reset by peer]
st4ll1 has quit [Quit: WeeChat 2.9]
cr1901_modern has quit [Quit: Leaving.]
cr1901_modern has joined #zig
ifreund has joined #zig
ifreund has quit [Ping timeout: 264 seconds]
cren has joined #zig
xackus has joined #zig
BoilerOnASurf has joined #zig
BoilerOnASurf has quit [Remote host closed the connection]
ifreund has joined #zig
klltkr has joined #zig
traviss__ has joined #zig
cren has quit [Quit: later!]
traviss_ has quit [Ping timeout: 260 seconds]
LER0ever has quit [Ping timeout: 240 seconds]
waleee-cl has quit [Quit: Connection closed for inactivity]
jasonphan has joined #zig
jasonphan has quit [Client Quit]
cole-h has joined #zig
klltkr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cr1901_modern has quit [Ping timeout: 264 seconds]
<Barabas>
I was expecting that if I use a `std.io.fixedBufferStream` I could make a reader and a writer and the reader would read what the writer writes.But... from briefly looking at the code it seems the reader reads what's after what the writer wrote.
klltkr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
varbhat has joined #zig
<fengb>
You’ll need to reset the position manually
<fengb>
If you need to track both sides, I believe a LinearFifo fits that usecase better