Some context: In master branch of Zig right now (before https://github.com/ziglang/zig/pull/10330 is merged), status quo: $ cat ../lib/libc/glibc/*.txt | wc -c 205219 $ cat ../lib/libc/glibc/*.txt | xz | wc -c 22976 Zig supports targeting every version of glibc for any target architecture. The information required to do this takes up 200 KB installation size / 22 KB tarball size, and it has the following problems (wh…
How much work is it to then maintain this bespoke encoding? Without having much context on it, it sounds similar to having to maintain unicode identifier character tables for unicode-aware parsers (e.g. Javascript's). Updating unicode tables after unicode version releases can be done w/ somewhat hack-ish scripting of parsing txt spec files but it's admittedly not super clean, I'm curious what's involved when dealing…
Show HN: A 166 KB file for cross compiling glibc for any version, any target
11–20 of 34 posts
Re: Show HN: A 166 KB file for cross compiling glibc for any version, any target
#12Re: Show HN: A 166 KB file for cross compiling glibc for any version, any target
#13Some context: In master branch of Zig right now (before https://github.com/ziglang/zig/pull/10330 is merged), status quo: $ cat ../lib/libc/glibc/*.txt | wc -c 205219 $ cat ../lib/libc/glibc/*.txt | xz | wc -c 22976 Zig supports targeting every version of glibc for any target architecture. The information required to do this takes up 200 KB installation size / 22 KB tarball size, and it has the following problems (wh…
Totally off-topic: I installed Zig on Saturday afternoon and by the evening I had my first program do some useful stuff, on Sunday I added some C code, then added some tests and by Sunday evening I had a pure Zig project again (and afterwards learned that translate-to-zig is a thing). I gotta say I'm very impressed with Zig and partial evaluation is just such a nice, mentally simple technique for generics and lots of…
Re: Show HN: A 166 KB file for cross compiling glibc for any version, any target
#14Earlier quoted context omitted.
> the prefix-[] are kinda weird (just way too used to C/C++'s postfix array notation) I think over time the C/C++ way is going to go the way of the dodo; IIRC, rust and go both use the prefix-[]. It creates a clear, unambiguous way of defining the type (no "spiral typing" jokes for the modern languages).
I wish Rust used prefix &[]i32 for a slice, and [5][2]i32 for a 5x2 array. Instead it uses &[i32] for a slice, and [[i32; 2]; 5] for a 5x2 array. Reading types backwards is alive and well.
Re: Show HN: A 166 KB file for cross compiling glibc for any version, any target
#15What's the point in this? Surely you'll have more dependencies than glibc?
Re: Show HN: A 166 KB file for cross compiling glibc for any version, any target
#16Oh, zig is not in https://learnxinyminutes.com/ , someone should add it :)
The zig language doc is pretty good and short, and the lib/std folder is full of pretty easy to understand examples.
Re: Show HN: A 166 KB file for cross compiling glibc for any version, any target
#17Earlier quoted context omitted.
> the prefix-[] are kinda weird (just way too used to C/C++'s postfix array notation) I think over time the C/C++ way is going to go the way of the dodo; IIRC, rust and go both use the prefix-[]. It creates a clear, unambiguous way of defining the type (no "spiral typing" jokes for the modern languages).
I wish Rust used prefix &[]i32 for a slice, and [5][2]i32 for a 5x2 array. Instead it uses &[i32] for a slice, and [[i32; 2]; 5] for a 5x2 array. Reading types backwards is alive and well.
Re: Show HN: A 166 KB file for cross compiling glibc for any version, any target
#18Re: Show HN: A 166 KB file for cross compiling glibc for any version, any target
#19Some context: In master branch of Zig right now (before https://github.com/ziglang/zig/pull/10330 is merged), status quo: $ cat ../lib/libc/glibc/*.txt | wc -c 205219 $ cat ../lib/libc/glibc/*.txt | xz | wc -c 22976 Zig supports targeting every version of glibc for any target architecture. The information required to do this takes up 200 KB installation size / 22 KB tarball size, and it has the following problems (wh…
Say if I am using a language/toolchain which pulls in a C/C++ compiler, are you able to substitute "zig cc" there and explicitly cross-compile to a different GLIBC version?
Re: Show HN: A 166 KB file for cross compiling glibc for any version, any target
#20Some context: In master branch of Zig right now (before https://github.com/ziglang/zig/pull/10330 is merged), status quo: $ cat ../lib/libc/glibc/*.txt | wc -c 205219 $ cat ../lib/libc/glibc/*.txt | xz | wc -c 22976 Zig supports targeting every version of glibc for any target architecture. The information required to do this takes up 200 KB installation size / 22 KB tarball size, and it has the following problems (wh…
Can I use this incredible feature with other toolchains, or existing artifacts that have a glibc dependency? Say if I am using a language/toolchain which pulls in a C/C++ compiler, are you able to substitute "zig cc" there and explicitly cross-compile to a different GLIBC version?