maskros

Joined 9 years ago

Karma
385
Submissions
100
Member since
Mar 22
I made MuPDF.
View on Hacker News

Recent submissions

Comment · 1 year ago
Well so I glanced at what that project does.

Congratulations, you've managed to "compress" PDF files by rasterizing every page to JPEG, while destroying all the vector and textual information in it.

The resulting PDF is nothing like the input -- it's just a bunch of blurry JPEG images wrapped in a PDF format.

You can't search or copy the text, and trying to print it will just make a blurry mess of the text.

Comment · 2 years ago
The CSS outline property is (was?) unreliable on Safari. Things like the border-radius don't affect the outline shape -- it's always square even if you to to create some Apple-patented rounded rectangles using border-radius.
Comment · 2 years ago
Lots of fonts have monospaced numbers, they just need to be enabled! Look for OpenType (TTF and/or OTF) fonts with feature "tnum", and enable it.

For CSS, use font-variant-numeric: tabular-nums.

Comment · 2 years ago
To backup you should use the `vacuum into` statement. That can be safely run from another process, as it takes a read lock and doesn't block writers when using the WAL mode.

When backing up a SQLite database that is in running use, you should never use `.backup`. That command will restart the backup from scratch every time the database is written to, so if you're backing up a big database with a lot of periodic writes the backup process may never complete.

You can sometimes use the C backup API from the same process that is writing to the database, since the C backup API is aware of writes _from the same process_. It will still have to restart the backup procedure if writes from another process interfere.

Comment · 2 years ago
There's a spectrum between completely silent and so noisy you can clearly hear it inside a house a hundred meters down the street.
Comment · 2 years ago
Then you haven't heard electric cars running at low speed or put in reverse. Try to chill near any space where EVs frequent (like near a parking lot or train station with lots of traffic) and it's a constant source of artificial speaker noise:

WHIRR! WHINE! HUM! LOOK AT ME I'M ELECTRIC WITH A BIG SPEAKER! WHINE! WHIRR!

BING, BING, BING, BING, BING! LOOK OUT HERE I COME IN REVERSE! BING! (The Ioniq 5 is a particularly bad offender here ... the reversing bing can be heard multiple blocks away).

I wish EV auto-makers would turn the default warning noise levels their cars emit WAY THE FUCK DOWN because it's seriously annoying! I get not wanting to startle pedestrians, but you don't have to alert the entire neighborhood...

Comment · 2 years ago
Since this viewer uses MuPDF as the document engine, it should already support EPUB, MOBI, FB2, and XPS document formats.

If it doesn't, it should be a relatively simple task to upgrade the mupdf library to the latest version and recompile Sioyek to get all the file formats supported by mupdf.

Comment · 2 years ago
You don't even need the symbol. If you want the simplest thing that will work:

    type Velocity = number & { BRAND: "Velocity" }
    type Distance = number & { BRAND: "Distance" }

    var x = 100 as Distance
Comment · 2 years ago
The embeddings are just a flat array of floating point numbers. Try typed arrays/buffers to read and write the typed arrays directly as BLOB data. Protobuf and JSON and other serialization schemes are way overkill for something that should be as simple as a memcpy.
Comment · 2 years ago
Comment · 2 years ago
Or use "VACUUM INTO" to get a backup that is is even faster (and easier) to restore.
Comment · 3 years ago
Judicious use of git rebase fixes the commit spam issue.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton