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> tiehuis: Ah ok, is this block expression syntax documented?
<heakins> I see its something like: "comptime <tag>: { ...; break :<tag> <expression> }"
<tiehuis> not explicitly mentioned in the docs i don't think although it is used a few times
<MajorLag> it's kinda documented in the section on arrays
<tiehuis> and yeah like that, although of course it isn't strictly a comptime expression
<heakins> Great, that works
<heakins> thanks
heakins has quit [Ping timeout: 260 seconds]
heakins has joined #zig
<heakins> Anyone know why i always have to provide --zig-install-prefix? I am using zig v0.2.0 from https://ziglang.org/download/0.2.0/zig-linux-x86_64-0.2.0.tar.xz
<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> access("/root/zig-bootstrap/out/stage1/lib/zig/std/index.zig", F_OK) = -1 EACCES (Permission denied)
SimonNa has quit [Quit: Leaving]
<heakins> Ah... I see that this has been fixed since 0.2.0. https://github.com/zig-lang/zig/commit/b01c50d6fae581050affdc438942b979ae54a8da
<heakins> Nevermind
tiehuis has quit [Quit: WeeChat 2.1]
<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.
zolk3ri has quit [Quit: Lost terminal]
<andrewrk> zig now has better stack traces than node.js for async code
SimonNa has joined #zig
davr0s has joined #zig
<GitHub192> [zig] andrewrk pushed 6 new commits to master: https://git.io/vx7v6
<GitHub192> zig/master ada4411 Andrew Kelley: put the error return addresses in the coro frame
<GitHub192> zig/master e4083b7 Andrew Kelley: codegen: fix not putting llvm allocas together
<GitHub192> zig/master d26905c Andrew Kelley: error return traces for the early return case...
<GitHub151> [zig] andrewrk pushed 2 new commits to master: https://git.io/vx7vN
<GitHub151> zig/master 292d0cb Andrew Kelley: add docs for union methods
<GitHub151> zig/master eae355d Andrew Kelley: add docs for packed enum