ChanServ changed the topic of #zig to: zig programming language | https://ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
<scientes> I kinda like @cast, because it simplifies the grammar
<scientes> in #1757
<hryx> same here, I like @cast. I think the thing holding it back (if I remember) is seeing it in action in real code, e.g. the standard library
ntgg has joined #zig
kristoff_it has joined #zig
kristoff_it has quit [Ping timeout: 245 seconds]
<andrewrk> hryx, how about @as ? same thing, just 2 fewer characters
<hryx> I'm down with @as
<scientes> m2
<hryx> I do like me some fewer characters
<hryx> actually it's nice avoiding the word "cast" because C folks may assume you can do lossy conversion with it
<scientes> oh wow buster was released
marijnfs has quit [Quit: WeeChat 2.4]
<emekankurumeh[m]> what's buster?
<scientes> Debian 10
<emekankurumeh[m]> i would prefer an infix style cast but, @as is fine
<Tetralux> Try saying that five times fast... at-as
<emekankurumeh[m]> how hard would implenting @reify be?
<emekankurumeh[m]> i'm considering doing a poc implementation to explore some ideas in zig
kristoff_it has joined #zig
<hryx> having @reify would be truly epic. I would play with implementing codegen-less Protobuf compilation :D
<emekankurumeh[m]> with @reify I think distinct types could be done in userland
<andrewrk> oh my god I can do `zig translate-c windows.h -target x86_64-windows --library c` on linux now
kristoff_it has quit [Ping timeout: 248 seconds]
<emekankurumeh[m]> I kinda wish translate c output wasn't so "busy"
<emekankurumeh[m]> like if I include windows.h I get thousands of lines of unrelated definitions
<ntgg> is there a function in std to parse a string to a number?
<emekankurumeh[m]> std.fmt.parseInt
<ntgg> thank you
mikdusan has joined #zig
marijnfs has joined #zig
marijnfs__ has quit [Ping timeout: 245 seconds]
kristoff_it has joined #zig
laaron- has quit [Remote host closed the connection]
kristoff_it has quit [Ping timeout: 248 seconds]
laaron has joined #zig
ntgg has quit [Ping timeout: 248 seconds]
laaron- has joined #zig
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
kristoff_it has joined #zig
kristoff_it has quit [Ping timeout: 272 seconds]
laaron- has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #zig
laaron has quit [Client Quit]
laaron has joined #zig
laaron has quit [Client Quit]
laaron has joined #zig
laaron has quit [Remote host closed the connection]
laaron has joined #zig
<daurnimator> fgenesis: I just tested on an instance of irssi and I don't get a notification for it. I think it might be somethign you've configured?
<fgenesis> last time i've touched that config was 10 years ago :B
laaron has quit [Client Quit]
<fgenesis> i don't think so but whatev, don't mind me
<daurnimator> fgenesis: could you list your highlights?
<fgenesis> hat do you mean
<fgenesis> *what
laaron has joined #zig
laaron has quit [Remote host closed the connection]
laaron has joined #zig
<daurnimator> fgenesis: what is the output of `/hilight`
<fgenesis> daurnimator: just my nick, nothing else
<fgenesis> and it's not an *actual* hilight when the bot does its thing... more like a sneaky BEL in teh background
ltr- has quit [Quit: leaving]
kristoff_it has joined #zig
<daurnimator> fgenesis: what is your `beep_msg_level`?
kristoff_it has quit [Ping timeout: 244 seconds]
<daurnimator> hryx: indeed @reigy would be awesome for things like protobuf
<daurnimator> *reify
<daurnimator> andrewrk: I'm happy with @as
_whitelogger has joined #zig
kristoff_it has joined #zig
kristoff_it has quit [Ping timeout: 272 seconds]
kristoff_it has joined #zig
kristoff_it has quit [Ping timeout: 246 seconds]
kristoff_it has joined #zig
MH026 has quit [Remote host closed the connection]
kristoff_it has quit [Ping timeout: 248 seconds]
rjtobin has quit [Ping timeout: 248 seconds]
<torque> why does the bot send the link title as a notification instead of a standard message anyway
<torque> (and why does it prepend the nick of the person who linked it)
nrdmn has joined #zig
<nrdmn> good morning! is someone here working with uefi?
kristoff_it has joined #zig
kristoff_it has quit [Ping timeout: 268 seconds]
_whitelogger has joined #zig
kristoff_it has joined #zig
kristoff_it has quit [Ping timeout: 246 seconds]
<daurnimator> torque: 1. because someone (in another channel) asked for it to be a notification so that it wouldn't stand out as much. 2. so that you know who's link it was (can get confusing if two people send a link at once).
<torque> that's weird because in general notifications stand out more imo
<daurnimator> seems to depend on client
kristoff_it has joined #zig
kristoff_it has quit [Ping timeout: 268 seconds]
brakmic has joined #zig
brakmic_ has joined #zig
brakmic has quit [Ping timeout: 272 seconds]
_whitelogger has joined #zig
kristoff_it has joined #zig
kristoff_it has quit [Ping timeout: 258 seconds]
lunamn has quit [Ping timeout: 268 seconds]
lunamn has joined #zig
MH026 has joined #zig
kristoff_it has joined #zig
sammich has quit [Ping timeout: 248 seconds]
kristoff_it has quit [Ping timeout: 245 seconds]
kristoff_it has joined #zig
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #zig
jjido has joined #zig
marijnfs_ has joined #zig
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kristoff_it has quit [Ping timeout: 245 seconds]
jjido has joined #zig
brakmic_ has quit [Read error: Connection reset by peer]
brakmic has joined #zig
kristoff_it has joined #zig
kristoff_it has quit [Ping timeout: 245 seconds]
nifker has joined #zig
nifker was banned on #zig by ChanServ [*!*@x5d835268.dyn.telefonica.de]
nifker was kicked from #zig by ChanServ [Banned: disrespect !T 1w]
marijnfs_ has quit [Ping timeout: 252 seconds]
marijnfs_ has joined #zig
_whitelogger has joined #zig
noonien has joined #zig
ntgg has joined #zig
Tetralux has quit [Ping timeout: 268 seconds]
Tetralux_ has joined #zig
avoidr has quit [Remote host closed the connection]
Tetralux_ has quit [Client Quit]
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jjido has joined #zig
marijnfs_ has quit [Ping timeout: 268 seconds]
marijnfs_ has joined #zig
fsateler has quit [Ping timeout: 244 seconds]
fsateler has joined #zig
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ichorio has joined #zig
very-mediocre has joined #zig
avoidr has joined #zig
ntgg has quit [Ping timeout: 245 seconds]
tgschultz has joined #zig
kristoff_it has joined #zig
jjido has joined #zig
jjido has quit [Client Quit]
kristoff_it has quit [Ping timeout: 246 seconds]
jjido has joined #zig
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jjido has joined #zig
brakmic has quit [Read error: Connection reset by peer]
brakmic has joined #zig
very-mediocre has quit [Read error: Connection reset by peer]
_whitelogger has joined #zig
kristoff_it has joined #zig
kristoff_it has quit [Ping timeout: 245 seconds]
Akuli has joined #zig
MH026 has quit [Remote host closed the connection]
very-mediocre has joined #zig
andersfr has joined #zig
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #zig
kristoff_it has joined #zig
kristoff_it has quit [Ping timeout: 272 seconds]
marijnfs_ has quit [Ping timeout: 246 seconds]
jjido has joined #zig
andersfr has quit [Remote host closed the connection]
kristoff_it has joined #zig
kristoff_it has quit [Ping timeout: 258 seconds]
very-mediocre has quit [Read error: Connection reset by peer]
very-mediocre has joined #zig
kristoff_it has joined #zig
kristoff_it has quit [Ping timeout: 248 seconds]
Tetralux has joined #zig
very-mediocre has quit [Read error: Connection reset by peer]
laaron has quit [Remote host closed the connection]
laaron has joined #zig
kristoff_it has joined #zig
kristoff_it has quit [Ping timeout: 245 seconds]
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
donpdonp has quit [Remote host closed the connection]
kristoff_it has joined #zig
marijnfs_ has joined #zig
ntgg has joined #zig
very-mediocre has joined #zig
kristoff_it has quit [Ping timeout: 244 seconds]
huuskes has joined #zig
<ntgg> i'm getting a weird issue, explained with the relevant code here: https://bpaste.net/show/yIZO
<[[]]> n​tgg: Title "show" Shortened < https://is.gd/OgyTjh >
<ntgg> essentially it's only running part of a block of code, sometimes
<ntgg> there is also a chance there is something wrong with my logic, but I can't figure out what that would be
<ntgg> also line 25 should have a ';' at the end
<Tetralux> Wait - the for loop should have a ';' after it??
<emekankurumeh[m]> no?
<Tetralux> I mean - that's what on L25 no?
<Tetralux> Well no - it's the if right
<Tetralux> But still
<Tetralux> Still shouldn't need it.
<ntgg> If I don't have it there is a compiler error
<ntgg> compile error
<Tetralux> That seems wrong.
<ntgg> It's because i'm doing `for (..) thing;`
<ntgg> not `for (..) { thing; }`
<ntgg> the thing is just the if statement
<Tetralux> that sounds like a bug report to me xD
<Tetralux> to me, thats no different than the seicolon here: for (...) {};
MajorLag has joined #zig
tgschultz has quit [Ping timeout: 268 seconds]
MajorLag is now known as tgschultz
kristoff_it has joined #zig
kristoff_it has quit [Ping timeout: 272 seconds]
<ntgg> Here's the full code if someone wants to look through it to help me figure out the issue: https://git.sr.ht/~ntgg/snake-zig
<[[]]> n​tgg: Title "~ntgg/snake-zig - sourcehut git" Shortened < https://is.gd/jAAfpm >
<ntgg> The relevant code would be in main.zig and game_state.zig
<via> i don't feel like EAGAIN should be unreachable in write(). aside from the possibility of nonblocking being set on it, it sometimes happens without that. it seems to be reproducable by just pegging stderr with writes
<via> if it returned an error, i could just deal with it
<ntgg> by the way, figured out the issue
<ntgg> I needed to return State {.Playing = PlayingState.init(..) } instead of just the PlayingState.init(..);
<ntgg> this seems like a compiler bug, especially since it worked sometimes
very-mediocre has quit [Read error: Connection reset by peer]
very-mediocre has joined #zig
avoidr has quit [Quit: leaving]
avoidr has joined #zig
Akuli has quit [Quit: Leaving]
rjtobin has joined #zig
marijnfs_ has quit [Ping timeout: 252 seconds]
marijnfs_ has joined #zig
ntgg has quit [Ping timeout: 268 seconds]
laaron- has joined #zig
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
kristoff_it has joined #zig
kristoff_it has quit [Ping timeout: 244 seconds]
ntgg has joined #zig
very-mediocre has quit [Read error: Connection reset by peer]
very-mediocre has joined #zig
jjido has joined #zig
very-mediocre has quit [Client Quit]
andersfr has joined #zig
brakmic has quit []
ntgg has quit [Ping timeout: 248 seconds]
andersfr has quit [Client Quit]
Tetralux has quit [Ping timeout: 268 seconds]
andrewrk has quit [Ping timeout: 246 seconds]
Tetralux has joined #zig
kristoff_it has joined #zig
Ichorio has quit [Ping timeout: 250 seconds]
kristoff_it has quit [Ping timeout: 258 seconds]
andrewrk has joined #zig
<emekankurumeh[m]> `zig fmt` is randomly truncating my files
<emekankurumeh[m]> i found the issue: i had `async pub` instead of `pub async` i don't think that should cause zig fmt to delete my entire file
Sahnvour has joined #zig
<Tetralux> That.. seems like the exact reason I don't use fmt tools xD
<emekankurumeh[m]> andrewrk: is SegmentedList thread-safe?
kristoff_it has joined #zig
kristoff_it has quit [Ping timeout: 248 seconds]
<hspak> is there a way to convert [4]u8 to a u32?
<Tetralux> Maybe mem.readInt and friends?
ltriant has joined #zig
<hspak> I'll try that, thanks
<Tetralux> Specifically: const v = mem.readIntNative(u32, array);
<Tetralux> There's also writeIntNative for the opposite operation.
<hspak> I'm seeing > expected type '*const [4]u8', found '[]u8' -- do I need another cast op to make it happy? I'm passing in a slice, e.g foo[1..5]
<emekankurumeh[m]> try mem.readIntSlice
<Tetralux> If you have a slice, there's: mem.readIntSliceNative(type, slice) T
<Tetralux> It asserts you have at least the number of bytes needed at runtime.
<hspak> woot, that worked, thanks Tetralux
<Tetralux> o7
kristoff_it has joined #zig
marijnfs_ has quit [Ping timeout: 246 seconds]
kristoff_it has quit [Ping timeout: 258 seconds]
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mikdusan has quit [Quit: WeeChat 2.3]
ltriant has quit [Ping timeout: 268 seconds]
ntgg has joined #zig
ltriant has joined #zig
ntgg has quit [Ping timeout: 248 seconds]
mikdusan has joined #zig