ziglang / universal-headers Goto Github PK
View Code? Open in Web Editor NEWA set of C headers (.h files) that are compatible with widely used libcs for various targets.
A set of C headers (.h files) that are compatible with widely used libcs for various targets.
On stream yesterday Andrew tried to simplify this logic: https://clbin.com/4Rstp it is 1584 lines and 196124 characters
This is the output of Quine-McCluskey: https://clbin.com/vuHiW it is 126 lines and 10120 characters. There is one boolean function being optimized for every segment that a boolean target (i.e. SYS_APPLEAPIOPTS_H) remains constant, there are 18 such segments in the code.
It still does not have nesting which would further reduce the number of characters. The Quine-McCluskey algorithm gives output in a form where it is natural to look for common terms to factor out).
All libc implement the ISO C std (atleast some version of it). Some implement posix standards too. These standard rarely change(ISO C changes every 10 years) so these headers once implement need little maintenance. So the tools could use these headers as a reference. This could make tooling simpler and leaves room for some inline functions and maybe a zig cc specific preprocessor derivatives.
Semantics of freestanding are insufficient as the C standard (is intentially) underspecific on behavior of IO functions in the context of non-hosted environments. To quote an exaggaration from https://thephd.dev/conformance-should-mean-something-fputc-and-freestanding:
"fread is not part of freestanding C, and we ship a freestanding implementation,
so we can do whatever we want to the I/O functions. Sorry!"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.