Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
lxgr
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
11 ms
·
241.
▲
by
lxgr
4mo ago
How is that better than {“amount”: “10.00”} (which also bypasses all potential floating point parsing issues that your or your counterparty’s JSON library might have)?
242.
▲
by
lxgr
4mo ago
It makes a lot of sense if you value correctness over performance.
243.
▲
by
lxgr
4mo ago
> The only real correct solution here is to send mantissa and exponent as two separate integers. That’s essentially the same thing as a String-serialized big decimal, just less readable, no?
244.
▲
by
lxgr
4mo ago
I just wish the financial industry itself had known about these when the core banking systems and financial communication protocols of the 60s and 70s were invented that are still being used to this day... Many of these predate the widespre
245.
▲
by
lxgr
4mo ago
Sure, you can do that if you can absolutely guarantee that everyone will always respect that separation and there will never be ambiguity between your internal and some partner's representation – even during incidents, even during low
246.
▲
by
lxgr
4mo ago
You'll definitely have to throw it away at some point. The art is in making those points well-defined and rare enough to not cause large discrepancies, but frequent enough to avoid ballooning arbitrary-precision numbers across database
247.
▲
by
lxgr
4mo ago
Yeah, you need to document it. Still, even if you do: Chances that your users are just going to assume you're conforming to ISO 4217, some national standard, or your competitor that they're already integrated with are pretty high,
248.
▲
by
lxgr
4mo ago
I think what matters most is your database and API representation, as well as having consistent and well-defined rounding rules. I largely agree with TFA: Round explicitly and consistently whenever you cross a boundary, i.e. database persis
249.
▲
by
lxgr
4mo ago
Sure, but are all your (and your users' and vendors') engineers and LLM agents going to remember that? When in doubt, always be explicit.
250.
▲
by
lxgr
4mo ago
Word of advice to anyone considering the "minor-units precision" strategy for representing monetary amounts: Don't (or at least, don't use it as an interchange/API data format). It seems like a clever idea (fast int
251.
▲
by
lxgr
4mo ago
\usepackage{cmap} is usually what does that: > The cmap package provides character map tables, which make PDF files generated by pdfLATEX both searchable and copy-able in acrobat reader and other compliant PDF viewers. (from https:/
252.
▲
by
lxgr
4mo ago
It definitely does. PDF is a vector-based image format historically, and all add-ons that make it behave a bit more sane as a text-oriented document format are optional, so your mileage using tools like pdftotext will vary greatly depending
253.
▲
by
lxgr
4mo ago
The key here is that you used screenshots. This forces Gemini into "OCR mode" (i.e. actually looking at vision tokens) rather than trying to be clever with its tool calls. The latter strategy almost entirely depends on the quality
254.
▲
by
lxgr
4mo ago
> regular pdfs that have been produced in a “normal way” (ie using latex or a modern application with a “save to pdf” function) will contain the text Producing "normal PDFs" that way actually requires specific LaTeX options to
255.
▲
by
lxgr
4mo ago
I could see a future in which ad-funded web sites charge agents some tiny amount per request instead of outright blocking non-human visitors. Besides, you're already effectively giving agents money (tokens aren't free, and agents
256.
▲
by
lxgr
4mo ago
> The Section 75 protections mean Brits who are credit-worthy tend to pay for large purchases on a [credit] card even if they intend to pay it off immediately. And Visa and Mastercard's global zero liability provisions protect every
257.
▲
by
lxgr
4mo ago
> Friends visiting the US told me that at the POS terminal they had to choose credit card despite paying with a Visa/Mastercard debit card issued by an European bank. The "credit" button in the US really means "use th
258.
▲
by
lxgr
4mo ago
Visa isn't a party to your contract with your card issuing bank. Your bank is responsible for filing a dispute, representing it properly, and (according to applicable law and/or as a good business practice for somebody that wants
259.
▲
by
lxgr
4mo ago
Gemini has been atrocious, in my experience. Not sure if it's the harness or the model, but it hallucinates much, much more than GPT (via ChatGPT) or Claude, and weirdly assumes it can just answer complex, knowledge-heavy domain questi
260.
▲
by
lxgr
4mo ago
Why would this risk be higher in the US than in Europe? Europeans usually pay their rent/mortgage using bank transfers too.
261.
▲
by
lxgr
4mo ago
Sometimes it's worth reading the whole comment you're replying to.
262.
▲
by
lxgr
4mo ago
For what? Credit cards existing in Europe and having more than zero users? I trust that Google will serve you well if you really don't believe me.
263.
▲
by
lxgr
4mo ago
Accepting cards from US-controlled schemes is not an issue at all. The geopolitical issue is not having any alternative, and these US schemes being the only way to pay even in domestic transactions. Almost nobody considered this a problem
264.
▲
by
lxgr
4mo ago
In many European countries, "anybody" can take money out of your account, but you can return a direct debit for up to 13 weeks in case of unauthorized payments, and for 8 weeks for no reason whatsoever (including you just feeling
265.
▲
by
lxgr
4mo ago
This has basically nothing to do with it. A bank deposit is a liability of the bank, and possession is not a useful lens here. What matters are the legal and contractual rights and obligations you have against the card issuer. In the US, th
266.
▲
by
lxgr
4mo ago
What number are you entering online? If it's not an IBAN but something starting with a 4 or 5, you're very likely using Visa or Mastercard, or possibly a domestic scheme. This is not the same thing at all as a direct debit, which
267.
▲
by
lxgr
4mo ago
Yes, that's what I was getting at. As a side note, in some countries, it is actually possible to initiate a direct debit at the POS (since cards sometimes contain enough information to recover the IBAN, mostly for historical reasons),
268.
▲
by
lxgr
4mo ago
In the long term, sure, but https://en.wikipedia.org/wiki/FRMCS is some way away, and I doubt they'll upgrade cab radios to 5G for the fallback path alone.
269.
▲
by
lxgr
4mo ago
And a football world cup game just ended.
270.
▲
by
lxgr
4mo ago
Very interesting, I always thought it was completely separate infrastructure by design. I wonder what they'll do once commercial GSM networks throughout Europe are shut down?
More ›