Live data from Hacker News

Show HN: Redbean – Single-file distributable web server

justine.lol

1–10 of 264 posts

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

#6
I really like your view of the world, that programs should be portable, tiny, and just work. The slamming of so much functionality into a zip file is inspiring.

Would it be possible to do something similar with Free Pascal, allowing the recreation of something like Turbo Pascal, except really, really portable .com output?

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

#7
Caddy is a single file web server as well :) https://caddyserver.com/

Admittedly they solve different usecases, where Redbean seems to want to serve a whole static site as a single file, which isn't currently possible with Caddy, (but you can run `caddy file-server` to serve the current directory as a static site), but it may become possible in the future with Golang's new embed package https://golang.org/pkg/embed/

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

#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 breathing space

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

#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 magic. Look at the magic numbers: https://github.com/jart/cosmopolitan/blob/37a4c70c3634862d8d...

I could go on, but there's no binary portability comparison with any other language. And she has made some pretty neat optimizations.

Back in the day, I saw some pretty neat stuff with the ELF format, but this takes the cake.

Wow.

Edit: I'm editing because this is just so bloody absurd.

https://storage.googleapis.com/justine/printimage.html

$ ./printimage.com someimage.jpg

Like wow. And also video.

https://storage.googleapis.com/justine/printvideo.html

I'm struggling to put my shock into words. I've been around.

There's engineering. There's academia.

But this falls into straight-up wizardry.

Post reply on HN