Hacker News new | past | comments | ask | show | jobs | submit | iamds's comments login

VSCode with the platformIO plugin is pretty good


Last time I looked, I thought that VSCode/PlatformIO supported both the ESP libraries (ESP-IDF) directly as well as the Arduino libraries (which I think are based on ESP-IDF.)

My personal preference is to use the Espressif libraries rather than Arduino libraries, but I used to program micro-controllers for a living so I'm more comfortable with that development environment.


If you read his old blog posts from about 10 years ago he didn't reiterate anything. If you then read the comments on those posts you'll understand why he now does!


why add the complexity of bcd when you can just put in it units (e.g. cents) where there's no decimal point?


What do you do if heavy deflation causes the government to release a $0.001 coin? A cent isn't a fundamental unit.

Edit: as another hypothetical, what if the $0.001 coin is released to support micropayment use cases?


Actually that would break so many things (the cent as the smallest unit in law and in custom where that is currently the case) that governments may by preference issue a whole new currency instead of stir that pot.


I thought the smallest unit in the US was the mill. https://en.wikipedia.org/wiki/Mill_(currency)

> https://www.law.cornell.edu/uscode/text/31/5101 says "United States money is expressed in dollars, dimes or tenths, cents or hundreths,[1] and mills or thousandths. A dime is a tenth of a dollar, a cent is a hundredth of a dollar, and a mill is a thousandth of a dollar."

> [1] So in original. Probably should be “hundredths,”.

About the only time you see values given in mills is with gas prices, like $4.999/gal, though often denoted as tenths of a cent. It's also indirectly used in property taxes.


This year on our local ballot there is a tax levy to approve an increase to the property tax by 5 mills per 100,000 dollars of assessed property value. Allegedly allowing them to raise a few million over the next 10 years to pay off an addition to the school.


These systems use something like 10^-8 as the implied decimal in the real world. Some forex exchanges even go to 10^-9


Fiat currency can go to -4 i think, crypto currency going to -18. And that's whole units like cents P.S. crypto things are using uint256 internally, and this type don't exist in most languages. Using int64 can work out, sometimes, and will usually break soon enough


In a situation like that I think it would be better to have the system not work until it’s fixed than to potentially lose precision and work with untested inputs


Worth noting that hyperdeflation has never happened, which is kind of interesting because it theoretically could.


I believe that economists generally think that a small amount of inflation is good for the economy, and that deflation is bad (because it leads to reductions in spending and investment, potentially causing a vicious circle). It's also relatively easy to counteract - just print more. In order for hyperdeflation to occur you'd need a currency where the issuing body didn't believe deflation was bad, or didn't care.


Bitcoin has a hyper deflationary monetary policy hard coded in.


Yup, and as a result, nobody wants to actually treat it as the digital currency that it was originally set out to be.

Anybody who truly thinks Bitcoin could hit $100K value certainly doesn't want to spend them.


It's not really symmetric. It's not hard to imagine a situation where everyone stops believing something (a currency) is not worth anything anymore. But why would somebody believe that nothing except currency is not worth anything?


Not sure what exactly you call hyperdeflation, but something like that has occurred in communist Czechoslovakia in 1953.

https://cs.wikipedia.org/wiki/%C4%8Ceskoslovensk%C3%A1_m%C4%...


I think you could easily convert every stored value to the new unit of measure by multiplying by an appropriate factor. In your example that would mean multiplying all the old values by 10. But when you're designing such software, you could also be conservative and use a smaller unit than cents (which probably many financial sw already do, as you already have things considering fractions of cents like gasoline prices).


Different currencies already have different rules. Any good accounting software isn't going to assume US cents. Update your currency table to include a version of USD in increments of $0.001. Update the amounts on a need-be basis. ( Multiply by 10 and change the currency type)


Division. 1/x is a common operation in finance (particularly in trading), and you'll get all sorts of trouble if you try to express everything in cents.

So, you'll need subpenny fractions (e.g. 8 decimal points), or BigDecimal, or decimal-normalized floats.


Because it is very common to need to deal with fractions of a cent in intermediate calculations.


Decimal float has a larger range and a more natural representation when debugging than fixed point. Either way works well though.


'The figures do not specify how people died, or whether the death was related to the care they were expecting from the NHS. The data also does not contain ages or medical conditions' This is a mischievous use of statistics

If an eighty year-old dies from a heart condition while waiting for an appointment at their local hearing clinic, they make this list

All this data really tells us is that the NHS is underfunded and badly managed, leading to backlogs and delays in treatment

Which is already obvious to everyone


> All this data really tells us is that the NHS is underfunded and badly managed

It doesn't even tell us this. The metric could increase if you e.g. treat more conditions, treat older/sicker people that you used to, improve health education/screening to identify more at risk people that used to die before any diagnosis etc.


House prices in london have always been expensive. That 200k house in Earls Court adjusted for inflation would be £410k now.

But back in 1990 interest rates were a whopping 14% - that means that a 25 year mortage would have cost the equivelent of £4935 each month.

Today that house is worth 1.5 million. The same 25 year mortgage at today's interest rates would be £5158 a month.

So really house prices haven't changed that much, it's just that the money is going to different places.


It's not an affiliate link. Affiliate links have "?tag=". The "?ref"= is for internal tracking within Amazon.


It can simplify templates; allowing you to treat free functions and class methods the same way.


I see. Thanks for the reply.


How do you has words so that polynomial hashes to the same value as pollinomial?


For the input word, generate all variants which are within edit distance of 2, generate their hashes, and check if any of those hashes are in the list of hashes generated from corpus.


sounds very expensive, surely there must be a more efficient way?


The introduction of the smartphone has changed children for the worse. The children now love luxury; they have bad manners, contempt for authority; they show disrespect for elders and love chatter in place of exercise. Children are now tyrants, not the servants of their households. They no longer rise when elders enter the room. They contradict their parents, chatter before company, gobble up dainties at the table, cross their legs, and tyrannize their teachers.


I don't understand modern children. They're all Greek to me.


Can someone explain how this link has made it to number one on the front page, when it seems from the comments that no one understands what the page is saying?


It's from a comment [1] to a discussion yesterday. So many probably already know the context of this.

[1]: https://news.ycombinator.com/item?id=9065375


Maybe people are upvoting in the hope that somebody will be able to explain it.


i'm trying to understand the problem too :v


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: