Hacker Newsnew | past | comments | ask | show | jobs | submit | patrickthebold's commentslogin

I'd be good to give an example of where the 'only if' doesn't apply. If only to clear up the confusion.


Sorry, I had a mental skip. I was thinking of solutions to a+a+a=0, not a+a+a=a.


Half a quarter.


Is gas sold as a whole penny amounts in those locations? Where I am it's always something and 9/10ths of a cent.


Allowing gas stations to denominate their prices by the 10th of a cent has always struck me as a just an underhanded and extreme way to practice the "9.99" retail psychological trick. Why not allow retailers to price things 9.99999? Ridiculous.


It's because technically the dollar is divided into Dimes, Cents, and Mil. (this is why dimes say 'One Dime' on them instead of 'Ten Cents'.

So while the mil isn't really used anywhere else that regular people see any more due to inflation, it is a valid division of the dollar and that's why they are able to get away with it.


> (this is why dimes say 'One Dime' on them instead of 'Ten Cents'.

No, it's purely stylistic. We tend to spell out denominations on coinage and "dime" is just the American spelling of disme, meaning a tenth.

The capped bust dime from 1809-1839 had "10 C." rather than "One Dime". Similarly, the capped bust quarter said "25 C." instead of the modern "Quarter Dollar", the half dollar said "50 C." rather than the later "Half Dollar" and the half dime said "5 C." rather than the later "Half Dime."

Most of the 18th century and early 19th century coinage, besides half pennies and pennies didn't have their denomination written on them at all.


There is no such decipence division in the UK, but fuel is still sold with a vestigial .9 pence on the end. In fact, since the denomination is per litre, not gallon, the .9 is about 4 times more significant.

When the final calculation of XX.YYY litres * AAA.9 pence/litre is done, it's then rounded off to 1 pence.

Currency conversions are also frequently done with readers that aren't a round multiple of pence, even in official government tables: https://www.trade-tariff.service.gov.uk/exchange_rates/view/...


I'd like to clarify that point a bit.

They're allowed to get away with it because of a dysfunctional lobbying driven government. Mils don't exist in the common knowledge and if any reasonable person looked at this they'd call it out. It is useful in accounting but a Mill has never been minted and the last half penny was minted in 1857. It has never been possible using issued physical legal tender in the US to pay a debt of $3.129

The Mill doesn't exist because of some archaic need - it's pure dysfunction and the utilization of it in gas prices is a practice that should and very easily could be made illegal.


Yes, the "Mill" discussion looks to be totally irrelevant. [1] and [2] seem to back up my claim that, at least in modern times, it's purely a "just-below pricing" psychological trick and has nothing to do with the Mill unit.

$4.999 looks a lot smaller than $5.00 to everyday people and it makes the gas company more money than $4.99. That's all there is to it.

1: https://www.cbsnews.com/minnesota/news/why-do-gas-prices-alw...

2. https://www.cnn.com/2022/06/14/energy/why-gas-prices-fractio...


Certain states have manufactured plastic mill tokens in the 1920s and 30s to aid in the payment of taxes: https://en.wikipedia.org/wiki/Sales_tax_token


So do whatever they do with mils but for the penny too. They don’t nor have they ever minted a mil coin, so the procedure for this is already well established if this is correct.


Has a Mil ever been minted?


It has not - and it's been more than 150 years since the last sub-cent denomination (the half penny) was minted.


Not by the US mint but they exist: https://en.wikipedia.org/wiki/Sales_tax_token


Turns out the station charges you a round number of cents per gallon. Then there are federal taxes, which are, IIRC, 24.5 cents per gallon. And then there's state tax, which varies from state to state but seems to always be x.4 cents per gallon.

So I don't think it's just "evil retailer tricks".


Actually, I'd say by all means, allow them to price things $9.99̅ so we can all agree it's equal to $10 and be done with it.


of course 9.99...(repeating) is mathematically 10, so I have a hard time being against allowing that.


The amount is only rounded at the end of the transaction. Those fractions make a difference if you're buying more than a few gallons


Is the amount rounded before or after taxes? Must be after or you have to round again. So who eats or gains the rounding? The merchant or the tax collector?


I think I might be missing something basic, but if you actually wanted to do a Fourier transform on the sound hitting your ear, wouldn't you need to wait your entire lifetime to compute it? It seems pretty clear that's not what is happening, since you can actually hear things as they happen.


Yes, for the vanilla Fourier transform you have to integrate from negative to positive infinity. But more practically you can put put a temporally finite-support window function on it, so you only analyze a part of it. Whenever you see a 2d spectrogram image in audio editing software, where the audio engineer can suppress a certain range of frequencies in a certain time period they use something like this.

It's called the short-time Fourier transform (STFT).

https://en.wikipedia.org/wiki/Short-time_Fourier_transform


Yeah. But a really annoying thing about the STFT is that its temporal resolution is independent of frequency, so you either have to have shitty temporal resolution at high frequencies or shitty frequency resolution at low ones, compared to the human ear. So in Audacity I keep having to switch back and forth between window sizes.


Yes exactly. This is a classic "no cats and dogs don't actually rain from the sky" article.

Nobody who knows literally anything about signal processing thought the ear was doing a Fourier transform. Is it doing something like a STFT? Obviously yes and this article doesn't go against that.


You’ll also need to have existed and started listening before the beginning of time, forever and ever. Amen.


Not really, just as we can create spectrograms [1] for a real time audio feed without having to wait for the end of the recording by binning the signal into timewise chunks.

[1] https://en.wikipedia.org/wiki/Spectrogram


Those use the Short-Time Fourier Transform, which is very much like what the ear does.

https://en.wikipedia.org/wiki/Short-time_Fourier_transform


Yes, but the article specifically says that it isn't like a short-time fourier transform either, but more like a wavelet transform, which is different yet again.


Barely different though. Obviously nobody is saying it's exactly a Fourier transform or a STFT. But it's very like a STFT (or a wavelet transform).

The article is pretty much "cows aren't actually spheres guys".


I'd say the title is like that (and I agree with someone else's assessment of it being clickbait-y). I think the actual article does a pretty good job in distinguishing a lot of these transforms, and honing into which one matches most.

