3 ms·
> This GNU/Linux stuff comes from POSIX's definition of operating system Technically true. But do you run a lot of software that works without glibc and other
by southerntofu 5y ago
> This GNU/Linux stuff comes from POSIX's definition of operating system
Technically true. But do you run a lot of software that works without glibc and other userland utilities?
> on Linux where one can just trash all the GNU stuff and obtain or write custom software directly on top of the kernel
True, yet most of us still use a GNU/Linux distribution.
- zibzab 5y agoJust don't forget that it goes both ways. GNU today's is much more relevant than GNU 30 years ago thanks to the Linux community. Would not surprise me if 80% of recent GNU contributions come from the Linux crowd.
- matheusmoreira 5y ago> But do you run a lot of software that works without glibc and other userland utilities? Yes. I made a few of these utilities for my own use. I actually started developing a Linux system call library to facillitate this but then I discovered the kernel developers themselves already made one for their own tools. https://github.com/torvalds/linux/blob/master/tools/include/nolibc/nolibc.h https://github.com/torvalds/linux/blob/master/tools/include/... People can include this awesome header file in a freestanding C project and enjoy making 100% dependency-free Linux binaries. No C standard library cruft anywhere. It's amazing. You could boot Linux directly into one of these things just by writing init=/my/program in the kernel command line. You'd need to do some init stuff like mounting procfs and sysfs but it's totally fine. I've even seen graphical software running this way with OpenGL ES on top of kernel interfaces for mode setting and buffer management, people could even make video games that run this way. I really want to get into this.
- southerntofu 5y ago> https://github.com/torvalds/linux/blob/master/tools/include/ https://github.com/torvalds/linux/blob/master/tools/include/... Cool, thanks for sharing! > I really want to get into this. Hope to see more links on that topic popping up on HN. Are you aware, beyond "raw" OpenGL, of any GUI/TUI frameworks for Go/Rust that would work this way?
- matheusmoreira 5y ago> Are you aware, beyond "raw" OpenGL, of any GUI/TUI frameworks for Go/Rust that would work this way? I'd like to know as well. My most recent discovery was RetroArch, a really good frontend for many emulators. It's not freestanding but it does support OpenGL graphics with Linux kernel mode setting and generic buffer management. https://www.retroarch.net/2020/01/linux-kms-mode.html https://www.retroarch.net/2020/01/linux-kms-mode.html
- 5e92cb50239222b 5y ago>But do you run a lot of software that works without glibc and other userland utilities More and more as time goes on. Most applications written in Go do not require libc. Some of my servers have nothing on them but a few Go applications, like influxdb + prometheus + grafana. Theoretically you can strip out everything but the kernel (and replace systemd with something extremely lightweight, maybe also written in Go), but mainstream distributions don't make this easy, and what's the point anyway.
- geofft 5y agoFROM alpine:latest