HNHacker News
TopNewBestAskShowJobs

SkiFire13

1,970 karma · joined March 10, 2021

submissionscomments
SkiFire13··on Banks and Credit Unions to Team Up Against Apple Pay Fees
See "What do Visa and Mastercard do?" https://news.ycombinator.com/item?id=49614280

It's not something irreplaceable but it's not trivial either.

SkiFire13··on Postgres SELECT DISTINCT Does Not Scale
The manual workaround is even documented in postgres' wiki https://wiki.postgresql.org/wiki/Loose_indexscan
SkiFire13··on Postgres SELECT DISTINCT Does Not Scale
> Why don't he use GROUP BY on indexed columns was my first thought also.

Because it has the same issue.

SELECT DISTINCT and GROUP BY are equivalent from a query planner perspective.

SkiFire13··on Swap, ZRAM, Zswap and Hibernate on NixOS
Is this considering RAM for disk cache too?
SkiFire13··on More floating point alternatives
> That makes me think that I can just plan ahead by storing the number of cents instead of dollars

That's what is generally suggested when handling money, at least for normal businesses (in finance related businesses you might have to handle a lot more decimal places for things like exchange rates, fractions of cryptos etc etc)

Be careful though that some currencies require more than 2 decimal places.

SkiFire13··on Will Open Source Survive the Agents That Replaced It?
> This week I replaced my home security camera system with open source Frigate, because I was able to use AI to take the source code, replace the object detection models that were included with the code with something that was a better fit for my machine, customize how the videos were stored and under what circumstances. There's a lot more that I can do with it that I haven't yet as well. > > I couldn't do that with the proprietary system.

You also didn't give anything to opensource. This shows that AI can allow open source to be used in more cases and in more flexible ways, but in no way does this mean that open source (and especially the good high quality one) will explode.

If anything we saw an explosion of open source projects, most of them low quality slop, and even the ones that used to be high quality are slowly degrading.

SkiFire13··on More floating point alternatives
> Another way is to think of it as an interval of real numbers between the next lowest and highest intervals. Under this latter interpretation, it makes sense to discuss shortest decimal string within the interval, 0.3 in this case.

Note that the result of 0.1+0.2 does not lie in the interval containing 0.3, which is was confuses most people. The issue is that there is some imprecision in representing 0.1 and 0.2 too, and that compounds when summing, resulting in something that does not actually correspond to 0.3 (hence the classic 0.1+0.2!=0.3)

SkiFire13··on More floating point alternatives
> deterministic answers

> 0.2+0.1

0.2+0.1 with floating point numbers _is_ deterministic, as you'll always get the same answer.

I suspect you might instead mean exact calculations/answers (in the example above, neither 0.1, 0.2 nor 0.3 have exact representations using floating point numbers).

And just to be clear, there are non-determinism-like issues with floating point numbers, but those are much rarer/niche and _can_ be fixed. For example parallel summation depends on the order the summation was made, so non-determinism in the parallel implementation ripples through the summation result. Some non-basic operations (e.g. trigonometric operations) have platform dependent implementations with different roundings, so you might experience different result based on the platform you're on.

SkiFire13··on In September, AI generated code has made up 17.25% of all Linux Kernel patches
> with AI it can be done cheaper and faster

And they are probably right. But they are probably also missing that this will translate to worse quality. You know, the classic "you can only pick two among good, cheap and fast"

SkiFire13··on The Google Play app review process now regularly takes longer than a week
> usually within 24 hours

I have never seen Apple approving within 24 hours

SkiFire13··on Stabilizing Rust's Never Type
Not only that, if you have `trait Foo: Iterator<Item = u8>` and `trait Bar: Iterator<Item = i32>` how could `!` implement both of them? It would simply make the language incoherent.
SkiFire13··on GrapheneOS' rewritten Messages app is released
Both are for for different niches, but their intersection is relatively big.
SkiFire13··on Neki – Sharded Postgres
That page doesn't mention how joins between tables using different split keys work, or how indexes work.
SkiFire13··on Blizzard Workers Win Historic Union Contract
Remember that correlation != causation.

They might also have unionized due to the bad conditions while developing GTA 6, which could also lead to it being a bad game. Who knows though.

SkiFire13··on What do Visa and Mastercard do? An intro to card networks
I reached the midpoint of the podcast without seeing a proper argument against this then I gave up.

It tries to argue that higher reward rates are necessary to attrach customers that pay a lot (for credit card companies) and that lower income people are generally subsidized by taxes (obvious but unrelated), but at no point (until where I read) it seems to address the issue of merchants having to generally increase prices due to these cards.

