this post was submitted on 13 May 2024
36 points (92.9% liked)

Programming

17366 readers
513 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS
 

Video is nearly 3 years old now, but I think it's worth watching. Her presentation starts at around 2:30.

Basically, she explains how Redbean, a tiny (~450kb) and very fast C http server, works and how the same executable can be used to deploy it on most operating systems (she starts explaining that around 14:30)

Justine is also the mind behind Sector LISP, Lambda Calculus in 383 bytes, considerable optimizations to LLamaAI, plus several other things.

top 20 comments
sorted by: hot top controversial new old
[–] sxan@midwest.social 11 points 6 months ago* (last edited 6 months ago) (2 children)

What she's accomplished is, to me, astonishing and an impressive intellectual feat. I believe there's a pretty big caveat that it only works on x86_64, i.e. not ARM. The latter being fairly popular and not uncommon.

It wouldn't damage the impressiveness of her achievement to say "most OSes on x86."

[–] maegul@lemmy.ml 4 points 6 months ago

Yea, I forget where, but she's openly lamented the rise of ARM for this reason. Not because it's a small blemish on redbean and cosmopolitan libc (what redbean uses to be "universal") ... but, IIRC, x86 had gained such ubiquity that simply sticking with it for the sake of interoperability and backwards compatibility was/is probably worth it. However accurate that is, or viable in today's tech world, I certainly resonate with the sentiment. And given what her and cosmopolitan libc seem to have accomplished (I've never used these things), it certainly seems like one of nice things we could have if we just did things in a nicer way.

[–] FooBarrington@lemmy.world 2 points 5 months ago (1 children)

No, it also works for ARM - you can even build a fat binary with an ARM -> x86 translation layer, i.e. one binary for both architectures!

[–] sxan@midwest.social 3 points 5 months ago (1 children)

Huh. In was just playing around with some samples from her page, and can't get them to run on either AMD64 or ARM. What's worst is that on my AMD machine I have Wine installed, and trying to run it fires up Wine (where it does eventually execute). You're supposed to also be able to sh it, and if I do that they just fail. On an ARM, they just fail. I was unable to get any of the samples from he page to run.

I haven't tried compiling my own program, but if the download samples don't run (for me), it doesn't give me confidence in the solution.

[–] FooBarrington@lemmy.world 1 points 5 months ago (1 children)

I just tried the current redbean build on Linux AMD64, and everything worked as expected (both launching directly, and through sh). Which examples did you specifically try? Which sh version do you use (I have 5.2.26(1)-release (x86_64-redhat-linux-gnu))?

The cosmopolitan README has a section on the WINE thing, if you want to try and get it running.

[–] sxan@midwest.social 1 points 5 months ago (1 children)

I tried all of the examples from her page about αcτµαlly pδrταblε εxεcµταblε. It looks like the page was written in 2020, so I'm assuming the binaries were compiled then, but that shouldn't matter; I have Go binaries I built in 2021 that still run, and I have no doubt that it I could find an even older binary, they'd run too.

[–] FooBarrington@lemmy.world 2 points 5 months ago (1 children)

Those were their first tests, of course there is a high chance they won't run on all system configurations (especially since things like WINE comparability were likely detailed later). You should try artifacts built with the current version of the format (3 IIRC) if you want to give it a fair shot.

[–] sxan@midwest.social 1 points 5 months ago

Good to know, thanks.

[–] Vincent@feddit.nl 2 points 5 months ago

llamafile also builds on that work, I believe (she's the main contributor): https://github.com/Mozilla-Ocho/llamafile

[–] Corbin@programming.dev 1 points 5 months ago (1 children)

By "several other things" I presume you mean the cryptofascism.

[–] suy@programming.dev 6 points 5 months ago (1 children)
[–] Corbin@programming.dev 1 points 5 months ago (2 children)

She's a well-known well-documented part of the Silicon Valley cryptofascist movement. Her project names, like "cosmopolitan" and "ape", are dog whistles.

[–] maegul@lemmy.ml 4 points 5 months ago (1 children)

yea, from what I've seen of her, you could say she's part of or used to be part of a sort edge-lord techno anarchism that involves a good amount of "fuck you" trolling and embrace of the chronically online/urban life style. The "fascism" part here seems to come out of nowhere. The twitter post from Justine that that whole blog post hangs off of doesn't exist anymore (and she's active on twitter). In the end though, if she's a bit nutty on how much better tech governance would be than ordinary government, I don't resent her for that. And the sorts of things she's building technologically certainly align with my interests.

What would "cosmopolitan" and "ape" be dog whistles for? Racism?

[–] Corbin@programming.dev 3 points 5 months ago (1 children)

You'll have to trust me from when I worked at Google at the same time as her. In particular, you'll have to trust me that she called via public petition for an end to democracy and for Eric Schmidt to be installed as CEO of the USA and granted dictatorial powers; this is a flavor of fascism known as corporatism or corporate fascism. (Alternatively, you might trust the Internet Archive's copy of the Guardian's story from that time. The original petition isn't up anymore.)

dog whistles"Cosmopolitan" is a reference to a common component of anti-Jewish conspiracy theories and means the same thing as "globalist". "Ape" is one of many common slurs for African-Americans and Africans. "Llamaphile" is part of a common "-phile" pattern of anti-furry slurs.

[–] maegul@lemmy.ml 3 points 5 months ago

Hmmm yea. Put together, cosmopolitan and “ape” do point in a single direction. I still wouldn’t be surprised if it were trolling. But yea, interesting. Being hyped on SV as a Googler in 2014 seems to me to have been a thing (you might disagree!), so so that doesn’t surprise me either.

Thanks!

[–] ICastFist@programming.dev 3 points 5 months ago

Well, shit. The fuck am I supposed to do?

[–] onlinepersona@programming.dev 1 points 5 months ago* (last edited 5 months ago) (1 children)

I remember seeing something like this a while ago. Maybe she rediscovered the hack to make multiplatform executables on her own or she was inspired. nexe has existed for 11 years now.

Anti Commercial-AI license

[–] ICastFist@programming.dev 1 points 4 months ago (1 children)

That nexe looks nothing like cosmopolitan. Nexe compiles a node.js into a single exe for Windows and, from the readme, can create native binaries for other distributions (Linux, Mac), something that isn't new to Nexe, you could do that with FreePascal way before Nexe. If you avoided OS specific calls, you could pull that since the early 90s with C, too.

Compiling the same codebase for N different platforms, generating N different native binaries, isn't the same as having one single executable file that runs out of the box on significantly different OSs. Put it another way, she made a java that works without needing a JRE or JDK installed.

[–] onlinepersona@programming.dev 0 points 4 months ago* (last edited 4 months ago) (1 children)

🤔 I swear I've seen this multiplatform single executable before. Maybe nexe isn't it, but as soon as she whipped out the hexcode and talking about binary headers, it felt more than a dejavu. Someone did it years ago, put it in github, and it was called an abomination.

It's very similar in vein to this script that can be executed by bash and powershell.

Anti Commercial-AI license

[–] ICastFist@programming.dev 1 points 4 months ago

If you do find it, be sure to tell, I'd love to take a look