[HN Gopher] The three line single binary compiler free blog
___________________________________________________________________
The three line single binary compiler free blog
Author : georgia_peach
Score : 59 points
Date : 2022-04-22 08:04 UTC (1 days ago)
(HTM) web link (flak.tedunangst.com)
(TXT) w3m dump (flak.tedunangst.com)
| fivelessminutes wrote:
| 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/
| georgia_peach wrote:
| 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.
| [deleted]
| Scaevolus wrote:
| This CL would fix Go to be able to read zip files concatenated to
| binaries: https://go-review.googlesource.com/c/go/+/387976/
| skybrian wrote:
| 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.
| FullyFunctional wrote:
| "just because you noticed its misspelled" is either a very clever
| joke or a marvelous coincidence.
| breadchris wrote:
| i believe you can achieve what you want with embed
| https://pkg.go.dev/embed
| ipython wrote:
| That's not the same thing - with embed you have to recompile
| the server every time you change the page contents.
| cobbal wrote:
| I see at least two compilers: zip and cat. :)
| Sirened wrote:
| See also: "X is a compiler" alignment chart
|
| https://twitter.com/searyanc/status/1334233376509763585
| cobbal wrote:
| That's wonderful. I'll leave the semantics of nucleons to the
| physicists though.
| georgia_peach wrote:
| Looks like it's harder to do a redbean in golang than it should
| be at the moment.
| rob74 wrote:
| 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.
| georgia_peach wrote:
| 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.
| EdSchouten wrote:
| 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?
| karmanyaahm wrote:
| I think it's just an interesting technical challenge, not for
| practical purposes (other than sites that never update content
| maybe).
___________________________________________________________________
(page generated 2022-04-23 23:02 UTC)