drasko has quit [Remote host closed the connection]
hio has quit [Quit: Connection closed for inactivity]
earnestly has quit [Ping timeout: 265 seconds]
drasko has joined #zig
kristoff_it has joined #zig
kristoff_it has quit [Ping timeout: 276 seconds]
drasko has quit [Remote host closed the connection]
<hspak>
Is there an idiomatic way in zig to splitting a u8 into 2 u4’s? I was thinking of using @truncate with some bitwise operations but was wondering if there was another way
<stratact>
fengb: you're not a dumb person. Rust just has a lot of cognitive overhead, as in, one has to think and follow its rules all of the time. Which for me as a former Rust programmer was very stressful and wears me out.
<stratact>
I felt like I age faster with Rust
laaron has quit [Remote host closed the connection]
laaron has joined #zig
THFKA4 has quit [Ping timeout: 250 seconds]
laaron has quit [Remote host closed the connection]
laaron has joined #zig
dbandstra has joined #zig
kristoff_it has joined #zig
chemist69 has quit [Ping timeout: 245 seconds]
kristoff_it has quit [Ping timeout: 268 seconds]
<stratact>
Is there a way to generate a large statically sized array using the same value for each element in a repeated fashion?
chemist69 has joined #zig
mahmudov has quit [Ping timeout: 240 seconds]
<fengb>
[_]T{T.init} ** size
laaron has quit [Remote host closed the connection]
laaron has quit [Remote host closed the connection]
laaron has joined #zig
kristoff_it has joined #zig
kristoff_it has quit [Ping timeout: 245 seconds]
mahmudov has joined #zig
porky11 has quit [Ping timeout: 264 seconds]
porky11 has joined #zig
laaron has quit [Remote host closed the connection]
laaron has joined #zig
mahmudov has quit [Ping timeout: 276 seconds]
kristoff_it has joined #zig
Aransentin has quit [Remote host closed the connection]
laaron- has joined #zig
laaron has quit [Remote host closed the connection]
kristoff_it has quit [Ping timeout: 265 seconds]
mahmudov has joined #zig
<stratact>
"error: unable to evaluate constant expression" ... 😠
<stratact>
If it weren't for that error I might've been able to solve issue #2885
<mq32>
stratact: if T.init is comptime, it should work
<mq32>
otherwise a for loop will do the work (if .init is known at runtime)
<stratact>
mq32: I appreciate it, but T.init wasn't the problem. I suppose I'm trying to, at runtime, set the size of the static array, because I need it to reassign with a new len each time (without allocating because the issue doesn't want the allocator anymore).
<stratact>
Sounds like I should go with the for loop approach
<mq32>
stratact, is this about storage for a file path?
<mq32>
you can use PATH_MAX or similar macros/limits of the OS for this
<stratact>
I think it has to do with getting the next Dir entry