ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
atk has quit [Quit: Well this is unexpected.]
atk has joined #zig
stereosteve has joined #zig
stereosteve has quit [Client Quit]
SimonNa has joined #zig
SimonN has quit [Ping timeout: 268 seconds]
Sahnvour has quit [Quit: Page closed]
<mreiland> I saw a discussion in here and I'd like to be explicit, does dot syntax dereference pointers completely?
<mreiland> a.b will do the right thing whether a is a value or a pointer or a double pointer?
<mreiland> am I understanding that correctly?
<andrewrk> mreiland, we now have single-item pointers - *T - and unknown-length pointers - [*]T
<andrewrk> for single-item pointers, field access can do 1 dereference
<andrewrk> for unknown length pointers, field access cannot deref
<mreiland> alright, thanks
<mreiland> did you see the note yesterday about the 301 redirects on the download page causing issues?
<mreiland> the download link is issuing a 301 which is moved permanently and it's causing browsers to cache so that when a person tries to download a new version of master the browser doesn't see it
<mreiland> that should probably be a 307 I believe (moved temporarily). just thought I'd mention it in case you didn't see it
<mreiland> I think that's the proper status code for it
<mreiland> in addition the date-modified header is wrong, it's showing 5/23, but my understanding is that it was updated a day or so ago
<andrewrk> mreiland, are you referring to this link? https://ziglang.org/builds/zig-linux-x86_64-master.tar.xz
<andrewrk> damn, I don't think s3 lets you make the redirect non-301
<mreiland> yes, that's the link
clownpriest has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mreiland> it's still trying to pull down 0.2.0.717ac85a.tar.xz, I had to pull it up in a private window to get the latest
<mreiland> without forcing FF to flush caches
<andrewrk> looks like it's possible. I have to jump through a bunch of hoops to get the redirect code to be non-301
<andrewrk> I'll make an issue
<mreiland> I'm not an expert on browser caching behavior, but I believe the date-modified isn't correct and I know my browser was sending the if-modified-since header when it made the request
<mreiland> so it could be simply that the date-modified header needs to be correct and then the browsers will start grabbing the latest version appropriately
<mreiland> I added a note about the last-modified and if-modified-since headers
<andrewrk> thanks
<andrewrk> that's where it uploads the file. I guess the clock could be wrong on travis ci
<mreiland> I did a little more investigation and updated that issue. I'm not really familiar with S3 or your setup so it's all just WAG's, but hopefully it's helpful
<andrewrk> thanks!
cenomla has joined #zig
cenomla has quit [Quit: cenomla]
darithorn has quit [Quit: Leaving]
<GitHub99> [zig] andrewrk pushed 1 new commit to master: https://git.io/vhlMs
<GitHub99> zig/master 96164ce Andrew Kelley: disallow single-item pointer indexing...
<andrewrk> ^ this is a breaking change, part of pointer reform
alpha has joined #zig
<alpha> andrewrk: https://github.com/ziglang/zig/issues/1041#issuecomment-394243666 But isn't that how the windows cmd also works? That you cannot use spaces in path, and if you use it then you need to pass the whole path within quotes
<andrewrk> yes, but std.ChildProcess.create is not trying to mimick cmd
<alpha> Well anyways, currently even `C:\zig\zig build` fails, and you need to be explicit and type `C:\zig\zig.exe build` for it to work
<andrewrk> thanks for the bug report - I'm planning on doing bug fixes and merging of pull requests tomorrow
<alpha> Thank you. Also I think this should have a newline after `file not found` -> `unable to open 'C:\Users\alpha\Desktop\s\src\main.zig': file not foundThe following command exited with error code 1:`
<andrewrk> noted
davr0s has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
return0e has quit [Remote host closed the connection]
return0e has joined #zig
<alpha> What is the equivalent to `--library` in the build.zig file?
davr0s has joined #zig
alpha has quit [Quit: Page closed]
kristate has joined #zig
<kristate> Hi
clownpriest has joined #zig
<kristate> I'm hooked on zig and want to know what I can do to help
clownpriest has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
clownpriest has joined #zig
clownpriest has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
quc has joined #zig
Tobba_ has joined #zig
Tobba has quit [Ping timeout: 256 seconds]
mreiland has quit [Ping timeout: 260 seconds]
Ichorio has joined #zig
vec__ has joined #zig
DuClare_ has joined #zig
ltr__ has joined #zig
vec_ has quit [*.net *.split]
DuClare has quit [*.net *.split]
ltr_ has quit [*.net *.split]
kristate has quit [Ping timeout: 260 seconds]
<MajorLag2> kristate, there's a lot of things. If you look at github userland issues, for instance. We can always use improvements to the std library as well. Oh, and win32 is in desperate need of someone to tackle coff/pdb stack traces.
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
alpha has joined #zig
<alpha> Is code written in zig supposed to segfault?
<MajorLag2> generally not. is it a compiler segfault or your program?
<alpha> program
<MajorLag2> zig has runtime protections to catch many kinds of problems in debug/release-safe builds, but doesn't catch everything.
<MajorLag2> do you have a code snippet of what's causing the segfault?
<alpha> The code is big right now. Will try to find the exact cause
<alpha> https://ziglang.org/documentation/master/#union - Example - Unions can be given an enum tag type - How to create a variable and assign it the NotOk (void) type?
<MajorLag2> `const c = ComplexType { .NotOk = {} };`
<MajorLag2> or `const c = ComplexType { .NotOk = void{} };` to make it more obvious
<alpha> Thank you
alpha has quit [Ping timeout: 260 seconds]
davr0s has joined #zig
alpha has joined #zig
<alpha> Why does this https://pastebin.com/NhegLNky give `error: expression value is ignored` but this one does not https://pastebin.com/k8rjDtRX ?
<MajorLag2> ...I don't know. That might be a bug. @andrewrk ^ ?
mediocre has joined #zig
mediocre is now known as very-mediocre
<alpha> MajorLag2: 👍
<alpha> andrewrk: building stage2 compiler also fails on windows with `reached unreachable code`
alpha is now known as NeeleshChandola
NeeleshChandola has quit [Quit: Page closed]
clownpriest has joined #zig
darithorn has joined #zig
<andrewrk> linkSystemLibrary
cas_ has joined #zig
<clownpriest> functions only return 1 value right?
<clownpriest> any plans on adding multiple return values to functions?
bheads_ has joined #zig
<GitHub106> [zig] andrewrk pushed 9 new commits to master: https://git.io/vh8Eg
<GitHub106> zig/master 8fc52a9 tgschultz: Added custom formatter support, refactored fmt.format
<GitHub106> zig/master 8174f97 tgschultz: Merge pull request #2 from ziglang/master...
<GitHub106> zig/master 8c18725 tgschultz: Merge pull request #1 from zig-lang/master...
<GitHub196> [zig] andrewrk closed pull request #1029: Add custom format support for struct/union/enum types (master...zig-custom-format) https://git.io/vhGYr
<andrewrk> clownpriest, correct. See https://github.com/ziglang/zig/issues/208
<clownpriest> awesome, thank you
bheads__ has quit [Ping timeout: 276 seconds]
cas_ has quit [Quit: Page closed]
darithorn has quit [Quit: Leaving]
darithorn_ has joined #zig
darithorn_ has quit [Quit: bye]
alpha has joined #zig
<alpha> andrewrk: How to include *.c file for compilation and linking alongside zig code?
<alpha> andrewrk: Any ETA on when we get proper traces on Windows? Because right now, nearly everything I am trying to do is crashing without any error and it is very hard to debug.
alpha has quit [Client Quit]
<andrewrk> alpha, const obj = b.addCObject(name, path); exe.addObject(obj);
<andrewrk> I'm going to try to solve some of these windows bugs today. eta on stack traces for windows, 6 months from now
<andrewrk> failing silently is a big problem. it's not supposed to do that
alpha has joined #zig
<alpha> Okay, thank you.
<alpha> Another `reached unreachable code Unable to dump stack trace: Unable to open debug info: TodoSupportCoffDebugInfo` on using `const obj = b.addCObject(name, path); exe.addObject(obj)` :(
<GitHub99> [zig] andrewrk closed pull request #1033: Add a format guard (master...fmt-guard) https://git.io/vhC8k
<GitHub136> [zig] andrewrk pushed 1 new commit to master: https://git.io/vh8rd
<GitHub136> zig/master d21a192 Andrew Kelley: support `zig fmt: off` and `zig fmt: on` between top level decls...
<andrewrk> alpha, you can use msvc to debug that
<alpha> All the crashes that I have observed crash with Exception Code: 0x80000003, Exception Information: A breakpoint was encountered.
<alpha> Never Used msvc. Will try.
<alpha> Yup. Got msvc to work
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<alpha> Crashing with ERROR_INVALID_HANDLE
alpha has quit [Quit: Page closed]
alpha has joined #zig
<alpha> It would be good to print getLastError() message before crashing on windows. Some context is better than no context.
alpha has quit [Client Quit]
DuClare_ has quit [Changing host]
DuClare_ has joined #zig
DuClare_ is now known as DuClare
howru has joined #zig
<howru> hey guys
<howru> Unable to find zig lib directory. Reinstall Zig or use --zig-install-prefix.
<howru> is this fixed already? on what version?
<howru> i'm on linux
<howru> nvm
bheads__ has joined #zig
bheads_ has quit [Ping timeout: 245 seconds]
howru has quit [Ping timeout: 268 seconds]
<andrewrk> alpha, did you get a line number and source file with that trace?
<clownpriest> idk why compiler thinks s needs to be a u6. what is going on?
<clownpriest> error output at the bottom
<andrewrk> clownpriest, the type system is enforcing that you do not invoke undefined behavior when using the shift operator
<andrewrk> I believe this should fix it: var s: u6 = 0;
<andrewrk> in C it's undefined behavior if you shift by a number equal to or larger than the number of bits in the left operand
<clownpriest> that makes sense
<clownpriest> thank you
<clownpriest> compiles
<andrewrk> :)
<andrewrk> idk why I used `usize` for shift, I should have used u6
<clownpriest> yes!
<clownpriest> didn't realize it was already in the stdlib
<clownpriest> should have looked more closely
<andrewrk> it's private - I would need to clean it up, make it public, and move it to std.dwarf
<andrewrk> happy to do that right now if you like\
<clownpriest> it's no rush, at least for me
<andrewrk> what are you working on btw?
<clownpriest> currently a multihash implementation for zig
<clownpriest> but the larger project is a search engine for ipfs
<andrewrk> that sounds exciting
<andrewrk> sounds like you are interested in the work on std.net and std.event
<clownpriest> yeah, wish i had more time, it's all on spare time, wish i could do this full time
<andrewrk> believe me I know what you mean
<clownpriest> yeah i'm going to do a dive into that code as soon as i can
davr0s has joined #zig
<GitHub35> [zig] andrewrk closed pull request #1045: Fixes for zero-sized allocation (master...minor-cpp-improvements) https://git.io/vhlaF
<GitHub182> zig/master 32e0dfd Andrew Kelley: never call malloc with size 0...
<GitHub182> [zig] andrewrk pushed 1 new commit to master: https://git.io/vh89g
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
Ichorio has quit [Ping timeout: 265 seconds]
Ichorio has joined #zig
very-mediocre has quit [Ping timeout: 260 seconds]
<clownpriest> is slice syntax the only way to go from array to slice?
<andrewrk> clownpriest, it's the recommended way. what's going on, is something awkward happening?
<clownpriest> nah, just wondering is there were some generic functions available in stdlib
<clownpriest> if there*
Ichorio has quit [Ping timeout: 240 seconds]
<clownpriest> something like to_slice(data: [n]T)
<andrewrk> why would you use that instead of foo[0..] ?
<clownpriest> no good reason, just personal aesthetics
<andrewrk> I think you would be fighting an uphill battle to try avoiding the core language syntax
<clownpriest> yeah
mcspiros has joined #zig
mcspiros has quit [Client Quit]
clownpriest has quit [Ping timeout: 240 seconds]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
MajorLag2 has quit [Ping timeout: 240 seconds]
MajorLag1 has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
profan has quit [Ping timeout: 240 seconds]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
profan has joined #zig
return0e has quit [Remote host closed the connection]
return0e has joined #zig
return0e_ has joined #zig
return0e has quit [Ping timeout: 256 seconds]
quc has quit [Remote host closed the connection]