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
<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 :)
<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]
<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>
`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]
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
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>
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