Hacker Newsnew | past | comments | ask | show | jobs | submit | dreix's commentslogin

Over the last few months I tried to think of a clever way to set up a legacy site for a dictionary that I serve on a VM just because I also need to run sqlite. Since I want to make sure it'll run for longer than me paying for the VM this is the best possible solution. At some point no more updates will happen and it's going to be a static website. So bundling it like this is incredible. I can run multiple backups on different hosts with no additional costs.


If you just do an occasional key/value lookup, you don't need 1.2 MiB of WebAssembly. [1] That might already exceed your total database size.

I'd solve it via sharding: divide the database into N pieces via range- or hash-sharding. [1] Choose an N that's large enough for each piece to be reasonably small. When you look up a key, fetch the shard of interest.

You can put each piece into separate files (a little simpler to code, and most static servers will use pre-gzipped files for "Content-Encoding: gzip requests" easily, but you waste more disk space due to internal fragmentation) or one file (with range serving and an index of the byte range offset for each piece).

The format for each piece can be anything, eg json (simple) or an sstable-like format (more efficient). [3]

[1] Content-Length of https://phiresky.github.io/youtube-sponsorship-stats/sql-was...

[2] hash-sharding means: piece[i] has all the keys where hash(key) % N = i.

[3] https://github.com/google/leveldb/blob/master/doc/table_form... although they just say "formatted according to the code in block_builder.cc" instead of describing the most relevant part.


I started generating PDF before pagedjs and use my own electron based solution. Search for schild.report on github to see how it works. Basically reports are created via svelte templates and then printed via the electron print api. Works extremely well.


A libicu free Unicode extension. First time I hear about that and just yesterday I was slightly bothered by the prospect of compiling sqlite with icu again. Thank you to whoever wrote the extension, I'll try it out soon.


My dad's German Persian dictionary is freely available on https://farhang.im with source code on https://git.hmt.im/hmt/farhang-3 I haven't yet found the ideal way to share the sqlite database file in a current state.


Some weeks ago we had big banners advertising 'Die great night show'. Probably wasn't as much fun as advertised


You're missing the point here. I have created an electron app that renders reports via json and svelte. They are intended for print not the web and the easiest way to get the data printed was using the browser engine which gladly outputs to PDF. However, styling these pages would be a lot easier with better page support in CSS. Or at least better support of those CSS specs. I really look forward to having these polyfills. Using paged media is in a lot of contexts easier than latex. Especially when it comes to dynamic content.


There's a German graphic novel called 'Die Sache mit Sorge'. Great book.


I'm never able to get a function to work as I don't even know their equivalents in German.


Now with Sharepoint and Excel Online, we've discovered that function names follow the base language of the Workspace that the sheet is stored in. It's essentially rendered Excel Online useless.


Nice, I match ' the other people ' too


I read dentists. ..


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: