Live data from Hacker News

Show HN: Redbean – Single-file distributable web server

justine.lol

141–150 of 264 posts

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

#141
Ok well this doesn’t work on Mac, so much for not needing to cross-compile on every architecture. It’s because of the OSX Gatekeeper but if majority of people need to self-sign or otherwise compile this binary I’m not sure if it is that portable be it if it’s only a Mac thing. This dumps the zip content directly on the wire skipping an extra kernel write. There have been attempts before to run the same binary on multiple architectures by inserting magic headers without having to recompile. There are shell/batch versions of the same thing [0]. The issue is such projects usually never get much traction since every programmer is wedded to their choice of OS and typically relies on APIs specific to each system. There are also “fat binaries” which accomplish the same thing if one truly wanted a cross platform single executable. There isn’t a huge need for them currently and not just because they’re “fat” (something this approach seems to tackle primarily) so I expect for the same reasons there won’t be many needs for this approach either.

I see a lot of people making the comparison between this and the OG Linux tools. I absolutely don’t think this qualifies as one, most old Linux tools are irreplaceable or at least were when they first came out and there were no alternatives. Serving a bundled zip file on a web server across many different platforms is not something people are dying to do. You can run a web server like nginx or Apache to index your files or if you really hate those why not a single line command which is supported on almost any platform:

  python -m http.server 8080


[0] https://github.com/llamasoft/polyshell

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

#144
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…

Agreed. This single sentence at the end of αcτµαlly pδrταblε εxεcµταblε page: > I believe the best chance we have of doing that [writing software that stands the test of time with minimal toil], is by gluing together the binary interfaces that've already achieved a decades-long consensus, and ignoring the APIs. ...it's a kind of thought I don't think I could ever come up with. Mind blown.

You go to war with the army you have.

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

#145

OK I see we are going crazy, me too. Thanks @jart. I have been thinking about portable web apps with embedded SQLite for some time. I do not have the technical chops at C level to pull this off. I am really inspired by this project. I hope Redbean leads a way to distribute self-hosted apps in today's era of the cloud.

I still use the classic version of Tiddlywiki that is a single self-contained self-editing html file, and I "app-ify" it on Windows by changing the extension to *.hta.

But having the similar solution with the SQLite, would be a perfect combination.

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

#147

Earlier quoted context omitted.

Instead of sudo sh -c to sudo the redirects, consider echo 'abcde' |sudo tee /proc/bla. Less nesting :)

Do you mean less syntactical nesting? The pipe to sudo tee creates a new child shell, just as sudo sh -c does.

Yes.

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

#148
post #42

Am I the only one having issues trying to get this working? The webserver starts just fine, but once I add the index.html with zip as in the example, it stops working. This is on Mac 10.15, CentOS 8 and Ubuntu 18.04 LTS. Centos: [centos@test ~]$ ./redbean.com -vv error: Uncaught SIGSEGV on test.novalocal ./redbean.com EINVAL/err=22/errno:2/GetLastError:0 Linux test.novalocal 4.18.0-240.10.1.el8_3.x86_64 #1 SMP Mon Ja…

Someone already reported the same https://github.com/jart/cosmopolitan/issues/56

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

#149
Hmm, somehow I knew Justine is a 'transwoman' by this feat. Lucky guess I suppose...

Question: if all the high achieving women in tech end up being 'transwomen', is that a step forward or backward for women in tech? Will 'transwomen' be able to take advantage of hiring privileges given to normal women? If so, won't this effectively shut normal women out of tech even more?

I think trans/self identifying people should be in a separate category so they don't exploit allowances made for under represented minorities.

Post reply on HN