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/
<andrewrk> I just had a really productive 2-hour phone conversation with thejoshwolfe. I feel good about how to proceed regarding async/await on blocking functions and cancel and stuff
<fengb> Is thejoshwolfe secretly the real designer behind everything?
<andrewrk> yes
<andrewrk> I just press all the keyboard buttons
<fengb> I’ve never seen the two of you in the same room 🤔
marijnfs__ has joined #zig
kristoff_it has joined #zig
marijnfs_ has quit [Ping timeout: 258 seconds]
kristoff_it has quit [Remote host closed the connection]
_whitelogger has joined #zig
kristoff_it has joined #zig
SimonNa has quit [Ping timeout: 246 seconds]
SimonNa has joined #zig
kristoff_it has quit [Ping timeout: 245 seconds]
kristoff_it has joined #zig
kristoff_it has quit [Ping timeout: 246 seconds]
dembones has quit [Remote host closed the connection]
donpdonp has quit [Ping timeout: 248 seconds]
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #zig
_whitelogger has joined #zig
<daurnimator> andrewrk: when does @field get expanded?
<andrewrk> it gets expanded into zig ir, and evaluated in exactly the same way as any other field access
<daurnimator> I've always found it weird how builtins aren't functions unless they are
<hspak> Has anyone seen this challenge? Might be fun to submit a Zig implementation: https://twitter.com/colmmacc/status/1153727018896244736
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #zig
<daurnimator> hspak: we already use lemire's algorithm in std/rand.zig
kristoff_it has joined #zig
kristoff_it has quit [Ping timeout: 246 seconds]
LargeEpsilon has joined #zig
knebulae has quit [Read error: Connection reset by peer]
rappet has quit [Remote host closed the connection]
rappet has joined #zig
<mipri> Lemire's C doesn't look at all like the code referenced in std/rand.zig. that's linking a blog post that says it's inspired by Lemire.
<mipri> erm. actually it is similar. Just hard to see through the support for variable bit widths.
kristoff_it has joined #zig
kristoff_it has quit [Ping timeout: 245 seconds]
andersfr has joined #zig
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #zig
andersfr has quit []
avoidr has joined #zig
return0e_ has quit [Ping timeout: 248 seconds]
allan0 has joined #zig
ltriant has quit [Quit: leaving]
kristoff_it has joined #zig
kristoff_it has quit [Ping timeout: 258 seconds]
marmotini_ has joined #zig
abbiya has joined #zig
<mq32> hey
<mq32> wrapping a c pointer is `[*c]i32`, right?
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #zig
<samtebbs> Yeah that's a c pointer to an i32. Not sure what you mean by "wrapping" though
<mq32> wrapping "translating C to Zig"
<mq32> is it better to do constants as comptime_int or with a certain time?
laaron has quit [Remote host closed the connection]
laaron has joined #zig
Ichorio has joined #zig
laaron has quit [Remote host closed the connection]
laaron has joined #zig
vramana has joined #zig
Ichorio has quit [Ping timeout: 264 seconds]
laaron has quit [Remote host closed the connection]
laaron has joined #zig
return0e has joined #zig
marmotini_ has quit [Ping timeout: 244 seconds]
marmotini_ has joined #zig
laaron has quit [Remote host closed the connection]
laaron has joined #zig
laaron has quit [Client Quit]
laaron has joined #zig
laaron has quit [Remote host closed the connection]
abbiya has quit [Quit: abbiya]
laaron has joined #zig
<fengb> Certain time?
<mq32> *type
<mq32> sorry
<fengb> Yeah keep it comptime unless there’s a specific need
<mq32> okay :)
<mq32> auto-generating zig code... :D
<samtebbs> Oh you made ZigPaint! I saw that on reddit yesterday
<samtebbs> Still need to try it out
<mq32> samtebbs: nope, that will be another ZigPaint then :D
<mq32> my project is not even startable or something
<mq32> it just prints out: "yeah, i've loaded glBindTexture with this address!"
<fengb> You need a more original project name :P
<mq32> hah, maybe
<fengb> I’m the king of stupid names
<mq32> so name my project! :D
<samtebbs> Unless your pseudonym is tuket, I don't think it's yours
<mq32> nope, definitly not :D
<huuskes> his code switches indentation styles *eye twitch*
<mq32> btw, zig provides a beautiful way to load OpenGL functions :)
<mq32> "please import all function prototypes of this struct type from this library"
<fengb> comptime code generation?
<mq32> kinda
<mq32> i use comptime to iterate over the struct fields, refactor the name from "foo" to "glFoo" and load that function from the OpenGL library
<samtebbs> mq32: :O
<samtebbs> I need that for SDL2 and libz80
<mq32> i find this solution rather elegant <3
<samtebbs> I'm so tired of doing `z80.Z80_FOO()`
<mq32> the cool thing is that i can now give the user the OpenGL version he wants
<mq32> and only provide symbols defined for this OpenGL version :)
<mq32> > <samtebbs> I'm so tired of doing `z80.Z80_FOO()`
<mq32> me too, so i thought: comptime the problem away
<mq32> and samtebbs: on the name ZigPaint: What would you call the attempt to recreate the classic windows xp paint in Zig? :D
laaron has quit [Remote host closed the connection]
laaron has joined #zig
<samtebbs> mq32: Hmm, well ZigPaint sounds good. And I don't think the thing I linked is actually called that
<samtebbs> I just got the two mixed up :)
<samtebbs> There's paint.net isn't there? So maybe paint.zig :p
<mq32> hehe
halosghost has joined #zig
<fengb> I hate endianness over the wire :(
<scientes> where there any changes to the parser recently?
<scientes> ahh, nvm
dimenus has joined #zig
<samtebbs> mq32: How about ZigZag, and you can only paint with zigzags?
<mipri> future video: "now in order to make this stroke you'll need a subpixel zigzag--otherwise known as a line"
<mq32> <3
<mq32> you can only draw in the shape of the Spaceship "ZIG"
influx6 has joined #zig
Ichorio has joined #zig
<influx6> I would like to task if anyone has implemented a http server in zig, one maintained and still functional?
<influx6> Am not sure what the progress of the language is, i was hoping to learn it instead of using rust, but not sure if its still being heavily worked on.
<samtebbs> influx6: http and networking are blocked on async functions
<samtebbs> andrewrk is making good progress though :)
<samtebbs> His latest youtube video shows it
<samtebbs> The language is being heavily worked on, certainly
<fengb> I think with the removal of cancellation, async is almost done
<samtebbs> mipri, mq32: Great ideas :D
<influx6> Oh awesome. Thanks for the info
<fengb> https://github.com/ziglang/zig/pull/3033 this is the async rewrite
<andrewrk> there's still a lot to do but I'm planning on merging into master today because the tests are green. progress can continue on master branch
<andrewrk> (along with more PR merges, bug fixes, etc)
<influx6> Sweet!
komu has joined #zig
<influx6> komu Yes i saw it, but seems it was also pending on the async work.
komu has quit [Remote host closed the connection]
influx6 has quit [Ping timeout: 260 seconds]
influx6 has joined #zig
Ichorio has quit [Read error: Connection reset by peer]
influx6 has quit [Remote host closed the connection]
Pursche01 has joined #zig
porky11 has joined #zig
kristoff_it has joined #zig
kristoff_it has quit [Ping timeout: 248 seconds]
casaca has quit [Ping timeout: 246 seconds]
casaca has joined #zig
<dimenus> i apologize for the dumb question, but how do i get the max value of an integer type?
<dimenus> scratch that, it's a userspace function
andersfr has joined #zig
kristoff_it has joined #zig
kristoff_it has quit [Ping timeout: 268 seconds]
andersfr has quit []
donpdonp has joined #zig
jmiven_ has joined #zig
<donpdonp> var data = struct { list: std.ArrayList(Thing) }; data.list.append(thing); expected type '*std.array_list...' found '*const std.array_list
<donpdonp> im not sure how to get around that.
<donpdonp> oh sorry that'd be var data = Data.init(allocator) but you get the idea.
jmiven has quit [Quit: reboot]
jmiven_ has quit [Quit: WeeChat 2.4]
jmiven has joined #zig
Akuli has joined #zig
<donpdonp> oh the struct's fn had (self: *const Self) instead of (self: *Self)
<Tetralux> That kind of error is one of those that should tell you quite plainly why it's const.
knebulae has joined #zig
<Tetralux> mq32: I had no idea you could do that with comptime.
<Tetralux> I'm guessing you cannot set whether a fn is inlined or not though xD
laaron has quit [Remote host closed the connection]
laaron has joined #zig
kristoff_it has joined #zig
kristoff_it has quit [Ping timeout: 248 seconds]
casaca has quit [Ping timeout: 245 seconds]
casaca has joined #zig
kristoff_it has joined #zig
casaca has quit [Ping timeout: 244 seconds]
casaca has joined #zig
kristoff_it has quit [Ping timeout: 245 seconds]
casaca has quit [Ping timeout: 246 seconds]
casaca has joined #zig
casaca has quit [Ping timeout: 245 seconds]
casaca has joined #zig
LargeEpsilon has quit [Ping timeout: 246 seconds]
bheads_ has joined #zig
bheads has quit [Ping timeout: 245 seconds]
bheads_ is now known as bheads
laaron has quit [Write error: Connection reset by peer]
kristoff_it has joined #zig
laaron has joined #zig
casaca has quit [Ping timeout: 272 seconds]
jjido has joined #zig
casaca has joined #zig
kristoff_it has quit [Ping timeout: 258 seconds]
casaca has quit [Ping timeout: 245 seconds]
casaca has joined #zig
donpdonp has quit [Ping timeout: 248 seconds]
Akuli has quit [Quit: Leaving]
kristoff_it has joined #zig
kristoff_it has quit [Ping timeout: 244 seconds]
tav has quit [Quit: Connection closed for inactivity]
kristoff_it has joined #zig
waleee-cl has joined #zig
andersfr has joined #zig
porky11 has quit [Quit: Leaving]
<andersfr> There's an alpha version of my Zig LSP implementation on github now: https://github.com/andersfr/zig-lsp
kristoff_it has quit [Ping timeout: 272 seconds]
andersfr has quit []
andersfr has joined #zig
Pursche01 has quit [Quit: Connection closed for inactivity]
andersfr has quit [Remote host closed the connection]
halosghost has quit [Quit: WeeChat 2.5]
dimenus has quit [Quit: Leaving]
return0e has quit [Ping timeout: 272 seconds]
return0e has joined #zig
Demos[m] has joined #zig
marmotini_ has quit [Remote host closed the connection]
<Tetralux> How do you add a new file to the stdlib?
<Tetralux> I'm having some trouble figuring out how one might add an extra file that contains tests to the stdlib
<Tetralux> Or does it just autofind them all?
<Tetralux> You mean like "_ = @import("my_file.zig")" ?
<Tetralux> I just found that part of std.zig and tried that.
<Tetralux> No difference.
<Tetralux> `zig build test-std -Dtest-filter=my.filter`
laaron has quit [Remote host closed the connection]
laaron has joined #zig
avoidr has quit [Quit: leaving]
ffddr has joined #zig
kristoff_it has joined #zig
kristoff_it has quit [Ping timeout: 245 seconds]
ltriant has joined #zig
laaron has quit [Remote host closed the connection]
kristoff_it has joined #zig
laaron has joined #zig
kristoff_it has quit [Ping timeout: 245 seconds]