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

Robin Hobb (a very successful fantasy author) rates books on Goodreads. To her, anything over one star is a good rating. Even two stars means she liked it.

https://www.goodreads.com/author/show/25307.Robin_Hobb


Oh, that's great! I'm going to have to remember that!


I like to store angles as turns in my own code, because (as noted) it makes quarter-turns computable without rounding. OTOH if you need, say, twelfths of a turn, you might want to just store angles as degrees since that’s already common.

Michael Spivak, in Calculus (3rd ed p. 301) considers the unit choice to be a property of the function and initially defines sin° and sinʳ (before settling on sin meaning sinʳ) and considers “sin x°” and “sin x radians” to be misleading, saying that ‘a number x is simply a number—it does not carry a banner indicating that it is “in degrees” or “in radians”’. I don’t really understand this argument, since in science and engineering we constantly carry units around with our quantities.


It's because both radians and degrees are are a ratio of a length to another length and are thus dimensionless. No matter how you measure it, all angles are without a unit.

It's most obvious with radians but it's also the case with degrees.

Using radians, you are guaranteed to not introduce unusual extra terms to rescale angles, if you use any other scale of angle you will have to keep track of extra terms.

That may be useful in whatever you're doing. I work in degrees quite often and I'm careful to keep track of the 2pi/360 terms that crop up all over the place. With grade measure you have to keep track of 2pi/400 terms and with turns you have to keep track of 2pi/1 terms that will repeatedly show up.

Again, depending on what you're doing, this may or may not make sense to do.

In general, mathematics works out easier when the scaling term is 2pi/2pi because then you have a lovely 1 scale factor you don't have to keep track of.


It is dimensionless by fiat and convention. It clearly has units such as degrees, grad and radians. Just like other quantities that have units, a specific measurement is expressed as a pure numerical multiple of an unit which may be radians, degrees etc.

This is a known wrinkle in dimensional analysis and people have considered making angles a fundamental quantity such as mass, length and time but have not done so because of the disruption it would cause.

More details here

https://en.wikipedia.org/wiki/Radian#Dimensional_analysis

https://en.wikipedia.org/wiki/Angle#Dimensional_analysis


That's my rabbit hole of the week.

> The current state of affairs leads inevitably to ghostly appearances and disappearances of the radian in the dimensional analysis of physical equations.

In "A spectral unit", Nature Physics (2020) - https://www.nature.com/articles/s41567-020-0997-3.pdf Giacomo Prando summarizes the troubled history of the radian, a unit with the odd property of appearing and disappearing seemingly at will in dimensional formulas

It led me to reading about "dimensionless quantity".

> There have been periodic proposals to "patch" the SI system to reduce confusion regarding physical dimensions. For example, a 2017 op-ed in Nature argued for formalizing the radian as a physical unit.

SI units need reform to avoid confusion (2017) - https://doi.org/10.1038%2F548135b

> The idea was rebutted on the grounds that such a change would raise inconsistencies for both established dimensionless groups, like the Strouhal number, and for mathematically distinct entities that happen to have the same units, like torque (a vector product) versus energy (a scalar product).

Don't tamper with SI-unit consistency (2017) - https://doi.org/10.1038%2F549160d

---

What's surprising is that these discussions are so recent, considering the wide implications on so much practical work in mechanics and engineering. Maybe people got so used to working around the question, that any proposed solution would be too disruptive - so it's better to keep things backward compatible rather than conceptually simple/clear and explicit.

