ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
return0e has quit [Remote host closed the connection]
kristate has joined #zig
<kristate> wink_: can you write-up some sort of information on that discovery?
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mnoronha has joined #zig
<wink_> O
<wink_> whoops, I'll create a smaller example tomorrow.
davr0s has joined #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…]
hoppetosse has quit [Ping timeout: 256 seconds]
davr0s has joined #zig
kristate has quit [Ping timeout: 260 seconds]
mnoronha has quit [Ping timeout: 272 seconds]
kristate has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mnoronha has joined #zig
mnoronha has quit [Ping timeout: 256 seconds]
davr0s has joined #zig
<kristate> wink_: thanks!
mnoronha has joined #zig
mahmudov has joined #zig
kristate has quit [Remote host closed the connection]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kristate has joined #zig
mnoronha has quit [Ping timeout: 256 seconds]
_whitelogger has joined #zig
mnoronha has joined #zig
mnoronha has quit [Ping timeout: 240 seconds]
mnoronha has joined #zig
mnoronha has quit [Ping timeout: 260 seconds]
mnoronha has joined #zig
mnoronha has quit [Ping timeout: 240 seconds]
davr0s has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kristate has quit [Ping timeout: 260 seconds]
mnoronha has joined #zig
mnoronha has quit [Ping timeout: 260 seconds]
mnoronha has joined #zig
mnoronha has quit [Ping timeout: 268 seconds]
kristate has joined #zig
mnoronha has joined #zig
mnoronha has quit [Ping timeout: 240 seconds]
mnoronha has joined #zig
mnoronha has quit [Ping timeout: 260 seconds]
mnoronha has joined #zig
mnoronha has quit [Ping timeout: 268 seconds]
noonien has joined #zig
kristate has quit [Remote host closed the connection]
davr0s has joined #zig
kristate has joined #zig
mahmudov has quit [Ping timeout: 268 seconds]
mnoronha has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
mnoronha has quit [Ping timeout: 260 seconds]
mnoronha has joined #zig
mnoronha has quit [Ping timeout: 255 seconds]
mahmudov has joined #zig
mnoronha has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mnoronha has quit [Ping timeout: 240 seconds]
davr0s has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
DutchGhost has joined #zig
mnoronha has joined #zig
<DutchGhost> how do I go from signed to unsigned at comptime?
mnoronha has quit [Ping timeout: 272 seconds]
bheads has joined #zig
mnoronha has joined #zig
mnoronha has quit [Ping timeout: 272 seconds]
<DutchGhost> in the first while loop in 'solve', if I change one of the 'part.. += .....' with the if-version, it compiles
<DutchGhost> but if I do it like this, it does not compile: "note: compile-time variable assigned here part1 += @intCast(u64, (f[start] - 48) & @bitCast(u8, -@intCast(i8, @boolToInt(f[start] == f[next]))));"
<DutchGhost> but inserting an if statement makes it comptime again
<DutchGhost> if (f[start] == f[half]) {}
<DutchGhost> this is magic xD
mnoronha has joined #zig
mnoronha has quit [Ping timeout: 268 seconds]
Hejsil_ has joined #zig
<DutchGhost> even an 'if(false) {}' makes it work
<Hejsil_> DutchGhost, played with your code, and it kinda seems like a comptime bug. Maybe
<Hejsil_> It fixed it like this: http://termbin.com/p3vv
<DutchGhost> huh you changes the comptime var's to just var's ?
<Hejsil_> Yes. Because your while loop is not `inline`, `{start += 1; next += 1;}` becomes a runtime operations (because each iteration of the loop will be executed at runtime)
<Hejsil_> Though, you marked solve to be executed at comptime, so i'm not quite sure why the compiler still complains
<DutchGhost> it's weird
<MajorLag> comptime be like that. I've noticed that especially when you recurse with comptime it gets confused
<DutchGhost> huh okey haha
<DutchGhost> should it be reported?
<DutchGhost> orrr?..?
<Hejsil_> If you can find a minimal example
<Hejsil_> I'm not quite sure what's going on here soo
<DutchGhost> Ill tryy
<MajorLag> I'm hoping comptime gets a lot more predictable in the stage2 compiler.
<Hejsil_> I hope, that with andrewrk putting more thought into the design of the stage2 compiler, many bugs will just solve themself
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Hejsil_ is now known as Hejsil
<DutchGhost> Reduced PoC: https://pastebin.com/jr039YEk
<Hejsil> Looks good. Seems to highlight the problem well
<Hejsil> Actually, there might be two bugs
<Hejsil> The if(false) removing the error
<Hejsil> And error itself
mnoronha has joined #zig
<Hejsil> Or.. Hmmm
<DutchGhost> this would be a good example to file an issue?
<Hejsil> Idk, maybe the compiler is analysing the function like it's run at runtime
<Hejsil> Ye, it's good
mnoronha has quit [Ping timeout: 240 seconds]
<kristate> Got a UDP prototype running
<kristate> going to clean-up the code and try to get a small udp demo running for the examples/ directory
mnoronha has joined #zig
Hejsil has quit [Quit: Page closed]
mnoronha has quit [Ping timeout: 268 seconds]
mnoronha has joined #zig
mnoronha has quit [Ping timeout: 265 seconds]
mnoronha has joined #zig
mnoronha has quit [Ping timeout: 260 seconds]
davr0s has joined #zig
<MajorLag> After getting stage2 working, does andrew plan to go back and restructure stage1 to be more like stage2? I imagine that if they're significantly different it'll make maintaining both even more of a pain down the road.
<wink_> kristate: So my initial "fix" for the overly aggressive optimization problem was to refactor out the internal loops I had into fn's and invoke them with @noInlineCall.
<wink_> but then I determined that I didn't need to use @noInlineCall to invoke them, just calling the "compiler" would line but not optimize it away.
hoppetosse has joined #zig
<kristate> wink_: hmm -- would be great to see the before and after
<wink_> k, I'll try to make a simpler example
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mnoronha has joined #zig
mnoronha has quit [Ping timeout: 240 seconds]
davr0s has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mnoronha has joined #zig
<MajorLag> I've been doing a lot of work with @typeInfo, do we think it is worth it to catalog all the issues with it in an issue? most of them are just inconsistent naming but a few are design flaws.
davr0s has joined #zig
kristate has quit [Remote host closed the connection]
<DutchGhost> can you say something like 'I require this dependency, but pull it from this and this website/github whenever I compile' ?
<DutchGhost> for anyone who knows, something similar like the cargo build tool from Rust ?
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
wink_ has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
wink_ has joined #zig
benaiah has quit [Quit: G'bye]
benaiah has joined #zig
wink_ has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
wink_ has joined #zig
wink_ has quit [Client Quit]
wink_ has joined #zig
wink_ has quit [Client Quit]
bheads has quit [Ping timeout: 244 seconds]
bheads has joined #zig
davr0s has joined #zig
<MajorLag> @DutchGhost No package manager yet (nor anything like that). It's planned to occur sometime after we get a basic HTTP implementation in std. See: https://github.com/ziglang/zig/issues/943
<MajorLag> I suppose you could have build.zig cal curl or something though...
<DutchGhost> ohh yeahh haha, but no official manager yet
DutchGhost has quit [Ping timeout: 252 seconds]
mnoronha has quit [Ping timeout: 255 seconds]
mahmudov has quit [Ping timeout: 260 seconds]
mnoronha has joined #zig
mnoronha has quit [Ping timeout: 272 seconds]
mnoronha has joined #zig
mnoronha has quit [Ping timeout: 272 seconds]
mnoronha has joined #zig
mnoronha has quit [Ping timeout: 256 seconds]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mahmudov has joined #zig
davr0s has joined #zig
mnoronha has joined #zig
wink_ has joined #zig
<wink_> kristate: See https://github.com/winksaville/zig-futex-over-optimization as an example where over optimization causes debug to be faster than release modes.
mnoronha has quit [Ping timeout: 272 seconds]
mnoronha has joined #zig
tridactyla has joined #zig
mnoronha has quit [Ping timeout: 256 seconds]
hoppetosse has quit [Ping timeout: 240 seconds]
mnoronha has joined #zig
tridactyla has quit [Remote host closed the connection]
mnoronha has quit [Ping timeout: 240 seconds]
tridactyla has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
edr has quit [Ping timeout: 244 seconds]