Readit News logoReadit News
egypturnash · a year ago
> One of the weirdest things my website does is that it serves everything from a .zip file

whyyyyyyy

why would you do this to yourself

It looks like you're still pushing a bunch of stuff over with git so it's not like you're making it easier to just ftp over one file or something, whyyyyyyy

TeMPOraL · a year ago
> why would you do this to yourself

Why not? It's not that bad of an idea. I mean, of course they should've used SQLite instead of ZIP as the container, but... ;).

There's a turn-key solution for this too: https://redbean.dev/. See also, https://justine.lol/redbean2/.

xena · a year ago
My website binary builds the static site on every commit to the repo. This putting things in a zipfile strategy is probably a bad idea, but it makes it easy for the preview site to handle: https://xeiaso.net/blog/2024/overengineering-preview-site/
egypturnash · a year ago
boggles

From the perspective of someone whose site is a 12-year-old Wordpress installation on cheap hosting that she only does anything technical to when it's time to make a custom template for a new multi-year comics project, your website is a shimmering fractal of terrible ideas. Assembling a list of posts can be done with so much less work than this hyper-complicated machine you've made.

But then again a glance at your resume suggests you're probably making at least two orders of magnitude more money off of fooling around with tools for making enormously complicated websites than my broke ass is making off of drawing comics and furry porn, so what do I know? You've probably solved some big problems at work super fast because of dealing with the toy problems you've created for yourself with this Rube Goldberg machine of a website.

peter_l_downs · a year ago
Maybe I missed it, but why are you embedding a zipfile of gzip streams rather than just embedding the static site's files with an `embed.FS` and serving from that?

Deleted Comment

frontalier · a year ago
why port doom on a dishwasher?

why create brainfuck?

why encode the matrix movie into an ascii stream?

est · a year ago
> serves everything from a .gzip file

Could this make you feel better?

tedunangst · a year ago
This is fixable with a small patch, which implements enough seek to work with http.

    func (r *checksumReader) Seek(offset int64, whence int) (int64, error) {
        if whence == io.SeekEnd {
                return int64(r.f.FileHeader.UncompressedSize), nil
        }
        r2, _ := r.f.Open()
        rr := r2.(*checksumReader)
        *r = *rr
        return 0, nil
    }

agwa · a year ago
Another issue is that without seek support, the HTTP server can't implement range requests.

Interesting comment by Russ Cox about this: https://github.com/golang/go/issues/61791#issuecomment-16719...

kdbg · a year ago
Reminds me a little of a stored XSS I read about last year.

https://tttang-com.translate.goog/archive/1880/?_x_tr_sl=aut...

Had that same root of not having the mime.types in the container, leading to server-side sniffing of the mime type for the Content-Type header.

It's just a bit interesting the impact such a file can have

o11c · a year ago
Languages do such a bad job at modeling the IO hierarchy ...

One minor point that should be relevant here: there are files that support `rewind` (`seek` at offset `0`) but no other seeking.

lloydatkinson · a year ago
This is ironic, as I'm not even sure the authors RSS is setup correctly. My Miniflux instance now has multiple entries for this exact post and in fact the ONLY time I see duplicate posts in there is from the authors site.
xena · a year ago
I've never heard of this issue happening. Can you send me an email with more details?
lloydatkinson · a year ago
immibis · a year ago
abstractions that usually magically work but sometimes don't are the best abstractions (if you're paid by the hour to fix them).
throwayaw84330 · a year ago
Things that happen when xe stopped to use NixOS
bentinata · a year ago
Haven't read xe article for a while. Why does xe move away from NixOS? I'm pretty sure I read blog about nix being best container builder a while ago.