3 ms·
Rewrite it in Rust/Javascript
by skocznymroczny 10y ago
Rewrite it in Rust/Javascript
- jacquesm 10y agoYou're going to have a hard time selling that combination.
- protomyth 10y agoIs there a proper decimal library for either language?
- jacquesm 10y agoMeh, who cares about a few cents ;)
- protomyth 10y agoI still remember tracing down an odd bug involving taxes and contract calculations that resulted from a programmer I thankfully couldn't identify using a single precision float to do calculations that involved unit of measure conversions that then had calculations involving contract terms and weights. The original unit stored was a decimal with 30 total digits and 10 decimal digits. When I finally found the part of the code where decimals suddenly because floats, I was inclined to do violence given it was 3AM and I was chasing a couple of hundred thousand pennies in various places. It was deep in the middle of a stored procedure so the standard excuses don't apply. I swear there are not enough classes about numbers.
- jacquesm 10y ago> I swear there are not enough classes about numbers. Yes. This is one thing that irks me about these fads in programming, they all solve problems that have long ago been solved and then re-introduce all the bugs that were already discovered, fixed and forgotten about ages ago. Old software is a very nice repository of information about edge cases and real world complexity. A $0.75 accounting error turned out to be named "Markus Hess". Precision matters. If it works good. If it works but you don't know why it works: bad. If it works, but has a small problem and you don't know why: bad. If you run a $1M budget and you're off by $0.75: bad. And so on. You really don't want to store anything to do with money in floats.
- protomyth 10y agoI remember a 'Survey of Programming Languages' class in college. Perhaps a archeology of code class and things already done. You are right, I wonder how much of Computer Science knowledge is locked away never to be seen. Perhaps a tax credit for companies that donate their old source code to the Library of Congress.
- jankedeen 10y agoLol. Genius. We see the converts and owners here take exception.
- eggestad 10y agotry writing a rust implementation of linux...