ChanServ changed the topic of #zig to: zig programming language | https://ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
n_1-c_k has quit [Read error: Connection reset by peer]
n_1-c_k has joined #zig
<kurufu> Oh i found the reason linkages were not working. I needed to link libc for the loader to trigger. You learn something every day.
chemist69 has quit [Ping timeout: 250 seconds]
chemist69 has joined #zig
ltriant has quit [Read error: Connection reset by peer]
ltriant has joined #zig
mikdusan has quit [Quit: WeeChat 2.5]
mikdusan has joined #zig
ltriant has quit [Quit: leaving]
andrewrk has quit [Ping timeout: 265 seconds]
andrewrk has joined #zig
mahmudov has joined #zig
kenaryn has joined #zig
ave_ has joined #zig
<kenaryn> Hello, I do not see 'class' concept in the official documentation, but there are struct anyway with field names and unary operator (i.d. spacenames) to access it, does it even leave Zig with an object-oriented paradigm or is it "just" a declarative programming language?
<mq32> kenaryn, zig structs are a mix of namespace and record
<mq32> so for object oriented terms: a zig struct is both namespace (so: static members) and a non-derivable, non-interfaceable class without constructors #buzzwords
<mq32> or simpler: C structs with "member function call syntax"
<kenaryn> Lol I like your hash tag, thank you for instructing me.
<kenaryn> I thought for a time that purely functional languages would be the future, likely to dominate both RISCV and edge-computing hardware.
<kenaryn> But each year, there is only one paradigm discussed at the programming language symposium: the declarative one.
<earnestly> It's popular in academia, like microkernels
<mq32> kenaryn, i think there's only one "real" paradigm: imperative, because that's how computers work and someone has to do the imperative work
<earnestly> Everyone forgets about proceedural :/
<mq32> earnestly, a quick search says: https://i.stack.imgur.com/Ip5eR.jpg
<earnestly> All hail the google search
<kenaryn> :)
<mq32> :D
Ichorio has joined #zig
Ichorio has quit [Ping timeout: 245 seconds]
<mps> mq32: +1 (regarding imperative)
<kenaryn> It is very short and stay simple.
rifkik has joined #zig
<rifkik> gingerBill on Discord says: Does anyone here work on the Zig compiler and could answer a technical question regarding calling conventions? I'm personally trying to figure out how LLVM deals with the System V ABI.
<rifkik> can anyone answer this?
avitkauskas has joined #zig
mahmudov has quit [Ping timeout: 276 seconds]
mahmudov has joined #zig
avitkauskas has quit [Remote host closed the connection]
<earnestly> kenaryn: you might like this: https://www.youtube.com/watch?v=mrY6xrWp3Gs (it takes awhile to get going)
<ceymard> does anyone know what the anyframe-> construct is ?
<ceymard> or even the -> operator
tdeo has quit [Quit: Quit]
utzig has joined #zig
tdeo has joined #zig
<mq32> ceymard, anyframe->T is a "future" value from the async stuff
<mq32> -> isn't an operator here, but part of the typename (at least that's how i understood it)
mahmudov has quit [Ping timeout: 240 seconds]
<tgschultz> -> operator always struck me as incongruent with the rest of the language since it is only ever used in async. Seems like it should be @anyframe(T) or something.
<mq32> @AnyFrame(T) probably
<mq32> anyframe would be a function :P
mahmudov has joined #zig
<kenaryn> Many thanks earnerstly, I did not see your message sooner.
<ceymard> mq32: so which part's which ? is anyframe a keyword ?
<kenaryn> ceymard according to https://github.com/ziglang/zig/issues/2377#issuecomment-514714560 it seems to be a type AND not a keyword.
<daurnimator> I think there are plans to turn several types back into keywords
<daurnimator> the issue is that keywords can be avoided with @"keyword" but non-keywords end up with a shadowing error
dingenskirchen has quit [Ping timeout: 250 seconds]
dingenskirchen has joined #zig
dingenskirchen has quit [Client Quit]
dingenskirchen has joined #zig
<kenaryn> Why do not remove `@"keyword"` from the Parsing Expression Grammer? Is it justified to keep it?
<mq32> kenaryn, it's quite relevant actually
<mq32> just imagine you want to import a c-function named "fn"
<kenaryn> I understand, thanks for the obvious use case :D
<mq32> or the reoccuring joke here: if you want to export a poop emoji named variable :D
<kenaryn> LOL
ky1ko has joined #zig
ky0ko has quit [Ping timeout: 252 seconds]
<daurnimator> huh?
<daurnimator> kenaryn: e.g. `somestruct.@"while"` because `somestruct.while` is a syntax error. also `somestruct.@"field with e.g. spaces"`
<kenaryn> Allright, it is quite relevant indeed.
<kenaryn> In a normal struct, bool type has 1 byte-length, I am right?
<mq32> i think bool has "1 bit length" and whatever the struct layouter makes out of your boolean
<kenaryn> 1 byte-width*
<fgenesis> if it's a non-exported struct, probably yes
<fgenesis> i mean, bool = u1
<mq32> fgenesis, for non-exported it may also be a 32 bit wide type
<kenaryn> I just read in documentation that 1 bit-width is for packed struct
<mq32> but i don't know if there are some restrictions
<kenaryn> So bool has the same alignment whether it is used in a packed struct or a normal struct?
<fgenesis> well you can godbolt it and test, i guess
<mq32> is that relevant?
<mq32> packed structs guarantee "the exact layout i've written with zero bits padding", extern structs guarantee "the same thing as C would do"
<kenaryn> I do not know, I never understood when alignement is useful and/or required. Do you know at least one use case?
<mq32> neither packed nor extern doesn't guarantee anything except for "every type has natural alignment except otherwise specified"
<mq32> arm32 has the requirement that 32 bit words must be 32 bit aligned
<mq32> otherwise it will crash on access
<fengb> Normal structs don’t have guaranteed memory layout
<mq32> also you can align types so that can be accessed faster (imagine 3 byte alignment vs. 4 byte alignment: one address calculation is a shift, the other one a multiplcation)
<fengb> So the alignment is undefined... but it’s probably usize aligned
<kenaryn> Allright, I think I'm catching it a bit (joke inside).
<fengb> Oh I’m just being slow and reiterating mq32
<mq32> i really love that zig structs don't have any guarantees about memory layout by default
<mq32> this allows so many nice optimizations for speed or size :)
<fgenesis> especially when paired with PGO later on
<mq32> for speed, just reorder everything to "native alignment", for size just pack everything as tight as possible
<mq32> PGO?
<fgenesis> but i don't even know if there's any PGO that considers such things at the moment
<fgenesis> profile guided optimization
<kenaryn> Profile Guided Optimizations
<fengb> But back in my day, we reordered struct fields for fun optimizations!
<fengb> Kids these days
<fgenesis> it's like, think of java people that order class fields alphabetically, because "it's neatly ordered that way"
<andrewrk> no guaranteed memory layout also lets us insert a safety field, and detect bad pointer casts, and detect undefined values
<fengb> Docgen 😍
<mq32> fengb, fgenesis: want a good read on "How to really optimize code?" enjoy this: http://www.catb.org/jargon/html/story-of-mel.html
<mq32> related to: <fengb> But back in my day, we reordered struct fields for fun optimizations!
<fgenesis> mq32: old
<mq32> yes, very old
<fgenesis> but good, indeed
<andrewrk> fengb, are you playing with it on your computer?
<fengb> Not yet. I just saw your tweet
dimenus has joined #zig
waleee-cl has joined #zig
<andrewrk> this same semantic analysis dump that powers the docs can be used for a reasonable IDE integration. It won't be as fast or nice as the plan for self-hosted, but it's a "90% solution"
<mq32> oh man
<mq32> 0.6 development is gonna be an exciting time!
<Cadey> andrewrk: yeah but basically catalina's gatekeeper only flags binaries from the web. curl2bash and the like aren't affected somehow.
<Cadey> er
<Cadey> binaries from web _browsers_
<andrewrk> that sounds like a gross hack
<Cadey> however
<Cadey> downloading a tarball with wget/curl is unaffected
<andrewrk> interesting, that's good to know, thanks!
<Cadey> i'm going to do some research and see about writing up some instructions
<mikdusan> when using browser (safari) i don't know about chrome, downloaded files are attributed with `com.apple.quarantine`
<andrewrk> maybe browsers are opting into this API?
<mikdusan> that is my guess
<mikdusan> `xattr -d com.apple.quarantine ...` is one way to remove the attr
<Cadey> there's a few ways
<Cadey> 1. make your terminal exempt from gatekeeper (very powerful hammer)
<Cadey> 2. tell gatekeeper to ignore binaries
<Cadey> 3. disable gatekeeper entirely (overly powerful hammer)
<Cadey> 4. delete the xattrs
<Cadey> however
<Cadey> if you download the file via the command line
<Cadey> none of that is needed
<andrewrk> sounds like this change will not be disruptive to zig
<fgenesis> Cadey: didn't they make gatekeeper mandatory in the newest osx?
<fgenesis> as in, no more unsigned binaries at all?
<Cadey> fgenesis: when you download it with safari, firefox or chrome
<Cadey> there's a lot of FUD about this
<fgenesis> i've seen someone at apple say they wanted to do this eventually but not sure if it's now like this or not yet
<Cadey> one moment, getting a screenshot
<fgenesis> because no unsigned binaries is going to be a huge blow for any dev
<andrewrk> fgenesis, Cadey just did a bunch of testing, did you see above?
<fgenesis> i don't care, i'll just stop compiling stuff for osx, but for any dev still targeting osx it's going to be baaad
<fgenesis> yes but that was about the quarantine bit
<fgenesis> that is very similar to how windows tracks binaries downloaded from the interent and warns you
<andrewrk> what makes you think the quarantine bit is unrelated to signed binaries?
<fgenesis> (search for "windows zone checking" for the details)
mahmudov has quit [Ping timeout: 240 seconds]
<fgenesis> quanratine bit is fs-based
<fgenesis> signature is attached to the binary and can't be faked
<Cadey> fgenesis: you are making emotional arguments, please see my screenshot
<fgenesis> Cadey: did you turn off gatekeeper?
<Cadey> no
<Cadey> like i said
<Cadey> binaries _downloaded with the command line_ are exempt
<fgenesis> that is just weird. i've had a lot of problems shipping osx binaries lately
<fgenesis> another thing to test, thx for the pointer
<Cadey> now downloading it with safari
<fgenesis> maybe there's a difference for console progs vs UI progs?
<mikdusan> apparently the date is January 2020 for whatever this notarization requirement turns out to be for command-line, if any
<fgenesis> since console stuff isn't typically targeted towards the "end user"?
<fgenesis> um what
<Cadey> mikdusan: citation needed
mahmudov has joined #zig
<andrewrk> ah yes this ^ is the thing I was thinking of
<fgenesis> so that means if you set back your clock and build so the binary has an older timestamp it'll continue to run? o_O
<Cadey> andrewrk: even then, there's going to be the spctl --add workaround
<mikdusan> tbh i'm still confused by all this how it applies to command line exe, dylib, and .app bundles
<fgenesis> mikdusan: from what i've gathered when reading up on this a while ago, everything in an app bundle must be signed, recursively
<Cadey> mikdusan: until there is clarity about it, it's fair to assume that the existing state of the world will be maintained for command line software
<Cadey> fgenesis: _app bundle_
<fgenesis> means you can't just load a random .dylib, it'll fail
<Cadey> zig does not distribute itself as an _app bundle_
<andrewrk> I agree with Cadey
<Cadey> and tbh
<Cadey> if it does turn out that we need to notarize zig
<Cadey> we'll figure it out when it happens
<Cadey> we don't know if that will happen though
<Cadey> so it's probably a waste of time and effort to care until proven otherwise
<andrewrk> yes
<Cadey> there are currently four workarounds for installing zig on macs
<Cadey> hell 5 if you include homebrew
Snektron has joined #zig
mahmudov has quit [Remote host closed the connection]
<donpdonp> i was just reading about https://wiki.debian.org/X32Port and pleasantly surprised to see gnux32 as a zig target. not that im likely to ever use it but its interesting to see.
<fengb> Hmm... could X32 be faster due to being more cache friendly?
<fengb> Wikipedia says 5-8% faster :P
kenaryn has left #zig ["("Never surrender!")"]
<fgenesis> depends on the data structures in use
<fgenesis> for pointer heavy things it'll save RAM too
<donpdonp> turns out i rarely need to reference 12PB beyond $0000 :)
<andrewrk> the addresss space is nice though
<andrewrk> x32 reduces the safety mechanism of GeneralPurposeDebugAllocator
wootehfoot has joined #zig
doesntgolf has joined #zig
<tgschultz> andrewrk, how is Windows's non-compliant UTF16 handled currently in std? From a little poking around I'm guessing it is ignored?
<andrewrk> I consider this unsolved. If it works, it's an accident
<tgschultz> I'm more concernd about the other direction. Specifically if there is any consideration for unpaired surrogates.
meheleventyone has joined #zig
<andrewrk> I believe we either assume windows gives correct unicode or an error code
<andrewrk> this is not the planned final state of the API. zig std lib should be able to deal with invalid unicode file names, if windows allows it
<tgschultz> it does in certain contexts. it's a pain for everyone
FireFox317 has joined #zig
<FireFox317> andrewrk: I've been poking around a bit with the new documentation stuff, is there anything i can help with?
<andrewrk> FireFox317, yes, absolutely
<andrewrk> we'll want to coordinate a bit to not clobber, but there is much to do
<andrewrk> big picture: poke around in the generated docs and find docs that don't look good or could be improved, figure out what can be done, do it, repeat
<andrewrk> here's a concrete suggestion; add fields to struct types
<andrewrk> let me push what I have
<andrewrk> I'm about to add error sets :)
<FireFox317> I would like to try to implement that (the fields to struct types)
<FireFox317> Yeah, i thought it would be better if you do the error sets yourself, because that seems pretty complicated xd
<andrewrk> give me 10 min to run local tests and I'll push 1 more commit
<andrewrk> let me know if you want tips setting up edit/build/test cycle. once you have a semantic analysis dump, it's easy to modify just the js file and refresh
<FireFox317> Sure!
<FireFox317> Currently I'm generating the docs with this: `./zig test ../lib/std/std.zig -fgenerate-docs --output-dir zig-cache --override-lib-dir ../lib`. That is correct right?
<andrewrk> yes
<andrewrk> and then I just manually run `cp ../lib/std/special/docs/main.js zig-cache/docs/ && cp ../lib/std/special/docs/index.html zig-cache/docs/` (using bash ctrl+r) and f5 in firefox
<andrewrk> if you want to poke around the data dump with a repl, you can run require("./build/zig-cache/docs/data.js") in a nodejs repl, and look at `zigAnalysis`
<companion_cube> andrewrk: have you considered using gh-pages instead of docs/?
<andrewrk> or in the firefox dev console
<companion_cube> in my experience it doesn't clutter the git history as much
<andrewrk> companion_cube, I think you are misunderstanding what the latest commits in master branch are doing
<companion_cube> :(
<FireFox317> Ah yeah, that seems handy. You also said something about opening the json output in firefox right?
<companion_cube> :)
<companion_cube> damnit
<andrewrk> companion_cube, that's just what the name of the generated directory is, which is now `docs/`. the github thing is just taken to be a hint about what a more "standard" directory name is
<andrewrk> if there's evidence that doc/ is more "standard" then we can revert.
<companion_cube> heh, ok
<companion_cube> (thought you were publishing on github pages, my bad)
<andrewrk> my guess is you saw how fast those files were changing and thought they were output files rather than source :)
<andrewrk> FireFox317, ok my working dir is clean now
<andrewrk> I think if you do struct fields it will not clobber
<FireFox317> Okay, what do you think of putting the struct fields into types->fields in the json (ofcourse only when the kind is a struct)
<FireFox317> Yes indeed!
<andrewrk> FireFox317, let me know if you have any questions. this code is brand new, so there are lots of loose ends
<andrewrk> it's also really easy & fun to hack on :)
<andrewrk> well. easy is subjective but I think it's fair to say relative to ir.cpp
<FireFox317> Jup, I will ask if I have any
<FireFox317> andrewrk: What would be a good file in the std to start with, instead of testing the whole std?
<andrewrk> what's the goal here? reduce time waiting for `zig test` to complete?
<andrewrk> smaller more manageable json?
<FireFox317> smaller json indeed
<andrewrk> even a minimal source file is going to drag a lot in. you can do that with https://gist.github.com/andrewrk/5684434a2a8d4cbb08bb0d855c4f2ada
<FireFox317> Something like buffer maybe?
<andrewrk> then add your struct
<FireFox317> Ah jup of course, thanks
n_1-c_k has quit [Read error: Connection reset by peer]
n_1-c_k has joined #zig
meheleventyone has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dec0de has quit [Quit: Connection closed for inactivity]
<FireFox317> andrewrk: I'm wondering if i should use 'src_field_count' or 'gen_field_count' to loop over all the fields in a struct. Or should I just loop over the 'fields_by_name' HashMap?
<andrewrk> src. gen has to do with llvm ir
<FireFox317> Okay
<FireFox317> andrewrk: just so i'm doing this correct, would you also store a field as a json object with a name and a type? ex: "fields" : [ {"name": "some_name", "type": <type_index> } ]
<andrewrk> FireFox317, yes looks right
<FireFox317> Cool!
<Cadey> i'm not sure if this is a grammar bug or not, but https://github.com/ziglang/zig/blob/8e2c441b2eae7af27fe311c4539f6932a7f47cea/src/main.cpp#L37 "show the source code of that ..." doesn't parse. Should it be "show the source code used in ..."?
<andrewrk> FireFox317, you'll also want "src": and then ref the ast node of the decl_node. that will give us access to the doc comments for the field
<andrewrk> Cadey, it should be s/that/of/
<andrewrk> the difference is rather academic to non-native english speakers
<andrewrk> feel free to fix it though
<Cadey> "show the source code of of ..." or "show the source code of"?
<FireFox317> andrewrk: Okay, I will add that. First I'm gonna try to render it in the html :)
<andrewrk> Cadey, pardon me, yes, s/that//
<Cadey> :+1: just making sure
<Cadey> making a patch
<andrewrk> FireFox317, I highly recommend using the integrated debugger in the browser, if you're not accustomed to that
<andrewrk> you can even put expressions on breakpoints
<andrewrk> Cadey, thanks!
<FireFox317> Hahah okay, I will see if i have to use it
<Cadey> andrewrk: no problem! glad to help
<Cadey> also that got me one step closer to a free tshirt \o/
<andrewrk> lol where did you get that idea?
<andrewrk> or is this you trying to incept it
<Cadey> hacktoberfest
doublex_ has quit [Ping timeout: 240 seconds]
doublex has joined #zig
<Cadey> though i have actually had ideas for a proper zig tshirt
<Cadey> showing the zig logo on a {light|dark} background and the text 'for great justice' either below it or on the back
<doublex> you know what you doing
<fengb> Are you volunteering to organize shirts? 😇
<FireFox317> andrewrk: How would you display the fields in the DOM? Right now I added an extra section similar to Functions and called it Fields. Should I put the type on that page too, something like: "reallocFn: <link to type>"
<andrewrk> FireFox317, Fields section is good. I think it should be at the top, above Types and Functions
<FireFox317> Okay!
<andrewrk> look for callsites of typeIndexName() for how you can display types with proper coloring and hyperlinks
<andrewrk> I hooked this up with parameter types
<tgschultz> oh, we're using GetCommandLineA()?
<andrewrk> tgschultz, I believe that's the last holdout for A vs W APIs
<tgschultz> may as well fix that then if I'm doing this
<andrewrk> there's a really stupid thing with the API for this case which I haven't figured out how to solve
<andrewrk> apparently when you start a child process, the *parent* decides whether the command is unicode or not
<tgschultz> hmm
<andrewrk> I need to refresh my memory on this
<tgschultz> and why aren't we using CommandLineToArgs? Seems like it avoids manually parsing the commandline, but maybe there's some catch I'm not aware of?
<tgschultz> *CommandLineToArgv
<andrewrk> CommandLineToArgs is all userspace, no need for a dependency on Windows there
<andrewrk> ability to do it at comptime, cross compile, statically allocate, etc
<tgschultz> I think I'm missing something.
doesntgolf has quit [Ping timeout: 240 seconds]
<tgschultz> The code to parse the commandline is already windows-only code in the windows ArgIterator. Why not just use CommandLineToArgv instead?
<andrewrk> I'm pretty sure we run those tests for all targets
<andrewrk> it also depends on Shell32.dll which is an unnecessary dependency
<andrewrk> currently the only dep on shell32 is fs.getAppDataDir
<andrewrk> our version works at comptime, can be inlined by the optimizer. I also don't trust CommandLineToArgvW. Does it panic on OOM? what else does it do? no need to depend on system things unless necessary
Ichorio has joined #zig
porky11 has joined #zig
<FireFox317> I'm getting closer ^^
<andrewrk> me too with regards to error sets :)
<FireFox317> andrewrk: It looks like this currently: https://gist.github.com/FireFox317/f1bc2b64055a8eea09cc15ce5d673db3
<andrewrk> FireFox317, looks good!
<tgschultz> andrewrk: I'm really confused about how one can parse a commandline at compile time. https://github.com/ziglang/zig/blob/master/lib/std/process.zig#L276
<tgschultz> however, the extra dll dependency is good enough for me
<tgschultz> we already can fail to parse commandline anyway because it could theoretically contain invalid unicode
<FireFox317> Should I add a PR for this? I cannot completely finish it now, since it is getting late here
<andrewrk> FireFox317, sure, I'd be happy to finish it up & merge it for you
clktmr has joined #zig
<Sahnvour> andrewrk: using https://gitlab.kitware.com/cmake/community/wikis/FAQ#make-override-files I'm able to override the base compilation flags cmake uses for zig, but not for some dependencies. works for embedded_lld for example, but not softfloat, any idea ?
<andrewrk> Sahnvour, I'd prefer to not support that, why do you need to do that?
<Sahnvour> can be helpful to temporary lower the optimization level in release and workaround the codegen bug ; but mostly I want to have zig build with /MD in Debug to try to link to a Release llvm
<mps> I made ziglang apk's and installed them on alpine linux, running 'zig build docgen.zig' I got 'Unable to find zig lib directory'
<mps> I have /usr/lib/zig/ with subdirs 'include/ libc/ libcxx/ libunwind/'
<andrewrk> mps, that's missing std/. where is the binary?
<mps> do I need to set some ENV variable or some cli parameters to tell zig where to search libs
<mps> /usr/bin/zig
<andrewrk> zig looks for ../lib/zig/ relative to its own executable
<andrewrk> so that should be ok
<mps> that is /usr/lib/zig
<andrewrk> maybe you can do an strace looking for open() calls to see where it is looking
ltriant has joined #zig
<mps> ah, I don't have /usr/lib/zig/std/
<mps> so, my build is of pkg is broken
waleee-cl has quit [Quit: Connection closed for inactivity]
<mps> s/is of/of/
<FireFox317> andrewrk: Would you sort the fields by name?
<andrewrk> hmm good question. the fields are observable by comptime reflection, which is an argument against. there is no guaranteed in-memory layout, which is an argument for
<andrewrk> it's uncommon to have a large number of fields, which is an argument against
<andrewrk> I'd say no
<FireFox317> 👍
<FireFox317> It's not really a lot of code, but it was a nice to contribute a bit :)
<mps> andrewrk: here is new build log http://tpaste.us/eeEV with error at the end. I removed '-DZIG_SKIP_INSTALL_LIB_FILES=ON' from cmake invocation
<mps> I have seen that the Arch linux maintainer set it in PKGBUILD to build it in two pass, but don't understand why
<andrewrk> mps, you're trying to copy files to root-owned directories without root
<mps> I'm using standard alpine 'abuild'
<mps> I think it uses fakeroot
<mps> let me see, will try as root
waleee-cl has joined #zig
<andrewrk> if your build process insists on separating `make` and `make install` then you can set -DZIG_SKIP_INSTALL_LIB_FILES=ON during make, then `cmake -DZIG_SKIP_INSTALL_LIB_FILES=OFF` before your install step
<andrewrk> that should not be necessary though. I recommend to leave the option as the default (off) and do the `make install` in 1 step.
<andrewrk> FireFox317, nice work, are you afk now or sticking around for fixups?
<mps> I think 'abuild' set something which causes that issue
<mps> will try manually as it is written on zig site
FireFox317 has quit [Remote host closed the connection]
FireFox317 has joined #zig
<andrewrk> this would Just Work if cmake let us add a custom command to the install target
<andrewrk> I'm not happy about that
<mps> 'su ; make' worked
<mps> not good, but better
<FireFox317> andrewrk: I'm here for some fixups :)
<andrewrk> mps, it's fine. just leave that option as the default and skip the unnecessary `make` step
<andrewrk> go straight to make install, do not pass go, do not collect 200 USD
<mps> eh, it will not pass alpine builders then
<andrewrk> I believe it will if you set `make` to be simply: true
<andrewrk> (no-op)
<mps> hm, makes sense, good point
<mps> 'zig build-exe docgen.zig' works
<mps> time to 'hello world!' in zig
<FireFox317> andrewrk: I pushed the changes!
<andrewrk> FireFox317, nice work, merged!
<FireFox317> Now that I'm into this, it is actually really fun coding
<andrewrk> just got this working: https://i.imgur.com/OEekDxD.png
<FireFox317> Damn, so cool!
<donpdonp> wow. docs for the win.
<andrewrk> one thing it doesn't do yet, which would be nice, is better infer the doc comments for errors when possible
porky11 has quit [Remote host closed the connection]
<FireFox317> andrewrk: What would be the next thing I could work on tomorrow? :) I like this, but its quite late now, so I will continue tomorrow
<FireFox317> Enums?
<andrewrk> FireFox317, I'll update #21 in a bit, so that when you look at it tomorrow there will be some ideas for you to pick
<FireFox317> Great! Goodnight y'all!
FireFox317 has quit [Remote host closed the connection]
<andrewrk> good night
<mps> using 'tab' for indent code not allowed?
<andrewrk> if you run zig fmt on save or before building it will fix it for you
<mps> understand, but tabs can't be used?
<mps> some people prefer tabs for indentation
<mps> ah, I see. although I agree and mostly use spaces for my code
mikdusan has quit [Quit: WeeChat 2.5]
<earnestly> Do you know how much larger the Linux kernel code would be if the tabs were replaced with correspondingly sized sequences of spaces?
<companion_cube> do you know how much shorter the linux kernel code would be if it used Zig? :)
<earnestly> I shouldn't be surprised a language specific channel would have users that find the cult-of-language persuasive. I don't know the answer to either question, I wondered if it had been considered
<andrewrk> tabs vs spaces is off topic here
<andrewrk> take it somewhere else
<earnestly> I'm not asking about tabs vs. spaces
<waleee-cl> You phrased your question about the linux kernel a bit like it was
<earnestly> Ah, sorry about that then
<andrewrk> discussing whether something was a conversation about tabs v spaces is even more off topic, just drop it plz
<earnestly> *shrug*
<andrewrk> there are 126 people in here; it's important to keep the signal-to-noise ratio high.
earnestly has left #zig ["WeeChat 2.6-rc2"]
wootehfoot has quit [Read error: Connection reset by peer]
samtebbs has joined #zig
n_1-c_k has quit [Read error: Connection reset by peer]
n_1-c_k has joined #zig
<mq32> andrewrk, i've just seen your tweet about inferred error set documentation... this is gonna be great! *joy*
<andrewrk> The oldest open Zig issue has gone from #21 to #25
<fengb> 20% improvement!
<mq32> nice!
<mq32> i think #75 will be a long term "blocker" :D
clktmr has quit [Ping timeout: 265 seconds]
rifkik has quit []
Ichorio has quit [Ping timeout: 250 seconds]
ave_ has quit [Quit: Connection closed for inactivity]
mahmudov has joined #zig
<THFKA4> so file.zig will always fail to build on arm32. what is the right thing to do here, get timespec def from glibc headers?
<andrewrk> the fs.File API is trying to abstract across multiple operating systems and architectures; this API should accept the i64 type and do appropriate behavior based on the target. perhaps it will make an assertion that we need to document, or introduce a new possible error code
<THFKA4> so if timespec.tv_sec is only 32 bits on the target, updateTimes should downcast it?
<andrewrk> THFKA4, I think that's a reasonable solution in this case
<andrewrk> and that assertion should be documented in the doc comments: the maximum number of seconds is pow(2, 34) or whatever it is (the division gives us more bits)
samtebbs has quit [Ping timeout: 265 seconds]