In another comment someone said, "types" (in programming and type theory, I'd guess) are a poor model of physics units. But I wonder about that, it seems "units" are something like types with associated quantities, like degrees with 360, or meters with the speed of light.

This line of inquiry also led me to "dimensionless physical constants". https://en.wikipedia.org/wiki/Dimensionless_physical_constan...

Certainly pi (and e) must be one of those fundamental constants regardless of any unit of measurement. A "turn", on the other hand - well, if we consider 1 as a dimensionless constant that means a "whole"..

How Many Fundamental Constants Are There? (2011) John Baez https://math.ucr.edu/home/baez/constants.html


Ensuring units agree is indeed a form of type checking. A more thorough procedure for the former is dimensional analysis.

I think the fact that action and angular momentum have the same units played an illuminating role in making sense in Bohr's model regarding why only certain orbits are allowed.

Not sure how that would play out once angle is considered a fundamental entity.

This sure is a rabbit hole.

Thanks for your submission

https://news.ycombinator.com/item?id=49372847

hope it gets picked up.


In another comment I made in this thread https://news.ycombinator.com/item?id=49373317 I think it came to the understanding that a "turn" is similar to a dimensionless quantity, as it takes the full circle/cycle as a fundamental 1. Apparently, using the turn as a unit allows one to get rid of pi and e in Euler's formula in favor of 1 and -1.


Yeah. @ttoinou too, I think, had the same thing in mind.

https://news.ycombinator.com/item?id=49371421


I see, maybe it's common sense but I do like "rediscovering" basic facts for myself. (:


Absolutely !

I remember things the best (only) when I discover them for myself. Slow progress but high retention.


Agreed. Though sometimes it's useful to keep track of 'fake' units like for angles, to make something like dimensional analysis work for you.

But that's more for analysis of your code / formulas than when you actually go and compute things.


You might find the following interesting. It is about trigonometry as practiced by early Indian mathematicians. Rather than using an unit circle they used a circle of 3438 units.

https://news.ycombinator.com/item?id=45129081

Now it is customary to standardized on the radius. Early Indian astronomers and mathematicians standardize on the arc length of a minute.


> all angles are without a unit.

Dimensionless, sure, but what do you mean here? Radians and degrees are units, are they not?


In a very awkward way: rad is m/m, which is 1...


Dimensions and units are separate things, though. For example, 1 minute and 1 second are different units of the same time dimension. Similarly, 1 rad and 1 degree are both dimensionless, but they are both different units.


Theoretically, you can define systems of measurement where a lot of seemingly separate things fall on the same units and dimensions. There are "natural units" in physics where you take the fundamental nature of particles and relativity into account and make some convenient choices for some physical constants such as the speed of light c := 1. Then the speed becomes dimensionless, length and time have the same unit and dimension (a length of 1eV is a time period of 1eV), and almost all units are simply derived from a measurement of energy (electron volt, not as basic as people would like, but useful enough).

https://en.wikipedia.org/wiki/Natural_units


> Then the speed becomes dimensionless, length and time have the same unit and dimension

Uh, that is not what the article you linked is saying. Natural units don’t make speed dimensionless, nor allow you to use the same unit for length and time. Natural units remove the conversion constants, not the units or dimensions.


Perhaps in the physics sense, but in computer science we do have the notion of types which does allow us to model the difference between an angle and other numerics.


That’s the awkward argument for being dimensionless. But we know we have units of angle because we have scale factors to convert between them.


It is only equal to 1 by convention. If we instead considered the ratio of the diameter to the arc-length then rad would be 1/2.


You generally can’t apply functions to dimensional units. The only thing units can do is be multiplied or divided together. So I can multiply a mass by a distance or divide a distance by a speed, and I can multiply the result by a scalar; but I can’t take the sine of a distance or the logarithm of a time or exponentiate a mass. Those are things I can only do to scalars.

‘But wait!’ You may cry: ‘the formula for a transverse wave varies with the sine of a distance!’

To which I would say no: it varies with the sine of a distance (the horizontal displacement), divided by another distance (the wavelength), divided by 2pi. The distances cancel out and leave a scalar. The sine is taken of that pure scalar; it results in a pure scalar; and then it’s multiplied by another distance (the amplitude) to give you a vertical displacement. Sine is a pure function.

Something else to consider is that the way we combine units with scalars to create dimensional quantities is through multiplication - and it’s not like there’s a simple formula for what a sine of a product is - I can’t determine sin(ab) in terms of sines or other functions of a and b. So if, say, a ‘degree’ were some dimensional unit, sin(90°) would not be something I could calculate - despite knowing sin(90) I don’t know sin(°) - whatever that would mean - and even if I did it gets me no closer to figuring out sin(90°)

Realizing that ° is just a mathematical constant equal to pi/180 solves a lot here.


> You generally can’t apply functions to dimensional units. The only thing units can do is be multiplied or divided together. So I can multiply a mass by a distance or divide a distance by a speed, and I can multiply the result by a scalar; but I can’t take the sine of a distance or the logarithm of a time or exponentiate a mass. Those are things I can only do to scalars.

I mostly agree with your explanation, but would like to emphasize that this is just a convention from mathematics which mostly carries over into physics and engineering. We like to define functions that are R -> R and similar, instead of defining special sets like R° = { r * 360° | r \in R }, corresponding to "real numbers with unit degrees", and then defining functions like sin: R° -> R. It’s just simpler to define and analyze most functions from R -> R and so we mostly do that.

But if you look up physics papers, it’s not uncommon to define functions that require unitful inputs as well. For example, the wave function in the Schrödinger equation maps a position r (3D vector with unit meter) and time t (scalar with unit seconds), to a probability amplitude (complex number with unit m^-3/2), so that \int |ψ(r,t)|^2 d3r becomes a scalar (a probability). Up wave function is still considered a function by all physicists.


The reason for preferring functions defined over domains like R is that it’s a field, and so I can do things like multiply and divide and add and subtract inside it.

If instead we start defining ‘amounts of distance’ as some set D and ‘amounts of time’ as some set T, I have all sorts of extra work to do to make it so that products of amounts of distance are ‘amounts of area’ and amounts of distance over amounts of time are ‘amounts of speed’.

‘Dimension’ is the mathematical tool that lets us bundle all that up into something that we can deal with separately, alongside a real number. And of course you can totally make functions that are dimensional - but it affects what you can do with your functions, like composition and differentiation.


You can apply functions to anything. That's the only thing "function" means. They transform values into other values, and there is no limit on what kind of values you might want to talk about.


I basically agree, at least for standard functions like sin, cos, tan, exp etc. It is even possible to see mistakes in equations just by checking that all the units to standard functions cancel out making the arguments dimensionless.

On the other hand I am still unhappy with calling the ratio of two quantities, that happen to have the same units, "dimensionless". This way, you could create any two "dimensionless" quantities and try to compare them or use one in place of the other which might be meaningless.


This is a great paper from NIST that gets into some of the problems with the limit of ‘dimensionlessness’ in metrology and the SI, and in particular issues like the fact that Hertz is considered a coherent SI unit but radian isn’t.

https://www.nist.gov/publications/dimensionless-units-si

A key takeaway:

> one conclusion that is not optional is that the unit hertz cannot be regarded as a coherent unit of the SI, in contrast to its designation in the current form of the SI, where cycles are ignored and Hz may be replaced by s^−1


Really interesting read, thank you!

One thing I found especially interesting: They argue that you can express the (complex) exponential function exp(x) as a power series with powers x^k. They do not say it explicitly, but if we assume the power series comes from a Taylor series, then the k-th factor 1/(k!) is the derivative evaluated at x=0. And the k-th derivative has exactly the unit needed to cancel the unit of x^k. So, all summands of the series are unitless and hence the exponential function's argument is unitless.

This argument would hold for any function which can be written as a series like this. I am wondering whether this is actually a "problem" of the derivative operator.


> This way, you could create any two "dimensionless" quantities and try to compare them or use one in place of the other which might be meaningless.

Case in point:

https://trac.ffmpeg.org/ticket/11279

https://trac.ffmpeg.org/ticket/11284


Yeah, "dimensionless" would mean they have equal dimension, which would mean they are comparable, which isn't necessarily the case. E.g. both radians and degrees are called "dimensionless".

Edit: Apparently "same dimension" doesn't imply "same unit".


You can also create meaningless dimensionless quantities by blindly mashing the number keys on your keyboard. Should we stop using keyboards?


> You generally can’t apply functions to dimensional units.

Perhaps not in mathematics, but in programming that's clearly possible. I guess programming is more general than mathematics.


This is precisely why (programming language) types are poor model of physics units, despite often being touted for this exact use case. 3m is not the same thing as "the value 3 of type meter". It is the multiplication of the dimensionless scalar 3 with the special "m" constant for meters.

That's why pow(3m, 2) = 9 m^2, and not `the value 9 of type meter`. Of course, you can define the type `square meter` as well, and define `pow -> meters -> positive integer -> square meters`. However this quickly becomes overwhelming once you start doing more complex expressions with multiple types. What is the type of `pow (3kg^2 * m/s, 3/2)`?

Edit to add: also, there is a simple fact that "sin(pi/2 kg)" is just not defined, in programming or math or physics or any other useful system. It's definitely not 1kg, just like sin ( (pi/2) * 2) is not sin (pi/2) * sin (2).


> with the special "m" constant for meters.

Isn't the "special constant" exactly "value 1, type meters", defined as equal to "value <...very large number...> type atoms" etc?

If not, then what would be the result of the multiplication of 3 with "m"?

> Of course, you can define the type `square meter` as well, and define `pow -> meters -> positive integer -> square meters`

As long as your power is an integer, you can reduce it to multiplication. So what you'd really want to define is the result of "<value1 of type meter> * <value2 of type meter>", "(<value1 of type meter> * <value2 of type meter>) * <value3 of type meter>" etc.

What this gets you in the end is a type algebra, but that is also not exactly a new concept.


> If not, then what would be the result of the multiplication of 3 with "m"?

The answer is not, and the result of 3 multiplied by m is 3m. Just like 3 multiplied by pi is 3pi; or, perhaps more accurately, you can view m as a kind of vector unit, and 3m as the scalar product. Of course, none of this is exactly matching - dimensions are different from irrationals, vectors, complex numbers, etc, they are mostly a thing of their own.

> What this gets you in the end is a type algebra, but that is also not exactly a new concept.

Sure, that's why I said specifically programming language types. I am aware that type theory has way more complex operations on types. I think some of these may even be expressible in Idris or Haskell + some appropriate extension. But in almost all programming languages, even ones like OCaml, SML, plain Haskell, Rust, C++ with template magic, Scala, F# and what have you, there is no way to specify that the result of multiplying two values of type A is of type "A * A", especially not in a way that then allows you specify that the division of a value of type "A * A" by A has type A. So types as exposed in any of the common programming languages are horrible for modelling dimensions as used in even high school physics.


> dimensions are different from irrationals, vectors, complex numbers, etc, they are mostly a thing of their own.

I harbor a terrible internal mental model of dimensions which I have never really validated or explored fully, where I like to think they might be vector exponents, or something vaguely similar. If we assign each dimension to be a dimension of a vector - (length, mass, time, etc…) then a ‘distance’ might be e^((1,0,0,…)); a ‘duration’ e^((0,0,1,…)).

These have the requisite properties that when we multiply and divide them, we end up adding and subtracting these vectors.

So a distance times a distance is e^((2,0,0,…)) and a distance over a duration (a speed) is e^((1,0,-1,…))

They have the right basic algebraic behavior but who knows what terrible consequences they would have.


No, it's definitely possible in mathematics, they've left out some details as to what the units are doing that makes them unable to be assigned to functions. I mean a regular ODE that you get from newtons laws is a set of functions that take position and time as inputs, which all have units. What they mean should be "dimensionless functions cannot be applied to dimensional variables". These are commonly functions like sin cos exp log and so on.


Well you can also square root etc.


I don't think of it as units (as the sibling comment pointed out, angles are dimensionless); I think of ° as a postfix unary operator that does the conversion. In other words, I read sin(x°) as a shorthand for sin(x*Pi/180).


I started using SuperDuper user in 2005 and was happy with it for a decade. Then one day in 2015 or 2016 it stopped working, and upon investigating, I discovered it used AppleScript under the covers. Even though I'd written AppleScript occasionally, it is such an obtuse programming system that I wasn't willing to spend any time trying to debug SuperDuper's script. And while I suspect David Nanian provides excellent support, I figured giving Carbon Copy Cloner a try would be faster and easier, and I've been using CCC ever since.


That can be just a ziplock bag and the same water bath you're going to use for the sous vide anyway.

https://www.youtube.com/watch?v=XrZPLF0ezw8nn


> (Mary, at 16, was twice her age)

The problem states “She _is_ twice as old as Ann was”, not “She _was_ twice as old as Ann was”.


This idea is a significant part of Anathem by Neal Stephenson.


Also featured in the 1985 novel Footfall by Niven and Pournelle.


"God was knocking, and he wanted in bad"


Anathem was so chock full of interesting ideas, too bad the last parts of it were so rushed (or at least felt that way to me).


I always describe it as an excellent 300 page novel crammed into 900 pages.


Same with Cryptonomicon. Guy doesn't know when to stop rambling. Oh, and it had a weak ending, too.


This is the clearest explanation of why I never really liked Stephenson.


That's most of Stephenson's books. 90% world building and then 10% story at the end.


This worked for Snow Crash - felt like I went on a theme park ride, got to the end of it, and hopped off still buzzing. Doesn't work so well for something less tongue in cheek.


Strong agree. I was especially disappointed because it felt like he was dropping breadcrumbs all through the book and then... Nah, none of that foreshadowing mattered. The central tension of the book is handled by an off-screen deus ex machina, actually, everybody go home.

Incredible ideas. Really, really lousy ending.


Here’s what Tim Schafer said about selling Double Fine to Microsoft at the time:

> "I think it's perfect for us, because we can just focus on doing our inspired weird games, and not worry about how we're going to get our next deal. We aren't chasing down our next funding and thinking about how many more months of funding we have all the time."

https://gameinformer.com/2019/06/23/tim-schafer-on-microsoft...


That's founder speech for "I'm getting a big paycheck out of this deal lol".


I’m with Casey on this: I will not buy a car without CarPlay. Of course, I haven’t bought a car since 2013. That one is a Tesla Model S and I think its UI is pretty decent for maps and playing audio, but I have rented enough cars since then to know that I would much prefer CarPlay support. If I had to replace my car today, I’d probably buy a Volvo EX90, which is the electric version of the XC90 Casey talks about.


Rentals it is more important. Your own car doing the one time setup every few years is no problem but when it is a rental you don't want to take that time.


I love the "pick your own off the line" rentals because I can snoop the cars for CarPlay.


At my office we refer to these (in IntelliJ) as ketchup, mustard, and relish (depending on the color).


As long as you don't put ketchup on your hot dog (in Chicago)


This article is about actors in the Swift programming language, and I’d answer the question (“is a stateless actor pointless?”) differently: there is no such thing as a stateless actor in Swift.

Every actor in Swift conforms to the Actor protocol, which has one requirement: an instance property named `unownedExecutor`. Swift uses this property implicitly when, for example, the program calls a method on the actor from outside the actor.

https://developer.apple.com/documentation/swift/actor/unowne...

(One could also argue that, because every actor type is a reference type, every actor also has its identity as part of its state.)


>This article is about actors in the Swift programming language

Glad I checked the comments first, I had assumed it was stateless people that were actors. Stateless people are kind of an interesting topic.


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

Search: