HNHacker News
TopNewBestAskShowJobs

yarcob

2,749 karma · joined November 10, 2020

submissionscomments
yarcob··on EU court rules no EULA can forbid decompilation, if you want to fix a bug
I have decompiled AppKit on macOS occasionally to debug issues in my app.

For example, in one case I discovered that double clicking a cell sometimes only selected part of the contents. With Hopper I was able to verify that the bug is that AppKit just selected the range from 0 to 32000, assuming that would be enough. I was able to work around the issue by manually selecting a bigger range. (I also reported the bug to Apple, they told me they won't fix it because it's a deprecated API. Doesn't matter that 100s of apps, including Apple's own, were still using it...)

In another case, I found out that an obscure feature (text attachments with custom cells) was crashing because AppKit called -release too often, so it was impossible to use the feature. Apple had apparently broken it when implementing the force touch functionality for dictionary lookups.

Another time Cornerstone, the SVN client, was broken on a prerelease version of macOS. I don't recall the details, I think they called -registerDefaults: too early. I was able to fix it by writing a dynamic library that changed the -registerDefaults: implementation so that it ignored the first call (today with hardened runtime this fix wouldn't be possible anymore without disabling system integrity protection).

yarcob··on Apple rejects developer's horoscope app, says App Store has enough
I don't think most people buy iPhones because of Apple's draconian control of software distribution, I think they buy them despite of it.

If Apple sold two iPhones, one that allowed only apps from the App Store, and one that allowed apps from anywhere, I'm pretty sure most people would buy an iPhone that allowed 3rd party apps.

The current state makes me a bit sad. I've been a long term Apple user, and I'm pretty sure my next phone is going to be some Android, because as much as I like the quality of Apple's products, I just no longer want to accept Apple's restrictions.

yarcob··on Apple rejects developer's horoscope app, says App Store has enough
I published an app on the App Store, which did quite well in its niche. Soon, a bunch of very similar apps popped up. One app cloned everything about my app -- even the icon.

But Apple didn't care. They don't give a shit when people clone apps and try to mislead customers by making apps that have almost the same name as another app.

Apple should focus on getting rid of scam apps and blatant rip-offs.

Who cares if there are 100s of horoscope apps on the store? It's not like shelf space is limited. As long as an app doesn't harm or mislead customers, I don't see why Apple should reject it.

yarcob··on New “Report a Problem” link on product pages
Why did you quote my sentence without including the first part? It completely changes my statement.

Apple and Google do not automatically install or run 3rd party apps from the store. If they did, then yes, obviously it would be their fault, but they don't.

yarcob··on New “Report a Problem” link on product pages
> This is not the fault of devs

If you include 3rd party software in your app, and that 3rd party software does something bad, then that's totally your fault.

yarcob··on PayPal raises fees for most domestic transaction types to 3.49% + $0.49
The last time I went comparison shopping I figured Wirecard was a good deal. I even got a quote from them and planned to switch to them. But I was a lazy procrastinator, so I did nothing for a couple of months, and then all of the sudden I read about them on the news...
yarcob··on PayPal raises fees for most domestic transaction types to 3.49% + $0.49
In Austria banks switched from Maestro to Mastercard Debit to make online payments easier.
yarcob··on New USB-C logos make picking USB cables, chargers less confusing
Summary for people who don't want to click a link:

Some MacBook Pros get very hot when you use the USB-C ports on the left side for charging.

yarcob··on Paracetamol use during pregnancy – a call for precautionary action
Ibuprofen is considered safe in the first half of the pregnancy, significant risks start only after week 28 [1]. It's also considered safe when nursing.

[1]: https://www.embryotox.de/arzneimittel/details/ibuprofen/

yarcob··on Paracetamol use during pregnancy – a call for precautionary action
As a counterpoint, embryotox says that the studies linking paracetamol to genital defects show only weak correlations and are of questionable quality [1]. The links to ADHS etc are apparently even more tenuous -- one study apparently even found a correlation between ADHS and paracetamol use by the father during pregnancy (how would that work?).

[1]: https://www.embryotox.de/arzneimittel/details/paracetamol/

yarcob··on Tesla Q3 2021 Vehicle Production and Deliveries
Tesla has a lead now, but I wonder how long it'll hold up.

At some point electric drivetrains and batteries will be available in large quantities from suppliers just like gasoline motors and gearboxes are available now.

As soon as that is the case, there will be many dozens of different car models that compete with Tesla.

Teslas vertical integration is an advantage now, because they don't have to wait for suppliers to develop what they need. But once suppliers have caught up, I'm not sure if Teslas edge holds.

yarcob··on Klimaticket: All public transport in Austria with a single ticket for 1095 EUR/y
Kids under 6 are free on almost all public transport in Austria.

For older kids there are a lot of discounts, but many of them are only cheap if you use public transport regularly. (eg. rail card family from the ÖBB for 19€ a year, or upper austria regional tickets for school children for 77€ a year, etc.)

One problem is that it's not just train tickets, but you also need tickets for bus/tram/subway, and every city/region has different systems, so for every trip I spend about 15min trying to figure out which tickets to buy.

yarcob··on Klimaticket: All public transport in Austria with a single ticket for 1095 EUR/y
If you do only one trip a year, then that trip costs 140€ (37 * 2 + 66)

If you do the trip 10 times a year then it costs 81€ per trip (37 * 2 + 66 / 10).

So in this case the occasional rider pays 59€ more per trip than the regular rider.

yarcob··on Klimaticket: All public transport in Austria with a single ticket for 1095 EUR/y
It sounds cheap, and it's probably a good deal if you ride long distances or frequently.

But when I recently planned a trip from Linz to Vienna for our family it would have cost around 120€ for the train (not including tickets for bus or subway to get to/from train station). Driving costs around 40€ for gas (not including parking fees).

yarcob··on Klimaticket: All public transport in Austria with a single ticket for 1095 EUR/y
That's one way to look at it. Another way:

Every sunday hundreds of people drive from all over Austria to visit the zoo in Schönbrunn. They take the car because the train is way too expensive. If taking the train was cheaper then some of those people would take the train.

Yes, for each of those families it's just one trip. But in aggregate it's also a lot of people.

Why is it more important to get one person to use public transport for 500 trips rather than getting 500 people to use public transport for one trip?

yarcob··on Klimaticket: All public transport in Austria with a single ticket for 1095 EUR/y
I still think it should be cheaper. The rail card thing is just a scheme to overcharge casual riders and tourists. It's reasonable for people who regularly go by train, but for people like me who do just one or two trips a year it feels like a rip-off.

Especially if I want to take my kids, I need to get a different rail card for families, and when you add it all up it's a lot more expensive than taking my car.

For some reason, public transport is always priced in a way that makes it really expensive for occassional usage. If you go everday, then an annual pass is a good value.

If you only ride on public transit occasionally, and you have a car, then taking the car is almost always cheaper. It shouldn't be like that.

yarcob··on PostgreSQL 14
I think I remember a talk where someone manually set up logical replication with triggers and postgres_fdw to upgrade from an old server with zero downtime.
yarcob··on PostgreSQL 14
Why would you first upgrade to PG 10?
yarcob··on PostgreSQL 14
Depends on whether you can shut down the server for some time or not. If you can live with some downtime, just use pg_upgrade if you install the new server on the same machine: https://www.postgresql.org/docs/current/pgupgrade.html
yarcob··on PostgreSQL 14
Now if I only could remember how to convert a JSONB string to a normal string (without quotes)...
yarcob··on Offline First
You are technically correct but the quote you are replying to is taken out of context and does not represent what this article is about.
yarcob··on IMGZ – Paid image sharing
Yeah, that hasn't changed. You can also use the pg_upgrade script instead of a full backup/restore, or use logical replication if you want to upgrade the db server with zero downtime, but upgrading PostgreSQL is still somewhat annoying.
yarcob··on IMGZ – Paid image sharing
I've never used PostgreSQLs large objects. You have to use this awkward API to use them, they aren't stored efficiently either, and as far as I can tell it's just a legacy feature that nobody has bothered to deprecate yet.

In my opinion the only neat thing about large objects is that you can edit files with a posix-like API in a database transaction, but I can't think of a scenario where that would actually be useful.

yarcob··on IMGZ – Paid image sharing
> I understand that postgres is pretty decent at storing large binary data though?

Storing large files in PostgreSQL is possible, but I would advise against it.

PostgreSQL uses a technique called TOAST to store large objects. If you store something in a bytea column, it'll first be compressed (either deflate or a new algorithm that I forgot the name). Then it will be split into 8KB chunks (page size) and stored together with all the other data.

Since most image formats are already compressed, this just wastes a lot of CPU cycles.

Also, the way storage is allocated in PostgreSQL may bite you in the ass. By default, storage is not returned to the OS. If you delete all images, the data will stay on disk and marked as reusable. Only if you do a full rewrite of the table will the free space be made available again.

Also, backups will become a pain. The easiest way to backup PostgreSQL servers is to just do a pg_dump. It works great up to a few gigabytes of data. If you have images or other large objects in the database, then pg_dump will quickly become unfeasible and you will have to find another way to do backups. Not a deal breaker, but something you should be aware.

Also, for best performance, the database should be on fast storage (eg. NVME SSD), whereas the image data typically doesn't need fast storage.

## A Practical Example:

One project I work on is an image database with 50k images. The high resolution previews are around 20GB. The PostgreSQL database with all the metadata is around 20MB.

It takes 10 seconds to do a full backup of the database. Everytime I change something in the application, I first create a dump of the database (which is just a few MB compressed). Then I do my changes, and if I make a mistake I always have a backup that I could restore in 10 seconds.

If the images were stored in the PostgreSQL database, a full backup would take much longer and would require a fast internet connection. And it would be much harder to work with.

My recommendation: Use the filesystem for storing files.

yarcob··on 3D Printing – High Security Key
Wouldn't a CNC mill (or even a manually controlled milling machine) be a better tool for fabricating keys? Brass is pretty easy to machine.
yarcob··on Tesla Safety Score Beta
> and how are SUVs not safer, given they have more mass and a larger crunch zone?

That helps in a head on collission with a smaller car. But it's even safer if you don't collide with anything in the first place.

SUVs have longer breaking distance because of their mass, and because they are higher they don't corner as well and are at higher risk of tipping over.

These factors increase the risk of dangerous accidents versus a normal car.

Also, around 50% of lethal accidents don't involve a second car at all. If you crash into a concrete wall, or if you run off the road, it doesn't matter that your car is bigger, you are still screwed.

The safest car is the one that doesn't get into an accident in the first place, and bigger cars are not necessarily better in that regard.

yarcob··on Tesla Safety Score Beta
I love this.

There are so many people who truly believe ridiculous bullshit with regard to driving.

People have been telling me that SUVs are safer cars (questionable) or that higher powered cars are safer (highly questionable) or that driving slower than the speed limit increases the risk of accidents (no comment).

If this score provides real time feedback to people based on real world data, maybe it can help change somebodys mind. Maybe it can nudge people to become slightly safer drivers.

yarcob··on No, we won’t have a video call for that
> Everyone I know uses YouTube as a de facto reference. They don't read blogs, Wikipedia, news articles or company documentation, rather they look for explainer videos or tutorials.

This comes as a complete surprise to me because I don't know anybody who uses Youtube for technical information. Everyone I work with primarily uses Google or DuckDuckGo to find answers on blogs or on stack overflow. If that doesn't work they check the official docs.

yarcob··on Apple's Power Move to Kneecap Facebook Advertising Is Working
I thought the same thing when I found out about that, but it kinda makes sense.

Facebook tries to show you the most "interesting" posts. If you are a member of many groups, there are probably too many posts in your groups to show all of them in your newsfeed. So Facebook just picks whatever they think is interesting.

Or the poster can pay to have everyone see the post.

Anyway, I prefer this monetisation strategy to creepy tracking.

yarcob··on Apple's Power Move to Kneecap Facebook Advertising Is Working
Facebook might pivot towards other monetization strategies when their cross-platform web tracking ads don't work anymore.

For example, Facebook offers you to pay to "increase the reach" of your posts. This happens for example when you try to post a message to a Facebook group. If you want to make sure all members see the message, you have to pay.

This is a way that Facebook monetizes without tracking (targeting is based on people who opted in to join a group) and the users pay directly in the app (allowing Apple to get their 30% for the in-app payment).

With Apples changes, Facebook (and others) might focus more on strategies like that.

← PreviousPage 2 of 19Next →