kristoff_it has quit [Remote host closed the connection]
kristoff_it has joined #zig
kristoff_it has quit [Ping timeout: 268 seconds]
mikdusan1 has quit [Ping timeout: 258 seconds]
mikdusan1 has joined #zig
mikdusan1 has quit [Ping timeout: 268 seconds]
mikdusan1 has joined #zig
mikdusan1 has quit [Ping timeout: 244 seconds]
mikdusan1 has joined #zig
mikdusan1 has quit [Ping timeout: 245 seconds]
_whitelogger has joined #zig
mikdusan1 has joined #zig
THFKA4 has quit [Ping timeout: 250 seconds]
diltsman has joined #zig
<diltsman>
Does anyone have experience using Windows.h in Zig?
mikdusan1 has quit [Ping timeout: 268 seconds]
<andrewrk>
diltsman, I'd generally recommend using std.os.windows instead, with additions as necessary
mikdusan1 has joined #zig
<diltsman>
andrewrk, I am wanting to create a window, memory map files, etc.
<andrewrk>
make your file my_windows.zig and have it do `usingnamespace std.os.windows;`. then you can augment the std lib with whatever you want
<diltsman>
So, create the pub extern "kernel32" prototypes as needed?
mikdusan2 has joined #zig
mikdusan1 has quit [Ping timeout: 245 seconds]
NI33_ has quit [Ping timeout: 248 seconds]
kristoff_it has joined #zig
<diltsman>
andrewrk, I see that it provides the W variants of the functions. How do I get 16-bit character sets, since string literals are UTF-8 in Zig?
kristoff_it has quit [Ping timeout: 248 seconds]
<scientes>
diltsman, there are conversion in functions in unicode.zig
<diltsman>
Perfect!
<scientes>
however there is no support for the invalid UTF-16 that windows allows
<scientes>
only valid utf-16
<andrewrk>
just use the APIs, they express the correct intent. the implementations will get fixed
laaron has quit [Remote host closed the connection]
laaron has joined #zig
laaron has quit [Client Quit]
SimonNa has joined #zig
laaron has joined #zig
curtisf has joined #zig
_whitelogger has joined #zig
_whitelogger has joined #zig
laaron has quit [Remote host closed the connection]
laaron has joined #zig
return0e has quit [Ping timeout: 244 seconds]
kristoff_it has joined #zig
kristoff_it has quit [Ping timeout: 245 seconds]
_whitelogger has joined #zig
curtisf has quit [Remote host closed the connection]
kristoff_it has joined #zig
<daurnimator>
andrewrk: o.o you're up at a weird hour
<daurnimator>
andrewrk: also fwiw... I'm looking into the faster strace trace issue after all
kristoff_it has quit [Ping timeout: 246 seconds]
kristoff_it has joined #zig
kristoff_it has quit [Ping timeout: 245 seconds]
porky11 has quit [Quit: Leaving]
kristoff_it has joined #zig
ntgg has joined #zig
kristoff_it has quit [Ping timeout: 268 seconds]
andersfr has joined #zig
andersfr has quit [Client Quit]
kristoff_it has joined #zig
NI33_ has joined #zig
kristoff_it has quit [Ping timeout: 246 seconds]
porky11 has joined #zig
kristoff_it has joined #zig
porky11 has quit [Read error: No route to host]
kristoff_it has quit [Ping timeout: 245 seconds]
MH026 has quit [Remote host closed the connection]
<daurnimator>
Sahnvour: you requested a review from me. but I don't think you've modified the code since last time?
<Sahnvour>
daurnimator: yes, I missclicked github's review tool
companion_cube has quit [Ping timeout: 244 seconds]
companion_cube has joined #zig
wootehfoot has joined #zig
kristoff_it has joined #zig
kristoff_it has quit [Ping timeout: 268 seconds]
knebulae has quit [Read error: Connection reset by peer]
_whitelogger has joined #zig
_whitelogger has joined #zig
kristoff_it has joined #zig
kristoff_it has quit [Ping timeout: 248 seconds]
akorator has joined #zig
knebulae has joined #zig
<akorator>
Started with Zig in Windows 10 (64bit, latest master) and running "zig targets" gets me this: Available glibc versions: Assertion failed. This is a bug in the Zig compiler. Unable to dump stack trace: Unable to open debug info: InvalidPEMagic
<akorator>
Maybe this is a known issue or something I did wrong
return0e has joined #zig
<ntgg>
is there a plan to have nested inferred size for arrays ([_][_]) or is the current way final?
kristoff_it has joined #zig
<ntgg>
akorator: Did you build from master or download the prebuilt?
kristoff_it has quit [Ping timeout: 244 seconds]
<Sahnvour>
akorator: zig 0.4.0 is a bit date if that's what you are using, a lot happened on master since the release
<akorator>
@ntgg downloaded the prebuilt: zig-windows-x86_64-0.4.0+f01cb8cc.zip
<ntgg>
akorator: It's probably not you then, I don't see an issue for it on github either, so you should probably open one.
kristoff_it has joined #zig
samtebbs has joined #zig
kristoff_it has quit [Ping timeout: 258 seconds]
<samtebbs>
Hi all, is anyone having issues building zig master? My issue is "error: initializing ‘llvm::ArrayRef<long unsigned int>::Data’" when building "embedded_softfloat"
<nrdmn>
samtebbs: are you building with gcc >= 9?
<samtebbs>
nrdmn: Yep, 9.1
<nrdmn>
samtebbs: try building with gcc < 9 or with clang
kristoff_it has joined #zig
<samtebbs>
nrdmn: I'll try that. Do I have to specify the compiler to use with cmake or make?
<nrdmn>
you can specify it as environment variables, e.g. `CC=gcc-8.3.0 CXX=g++-8.3.0 cmake ..`
<scientes>
/home/shawn/git/zig-libmvec/exp.zig:82:5: error: variable of type '(undefined)' must be const or comptime
<scientes>
but undefined is comptime????
Hejsil has joined #zig
Hejsil has quit [Read error: Connection reset by peer]
<nairou>
nrdmn: I was about to ask the same thing, errors building with GCC 9 :-)
<ntgg>
scientes: What context is it used in?
<scientes>
ntgg, call
<scientes>
of an intrinsic
<scientes>
i think it has something do with with ->child thingy in IrInstruction
<scientes>
that I don't exactly understand
<nairou>
samtebbs: Do you already have an older GCC installed? I'm trying to figure out how to do that as well.
<nairou>
nrdmn: Do you know how I'd build zig using clang? How do you force cmake to use it?
<nrdmn>
nairou: `CC=clang CXX=clang++ cmake ..`
<nairou>
nrdmn: Thanks!
kristoff_it has quit [Remote host closed the connection]
kristoff_it has joined #zig
<nrdmn>
andrewrk: do you know about this issue?
<samtebbs>
nrdmn: I installed gcc-8 then backed-up my old /usr/bin/c++ binary and replaced it with /usr/bin/c++-8
<scientes>
nrdmn, what is the issue?
<scientes>
please paste
<samtebbs>
scientes: The same issue as me above, when building embedded_softfloat
<samtebbs>
Doesn't work with gcc9
<samtebbs>
Hmm, now I'm getting "undefined reference to `std::_Sp_make_shared_tag::_S_eq(std::type_info const&)'" when linking zig0
<nrdmn>
scientes: apparently you can't build zig with gcc 9
<scientes>
just fix the bug, it shouldn't be that difficult
<nairou>
I get a slightly different error than samtebbs. In my case it looks like GCC has --enable-default-pie set by default, and zig doesn't like it: relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIC
<scientes>
also, that is c++, not c
<nairou>
Looks like clang built it just fine, woot
<samtebbs>
scientes: Well yes, but it doesn't seem like many others are experiencing the same issue so it could very well be an environment issue
ntgg has quit [Remote host closed the connection]
<samtebbs>
nrdmn: How did you manage to build with clang rather than gcc?
<daurnimator>
I have gcc 9.1.... haven't had issues
<nairou>
daurnimator: I'm curious of your copy has --enable-default-pie built in
<samtebbs>
What llvm version is zig using now? I heard talks of switching to the llvm 9 release candidate branch
<daurnimator>
nairou: how would I check that?
<samtebbs>
That could be something to do with it
<daurnimator>
samtebbs: llvm 8 in master. there's a branch open for llvm 9
porky11 has joined #zig
<nairou>
daurnimator: gcc -v shows all built-in options
<daurnimator>
nairou: yes it does.
<nairou>
Interesting
<scientes>
uggh, lots of merge pain on my SIMD branch
<nrdmn>
samtebbs: CC=clang CXX=clang++ cmake ..
nairou has quit [Remote host closed the connection]
SimonNa has quit [Remote host closed the connection]
SimonNa has joined #zig
nairou has joined #zig
<daurnimator>
samtebbs: "the symbol is visible to `extern` declarations" I'm not sure what you mean?
akorator has quit [Ping timeout: 260 seconds]
<samtebbs>
daurnimator: If you export a symbol, then it becomes possible to use it elsewhere by using `extern`
<daurnimator>
samtebbs: oh right. I forget how overloaded extern is
<samtebbs>
nrdmn: cheers
<scientes>
ahhh yes a5cb0f77d11bdcc504fe broke a bunch of my SIMD stuff
darithorn has joined #zig
<scientes>
and requires me to do a bunch of work
<scientes>
again because of when types are resolved
<samtebbs>
daurnimator: Yeah :) I always think of it from a linker point of view rather than an ABI point of view
<scientes>
ugggh its totally broken by that commit
<scientes>
this is really frustrating
Akuli has joined #zig
<samtebbs>
Now I'm getting "CommandLine Error: Option 'dump-thin-cg-sccs' registered more than once!"... I've been building zig fine up until today
<scientes>
andrewrk, do ResultLoc's get their id set before or after types?
<gonz_>
How does one link `_mm_...` intrinsics into a C build?
<gonz_>
`_mm_set1_epi8`, for example
<gonz_>
I'm trying to build/use `libspng` with zig and having some issues
<scientes>
gonz_, those are not actually C, those special headers do not work with Zig
<scientes>
neon, sse, or altivec
<scientes>
if its not telling you that, that is a bug
laaron has quit [Remote host closed the connection]
samtebbs has quit [Remote host closed the connection]
<gonz_>
What exactly do you mean "do not work with zig"?
<scientes>
those require compiler integration
<gonz_>
It's the linker that needs them
<scientes>
gonz_, they are not functions, they are not symbols
<scientes>
they are C extensions
<scientes>
gonz_, I have a portable SIMD patch set posted, but I am working on rebasing it because andrew broke it
<gonz_>
So basically the zig compiler right now assumes they're normal functions and that's why `lld` ends up saying they're just undefined?
<andrewrk>
nrdmn, oh, your other option is to choose the alignment at the memory location rather than in the type
<andrewrk>
var bar: T align(8) = undefined;
<andrewrk>
you can override the alignment of any type when you declare a variable
<nrdmn>
that's what I'm doing right now, but I'd like to enforce it somehow
<andrewrk>
yeah. that's 1512.
<nrdmn>
ok
<ntgg>
what reasons would I be getting integer overflow in std.buffer.Buffer.len?
<ntgg>
I am creating it with Buffer.init(allocator, "")
<curtisf>
Is there a simple allocator in the standard library that I can assert has freed all of its memory in a test, to make sure I'm not leaking allocations?