Serving This Article from RAM with Dream for Fun and No Real Benefit

I’m not familiar with Soupault, I just had a quick look at it.

If you store your content in a git repo you could perhaps simply have a cli tool that takes an input on stdin and simply appends ?stamp=$(git describe --always) at the end of your href and then use the preprocess element widget and apply it on the hrefs of your page ressources in your template. But I’m sure @dmbaturin can suggest a more idiomatic workflow.


P.S. I’d just like to mention that looking at your gzip function again, it shows a bit too much of what should not be done to my taste: the function can leak fds in case of errors and domains are not meant to be used that way (it’s rather spawn one long running domain per CPU you have). It’s not necessarily more complicated to correct it to use Fun.protect invocations to make sure all your fds get closed even if the function blows up and use Thread.create so that the netizens cut and paste correct code.

However in the spirit of making you get rid of this code, except for Bytesrw_zlib which I already mentioned (see also this cookbook item) you could have used simply have used this function in zipc (though that would only support the ill-named HTTP deflate, which expects not a raw default but a zlib stream) or decompress, if you manage to sift through the overengineering.

2 Likes