Live data from Hacker News

Show HN: Redbean – Single-file distributable web server

justine.lol

31–40 of 264 posts

Re: Show HN: Redbean – Single-file distributable web server

#31
post #8

The short description is a bit too short; this is mind blowing! Redbean is a portable, single file executable webserver which also acts as a zip-file for the static content it hosts, and runs on Linux + Mac + Windows + FreeBSD + OpenBSD + NetBSD + BIOS without any recompilation... You can manage the static content using standard pkzip tooling! Now that's what I call thinking out of the box! Edited: some rewording and…

Is it that this binary does some tricks to run on Linux, Mac, Windows, FreeBSD, OpenBSD, NetBSD, BIOS or does it really work on all operating systems including something like Plan 9 or even TempleOS?

And does it run on different architectures like ARMv6?

Re: Show HN: Redbean – Single-file distributable web server

#32
post #16

Earlier quoted context omitted.

Caddy is cool but it has a separate 33mb executable for each operating system. Redbean is a 128kb executable that runs on all platforms so it has fewer moving parts and is 1584x tinier. All the convenience of being able to "just add your assets to the zip executable" wouldn't have been feasible if we needed to repeat that process n times for each operating system.

Yes of course - like I said, they solve different usecases. Caddy has way, way more features overall to make up for the bigger binary.

Caddy is Go. It has 5mb hello worlds. (Which is fine)

Re: Show HN: Redbean – Single-file distributable web server

#34
I am floored. Not only is this just breathtaking sorcery, I also needed this exact thing for a project. I don’t understand probably 70% of the description of this software, but I understand what it does, and I’m more excited to carefully study and use this than I have been about anything in years.

Re: Show HN: Redbean – Single-file distributable web server

#35
post #3

Cute idea. Sounds like magic.

Built with actual magic: https://storage.googleapis.com/justine/ape.html From the same person I think

Author mentions that the APE’s can be booted from the BIOS. Would this imply you could perhaps implement a lambda-like cloud service that could spawn/start the APE on demand? Edit, I’d guess you’d want to/have to, also have a tcp/ip stack in the APE as well (but perhaps just going for containerization of the APE is the better play and not have to worry about any of that..)

Re: Show HN: Redbean – Single-file distributable web server

#36
post #29
post #15

Earlier quoted context omitted.

I agree, I got to the page on actually portable executable, and had to read it a few times to make sure I was grokking it properly. This is just sheer cleverness, THIS is the stuff that should be on hacker news!

> THIS is the stuff that should be on hacker news! If interested, see previous discussions of APE: https://news.ycombinator.com/item?id=24256883 https://news.ycombinator.com/item?id=25556286

Thanks for the links. The discussion on the first one is interesting, it wasn't clear to me from the original doc that the UNIX version needs to overwrite itself to get to the ELF header. That's a bit unfortunate, because it means you can't share the program again after you ran it the first time on BSD or Linux. Still very clever, though. I imagine there could be a "repackage for distribution" switch added to put the MZ header back again.

Re: Show HN: Redbean – Single-file distributable web server

#40
post #10

I just spent 30 minutes reading about this. I'm so shocked that I'm logging in to comment after 5 years of lurking. Justine has built a c library that allows you compile a binary once and have it run it on any os or baremetal. The SAME binary. Quite frankly, that sentence doesn't even make sense to me. Check out https://storage.googleapis.com/justine/cosmopolitan/index.ht... As far as I'm concerned, this is literal m…

Everything she does has this level of jaw-dropping amazingness. Between her and Fabrice Bellard i don't know many people who consistently get my chin to hit the table. I hope that Cosmopolitan becomes mainstream, so much more software could have that It Just Works quality.

"Jaw-dropping" is definitely a term I'd use to describe some of her more infamous tweets and blog posts, too.
Post reply on HN