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/
<pixelherodev> Isn't the shipped binary a hybrid?
<pixelherodev> But yeah, it'd be much more limited
<pixelherodev> I've been focusing on CBE structure, not extensive support, so even e.g. int64 won't translate :
<pixelherodev> P
<andrewrk> it wouldn't cover the use case at all because the old use case is stage1 only and the emit h code is stage2 only
<andrewrk> there is not even a venn diagram of overlapping cases
<g-w1> does it only have support for what the frontend of stage2 can handle?
<andrewrk> yeah
<pixelherodev> g-w1: that, and what the CBE backend can handle
<pixelherodev> So it's far more limited
<pixelherodev> andrewrk: it'd work for simple enough cases, wouldn't it?
<pixelherodev> I mean, we could integrate it with the stage12-hybrid binary
GrooveStomp has quit [Quit: Leaving]
<pixelherodev> Restore it to the Zig build system, at the least
ericonr has joined #zig
<pixelherodev> ... ohhh right, we should test if it works with ZBS before merge
<ericonr> andrewrk: hi!
<pixelherodev> ericonr: hey, I know you! Hello!
<ericonr> pixelherodev: hai!
<marler8997> who dat?
<marler8997> who der?
<pixelherodev> you're in oasis, right?
<pixelherodev> yeah
<ericonr> I am in multiple places
<andrewrk> oh hi ericonr :)
frett27_ has quit [Ping timeout: 272 seconds]
<ericonr> andrewrk: if you want a backtrace, I can get you that for free
<andrewrk> sure, that would be helpful. here's the latest binary: https://andrewkelley.me/temp/static-window6
<andrewrk> the source is https://github.com/andrewrk/zig-window if you want to try to get gdb to find it
GrooveStomp has joined #zig
<ericonr> andrewrk: I might be missing musl debug symbols
<pixelherodev> ericonr: that's where I remember your name the most, since there's so few people there :P
<ericonr> pixelherodev: fair enough :)
<ericonr> andrewrk: ok, do you know how to make gdb point at libc.so debug symbols when it just exec'd into ld-musl?
<andrewrk> I think the "file" command
KIMI has quit [Ping timeout: 245 seconds]
<ericonr> well, might be best if you can get a system to run this on yourself
<ericonr> I'm thouroughly lost
<ericonr> I'm breaking on std.os.execveZ
<ericonr> if I run `next`, it already segfaults
<andrewrk> I think if you do `file` after the segfault, it will make the backtrace sensible
<ericonr> if I try to `si`, it gets to the syscall, on the following `si` it segfaults again
<ericonr> ok
<ericonr> no help :/
<andrewrk> another thing you can do is to gdb on the dynamic linker path and then `run ./static-window6` - that skips the first execve
<ericonr> i only have two functions
<ericonr> strrchr (s=0x0, c=0x2f) -> strlen (s=s@entry=0x0)
<ericonr> strlen is where it die
<ericonr> ...s
<andrewrk> I'm installing void linux on my spare laptop right now
<ericonr> ok
<ericonr> it gets all the way to strrchr(s=0x7ffff6cfa560 "/lib/libVkLayer_MESA_device_select.so", c=0x2f)
<ericonr> which is part of the dlopen sequence
<ericonr> the next strrchr is with s=0
KIMI has joined #zig
<KIMI> marler8997 thanks!
<andrewrk> ericonr, next question: what does vkcube do on that same machine?
<ericonr> it works
<ericonr> andrewrk: your debug lines say you don't think you're running in the dynamic linker
<andrewrk> ok great, so the task is to figure out what is the difference
<andrewrk> that should happen at first and then the execve happens, then it should say "got dlopen"
<ericonr> when I launch as lib/libc.so static-window6
<ericonr> ^^
<ericonr> I don't think it should happen in that case, should it?
<ericonr> unless I'm missing something
<andrewrk> you need LD_PRELOAD=libdl.so.2 in this case
<ericonr> ok
<ericonr> but
<ericonr> musl doesn't have llibdl
<ericonr> libdl
<ericonr> it's an empty archive, only for compatibility at compile time
<ericonr> is that ok?
<andrewrk> can I see the full stderr?
<ericonr> running with LD_PRELOAD made it work, at least
<andrewrk> ok yeah that's what the binary does before execve
<ericonr> not work, but it doesn't try to reexec itself
ur5us_ has quit [Remote host closed the connection]
ur5us_ has joined #zig
<andrewrk> damn the void linux .iso doesn't support my wifi driver out of the box
<ericonr> welp, my video driver just crashed itself
<ericonr> shouldn't be your fault tho
<andrewrk> cool cool this is fine
<andrewrk> hmm I don't know how I can test this
<ericonr> what's your wifi driver?
<andrewrk> it's an older dell xps laptop - broadcom something
hnOsmium0001 has quit [Quit: Connection closed for inactivity]
<ericonr> I guided someone on setting that up recently
<ericonr> involved a lot of sneaker netting
<andrewrk> I'm not sure I'm up for that tonight
<ericonr> yeah, fair enough
<ericonr> hm
<ericonr> what dlopen call do you make?
<ericonr> just libvulkan.so ?
<andrewrk> there's a project Vulkan-Loader which is patched & statically compiled that has some fancy logic
<ericonr> well if you can get me a C program that tries to do the same calls, I can trace both for you for comparison's sake
<andrewrk> that is C code
<andrewrk> oh I see what you're saying. uhh yeah here it is: https://github.com/SaschaWillems/Vulkan#Basics
<andrewrk> 01 - Triangle
<ericonr> damn that's huge
<ericonr> andrewrk: ok, backtrace https://0x0.st/iRwy.txt
frmdstryr has quit [Ping timeout: 240 seconds]
<ericonr> so the dlopen() sequence is succeeding, it's afterwards that's the problem (apparently)
frmdstryr has joined #zig
<pixelherodev> Void in qemu to avoid driver issues?
<ericonr> then vulkan doesn't work
a92 has joined #zig
hnOsmium0001 has joined #zig
cole-h has quit [Ping timeout: 260 seconds]
<KIMI> anytype will disapear in the future? it is ok if i use that right now?
msingle has joined #zig
<KIMI> also one thing i asked but i didnt get the reply i think, about type inference in struct like .name = "myname" so i don't have to type the array thing all the time
<KIMI> is it possible?
<g-w1> in struct definitions, type inference is not possible, but in making structs it is. it would help if you gave a more complete example
<KIMI> like i have there glyphs: [MAX_GLYPHS]?*Glyph = [MAX_GLYPHS]?*Glyph{null} ** MAX_GLYPHS,
<KIMI> xD
<g-w1> it is not possible to remove the type there.
<KIMI> is it possible in the future?
<g-w1> no. it is for the same reason that function arguments can't be inferred (not counting anytype which shouldn't be used for that anyway): it is to make a stable api. when you go to a function or struct definition, you should be able to see the type signature.
<dominikh> I mean, in that line, the type information _is_ duplicated
<dominikh> the right hand side could, if such syntax existed, be written without the array type, and the lhs still explicitly and specifically describes the API
<dominikh> just like you have .{} for structs
<KIMI> that would be nice to have less to type
reductum has quit [Quit: WeeChat 2.9]
<g-w1> could you do glyphs: [MAX_GLYPHS]?*Glyph = [_]?*Glyph{null} ** MAX_GLYPHS,?
<KIMI> it works, but it is still too long in my opiunion
<KIMI> because the array is typed twice as dominikh said
<KIMI> in var it is good because i can have type inference, just in struct it is a big too long to type
Jeanne-Kamikaze has quit [Ping timeout: 260 seconds]
frmdstryr has quit [Ping timeout: 246 seconds]
a92 has quit [Quit: My presence will now cease]
<fengb> This might work: `var glyphs = std.mem.zeroes([MAX_GLYPHS]?*Glyph);`
<KIMI> not in struct
<KIMI> struct need : TheType
<KIMI> that is why i asked
<fengb> Oh yeah, there’s a proposal for using the default to infer the type
msingle has quit [Ping timeout: 240 seconds]
msingle has joined #zig
earnestly has quit [Ping timeout: 264 seconds]
<pixelherodev> Eh, I don't like that
<pixelherodev> Explicit is almost always better than implicit
msingle has quit [Ping timeout: 240 seconds]
msingle has joined #zig
<pixelherodev> Wait, why would I comment on that *here*? :P
<KIMI> or maybe . {null ** MAX_GLYPH} just like for struct
KIMI has quit [Remote host closed the connection]
msingle has quit [Ping timeout: 256 seconds]
frmdstryr has joined #zig
msingle has joined #zig
frmdstryr has quit [Ping timeout: 246 seconds]
frmdstryr has joined #zig
KIMI has joined #zig
marler8997_ has joined #zig
marler8997 has quit [Read error: Connection reset by peer]
frmdstryr has quit [Ping timeout: 240 seconds]
segfaults has quit [Quit: WeeChat 2.9]
msingle has quit [Ping timeout: 256 seconds]
kristoff_it has joined #zig
ur5us_ has quit [Ping timeout: 264 seconds]
msingle has joined #zig
marnix has joined #zig
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
<KIMI> how to make printing float? i get line_height: 1.8e+01
<KIMI> i parsed like this height = std.fmt.parseFloat(f32, value)
<KIMI> i mean, non scientific notation print float, is it possible?
ur5us_ has joined #zig
supercoven has joined #zig
supercoven has quit [Max SendQ exceeded]
supercoven has joined #zig
supercoven has quit [Max SendQ exceeded]
supercoven has joined #zig
supercoven has quit [Max SendQ exceeded]
supercoven has joined #zig
supercoven has quit [Max SendQ exceeded]
supercoven has joined #zig
dumenci has joined #zig
supercoven has quit [Max SendQ exceeded]
supercoven has joined #zig
supercoven has quit [Max SendQ exceeded]
supercoven has joined #zig
supercoven has quit [Max SendQ exceeded]
supercoven has joined #zig
supercoven has quit [Max SendQ exceeded]
supercoven has joined #zig
supercoven has quit [Max SendQ exceeded]
hlolli__ has joined #zig
sord937 has joined #zig
<KIMI> zls make life so easier OMG
<wilsonk> yep
waleee-cl has quit [Quit: Connection closed for inactivity]
KIMI59 has joined #zig
KIMI has quit [Ping timeout: 245 seconds]
cole-h has joined #zig
ur5us_ has quit [Ping timeout: 264 seconds]
Ashpool_ has joined #zig
msingle has quit [Ping timeout: 272 seconds]
Ashpool has quit [Ping timeout: 272 seconds]
decentpenguin has quit [Read error: Connection reset by peer]
decentpenguin has joined #zig
Ashpool_ has quit [Ping timeout: 256 seconds]
dumenci is now known as suskun
a_chou has joined #zig
KIMI59 has quit [Remote host closed the connection]
segfaults has joined #zig
ur5us_ has joined #zig
a_chou has quit [Quit: a_chou]
DarkUranium has quit [Quit: ZNC 1.8.2 - https://znc.in]
DarkUranium has joined #zig
skuzzymiglet has joined #zig
skuzzymiglet has quit [Ping timeout: 256 seconds]
rzezeski has quit [Quit: Connection closed for inactivity]
ur5us_ has quit [Quit: Leaving]
<segfaults> is there somethign similar to gnu getline() in the zig std library?
<segfaults> im just trying to read lines from stdin so if anyone has a cool way to do it please do tell!
cole-h has quit [Ping timeout: 265 seconds]
<ikskuh> segfaults: interactive or non-interactive lines?
<ikskuh> std.io.Reader.readUntilDelimiter*() is for reading generic lines :)
<segfaults> interactive
<segfaults> working on a shell, just decided to learn zig today and its kinda punching me in the stomach(in a good way) coming from C
<segfaults> and while i have you here, how would you go about returning a string?
<segfaults> in a function i mean
<ikskuh> it depends
<ikskuh> we have three flavours of such functions:
<ikskuh> function allocates and returns buffer: "fn(allocator: *std.mem.Allocator, …) ![]const u8"
<ikskuh> function gets backing storage and returns part:
<ikskuh> "fn(buffer: []u8, …) []u8"
<ikskuh> or you take a ArrayList(u8) and resize it to your liking (allows reuse of the buffer)
<ikskuh> for a getline(), you need to change terminal modes on both linux and windows
<segfaults> oh? to like raw mode?
<ikskuh> yeah
<ikskuh> so you can do improved editing stuff
<ikskuh> note that on unix, you usually have a cooked tty input already
<ikskuh> but on windows, you don't
<segfaults> yeah, i had done it in Go but it didnt let you launch stuff like nano or ncdu, C did but i obviously had to do parent and child stuff
<ikskuh> the result is that you *can* actually edit lines on unix
<ikskuh> so basic editing is available on linux already in your TTY
<ikskuh> so you get the features of "cat" when just using readUntilDelimiter
<segfaults> what are the delimiters accepter?
<segfaults> *accepted
<ikskuh> any byte value
<ikskuh> so you decide
<segfaults> gotcha, thank you
notpiika_ has joined #zig
notpiika has quit [Ping timeout: 260 seconds]
segfaults has quit [Quit: WeeChat 2.9]
braket has quit [Ping timeout: 256 seconds]
braket has joined #zig
braket has joined #zig
_whitelogger has joined #zig
supercoven has joined #zig
supercoven has quit [Max SendQ exceeded]
supercoven has joined #zig
supercoven has quit [Max SendQ exceeded]
supercoven has joined #zig
supercoven has quit [Max SendQ exceeded]
supercoven has joined #zig
supercoven has quit [Max SendQ exceeded]
supercoven has joined #zig
supercoven has quit [Max SendQ exceeded]
earnestly has joined #zig
hnOsmium0001 has quit [Quit: Connection closed for inactivity]
notzmv has joined #zig
b_jonas has left #zig [#zig]
notzmv has quit [Read error: Connection reset by peer]
techtirade has quit [Read error: Connection reset by peer]
techtirade has joined #zig
suskun has quit [Remote host closed the connection]
notzmv has joined #zig
srgpqt[m] has quit [Quit: Bridge terminating on SIGTERM]
aterius has quit [Quit: Bridge terminating on SIGTERM]
Nypsie[m] has quit [Quit: Bridge terminating on SIGTERM]
alexnask[m] has quit [Quit: Bridge terminating on SIGTERM]
ifreund_ has quit [Quit: Bridge terminating on SIGTERM]
bfredl has quit [Quit: Bridge terminating on SIGTERM]
josias has quit [Quit: Bridge terminating on SIGTERM]
Sergeeeek[m] has quit [Quit: Bridge terminating on SIGTERM]
novaskell has quit [Quit: Bridge terminating on SIGTERM]
mmohammadi9812 has quit [Quit: Bridge terminating on SIGTERM]
midi[P][m] has quit [Quit: Bridge terminating on SIGTERM]
mattmurr___[m] has quit [Quit: Bridge terminating on SIGTERM]
hcnelson has quit [Quit: Bridge terminating on SIGTERM]
BaroqueLarouche has quit [Quit: Bridge terminating on SIGTERM]
Snektron has quit [Quit: Bridge terminating on SIGTERM]
sergeeeek[m]1 has quit [Quit: Bridge terminating on SIGTERM]
siraben has quit [Quit: Bridge terminating on SIGTERM]
lroy64[m] has quit [Quit: Bridge terminating on SIGTERM]
return0e[m] has quit [Quit: Bridge terminating on SIGTERM]
ugla has quit [Quit: Bridge terminating on SIGTERM]
googlebot[m] has quit [Quit: Bridge terminating on SIGTERM]
znowflak3[m] has quit [Quit: Bridge terminating on SIGTERM]
ziguana[m] has quit [Quit: Bridge terminating on SIGTERM]
fengb has quit [Quit: Bridge terminating on SIGTERM]
Pistahh has joined #zig
fengb has joined #zig
plakband has joined #zig
bfredl has joined #zig
alexnask[m] has joined #zig
josias has joined #zig
ugla has joined #zig
lroy64[m] has joined #zig
mmohammadi9812 has joined #zig
ifreund_ has joined #zig
siraben has joined #zig
mattmurr___[m] has joined #zig
aterius has joined #zig
midi[P][m] has joined #zig
hcnelson has joined #zig
ziguana[m] has joined #zig
novaskell has joined #zig
Sergeeeek[m] has joined #zig
return0e[m] has joined #zig
srgpqt[m] has joined #zig
Snektron has joined #zig
Nypsie[m] has joined #zig
BaroqueLarouche has joined #zig
googlebot[m] has joined #zig
znowflak3[m] has joined #zig
sergeeeek[m]1 has joined #zig
msingle has joined #zig
msingle has quit [Ping timeout: 246 seconds]
earnestly has quit [Ping timeout: 260 seconds]
earnestly has joined #zig
plakband has quit [Quit: WeeChat 2.9]
sord937 has quit [Ping timeout: 240 seconds]
notzmv has quit [Read error: No route to host]
notzmv has joined #zig
notzmv has quit [Read error: No route to host]
shynoob has joined #zig
notzmv has joined #zig
sord937 has joined #zig
sord937 has quit [Client Quit]
msingle has joined #zig
sord937 has joined #zig
gpanders has quit [Ping timeout: 265 seconds]
msingle has quit [Ping timeout: 240 seconds]
msingle has joined #zig
braket has quit [Read error: Connection reset by peer]
braket has joined #zig
gpanders has joined #zig
<g-w1> for some reason, the stage2 execution tests are not running when I do `zig build test-stage2` and only run on the ci and so the ci keeps catching stuff like this https://dev.azure.com/ziglang/zig/_build/results?buildId=10714&view=logs&j=9512b82f-d185-50ea-ee23-d010bc14782f&t=ca25486c-bdcc-50c6-de82-a9ccd6b64318 what commmand should I run to allow stage2 execution tests?
<ifreund> g-w1: maybe try passing -Denable-qemu like the CI?
<ifreund> otherwise it will only run tests on your native arch
<g-w1> ok. I am on x64_linux, so I didn't think it would do anything, but maybe it wants to sandbox it?
<ifreund> might have no effect, just an idea
<g-w1> ok, Ill try it
msingle has quit [Ping timeout: 264 seconds]
msingle has joined #zig
gpanders has quit [Ping timeout: 260 seconds]
mokafolio has quit [Quit: Bye Bye!]
<g-w1> this worked! I guess it wants to sandbox it? tysm
mokafolio has joined #zig
<ifreund> no problem
msingle has quit [Ping timeout: 260 seconds]
xackus has joined #zig
lucid_0x80 has joined #zig
waleee-cl has joined #zig
frmdstryr has joined #zig
factormystic has joined #zig
dumenci has joined #zig
lucid_0x80 has quit [Ping timeout: 256 seconds]
Akuli has joined #zig
rzezeski has joined #zig
nvmd has joined #zig
nvmd has quit [Client Quit]
nvmd has joined #zig
notzmv has quit [Read error: No route to host]
notzmv has joined #zig
sergeeeek[m]1 has quit [Quit: Idle for 30+ days]
frett27_ has joined #zig
xackus has quit [Ping timeout: 264 seconds]
frett27_ has quit [Ping timeout: 272 seconds]
cren has joined #zig
radgeRayden has joined #zig
<ikskuh> andrewrk: how's the progress on "mingw by default" on windows?
filpAM has joined #zig
notzmv has quit [Remote host closed the connection]
notpiika_ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
<pixelherodev> g-w1: are you sure there are no non-x64 tests?
<pixelherodev> Yeah, there's ARM tests already :)
notpiika has joined #zig
<ifreund> g-w1: that failure is just some connection failure when fetching deps
<pixelherodev> The SPU-II tests don't need QEMU at least, since they use an interpreter that's part of the test harness :)
TheLemonMan has joined #zig
<pixelherodev> Hey lemon!
<TheLemonMan> turning all the {} into {s} has been a bloodbath (and is still ongoing!)
<TheLemonMan> ohai
<filpAM> zig looks good
<TheLemonMan> it even tastes good
<pixelherodev> TheLemonMan: would it have been faster to write a tool using the AST API?
<pixelherodev> Find all function call arguments which are comptime-known strings, parse and replace, route the output through zig fmt? :P
<TheLemonMan> if only! I had to audit each callsite to make sure the replacement would work
<pixelherodev> nif2
<pixelherodev> ... oops
<pixelherodev> ignore gibberish , sorry
<TheLemonMan> nice password
<pixelherodev> lol my passwords aren't four character alphanumerics
<pixelherodev> *UEi$r1o0]rf0LICcb@=FF)U|BdSPY
<pixelherodev> *that's* a password
<pixelherodev> Like actually. To a deleted account though :P
marnix has quit [Read error: Connection reset by peer]
sord937 has quit [Ping timeout: 240 seconds]
<g-w1> oh, it doesn't run only the x64 tests. ifreund: is there a way to re-run the ci so I can actually see if my code is good?
marnix has joined #zig
<pixelherodev> g-w1: test-stage2 runs all tests it can
<g-w1> why did it not run the tests for x64_linux if I am on that?
<pixelherodev> without enable-qemu, that means arch-independent tests (e.g. CBE, ZIR), tests for which it has an in-built interpreter (SPU-II), and anything else depends on enabled tooling (QEMU for alternate architectures, WINE for Windows-on-Linux)
<pixelherodev> g-w1: it should...
<pixelherodev> error output?
<pixelherodev> Are you 100% certain it's an error with x64_linux?
<pixelherodev> Did you double check it's printing the correct architecture? :P
<filpAM> TheLemonMan: I would use zig but I'll stay on the safe side and wait until it is "production ready"
sord937 has joined #zig
<pixelherodev> filpAM: that's definitely a smart choice
<g-w1> does it run the check output tests on your linux machine?
<pixelherodev> I think so?
<pixelherodev> The linux_x64 ones at least
<TheLemonMan> filpAM, life is too short to play it safe!
<pixelherodev> g-w1: check output tests have a specified *target*
<pixelherodev> If the target isn't the current system, it marks it as a pass for now
<pixelherodev> we should have a way to indicate it was skipped in the output
<g-w1> I know, I put mine as this `var case = ctx.exe("comptime type equality", linux_x64);` but it only ran with qemu
<pixelherodev> retraction:
<pixelherodev> If the target isn't the current system
<pixelherodev> ^ that's wrong (but I didn't mean to correct it like this, hit enter by mistake :P), it's if it doesn't have a way to run it
<pixelherodev> g-w1: that's really weird
<pixelherodev> The way it works, basically, is that if the os matches, and the arch matches, the Executor should be native
<g-w1> Ill try to get a screenshot composing all the stuff
<pixelherodev> You're on x64 linux, I assume :P?
<g-w1> yes
<pixelherodev> native executor simply causes the file to be run
<pixelherodev> Are you sure it's not working on your machine but failing in CI?
<pixelherodev> You're absolutely certain it's actually not running?
<g-w1> ill check again and post some logs
<pixelherodev> g-w1: src/test.zig, you can have it print the executor for each case as a test
<pixelherodev> ~line 660 in HEAD
<g-w1> ok
<pixelherodev> Above the switch(...getExecutor()), basically just `std.debug.print("Case {}, executor {}\n", .{case.name, ...getExecutor()})`
<pixelherodev> Alternately, you can set a breakpoint in GDB and watch it
<pixelherodev> That'll let you trace the output through the code with a proper debugger :)
shynoob has left #zig ["Leaving"]
<pixelherodev> ...I've been spending more time helping people work on zig than actually contributing myself - which isn't a bad thing, but I really want to get more done. Today I'll finally send another CBE patch, even if it's just something small to get me back into it.
<g-w1> https://share.olind.xyz/f.php?h=29jZ_8ef&p=1 here is the log pixelherodev
<g-w1> from what I see, it makes some qemu that can be native
<g-w1> I think this is a bug in in lib/std/zig/cross_target:630.
<g-w1> also, it says all 25 tests passed, but it shows 32 tests? this also confused me too
haliucinas has quit [Ping timeout: 240 seconds]
msingle has joined #zig
haliucinas has joined #zig
<pixelherodev> g-w1: test count is very wrong
<pixelherodev> all stage2 tests count as one test
<pixelherodev> test count is from the compiler; all the cases are managed by one "test{}" block so Zig thinks it is one test
<g-w1> ah, do you have any insights as why some tests are wrongly marked as qemu?
<g-w1> ah, do you have any insights as why some tests are wrongly marked as qemu?
<g-w1> oops wrong window
<pixelherodev> g-w1: if you GDB trace, it should be pretty easy to figure out
cole-h has joined #zig
notzmv has joined #zig
nvmd has quit [Ping timeout: 265 seconds]
xackus has joined #zig
<pixelherodev> I'd just > break getExternalExecutor
nvmd has joined #zig
msingle has quit [Ping timeout: 240 seconds]
<andrewrk> ikskuh, I haven't started yet on mingw-w64 by default for windows - I think that's planned to be part of 0.8.0
<andrewrk> you can test it out now with -target native-native-gnu
<ericonr> andrewrk: did you catch the backtrace I sent you?
<andrewrk> ericonr, ah yes. thanks for sending. I'm working on trying to repro it so I can tinker
<ericonr> okdo, good luck
<g-w1> pixelherodev: i found the problem: target.DynamicLinker thinks im using musl so the path is wrong and is screwing stuff up (im not using musl) https://share.olind.xyz/f.php?h=1nZeUElo&p=1 . I think because zig statically links musl to create the binary it things I use musl in target.zig.standardDynamicLinkerPath (at target.zig:469 it always returns musl for linux which means that it gives wrong
<g-w1> dynamic linker path -> not native -> no run)
<TheLemonMan> there's no shame in using musl, you can tell us if you do
frmdstryr has quit [Ping timeout: 240 seconds]
<andrewrk> xD
<TheLemonMan> yo andrewrk, how's your thanksgiving going?
<ikskuh> <andrewrk> you can test it out now with -target native-native-gnu
<ikskuh> ah, yeah
<ikskuh> that works :)
<andrewrk> I have a couple hours and then gonna take the rest of the day off and hang with Alee
<ifreund> TheLemonMan: just spent another 20 minutes trying to come up with a test case for that bug you fixed without luck :/
<andrewrk> I'm gonna try to cook okonomiyaki
<ikskuh> enjoy your day!
<ifreund> that doesn't sound very traditional but does sound very tasty
<TheLemonMan> that doesn't sound very thanksgiving-ey, where's the turkey and gravy and pumpkin pie?
<TheLemonMan> I'm gonna steal that recipe tho
<TheLemonMan> ifreund, yeah there's something tricky in how river interacts with zig-wayland...
<ifreund> I didn't intend for there to be anything tricky about it, just took what seemed to be the path of least resistance
<ifreund> but yeah it seems like something else in river is putting the compiler in a state that causes this bug to materialize
<TheLemonMan> have you tried replicating the @import chain? that may help
<ifreund> I haven't yet, no
<andrewrk> TheLemonMan, you don't want me to block the merge on the test case do you?
<TheLemonMan> well, I left a comment for posterity, it should be good to go
<ifreund> We could add compiling river to the zig CI :P
frett27_ has joined #zig
<andrewrk> TheLemonMan, is there a missing compile error before return ErrorSemanticAnalyzeFail ?
dumenci has quit [Ping timeout: 265 seconds]
<andrewrk> or does that mean a compile error was already emitted if we see a null field type?
<andrewrk> never mind me, still waking up. this patch is good to go
<pixelherodev> g-w1: that's weird, but glad you figured it out :)
<ifreund> andrewrk: any sense of a timeline for 0.7.1? I'm probably going to block merging my dev branch of river on this patch
<ifreund> no stress of course, I'll start trying to fix things on the milestone if I get impatient
<andrewrk> I'm not going to put a due date on it, this one will be based on the issues in the milestone
<andrewrk> quite a few open PRs addressing the issues, I think we're close
<ifreund> cool, and thanks for all the support getting issues I've dredged up through river fixed :)
<andrewrk> of course :)
<TheLemonMan> one thing it'd be nice to fix is the FreeBSD VM, it's now constantly failing :(
<andrewrk> hmm let me test something
<andrewrk> damn, I could spend 40 hours/week just keeping the CI passing and helping people get their PRs merged
<andrewrk> i wanna code too!
<TheLemonMan> well CI scripts _are_ code!
<andrewrk> -_-
<andrewrk> is there a freebsd equivalent of `time -v` that shows the peak rss?
<andrewrk> oh I can just run bash
<andrewrk> ok it's `/usr/bin/time -l` on freebsd. anyway, just checked, the std lib tests take peak rss of 6.06 GiB
<TheLemonMan> is the OOM killer kicking in?
<TheLemonMan> if that's the problem we may want to split the test suite into smaller chunks
frmdstryr has joined #zig
<andrewrk> Ave is gonna bump up the ram for us
<andrewrk> I'd rather work on stage2 than fuck around with mitigating this
<dch> regular reminder that I have freebsd flavoured ram and cpu to help as needed
<andrewrk> thanks :)
<dch> an ARMy of cores
<TheLemonMan> the problem is hooking the extra machines to the github CI
<ifreund> I wonder if you can self host sourcehut's builds thing easily
<dch> TheLemonMan: can you config a webhook? If so I can deal with the rest probably
<andrewrk> dch, yeah if you had source hut running on there I'd be on it in a heart beat
<dch> mmmmm what does sh need to make a jail look like a qemu instance
<dch> iirc it just ssh into the vm
radgeRayden has quit [Ping timeout: 272 seconds]
<dch> So is the build triggered from SH or from GH ?
<ifreund> oh, sourcehut has the github integration in a separate service from the builds
<ifreund> this is super modular :)
<TheLemonMan> dch, I guess it's GH that sends a webhook to kickstart the CI runner
<TheLemonMan> there's also the GitLab CI runner https://docs.gitlab.com/runner/install/freebsd.html
<dch> I have 2/3 of a ci system here already, never finished. I can’t return results to github yet but if you send me a webhook it can kick off a build
<dch> always other projects just ahead of that one
<dch> I would need to figure out how to do that last bit
<TheLemonMan> that's the 20% that takes the 80% of the time :P
<dch> exactly! anyway if you get me a webhook I have an incentive to finish it
<andrewrk> TheLemonMan, we have 16 GiB in the freebsd CI runs now
<andrewrk> so if it is still crashing it is not OOM
<TheLemonMan> dch, I guess andrewrk is the only one with enough admin power to do so
<TheLemonMan> andrewrk, good! we'll probably need 16 more by the end of the month :P
<andrewrk> ha
ur5us has joined #zig
<TheLemonMan> dch, you know what would be good? some NetBSD/OpenBSD CI
<TheLemonMan> right now the latter is tested by pinging an openbsd dev heh
<TheLemonMan> one could argue that we wouldn't have any of this problems if only BSDs didn't decide to fork again and again heh
sord937 has quit [Quit: sord937]
<dch> I could do OpenBSD that’s an option
<dch> How much ram does a builder need?
<andrewrk> 12 GiB to be safe
<dch> could only do amd64
<dch> lol ok I can fit it in then just one less chromium tab
<andrewrk> I'm personally choosing to work on stage2 rather than address this out of control ram usage of stage1. it won't always be like this
<dch> our db and scalability testing regularly uses 200+Gb so this will barely be noticed
<TheLemonMan> the fuck
tane has joined #zig
<ziguana[m]> i got a couple of extra 16GB sticks just to run IntelliJ and bazel together once
<ziguana[m]> dev time is the most expensive part of software, and everything's optimized for it
<ziguana[m]> could be the reason that modern software is...the way it is
<pixelherodev> Zig is quite possibly the only program in which I tolerate the insane RAM usage
<pixelherodev> and only because I have full confidence that it's a temporary problem - in part because I'm actively helping to solve it :)
<Michcioperz> oh that kinda reminds me, is the out-of-control memory usage a recent regression or has been there in 0.6.0 already?
<pixelherodev> It's been around for a long time
<pixelherodev> Stage1 was written while the language was evolving
<pixelherodev> So a lot of the design decisions for the compiler were less than ideal
<Michcioperz> i tried to build a hello world for cortex-m and spent half an hour begging oom killer to finally let me back into my laptop
<ziguana[m]> the plan was to translate-zig the stage 1 from stage 2 in the future, right?
<pixelherodev> That's not an attack - these are hard problems, and they're only made harder when they're being solved one-at-a-time
<pixelherodev> ziguana[m]: basically, yes
<pixelherodev> Michcioperz: hello world should not use that much
<Michcioperz> yeah i'm surprised myself
<pixelherodev> How much RAM do you have?
<TheLemonMan> Michcioperz, an hello world shouldn't take that much RAM
<pixelherodev> That sounds like a separate bug
<Michcioperz> 8 gigs
<pixelherodev> Yeah no
<pixelherodev> That's not normal, even for stage1.
<pixelherodev> That's a separate actual bug
<Michcioperz> sure, makes sense
<pixelherodev> can you still reproduce?
<Michcioperz> was gonna try to get a minimal repro but life's getting in my way
<pixelherodev> Maybe limit the RAM usage before running it, so it crashes before OOMing? :P
<Michcioperz> yeah but no matter how much i give it crashes
<pixelherodev> See e.g. ulimit
<pixelherodev> yeah
<pixelherodev> that's bad
<TheLemonMan> we can have a look even if it's not a minimal repro
<pixelherodev> ^
<TheLemonMan> there's no outstanding issue that could eat all your ram... unless you tried to use `!noreturn` as a function return type
<Michcioperz> iirc i just did `export fn _start() noreturn { main() catch unreachable; unreachable; } fn main() !noreturn { while (true) {} }`
<Michcioperz> hahahaha
<Michcioperz> so you guessed it
<Michcioperz> let me check if that helps
<TheLemonMan> what have I become? a living bug tracker
<Michcioperz> i could use one at work, a living bug tracker
<TheLemonMan> I also have a patch for that buuut... iirc I never submitted it because of a flaw in the type system
<Michcioperz> had a meeting today where we were supposed to discuss something but boss forgot half the things
<andrewrk> holy crap TheLemonMan that was honestly impressive
<Michcioperz> +1
<andrewrk> I'm taking the rest of the day off. take care everyone 👋 I appreciate you all
<ziguana[m]> o7
<TheLemonMan> cya!
<ikskuh> andrewrk, have fun and enjoy your time off!
<ifreund> happy thanksgiving!
<Michcioperz> TheLemonMan: removing !noreturn helped, thanks, hahaha
<pixelherodev> Holy....
<pixelherodev> andrewrk: have a good one!
<pixelherodev> TheLemonMan: what *are* you?!
<Michcioperz> we already discussed that, a living bug tracker
<ifreund> a lemon :P
<ikskuh> TheLemonMan is a patch machine
<TheLemonMan> I don't really like bugs IRL :\
<Michcioperz> understandable
<TheLemonMan> a one line patch fixes the !noreturn problem, yay
<TheLemonMan> I mean, it stops the compiler from eating all your ram
<fengb> Should !noreturn be allowed?
<ikskuh> yes, definitly
<fengb> And what about ?noreturn 🙃
<TheLemonMan> and what about ¿noreturn
<Michcioperz> ?noreturn sounds kinda cursed and i'm taking a compiler construction class this semester so i'll just sigh
<earnestly> cursed instructions
<Michcioperz> kinda glad the class is taught on llvm and x86 and not armv8.3
<ikskuh> Michcioperz: why does it sound cursed?
<ikskuh> i think the semantics are pretty clear
<TheLemonMan> noreturn should be a special type that can be casted into every other type, ?noreturn (iirc) is disallowed
<Michcioperz> hmm yeah i guess it is not much different from !noreturn
<Michcioperz> just no clear error value right?
<TheLemonMan> ?noreturn would be like ?void or ?u0, it decays into a boolean flag
<Michcioperz> hmm, i saw it more like "it returns null or doesn't return" i think?
<TheLemonMan> but there's an ongoing ticket war about what zero-sized types should do
<Michcioperz> anyway thanks to y'all i realized i don't need to return !noreturn anyway if i'm on a microcontroller
<Michcioperz> right i think i remember that war
<fengb> If bool is 1 bit storing 2 values, and void is 0 bit storing 1 value, noreturn must be -1 bits storing 0 values!
* Michcioperz screams in mathemathical script
<TheLemonMan> coincidence?
filpAM has quit [Ping timeout: 256 seconds]
radgeRayden has joined #zig
FireFox317 has joined #zig
<FireFox317> andrewrk, when using an external library (.a file) with zig and then using `-L. and -lfoo` there is currently no caching implemented for this. Do we want this, or should we rather just add the .a file as an input to the zig compiler (i.e. `zig build-exe main.zig libfoo.a -lc`)?
<FireFox317> Because currently with the `build.zig` APIs you can add an external library by using `linkSystemLibrary` and `addLibPath` however that doesn't cache the libfoo.a file.
wootehfoot has joined #zig
nullheroes has quit [Quit: WeeChat 2.9]
FireFox317 has quit [Ping timeout: 240 seconds]
FireFox317 has joined #zig
<FireFox317> whoops, computer rebooted -_-
xackus has quit [Remote host closed the connection]
xackus_ has joined #zig
gpanders has joined #zig
nullheroes has joined #zig
ur5us has quit [Ping timeout: 264 seconds]
filpAM has joined #zig
ur5us has joined #zig
notzmv has quit [Remote host closed the connection]
nvmd has quit [Ping timeout: 260 seconds]
nvmd has joined #zig
<pixelherodev> fengb: you hurt me. A lot.
<pixelherodev> "-1 bits"
<pixelherodev> My brain is dying
hnOsmium0001 has joined #zig
skuzzymiglet has joined #zig
hlolli__ has quit [Ping timeout: 265 seconds]
reductum has joined #zig
nvmd has quit [Ping timeout: 260 seconds]
nvmd has joined #zig
filpAM has quit [Quit: leaving]
reductum has quit [Ping timeout: 260 seconds]
reductum has joined #zig
marnix has quit [Ping timeout: 256 seconds]
haliucinas has quit [Ping timeout: 256 seconds]
haliucinas has joined #zig
notzmv has joined #zig
skuzzymiglet has quit [Ping timeout: 260 seconds]
Akuli has quit [Quit: Leaving]
filpAM has joined #zig
KIMI has joined #zig
<KIMI> hi, today i parsed the file \o/ https://paste.mozilla.org/PdgEneVg
<KIMI> if someone can give me advice on code that would be nice
<KIMI> one question about this line: var line = reader.readUntilDelimiterOrEof(&buffer, '\n') catch @panic("error read") orelse break;
<KIMI> how can remove panic
<KIMI> but return still line
<KIMI> i tried try but not work because i use orelse break
<pixelherodev> KIMI: is the goal to pass the error to the calling function?
<pixelherodev> (hence, try)
<pixelherodev> KIMI: you can parenthesize the try
<pixelherodev> e.g. `(try reader.read...) orelse break`?
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
<pixelherodev> lol lemon, like the quit message :P
<KIMI> i don't know about the error
<pixelherodev> What do you want to happen if reading fails?
<KIMI> i just discover try thing
<KIMI> i will try parenthesis thanks
<KIMI> some other people helped me on telegram too
<KIMI> parenthisis don't work
<KIMI> but it is ok i think crash is better if it cant read file
<KIMI> one other question about allocation
<KIMI> i only use heap for copy string
<KIMI> but i don't like it, i wanted 1st use fixed array but i'm not sure
<KIMI> on line 97
<KIMI> my code is better than on C i like it
<filpAM> can I see it?
<KIMI> yes i send paste
<KIMI> i sent
<KIMI> but it is not finish yet
jjsullivan1 has joined #zig
tane has quit [Quit: Leaving]
wootehfoot has quit [Ping timeout: 260 seconds]
radgeRayden_ has joined #zig
radgeRayden has quit [Ping timeout: 272 seconds]
ur5us has quit [Ping timeout: 264 seconds]
cren has quit [Quit: cren]
jjsullivan1 has quit [Remote host closed the connection]
jjsullivan1 has joined #zig
skuzzymiglet has joined #zig
skuzzymiglet has quit [Ping timeout: 240 seconds]
ur5us has joined #zig