ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
atk has quit [Quit: Well this is unexpected.]
atk has joined #zig
isd has quit [Quit: Leaving.]
MajorLag has quit [Ping timeout: 246 seconds]
MajorLag has joined #zig
jjido has joined #zig
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
davr0s has joined #zig
jjido has joined #zig
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
JinShil has quit [Quit: Leaving]
davr0s has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
srdjan_ has joined #zig
srdjan_ has quit [Client Quit]
atk has quit [Ping timeout: 260 seconds]
atk has joined #zig
lqd has quit []
lqd has joined #zig
steveno_ has joined #zig
steveno_ has quit [Ping timeout: 240 seconds]
steveno_ has joined #zig
steveno_ has quit [Quit: Leaving]
noonien has joined #zig
davr0s has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
cenomla has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
Ichorio has joined #zig
jjido has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
jjido has quit [Ping timeout: 265 seconds]
jjido has joined #zig
cenomla has quit [Ping timeout: 265 seconds]
<bodie_>
how does embedFile work?
clownpriest has joined #zig
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jjido has joined #zig
jjido has quit [Client Quit]
noonien has quit [Quit: Connection closed for inactivity]
<bodie_>
andrewrk -- I was wondering about the implementation
<andrewrk>
bodie_, it loads the file from disk into memory and creates a comptime value for it, which requires quadruple the amount of memory than it does on disk
<andrewrk>
I haven't yet implemented an optimization for this
<bodie_>
hmm, I guess the file io is hardcoded, but if you made it into its own macro, that might be neat.
<andrewrk>
can you elaborate?
<bodie_>
well, you said no syscalls, but that must use some syscall
<bodie_>
at comptime that is
<bodie_>
I guess the idea is to prevent user code from causing other users' compilers to do Bad Behaviors
<andrewrk>
I see. The problem is that we need to make sure that anything done at compile time is (1) deterministic and (2) we can track the dependencies and when they change
<andrewrk>
for example when you do @embedFile, zig may cache the resulting program. but if you change the file and rebuild, zig should figure out that it needs to re-load the file
<bodie_>
neat
<andrewrk>
what other things are you wishing were possible at compile time?
<bodie_>
I was thinking about network IO and that got me ruminating
<bodie_>
what if you wanted to do a multi-stage comptime?
<andrewrk>
go on
<bodie_>
like preprocessor chaining
<bodie_>
that's about as fully-formed as this thought is
<andrewrk>
I see
<bodie_>
although I have thought about it in other contexts
<andrewrk>
I think we need an proper use case to consider this in a meaningful way
<bodie_>
basically a compiler that is just a series of transforms
<bodie_>
hmm, ok
<bodie_>
so if one comptime macro depends on the results of another comptime macro, how do you express that? just have one call the other and use its return value?
<andrewrk>
what do you mean macro?
<andrewrk>
function?
<bodie_>
I mean a comptime function
<andrewrk>
yes it looks just like normal code
<andrewrk>
functions calling functions
<bodie_>
ok, cool
Ichorio has quit [Ping timeout: 276 seconds]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]