I wrote this post: the title should be "Patching GCC to build Actually Portable Executables", because it refers to Cosmopolitan Libc and jart's Actually Portable Executable format.
With my gcc patch, you can now build software like vim, emacs, ninja, bash, git, gcc etc with Cosmopolitan Libc, via their usual autotools/cmake-style build system. The built executables should run on Linux, FreeBSD, MacOS, OpenBSD, NetBSD, and also Windows (although I haven't tested Windows yet.)
Will this patch of yours make it into GCC upstream? APE executables and cosmopolitan libc are incredibly cool tech, and it'd be great if they were easier to use.
Reading the GCC source code was fun and educational, and I'd love to find out if this could patch make it into GCC. Haven't discussed it with any of the GCC developers yet.
In the meantime, the Cosmopolitan Libc monorepo contains binaries of gcc-11 and binutils that have been built with my patch, you can use those for now :)
I haven't used Nim much, but I remember a repo on Github had setup a build script for compiling Nim with Cosmopolitan Libc. https://github.com/Yardanico/cosmonim
This gcc patch makes such build scripts simpler, because you will need to change less of your code -- let me know how it works!
Yes, I have gotten busybox to build successfully, but at present it's not as nice as bash or vim. I expect someone will write a better build script soon enough. Maybe it will be you!
The default build parameters in busybox make a lot of OS-related assumptions, so I'd recommend you use make menuconfig instead of make depconfig. in the TUI, you can disable all console and networking utilities, linux modprobe utilities, some linux system utilities, free, uptime, etc. Start with a minimal config and then slowly add things.
In terms of source code changes: modify `u_signal_names.c` to use a switch statement instead of the amazing "use SIGHUP as an array index" method it follows, use int32_t instead of the "smallint" type that busybox seems to prefer, and IIRC there's an enum in there somewhere that should be rewritten as a #define.
That should get you pretty close to a successful build.
I'm the Lobsters admin and I enforced this ban. You misread the modlog, only jart's invitee i2 was sockpuppeting. As jart is here claiming that this is all mistaken sockpuppeting, let me explain what happened.
Lobsters has had serious problems with users who try to exploit the site for self-promotion, and it's more serious for us than HN when a few votes is enough to move something to our homepage. As part of addressing it, we have a bright-line rule prohibiting new users from submitting stories from new, unseen domains in their first 70 days on the site.
Five hours after jart invited woodrush, at 2022-01-12 02:26, they tried to violate the rule and got this error message:
> woodrush.github.io is an unseen domain from a new user. We restrict this to discourage self-promotion and give you time to learn about topicality. Skirting this with a URL shortener or tweet or something will probably earn a ban.
At 2022-01-12 02:40, jart submitted the exact same link to break the restriction, and woodrush submitted several posts from that domain. After that, jart started submitting stories from all of her invitees to circumvent this rule, which anyone can verify by comparing timestamps on her submitted stories at https://lobste.rs/newest/jart to creation dates for her invitees at https://lobste.rs/u#jart.
On top of repeatedly breaking a rule that has a big red background and explicitly warns of a ban, two of jart's invitees were manually warned and banned for other inappropriate self-promotion. Finally, when another of her invitees started obvious sockpuppeting, I looked at the invite tree, saw this pattern of abuse, and cleaned up after it.
To rebut another claim repeated a couple times elsewhere in the comment tree, all banned users get an email notifying them of a ban with the Reply-To header set to my email: https://github.com/lobsters/lobsters/blob/master/app/mailers... None of the users banned in this action have clicked reply to explain how I've made a mistake enforcing an unambiguous rule of ours.
jart is a sociopathic manipulator and abuser. They recently stole code for llama.cpp and claimed it was their's, were unapologetic when caught, and tried to gaslight the llama.cpp creator into feeling guilty and reinstating their access. Prior to that they were trying to install themselves as an important and powerful member of that community. https://news.ycombinator.com/context?id=36245385 and https://news.ycombinator.com/threads?id=IAmNotACellist#36251...
I took a peek at the moderation log and the banning of jart and their descendants was a real shitshow[1]. I’m sure a lot of legit folks lost their accounts, and most of the descendants weren’t even posting anything related to APE or jart’s other projects.
It's because I'm an insomniac. When normies are sleeping, I'm running around setting up franchises. One of my other sock puppet accounts that got banned by Lobsters is Paul Kulchenko, who isn't actually the genius who built ZeroBrane Studio https://studio.zerobrane.com/, but is just me pretending to be a Windows developer when I can't fall asleep. Lobsters also banned Hikaru Ikuta (woodrush), who isn't actually a PhD at the University of Tokyo who discovered the lambda calculus expression for LISP https://woodrush.github.io/blog/lambdalisp.html, he's clearly just another one of my sockpuppet accounts I created due to being an insomniac. Those are the sorts of stories we've been sharing with the Lobsters community, and we'd been received very positively until now. I'm disheartened by how the recent unexpected actions of this rogue moderator will impact the wonderful community that had been nothing but kind to us.
This is a terrible misrepresentation of the mod logs. Your comment seems to be creating a strawman. All the accounts you wrote in your comment were not banned for being sockpuppets. They were banned for spamming (whatever that means). Totally different things.
Nobody said they were sockpuppets. Only you are saying that in an attempt to create a strawman and mislead unsuspecting readers. We are not idiots.
The two accounts that were banned for sock-puppeteering were 'i2' and 'thatworkshop'. And you have conveniently omitted these two accounts from your comment. What do you have to say about them? You invited them. And they were sock-puppetting? How do you explain that?
i2 got banned from my community a long time ago so it doesn't surprise me that Lobsters would ban him too. I usually err on the side of trusting people, and sometimes that turns out to be a mistake. I take appropriate action when I need to. If anything I'm surprised it took Lobsters this long. Lobsters gave me no ability to rescind invites, so they shouldn't have held me and my friends responsible for what he did. Frankly I don't even know what that is. Lobsters also made no attempt to contact me or offer feedback. The mass ban came as a total surprise. I have no idea what I did and I wasn't granted any opportunity to make them happy.
I'm no fan of Lobsters. So I've no skin in the game. But it is one thing to say that those people you wrote about in your comment were banned for spamming and it is a totally different thing to say that they were banned for sockpuppetting (when they were not). The former is correct representation of what's there in the mod logs. The latter is a blatant misrepresentation of the mod logs. This misrepresentation is misleading to unsuspecting readers.
After seeing such wilful blatant misrepresentation, forgive me if I'm having difficulty just taking your word for it.
I’m left speechless after reading the first article, as well as seeing the misrepresentation of the comment thread (she was replying to me, not blueflow…)
I must say, I respect her a good deal less than I used to.
> But it is one thing to say that those people you wrote about in your comment were banned for spamming and it is a totally different thing to say that they were banned for sockpuppetting (when they were not).
How can I be legitimately banned for spamming when I made zero comments or posts? I rarely post or comment, so did not get a chance, but I was glad to join the community.
I don't know the specifics but looks very much like collateral damage. Sorry if that's the case. Looks like her whole invite tree became suspect and the mod removed her whole invite tree. Not justifying what they did but seems like a mistake. Talking to the mod should resolve it.
This is not the case. (For context, I am the admin responsible for the bans.) I left a longer comment in response to the original misunderstanding to explain what happened here.
Sockpuppets or voting rings may not be posting related posts/comments at the moment but they could in future. And they could be silently +1-ing each other's posts/comments which you can't see but mods can.
I've done moderating work when phpbb forums had their heydey. The clever sockpuppet accounts or voting rings don't start posting about the projects of their main account right from the first day. The clever ones remain dormant, mostly idle, participating in other discussions. They look just like normal accounts.
But much much later when the main account posts a "show project" post, the sockpuppets or voting rings add +1 or post a few words of praise and then move on to commenting on +1-ing other posts.
And voting rings become more difficult to detect when they don't post anything related, post unrelated stuff but quietly upvote the main account's posts/comments.
Only 2 of all the banned accounts have been flagged as sock-puppeteers. You can't see the sockpuppetery anymore because the mod deletes their posts/comments. But the evidence is still there as negative points. Those profiles have negative points. So they must have posted something sometime, got downvoted, got flagged by users and got detected as sockpuppets.
Sock puppet is only one possibility. Other possibility is legit accounts forming a voting ring. You and me cant see voting actions. Mods can.
The mods have access to server access logs. Mods can see who +1-ed whose posts/comments. So if you need evidence for sock-puppetry or voting-ringery, try asking the mods about it. We can only speculate here. I'm only describing what I've found in the wild from my days of moderating (small) forums.
I mean to say that only because you can't see the other accounts posting related posts/comments does not make them any more likely or any less likely to be sockpuppet or voting ring. They may be legit. But they could be a ring. Or they may be legit. Only the mods with the access logs can tell.
Yeah I found out I got banned when attempting to comment about this blog post. I rarely comment on online forums anyway, because I find I don't know enough to comment about most topics.
IIRC over the last year, I've only commented once on lobste.rs, when it came to something about Python's import system, and only upvoted my own blog posts about Cosmopolitan Libc and related comments + maybe one or two other posts. I disagree with the ban, but I can see why my account would get banned as a spammer (one of the accounts banned alongside mine had a double account I think).
lobste.rs is a wonderful community, and I'm happy to see that someone there atleast mentioned this blog post. Hopefully I can get un-banned at some point.
Right now I use the gcc, git, vim, and ninja APE binaries on my local system for daily work, and so far I have seen no visible regressions.
I agree with you though -- an extensive testing setup will reveal more things for improvement, be it in my patch or in the libc itself. At the moment I only have direct access to Debian 11/Fedora 35/FreeBSD 13, but I expect we will soon find a nice way to run tests across the different operating systems automatically. One of my ideas was to setup a separate drive or folder with all the executables, accessible from different operating systems/VMs, and then run the tests from each. What do you think?
Might need to update the build scripts a little to handle the latest updates in Rust and Cosmo (we'll need gcc-11 now), but I expect to get Rust working again soon enough.
With my gcc patch, you can now build software like vim, emacs, ninja, bash, git, gcc etc with Cosmopolitan Libc, via their usual autotools/cmake-style build system. The built executables should run on Linux, FreeBSD, MacOS, OpenBSD, NetBSD, and also Windows (although I haven't tested Windows yet.)
Here's a list of software I got to build with this technique: https://github.com/ahgamut/superconfigure
The superconfigure script is just a wrapper around the usual configure script used to build your software, supplying flags like --enable-static.
If you want to build gcc using Cosmopolitan Libc -- try out this repo: https://github.com/ahgamut/musl-cross-make/tree/gccbuild