med-mastodon.com is one of the many independent Mastodon servers you can use to participate in the fediverse.
Medical community on Mastodon

Administered by:

Server stats:

345
active users

#libc

0 posts0 participants0 posts today

folks who do smart things with multiprocessing models like Go and Chromium usually don't want C libraries potentially stepping on their toes. Oh gosh threads. The day I figure out how to do those, will be day the whole world will want to use this thing. But I want people who use Cosmopolitan #Libc to know what value it's providing them. I think the best way to do that is by raising awareness of the systems engineering fundamentals like this. Because that's something you're right to point out that the #Linux community leadership has room for improvement on.
news.ycombinator.com/item?id=2

news.ycombinator.comWe're pretty much on the same page. I'm not sure if I share your enthusiasm for ... | Hacker News
Replied in thread

@MichaelRoss something I have been trying to look for is a #Linux #ls that isn't depending on #glibc or another #libc implementation, the reason is there was some malware that attached itself to glibc and prevented you to see the directories and files it used and also the process directory in /proc
Had you a ls that wasn't built with glibc, then all the files and directories would be listed.

To enable fast system calls in dynamically linked binaries, we load at runtime a C library that is "unikernel-aware" and employs function calls into the kernel for system calls invocations. This C library is a special version of Musl #libc that can be created fully automatically from vanilla Musl. This is done with the Coccinelle code transformation tool. To build it and test it out, use the following steps.
github.com/ssrg-vt/hermitux/wi

GitHubFast system calls in dynamically linked programsA binary-compatible unikernel. Contribute to ssrg-vt/hermitux development by creating an account on GitHub.

system call interface is designed to be compatible with the C calling convention, which is also the most common calling convention used globally. By adhering to the C calling convention, developers can not only perform system calls in different programming languages, they can also call procedures written in another language, because most languages use C calling convention for their FFI feature. The latter case is even more common, as most languages won’t interact with the system call interface directly in binary level, but by calling a C-based system call wrapper defined in the #libc
this ABI is painfully difficult to disentangle from the programming language C. In order to make a C call, you don’t just need to know what registers to pass arguments in and what size an int is, you need to know things like struct layout and what it means to spill a struct onto the stack. You also need some way to take the interface specifications provided by operating systems and turn them into a format your compiler can work with, and wouldn’t you know it, those interface specifications are provided in the form of… C header files.
langdev.stackexchange.com/ques

Programming Language Design and Implementation Stack ExchangeWhy do common Rust packages depend on C code?Chapter 1 of "The Rust Programming Language" (Klabnik and Nichols) says: [S]ome common Rust packages depend on C code and will need a C compiler. Why do Rust packages have any dependenc...

Exciting easy win I'd been meaning to do for a long time for broadening the scope of libc-test: 45 LoC (including include directives) to dive into a user+mount+net namespace where resolv.conf points to localhost and you have your own localhost you can bind to port 53 on (so resolver can be tested or even fuzzed). Non #musl specific; like all of libc-test, should work for any #libc.

I've got an odd #posix #libc issue I could use help digging into.

I'm using `posix_spawnp`, and getting an errno of ECHILD. According to man7 and two other sources, `posix_spawnp` should only error as `clone`, `fork`, or `vfork` might, and none of them list ECHILD as a possible errno.

I'm using the Rust libc crate directly, fwiw, which is unabstracted bindings to libc. This error message compares directly against `libc::ECHILD`.

Thoughts?

Cross-platform native C executables? Sweet.

"Cosmopolitan Libc makes C a build-once run-anywhere language, like Java, except it doesn't need an interpreter or virtual machine. Instead, it reconfigures stock GCC and Clang to output a POSIX-approved polyglot format that runs natively on Linux + Mac + Windows + FreeBSD + OpenBSD + NetBSD + BIOS with the best possible performance and the tiniest footprint imaginable."

github.com/jart/cosmopolitan

GitHubGitHub - jart/cosmopolitan: build-once run-anywhere c librarybuild-once run-anywhere c library. Contribute to jart/cosmopolitan development by creating an account on GitHub.
#c#gcc#clang

LLMs as local offline tools like grep? llamafile combines model + binaries into one single file and it is easy to run as part of your bash script as grep or sed is. github.com/mozilla-Ocho/llamaf

Interesting thing is that the same binary runs natively on Linux + Mac + Windows + FreeBSD + OpenBSD + NetBSD + BIOS on AMD64 and ARM64 with the best possible performance. Because of this project: justine.lol/cosmopolitan/index

GitHubGitHub - Mozilla-Ocho/llamafile: Distribute and run LLMs with a single file.Distribute and run LLMs with a single file. Contribute to Mozilla-Ocho/llamafile development by creating an account on GitHub.
#llm#llama#llava
Replied in thread

@lunaa @yura @torvalds I know...

There's a reason Distros like #AlpineLinux, #ChimeraLinux and almost all #embedded systems using #Busybox or #Toybox want to get rid of #glibc if not replace it with something like #uClinux, #musl,or another #libc...

Because glibc bricking stuff with minor updates kills any #CCSS and any non-#FLOSS that can't be recompiled.

And what RMS et. al. may see as intentional, I think is the biggest issie that prevents #Linux from dominating #Desktop|s!