ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
<darithorn>
when I try to define a function pointer type that has a generic return `T` the compiler complains that T isn't defined
Ichorio has quit [Read error: Connection reset by peer]
qazo has joined #zig
noonien has joined #zig
commander has joined #zig
davr0s has joined #zig
qazo_ has joined #zig
qazo has quit [Ping timeout: 264 seconds]
qazo_ has quit [Read error: Connection reset by peer]
qazo has joined #zig
qazo has quit [Ping timeout: 276 seconds]
JinShil has quit [Quit: Leaving]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
qazo has joined #zig
davr0s has joined #zig
qazo_ has joined #zig
qazo has quit [Ping timeout: 276 seconds]
qazo_ has quit [Read error: Connection reset by peer]
qazo has joined #zig
qazo has quit [Read error: Connection reset by peer]
qazo has joined #zig
qazo has quit [Read error: Connection reset by peer]
<MajorLag>
Sorry, what I mean is, your "bytes" code uses the binary units for K/M/G (orders of 1024). SI, the international system of units, specifies that K/M/G are strictly decimal (orders of 1000), and Ki/Mi/Gi are to be used for the base 2 unit definitions. There's a segment of the population that vehemently opposes this for some reason.
AX31 has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
<GitHub35>
[zig] BraedonWooding opened pull request #1014: [Documentation] Add Error Union Documentation and ArgType (master...patch-3) https://git.io/vpFtt
<andrewrk>
MajorLag, wow, I didn't know about this. thanks
<andrewrk>
MajorLag, this will require some thought. It seems that the situation has a lot of ambiguity
<andrewrk>
what do you think the ls command uses when you use -h?
<andrewrk>
it uses the "decimal" prefix but it's actually the base 2 value
<andrewrk>
sorry that wasn't rhetorical - I didn't know when I asked, and then I tested to find out
<andrewrk>
MajorLag, anyway I think we can support both. Perhaps with {B} and {Bi}
MajorLag has quit [Ping timeout: 240 seconds]
darithorn has joined #zig
MajorLag has joined #zig
Hejsil has joined #zig
Hejsil has quit [Ping timeout: 260 seconds]
<bodie_>
+1 for Ki/Mi/Gi because they're totally unambiguous
<bodie_>
that said, everyone knows what a KB is
<bodie_>
(unless you're pricing by the KB...)
Hejsil has joined #zig
<andrewrk>
bodie_, when you say everyone knows what a KB is, are you saying everybody knows to follow SI, or everybody thinks it is 1024 bytes?
<andrewrk>
unfortunately it's ambiguous
<bodie_>
I would say everybody using a programming language thinks of byte magnitude prefixes as powers of 2
<bodie_>
I'm not sure how these prefixes are supposed to be used andrewrk
<bodie_>
ok, I'm looking at the merged code now
pancake_ has joined #zig
<pancake_>
hi
pancake_ is now known as pancake
<bodie_>
andrewrk, if that's specifically for _output_ formatting, then yeah, wholeheartedly. if it's for _parsing_, I don't know
<pancake>
its my first time here, this sunday i cloned the repo and played a bit with Zig from git, read some docs and played a bit with some hello worlds.
<andrewrk>
bodie_, output only
<pancake>
just to say that i'm really happy to see all the ideas behind this language, because it seems like the first real replacement for C
<andrewrk>
hi pancake
<pancake>
i have some questions, but i saw the project is really active and moving forward
<pancake>
do you have any release schedules or plans?
<pancake>
like milestone plans or fixed time releases like rust?
<pancake>
personally i'm using fixed time releases and i think it's a good option
<pancake>
mainly because i tried with brew first, but 0.2 lacks a lot of things that are already in git
<darithorn>
zig is really good about being able to compile straight from the master branch
Hejsil has quit [Ping timeout: 260 seconds]
<darithorn>
so you don't need to wait for an official release to try out the new features :)
<bodie_>
I like how easy the build process is :D
<bodie_>
I don't know why it's so hard for so many projects to get build right
<andrewrk>
pancake, every issue has a milestone attached to it. until 1.0.0 we're coordinating with LLVM's release schedule. so 0.3.0 will be 1 week after llvm 7
<andrewrk>
for windows and linux, there is a statically linked release of master branch automatically built by CI
<pancake>
bodie_: well i was expecting a shellscript to find and set all the llvm environ for me
<pancake>
because im on mac and that's pretty standard environment
<pancake>
andrewrk: ah good to know
<pancake>
i also liked the pkgmanager discussions, taking ideas from swiftpm
<bodie_>
I think YouCompleteMe actually uses a local clone of llvm or something like that
<bodie_>
as a submodule
<pancake>
im afraid of the abuse of @...
<pancake>
like a sinkhole for everything that doesnt have a place, but i found many useful ones, as well as many undocumented ones
<pancake>
the toolings i missed (but maybe they exist) is 'fmt' and 'doc'
<pancake>
something like go doc would be great, as well as a source formatter
<pancake>
are there plans for that?
<MajorLag>
andrewrk, re: SI units. It's my opinion that since the prefixes Kilo, Mega, Giga, etc are well understood to be base 10 in every domain except computing, they should always be base 10. The only reason people seem to think otherwise is tradition. IEEE 1541-2002 defines the prefixes in base 10 as of 2005.
<andrewrk>
MajorLag, I think that's a pretty good argument
<bodie_>
it's just also a fact that convention is also a real thing, and weighs heavily on the "mega = power of 2 in computing" end of the scale
<andrewrk>
oh and we have zig fmt now
<andrewrk>
I didn't add a subcommand to the c++ compiler yet, but the self hosted compiler supports `zig fmt`
<bodie_>
nice
<MajorLag>
Linux kernel uses binary prefixes in boot messages, OSX (as of 10.6) uses SI units correctly, IEEE, SI, NIST, and ISO all agree on the terminology. Sticking to a foolish "convention" is not a good argument in my opinon.
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<MajorLag>
So my 2 cents is that `{B}` should be base 10 and use suffix `XB`, and something else, like `{Bi}` should use base 2 and suffix `XiB`.
<bodie_>
my point was simply that a lot people mean Ki when they say or write K.
<andrewrk>
I think you are both correct
<MajorLag>
That's true, and as the comment in 1015 suggests it's something that needs to be addressed for input
<andrewrk>
and so far everybody agrees with #1015
darithorn has quit [Quit: Leaving]
steveno_ has joined #zig
davr0s has joined #zig
AX31_ has joined #zig
AX31 has quit [Read error: Connection reset by peer]
AX31__ has joined #zig
AX31_ has quit [Read error: Connection reset by peer]
AX31__ has quit [Quit: El Psy Congroo.]
darithorn has joined #zig
darithorn is now known as Guest94638
Guest94638 has quit [Client Quit]
darithorn_ has joined #zig
darithorn_ has quit [Quit: Leaving]
steveno_ has quit [Ping timeout: 255 seconds]
steveno_ has joined #zig
kola has joined #zig
<kola>
hiya
kola has quit [Client Quit]
<andrewrk>
hi kola
Ichorio has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
js___ has joined #zig
js___ is now known as js123
<js123>
hey, I'm trying to run the bignum benchmark on windows, using the newest artifact. I get 'Unable to determine vcruntime path. --msvc-lib-dir' despite having ms visual studio installed. what am I missing?
<js123>
using --msvc-lib-dir "C:\Program Files\Microsoft VS Code Insiders" doesn't help
<js123>
I'm not a experienced windows dev, using OpenBSD most of the time. Any help would be appreciated
<andrewrk>
hi js123
<andrewrk>
hmm does the bignum benchmark even depend on libc?
<andrewrk>
oh yeah it does
<js123>
even if it doesn't, would be nice to be able to use the stdlib any way :)
<andrewrk>
can you provide any more information about your system? windows version, msvc version
<andrewrk>
this might need to be a github issue
<js123>
oh, are you certain that I need mscv 2015? I installed 2017...
<andrewrk>
zig is supposed to read the windows registry to find MSVC
<andrewrk>
I haven't tested with 2017 yet. when I tried that, LLVM didn't build
<andrewrk>
I'm sure that we can make it work with 2017. it's just going to take someone to figure out how exactly to query the system to detect it
<js123>
it should be backwards compatible, so I guess it should work
<andrewrk>
you can try doing the CLI args to help zig find it. you'll need to specify all 4 of them
<andrewrk>
finding libc is a nightmare. I don't know who decided libc installation needed to be this complicated
<andrewrk>
(I said 4 and actually there were 5 )
<andrewrk>
see zig's --help menu for descriptions of these args
<andrewrk>
for each one there should be a particular file you can locate on your system to verify you've found the correct directory
ofelas has quit [Ping timeout: 276 seconds]
<js123>
well I'm reading os.cpp right now and you are using a hardcoded registry string
<js123>
mine is different to that
<js123>
btw. do you know how much of this possibly a gazillion gigabyte msvc I have to install?
<js123>
there are a ton of options and I have no idea what is needed.
<andrewrk>
probably the minimal options
<andrewrk>
what's different on your system? I would love to get os.cpp patched up in a way that works on your system
<js123>
line 1290: "SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VS7" is nowhere to be found on my machine, its probably somewhere in "Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\14.0\"
<js123>
don't mind the unescaped \
<andrewrk>
14 is 2015
<js123>
visual studio on my machine says 17
<andrewrk>
sounds like we should additionally look in the path you described
<js123>
I'd like to test that first. my vcruntime.lib is in C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\lib\amd64
<js123>
that is the file zig is looking for if I read os.cpp right
<js123>
ah, found Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\SxS\VC7
<MajorLag>
@js123, I'm using a not-installed version of MS Build Tools and it's still just over 1GB. MS does not make it easy to be minimalistic about its dev environment.
<js123>
MajorLag: absolutely. its a pain tbh. I'm poking in the registry and looking at os.cpp to find out what the problem is that I have
<andrewrk>
js123, nice, maybe we can simply add that as an additional search path
<andrewrk>
are you on 32 bit windows?
<js123>
no, windows 10
<js123>
I think its only 64 bit
<andrewrk>
I wonder why "WOW6432Node" is in the path
<js123>
what registry key are we looking for exactly?
<MajorLag>
because VS is 32 bit
<js123>
yes, VS is 32 bit goodness
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<js123>
ok maybe it is a problem with the community version
<js123>
so there are 2 problems at least: 1. os.cpp is looking for the string "14.0" which is "15.0" with msvc 17
<js123>
2. 14.0/15.0 say: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\ on my machine
<js123>
but it should say C:\Program Files (x86)\Microsoft Visual Studio 14.0\
<js123>
to be compatible with os.cpp
<js123>
so for whatever reason my registry is/was wrong
<js123>
after adding the key that os.cpp is looking for the benchmark does not error out
davr0s has joined #zig
Ichorio has quit [Ping timeout: 240 seconds]
<js123>
well, not with zig run fac.zig
<js123>
but with zig build-exe fac.zig --library c --output fac-zig --release-fast
<js123>
man I thought windows is easy...
<js123>
should probably switch to linux and not give a single damn about everything else -.-
<js123>
(not blaming anyone though)
<js123>
ok got it running with following command: zig build-exe fac.zig --library c --output fac-zig.exe --release-fast --library-path "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\lib\amd64"
<andrewrk>
this is one reason I want to make stack traces on windows work without depending on msdia80.dll, despite microsoft's recommendation
<js123>
maybe I should write these steps down for anyone how will come after me
<andrewrk>
js123, I would appreciate if you did so in a github issue
<js123>
all that because I wanted to implement karatsuba in the bignum lib
<andrewrk>
specifically, what was different about your registry vs what we were looking for
<andrewrk>
js123, btw the bignum bench for zig only depends on libc so that the startup time is fair with the benches of other languages
<andrewrk>
otherwise zig would have a really lean startup time and ruin the benchmarks :)
<js123>
well, normally I dont measure startup time for stuff like that
<andrewrk>
and if you don't use --library c then you don't need MSVC installed