ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
arBmind has quit [Quit: Leaving.]
hopppetosse has quit [Ping timeout: 260 seconds]
jfo has joined #zig
<jfo> andrewrk: is the hello world on the current docs page meant to build with master or with the tagged release
<andrewrk> jfo, the docs has the tag/branch in the URL
<jfo> ah great
<andrewrk> note that the master branch one now is automatically tested
<andrewrk> so all those code snippets are correct
<jfo> yeah I saw that ++
<jfo> I've got a brew formula ready
<andrewrk> awesome
<jfo> there are a few things to peep before submitting a PR, I will make an issue
<andrewrk> I'll have a look
<andrewrk> anything I can help with on the linguist issue?
<jfo> yes, you're welcome to be the source of truth re: categorization in the grammar
<jfo> I will be able to take a look at it this weekend some more but I thought I'd throw it out there.
<jfo> I think it is worth thinking through it though, and being as specific as the schema of those standard classes allows
<jfo> as the syntax of the language is still evolving a lot, this will need to be maintained alongside it, at least for major release imo
<jfo> and I'll be looking forward to that compiler tour sometime :) we'll have to skype
<jfo> I have gtg to bed but I will ttyl. Please lmk your thoughts on the homebrew formula, pinning llvm@5 and how to do it in the confines of the homebrew guidelines might be a question for them, but this is basically following the readme installation instructions. I was surprised it was so easy tbqh
<jfo> see you!
jfo has quit [Quit: WeeChat 1.9.1]
<GitHub89> [zig] andrewrk pushed 1 new commit to master: https://git.io/vNVAT
<GitHub89> zig/master cf39819 Andrew Kelley: add new kind of test: generating .h files. and more...
<GitHub23> [zig] andrewrk pushed 1 new commit to master: https://git.io/vNVxp
<GitHub23> zig/master fa7072f Andrew Kelley: docgen: verify internal links
jfo has joined #zig
m6w6 has quit [Quit: ZNC - http://znc.in]
m6w6 has joined #zig
jfo has quit [Ping timeout: 260 seconds]
hoppetosse has joined #zig
hoppetosse has quit [Ping timeout: 265 seconds]
arBmind has joined #zig
arBmind has quit [Quit: Leaving.]
hoppetosse has joined #zig
hopppetosse has joined #zig
hoppetosse has quit [Ping timeout: 255 seconds]
<GitHub75> [zig] tiehuis opened pull request #716: Add array type handling for gen_h (master...export-c-additions) https://git.io/vNwlL
arBmind has joined #zig
hoppetosse has joined #zig
hopppetosse has quit [Ping timeout: 256 seconds]
redj has quit [Ping timeout: 256 seconds]
redj has joined #zig
redj has quit [Ping timeout: 240 seconds]
hoppetosse has quit [Ping timeout: 265 seconds]
MajorLag_ has joined #zig
<MajorLag_> I have to admit to being annoyed by tabs being invalid. It seems you've made a decision to end stupid tab vs space arguments by being needlessly draconian.
jfo has joined #zig
jfo has quit [Client Quit]
SimonNa has joined #zig
<GitHub92> [zig] andrewrk pushed 1 new commit to master: https://git.io/vNwDB
<GitHub92> zig/master b8dcdc7 Andrew Kelley: Merge pull request #716 from zig-lang/export-c-additions...
<GitHub104> [zig] andrewrk closed pull request #716: Add array type handling for gen_h (master...export-c-additions) https://git.io/vNwlL
<andrewrk> MajorLag_, soon you'll be able to use `zig fmt` to fix spacing issues. would this resolve your annoyance?
<andrewrk> also I'm curious what OS you're using
<andrewrk> ah, windows right? you ran into that LLD error
hoppetosse has joined #zig
hopppetosse has joined #zig
hoppetosse has quit [Ping timeout: 240 seconds]
<GitHub187> [zig] andrewrk pushed 1 new commit to master: https://git.io/vNrfu
<GitHub187> zig/master c2838f2 Andrew Kelley: fix printf format specifier
redj has joined #zig
<andrewrk> I'm also curious about your text editor. Visual Studio?
hopppetosse has quit [Ping timeout: 264 seconds]
<MajorLag_> andrewrk, it's a minor thing. Notepad++ doesn't have a way to specify tab->space conversion for user defined languages so I have to set it as the default. The annoyance is philosophical, really, I don't believe it is the compiler's job to enforce formatting. With tabs and newline, not a big deal, but if it were to start mandating K&R indentation or something I'd probably just give it up.
<andrewrk> we're not going to do something like that. Although it is planned to catch accidentally mis-indented code
<andrewrk> josh wolfe makes an argument for line endings here: https://github.com/zig-lang/zig/issues/663
<andrewrk> also, sounds like we should make a pull request to notepad++ adding zig
<MajorLag_> How would you define "accidentally"?
<andrewrk> for example: https://paste.ubuntu.com/26445466/
<andrewrk> it doesn't enforce how much you indent, just that you do, when you nest something, and that you outdent correctly when you unnest something
jfo has joined #zig
hoppetosse has joined #zig
<MajorLag_> I doubt that will cause me any grief, but it might for someone who has a lot of nesting and a narrow column limit. Still, seems like it would catch enough mistakes to justify it anyway.
<andrewrk> it still allows indenting with, e.g. 1 space
<andrewrk> as long as you are consistent for a given nesting column
arBmind has quit [Quit: Leaving.]
jfo has quit [Quit: WeeChat 1.9.1]
redj has quit [Ping timeout: 265 seconds]
cenomla has joined #zig
redj has joined #zig
<MajorLag_> How would one go about declaring a slice and initializing it? []u8{...} throws a type mismatch error []u8 vs [100]u8.
<andrewrk> MajorLag_, you have to consider the difference between the actual memory data, and a reference to said data
<andrewrk> what you initialize is actual data - this would be an array. then you take a slice of that array, which is a reference
hoppetosse has quit [Ping timeout: 256 seconds]
<andrewrk> one way to do this is to slice an array
<andrewrk> array[0..]
<andrewrk> with an initialization it probably has to go in parens: ([]u8{...})[0..]
<MajorLag_> sure, but if I do that on the initializer it won't work because then I'm trying to cast const []u8 to []u8
<andrewrk> you want mutable data
<andrewrk> I suggest `var array = []u8{...};` and then `const slice = array[0..];`
<MajorLag_> In this case, it probably doesn't have to be, but yeah.
<andrewrk> if you show me the non-working code I can probably suggest a fix
hoppetosse has joined #zig
<MajorLag_> I'm more or less just working out my understanding of Zig's syntax right now.
<andrewrk> there is some discussion related to that here: https://github.com/zig-lang/zig/issues/568
alexm_ has joined #zig
ofelas has quit [Quit: shutdown -h now]
ofelas has joined #zig
<andrewrk> MajorLag_, I'm very open to an alternate syntax for slices and arrays if we come up with something better
<andrewrk> I think the syntax and semantics can evolve somewhat independently
hoppetosse has quit [Remote host closed the connection]
alexm_ has quit [Ping timeout: 260 seconds]
<lqd> andrewrk: I presume something like `const message: [5]u8 = ['h', 'e', 'l', 'l', 'o'];` is no good ?
<andrewrk> lqd, const message = "hello";
<lqd> lol
<andrewrk> or: const message = []u8{'h', 'e', 'l', 'l', 'o'};
<andrewrk> or: const message: [5]u8 = [5]u8{'h', 'e', 'l', 'l', 'o'};
<lqd> yeah :)
<lqd> I was more thinking about your "open to alternate syntax for arrays" comment :)
<lqd> and I wasn't clear about that at all
<andrewrk> ahh