ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
isd has quit [Quit: Leaving.]
<GitHub125>
[zig] tgschultz opened pull request #904: Added a couple dozen syscalls and related constants, structs. (master...std.os.linux-syscall-additions) https://git.io/vxQl4
Tobba has joined #zig
cenomla has joined #zig
cenomla has quit [Remote host closed the connection]
achambe has joined #zig
<achambe>
Hi there
<heakins>
Is there a way to set the evalBranchQuota from the command line instead of using the BuiltIn function @setEvalBranchQuota?
<heakins>
I have a line "const table = gen_table();" which is causing evaluation to exceed 1000 backwards branches
<heakins>
I can't figure out where to put the call to @setEvalBranchQuota for code like this. The docs only show it used as part of a comptime block.
tiehuis has joined #zig
<tiehuis>
heakins: not at the moment
<tiehuis>
if you post your code i can help you figure out where to put it
<tiehuis>
actually, with that particular line, you should just be able to turn it into a block expression and put set the branch quota there
<heakins>
I've had a look at the source code for zig, and I see that it looks in the same directory as where the zig executable is, which should be right for my setup...
<heakins>
When I try to use zig without --zig-install-prefix, and use strace to look at what files it's trying to open, I see this:
<heakins>
Hi all, what does it mean when a function parameter type is "var"?
abique has joined #zig
andrewrk has quit [Ping timeout: 264 seconds]
andrewrk has joined #zig
andrewrk has quit [Ping timeout: 276 seconds]
andrewrk has joined #zig
abique has quit [Quit: abique]
andrewrk has quit [Ping timeout: 260 seconds]
andrewrk has joined #zig
zolk3ri has joined #zig
andrewrk has quit [Ping timeout: 256 seconds]
andrewrk has joined #zig
andrewrk is now known as Guest15964
Azure has joined #zig
Azure is now known as Guest68915
Guest68915 has quit [Client Quit]
Guest15964 has quit [Ping timeout: 240 seconds]
andrewrk has joined #zig
<hobomatic>
heakins: It's just means 'this can be of any type'. unlike normal parametric polymorphism though, you can use it for 'duck typing'; so long as the usage of the value in the function body would compile at the call site, the function call compiles.
<hobomatic>
so you could do something like: fn foo(x: var) @typeOf(x) { return x + x; }, and anything with binary `+` is a valid argument.
<hobomatic>
of course you have to be careful of implicit argument casts. Passing a stuct as x for instance casts it to &const StructTypedate
abique has joined #zig
<MajorLag>
ok, can anyone tell me what I did wrong with PR #904 that ci seems to be missing a file that definitely exists?
steveno_ has quit [Quit: Leaving]
Lurker has joined #zig
Lurker has quit [Ping timeout: 260 seconds]
abique has quit [Quit: abique]
hinst has quit [Quit: No Ping reply in 180 seconds.]
hinst has joined #zig
hinst has quit [Quit: No Ping reply in 180 seconds.]
hinst has joined #zig
<andrewrk>
heakins, right, I only got static builds working last week - after 0.2.0 was released. I went back and added a binary upload for 0.2.0 but it doesn't have the runtime install prefix detection
<andrewrk>
MajorLag, I think you need to add it to CMakeLists.txt
<andrewrk>
so that the build system knows to install it
<MajorLag>
huh, ok.
<andrewrk>
there are files in std/ that we don't install
<andrewrk>
some of the compiler-rt tests are several megabytes
<MajorLag>
yeah, I remember writing my appdir build script to remove them when building the tarball.
<andrewrk>
I have 10 hours of uninterrupted time to work on zig today
<andrewrk>
I hope to have the proof of concept async tcp server working by the end of it
<MajorLag>
Nice. Spent 10 hours coding myself yesterday. I think it say something about Zig that I can do that and not feel drained.
<andrewrk>
great :)
<MajorLag>
I'm really quite pleased with zig. Even with the occasional bug and incomplete portions I still prefer it over everything else. So thanks for that.
<andrewrk>
happy to hear that. you're working on a cross platform game, is that right?
<MajorLag>
among other things. a tweening library, an operating environment on top of the linux kernel, other little things as they come up.
<andrewrk>
you're making move.zig?
<MajorLag>
indeed
<andrewrk>
amazing
<MajorLag>
actually, I think I've pretty much got most of it. Comptime can make something amazingly flexible. I've taken a break because the next step is writing display code to test it with. The interpoaltion portion was tested by dumping monochrome bitmaps but I'm not going to get away with anything that simple in this case.
<MajorLag>
The tweening is inspired by LibGDX's stuff in Scene2D and bears some resemblance, but isn't a complete scenegraph implementation because I wanted to build it in more generic layers. Right now it is agnostic about the precise definition of an "actor" to which tweening actions can be applied. You can make a sprite actor, with x, y, scale, etc and have the actions act on those, or you can make them n-dimensional verte
<MajorLag>
.
<andrewrk>
is that something you would use in a game engine?
<MajorLag>
yep. part of the reason I started building it was I wanted to finally add non-player entities, and because I'm not an artist I wanted to use a technique where I could compose them and animate them easily.