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/
frmdstryr has joined #zig
swills has quit [Ping timeout: 265 seconds]
a92 has joined #zig
<pixelherodev> That's actually a smart idea though
<pixelherodev> It'd be neat if compilers could e.g. selectively exclude headers from included directories if they were from a non-linked library
<pixelherodev> Or, make it a compiler error instead
<pixelherodev> That'll let some errors be noticed before the linking stage
swills has joined #zig
notpiika has quit [Ping timeout: 240 seconds]
earnestly has quit [Ping timeout: 246 seconds]
notpiika has joined #zig
swills has quit [Ping timeout: 240 seconds]
notpiika has quit [Remote host closed the connection]
notpiika has joined #zig
maxrazer has joined #zig
<maxrazer> Are any of the necessary components available that would allow applications to be built for android using Zig?
<daurnimator> maxrazer: yes. for a sufficiently small definition of "application"
<alexnask[m]> Masterq32 on github has an example android app repo
ur5us has quit [Remote host closed the connection]
ur5us has joined #zig
<maxrazer> Ok, thank you. I don't really know how much is needed or is missing. I think a cross platform GUI library and other libraries might not be there yet for more than an experimental application. Would that be correct?
<maxrazer> I see OpenGL, but higher level I imagine.
<daurnimator> correct
<maxrazer> Ok, but this could be possible in the future and Zig could be a desirable choice do you think?
<maxrazer> I was looking it looks like there is sufficient libraries to make an Android app with Golang for comparison.
swills has joined #zig
<maxrazer> There was a time I heard of people doing cross platform iOS/Android development in C++, but it ended up being more trouble than it was worth.
<daurnimator> that's what my feeling would be generally
<daurnimator> so much of the android ecosystem just expects you to code inside the JVM; and be able to read Java guides/tutorials (some kotlin now I guess)
<daurnimator> you're really breaking with tradition by using anything else
<daurnimator> now; for a game where you do all the UI yourself anyway... you'll probably be okay
<daurnimator> but if you want to make a more traditional app with native UI.... you're in for trouble
<daurnimator> that said, maybe it all works out nice
<justin_smith> daurnimator: it's worse than just "use the JVM" - it's a custom nonstandard JVM and all docs assume you are using a specific IDE setup
<daurnimator> indeed
<justin_smith> that IDE does support java / kotlin equally at least
<GrooveStomp> I'm trying to pass a c_int to a C function that takes an enum, but I'm not sure how. Zig shows this as part of the error: "const enum_unnamed_45 = extern enum(c_int) {" but "enum_unnamed_45" is private, so I can't access it from my code.
<justin_smith> but it's definitely not the kind of modern *nix style modular toolchain you'd expect if you're used to linux dev for example
<justin_smith> GrooveStomp: just guessing, but @enumToInt might help here?
<daurnimator> GrooveStomp: you'll probably need to share more of your code for us to help
<GrooveStomp> OK, I'll see if I can get a minimal sample here
squeek502 has quit [Remote host closed the connection]
frmdstryr has quit [Ping timeout: 260 seconds]
<Kuraitou> GrooveStomp: I think it needs to be c.gnutls_server_name_type_t.GNUTLS_NAME_DNS
<daurnimator> GrooveStomp:just use .GNUTLS_NAME_DNS
<daurnimator> without the `c`
<GrooveStomp> WHOA! That is blowing my mind. .GNUTLS_NAME_DNS works; is this a new feature?
<Kuraitou> oh nice, I was running into the same problem but that's a much better solution
<GrooveStomp> Thanks!
<daurnimator> GrooveStomp: oldish feature; its called an "anonymous enum literal"
oats is now known as noats
noats is now known as oats
a92 has quit [Quit: My presence will now cease]
<GrooveStomp> Oh interesting. I've been using that in switch statements; but always understood it to be scoped to the enum var I'm doing the switch on. In this case I don't understand how Zig is determining the context to be the const c for the C imports.
<daurnimator> GrooveStomp: zig attempts to coerce it to the argument type
<daurnimator> GrooveStomp: the function is declared to take an enum{foo,bar} ==> you can pass `.foo`
<GrooveStomp> Gotcha
<daurnimator> no different to if you did: `var x: enum{foo,bar} = .foo;`
<GrooveStomp> Totally separate: I'm invoking a function defined with a function pointer type: "typedef void (*fptr)(void *); extern fptr fn;" When calling this I have to "unwrap" it: "c.fn.?(foo)". Kinda funny to me.
<g-w1> what is the point of zig {run,build-{exe,lib,obj}} --show-builtin? why are there so many? wouldn't it be more clear to just have zig env --show-builtin or something like that
xackus has quit [Ping timeout: 260 seconds]
radgeRayden has joined #zig
<daurnimator> g-w1: because the builtin file changes depending on other arguments
<daurnimator> g-w1: e.g. build-lib vs build-exe changes `output_mode` in the builtin output
<g-w1> ah. i knew I was missing something, thanks
kristoff_it1 has quit [Ping timeout: 268 seconds]
_whitelogger has joined #zig
knebulae has quit [Read error: Connection reset by peer]
_whitelogger has joined #zig
ur5us has quit [Ping timeout: 264 seconds]
knebulae has joined #zig
knebulae has quit [Read error: Connection reset by peer]
knebulae has joined #zig
mla has joined #zig
marnix has joined #zig
GrooveStomp has quit [Ping timeout: 272 seconds]
waleee-cl has quit [Quit: Connection closed for inactivity]
jayschwa has quit [Remote host closed the connection]
lucid_0x80 has joined #zig
osa1 has joined #zig
tane has joined #zig
cole-h has quit [Ping timeout: 256 seconds]
meghan2032 has joined #zig
LanceThePants has quit [Read error: Connection reset by peer]
LanceThePants has joined #zig
Xavi92 has joined #zig
ur5us has joined #zig
Xavi92 has left #zig [#zig]
skuzzymiglet has joined #zig
tane has quit [Quit: Leaving]
lunamn has quit [Remote host closed the connection]
linuxgemini0 has joined #zig
lunamn has joined #zig
linuxgemini has quit [Read error: Connection reset by peer]
linuxgemini0 is now known as linuxgemini
ur5us has quit [Ping timeout: 260 seconds]
tane has joined #zig
ur5us has joined #zig
meghan2032 has quit [Remote host closed the connection]
ur5us has quit [Ping timeout: 260 seconds]
x2C25 has quit [Ping timeout: 260 seconds]
hnOsmium0001 has quit [Quit: Connection closed for inactivity]
earnestly has joined #zig
amk has quit [Changing host]
amk has joined #zig
<ifreund> I'm using packed structs as bitfields and they haven't bitten me yet :)
Kingsquee has quit []
marnix has quit [Ping timeout: 260 seconds]
marnix has joined #zig
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
frmdstryr has joined #zig
omglasers2 has joined #zig
osa1 has quit [Ping timeout: 256 seconds]
kristoff_it1 has joined #zig
<g-w1> can someone take a look at why my pr is failing? https://github.com/ziglang/zig/pull/6940 I literally just changed some main.zig code to tell you if you didn't give any arguments to some commands and now qemu is aborting: qemu: uncaught target signal 6 (Aborted) - core dumped
<g-w1> oh seems like its a bug in qemu, all the other prs are failing too :(
mmohammadi9812 has quit [Quit: Quit]
mmohammadi9812 has joined #zig
mmohammadi9812 has quit [Client Quit]
mmohammadi9812 has joined #zig
redj has quit [Ping timeout: 258 seconds]
xackus has joined #zig
<daurnimator> g-w1: 44 commits? `git rebase origin/master`
<g-w1> im not very good at git, is there a way to squash them all?
<g-w1> is that it?
<daurnimator> that will at least get rid of your 30 merge commits
<g-w1> thanks
mmohammadi9812 has quit [Ping timeout: 260 seconds]
mmohammadi9812 has joined #zig
redj has joined #zig
waffle_ethics has joined #zig
waffle_ethics has quit [Ping timeout: 258 seconds]
waffle_ethics has joined #zig
frmdstryr has quit [Ping timeout: 264 seconds]
osa1 has joined #zig
donniewest has joined #zig
drazan has joined #zig
<sjums> Is there a good introductory course to Zig and especially integration with C DLL's on windwos?
<sjums> Most things I manage to find are focused on Linux
<sjums> the main introduction as well as the language reference are also a bit thin for a Zig noob :)
Nypsie[m] has quit [*.net *.split]
srgpqt[m] has quit [*.net *.split]
fengb has quit [*.net *.split]
jmiven has quit [*.net *.split]
flokli has quit [*.net *.split]
Biolunar has quit [*.net *.split]
<ifreund> sjums: you may want to check out https://ziglearn.org/
srgpqt[m] has joined #zig
Nypsie[m] has joined #zig
fengb has joined #zig
flokli has joined #zig
jmiven has joined #zig
Biolunar has joined #zig
flokli has quit [Max SendQ exceeded]
<dutchie> anybody done much with ncurses(-like) interfaces in zig?
protheory8-new-m has quit [Ping timeout: 244 seconds]
fabio[m] has quit [Ping timeout: 244 seconds]
deltamaniac[m] has quit [Ping timeout: 244 seconds]
gpanders[m] has quit [Ping timeout: 244 seconds]
Nypsie[m] has quit [Ping timeout: 246 seconds]
Snektron has quit [Ping timeout: 244 seconds]
Bastian[m] has quit [Ping timeout: 244 seconds]
Dominic[m] has quit [Ping timeout: 246 seconds]
aterius has quit [Ping timeout: 246 seconds]
ugla has quit [Ping timeout: 244 seconds]
fengb has quit [Ping timeout: 246 seconds]
srgpqt[m] has quit [Ping timeout: 246 seconds]
bfredl has quit [Ping timeout: 244 seconds]
Sergeeeek[m] has quit [Ping timeout: 272 seconds]
BaroqueLarouche has quit [Ping timeout: 272 seconds]
ifreund_ has quit [Ping timeout: 260 seconds]
alexnask[m] has quit [Ping timeout: 260 seconds]
marnix has quit [Ping timeout: 240 seconds]
marnix has joined #zig
<sjums> ifreund mein freund - thanks. Sadly it's not answering my current issue. I'll read it through though - there's certainly lots to learn from it!
tane has quit [Quit: Leaving]
flokli has joined #zig
marnix has quit [Read error: Connection reset by peer]
<earnestly> dutchie: http://xn--rpa.cc/irl/term.html
marnix has joined #zig
waleee-cl has joined #zig
<dutchie> right, hence the "-like", just wondered what's out there at the moment in zig-land
<ifreund> I think a couple of terminal libs have at least been started, not sure how far they are
<ifreund> I'll try and find some links
<earnestly> dutchie: Oh I mentioned it as a thing you might use to make one :p
<ifreund> dutchie: here's one: https://github.com/jessrud/zbox
<dutchie> cool, ty
gpanders[m] has joined #zig
tane has joined #zig
fengb has joined #zig
Akuli has joined #zig
BaroqueLarouche has joined #zig
Sergeeeek[m] has joined #zig
deltamaniac[m] has joined #zig
Dominic[m] has joined #zig
fabio[m] has joined #zig
protheory8-new-m has joined #zig
Snektron has joined #zig
Bastian[m] has joined #zig
ugla has joined #zig
alexnask[m] has joined #zig
aterius has joined #zig
Nypsie[m] has joined #zig
gpanders[m] has quit [Quit: Bridge terminating on SIGTERM]
BaroqueLarouche has quit [Quit: Bridge terminating on SIGTERM]
fengb has quit [Quit: Bridge terminating on SIGTERM]
fabio[m] has quit [Quit: Bridge terminating on SIGTERM]
Sergeeeek[m] has quit [Quit: Bridge terminating on SIGTERM]
Dominic[m] has quit [Quit: Bridge terminating on SIGTERM]
alexnask[m] has quit [Quit: Bridge terminating on SIGTERM]
aterius has quit [Quit: Bridge terminating on SIGTERM]
deltamaniac[m] has quit [Quit: Bridge terminating on SIGTERM]
Nypsie[m] has quit [Quit: Bridge terminating on SIGTERM]
Snektron has quit [Quit: Bridge terminating on SIGTERM]
ugla has quit [Quit: Bridge terminating on SIGTERM]
Bastian[m] has quit [Quit: Bridge terminating on SIGTERM]
protheory8-new-m has quit [Quit: Bridge terminating on SIGTERM]
alexnask[m] has joined #zig
ifreund_ has joined #zig
return0e[m] has joined #zig
bfredl has joined #zig
ugla has joined #zig
Dominic[m] has joined #zig
gpanders[m] has joined #zig
aterius has joined #zig
fabio[m] has joined #zig
Snektron has joined #zig
Bastian[m] has joined #zig
deltamaniac[m] has joined #zig
Nypsie[m] has joined #zig
fengb has joined #zig
Sergeeeek[m] has joined #zig
BaroqueLarouche has joined #zig
srgpqt[m] has joined #zig
protheory8-new-m has joined #zig
dumenci has joined #zig
lucid_0x80 has quit [Ping timeout: 246 seconds]
tsujp69 has quit [Ping timeout: 245 seconds]
hnOsmium0001 has joined #zig
cole-h has joined #zig
GrooveStomp has joined #zig
skuzzymiglet has quit [Ping timeout: 256 seconds]
frmdstryr has joined #zig
waffle_ethics has quit [Ping timeout: 264 seconds]
radgeRayden has quit [Ping timeout: 240 seconds]
radgeRayden has joined #zig
waffle_ethics has joined #zig
Xavi92 has joined #zig
radgeRayden has quit [Ping timeout: 272 seconds]
radgeRayden has joined #zig
x2C25 has joined #zig
<Xavi92> andrewrk: based on your suggestion, I have just submitted an issue to https://bugs.llvm.org/show_bug.cgi?id=48062
<maxrazer> I see errors are values in Zig, as they are in Golang.
<maxrazer> I'm wondering if they took the same approach or really work the same. I'm not familiar enough with using errors to compare myself.
<maxrazer> I see this article on why Go's error handling is so great: https://rauljordan.com/2020/07/06/why-go-error-handling-is-awesome.html
<maxrazer> So, my next thought was, if Zig is coming down the pipeline as a future language for lower level programming I wonder if it takes the same approach.
<maxrazer> That consistency could potentially be very nice, assuming it is a good approach.
<dutchie> that's a good summary
<dutchie> there's also the main documentation: https://ziglang.org/documentation/master/#Errors
<dutchie> `try` is basically a better, shorter version of go's `if err != nil { return nil, err }`
<ugla> It avoids some pitfalls of the Go approach, one being that you get an error or a result, whereas Go gives you a possibly-null error and a possibly-null result.
<fengb> Also has free stack traces
<fengb> And errdefer handling
<ifreund> yeah, I think zig's errors are a pretty strict upgrade on go's personally
<fengb> Also you can do !void, which is really awkward in Go
<earnestly> So long as you don't end up with a million different ways of handling errors like Haskell
pfg_ has joined #zig
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
dumenci has quit [Ping timeout: 244 seconds]
casaca has quit [Remote host closed the connection]
marnix has quit [Ping timeout: 272 seconds]
marnix has joined #zig
<maxrazer> I appreciate that explanation.
wootehfoot has joined #zig
skuzzymiglet has joined #zig
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
Xavi92 has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
radgeRayden has quit [Remote host closed the connection]
osa1 has quit [Quit: osa1]
<jaredmm> Hey fengb, is there something that stopped you from working on zig-protobuf or did you just not need it?
<g-w1> I am trying to impliment a custom format function for a Vec3 type but it is failing, what am I doing wrong? https://hastebin.com/noziyuzuyo.rust
<g-w1> ah. i had to remove writer.writeAll wrapping std.fmt.format.
blackbeard420 has joined #zig
ur5us has joined #zig
Xavi92 has joined #zig
waffle_ethics has quit [Ping timeout: 265 seconds]
<andrewrk> Xavi92, nice work
casaca has joined #zig
casaca has quit [Remote host closed the connection]
casaca has joined #zig
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
<andrewrk> what is this fresh hell, std lib tests now failing with -O ReleaseFast
<Xavi92> Thanks, andrewrk
frmdstryr has quit [Ping timeout: 240 seconds]
wootehfoot has quit [Read error: Connection reset by peer]
<ifreund> I'm not sure if it feels ziggy though
frmdstryr has joined #zig
Akuli has quit [Quit: Leaving]
ur5us has quit [Remote host closed the connection]
ur5us has joined #zig
tane has quit [Quit: Leaving]
<Xavi92> I remember some proposal that added requirements on functions that go with `defer`/`errdefer`. What was the proposal status? I do not remember the issue number
<Xavi92> frmdstryr: thanks!
GrooveStomp_ has joined #zig
<Xavi92> I don't know if this was already suggested, but what about a mix of status quo and the `cleanup` keyword suggested by andrewrk?
<Xavi92> That would require the user to write `defer`/`errdefer` below the affected function, returning a compile-time error if the user forgets it. While more verbose, it respects status quo and it's safer
GrooveStomp has quit [Ping timeout: 240 seconds]
<g-w1> is anyone farmillar with the default calling convention in stage2 generated code? I am trying to debug some code, but it is hard since there is no source level debugging. I am tryign to look at the registers, but I am getting confused since I dont really know the calling convention. is it C?
<Xavi92> And, with this method, there arent't any hidden function calls
GrooveStomp_ has quit [Client Quit]
<g-w1> it seems like C.
<pfg_> yeah it should be c by default
<g-w1> ok
<Xavi92> Anyway, night everyone!
Xavi92 has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
donniewest has quit [Quit: WeeChat 2.9]
frett27 has joined #zig
GrooveStomp has joined #zig
Kingsquee has joined #zig
skuzzymiglet has quit [Ping timeout: 272 seconds]
jjsullivan1 has quit [Remote host closed the connection]
omglasers2 has quit [Read error: Connection reset by peer]
frett27 has quit [Ping timeout: 272 seconds]