@llvm@pinskia@amonakov I dunno, it's a tough race between implementation-defined behavior and undefined behavior. Both are unpardonable defects of any language, but the C standard embraces them as features?
@etchedpixels@dalias yeah, gcc converts printf("hello world\n") into puts("hello world");
That's one of the numerous optimizations present in "hosted" mode, which is why I always tell people to get rid of -ffreestanding when building with a full C library.
Btw, on armhf, hello world is way smaller than on x86_64:
$ size test-hello-armhf text data bss dec hex filename 1520 76 4624 6220 184c test-hello-armhf
You know how I always say picolibc isn't a Linux C library because it doesn't do all of the fancy Linux stuff? Well, it turns out you don't need much to get a semi-functioning system.
$ size test-hello-picolibc test-hello-glibc text data bss dec hex filename 3632 144 4656 8432 20f0 test-hello-picolibc 645697 23704 22576 691977 a8f09 test-hello-glibc
I blame Kees Cook for nerd-sniping me on this one.
picolibc has been reformatted with clang-format. All PRs will now be checked to make sure they are formatted correctly, so any pending requests will need to be fixed and resubmitted. I'm looking forward to having only one coding style to deal with.
Thanks to all of the picolibc contributors over 2025 and best wishes for 2026.
Can anyone explain why glibc's ctype functions return different values than wctype functions in a utf8 locale for Latin-1 Supplement values (0x80 <= c < 0xff)?
isupper(0xc4) == 0 iswupper(0xc4) == 1
Is this correct? How is this motivated by the C standard?
Is it because utf-8 is a multibyte encoding where Ä is represented by two bytes in strings?
* Oliver Stannard at ARM got testing running on the FVP emulator for more rigorous AARCH64 validation.
* Eduard Tanase fixed a bunch of documentation issues.
* Joel Holdsworth added OpenRisc support.
* Jiaxun Yang fixed my janky tools situation by creating picolibc-ci-tools which auto-builds all of the extra bits we need for CI. They also add LoongArch and LatticeMico32 support. The latter uncovered GCC bugs which I had fun fixing.
Adding uchar.h to picolibc today. Instead of providing useful conversions between UTF-8, UTF-16 and UTF-32, all C23 provides is conversions between those and the awful "multibyte" representations. I can understand why they'd *also* want to connect UTF encodings to the legacy C APIs, but the most important thing we need is a way to validate UTF-8 input which has some pretty tricky corner cases involving missing bytes, overlong encodings, and surrogates. https://github.com/picolibc/picolibc/pull/861
I also submitted a merge request to the Inkscape Hershey Font extension. In some glorious future Inkscape release, we should be able to draw stroked text with my fun font! I added a bunch more glyphs (Latin Extended-A and a few more) to match the other fonts.
First light for gcode-text -- it's driving the new laser cutter Bdale bought and showing the whole font. The Altus Metrum logo below was drawn from an SVG with laser-grbl.
@jmorris I have to admit I'm tempted to translate this to Python so that other people can use this code for other projects more easily, but Nickle was a much easier target given that the font stuff started in my 'twin' project in C...
Keith Packard has been developing free software since 1986, working on the X Window System, Linux, amateur rocketry and robotics. He is currently a senior principal engineer with Amazon's Device OS group which helps build devices like the Halo, Echo, Fire TV and Kindle. He received a Usenix Lifetime Achievement award in 1999, an O'Reilly Open Source award in 2011 and sits on the Amateur Radio Digital Communications (ARDC) board. Keith uses he, him and his pronouns. https://keithp.com. tfr.