ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
AlexMax has joined #zig
<AlexMax> Question. What are the portability goals of Zig?
<andrewrk> AlexMax, can you elaborate?
<AlexMax> Well, I'm currently working on a fun little project in C89 because I want it to be portable to nearly any (reasonable) platform with a C compiler.
<AlexMax> And C has a great many warts to where I wish for a better language. But desired portability seems to be my jailer.
<andrewrk> AlexMax, whether to use C89 vs a later version of C implies talking about portability between C compilers, as opposed to portability across targets
lqd has joined #zig
affinespaces has joined #zig
<andrewrk> For zig there is currently only 1 zig compiler in existence, as the language is still under development
odc has joined #zig
<andrewrk> so the question turns into, what are the plans for a language specification, which is this issue: https://github.com/ziglang/zig/issues/75
<andrewrk> if you're talking about target portability, you can have a look at the support table in the readme: https://github.com/ziglang/zig/#support-table
<andrewrk> if you have any specific target concerns, I'm interested in hearing about them
<kristate> andrewrk: yeah I think he is talking about target portability
<AlexMax> I'm essentially trying to create something that exists as a static/dynamic library that can be used to plug into a project called RetroArch
<AlexMax> And RA exists for....a great many platforms
walac has joined #zig
<AlexMax> Including a bunch of old, busted and deprecated platforms
<AlexMax> And I wanted to know how realistic support for some of these oddball platforms might be. Judging by your readme, it seems like you're at the very least gated by LLVM.
<kristate> AlexMax: what is the specific target that you are thinking of?
scientes has joined #zig
diltsman has joined #zig
<diltsman> When building master, should I build against LLVM 7.0 or 8.0?
<emekankurumeh[m]> 7.0
<kristate> diltsman: LLVM 7.0
<diltsman> I guess the llvm8 branch is the one that is against the next version of LLVM, then?
<diltsman> It says to download LLVM and CFE. What is CFE?
<emekankurumeh[m]> clang frontend
allan0 has quit [Ping timeout: 272 seconds]
<scientes>
<scientes> <diltsman> It says to download LLVM and CFE. What is CFE?
<scientes> <emekankurumeh[m]> clang frontend
<scientes> sorry
<scientes> ../src/zig_llvm.cpp:1032:59: error: ‘KFreeBSD’ is not a member of ‘llvm::Triple’
<scientes> but it was added 8 years ago, so i am confused https://github.com/llvm-mirror/llvm/commit/652b48bf231521642c53221a7d10a0acf2030f48
scientes has quit [Remote host closed the connection]
scientes has joined #zig
scientes has quit [Remote host closed the connection]
scientes has joined #zig
<emekankurumeh[m]> scientes: what version of zig are you working with?
<scientes> HEAD from a week or so ago
<scientes> i got alot father when i commented out that line
<emekankurumeh[m]> thats strange. i'm on HEAD and that code isn't causing any problems for me
<emekankurumeh[m]> people doing bsd ports don't seem to be running into that issue either.
scientes has quit [Ping timeout: 250 seconds]
<daurnimator> reading backlog...
<daurnimator> andrewrk: please don't implement X or wayland... they're terrible to support and no good will come of it...
<andrewrk> AlexMax, yes it's fair to say that zig is gated by LLVM
<andrewrk> diltsman, it won't let you build against the wrong LLVM
<andrewrk> scientes, I suspect if you use HEAD from 7843c96df87007561c107d11afa2fa74b46667fd or later, I'm guessing you'll get an error message "wrong LLVM version" or something like that
wilsonk has quit [Ping timeout: 272 seconds]
<diltsman> andrewrk: Getting things set up to work on compiler-rt functions.
shinzo has joined #zig
schme245 has joined #zig
schme245 has quit [Ping timeout: 250 seconds]
darithorn has quit [Quit: Leaving]
<andrewrk> diltsman, great!
<diltsman> andrewrk: We will see how long it takes me to get everything ready to work on it. Building 7.0.1 right now. Then will try to build against it...and probably build 8.0.0...
<andrewrk> diltsman, if you like, you make your pull requests against the llvm8 branch
<andrewrk> *you can
<andrewrk> llvm 8.0.0rc2 has been released but there are quite a few release blocker bugs opened. I predict it will be a couple weeks before the next release candidate
<andrewrk> but we can always backport llvm8 commits into master
wilsonk has joined #zig
noonien has quit [Quit: Connection closed for inactivity]
shinzo has quit [Quit: leaving]
daurnimator has quit [Quit: WeeChat 2.3]
<emekankurumeh[m]> andrewrk: i saw "TODO err to int when error union payload type not void" in codegen.cpp. does this mean that error unions are getting payloads similar to tagged unions?
wilsonk has quit [Ping timeout: 246 seconds]
schme245 has joined #zig
daurnimator has joined #zig
very-mediocre has joined #zig
<emekankurumeh[m]> just spent 30 mins trying to debug an error only to realize it was because of zig evaluating expressions at comptime.
<daurnimator> emekankurumeh[m]: hmm?
<emekankurumeh[m]> i had a test that was calling `expect` on a const value and succeeding, but when i called a function that called `expect` in the test, zig would generate invalid llvm. thats because zig was evaluating the argument of expect at compile time and hard-coding the argument to expect.
wilsonk has joined #zig
wilsonk has quit [Ping timeout: 246 seconds]
very-mediocre has quit [Ping timeout: 256 seconds]
Zaab1t has joined #zig
Zaab1t has quit [Ping timeout: 245 seconds]
kristate has quit [Read error: Connection reset by peer]
kristate_ has joined #zig
Ichorio has joined #zig
barua has joined #zig
barua has quit [Client Quit]
barua has joined #zig
<andrewrk> emekankurumeh[m], if zig generates invalid LLVM it's a bug in the compiler
<diltsman> Finally finished compiling LLVM, CFE, and Zig. Get to start looking at adding Compiler-RT functions this evening.
<andrewrk> great
<andrewrk> what os are you on?
scientes has joined #zig
<andrewrk> https://github.com/semver/semver/issues/497 Membership request for Zig Package Manager
<emekankurumeh[m]> i'm trying to solve issue #1711 so the invalid llvm is because of me
scientes has quit [Remote host closed the connection]
darithorn has joined #zig
scientes has joined #zig
schme245 has quit [Remote host closed the connection]
schme245 has joined #zig
halosghost has joined #zig
schme245 has quit [Ping timeout: 245 seconds]
kristate_ has quit [Remote host closed the connection]
schme245 has joined #zig
kristate has joined #zig
kristate has quit [Remote host closed the connection]
kristate has joined #zig
kristate has quit [Ping timeout: 258 seconds]
barua has quit [Ping timeout: 244 seconds]
Zaab1t has joined #zig
scientes has quit [Remote host closed the connection]
barua has joined #zig
wilsonk has joined #zig
halosghost is now known as hg
Akuli has joined #zig
Sahnvour has joined #zig
<Sahnvour> andrewrk: regarding https://github.com/ziglang/zig/issues/538, I assume that the dependency on stage1 is temporary and will disappear when stage2/3 become the real thing ? If not, I don't understand why we would keep it
<andrewrk> Sahnvour, yes, but the dependency on stage1 would be replaced with a dependency on stage2/3, which also have the `libc` subcommand
hio has joined #zig
<Sahnvour> yes
<Sahnvour> I see, thanks
<Sahnvour> so in the end, the only choice is to implement `libc` in pure zig
<Sahnvour> so in the end, the only choice is to implement `libc` comand in pure zig
<Sahnvour> woops, how millenial of me.
<hg> lolwat?
<Sahnvour> too used to edit the last message with 'up' arrow
<hg> ahh
* hg doesn't see how that's millenial, but it's okay :)
* hg is used to s/// replacements
<andrewrk> Sahnvour, I'm not sure what you mean by that
<andrewrk> note that stage1/2/3 share some C++ code, including the interaction with Windows COM that finds MSVC
<Sahnvour> oh, ok
<andrewrk> that could potentially be moved to zig in stage2/3 but I don't think it necessarily has to
<Sahnvour> I thought the C++/COM implementation was stuck in stage1, hence my questions
<Sahnvour> note that if Zig chooses to support only msvc 15+, this can be simpler with https://github.com/Microsoft/vswhere ... not sure if that's wanted though
kristate has joined #zig
kristate has quit [Ping timeout: 272 seconds]
barua has quit [Ping timeout: 250 seconds]
noonien has joined #zig
<andrewrk> Sahnvour, that's something to consider. we would want to audit the code and make sure it does not do anything too crazy, and then copy vswhere.lib into deps/ and add cmake commands to build it\
<andrewrk> that said, if what we have already is working well, then I see no reason to change it
<andrewrk> as an example, why do they have XmlFormatter.cpp? seems fishy
<Sahnvour> I think it's supposed to be at a very specific path, or accessible through %PATH%, and if so no need to embed it in Zig, just to run it with the good arguments
<Sahnvour> when installed on a machine*
<Sahnvour> I do not doubt its code is bloated :)
<andrewrk> well I certainly do not want to add a dependency on this being installed
<andrewrk> so it would have to be in zig.exe (or at least shipped with zig, but in that case why not build it into zig.exe?)
<Sahnvour> it comes bundled with msvc build tools, you can't install them without vswhere, starting 15.2 . but anyways that doesn't address msvc 14 and lower which are still widely used at the moment
_whitelogger has quit [Remote host closed the connection]
Zaab1t has quit [Quit: bye bye friends]
_whitelogger has joined #zig
daurnimator has joined #zig
schme245 has quit [Remote host closed the connection]
kristate has joined #zig
hg has quit [Quit: WeeChat 2.3]
Sahnvour has quit [Ping timeout: 256 seconds]
Ichorio has quit [Ping timeout: 246 seconds]
kristate has quit [Remote host closed the connection]
kristate has joined #zig
kristate has quit [Ping timeout: 250 seconds]
darithorn has quit [Remote host closed the connection]