But if some least common denominator was found to be able to create window, add some input fields and buttons using the native UI elements of the OS?
Does the Win32 and Cocoa APIs for example, also have "magic numbers" that are kept stable?
101–110 of 264 posts
But if some least common denominator was found to be able to create window, add some input fields and buttons using the native UI elements of the OS?
Does the Win32 and Cocoa APIs for example, also have "magic numbers" that are kept stable?
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…
IIRC, from vague memories of things flying past, Big Sur won't let a modified binary run once it's been checked by Gatekeeper. Which means the first run gets checked and notarised but when you add the `index.html`, the on-disk binary has changed and Gatekeeper won't allow it to run - I guess it's to prevent malicious code modifications, etc.
The binary didn't work on Ubuntu 18.04 nor CentOS8 either, but I'll report a issue later on today.
Would GUI programs be possible with this? I don't mean some cross platform framework monstrosity. But if some least common denominator was found to be able to create window, add some input fields and buttons using the native UI elements of the OS? Does the Win32 and Cocoa APIs for example, also have "magic numbers" that are kept stable?
This is a cross platform web server, not a cross platform web browser.
Earlier quoted context omitted.
That's actually a pretty interesting idea. I wonder if we could make a lite version of Caddy bundled with your website embedded...no need to mess with file systems or permissions or devices and folders to run a static site. Might need some massaging to become a truly pleasant workflow though.
The go std library offers the embed package. You can just embed your files and use the std lib's webserver and generate a single file binary. No need for Caddy. All this would be roughly 15 lines of code.
Would GUI programs be possible with this? I don't mean some cross platform framework monstrosity. But if some least common denominator was found to be able to create window, add some input fields and buttons using the native UI elements of the OS? Does the Win32 and Cocoa APIs for example, also have "magic numbers" that are kept stable?
> Would GUI programs be possible with this? This is a cross platform web server, not a cross platform web browser.
Just make sure you don't have another server running on :8080. I had syncthing running and kept getting some error whenever I tried to run redbean. The error didn't make much sense, but eventually I realised that this was the casue of the error. I'm really impressed how portable this is. The only improvement I can see is if it auto-opened your browser to :8080. That way it would be easy to distribute the binary and h…
Let's say we are able to do this. Would we have any security concerns to be addressed?
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…
> 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.