News for hackers. Stuff that matters.
Re:The three line single binary compiler free blog by FullyFunctional on Saturday April 23, 2022 @03:39PM (#31137705)
"just because you noticed its misspelled" is either a very clever joke or a marvelous coincidence.
Re:The three line single binary compiler free blog by EdSchouten on Saturday April 23, 2022 @08:22AM (#31133663)
What’s the requirement for having it all concatenated into a single file? What’s wrong with having the webserver binary and the ZIP file be separate?
Re:The three line single binary compiler free blog by karmanyaahm on Saturday April 23, 2022 @10:51AM (#31134740)
I think it's just an interesting technical challenge, not for practical purposes (other than sites that never update content maybe).
Re:The three line single binary compiler free blog by fivelessminutes on Friday April 22, 2022 @04:14AM (#31119366)
Just mount your zipfile using fuse and serve as normal. You can also produce and edit the zipfile that way.

https://www.systutorials.com/docs/linux/man/1-fuse-zip/

Re:The three line single binary compiler free blog by georgia_peach on Friday April 22, 2022 @04:32AM (#31119435)
But then you have two files and a mount to deploy instead of a single file.

Ted was trying to do a redbean like jart did with APE.

https://redbean.dev/

Which is an awesome concept that also reeks of re-purposed early '00s malware distribution trick.

Re:The three line single binary compiler free blog by Scaevolus on Saturday April 23, 2022 @02:05PM (#31136661)
This CL would fix Go to be able to read zip files concatenated to binaries: https://go-review.googlesource.com/c/go/+/387976/
Re:The three line single binary compiler free blog by skybrian on Saturday April 23, 2022 @11:54AM (#31135382)
It seems like both problems in the Go standard library should be fixable? They are corner cases that could be made to work without breaking anyone.
Re:The three line single binary compiler free blog by georgia_peach on Friday April 22, 2022 @04:04AM (#31119323)
Looks like it's harder to do a redbean in golang than it should be at the moment.
Re:The three line single binary compiler free blog by rob74 on Saturday April 23, 2022 @11:25AM (#31135041)
TBF, implementing Redbean in C required 3000+ lines and several third party dependencies. Of course it's more full-featured than this Go "proof of concept", but still, I assume it would be much easier to implement Redbean in Go than in C - as you would expect from a much younger "batteries-included" language.
Re:The three line single binary compiler free blog by georgia_peach on Saturday April 23, 2022 @02:11PM (#31136742)
Wasn't criticizing Go. It's the most Wirth-like language we have today with a vibrant ecosystem. Looking at their github, they're already on it.
Re:The three line single binary compiler free blog by breadchris on Saturday April 23, 2022 @01:44PM (#31136435)
i believe you can achieve what you want with embed https://pkg.go.dev/embed
Re:The three line single binary compiler free blog by ipython on Saturday April 23, 2022 @03:37PM (#31137684)
That’s not the same thing - with embed you have to recompile the server every time you change the page contents.
Re:The three line single binary compiler free blog by cobbal on Saturday April 23, 2022 @01:45PM (#31136444)
I see at least two compilers: zip and cat. :)
Re:The three line single binary compiler free blog by Sirened on Saturday April 23, 2022 @01:55PM (#31136556)
See also: "X is a compiler" alignment chart

https://twitter.com/searyanc/status/1334233376509763585

Re:The three line single binary compiler free blog by cobbal on Saturday April 23, 2022 @02:03PM (#31136628)
That's wonderful. I'll leave the semantics of nucleons to the physicists though.