ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
davr0s has joined #zig
_whitelogger has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
AndroUser2 has quit [Ping timeout: 264 seconds]
AndroUser2 has joined #zig
AndroUser2 has quit [Read error: Connection reset by peer]
dbandstra has joined #zig
ac has joined #zig
ac is now known as Guest93643
Guest93643 is now known as f5190c
hooo has joined #zig
f5190c has quit [Quit: cya guys]
kristate has joined #zig
quc has quit [Remote host closed the connection]
quc has joined #zig
MajorLag1 has joined #zig
<andrewrk>
winksaville, what are you trying to do?
<andrewrk>
I don't know what to suggest because it's not clear to me what you're trying to accomplish
<andrewrk>
you can see an example usage of std.atomic.Queue API in its tests
kristate has quit [Ping timeout: 256 seconds]
* dbandstra
staring at `top` display as zig tries to load a 512x512 pixel pcx image at compile time
<dbandstra>
12 minutes and counting
zolk3ri has joined #zig
<andrewrk>
I'll bet it's leaking memory too
<dbandstra>
yeah
<andrewrk>
what's your comptime branch quota set to?
<dbandstra>
20000000
<andrewrk>
haha
<dbandstra>
i would be sad if it died and the number wasn't high enough
<dbandstra>
now using 60% of my memory (not sure how to read the top display, but i have 16GB in my machine)
<andrewrk>
in theory comptime zig should be able to be roughly as fast as python
<andrewrk>
but I didn't code it with this in mind in stage 1
<dbandstra>
i'm killing the process because my computer sometimes dies if cpu is saturated too long (it's warm here too)
<andrewrk>
turns out we actually need a garbage collector for comptime zig code
<dbandstra>
i'm going to try some smaller images later ... i feel like time is exponential to number of pixels
<andrewrk>
it's a bit ironic
<dbandstra>
hehe
<andrewrk>
oh, I just thought of at least one place where that is true
kristate has joined #zig
<andrewrk>
hmm actually it is different than I remembered
<andrewrk>
oh well. anyway comptime code speed is something in scope to improve but as you can imagine, it's pretty low priority in stage 1
<dbandstra>
yeah i lost interest in loading images at comptime but i'm just trying to fill out a test suite
kristate_ has joined #zig
kristate has quit [Ping timeout: 248 seconds]
quc has quit [Remote host closed the connection]
quc has joined #zig
<dbandstra>
well that's enough for me, 64x64 lena image at comptime takes 4 seconds, 128x128 takes 70 seconds
<dbandstra>
i had a ~256x128 image loading in more like 30 seconds earlier but that had a lot of long RLE runs in it
<dbandstra>
oh, if i make the pcx loader work on a slice directly, instead of a stream with readByte() calls, it speeds up dramatically, 128x128 image in 2s instead of 70s, even 512x512 image finished in 17 seconds
<dbandstra>
so i guess it's the function calls
<dbandstra>
without function calls seems more linearly related to number of pixels
<dbandstra>
if my math is right it probably would have taken four and a half hours to do the 512x512 one with function calls
<kristate_>
andrewrk: thanks for the comments
quc has quit [Remote host closed the connection]
quc has joined #zig
<kristate_>
andrewrk: not sure how to return the promise->T
<unique_id>
andrewrk: loop.initSingleThreaded, loop.initMultiThreaded are private
zolk3ri has quit [Quit: leaving]
zolk3ri has joined #zig
zolk3ri has quit [Client Quit]
zolk3ri has joined #zig
davr0s has joined #zig
MajorLag2 has joined #zig
MajorLag1 has quit [Ping timeout: 256 seconds]
MajorLag2 has quit [Ping timeout: 240 seconds]
dbandstra has quit [Quit: Leaving]
MajorLag1 has joined #zig
<unique_id>
The Server in std/event/tcp.zig, shouldn't its handleRequestFn take std.net.Address and std.os.File by value?
<unique_id>
since now that's possible
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zolk3ri has quit [Quit: leaving]
zolk3ri has joined #zig
davr0s has joined #zig
noonien has joined #zig
kristate_ has quit [Ping timeout: 260 seconds]
quc has quit [Read error: Connection reset by peer]
quc has joined #zig
mahmudov has quit [Remote host closed the connection]
kristate has joined #zig
kristate has quit [Remote host closed the connection]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
quc has quit [Ping timeout: 240 seconds]
hooo has quit [Quit: Page closed]
bodie_ has quit [Quit: ZNC 1.6.6+deb1 - http://znc.in]
bodie_ has joined #zig
bodie_ has quit [Changing host]
bodie_ has joined #zig
<bodie_>
hi andrewrk, I probably didn't make myself clear enough yesterday. the error is when I try to build a source file using self-hosted zig.
<bodie_>
The stage2 build works.
<bodie_>
s/build/self-build/
kristate has joined #zig
kristate has quit [Remote host closed the connection]
zolk3ri has quit [Remote host closed the connection]
kristate has joined #zig
zolk3ri has joined #zig
bheads has joined #zig
davr0s has joined #zig
kristate has quit [Remote host closed the connection]
kristate has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
quc has joined #zig
davr0s has joined #zig
return0e has quit [Remote host closed the connection]
andi3 has joined #zig
MajorLag1 has quit [Ping timeout: 268 seconds]
<andi3>
yesterday I read that comptime needs a gc and is slow (may get faster but still...) and just remembered jai running a demo game in the com time vm just fine
<andi3>
not sure if they have a gc but have not heard about that so I am a bit curious as to why zig needs it/ maybe there is a better way?
<kristate>
andi3: comptime is not part of the runtime
<andi3>
good to see, there is some more discussion about interfaces happening at some places here and there ;)
<kristate>
andi3: might be too early to optimize that part of the compiler since we don't have stage2 done, either
MajorLag1 has joined #zig
MajorLag2 has joined #zig
MajorLag1 has quit [Ping timeout: 256 seconds]
kristate has quit [Remote host closed the connection]
kristate has joined #zig
MajorLag2 has quit [Ping timeout: 260 seconds]
<andi3>
for the same reason I was surprised, because if (and I do not know if this is true) but if jai manages without gc then maybe this should be the target for zigs comptime as well for stage2
return0e has joined #zig
<andrewrk>
unique_id, I need to revisit the tcp server API
<andrewrk>
now I know better how to do it- instead of passing an async function "handler", it will return a Channel of connections that you can get() from
andi3 has quit [Ping timeout: 252 seconds]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<kristate>
andrewrk: good morning!
<andrewrk>
wow we are on at the same time kristate! :)
<kristate>
a little past midnight in Japan
<andrewrk>
I'm looking at your PR
<kristate>
thanks!
<andrewrk>
by "remove old semantic analysis code" I mean to remove the suspend |handle| {} feature
<andrewrk>
so that suspend no longer can give a `handle` variable to the block
<kristate>
ah, okay -- do you want to keep the block? I thought that was important because it coincides with llvm.coro.suspend
<andrewrk>
yes the block can stay but the variable capture should be removed - see this code snippet that I'm pasting on the PR comment
<kristate>
okay, cool
<kristate>
going to go to bed for 6 hours or so and then I'll start to rework suspend |handle| {}
<winksaville>
andrewrk: I'm trying to send messages via Queus between entities (actors) which can have any type. In C you'd cast to the type you expect to be present.
<andrewrk>
good night kristate
return0e has quit [Read error: Connection reset by peer]
return0e has joined #zig
<andrewrk>
winksaville, all the casts in C you can do in Zig too
<andrewrk>
but it looks like you're trying to do it without unsafe casts?
<andrewrk>
you have 2 options for that: tagged unions and @fieldParentPtr
<winksaville>
I'd like to, if possible
kristate has quit [Remote host closed the connection]
<winksaville>
Ok, I'll look into those, txs
<winksaville>
andrewrk: I watched your twitch stream yesterday, have you commited the async/await code you were working on?
<andrewrk>
not yet
bheads has quit [Ping timeout: 240 seconds]
kristate has joined #zig
<winksaville>
k, I'll be watching for it
kristate has quit [Ping timeout: 248 seconds]
MajorLag1 has joined #zig
<winksaville>
I've looked in the docs but didn't find a explanation of the type "var". It seems like it provides RTTI for the parameter, is that correct?
<andrewrk>
there is no type "var"
<andrewrk>
however you can put "var" instead of the type in a function definition to tell zig to infer the type
<andrewrk>
there is no run-time type information
kristate has joined #zig
<winksaville>
k
kristate has quit [Remote host closed the connection]
kristate has joined #zig
kristate has quit [Remote host closed the connection]
kristate has joined #zig
<unique_id>
I see. I decided to move from asio+beast to the h2o server for my website stuff, but using Zig.
kristate has quit [Ping timeout: 248 seconds]
<unique_id>
I'll use their libh2o library to implement my app logic. I really don't understand how others create non-static websites, I'm not a web dev. fastcgi seems pretty dumb. reverse proxy you still need a server. So I'll use libh2o
MajorLag1 has quit [Ping timeout: 256 seconds]
<andrewrk>
I'm a fan of event-based I/O systems for non-static websites
<andrewrk>
it makes it easier to implement pushing data updates
<andrewrk>
rather than the website polling the server
<bodie_>
In fact, ML was such a language, invented to implement the progenitor of HOL/Light
<bodie_>
Most of these operate on set theoretic primitives, don't generate small native binaries, have nearly unusable syntax because of dependent types, and so on
davr0s has joined #zig
v1zix has quit [Ping timeout: 252 seconds]
kristate has joined #zig
kristate has quit [Ping timeout: 244 seconds]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]