SkiFire13··on What do Visa and Mastercard do? An intro to card networks
> credit card providers

The article did an awesome job explaining what are the parties involved and you choose to use a generic term instead.

> dealing with fraud and chargebacks

A lot of that is offloaded to the merchant, which instead has to pay them on top of what they already pay to the issuer bank.

SkiFire13··on Alberta (Canada) slaps punitive tax on solar panels
> it’s a $14 fee per solar panel

Note that usually you mount many solar panels, not just one, so this will stack relatively quickly.

SkiFire13··on Visualizing Rust's Vtables: How dyn Trait Works In Memory
The vtable contains at least the following informations:

- the size of the pointed type - the alignment of the pointed type - a function pointer for its drop glue

That's already quite big to inline to save on indirection, and this is before adding more methods.

SkiFire13··on Visualizing Rust's Vtables: How dyn Trait Works In Memory
> for some reason

Just to expand on this: which vtables will be needed is not known before running codegen. At that point however multiple codegen units might generate the same vtable, and that might not get deduplicated by a later pass.

Moreover with dynamic linking (especially on Windows) it's impossible to guarantee that such vtables will be unique.

SkiFire13··on Visualizing Rust's Vtables: How dyn Trait Works In Memory
> This is possible in C++ too, but it may require extra work.

Everything is possible, what matters is how much work you have to do to achieve and maintain it.

> You have identical memory overhead in Rust and C++ if you store a single pointer to a polymorphic object. But if more than one such pointer is stored (if it's shared), Rust uses more memory, since it stores N virtual table pointers (together with each object pointer), where C++ stores exactly one virtual table pointer within the object itself.

On the other hand Rust uses less memory if you store 0 polymorphic pointers, while C++ still pays the cost of storing a vtable pointer for each object instance.

Effectively C++ choose a design that optimizes for having a lot of polymorphic pointers, while Rust optimized for supporting polymorphism for all objects at no extra cost if you don't use it.

SkiFire13··on GPT-6 Astra on OpenRouter
No, it would mean models are good at pelicans svgs, not svgs in general.
SkiFire13··on Pre-Release of Polars 2.0
Yes, the features don't need to be added immediately.
SkiFire13··on Don't use musl if you care about performance
> I wish compilers would just have something like __builtin_memcpy and __builtin_memset

The ones provided by the compilers are simply the libc ones.

LLVM will even go as far as detect attempts to rewrite memcpy and replace them with a call to the libc one!

SkiFire13··on Don't use musl if you care about performance
The 26% slower appears to be for their whole application, not just the allocator. For some parts of the application to make the whole this much slower it must mean that those parts are quite a lot slower, likely much more than 2x.

Moreover the 26% is with mimalloc, with musl's allocator it's 144%, so there are likely other parts that are slower (likely the memcpy implementation)

SkiFire13··on How credit card rewards became a $9.2B wealth transfer
The costs of credit cards are higher in part because of the reward programs for using such cards. That's where the wealth transfer happens, and there's nothing like this for cash.
SkiFire13··on Value Classes Still Need Compiler Sympathy
For which key types, hashmap implementation, and hasher? Depending on these factors hashmaps performance can vary a lot.
SkiFire13··on Value Classes Still Need Compiler Sympathy
> So O(n) could be faster than O(log n) depending on the size of the data structure and interactions with RAM pre-fetch, etc.

This has always been the case. The RAM effects only changed at which point the O(n) stops being faster than the O(log n) solution.

SkiFire13··on Value Classes Still Need Compiler Sympathy
> don't worry about low-level stuff like value/reference classes

Part of the issue is that this was never low-level stuff. When you're selecting between the two you're making a semantic choice, and that's not something a compiler can do for you.

SkiFire13··on Why some US restaurants are banning tips
It's not a good enough proxy for more people. If you compare the least and most costly items on a menu, even adjusting for size, you'll find that there's often a 2x to 4x difference between them. If I pick one over the other I will also have to pay 2x to 4x in tip. That just doesn't checkout.

Also, why do you need a proxy for the number of people when you can just count them? In Europe a service charge is relatively common and it's a per-person fixed charge.

SkiFire13··on Don't Wordle
> Sadly there's a rule not letting you use a known letter more than once in a word (once A is known, you can't write ALPHA)

This is not entirely correct (or at least it's worded a bit weirdly).

If you know that A goes in a certain place you can still try a word using A more than once. It's only once you know that A does not appear twice (because you tried a word containing A twice, and the second A way gray!) then you can no longer use A twice.

In your case you tried MAMMA which contained 2 As and the second one gave you the information that there's no second A.

Page 1 of 29Next →