Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Downloaded redbean by doing curl https://redbean.dev/redbean-latest.com >redbean.com in powershell

Tried to run it IN CMD.EXE with

redbean.com -v

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?



Try the following:

    wget -O redbean.com https://redbean.dev/redbean-demo-2.0.1.com
    .\redbean.com -v
The "curl" on Windows appears to output a UTF-16 headers list to stdout. I verified the above will work in PowerShell.


Hi Jart, From powershell, via .\redbean.com -v

Program 'redbean.com' failed to run: Operation did not complete successfully because the file contains a virus or potentially unwanted software At line:1 char:1 + .\redbean.com -v + ~~~~~~~~~~~~~~~~. At line:1 char:1 + .\redbean.com -v + ~~~~~~~~~~~~~~~~ + CategoryInfo : ResourceUnavailable: (:) [], ApplicationFailedException + FullyQualifiedErrorId : NativeCommandFailed

From cmd.exe I get

   The system cannot execute the specified program.
I'll see if I can get it "unblacklisted", Perhaps my anti-virus got to it first?


Yes please help us get it unblacklisted with your scanner. Security vendors work by keeping an eye out for the strange and unusual, and I myself am strange and unusual. The last month or so has been particularly bad with the virus scanners. Possibly due to some random change I made to the APE assembly or performance optimization in the C library. For example, we've needed to make changes in the past where error messages containing the word "oldskool" needed to be removed because virus scanners thought that made it a virus. Also if you get a chance, please upvote the redbean binaries on VirusTotal. I always try to do that (I'm "howishexeasier") since it helps people verify that a binary came from me.

Traditionally the open source community worked around these issues by not distributing binaries and instead asking people to build the software on their own. I like the convenience of binaries because open source software is becoming increasingly fragmented and impossible to build. So then people use interpreters instead of compilers, which are slower. In any case, I don't think the source code workaround is going to last forever. Many companies are now focusing on applying the virus scanner model to source code too.


Microsoft Defender can be particularly difficult about unsigned executables, which I appreciate is annoying for cross platform developers that don't have that problem elsewhere.

I've submitted this as a false positive under our enterprise licensing.


> I myself am strange and unusual.

Ha ha! (beetlejuice!)

There's also the possibility that redbean would be used for actual malware, being so portable and all.


Virus total.com brings up multiple hits. Good luck


I'm on mac and also can't run it:

▶ curl https://redbean.dev/redbean-demo-2.0.1.com >redbean.com

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1984k 100 1984k 0 0 1121k 0 0:00:01 0:00:01 --:--:-- 1129k

~/programming/apps ▶ chmod +x redbean.com

~/programming/apps ▶ ./redbean.com -v

zsh: exec format error: ./redbean.com

The file seems to be downloaded OK:

▶ file redbean.com

redbean.com: DOS/MBR boot sector

I also tried letting Firefox download the 2.0.1 binary from the downloads page, but that runs into the same issue as well.


I haven't tried to understand it, but I was getting the same error with zsh. Works with bash though.


Try upgrading to the latest version; I upstreamed a patch in zsh last year. https://github.com/zsh-users/zsh/commit/326d9c203b3980c0f841...


I tried upgrading but it seems I already have the latest.

Anyway, tried bash now, and I got another error:

