Live data from Hacker News

Show HN: Redbean – Single-file distributable web server

justine.lol

201–210 of 264 posts

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

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

Strong agree; someone needs to give her like a million dollars a year salary and unlimited resources to explore whatever she wants for life, just to see what she comes up with.

or don't, because she produced these gems without any such incentives and whilst I only make the connection in a speculative fashion, the most offended individuals I've known to be upset at the suggestion that money is a necessary component of compulsory exchange or even coercive production, have all been women.

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

#202
post #90
post #22

Earlier quoted context omitted.

I think the Zig community/BDFL might appreciate adding an APE target "os" to their buildchain (LLVM-based); that could be a match made in heaven!

Author here. I've been chatting with the Zig BDFL on Twitter recently about contributing APE support and he's been super supportive so far. It's going to be a nontrivial undertaking but would certainly be rewarding for everyone if we can make it happen.

Very cool! Maybe I should give Zig a try too.

Also hats off to you @jart!

Is this a one time thing or are you thinking of something bigger going with this project?

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

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

It's funny because the high-level introductions to C I would read as a kid before I really knew much about computing would almost always start out by explaining that one of the biggest strengths of C was its portability, and how it allowed you to write the same code that worked on every platform. Of course I came to learn that's true only in a sense that has no connection to practical reality, this looks like an exception.

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

#206

Can it be extended in a way similar to CGI back in the day? I would just want to compile it with the CGI program rather than expect it to dynamically load.

You should file a feature request! We could crowdsource some ideas about the best way to do that. For example if you read the APE blog post, we've already got a JavaScript interpreter (duktape) checked-in to the Cosmopolitan codebase. I could easily link that into redbean and define possibly a nodejs-like API.

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

#207

The amount of work that went to this is insane. She made a (full ?) implementation of libc: https://github.com/jart/cosmopolitan/tree/master/libc

Right? It's amazing to see what some people can accomplish with the same 24 hours a day we all get.

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

#208

As amazing as this is unfortunately it doesn't work for me and I am on Linux. I get bash: ./redbean.com: No such file or directory after chmod-ing. Maybe I am dumb but yeah.

Is your system 32 bit by chance?

No, not really. It's x64. I really wanted to give this a try.

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

#209
I absolutely love reading Justine's code. It comes up from time to time here and it just makes me happy. It reminds me of the passage from "Programming Sucks" by Still Drinking [1]

  Every programmer occasionally, when nobody’s home, turns off the lights, pours a glass of scotch, puts on some light German electronica, and opens up a file on their computer. It’s a different file for every programmer. Sometimes they wrote it, sometimes they found it and knew they had to save it. They read over the lines, and weep at their beauty, then the tears turn bitter as they remember the rest of the files and the inevitable collapse of all that is good and true in the world.

  This file is Good Code. It has sensible and consistent names for functions and variables. It’s concise. It doesn’t do anything obviously stupid. It has never had to live in the wild, or answer to a sales team. It does exactly one, mundane, specific thing, and it does it well. It was written by a single person, and never touched by another. It reads like poetry written by someone over thirty.
Her work is always just a little bit trippy in a good way haha.

[1] http://stilldrinking.org/programming-sucks

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

#210
post #175

Earlier quoted context omitted.

Its not the difficulty, but the scale. Working on one bare metal system is relatively easy as long as you're willing to dive into drivers. Getting 1001 I2C drivers or maybe writing a drivers for tens of different types of flash devices is a different matter. Your project will quickly become overrun with drivers for literally tens of thousands of devices... then comes maintenance. Look at the Linux source tree... Good…

You're confusing portability with requirements. I'm aware that a long tail exists. Linux is a big tent for that sort of thing. I think that's great. I also want the freedom to live outside that tent during the times when all I need are the other 85% of use cases, which as I've shown, can be easily achieved by just one person. I don't believe that just because I ship actually portable executables that are able to do e…

[deleted]
Post reply on HN