Post B39dwU6AcK4aFICiMS by jeffcliff@shitposter.world
(DIR) More posts by jeffcliff@shitposter.world
(DIR) Post #B3271V3ro8Ue5OBuRE by mjg59@nondeterministic.computer
2026-02-06T03:34:17Z
3 likes, 2 repeats
https://faultlore.com/blah/c-isnt-a-language/ deserves a fucking record for managing to trigger people into being extremely upset while also demonstrating that they don't understand the actual point being made
(DIR) Post #B3271VlTC1N6GcajOy by mjg59@nondeterministic.computer
2026-02-06T03:45:26Z
5 likes, 9 repeats
It doesn't matter whether C is good or not. It matters that if I write code in two languages that aren't C, and I want it to all be part of the same process, I need to care about C. C pervades all. You cannot escape it. C will outlive all of us. The language will die and the ABI will persist. The far future will involve students learning about C just to explain their present day. Our robot overlords will use null terminated strings. C will outlive fungi.
(DIR) Post #B3271havD442xNkTcu by mjg59@nondeterministic.computer
2026-02-06T03:56:51Z
2 likes, 0 repeats
"But C++ libraries" motherfucker I did not live through the C++ ABI wars of the 2000s to have people tell me with a straight face that C++ will be interoperable 1500 years from now, but I would wager a lot of money that whatever software they're building then will be able to call into libglib.so
(DIR) Post #B32h3tYxHOeR0MApxQ by futurebird@sauropods.win
2026-02-06T11:01:12Z
0 likes, 0 repeats
@mjg59 This article is a little advanced for me, is the point that not enough languages have written their own methods to interface with assembly?I know very little about what goes on outside of the IDE. Just some vague notion that "the compiler makes this into assembly" But is it more like the compiler makes it into C and then C makes it into assembly?
(DIR) Post #B32hKXovN2caUjaA7s by RogerBW@discordian.social
2026-02-06T11:04:07Z
0 likes, 0 repeats
@futurebird @mjg59 Matthew knows _much_ more about this stuff than I do, but to the first part, there are lots of useful libraries in C, so if you have a new language that needs to do stuff it's a lot easier to build an interface with them than to write them yourself. Now lots of languages can use C libraries, so if you're writing a library you want to be widely usable, you make it compatible with C. It's not a _good_ protocol but it's the one we've got.
(DIR) Post #B32hiKA9nhQl5Qqvrc by amenonsen@mastodon.social
2026-02-06T11:08:30Z
0 likes, 0 repeats
@futurebird Rather, that *all* languages are exposed to *all* of the quirks of the C ABI if they want to use system calls or interoperate with existing libraries (themselves perhaps written in different languages and compiled with different tools). You can try to start off small, but you rapidly find more and more cases you can't deal with simply.
(DIR) Post #B32hp6VywSRemkIIC0 by futurebird@sauropods.win
2026-02-06T11:09:46Z
0 likes, 0 repeats
@RogerBW @mjg59 So this is also about libraries. That makes sense. My CS club students have been discovering the intricacies of working with a server and wanting to do "simple" things like save text to a file. They made this fun version of the game wordle and wanted to make it so it would post a list of high scores. They made it in javascript and it runs client side. They didn't know what "client side" and "server side" were but now they do.
(DIR) Post #B32huIdZIZq9pWJtiq by futurebird@sauropods.win
2026-02-06T11:10:41Z
0 likes, 1 repeats
@RogerBW @mjg59 Often, as a teacher I hide this ugliness from students but it's huge as soon as you want to do anything. "Why can't it just make the text file like I told it to?""What if someone made a text file called stealEverything.php?""OOOOOH!"
(DIR) Post #B38Xhih7H2nqHs6NTE by jannem@fosstodon.org
2026-02-06T04:02:14Z
0 likes, 0 repeats
@mjg59 Any examples around of good, language-interoperable ABIs around? Or has C sucked all the oxygen out of that room?
(DIR) Post #B38XhjbpsAAn7mdfsW by pernia@cum.salon
2026-02-09T06:44:39.361212Z
1 likes, 1 repeats
@jannem @mjg59 libffi.c
(DIR) Post #B38Xl3PYhokpPMTmLI by gnomon@mastodon.social
2026-02-06T04:51:15Z
2 likes, 0 repeats
@mjg59 C: "you cannot kill me in a way that matters"
(DIR) Post #B38Xu1ONa8AzkiCghE by dazo@infosec.exchange
2026-02-06T08:24:39Z
2 likes, 0 repeats
@mjg59 @iris_meredith @gabriel If you write all the needed functions the libc library provides into a language specific system library, you can escape a lot of C APIs, until you need to communicate with kernel ABIs. Then you're back at wrapping the language native APIs into a C ABI to be able to the syscalls.And what will make it even more fun ... You'll need to do that for each single OS platform you want to support, to have something being portable.This kind of stunts is something you only can afford to do on specialised embedded single purpose systems where you need to have as little code running as possible, to be able to fully audit all possible call chains - like in criticial secure systems for aviation or nuclear power plant systems and such like. It won't ever happen on general purpose systems at all.We're basically stuck with C ABIs until the day someone is successful replacing it something new and better AND provide all the applications people need and want to use at the same time. It will be a revolutionary paradigm shift if someone is capable of pulling that one off. And I'm not holding my breath.
(DIR) Post #B38YPrNEMkApwmqdxw by churkia@cum.salon
2026-02-09T06:52:37.944871Z
2 likes, 1 repeats
@pernia @jannem @mjg59 ha
(DIR) Post #B38dVzKQCdu67uH9kW by nimt@cum.estate
2026-02-09T07:49:47.835029Z
2 likes, 0 repeats
@mjg59 everything he says can be immediately invalidated without opening the page by just having this image staring at you from xitter card link preview
(DIR) Post #B38dyoe30EPHOGCYwC by nimt@cum.estate
2026-02-09T07:55:00.260603Z
0 likes, 0 repeats
@mjg59 second life swinger party looking ass nigga avatar
(DIR) Post #B39cmKh0dJAUDx1xdQ by glyph@mastodon.social
2026-02-06T03:41:24Z
1 likes, 0 repeats
@mjg59 I had to stop reading halfway through as it gradually dawned on me that this was giving me a slow-burn panic attack. 176 triples. aaaaaaaaaaaaaa
(DIR) Post #B39cmPeMCb19bApPhA by glyph@mastodon.social
2026-02-06T03:42:01Z
0 likes, 0 repeats
@mjg59 like I already kinda knew this was true but it's another thing to look _directly_ into the beam, you know?
(DIR) Post #B39d2h5X8PHoJeIrdg by jeffcliff@shitposter.world
2026-02-09T19:19:13.660897Z
0 likes, 1 repeats
@mjg59 @risperdoll
(DIR) Post #B39duv1BYlRx9k7rcm by jeffcliff@shitposter.world
2026-02-09T19:29:01.752244Z
0 likes, 1 repeats
> How do you interoperate with that mess?what do you think, @Suiseiseki
(DIR) Post #B39dwU6AcK4aFICiMS by jeffcliff@shitposter.world
2026-02-09T19:29:18.654124Z
0 likes, 1 repeats
"interoperate with current development version of gcc, everything else best effort"
(DIR) Post #B39ePcJl8a2K8QS4HI by jeffcliff@shitposter.world
2026-02-09T19:34:34.556197Z
0 likes, 1 repeats
x86_64-unknown-linux-Mozilla-5.0-Macintosh-Intel-Mac-OS-X-10_15_7-AppleWebKit-605.1.15-KHTML-likeGecko-Version-17.10-Safari-605.1.1-gnu-rust-actuallystilljustC
(DIR) Post #B39fCEWkNXI8XVhzyC by iris_meredith@mastodon.social
2026-02-06T03:53:08Z
0 likes, 0 repeats
@mjg59 Not if I write my libraries in Fortran
(DIR) Post #B39fCFbONkbLsCtDqi by mjg59@nondeterministic.computer
2026-02-06T03:54:08Z
1 likes, 0 repeats
@iris_meredith Well sure but if you want anyone else to call them you're smashing on a shim to translate C strings because how else do I call you from Go
(DIR) Post #B39fFd1Vl6g7NjiX4q by jwz@mastodon.social
2026-02-06T03:54:34Z
1 likes, 0 repeats
@mjg59 Dooming us all to inhuman toil for The One whose name cannot be expressed in signed char.
(DIR) Post #B39fGk6AwGPLcBQjQW by th@social.v.st
2026-02-06T08:00:00Z
1 likes, 0 repeats
@jwz @mjg59 the elder Fortran gods patiently dream of their time to return
(DIR) Post #B39fHq7y0cFGbQn7ey by albertcardona@mathstodon.xyz
2026-02-06T12:21:45Z
1 likes, 0 repeats
@th @jwz @mjg59 How I imagine the Fortran gods in their slumber:https://www.scientificamerican.com/article/how-do-whales-and-dolphin/
(DIR) Post #B39fHxRMosvHHcvDN2 by albertcardona@mathstodon.xyz
2026-02-06T13:28:12Z
0 likes, 0 repeats
@th @jwz @mjg59 Someone had captioned the image of the vertically sleeping sperm whales with "aliens retreat quietly in awe and careful not to awaken the bestial beings from their slumber" or some such. Wish I could find it.
(DIR) Post #B39fP6dP2ClzpExa8O by bbelton@pkm.social
2026-02-06T05:10:21Z
1 likes, 0 repeats
@mjg59 @float13 Just reading Elizabeth Bear’s Dust trilogy and realizing that there may be C necromancers on doomed starships.
(DIR) Post #B39fQuq1rdQBopjFMe by acsawdey@fosstodon.org
2026-02-06T06:14:04Z
1 likes, 0 repeats
@mjg59 You could argue that with a sufficient supply of graduate students you could build a complete software system with ABIs divorced from C. You’d kind of have to build a new processor too though because all the modern instruction sets have been co-evolved along with C/C++ compilers for the last 30+ years.
(DIR) Post #B39fS5nkaXyS6uDxRo by froge@social.glitched.systems
2026-02-06T06:18:30.057Z
1 likes, 0 repeats
@mjg59@nondeterministic.computer me watching two Rust libraries interact over the simulated C FFI calling convention because that's the only way they were exported even though they're both actually Rust codethis is a real thing happening in several major production projects in several different ways and some people just aren't ready to accept that lol
(DIR) Post #B39fTPAw2feGUGh7Ka by lispi314@udongein.xyz
2026-02-06T07:06:23.086280Z
1 likes, 0 repeats
@froge @mjg59 Rust really should have a standard ABI.
(DIR) Post #B39fTiZjufmMehRh8C by froge@social.glitched.systems
2026-02-06T07:10:22.808Z
1 likes, 0 repeats
@lispi314@udongein.xyz @mjg59@nondeterministic.computer most things should, but even then, people won't use it because C is the standard ABI lol
(DIR) Post #B39fUtxL5N22F234YC by resipiscent@sfba.social
2026-02-06T07:18:47Z
1 likes, 0 repeats
@mjg59 meh, that's what they said, and with far better grounds, about Latin.
(DIR) Post #B39fW49YetaS9mJqam by mjg59@nondeterministic.computer
2026-02-06T07:24:24Z
0 likes, 0 repeats
@resipiscent Which does remain as the international interoperable standard for describing what kind of organism you're talking about
(DIR) Post #B39fW5UVgTwOJ385tA by resipiscent@sfba.social
2026-02-06T07:32:50Z
1 likes, 0 repeats
@mjg59 you're confusing Linnaeas's corruption of Latin centuries after Latin became French. No one who spoke or wrote Latin functionally would makes heads or tails of Linnaeus, he appropriated pseudo Greek and Latin morphology specifically because they were dead and thus unchanging.
(DIR) Post #B39fX2XO9QIfR3vj4C by jamesh@aus.social
2026-02-06T07:25:09Z
1 likes, 0 repeats
@mjg59 It's kind of amusing thinking back to 16-bit Windows where pretty much all of the ABI used Pascal calling conventions.I guess it wasn't always destined to end up like this.
(DIR) Post #B39fXa4rRzgPSQqQK0 by mjg59@nondeterministic.computer
2026-02-06T07:59:24Z
1 likes, 0 repeats
@jamesh Chunks of AmigaOS used BCPL calling convention because AmigaDOS was based on TRIPOS which was a Martin Richards production so obviously he wrote it in his language (TRIPOS being a Cambridge University reference because obviously)
(DIR) Post #B39fYXoHMm4OiNY1o0 by jamesh@aus.social
2026-02-06T08:07:51Z
1 likes, 0 repeats
@mjg59 Looking at this Raymond Chen blog post, it seems the choice was to reduce code size rather than because they saw Pascal as being more interoperable: https://devblogs.microsoft.com/oldnewthing/20040102-00/?p=41213It also seems they didn't use Pascal calling conventions for all of the win16 ABI: just most of it.
(DIR) Post #B39fZn1kH5asCRRMzA by poundquerydotinfo@forum.virctuary.com
2026-02-06T15:38:47Z
1 likes, 0 repeats
@mjg59 @jamesh I recall VMS having an "official" API for libraries of different languages to be used, I don't remember if it was based on any language in particular, but it was relatively easy to call in FORTRAN and much harder in C funnily enough.And, of course, MacOS (the original) was all Pascal.I guess we have Unix to blame for it ending up being C. Not just because C exists because of Unix, but because it was all considered "good enough" at the time, and for some reason everyone went "Unix is the perfect operating system" in the late 1970s and most of the 1980s and decided to copy everything it did, including its mistakes.Give me my Amiga back damn it! But with... capability addressing or something?
(DIR) Post #B39fmNYKId7MxMgP3o by Khrys@mamot.fr
2026-02-06T08:12:27Z
0 likes, 0 repeats
@mjg59 I wouldn't be so affirmative about the fungi part 🤪
(DIR) Post #B39fmOGzcYqZBta4gK by jeffcliff@shitposter.world
2026-02-09T19:49:51.627069Z
0 likes, 1 repeats
@Khrys @mjg59 somewhere, someplace, a grad student just started working ona fungus-to-C-FFI API https://www.theguardian.com/science/2022/apr/06/fungi-electrical-impulses-human-language-study
(DIR) Post #B39fqrSb2tiWs68kj2 by twinkle@sweet.succubi.services
2026-02-06T08:14:01.625344Z
0 likes, 0 repeats
@mjg59 my deerwife studies compsci in bristol university and when i visited her i went to uni with her for fun. there was a security class that was talking about Return-to-libc attacks that she attends, i’m not someone who’s familiar with things that low level but i know enough C to know what they’re talking about. the entire class that day was basically just going over how it works and the lecturer smugly going “but now you might ask: why the fuck is it like this? that’s so fucking stupid! and i will tell you it’s because of C.”
(DIR) Post #B39fqsdcfO8CWaJ4YC by mjg59@nondeterministic.computer
2026-02-06T08:15:29Z
1 likes, 0 repeats
@twinkle The absolute worst part of teaching operating security is having to explain why things are the way they are and seeing people's hope for the future leave their bodies
(DIR) Post #B39frYITmOArjAjmQS by siim@social.osur.ee
2026-02-06T08:28:35Z
1 likes, 0 repeats
@mjg59 C is the first great machine language abstraction to exist. This property is what makes it immortal. You are talking binary through C with your machine in the most efficient way possible. It is an awesome tool. The other fluff may as well not exist but does because for some people, managing memory was too much or unnecessary, which in itself is understandable.
(DIR) Post #B39fs6OL173xTBjwHI by mjg59@nondeterministic.computer
2026-02-06T08:29:19Z
1 likes, 0 repeats
@siim This has nothing whatsoever to do with anything I'm talking about
(DIR) Post #B39fsJMgmYT5hq4J0q by mjg59@nondeterministic.computer
2026-02-06T08:31:07Z
1 likes, 0 repeats
@siim and also it's just fucking wrong? C is an abstraction layer, it is definitionally not the most efficient way to talk to a machine. Even ignoring whether a compiler can optimise as well as a human, in some cases C's assumptions are not well aligned with how hardware behaves
(DIR) Post #B39fsnITUmvGXSKMbo by JeffGrigg@mastodon.social
2026-02-07T01:27:24Z
1 likes, 0 repeats
@mjg59 @siim … except to the extent that the "popularity" of C has forced (inspired? motivated?) hardware (CPU) makers to design the hardware to work well with C's assumptions and limitations. 🙄
(DIR) Post #B39fsqqGJcjRX79tBo by crp@fosstodon.org
2026-02-06T09:14:51Z
1 likes, 0 repeats
@mjg59 😅😅😅
(DIR) Post #B39fthiHk0qJViplc8 by noplasticshower@infosec.exchange
2026-02-06T14:47:18Z
1 likes, 0 repeats
@mjg59 oh yeah? Here is one of my slides from 2001-2. I once presented this slide in a talk with Dennis Richie in the room.
(DIR) Post #B39g3NwC7aTj4bxLay by eljorgeabides@mastodon.world
2026-02-06T03:51:20Z
1 likes, 0 repeats
@mjg59 I was just having this conversation about Cobol
(DIR) Post #B39g3oIm6FzOqAikOu by mcc@mastodon.social
2026-02-06T04:13:12Z
1 likes, 0 repeats
@mjg59 Reading this and thinking about LuaJIT-FFI's approach, which is that instead of parsing C header files it defines a easily-parseable subset of C and parses that. You wind up editing your header files into long strings and passing them into Lua.Maybe this "parseable header C" should be a cross-language standard.
(DIR) Post #B39g7vVLGKYgKzYstM by jenesuispasgoth@pouet.chapril.org
2026-02-06T08:15:40Z
1 likes, 0 repeats
@mjg59 yes, I really liked that post. A long time ago I had to optimize code for a Fortran-wrtitten program. I wrote my portion in C, because in some cases (use of intrinsics without having to write asm) it made things easier (and it was impossible in Fortran directly). Everything used the C ABI anyway.