<andrewrk>
marc filed an issue for the install libs, and I'll be sure to fix that before 0.6.0
<andrewrk>
*before 0.5.0
<andrewrk>
I don't understand why the other patch would be necessary. why do you have llvm .a files lying around if you didn't want software to use them?
<ManDeJan>
andrewrk, That was quick, so no need filing a bug report then? :)
<andrewrk>
ManDeJan, if you build from source or wait until the new binary is available, (and tiehuis's diagnosis is correct) then the issue should be fixed
<andrewrk>
tiehuis - I got the windows ABI thing resolved! It took the better part of today but finally you should be unblocked on big rationals
tiehuis has joined #zig
<tiehuis>
yes, i saw that, nice work, thank you!
<ManDeJan>
andrewrk, cool I was super confused when my hashing function generated different hashes at compiletime
<ManDeJan>
How often does godbolt rebuild trunk?
<andrewrk>
I'm not sure
<andrewrk>
tiehuis, feel free to merge at will
<tiehuis>
sure, i'll just wait till the test suite passes just to confirm, no hurry
<tiehuis>
there was actually a TODO in that big int code related to that larger than limb shift i believe
<tiehuis>
should remove that
tiehuis has quit [Quit: WeeChat 2.4]
<andrewrk>
good night
very-mediocre has joined #zig
marmotini_ has joined #zig
marmotini has joined #zig
marmotini_ has quit [Ping timeout: 246 seconds]
marmotini_ has joined #zig
marmotini has quit [Ping timeout: 255 seconds]
very-mediocre has quit [Ping timeout: 256 seconds]
<gamester>
So barring some optimization that checks all callers of a function, all slices would have to store a stride field and @sliceToBytes would fail on those
marmotini_ has joined #zig
marmotini has quit [Ping timeout: 246 seconds]
marmotini has joined #zig
marmotini_ has quit [Ping timeout: 246 seconds]
<gamester>
It's not a clean fit atm but strided memory is a cool idea.
dtz has quit [Ping timeout: 240 seconds]
emekankurumeh[m] has quit [Ping timeout: 252 seconds]
daurnimator[m] has quit [Ping timeout: 268 seconds]
slugmatt_ has quit [Ping timeout: 250 seconds]
marmotini_ has joined #zig
marmotini has quit [Ping timeout: 250 seconds]
marmotini has joined #zig
marmotini_ has quit [Ping timeout: 268 seconds]
marmotini_ has joined #zig
marmotini has quit [Ping timeout: 246 seconds]
<daurnimator>
gamester: I'm not sure if entirely possible; but could it part of the type? (like align is for pointers?)
<shritesh>
andrewrk: FYI, after revising my gist to "do things right", compiler_rt symbols are no longer linked in the wasm binary and get GC'd
very-mediocre has joined #zig
<tgschultz>
daurnimator: I was thinking something similar, and the only problem I can see is if you intend to use a function on it that expects an unstrided slice of whatever. Even if we say 'just make it var' then that doesn't cover exported/extern use cases. Personally, I think this is something to be dealt with in userland with a simple iterator.
<andrewrk>
stage1 is the c++ compiler code. stage2 and stage3 are the same .zig code
<halosghost>
ahh
<halosghost>
I see
<Jenz>
How does stage2-zig executables compare to stage1-zig executables?
<andrewrk>
self-hosted compiler can barely build hello world
<andrewrk>
stage1 is what we ship right now
<halosghost>
haha
<Jenz>
Alright, I see; I'm really looking forward to see where zig's going
Jenz has quit [Ping timeout: 252 seconds]
Sahnvour has joined #zig
<Sahnvour>
hi
<Sahnvour>
how would I reinterpret an int as a sequence of bytes ?
<halosghost>
bitcast
<halosghost>
oh
<halosghost>
nope
<halosghost>
that was bad advice
<halosghost>
well, I suppose it would work if you know the length of bytes to be, which you should
meheleventyone has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Sahnvour>
@sliceToBytes doc says "Converts a slice or array to a slice of u8." however `const slice = @sliceToBytes([1]u32{x});` does not work: error: expected slice, found '[1]u32'`
<tgschultz>
actually it isn't slice, the return value is a *[@sizeOf(T)]u8
<andrewrk>
Sahnvour, have a look at the std.mem.readInt* functions
<bheads_____>
I ran into something like that the other night, what is the zig way of read bytes from a file into a packed struct?
<andrewrk>
bheads_____, I believe std.io.InStream has readStruct
<Sahnvour>
tgschultz thanks
<tgschultz>
there's also deserializer if endianess needs accounting for
<andrewrk>
oops, std.mem.writeInt* functions, I got it backwards
meheleventyone has joined #zig
<bheads_____>
ah it makes a [1]T array and slices that, I was trying to directly turn the start into a slice of bytes
<tgschultz>
that's what std.mem.asBytes() does
<tgschultz>
only it returns a pointer to an array since the the length is comptime known, but pointers to arrays implicitly cast to slices
<bheads_____>
so I should be able to file.read(mem.asBytes(&header))
<tgschultz>
there's also std.mem.toBytes() which copies to an array instead of returning a pointer.
<tgschultz>
yeah, that should work.
<tgschultz>
if you had the file as an InStream (which you can get with file.inStream()), you could use readStruct(), but it is functionally equivelent I think. If you need to worry about endianess you should use Deserializer.
<bheads_____>
I may switch to an InStream so I can support other data stream sources (ie files packed in files)
meheleventyone has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<bheads_____>
but doing compression orientated programming, so... solveing the problem at hand.. reading fastq files...
very-mediocre has quit [Ping timeout: 256 seconds]
very-mediocre has joined #zig
<shritesh>
andrewrk: How would I go about solving "in function __zig_return_error void (%builtin.StackTrace*): WebAssembly hasn't implemented __builtin_return_address"?
scientes has quit [Read error: Connection reset by peer]
scientes has joined #zig
shritesh has quit [Ping timeout: 246 seconds]
shritesh has joined #zig
<andrewrk>
shritesh, we'll have to disable error return traces for the web assembly target
<Sahnvour>
I have some code that runs fine on debug and release-safe, but segfaults in release-fast/small
<Sahnvour>
trying to reduce it, but may not be easy
<andrewrk>
that's the hardest kind of bug to troubleshoot
wilsonk has quit [Read error: Connection reset by peer]
<shritesh>
andrewrk: Thanks. That solved it. PR incoming.
wilsonk has joined #zig
<andrewrk>
shritesh, it would be cool to look into WASI and find out if we can have some std lib tests for wasm
<shritesh>
As in execute stdlib tests in an WASI env?
<andrewrk>
yes
<andrewrk>
I'm not trying to give you a task; I'm just musing
<shritesh>
There's like 2 WASI exec envs. out there, both based on Cranelift.
<shritesh>
First we need to add support for the WASI os
<shritesh>
I'll see what's required to get a hello world working