<scientes>
something is broken regarding error sets in comptime
tridactyla has quit [Remote host closed the connection]
tridactyla has joined #zig
scientes has quit [Remote host closed the connection]
scientes has joined #zig
<scientes>
my program crashes writing to 0x1 despite the mmap() succeeding, if I add a debug statement printing the address, the bug disappears :/
<scientes>
there is some over-eager pruning going on somewhere--also doesn't show up in debug mode
return0e has quit [Read error: Connection reset by peer]
return0e_ has joined #zig
return0e_ has quit [Ping timeout: 250 seconds]
scientes has quit [Ping timeout: 246 seconds]
tgschultz has joined #zig
return0e has joined #zig
_whitelogger has joined #zig
return0e has quit [Ping timeout: 246 seconds]
_whitelogger has joined #zig
jjido has joined #zig
_whitelogger has joined #zig
wootehfoot has joined #zig
_whitelogger has joined #zig
return0e has joined #zig
Zaab1t has joined #zig
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
scientes has joined #zig
Ichorio has joined #zig
jjido has joined #zig
scientes has quit [Ping timeout: 246 seconds]
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tgschultz has quit [Ping timeout: 245 seconds]
scientes has joined #zig
_whitelogger has joined #zig
return0e has quit [Ping timeout: 245 seconds]
scientes has quit [Read error: Connection reset by peer]
a_chou has joined #zig
jjido has joined #zig
a_chou has quit [Ping timeout: 250 seconds]
scientes has joined #zig
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Zaab1t has quit [Ping timeout: 250 seconds]
a_chou has joined #zig
return0e_ has quit [Read error: Connection reset by peer]
return0e has joined #zig
a_chou has quit [Client Quit]
Zaab1t has joined #zig
<mikdusan>
on zig command line; would like to pass args to main run by “zig run [source]” . i don’t see any command-line options for that
<andrewrk>
mikdusan, I think I broke that, sorry. It's supposed to be any args after the positional [source] argument
<mikdusan>
do you think there is value in creating a consistent sub-process args syntax a’la unix style? double-hyphen
<mikdusan>
zig run main.zig — 1 2 3
<mikdusan>
or
<mikdusan>
zig test main.zig —test-filter … — 1 2 3
<andrewrk>
tests don't have the capability of accepting user args
<andrewrk>
as for the other one, I think if it were `zig run` it would make sense to do the double hyphen. but if we do https://github.com/ziglang/zig/issues/1505 then it would make sense to take args after the source as runtime args
<andrewrk>
I'm reconsidering though about zig run. not sure what to do. anyway in the meantime mikdusan if you are thinking of submitting a pull request to enable passing runtime args to zig run, I would merge it however you decided to do it
jjido has joined #zig
<mikdusan>
i need to install a linux vm to investigate this further. /usr/bin/env on macos is splitting on whitespace.
<hryx>
andrewrk: I marked #2144 as ready -- do you want me to squash & rebase into 1 commit before it's merged?
<hryx>
Not sure which way you prefer in general
<hryx>
Sorry, I'll comment on the PR. Just realized I'm fragmenting the conversation by asking here
scientes has quit [Ping timeout: 245 seconds]
<andrewrk>
hryx, nice work
<hryx>
thankee, very happy to finally have made a contribution to the code
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tgschultz has joined #zig
jjido has joined #zig
Zaab1t has quit [Quit: bye bye friends]
<mikdusan>
i think a lot of #!/usr/bin/env use is unecessary. if you need to modify ENV vars then it makes sense. unfortunately /usr/bin/env itself is creating the dilemma because between linux’ /usr/bin/env, gnu’s newer version, and bsd older/newer… it’s a bit of a mess.
<mikdusan>
funny thing is; this works predictably on both linux and macos. —> #!zig run -one -two -three
<andrewrk>
mmm that does not match my experience
tankf33der has joined #zig
<tankf33der>
andrewrk: ping
<andrewrk>
the args passed would be "-one -two -three", rather than the expected "-one" "-two" "-three"
<mikdusan>
`#!zig run -one -two -three` ends up as —> arg[0] = “run -one -two -three” and arg[1] = “zig” or if zig is found in path “/path/to/zig” . so 2 args.
<mikdusan>
the docs i found on this is before freebsd 6.0, this 2-arg behavior didn’t exist. i don’t know how far back linux 2-arg behaviour goes.
<andrewrk>
tankf33der, I suggest to upgrade to master branch rather than 0.3.0. because 0.4.0 is to be released in 8 days from now
<tankf33der>
now i just compilation.
<tankf33der>
now i just need compilation.
<andrewrk>
tankf33der, I suggest you achieve compilation with master branch rather than 0.3.0
<tankf33der>
ok, i see.
<tankf33der>
will it help here ?
<andrewrk>
yes
<tankf33der>
recompiling.
<tankf33der>
i see.
<andrewrk>
because of C pointer types
<mikdusan>
the interesting thing is this DIRECT shebang is stil workable even before 2-arg behavior. if it does split, it’s still consistent in that the LAST arg would always be the arg[0] to shebang line.
<mikdusan>
so /usr/bin/env compats aside, from what it looks like #!zig would work. obviously there is no mechanism for ENV var modifications.
<scientes>
because otherwise when a process dies it still holds the locks
<scientes>
this allows the kernel to release its locks when it dies
<mikdusan>
“robust” as in the OS guarantees some kind of unlock/cleanup
<scientes>
exactly
<andrewrk>
zig does not currently have a cross platform abstraction for a mutex shareable between processes
<andrewrk>
nor does it currently have an abstraction for a linux-specific mutex shareable between processes
<andrewrk>
ok, now I understand scientes, you are proposing such a thing
<scientes>
yeah, it doesn't make sense to share between processes unless you make them robust
<mikdusan>
scientes: can u point me to the issue/proposal
<andrewrk>
agreed. note that current mutex implementation is robust, however, since it is not shared between processes, there is no problem with resource cleanup