ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
emekoi has joined #zig
<emekoi> can anyone point me to a *really* simple example of async in zig?
<emekoi> the examples in the docs are kind of confusing.
emekoi has quit [Ping timeout: 256 seconds]
wootehfoot has quit [Read error: Connection reset by peer]
seedofonan has joined #zig
<seedofonan> I'm trying to build the Zig in the Wild project Micro:Bit Demo. The author says
emekoi has joined #zig
<seedofonan> "Linking does not work properly with Zig" but then the codebase is also fairly old, almost 1 yr. I've corrected the small amount of bitrot so zig produces an .obj. GCC linker complains that the .obj isn't valid. So is it still expected for now that I must use LLVM's LDD?
seedofonan has quit [Ping timeout: 256 seconds]
suirad has quit [Ping timeout: 256 seconds]
vegecode has joined #zig
<vegecode> Hello, I have allocated the memory for 1e6 u2's. I wanted to see how many bytes that was. I expected 250e3 bytes, but when I print the byte length by using @sliceToBytes(buffer).len, it says the full 1 million bytes is used.
<vegecode> I am using --release-fast. Is zig supposed to support packing of types like that? I thought it could for structs and imagined it would do that automatically for bit widths smaller than 8 that divide nicely into the native word size
<vegecode> Is it possible to get zig to do this on it's own or do I need to do it manually with an array of structs?
a_chou has joined #zig
reductum has joined #zig
a_chou has quit [Quit: a_chou]
<vegecode> Can a function require a slice of a specific width?
<emekoi> what do you mean by width?
<emekoi> is it an error if your code compiles fine, but you don't cancel or await any of the promises you make?
<vegecode> I don't know anything about concurrency in Zig.
<vegecode> What I mean is can I have a compile time check that a slice parameter to a function has a minimum number of indices?
<vegecode> If I need six numbers in the array, I would like it to require slices of at least that width and fail to compile instead of failing at runtime
<emekoi> i don't think you can because a slice's length is a runtime value
<vegecode> Thanks, that's what I thought too.
reductum has quit [Ping timeout: 244 seconds]
<MajorLag> vegecode: even packed structs are subject to alignment rules when in arrays. There currently isn't a concept of a packed array.
<daurnimator> This is one of the problems with the current @sizeOF
<daurnimator> it gives the size of an array element. not the actual size...
wilsonk has joined #zig
reductum has joined #zig
meheleventyone has joined #zig
meheleventyone has quit [Remote host closed the connection]
meheleventyone has joined #zig
reductum has quit [Quit: WeeChat 2.3]
emekoi has quit [Ping timeout: 256 seconds]
meheleventyone has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
meheleventyone has joined #zig
meheleventyone has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
basro has quit [Disconnected by services]
basro_ has joined #zig
basro_ is now known as basro
meheleventyone has joined #zig
meheleventyone has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
very-mediocre has joined #zig
lkurusa has joined #zig
meheleventyone has joined #zig
meheleventyone has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Zaab1t has joined #zig
daurnimator has quit [Ping timeout: 264 seconds]
daurnimator has joined #zig
Zaab1t has quit [Ping timeout: 250 seconds]
Zaab1t has joined #zig
qazo has quit [Ping timeout: 250 seconds]
steveno has joined #zig
meheleventyone has joined #zig
meheleventyone has quit [Client Quit]
meheleventyone has joined #zig
meheleventyone has quit [Client Quit]
meheleventyone has joined #zig
steveno has quit [Ping timeout: 264 seconds]
wink__ has joined #zig
<wink__> Need to build zig on windows, the wiki page says to use VS 2017 15.8. Two Q's, will the community version work and the download page has 15.9 has that been tested with zig?
meheleventyone has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wink__ has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
meheleventyone has joined #zig
qazo has joined #zig
seedofonan has joined #zig
meheleventyone has quit [Remote host closed the connection]
meheleventyone has joined #zig
<seedofonan> I'm trying to build the Zig in the Wild project Micro:Bit Demo. The author says "Linking does not work properly with Zig" but then the codebase is also fairly old, almost 1 yr. I've corrected the small amount of bitrot so zig produces an .obj. The linker from GCC ARM embedded complains "zig-cache\test.obj: file not recognized" -- a lot worse than "not work properly". Is that expected, or am I probably doing something wrong?
wink__ has joined #zig
seedofonan has quit [Ping timeout: 256 seconds]
seedofonan has joined #zig
wootehfoot has joined #zig
wink__ has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
steveno has joined #zig
Hejsil has joined #zig
<Hejsil> --test-filter is not very useful... If your global test that imports all other tests doesn't match the filter, then no tests are run...
qazo has quit [Ping timeout: 245 seconds]
belgin has joined #zig
belgin has left #zig [#zig]
<j`ey> seedofonan: you can run 'file' on it
<seedofonan> j`ey, I don't understand about 'file'. What should I try?
<j`ey> file zig-cache\test.job
<j`ey> oh, this is on windows?
meheleventyone has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
meheleventyone has joined #zig
meheleventyone has quit [Client Quit]
meheleventyone has joined #zig
meheleventyone has quit [Client Quit]
meheleventyone has joined #zig
meheleventyone has quit [Client Quit]
meheleventyone has joined #zig
meheleventyone has quit [Client Quit]
meheleventyone has joined #zig
Zaab1t has quit [Quit: bye bye friends]
<seedofonan> j`ey, yes, on windows. What help is the file test.job? There isn't one in my zig-cache, though.
<j`ey> I meant obj, not job
very-mediocre has quit [Quit: Page closed]
steveno has quit [Ping timeout: 268 seconds]
meheleventyone has quit [Remote host closed the connection]
meheleventyone has joined #zig
<seedofonan> I got past last problem. My link needs "--target-environ eabi". On to the next. Thanks j`ey and anyone listening :-)
<seedofonan> I mean, my zig.exe build-obj needs "--target-environ eabi"
meheleventyone has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ichorio has joined #zig
Ichorio has quit [Remote host closed the connection]
seedofonan has quit [Ping timeout: 256 seconds]
<MajorLag> When did @field get updated to support accessing non-field type-namespaced definitions? The things I miss without the chatbot. I'll have to find a way to keep abreast of the changes without it.
wootehfoot has quit [Read error: Connection reset by peer]
<Hejsil> MajorLag, I dont think @field has changed since it was added. It should work the same as a.b, for any types of a
<MajorLag> Oh wait, you're right. The issue wasn't calling it on type.definition, it was trying to use it to get the type of a field from a type using @typeOf(@field(T, field_name)). Nevermind. Still, I should track changes better.
seedofonan has joined #zig
seedofonan has quit [Ping timeout: 256 seconds]
Hejsil has quit [Ping timeout: 256 seconds]
qazo has joined #zig
qazo has quit [Ping timeout: 250 seconds]
Ronja has quit [Ping timeout: 264 seconds]
_whitelogger has joined #zig