HackerTrans
TopNewTrendsCommentsPastAskShowJobs

squeek502

no profile record

comments

squeek502
·지난달·discuss
Might not make it in time for 0.17 but there is a contributor making progress on the COFF linker: https://codeberg.org/kcbanner/zig/src/branch/coff_linker_wip
squeek502
·8개월 전·discuss
That would only interact with the shell, as `%` is not actually part of the environment variable name, it's just a way to tell the shell you want it to get the value of an environment variable. The environment block itself is a NULL terminated list of NULL terminated WTF-16 strings of the format <key>=<value>, so `=` would be the more interesting thing to try.

And indeed, it looks like using `=` as a drive letter breaks things in an interesting way:

    =:\> cd bar
    Not enough memory resources are available to process this command.

    =:\bar>
`cd` exits with error code 1, but the directory change still goes through.

With a program that dumps the NULL terminated <key>=<value> lines of the environment block, it looks like it does still modify the environment, but in an unexpected way:

Before `cd /D =:\`, I had a line that looked like this (i.e. the per-drive CWD for C:\ was C:\foo):

    =C:=C:\foo
After `cd /D =:\`, that was unexpectedly modified to:

    =C:==:\
Funnily enough, that line means that the "working directory" of the C drive is `=:\`, and that actually is acted upon:

    =:\foo> cd /D C:

    =:\>
---

You might also be interested to know that '= in the name of an environment variable' is a more general edge case that is handled inconsistently on more than just Windows: https://github.com/ziglang/zig/issues/23331
squeek502
·8개월 전·discuss
They work just fine, as the drive-specific CWD is stored in the environment as a normally-hidden =<drive-letter>: environment variable which has all the same WTF-16 and case-insensitive properties as drive letters:

    C:\> cd /D λ:\

    λ:\> cd bar

    λ:\bar> cd /D C:\

    C:\> echo %=Λ:%
    λ:\bar

    C:\> cd /D Λ:

    λ:\bar>
squeek502
·8개월 전·discuss
> Any Mods you create for Minecraft: Java Edition from scratch belong to you (including pre-run Mods and in-memory Mods) and you can do whatever you want with them, as long as you don't sell them for money / try to make money from them

https://www.minecraft.net/en-us/eula
squeek502
·11개월 전·discuss
0.15.0 was effectively skipped: https://github.com/ziglang/www.ziglang.org/commit/1be0f80b15...
squeek502
·작년·discuss
Good catch, that does indeed look like a mistake in the spec. Everything past the first sentence of that error description is suspect, honestly (seems like it was naively adapted from the example in [1] but that example isn't relevant to the missing-semicolon-after-character-reference error).

Will submit an issue/PR to correct it when I get a chance.

[1] https://html.spec.whatwg.org/multipage/parsing.html#named-ch...
squeek502
·작년·discuss
Appreciate it (I'm the author). I'd like to think there's a good bit of interesting stuff in here outside of the specific topic of named character reference tokenization.
squeek502
·작년·discuss
FWIW here's what that looks like for Zig: https://ziglang.org/news/2024-financials/
squeek502
·작년·discuss
Relevant: https://github.com/ziglang/zig/issues/4055#issuecomment-1646...
squeek502
·작년·discuss
As far as I'm aware, using the self-hosted backend for anything other than Debug mode is a goal, but a far-future goal.

I believe the most relevant links are https://github.com/ziglang/zig/issues/16270 and https://github.com/orgs/ziglang/projects/2/views/1?pane=issu... (as you can see, nothing is concrete yet, just vague mentions of optimization passes)
squeek502
·작년·discuss
I'm probably not describing it fully accurately. See the link for the proper explanation.
squeek502
·작년·discuss
My understanding is that Zig's incremental compilation will work on a much more granular level (i.e. functions, etc), so, for example, change one function and only that function (and its dependencies) will get recompiled/relinked (there's some linker trickery involved to avoid needing to relink everything IIUC).

More details here: https://ziggit.dev/t/how-zig-incremental-compilation-is-impl...