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 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…]
return0e has quit []
return0e has joined #zig
return0e has quit [Client Quit]
hasen_judy has joined #zig
zesterer has quit [Quit: zesterer]
hasen_judy has quit [Ping timeout: 240 seconds]
return0e has joined #zig
hopppetosse has joined #zig
dd3 has quit [Ping timeout: 256 seconds]
hasen_judy has joined #zig
hasen_judy has quit [Ping timeout: 276 seconds]
hopppetosse has quit [Ping timeout: 256 seconds]
klltkr has quit [Ping timeout: 256 seconds]
davr0s has joined #zig
MajorLag_ has quit [Ping timeout: 260 seconds]
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…]
hasen_judy has joined #zig
hasen_judy has quit [Ping timeout: 240 seconds]
dd3 has joined #zig
dd3 has quit [Ping timeout: 240 seconds]
zesterer has joined #zig
hasen_judy has joined #zig
hasen_judy has quit [Ping timeout: 276 seconds]
<zesterer> Passing a callback to fmt.format()... I get "Unable to evaluate constant expression". Any ideas?
davr0s has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
hasen_judy has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tjpalmer has joined #zig
<tjpalmer> Anyone know the secret for compiling to wasm? I tried this: exe.setTarget(builtin.Arch.wasm32, builtin.Os.freestanding, builtin.Environ.unknown);
<tjpalmer> Got this error: unable to create target based on: wasm32-unknown-unknown-unknown
<tjpalmer> I can dig around more, but I figured I'd check first to see if anyone else already knows the answer.
<tjpalmer> And I haven't really tried `format` so I can't answer that myself.
tjpalmer has quit [Client Quit]
<andrewrk> benzrf, all the assertion failures are bugs
<GitHub21> [zig] andrewrk closed pull request #743: Use /dev/urandom and sysctl(RANDOM_UUID) on Linux. (master...linux-random) https://git.io/vNxrf
<GitHub18> [zig] andrewrk pushed 2 new commits to master: https://git.io/vNhno
<GitHub18> zig/master ec59f76 Andrew Kelley: Merge pull request #743 from bnoordhuis/linux-random...
<GitHub18> zig/master 73ee434 Ben Noordhuis: Use /dev/urandom and sysctl(RANDOM_UUID) on Linux....
hoppetosse has joined #zig
hoppetosse has quit [Ping timeout: 264 seconds]
davr0s has joined #zig
<GitHub176> [zig] andrewrk pushed 1 new commit to master: https://git.io/vNhRh
<GitHub176> zig/master 44d8d65 Andrew Kelley: fix test failure, organize code, add new compile error
hoppetosse has joined #zig
hasen_judy has quit [Remote host closed the connection]
<andrewrk> zesterer, did you forget the format parameter? where is the error pointing to?
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<zesterer> andrewrk: I don't believe so. Since I'm new to Zig, I'm using Zen as a reference when it comes to syntax, and I'm doing exactly what Zen does: https://github.com/tupai-os/kernel/blob/master/dev/tty.zig#L32
<andrewrk> zesterer, I'll run your code and have a look
<andrewrk> also, sorry I couldn't get to all your tickets. busy weekend for me
<zesterer> andrewrk: Cheers. If you're building the entire kernel, you'll want to clone the root repostory and then the submodules. For now, I've not touched the printf method, but that can be changed in main.zig
return0__ has joined #zig
return0e has quit [Ping timeout: 248 seconds]
davr0s has joined #zig
return0__ has quit [Ping timeout: 256 seconds]
<andrewrk> zesterer, it compiles for me
return0e has joined #zig
<andrewrk> oh, nvm I was able to trigger that compile error by adding a printf call
jfo has joined #zig
<jfo> I'm wondering what an assert that's expecting an error looks like, could someone point me to an example of that in the src?
jfo has quit [Client Quit]
<andrewrk> zesterer, your printf format argument does not have `comptime` on it. so it's a runtime known value
jfo has joined #zig
<andrewrk> jfo, foo() catch |err| assert(err == error.MyError) else @panic("expected error")
<jfo> awesome, thanks
<andrewrk> I think in the future we can have assert(foo() == error.MyError) but afaik that doesn't work yet
hasen_judy has joined #zig
jfo has quit [Ping timeout: 260 seconds]
hasen_judy has quit [Ping timeout: 276 seconds]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jfo has joined #zig
<zesterer> andrewrk: Did you change "print" to "printf" in main.zig?
<zesterer> andrewrk: Oh wait dw. New messages
<zesterer> andrewrk: FYI, the error message appeared to point at a completely different parameter (hence my confusion). I assumed it was a problem with the callback
jfo has quit [Ping timeout: 255 seconds]
<andrewrk> zesterer, it pointed at the correct parameter for me, because I used the official zig compiler, which only supports spaces
<andrewrk> so I did s/\t/ /g
<andrewrk> to get it to compile
<andrewrk> and it pointed to the correct parameter
<zesterer> andrewrk: Touche ;-)
<zesterer> andrewrk: Just a thought: shouldn't the error report strip all initial whitespace from the line? That way it doesn't take up so much space
<andrewrk> maybe. it kinda looks good as is though
<zesterer> Fair enough. You're the maintainer.
<andrewrk> zesterer, to be fair, the error message printing could be updated to support tabs. it's not a fundamental limitation
<andrewrk> just a bug in your fork
<zesterer> andrewrk: I might fix that. I'd just replace all tabs in the error output with spaces. Easiest and probably the smartest way of doing it
<andrewrk> zesterer, or you could iterate over the line byte by byte, and if it's a ' ' or '\t', print the same thing, otherwise print a ' '
<andrewrk> instead of printing ' ' * column
<GitHub44> [zig] andrewrk pushed 1 new commit to master: https://git.io/vNh5M
<GitHub44> zig/master 40e4e42 Andrew Kelley: handle linux returning EINVAL for large reads...
<zesterer> andrewrk: Fair point
jfo has joined #zig
jfo has quit [Ping timeout: 256 seconds]
<benzrf> andrewrk: semi-serious suggestion: why not aim for entirely eliminating 'comptime' as a language-level concept
<andrewrk> how would you solve the problems that comptime solves?
<benzrf> same ways as in any dependently-typed language ;)
<benzrf> oh wait hmmmmmmm
<GitHub17> [zig] andrewrk pushed 1 new commit to master: https://git.io/vNhAv
<GitHub17> zig/master 917e6fe Andrew Kelley: handle linux returning EINVAL for large writes...
<benzrf> i guess to make that work in the context of a language like zig, you might end up having to basically reimplement haskell-style typeclass machinery >.>
davr0s has joined #zig
<zesterer> benzrf: Without comptime, you'd have weirdly ambiguous errors for things that can/can't be comptime-evaluated but NEED to be comptime evaluated. Like printf format strings. You'd end up with the source of an error being a long way from its reported location, which causes a lot of problems
<zesterer> i.e: You pass a non-comptime string into fmt.format, and then a comptime string. The error occurs within fmt.format (which is confusing enough for new users, since it implies a problem with the standard library), yet behaves differently for each parameter.
<zesterer> At least I assume that's why. Feel free to correct me.
<andrewrk> that's right
jfo has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
MajorLag_ has joined #zig
jfo has quit [Ping timeout: 276 seconds]
jfo has joined #zig
dd3 has joined #zig
<jfo> andrewrk: the plan is to pin to the llvm release coming out in a month or so, is that right?
<andrewrk> jfo: that's right. 0.2.0 planned release date is the Monday 1 week after llvm 6.0.0
<jfo> ok. I've added head to homebrew but will likely need to account for that somehow then
<jfo> I assume it's acceptable for --HEAD formulas to be flakier, considering.
<jfo> (acceptable to them, I mean)
arBmind has joined #zig
davr0s has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jfo has quit [Ping timeout: 240 seconds]
davr0s has joined #zig
jfo has joined #zig
zesterer has quit [Quit: zesterer]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
hoppetosse has quit [Ping timeout: 256 seconds]
jfo has quit [Ping timeout: 240 seconds]
dd3 has quit [Ping timeout: 256 seconds]
dd3 has joined #zig
hasen_judy has joined #zig
hoppetosse has joined #zig
hasen_judy has quit [Ping timeout: 255 seconds]
dd3 has quit [Ping timeout: 240 seconds]
jfo has joined #zig
tridactyla has quit [Remote host closed the connection]
tridactyla has joined #zig
cenomla has joined #zig
hoppetosse has quit [Ping timeout: 268 seconds]
mal`` has quit [Quit: Leaving]
mal`` has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
arBmind has quit [Quit: Leaving.]
hasen_judy has joined #zig