ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
<Dirkson> How much tool support is considered acceptable for being able to write and maintain zig? Like, with C the minimum viable tool support is mainly "a text editor and a compiler". But if we end up doing implicit typing for both function arguments and function return,s it will more or less require the text editor to be able to find all libraries and understand all zig code in order to maintain non-trivial zig code.
mnoronha has quit [Quit: Ping timeout (120 seconds)]
mnoronha has joined #zig
mnoronha has quit [Client Quit]
mnoronha has joined #zig
tiehuis has joined #zig
<tiehuis> Dirkson: my view would be no special tool support is required
mnoronha has quit [Read error: Connection reset by peer]
mnoronha has joined #zig
<Dirkson> That'd be my ideal too, but I'm curious if we have an official Word From DevPerson about this.
kristate has joined #zig
<tiehuis> i would expect andrewrk to think the same given his programming environment but he can say when hes back
noonien has quit [Quit: Connection closed for inactivity]
kristate has quit [Ping timeout: 244 seconds]
mnoronha has quit [Ping timeout: 276 seconds]
mnoronha has joined #zig
tiehuis has quit [Quit: WeeChat 2.2]
mnoronha has quit [Ping timeout: 256 seconds]
<MajorLag> Currently I haven't personally had much difficulty with just a text editor and the compiler, I hope it remains that way. I see the point about inferred return types but I think the trait, or more like "userland typechecking", proposal can help with that. I always felt a bit dirty taking "var", but after implementing a form of userland traits and typeclasses I feel much more comfortable with it. Making those checks
<MajorLag> ould help.
kristate has joined #zig
<kristate> woke up 11:45 JST
<scientes> good morning kristate
<kristate> hi!
<kristate> what time is it there?
<scientes> 20:00
<kristate> not so bad -- how was your day?
<scientes> worked most of the day
<scientes> now i am wondering what I should work on programming-wise
<scientes> nice work on 1389
mnoronha has joined #zig
<kristate> thanks
<scientes> I feel i'm accumulating bugs in zig
<scientes> My cpp skills are not good enough to work on the compiler
<kristate> scientes: but you know C, right?
<scientes> yes
<scientes> i haven't looked at how much cpp is used
<kristate> C++ isn't so different -- the only thing you have to watch-out for are templates and decorators
<scientes> yeah but I look at simple C++ headers and my mind boggles, iterators for example
<kristate> exactly
<kristate> google's c++ guide is good. they don't allow most of their programmers to use all the featureset of c++
<scientes> although I do know enough to know that there are places where c can't be performant (but zig can) because of adherance to the C ABI
<kristate> I personally despise C++, but since LLVM is c++, it makes sense why andrewrk chose to use it
<kristate> the sooner we can move over to zig, the better
<scientes> go was implemented in C, and then they machine-translated it to go (but they never used macros)
<scientes> I had big disagreement with some of the review of my code. like the suggestion to not return arrays
<scientes> but thats just another zig bug https://github.com/ziglang/zig/issues/863
<scientes> anyways....
<kristate> scientes: wonder what it would take to fix this
<kristate> it looks like #770 was fixed
mnoronha has quit [Ping timeout: 244 seconds]
_whitelogger has joined #zig
mnoronha has joined #zig
mnoronha has quit [Ping timeout: 276 seconds]
<scientes> comptime has the potential (with lots of work) to be very powerful
<scientes> like regular express compilation and execution
<scientes> but I wonder if an existing regular expression implementation can be modified to support comptime (and would non-zig code be acceptable to be integrated?)
kristate has quit [Remote host closed the connection]
kristate has joined #zig
mnoronha has joined #zig
davr0s has joined #zig
tiehuis has joined #zig
<tiehuis> scientes: pretty sure we would only need a comptime allocator for this to be work: https://github.com/ziglang/zig/issues/1291
mnoronha has quit [Read error: Connection reset by peer]
mnoronha has joined #zig
mnoronha has quit [Quit: Ping timeout (120 seconds)]
mnoronha has joined #zig
mnoronha has quit [Read error: Connection reset by peer]
mnoronha has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<andrewrk> kristate, hi there
<kristate> andrewrk: hi
<kristate> how was your vacation?
<andrewrk> quite pleasant seeing my family. but now I'm ready to get back to work :)
<kristate> :)
<kristate> andrewrk: this BigInt stuff is crazy
<andrewrk> I'm going to focus on improving the stage1 compiler for the 0.3.0 release
<andrewrk> (starting with all the open PRs)
<kristate> andrewrk: thank-you!
<kristate> stage1 is not so bad -- I like it
<kristate> andrewrk: I am going to say something really weird -- but what if we start rewriting parts of stage1 in zig? kind of like a stage1.5
<kristate> andrewrk: BigInt needs a Big Overhaul
<andrewrk> I think that could make sense, as a transition. we will never lose stage1 though
<andrewrk> stage1 must be source, not output
<andrewrk> and it has to be able to build stage2 in 1 step
<kristate> andrewrk: yeah, more I think about it, doesn't make sense
mnoronha has quit [Quit: Ping timeout (120 seconds)]
<andrewrk> is it really that bad? I thought the problem was that it had a bunch of untested code paths
mnoronha has joined #zig
<kristate> twos_compliment is doing too much work
<kristate> we're only using BigInt in 87 places (outside of BigInt itself)
<andrewrk> I mean that logic has to go somewhere
<andrewrk> if you can refactor it to delete some lines of code, by all means, go for it
<kristate> andrewrk: yeah, about 2 hours into a patch
<andrewrk> cool
<andrewrk> I do need 1 more day of rest before I get back into it
<andrewrk> I'm about to get on a red eye flight
<andrewrk> talk to you later
<kristate> andrewrk: okay, sleep well! welcome back
mnoronha has quit [Ping timeout: 272 seconds]
davr0s has joined #zig
mnoronha has joined #zig
mnoronha has quit [Ping timeout: 272 seconds]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
mnoronha has joined #zig
mnoronha has quit [Ping timeout: 276 seconds]
mnoronha has joined #zig
mnoronha has quit [Ping timeout: 272 seconds]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
kristate has quit [Remote host closed the connection]
kristate has joined #zig
mnoronha has joined #zig
mnoronha has quit [Ping timeout: 276 seconds]
kristate has quit [Ping timeout: 272 seconds]
mnoronha has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mnoronha has quit [Ping timeout: 272 seconds]
davr0s has joined #zig
ofelas has joined #zig
return0e has joined #zig
return0xe has quit [Ping timeout: 240 seconds]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mnoronha has joined #zig
mnoronha has quit [Ping timeout: 272 seconds]
tiehuis has quit [Quit: WeeChat 2.2]
mnoronha has joined #zig
mnoronha has quit [Ping timeout: 268 seconds]
davr0s has joined #zig
mnoronha has joined #zig
mnoronha has quit [Ping timeout: 276 seconds]
mnoronha has joined #zig
mnoronha has quit [Ping timeout: 260 seconds]
mnoronha has joined #zig
mnoronha has quit [Ping timeout: 276 seconds]
mnoronha has joined #zig
mnoronha has quit [Ping timeout: 256 seconds]
edr has joined #zig
mnoronha has joined #zig
mnoronha has quit [Ping timeout: 240 seconds]
mnoronha has joined #zig
mnoronha has quit [Ping timeout: 268 seconds]
mnoronha has joined #zig
mnoronha has quit [Ping timeout: 240 seconds]
noonien has joined #zig
DutchGh0st has joined #zig
<DutchGh0st> is there like a 'goto' concept in zig?
<scientes> DutchGh0st, yes, named breaks https://github.com/ziglang/zig/issues/630
<unique_id> I like goto myself, but I've not had a need for it in Zig because of 'named breaks'. Though in a rare case my code became a little bit more verbose.
<scientes> yeah i like both goto and VLAs and @alloca
<unique_id> What does the % do in Andrew's example on that page? I assume that syntax has been removed.
<DutchGh0st> a 'named' break just puts a lable on a loop-struct, and you break anywhere out of any loop?
<scientes> errdefer
<DutchGh0st> or am I completely wrong?
<scientes> yeah there was a de-mysterious-symbols movement in zig
<DutchGh0st> is it more or less equal to the labeled breaks in Rust? or more powerfull?
<unique_id> I don't trust myself to answer questions on breaks, but the docs have some info and there's this: https://github.com/ziglang/zig/issues/1327
<DutchGh0st> ah mhhh
<DutchGh0st> how is your game going btw??
<unique_id> I've been in learning mode for the last few days. I've been seeing how today's games implement particle systems, decals, etc. It's looking like my game will be going with what's called a tiled forward renderer. Basically you split your screen into tiles and use a compute shader to collect a list of things per tile. Like a list of lights, a list of decals, a list of particles. This makes things more efficient and it's a forward
<unique_id> shader which means I get MSAA.
<unique_id> Basically I'll be going with an architecture similar to what Doom did. But my game won't actually be heavy on graphics requirements though it will require a vulkan compatible card.
<unique_id> 90% of steam users have DX12 supported card by now (a bit less for vulkan) and it'll increase rather quick. It'll definitely leave some people out sadly, but w/e.
ofelas has quit [Quit: shutdown -h now]
<unique_id> (i don't know how many of those dx12 users are chinese playing through internet cafes....could be a lot)
<unique_id> I really need decals, I can't get them easily without tiled forward or deferred :)
<DutchGh0st> mhhh
<unique_id> DutchGh0st: decals are anything that's layed out directly onto anything without adding height. Text (possibly), blood splatter, explosion damage, etc
<DutchGh0st> ohhh I see
<DutchGh0st> seems all difficult to get good at haha
<unique_id> yeah I'm taking on a lot of roles that people usually specialize at. It takes a long time of being very confused until things start to make sense
<unique_id> DutchGh0st: I started reading about deferred shading 2 years ago, it was only recently that I began to understand them. I could of course just use a ready-made game engine but had I done that I'd be a skilless game developer with a tool much too powerful for me. And I'd pick the same strategies that the largest studios employ. I'd depend on an animator for animations instead of learning math tricks to reduce the number of
<unique_id> keyframes required, allowing programmer animations :)
<unique_id> So for me picking a game engine is no shortcut. Learning how everything works is inevitably going to make me a better developer, with a much better understanding of what's possible
<DutchGh0st> I remember I had to make a game for highschool
<DutchGh0st> we had like 3 teams
<DutchGh0st> the animators or whatever, the map creators, and the programmers
<DutchGh0st> note: We had never programmed anything before
<scientes> is there some sample code that uses the new tcp stuff?
<DutchGh0st> and like after a while the animators and map creators had like all these maps an animations and whatnot.....and it was just a hard job for me and the rest of the programmers to put everything together well
<unique_id> yeah that's understandable. They're creating everything in isolation, in their little tools. The whole game is then left
<DutchGh0st> I wonder what we could have produced if we'd gotten propper lessons
<DutchGh0st> cuz it at the start of the year it was like 'youuu gotta make 2 games. They've to be finished in like 6 months. Goodluck'
occivink has quit [Quit: WeeChat 2.1]
<scientes> thats horrible teaching
<scientes> you need smaller projects than that
<DutchGh0st> yes!
<DutchGh0st> we had 2 crappy games at the end
<scientes> like my command-not-found implementation https://github.com/shawnl/command-not-found is even complicated enought that porting it to zig would be significant (/etc/groups support, gettext .posupport)
DutchGh0st has quit [Ping timeout: 252 seconds]
mnoronha has joined #zig
return0e has quit [Quit: Leaving]
<scientes> how do i implement non-blocking io with async?
<scientes> i'm getting error.WouldBlock when i try to read
<scientes> but its in a async thread, I want it to block
<scientes> I need an example of how to use EventFd
<scientes> there are no tests
<scientes> I don't know how to call read with event.loop
mahmudov has quit [Remote host closed the connection]
<scientes> and why is it pread with a v--vector?
mahmudov has joined #zig