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/
wootehfoot has quit [Quit: Leaving]
wootehfoot has joined #zig
wootehfoot has quit [Read error: Connection reset by peer]
reductum has joined #zig
<andrewrk> wow, #7482 uncovered a *second* long-standing alignment bug
a_chou has joined #zig
<karchnu> andrewrk: is there any way to find them automatically?
<andrewrk> we are not ready for fuzz testing yet
<pixelherodev> Too many bugs? :P
<pixelherodev> ... I was joking, but that's probably actually it, isn't it?
<pixelherodev> :(
<andrewrk> we are fixing bugs at a certain rate, and collecting new bug reports at a similar rate, with a bunch of bugs also sitting around. Manually reported bugs function as a heuristic for which bugs are important to prioritize. fuzz testing would just be introducing chaos into the priorities
<andrewrk> it will be appropriate later, when the bug fixing rate is out pacing the report rate
* pixelherodev nods
<pixelherodev> For now, ifnobody knows about it, it might as well not exist ;)
<andrewrk> also, fixing bugs right now is opportunity cost, however that will not be the case later
nycex has quit [Remote host closed the connection]
ur5us has joined #zig
nvmd has quit [Quit: Later nerds.]
ur5us has quit [Quit: Leaving]
reductum has quit [Quit: WeeChat 2.9]
a_chou has quit [Remote host closed the connection]
earnestly has quit [Ping timeout: 240 seconds]
blueberrypie has quit [Quit: leaving]
jjsullivan1 has quit [Remote host closed the connection]
Jeanne-Kamikaze has quit [Quit: Leaving]
kushalp has quit [Ping timeout: 260 seconds]
spiderstew_ has joined #zig
ur5us has joined #zig
spiderstew has quit [Ping timeout: 260 seconds]
cren has quit [Ping timeout: 260 seconds]
cren has joined #zig
kushalp has joined #zig
<leeward> Fixing bugs in code that will be thrown out is not fun.
<fengb> My entire career has been on code that’s ultimately thrown away
<andrewrk> whenever I skip a few days of PR merging to work on my own stuff the open PRs number goes into the 60s
ur5us has quit [Ping timeout: 260 seconds]
<leeward> fengb: Testing?
<fengb> No, actual product work. Everything I work on gets canned lol
squeek502 has quit [Remote host closed the connection]
<leeward> hah, that's no fun
<fengb> Maybe I’m the problem 🤔
squeek502 has joined #zig
benjif has quit [Quit: Leaving]
<andrewrk> they should just pay you to do nothing, skip the middle man
<fengb> lol
<leeward> fengb: a machine for turning money into no products.
<fengb> I deliver. Then it gets canned 2 months later
<fengb> My last job we spent about 1 month working on the core feature... and about 11 months on this majorly complicated piece nobody wanted
<leeward> Ah, product managers got to you.
<leeward> I guess I should call them product Managers.
<fengb> AbstractManager
<leeward> hah
<leeward> ProductManagerFactoryFactory
<karchnu> (capitalism)
dumenci has quit [Ping timeout: 256 seconds]
<leeward> Rut roh, have we strayed from dilbert cartoons to politics? Sounds like something Scott Adams would do.
xackus_ has joined #zig
xackus has quit [Ping timeout: 240 seconds]
fengh has joined #zig
fengh has quit [Client Quit]
leon-p has quit [Quit: leaving]
fengh has joined #zig
spiderstew has joined #zig
fengh has quit [Quit: WeeChat 3.0]
fengh has joined #zig
spiderstew_ has quit [Ping timeout: 264 seconds]
_whitelogger has joined #zig
hooo has joined #zig
<hooo> zig doesnt work for me, the created executable says: cannot execute binary file: Exec format error
<hooo> this is from the sample created by zig init-exe
<hooo> I tried both master and 0.7.1 on linux x86
<leeward> hooo: What's the command line you're using to build it?
<hooo> zig build
<leeward> Does `zig build run` do the same thing?
<hooo> no, that seems to work...
<leeward> Ok, so after you `zig build` what are you running that's failing?
<hooo> ./sample
<hooo> ok i see, this binary was from a previous test where I didnt use the build.zig
<leeward> That's not being generated by `zig build` with the sample that init-exe makes. Try `zig-cache/bin/sample`
<hooo> thank you
<leeward> no problem
<leeward> It is kinda weird that zig doesn't put an executable somewhere obvious by default.
<hooo> imo the command line to build things is needlessly complex. It should be like this: ./zig main.zig
<leeward> That's...probably too simple.
<leeward> `zig build-exe main.zig` is not too much more complicated, and allows for useful things like `zig test main.zig` and `zig build-obj lib.zig`
<leeward> Though to be fair, the build command for the thing I'm working on right now is zig build-exe -L<path> -L<another-path> --script <linker script>.x --single-threaded -O ReleaseSmall -target msp430-freestanding-none -mcpu=msp430 main.zig
<hooo> I disagree, that's precisely where the build.zig should come in and add additional options like the scripts:{} in package.json in npm
<leeward> Which is a bit longer than I'd like.
<leeward> If you don't start your command with "zig build" build.zig doesn't come in at all.
<leeward> Which I see as a good feature.
<leeward> Easier to reason about when there's less magic.
<leeward> But if you think of the command as "zig build" instead of just "zig" then it's basically exactly what you're talking about.
<leeward> It's just that there aren't any other executables, so having an easy way to address all the orthogonal functionality in the zig executable is necessary. npm is just a package manager, but zig has a kitchen sink built in.
hooo has quit [Quit: Leaving]
waleee-cl has quit [Quit: Connection closed for inactivity]
marnix has joined #zig
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
<leeward> How do I set a function's inline_type? I see how to do it at the call site (@call) but not at the function declaration.
<leeward> I have a function that pretty much only gets called inside ISRs and would like to ensure that if it's not inlined for some reason an error is thrown.
<andrewrk> leeward, when you do `zig build`, it executes the "install" step, e.g. the thing that package maintainers will execute to create a package out of your project. the default install directory is `zig-cache/` but you can change that
fputs has quit [Ping timeout: 260 seconds]
ur5us has joined #zig
sord937 has joined #zig
<daurnimator> idea for the AT_RANDOM stuff, I wonder if there is a way to only initialize the RNG if its used: we could have an `@export()` inside of the RNG, and then in the initialisation code, have a weak symbol `initialise_rng`, and only if non-null then do it....
<leeward> andrewrk: Yeah, that bug is exactly what I'd want.
<leeward> daurnimator: Initialize on first use is a pretty common use case. It might even be worth writing some comptime code in the library to make it easy.
<leeward> (in the standard library)
<leeward> Hmm, does Windows do hard links? It seems like they would solve all the objections people raised in 7296.
<leeward> Even symlinks would work, but pretty sure Windows doesn't have those.
lucid_0x80 has joined #zig
hio has joined #zig
xackus_ has quit [Quit: Leaving]
xackus has joined #zig
fengh has quit [Ping timeout: 240 seconds]
gpanders has quit [Ping timeout: 264 seconds]
gpanders has joined #zig
gpanders has quit [Ping timeout: 256 seconds]
ur5us has quit [Ping timeout: 260 seconds]
gpanders has joined #zig
gpanders has quit [Ping timeout: 260 seconds]
hnOsmium0001 has quit [Quit: Connection closed for inactivity]
earnestly has joined #zig
wootehfoot has joined #zig
<dch> leeward: windows has had symlinks since at least a decade, called ntfs reparse points
<dch> because its windows, its subtly broken in many different ways, and its only available on NTFS, but it is there
<dch> leeward: I used it back round 2000 I think, linkd and later mklink, API is I think this one https://docs.microsoft.com/en-nz/windows/win32/api/winbase/nf-winbase-createsymboliclinka
<dch> the tools were in the resource kit, a separate download
* dch gets back on his rocking chair
ur5us has joined #zig
sord937 has quit [Ping timeout: 240 seconds]
sord937 has joined #zig
leon-p has joined #zig
ur5us has quit [Ping timeout: 260 seconds]
forgot-password has joined #zig
<forgot-password> Quick question: Is it possible to get the absolute path of a zig file when its being built? Similar to what Node.js provides via __filename
<ifreund> forgot-password: closest thing to that is @src()
<ifreund> though you can pass anything you want in as build option using the zig build system, including absolute paths
<forgot-password> ifreund: @src() seems to be exactly what I need. Thanks a lot :)
marnix has quit [Ping timeout: 264 seconds]
marnix has joined #zig
radgeRayden has quit [Ping timeout: 272 seconds]
waleee-cl has joined #zig
txdv has quit [Quit: WeeChat 1.9.1]
fputs has joined #zig
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
fputs has quit [Read error: Connection reset by peer]
forgot-password has quit [Ping timeout: 265 seconds]
marnix has quit [Read error: Connection reset by peer]
xackus has quit [Ping timeout: 240 seconds]
marnix has joined #zig
fengh has joined #zig
marnix has quit [Ping timeout: 240 seconds]
marnix has joined #zig
cole-h has joined #zig
gpanders has joined #zig
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
cole-h has quit [Ping timeout: 272 seconds]
Akuli has joined #zig
forgot-password has joined #zig
proteus-guy has quit [Remote host closed the connection]
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
marnix has quit [Ping timeout: 256 seconds]
marnix has joined #zig
forgot-password has quit [Ping timeout: 264 seconds]
forgot-password has joined #zig
notzmv has quit [Remote host closed the connection]
notzmv has joined #zig
notzmv has quit [Remote host closed the connection]
notzmv has joined #zig
lucid_0x80 has quit [Ping timeout: 265 seconds]
forgot-password has quit [Ping timeout: 246 seconds]
xackus has joined #zig
forgot-password has joined #zig
benjif has joined #zig
benjif_ has joined #zig
benjif_ has quit [Remote host closed the connection]
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
forgot-password has quit [Ping timeout: 260 seconds]
hnOsmium0001 has joined #zig
riba has joined #zig
xackus has quit [Ping timeout: 272 seconds]
diltsman has joined #zig
<diltsman> Does anybody have an example of cross-compiling with Zig build? I had it working a while back (~Zig 0.5), but things have changed.
<scientes> diltsman, https://godbolt.org/z/x5r5Gr
<scientes> oh build.zig
<scientes> I have never used that
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
mokafolio has quit [Quit: Bye Bye!]
blueberrypie has joined #zig
diltsman has quit [Remote host closed the connection]
karchnu has quit [Ping timeout: 240 seconds]
blueberrypie has quit [Quit: leaving]
blueberrypie has joined #zig
blueberrypie has quit [Client Quit]
mattnite has joined #zig
blueberrypie has joined #zig
mattnite has quit [Client Quit]
mokafolio has joined #zig
mokafolio has quit [Client Quit]
Ashpool has joined #zig
xackus has joined #zig
mokafolio has joined #zig
mokafolio has quit [Client Quit]
mokafolio has joined #zig
seadragon-droid has joined #zig
ur5us has joined #zig
forgot-password has joined #zig
seadragon-droid has quit [Read error: Connection reset by peer]
Ashpool has quit [Remote host closed the connection]
ur5us has quit [Ping timeout: 260 seconds]
riba has quit [Ping timeout: 256 seconds]
sord937 has quit [Quit: sord937]
Akuli has quit [Quit: Leaving]
swills has joined #zig
bitmapper has joined #zig
marnix has quit [Ping timeout: 268 seconds]
wootehfoot has quit [Ping timeout: 260 seconds]
a92 has joined #zig
nyaayaya has quit [Quit: Ping timeout (120 seconds)]
nyaayaya has joined #zig
hio has quit [Quit: Connection closed for inactivity]