I love how this is a huge hack and it works so well. Nicely done.Reply
What would be awesome if fossil (the scm) could be integrated into this. This would enable to put you repository on a USB stick and you could use it (including issues etc) on any platform without installing anything.Reply
This is so amazing - I had to give it a shot. There have only been a couple of projects I’ve ever gotten excited about on HN and this is certainly one of them!!
I’m curious if any other users ran into issues with MacOS running 2.0? I may have just missed a step, but I started an issue nonetheless.Reply
No ARM64 love?Reply
Maybe this is common knowledge, but this is a quick and dirty way to reduce bots, spam and abuse.
Bad actors often use cheap cloud instances, and the IP addresses of their data centers typically have an accuracy radius of 1000 km.Reply
if geo:get('location', 'accuracy_radius') >= 100 then SetStatus(403) Write('you can only post comments from your home internet connection') return end
whenever I need a web server in a pinch: "python3 -m http.server"Reply
I've been following this project but am curious about what are the actual use cases apart from being able to send a portable web site around?
If you're running a production web server you're not really switching OS's often. Something like nginx is battle tested so what would be the benefits of using redbean?
It is a marvelous piece of technology but I am struggling to see the use cases right now.Reply
This is a single executable web server with Lua and other libs, with a zip file appended. I have done something similar with Python+tcltk.Reply
I am in awe with this masterpiece. How do you even gained the knowledge to pull off something like this (and Cosmopolitan)?
You are up there on the same level as Fabrice Bellard!Reply
But can it read email?Reply
Downloaded redbean by doing curl https://redbean.dev/redbean-latest.com >redbean.com in powershell
Tried to run it IN CMD.EXE with
I get this error (in a dialog).
--------------------------- Unsupported 16-Bit Application ---------------------------
The program or feature "\??\C:\Downloads\redbean.com" cannot start or run due to incompatibity with 64-bit versions of Windows.
Please contact the software vendor to ask if a 64-bit Windows compatible version is available.
--------------------------- OK ---------------------------
If I've missed twiddling an option, please let me know?Reply
We do not deserve Justine. We can only Give Thanks.Reply
"There's no need for a proxy like nginx; redbean is vertically integrated."
Anyone have suggestions for caching? router? Something small and lightweight in the spirit of readbean itself.Reply
If you like this, you should support Justine & the project, if you can spare a few bucks a month:
> Funding for the development of redbean was crowdsourced from Justine Tunney's [GitHub sponsors](https://github.com/sponsors/jart) and [Patreon subscribers](https://www.patreon.com/jart). Your support is what makes projects like redbean possible. Thank you.Reply
I've been having a lot of fun with this developing tiny webapps using Fullmoon. I love Lua, but I frequently bounce between a Windows PC and a Linux PC. Having redbean + Fullmoon has made it a breeze switching back and forth without having to deal with system Lua installs. SQLite and the thorough amount of built-ins is also a dream. Lua also has a lovingly awesome hobbyist community, so having another outlet for me to leverage that ecosystem is great.Reply
The idea is incredible ! But it doesn't seem to work on my ubuntu:
wget https://redbean.dev/redbean-2.0.1.com -O redbean.com 2022-06-17 10:35:12 (1,95 MB/s) - ‘redbean.com’ saved [1999386/1999386] chmod +x redbean.com ./redbean.com ./redbean.com: line 16: /tmp/ape: cannot execute binary file: Exec format error ./redbean.com: line 16: /tmp/ape: Success
This is incredible. Justine's work continues to amaze.
Work like this proves that assumption-questioning research on its own can produce incredible results if done by the right people.
I think a lot of companies have stopped doing this kind of research, in favor of chasing more immediate profits, to their long-term detriment.Reply
I heard that version 3.0 will be on baremetal, is that true ?Reply
So many great features in this release. Love the .args and subprocess support. I have been toying with redbean on and off, and I have been wanting to see if I could kludge together a poor man's long running job (scheduled) runner (something like Celery).
Also, why is redbean.dev not ported to 2.0?Reply
Every time this masterpiece comes up on HN, I try to think of something to say that explains how profoundly good this project is and I never feel like I can do it justice. It's small, it's fast, it's useful. It makes so much other software look bloated by comparison.
In a world where a lot of developers on HN are too scared to run apt upgrade, you write this brilliant piece of tech. It's inspirational, really.Reply
It's not often these days that a project pops up where I start thinking about re-imagining our whole build/deployment strategy around it. This project easily hits that high watermark. I'm already thinking about how we re-architect a few existing projects around it to reap the benefits. Very excited to do some new projects with this as well and get to understand it in more detail. Many thanks!
PHP support would be beyond amazing, what would be required (top-level) to get that working/usable?Reply
Can I host multiple sites in it? Like I have a VPS, but I have 4 sites in it, can I just pack it to 1 binary file?Reply
Lua REPL based on new minimalistic readline lib? Interesting…Reply
Never heard about it before but after reading a bit it seems like Redbean is one of the most insanely cool projects.Reply
Redbean is amazing. I was able to run some TLS stress tests against it (where you setup a handshake and just disconnect). I was able to pump out about 1200 connections per second between my desktop and laptop on 1gb ethernet. I only had 5 handshake errors.
I look forward to playing with this!Reply
Never fails to amaze me! People here should check out cosmopolitan too!Reply
Really impressive feature additions since the first time I heard of it. Is Lua backend-able? I've been looking for a langage since PHP, the node ecosystem seems too volatile to me.Reply
Just when you're feeling confident in your own coding skills, Justine comes along and releases an update. Just incredible stuff!Reply
How does Readbean beat Nginx? My assumption was that forking is very slow.Reply
It’d be fun to add raft support so that multiple readbeans could share state such as monkey patching updates and other useful distributed features. On bare metal this could be a whole stack in a tiny bin.Reply
I love this project! I still remember that one of my first questions when I started programming was why there wasn't really a standard between OS for executable files. And while I always thought it should be possible, seeing it implemented and laid out is a completely different beast.
In that spirit I wanted to generate a redbean executable for an SPA. To make this process a bit easier I just published a Github Action to create a redbean server for static assets: https://github.com/marketplace/actions/create-static-redbean...
Thanks to this my Github page now hosts a single-file server of... itself: https://timonlukas.github.io/server.com
The future is now!Reply
Just curious about the name - what made you pick redbean? Not hating on it, it's just unusual enough for me to ask about the backstory there.Reply
Please keep making Lua more relevant, I want to have more excuses to work with a scripting language that's popular in gamedevReply
> Thanks to Linus Torvalds, we not only have a consensus on architecture, but we've come pretty close to having a consensus on the input output mechanism by which programs communicate with their host machines, via the SYSCALL instruction.
Could someone explain this? I cannot find any information onlineReply
Only thing it's missing is Fennel, although I suspect it should be trivial to add :)Reply
Wait, you reimplemented most of GNU Readline in a single file with no dependencies? Appreciate you started from someone else's library, but yours actually looks feature complete! Wow.Reply
.oO(Could be a whole OS written in Cosmopolitan?)Reply
Maybe Cosmopolitan Libc can be developed to become a full-featured glibc replacement like Musl and what LLVM libc is going to target? To be able to link with large C++ codebases it is still missing a ton of small cruft...Reply
>There's no need for a proxy like nginx; redbean is vertically integrated
Not super familiar with this stuff, can someone explain?Reply
Just tried and am very impressed with APE and redbean. However, I had to turn off Windows Defender to even download (much less run) redbean, due to it detecting redbean as Trojan:Win32/Sabsik.FL.B!ml
Windows Defender quarantines the file within seconds of download, but even when I did catch the option to Allow, it never seemed to stick.
It would be nice to either find a way to avoid redbean being seen as a virus (I'm guessing it's the self-modifying code that bothers it), or ask Microsoft nicely to add redbean to the False Positives list.
However, I'm guessing it would be easy for someone to misuse redbean too, deploying what looks legit but with some added nefarious code. In that case, you'd need to submit checksums of legitimate releases to Microsoft (and other antivirus vendors) just to make deployment of the base redbean work without complaint. And anyone who adds to the archive for their own use (basically any real use of it) would have to do the same...
Not trying to discourage anyone. This is a great project! Looking for solutions to the false positive antivirus problem.Reply
I love it!
If I may suggest, supporting more languages than lua could help bring more people: say php or python, maybe with something like vscodium?
IIRC python2 was a WIP (issue #141 for cosmopolitan)
Personally I'd prefer perl for performance, and vscodevim or similar to edit code, but I have weird tastes :)Reply