▶ bash ./redbean-2.0.1.com -v --strace SYS 0 22'227 bell system five system call support 383 magnums loaded on xnu's not unix! SYS 93828 36'725 mprotect(0x700000000000, 4'096, 0) → 0 SYS 93828 345'630 mmap(0x700000000000, 262'144, PROT_READ|PROT_WRITE, MAP_STACK|MAP_ANONYMOUS, -1, 0) → 0x700000000000 (262'144 bytes total) SYS 93828 567'580 mmap(0, 65'536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) → 0x100080000000 (327'680 bytes total) SYS 93828 607'673 close(3) → 0 SYS 93828 610'080 getcwd(0x5ee720, 1'024) → "/Users/renato/programming/apps" SYS 93828 611'532 getenv("MAKEFLAGS") → NULL SYS 93828 613'435 getenv("TERM") → "xterm-256color" SYS 93828 637'803 openat(AT_FDCWD, "/Users/renato/programming/apps/redbean-2.0.1.com", 0, 0) → 3 SYS 93828 640'621 getfiledescriptorsize(3) → 1'999'386 SYS 93828 645'979 mmap(0, 1'999'386, PROT_READ, MAP_SHARED, 3, 0) → 0x100080100000 (2'359'296 bytes total) SYS 93828 657'750 munmap(0x100080100000, 1'703'936) → 0 (655'360 bytes total) SYS 93828 660'467 __zipos_get("/Users/renato/programming/apps/redbean-2.0.1.com") SYS 93828 662'273 close(3) → 0 SYS 93828 663'503 openat(AT_FDCWD, "/zip/.args", 0, 0) → -1 ENOENT/2/No such file or directory SYS 93828 668'744 mmap(0, 262'144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) → 0x100080040000 (917'504 bytes total) SYS 93828 671'865 sigaltstack({.ss_sp=0x100080040000, .ss_flags=0, .ss_size=262'144}, [{.ss_sp=0x100080040000, .ss_flags=0, .ss_size=262'144}]) → 0 SYS 93828 678'266 sigaction(SIGQUIT, {.sa_handler=0x52c737, .sa_flags=0x51, .sa_mask=~{}}, [{.sa_handler=0, .sa_flags=0, .sa_mask={}}]) → 0 SYS 93828 680'693 sigaction(SIGFPE, {.sa_handler=0x52c742, .sa_flags=0x51, .sa_mask=~{}}, [{.sa_handler=0, .sa_flags=0x2, .sa_mask={}}]) → 0 SYS 93828 682'732 sigaction(SIGILL, {.sa_handler=0x52c74d, .sa_flags=0x51, .sa_mask=~{}}, [{.sa_handler=0, .sa_flags=0x2, .sa_mask={}}]) → 0 SYS 93828 685'823 sigaction(SIGSEGV, {.sa_handler=0x52c758, .sa_flags=0x51, .sa_mask=~{}}, [{.sa_handler=0, .sa_flags=0x2, .sa_mask={}}]) → 0 SYS 93828 687'845 sigaction(SIGTRAP, {.sa_handler=0x52c763, .sa_flags=0x51, .sa_mask=~{}}, [{.sa_handler=0, .sa_flags=0x2, .sa_mask={}}]) → 0 SYS 93828 689'841 sigaction(SIGABRT, {.sa_handler=0x52c76e, .sa_flags=0x51, .sa_mask=~{}}, [{.sa_handler=0, .sa_flags=0x2, .sa_mask={}}]) → 0 SYS 93828 691'881 sigaction(SIGBUS, {.sa_handler=0x52c779, .sa_flags=0x51, .sa_mask=~{}}, [{.sa_handler=0, .sa_flags=0x2, .sa_mask={}}]) → 0 SYS 93828 696'779 mmap(0, 262'144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) → 0x100080080000 (1'179'648 bytes total) SYS 93828 1'392'442 inflate([u"SYMT ↨ ♦ ♦ @ "...], 262'144, u"lⁿuÿV╒× ⁿ»↓bå£Ç↓RAѶ♣JQRÑ♦ò♫âûÉ♫üí╒♥ét"..., 103'922) → 0 SYS 93828 1'647'413 GetSymbolTableFromZip() → 0x100080080000 [1] 93828 invalid system call bash ./redbean-2.0.1.com -v --strace


The invalid system call issue is likely due to a recent Mac OS update. It turned out redbean was depending on a Mach system call when the intent was to only use the UNIX APIs which I believe will be stable since they're much more public. https://github.com/jart/cosmopolitan/issues/426 New 2.0.2 release available on https://redbean.dev which includes the fix.


2.0.3 now :D and I can confirm it runs on my Mac (Monterey 12.4 (21F79))...

Looks great!


Annoyingly, 2.0.3 appears broken on 12.5 Beta (21G5027d).


Wow. Could you please open a GitHub issue with a `./redbean.com --ftrace` log? I only need the fifty or so lines of the log. Since that tells me which system call is likely the culprit. https://github.com/jart/cosmopolitan/issues Alternatively you could email it to me: jtunney@gmail.com Thanks!


It's an instant `Segmentation fault: 11` - although this might be because I'm on M1 (although it still happens under `arch -x86_64 bash` which forces it directly through Rosetta 2.) Seems I can't run `dtruss` or anything useful either to track it down further because of the new stringent SIP protections, sorry!


Looks like people are already on this case: https://github.com/jart/cosmopolitan/issues/429




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: