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

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.


Nail it. I requested a 50% compression for a 200MB PDF file that contained pictures, and the tool made it an illegible mess. I can't imagine using this tool for anything serious, like tax returns, that requires a machine-readable file.


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.


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.


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.


Great point. I thought that `vacuum into` blocks writes, but it's only `vacuum` that blocks! I've updated the blog post, thanks!


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...


> 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...

I'm pretty sure this is a legal requirement not something the EV manufacturers are choosing to do. Although I guess this may vary by juristiction.


Well it can be both can't it.

Car makers, conceding that they have to incorporate some sort of non-startle noise if they're building an ev, decide to lean into it and pretty soon the pr and marketing departments are trying to come up with the most "distinctive" non-startle branding sound possible, and we're off to the juvenile arms race of noise making one-upsmanship again.


It's cause otherwise "EVs are silently running over kids becomes another "we need incandescent traffic lights because for a couple weeks in winter LEDs don't melt snow"


The legislation requiring this is silly, are there any studies at all which shows it reduces harm... I couldn't find any. It would seem safer for children, and the population as a whole, if they banned vehicles which don't provide adequate front visibility. Maybe even require sensors that will prevent the vehicle from moving from a stop if something is detected in front.


There are blind people, who cannot know if a car is present if it's completely silent.


There's a spectrum between completely silent and so noisy you can clearly hear it inside a house a hundred meters down the street.


I was part of a recent conversation about hijacking the speaker and making it play Ludacris - Move B** instead.


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.


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


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.


Yes, this[1] did the job, thank you!

[1]: https://news.ycombinator.com/item?id=39291411


Autoincrement is usually not needed in SQLite, and adds a lot of overhead to every insertion since it needs to read and update the sqlite_sequence table on every insert.

https://www.sqlite.org/autoinc.html


Or use "VACUUM INTO" to get a backup that is is even faster (and easier) to restore.


Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: