Earlier quoted context omitted.
What ? You just write your OS layer for each platform and it's portable.
True. The OS layer you write (and port to other OSes) is called "the standard library". :-)
Writing C software without the standard library
51–60 of 188 posts
Re: Writing C software without the standard library
#52The guy is definitely a fan of old-school minimalism: http://weeb.ddns.net/0/articles/modern_software_is_at_its_wo... I have to say I miss the old days of Gopher, too. It was so much easier to focus on the content back then.
I find myself agreeing with him 100%. Not just on Gopher (although i did write a Gopher client some time ago - http://runtimeterror.com/tools/gopher/ ) but on the entire rant about wasting resources, UIs that waste screen real estate and become unusable in smaller resolutions, fonts that only look good with anti-aliasing and have weird misplaced pixels with antialiased disabled (which i also do), websites that make r…
Web is especially good example. With all its short-comings, it's still sandboxed and portable platform with very capable (and ugly) programming language for delivering same codebase across desktop and mobile devices (even servers, unfortunately). There are many hits and misses like TODO apps built on Electron, but that's to be expected with any technology and isn't a reason to dismiss all the good applications.
To me, consuming all the hardware resources of each new generation seems to be the price we have to pay to build more complex software in larger and larger quantity.
What's bothering me is that it doesn't seem to be converging in desired unification of different applications and services. Everyone is building their own stacks and environment without much care for interoperability. For example, few years ago it seemed clear that XMPP is a way forward in chat clients that everyone should adopt to enable federation. Nowdays we are expected to have 3+ chat clients installed on phone and remember which contact is on which service. I really don't understand how users put up with it.
Re: Writing C software without the standard library
#53Your first paragraph makes me wish this site supported Markdown.
How do we summon Dang? :)
Re: Writing C software without the standard library
#54Earlier quoted context omitted.
But still, Linux syscalls are different on each architecture.
Indeed, stupidly different. Different syscall numbers, different argument orders, different values for constants, different struct layouts, ... Some architectures, like MIPS, are particularly bad, with nods to Irix compatibility thrown in. The BSDs are all exactly the same for every architecture, sane.
Re: Writing C software without the standard library
#55> Executables are incredibly small (the http mirror server for my gopherspace is powered by a 10kb executable). Is this ever an real issue, even on any embedded system in the last 20 years?
But sometimes it can take so much extra work that it's not worth it. So gotta do the cost benefits analysis or hell if it's something you're interested in doing just do it anyway.
Re: Writing C software without the standard library
#56The "hello world" example is just the first step to annihilate your capacity of understanding how thinks works by relying on institutional black magic, that maybe wrong
(see all the scanf bugs that have been living in C code for so long and all bugs coming from respecting the old's man wisdom)
Re: Writing C software without the standard library
#57Earlier quoted context omitted.
> He claims that your code will be easy to port but then goes straight to Linux system calls. Many linux developers believe "code is portable" means "can run on different linux distros". Edit: To be fair, he said architectures, and i think he meant CPU architectures, i.e. AMD64 and i386.
But still, Linux syscalls are different on each architecture.
Re: Writing C software without the standard library
#58The guy is definitely a fan of old-school minimalism: http://weeb.ddns.net/0/articles/modern_software_is_at_its_wo... I have to say I miss the old days of Gopher, too. It was so much easier to focus on the content back then.
That being said, I'm happy the web isn't still just plaintext or minimally styleable
Re: Writing C software without the standard library
#59[1] https://github.com/abh/djbdns/blob/master/str_len.c [2] http://cr.yp.to/djb.html
Re: Writing C software without the standard library
#60Earlier quoted context omitted.
True. The OS layer you write (and port to other OSes) is called "the standard library". :-)
A .h file with different syscalls IDs and perhaps a few inline functions is hardly a standard library though