ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
SimonNa has quit [Remote host closed the connection]
SimonNa has joined #zig
hasen_judy has joined #zig
hasen_judy has quit [Ping timeout: 276 seconds]
davr0s has joined #zig
cenomla has joined #zig
arBmind has quit [Quit: Leaving.]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hasen_judy has joined #zig
cenomla has quit [Quit: cenomla]
davr0s has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Hejsil has joined #zig
Jezza has joined #zig
davr0s has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hoppetosse has joined #zig
zesterer has joined #zig
noonien has quit [Quit: Connection closed for inactivity]
davr0s has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zesterer has quit [Quit: zesterer]
arBmind has joined #zig
hoppetosse has quit [Ping timeout: 240 seconds]
Hejsil has quit [Read error: Connection reset by peer]
arBmind has quit [Quit: Leaving.]
zesterer has joined #zig
hoppetosse has joined #zig
hasen_judy has quit [Remote host closed the connection]
hasen_judy has joined #zig
hasen_judy has quit [Ping timeout: 256 seconds]
davr0s has joined #zig
hoppetosse has quit [Ping timeout: 248 seconds]
cenomla has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
arBmind has joined #zig
arBmind has quit [Client Quit]
davr0s has joined #zig
cenomla has quit [Quit: cenomla]
zesterer has quit [Quit: zesterer]
jfo has joined #zig
jfo has quit [Ping timeout: 276 seconds]
hoppetosse has joined #zig
jfo has joined #zig
hasen_judy has joined #zig
hasen_judy has quit [Ping timeout: 255 seconds]
<skyfex>
andrewrk: Btw, the reason I asked about the self hosting compiler vs C++ source... i was thinking about trying to contribute, but wasn't sure which one would be best to work on
<andrewrk>
skyfex: well the self hosted one would certainly be the most fun :-)
<andrewrk>
I think the self hosted one because it's not super complicated yet
<andrewrk>
And it doesn't have arbitrary decisions in it that make it hard for people to understand the code
<andrewrk>
Whereas I've allowed the c++ code to accumulate some cruft
<andrewrk>
E.g we could work towards zig fmt in the self hosted compiler pretty easily
<skyfex>
Once the self-hosting compiler is done, have you thought about generating C code from Zig code, instead of maintaining the C++ version? There is this WIP LLVM C backend I think
<andrewrk>
skyfex, I don't think that solves the problem it purports to solve
<andrewrk>
one of the reasons to keep the c++ source and never delete it is for package maintainers that want to bootstrap the compiler, proving that there is no backdoor
<jfo>
couldn't I `else` that if I didn't need to treat different errors differently?
<andrewrk>
it seems like running a bf program should probably only have the OutOfBounds error right?
<andrewrk>
yeah you could, unless you want to assert to the compiler that these 2 are the only possible errors
<jfo>
yes but the overflow happens before that would happen since the index gets decremented before I use it as an index
<jfo>
whereas the upper bound doesn't overflow, so they are different errs
<andrewrk>
error.Overflow is coming from std.math.sub. You could just do this: ptr = sub(u16, ptr, 1) catch return error.OutOfBounds;
<jfo>
a distinction I wouldn't have considered without zig's pedantry :)
<jfo>
ah yeah that's a good point
<jfo>
gtg brb
<jfo>
that's interesting how the og thrown error is an overflow but my program can treat it as an out of bounds, the errors are really malleable huh?
<jfo>
I decide how I want to treat the throw
<andrewrk>
exactly
<andrewrk>
it's just an enum value
<andrewrk>
using "try" to bubble up error codes is good for prototyping something. then when you get closer to finalizing an API, think more carefully about the possible errors you're returning
<jfo>
can you talk about why you wouldn't want something like `expect(thing, error.Error)` to be shorthand for unwrapping the error and dealing with it in this way? Just in testing, of course. Somewhere you said we might get assert(err == error.Error), is that off the table too?
<andrewrk>
assert(err == error.Foo) works now
<andrewrk>
oh you mean if `err` is an error union and not an error set
<jfo>
I fuzzy on the difference
<jfo>
but in the first case, I would still have to unwrap it first, right?
<jfo>
I'm* fuzzy
<andrewrk>
you could write expect in userland
<jfo>
not a bad way to say WONTFIX :)
<jfo>
anyway, looking forward to the compiler thing tomorrow, do you have some thoughts on what you're covering?
<andrewrk>
yeah I'm going to start with an overview of the pipeline, then do a round of questions, then show off a bunch of features
<andrewrk>
I was thinking maybe I could get you on the phone, and pipe the audio into the stream
<jfo>
maybe! I'm happy to play the idiot questioner. I'll be watching from a hacker space here, I might not have good privacy though
<jfo>
I'll definitely be on the chat at the least
<jfo>
I'm most interested in how the zig compiler interacts with llvm, and how and where they touch each other
<jfo>
that and a general overview of the compiler structure
<jfo>
brb
<andrewrk>
yeah, I'll make that clear
hasen_judy has joined #zig
hasen_judy has quit [Ping timeout: 252 seconds]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]