Readit News logoReadit News
throwaway294566 commented on Engineers' billing nightmares   github.com/getlago/lago/w... · Posted by u/AnhTho_FR
Waterluvian · 3 years ago
Why not javascript specifically? Using integers or floats is wrong in any language. You want a decimal representation library when dealing with money.
throwaway294566 · 3 years ago
No. You want a parametrized "Money" type, one that can do calculations in varying numbers of decimals, and configurable rounding. There are legal requirements that make this necessary.

One (from memory, not exact) calculation I've had to implement for a customer: Multiply prices by whole numbers. Prices are given in cents subdivided to 5 digit precision, result should have 10cent precision, rounded down. Then, for the tax calculation, get taxes from some tables, 3 different taxes for each line item. Apply the first two taxes, Euros with 10 digit subdivisions, then round "according to trade custom" (which is the usual "up from .5 cents, down from below .5"). Then add the third tax, Cents with 5 digit subdivisions, round down. Then add all the line items and their taxes, separately as well as together.

And if there is a Skonto, take care to properly unravel the tax stuff again.

I've had to do it in plain Typescript, it is possible, but it really sucks. Those days when you yearn for COBOL... ;)

throwaway294566 commented on Falsehoods programmers believe about undefined behavior   predr.ag/blog/falsehoods-... · Posted by u/sanxiyn
leni536 · 3 years ago
No, it isn't. The line with UB has to be reached in the execution for the execution to be undefined.
throwaway294566 · 3 years ago
Yes, but there is more to it: The compiler may assume that UB will never happen intentionally and optimize out the branch containing UB.
throwaway294566 commented on Falsehoods programmers believe about undefined behavior   predr.ag/blog/falsehoods-... · Posted by u/sanxiyn
suprjami · 3 years ago
No it doesn't. Modern processors do out-of-order execution, so your program might be doing UB before you expect.
throwaway294566 · 3 years ago
Out-of-order execution isn't the reason for this. The C standard assumes an abstract machine that allows OoOE, of course, but even with strict in-order hardware UB can hit you at any time, even before you'd think it could. That is because the C standard doesn't limit UB to any constraints like "following lines" or "subsequently executed instructions". Independent of the hardware, the compiler is allowed quite a bit of reordering of instructions. The standard just requires that (some) effects of those executions are ordered as written, but that doesn't include UB.

So if you have UB in your future path of execution, the compiler might just do whatever _right now_.

throwaway294566 commented on Asian faiths try to save swastika symbol corrupted by Hitler   apnews.com/article/religi... · Posted by u/pseudolus
sph · 3 years ago
I guess words don't mean anything any more.

No, the Roman fasces are not fascist. Imperial Roman power is not fascism, even if fascism tries to fashion itself to Imperial Rome. If A claims inspiration from B, it does not mean that they're the same thing nor interchangeable.

The difference between the two is 2000 years and one being an entire civilization that spanned hundreds of years, and the other a relatively short lived political ideology, based on reactionary nationalism, autarchy and later anti-semitism (racial purity was more a Hitler kinda thing).

throwaway294566 · 3 years ago
Roman imperial power isn't fascism in that some important aspects do differ. E.g. fascism uses a special kind of modern aesthetics that Romans wouldn't recognize, even if fascist monuments copied Roman building style. Fascism also practiced a cult of youth and rejection of conservativism that is quite the opposite of what the Romans practiced (as far as the 2000 years of separation allow us to compare this). In that sense, you successfully built a straw-man argument ("Imperial Roman power is not fascism") and disproved it.

But, more importantly, "imperium" doesn't mean what you think it means. There are two meanings to "imperium", one being the overall realm that Rome controlled, the Roman empire. This is the meaning you did use in your above straw-man. Usually, this meaning of imperium is represented by symbology such as the eagle and the S.P.Q.R. signature. Italian fascists also used those symbols, but the international fascist movement mostly didn't, because just the Italians wanted to rebuild their Roman empire. However, the fasces represent the second meaning of "imperium", which is the absolute power of one single individual official to rule and impose order in his assigned domain or subdomain. They represent the ordering principle of fascism and nazism that a strict hierarchy of individual leaders ("duce" in Italian, "Fuehrer" in direct German translation) should rule the state ("Fuehrerprinzip" in German). Fasces also represented the primacy of punishment and violence in imposing order, of swiftness and immediacy in carrying out justice, very much what modern day fascism wanted to return to. So Roman fasces are representing what modern day fascists intended for the principles of leadership, justice, punishment, and order to look like. But beyond those aspects, there can be no inference made, because modern-day Fascism encompasses more aspects than just those.

That there is a 2000 year difference between the cultures in which to interpret the aforementioned symbolisms is a problem indeed. However, it is a problem that was created by people like the americans thoughtlessly using symbols because "well, Rome was a republic, we want to build a republic, let's just steal all of their iconography". Even back in that day, the actual meaning of fasces was known and clear. It was known and clear to the Romans as well. Hell, look at the list of uses for fasces in the wikipedia article: mostly police forces and departments of corrections, monarchies and off-with-the-heads mobs (such as the early french post-revolution order).

throwaway294566 commented on Asian faiths try to save swastika symbol corrupted by Hitler   apnews.com/article/religi... · Posted by u/pseudolus
sph · 3 years ago
Fasces are not a Nazi symbol. They were very common in Fascist Italy—due to its association with Ancient Rome Mussolini was a big fan of—and the Fascists were culturally and ideologically allied with Nazi Germany. But AFAIK it was not a Nazi symbol.

But they're not a Fascist icon either, despite what your comment suggests. The fact that it appears on the Senate building probably refers to the Roman meaning. The point of TFA is pointing out that these symbols are NOT owned by the Fascists or Nazis but should instead be returned to their cultural origins.

throwaway294566 · 3 years ago
> The fact that it appears on the Senate building probably refers to the Roman meaning.

The roman meaning is very much fascist, if phrased in modern terms. Fasces were carried by lictors accompanying a roman official, symbolizing the "imperium", or absolute, king-like power, held by that official over his domain. While for a time, the imperium of lower officials was somewhat curtailed during the republic, military commanders with imperium still held the absolute and immediate power over life and death of their subordinates (other officials still had power over life and death, there just was an opportunity for citizens for appeals and vetoes by equal-ranked officials) . Lictors with their fasces were not only bodyguards but also a small police force at the discretion of the commander, who would seize an offender, hold him for a drumhead trial by the commander and then punish (e.g. execute) him if so decided. Under the later roman dictatorships the dictator (imperator, emperor or caesar) of course also held those powers, with the same symbolism of imperium represented by the fasces. Fasces always have been a symbol of capital punishment, justice by drumhead or thumbs down, and absolute power.

throwaway294566 commented on Asian faiths try to save swastika symbol corrupted by Hitler   apnews.com/article/religi... · Posted by u/pseudolus
amriksohata · 3 years ago
Nowhere in the mein kampf by Hitler does he call it a swastika, in the original German publication He called it haken Cruz which literally means hooked cross, it being a hooked Christian cross. t was a Christian bishop who translated it to English and translated hakencruz to swastika. Effectively taking the blame off Christianity and pushing it onto eastern religions
throwaway294566 · 3 years ago
In German, there are no two terms for those, both are called "Hakenkreuz". And the Nazi ideology actually made references to eastern culture and peoples, claiming that Germans were descendents of the Aryan peoples: https://encyclopedia.ushmm.org/content/en/article/aryan-1

And while Nazi antisemitism was of course descended from the traditional christian antisemitism, there were also parts of the Nazi movement that called for a replacement of christianity by an "Aryan" or "German" religion, which seems to have been a mixture of Germanic/Norse religion and more modern esotericisms.

So yes, while eastern religions are blameless for what the Nazis made of their symbol, it also isn't of christian descent either.

throwaway294566 commented on The Exceptionally American Problem of Rising Roadway Deaths   nytimes.com/2022/11/27/up... · Posted by u/IfOnlyYouKnew
twblalock · 3 years ago
> We have the same problem in the EU.

Then how does that explain why increased road deaths are exceptional to the USA?

throwaway294566 · 3 years ago
Because, while the same problem exists, it doesn't exist to the same extent. The average size of the vehicles is smaller, even bigger European SUVs are far smaller than what americans call trucks. And there are less of the really big and deadly ones, almost none with a neck-breaking-bar, etc.
throwaway294566 commented on The world of pipe fittings   naich.net/wordpress/index... · Posted by u/naich
SaintGhurka · 3 years ago
"combination of Hessian/burlap jute-type rope (of which there is always some lying around in my workshop) and linseed oil based paint."

Could you explain that? How do you seal pipe fittings with rope?

Edit: found an explanation. TIL that you can use the fibers just like tape and wrap the threads.

throwaway294566 · 3 years ago
You don't need oil, just rope works as well. Every DIY store (at least over here) has loose manila fibre for that purpose. Wrap into the thread, screw it together, done. The not-so-nice problem: It might leak at first. The nice feature: The fibres will soak up water (thats why oil is actually counterproductive), swell up and make a tight fit after half an hour or so. You can even readjust the angle (other than with PTFE tape), it'll just drip for another half hour.
throwaway294566 commented on CATL's Sodium-Ion Battery   medium.com/predict/catls-... · Posted by u/simonebrunozzi
jimnotgym · 3 years ago
The weekly HN 'new battery chemistry will solve all worlds problems' story.

I will believe it when I see it

throwaway294566 · 3 years ago
Yes. My question is always "show me the shop where I can buy it". Never an answer ;)
throwaway294566 commented on German privacy watchdogs conclude that Microsoft 365 is incompatible with GDPR   twitter.com/wolfiechristl... · Posted by u/Quanttek
andsoitis · 3 years ago
> have decided not to fine their public institutions for GDPR violations

Because they’re too Byzantine to make enforcement practicable, or because they’re not seen as a privacy risk (the government in Germany should know lots about you), or something else?

throwaway294566 · 3 years ago
The official argument is that fining public institutions is a game of taking from the right pocket to put in the left pocket. It's the state fining itself. Also, officially, public servants are thought to obey the law as a matter of cause. A certain interpretation of the law can just be made an official order to all subordinate government agencies, and any civil servant disobeying that interpretation is at fault for not performing their duties and treated accordingly.

However, that all leads to the obvious workarounds: the official interpretation is usually the most lenient possible, compliance is put off to some time next century due to lack of personell/budget/willpower. And if something is found to be amiss, the data protection officer may order a government agency to fix whatever is wrong, but can neither fine nor discipline a civil servant. Because disciplining is up to the direct disciplinary superior, which cannot be (due to them being independent) the data protection officer.

u/throwaway294566

KarmaCake day218July 4, 2022View Original