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/
<Snektron> gruebite: return the value from a function call returning !u32
<Snektron> In a function returning !?u32
return0e has joined #zig
return0e has quit [Ping timeout: 268 seconds]
casaca has joined #zig
protty has quit [Remote host closed the connection]
<scientes> what is the difference between ResultLoc, and IrInstruction *result_loc?
<scientes> and how do i relate them
diltsman has quit [Ping timeout: 250 seconds]
ltriant has quit [Ping timeout: 240 seconds]
<scientes> ill get it
<emekankurumeh[m]> perhaps a next milestone goal should be docs for the c++ compiler?
ltriant has joined #zig
<scientes> well, if any docs they should be very basic
<scientes> as few people hack on it, and we don't want the docs to be out of date
<scientes> just a high level overview
<scientes> basically just comments
bgiannan has quit [Quit: WeeChat 2.5]
THFKA4 has joined #zig
chemist69 has quit [Ping timeout: 246 seconds]
chemist69 has joined #zig
return0e has joined #zig
return0e has quit [Ping timeout: 240 seconds]
ltriant has quit [Quit: leaving]
mahmudov has joined #zig
Foxfir3 has joined #zig
<Foxfir3> Arm nigtmare. success! but with Manjaro minimal install on RPi4, and then some cleaning up. Aarch64 ported from the Raspian experimental kernel. I did'nt succeed turning pure Arch ARM 64 bit :( What a nightmare. But Zig runs.
<Foxfir3> ARM/Avago really sucks! But they are so huge. And RPi foundation are not in a hurry to support Aarch64. So thats where It's at.
<mq32> Foxfir3: nice!
<Foxfir3> mq32: hope It was somewhat useful :) At least Zig will go in my report now. And I gained some insight into the 32 bit vs 64 bit issue.
<mq32> i want to cross-build my current project for the RPI, but i have the problem that i require some C libraries and i'm too lazy to port dfferent projects to zig build
<Foxfir3> so install Manjaro minimal like I did?
<Foxfir3> If you come across something, his name is Dan. In charge of the Manjaro ARM project.
<mq32> heh, but i don't think i want to build a half-dozen libraries on an RPI :D
<Foxfir3> The RPi4 with overclocking and cooling is no old lady
<mq32> also, pi isn't the only platform i want to target, so i should start creating packages for libx11 and such
<mq32> yeah, but i don't have one at my hands, only pi3
<Foxfir3> hmm.. and the Odroid N2?
<Foxfir3> aah.. I see. I have the Pi3B+. there is really no comparison
<Foxfir3> and I have the Geekworm expansion board with an okay SSD, so IOPS feel more snappy
<Foxfir3> In hinsight, I would have avoided ARM completely
<mq32> Foxfir3, another target platform of mine: https://en.wikipedia.org/wiki/Pandora_(console)
<Foxfir3> but thats 32bit?
<Foxfir3> What a cool gadget :D
<Foxfir3> system: Linux for gaming :D
<mq32> yeah, it's 32bit
<mq32> i always wanted to create native games for the pandora instead of using emulators
<mq32> but cross-compiling is a hard world right now
<Foxfir3> well.. I wan't to go in the opposite direction. But there is no way I will be able to afford the new HiFive board.
<Foxfir3> plenty of options when It comes to having a stroke. Like the 999$ pricetag on the HiFive SBC. Definately a comma lacking there.
<Foxfir3> mq32: how did you get into Zig?
<mq32> a friend of mine from uni and the local hackspace said: "look at zig. it might be a language for you"
<mq32> and now i'm totally into it :D
<Foxfir3> hackspace. uni. Danish?
Ichorio has joined #zig
<Foxfir3> dobra utro brato
<mq32> nope, german
<Foxfir3> mq32: im coming to Sofia soon. Maybe we could hook up?
<mq32> haha. that's only 1500 kilometers :D
<Foxfir3> for a german that's nothing
<Foxfir3> Autobahn most of the way :D
<mq32> sofia is in bulgaria
<Foxfir3> you will fit right in.
<mq32> ^^
<Foxfir3> German geeks. I'll never forget the documentary bout German med riding on trains in their backyards. Thats my image of Germany now.
<Foxfir3> German men
<Foxfir3> ... and wurstsalat. But that goes without saying
<mq32> haha
<Foxfir3> okay. zig question. Does zig run compile to a tmp file, or is It JIT?
<Foxfir3> got It. assuming object file and binary gets deleted as soon as they are done
WilhelmVonWeiner has joined #zig
Foxfir3 has quit [Quit: Lost terminal]
bgiannan has joined #zig
return0e has joined #zig
return0e has quit [Ping timeout: 240 seconds]
<Snektron> "Zig compiler" implies its a compiler. Why would it JIT
WilhelmVonWeiner has left #zig [#zig]
WilhelmVonWeiner has joined #zig
WilhelmVonWeiner has left #zig [#zig]
return0e has joined #zig
slice has quit [Ping timeout: 276 seconds]
slice has joined #zig
<mq32> Snektron: you can JIT/in-memory-compile code with llvm and run it from memory
<mq32> there is no need for creating a binary on disk
meheleventyone has joined #zig
Ichorio has quit [Ping timeout: 250 seconds]
qazo has joined #zig
<bgiannan> So why can't I do: `defer try somethingThanCanFail();` ?
<mq32> bgiannan, because defers are executed "after" a return
<mq32> and try contains a return
<mq32> fn what_does_this_return() i32 { defer return 1; return 0; }
<mq32> it's illogical to write such code, because it would be undefined what would happen
<bgiannan> i see
meheleventyone has quit [Read error: Connection reset by peer]
doublex has quit [Ping timeout: 240 seconds]
doublex has joined #zig
mahmudov has quit [Ping timeout: 250 seconds]
waleee-cl has joined #zig
mahmudov has joined #zig
dimenus has joined #zig
mahmudov has quit [Ping timeout: 268 seconds]
mahmudov has joined #zig
mahmudov has quit [Ping timeout: 240 seconds]
FireFox317 has joined #zig
mahmudov has joined #zig
donaldallen has joined #zig
<donaldallen> andrewrk Andrew -- I just wanted to follow up on an interchange I had here yesterday. I am trying to find out whether it is possible to call a function in b.zig from a.zig without recompiling either of them when they are unchanged. In other words, I want to do something like the usual C thing of producing .o files as necessary with a make file and
<donaldallen> then linking them into an executable. I know I can this with an 'extern' in the calling file, but that restricts me to c-objects only, I believe. Is there a way to do this with the build system?
<donaldallen> To be clear, I want to be able to pass zig objects across the file boundary, as if I had @imported b.zig into a.zig.
qazo has quit [Read error: Connection reset by peer]
qazo has joined #zig
mahmudov has quit [Remote host closed the connection]
mahmudov has joined #zig
dingenskirchen has quit [Quit: dingenskirchen]
FireFox317 has quit [Remote host closed the connection]
mahmudov has quit [Remote host closed the connection]
mahmudov has joined #zig
<mq32> donaldallen: why don't you want to use build.zig?
<mq32> also: just look at the source of std.build on how the build system does the conditional recompilation
<mq32> look here
<mq32> that's what zig build calls
<fengb> The build system (build-lib, build-exe, build-obj) caches all intermediates by default
<fengb> It produces .o files but that’s an implementation detail that should be ignored since Zig doesn’t provide ABI guarantees (unless you use extern/export/packed data structures)
dingenskirchen has joined #zig
Akuli has joined #zig
knebulae has quit [Read error: Connection reset by peer]
knebulae has joined #zig
<donaldallen> mq32 You asked why I don't use build.zig? It's not documented yet.
<mq32> the whole language "isn't really documented yet"
<mq32> also using make files doesn't help in terms of stability
<mq32> as the command line of zig is going to change at least once
<donaldallen> There's usable documentation for significant parts of the language. The build system isn't among them.
<donaldallen> As for using make files, I use the build system if that were a practical choice at this point. It isn't, for me. I think the real answer is that is see a lot of promise in this project, but I think what I'm trying to do with it is premature. I need to let this thing gestate some more and then I'll come back to it. Thanks.
<daurnimator> given that there is no 'makedep'-like thing for zig (is there?): how are you using make with zig?
donaldallen has left #zig [#zig]
<mq32> daurnimator, i have no idea how that should work
<mq32> as recompilation in zig is a curious thing :D
<mq32> you *may* need to recompile files that are dependants even though they are not changed
<mq32> because of zigs lazy symbols
<fengb> build.zig isn’t stable but build-* hasn’t really changed since forever
mahmudov has quit [Remote host closed the connection]
<fengb> And you’ll need to rely on that anyway, unless you really want to cobble together things with build-obj, but even that uses most of the internal build stuff
doublex has quit [Ping timeout: 245 seconds]
doublex has joined #zig
kenaryn has joined #zig
<kenaryn> Hello, please what does '.is_var_args' do? I do not understand the official example: `assert(@typeOf(assert).is_var_args == false);`
<daurnimator> kenaryn: various types have undocumented fields.... e.g. T.bit_count. I think the intention is to remove them and direct people to @typeInfo instead?
<tgschultz> I believe that's still the case, yes. Additionally, varargs themselves are due to be replaced by list/struct literals.
<nrdmn> tgschultz: what's going to happen to C var args functions?
<daurnimator> nrdmn: they're going to need to stay. or actually: be added :P
<daurnimator> nrdmn: e.g. there is no way to create a C vararg function in zig (like you would in C usin use va_start etc.)
<waleee-cl> is it kosher to "steal" (copy & paste) a function from rust's std docs static main.js-file into zig's main.js without a mentioning in the license-file?
meheleventyone has joined #zig
<waleee-cl> it fixes an issue where different keyboard-layouts produce a different js keycode for ? from the expected 191
<kenaryn> thank you both daurnimator and tgschultz :)
FireFox317 has joined #zig
kenaryn has quit [Quit: WeeChat 2.3]
<nrdmn> hmm, I think you could pass a [_]type{struct {pub const value = ...;}, } where each struct's "value" can have a different type
<nrdmn> or you can access struct members by their index
meheleventyone has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dimenus has quit [Read error: Connection reset by peer]
wootehfoot has joined #zig
Akuli has quit [Quit: Leaving]
doublex has quit [Ping timeout: 250 seconds]
<daurnimator> nrdmn: maybe.... interesting idea. but it doesn't solve the question of how to create, call or declare ABI-following vararg functions
doublex has joined #zig
doublex has quit [Read error: Connection reset by peer]
doublex has joined #zig
meheleventyone has joined #zig
Ichorio has joined #zig
doublex has quit [Ping timeout: 240 seconds]
doublex has joined #zig
mahmudov has joined #zig
ltriant has joined #zig
meheleventyone has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
FireFox317 has quit [Remote host closed the connection]
doublex has quit [Ping timeout: 240 seconds]
wootehfoot has quit [Read error: Connection reset by peer]
doublex has joined #zig
doublex has quit [Ping timeout: 240 seconds]
doublex has joined #zig
doublex has quit [Ping timeout: 240 seconds]
doublex has joined #zig
noonien has quit [Quit: Connection closed for inactivity]