But the title instead makes it sound (pun unintended) that what the ear does is not about frequency decomposition at all.


The fourth sentence in the article is "Vibrations travel through the fluid to the basilar membrane, which remarkably performs frequency separation", with the footnote

"We call this tonotopic organization, which is a mapping from frequency to space. This type of organization also exists in the cortex for other senses in addition to audition, such as retinotopy for vision and somatotopy for touch."

So the cochlea does frequency decomposition but not by performing a FT (https://en.wikipedia.org/wiki/Fourier_transform), but rather by a biomechanical process involving numerous sensors that are sensitive to different frequency ranges ... similar to how we have different kinds (only 3, or in birds and rare humans 4) of cones in the retina that are sensitive to different frequency ranges.

The claim that the title makes it sound like what the ear does is not about frequency decomposition at all is simply false ... that's not what it says, at all.


It's very unlike both of those, as the nice diagrams in the article explain; not only is what it is saying not obvious to you, it is apparently something you actively disbelieve.


I agree.

Ideally we could just increase the tax credits so it's large enough to cover the childcare expenses (and other necessities), and let the families decide what is best. And yes, some people are going to do a bad job taking care of their kids and spend the money on something else. But my understanding is that it generally works well to just give people money, rather than pay for specific things.


One thought I had recently: Their shareholders are probably mostly the same people. So why even compete?


Aren't every big publicly traded companies shareholders pretty much the same large index fund managers?


Don’t give the FTC any ideas.


actually yeah, let's give them some ideas


Because that's all they know how to do.


Just a thought: Make the velocity of the path constant. There should be some way to take a derivative an set it to a constant and solve for z. ( or really reparameterize the curve t' = f(t)) so the velocity is constant.

Actually, now that I think about it, choosing z = c * t is kind of both influencing how the path is parameterized as well as the path carved out on the sphere.


I've been toying with an idea of a pattern. I'm curious as to if it has a name. I'll write a blog post once I have an app using it. In the meantime, it's (roughly):

  - No Hooks.
  - Don't try to sync any state. E.g. keep a dom element as the source of truth but provide access to it globally, let's call this external state.
  - Keep all other state in one (root) immutable global object.
  - Make a tree of derived state coming from the root state and other globally available state. (These are like selectors and those computations should memoized similar to re-select)
  - Now imagine at any point in time you have another tree; the dom tree. If you try to make the state tree match to dom tree you get prop drilling. 
  - Instead, flip the dom tree upside down and the leaves get their data out of the memoized global state. 
  - Parent components never pass props to children, the rendered children are passed as props to the parent. 
You end up with a diamond with all state on the top and the root of the dom tree on the bottom.

One note, is that the tree is lazy as well as memoized, there's potentially many computations that don't actually need to be computed at all at any given time.

You need something like Rx to make an observable of the root state, some other tools to know when the external state changes. Some memoization library, and the react is left with just the dom diffing, but at that point you should swap out to a simpler alternative.


Have a look at Legend State, it lets you do something very close to this (leaves get their data out of the global state directly) with React.

https://legendapp.com/open-source/state/v3/


you can do something like this with most global state libraries, Jotai to name one. But very soon you'll see that you need effects there, so you'll need that global state solution to be rock solid in that aspect


I happen to also have thought about this. Effects would listen to the global state and if needed do their side effect and update the state. As a type it's just State -> State, with an implicit side effect.

As an example: Say the user clicks a button to submit a form, clicking the button updates the local state to include something like `status: 'SUBMIT_REQUESTED'` then you make the request conditionally, and update the state to `status: 'IN_PROGRESS'`.

It might become a mess, but the point is to do no side effects based on any events, all effects happen conditionally based on the state. My hope is the forces you to actually track everything you should be tracking in your state object.


Reminds me of the Jonathan Richman classic: https://www.youtube.com/watch?v=Y6Pg9IGgQpY


Holy crap, I've never seen a Janathan Richman recommendation on the Internet ever ;) I listened to him like crazy in college (1988ish) and saw him play once. My favorite still remains https://www.youtube.com/watch?v=QR6Ns3AcDco

I know two other people that know of Richman, four if you count my wife and son who I made listen to him!

edit: had to add Richman was a big influence on the Talking Heads :)


Is .git-blame-ignore-revs what you are looking for?


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

Search: