4,485 karma · joined Jun 30, 2015 (11y ago) · 2,043 submissions
comment 3y ago · link · parent
The human with the art history background at least has some credentials, whereby the output can be trusted, to some degree and explained if necessary.
comment 3y ago · link · parent
Certainly not all. "=" is a poor choice for assignment as it has a totally different meaning in maths. Algol and Pascal got this right with ":=". Fortran got it wrong here.
> plus '=' is used for assignment in math just as often too
No it's a relational operator in math, so "x = x + 1" does not have the same meaning as assignment to a mutable variable.
comment 3y ago · link · parent
comment 3y ago · link · parent
I encourage you to have a look at the published paper, it's an easy read and covers the motivation and examples:
https://arxiv.org/abs/2104.00250
Here's an excellent talk that walks through modifying a non-trivial code base for concurrency using effect handlers:
> It does feel to me like error's and async's both should remain orthogonal
They aren't completely orthogonal though, as both are effects. Haskell and Rust model both with Monads. OCaml 5 can model both with effect handlers. It is desirable to track the difference in types, this is something I hope the OCaml folks will add in the future.
comment 3y ago · link · parent
For a great example of this, see OCaml 5 support for effect handlers. It's basically a generalisation of exceptions, very lightweight and elegant. I can't help but think this approach would have been a much better fit for Rust than the current async effort. Monads like Async and Result are a slippery slope into the world of FP, something Rust will never excel at. Effect handlers are an alternative which arguably better align with systems programming.
comment 3y ago · link · parent
Amazon do this and it doesn't work at all well for classical music. The album reviews are full of reviews for the same piece of music but different performances, it's not always easy to tell either. I stopped buying CDs from Amazon years ago, although primarily because they'd always arrive with cracked jewel cases.
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
I did not attempt to define Metal. I only tried to point out that it is often heavily compressed, as is pop music, see for example:
https://www.theguardian.com/music/2008/sep/17/metallica.guit...
I certainly find the idea of playing this stuff on a 10K Hifi amusing, which was perhaps your original point?
EDIT:
You can check your favourite albums, by using this resource: https://dr.loudness-war.info/album/list/1/dr/asc?artist=Epic...
Compare with e.g. some classical music recordings: https://dr.loudness-war.info/?artist=Berliner%20Philharmonik...
comment 3y ago · link · parent
Yes, at least it used to. Hifi means High Fidelity, which means a high degree of exactness in reproducing the music, as the artists and recording engineers intended.
> Hifi speakers are supposed to add their own character to the recorded sound, no?
I would argue they should not. But consumer "Hifi" certainly does often colour the sound. This is why many audiophiles had to seek out "studio" monitors and earphones. However, even this term has lost its meaning. You will not find "Beats Studio" earphones in any studio.
> When talking about acoustic instruments, doesn't each one sound different?
Maybe slightly yes, but only in certain ways. A bad audio system might make them sound unnatural. Pianos and violins certainly have much less variation than electric guitars.
comment 3y ago · link · parent
comment 3y ago · link · parent
The problem with testing Hifi using Metal is that only the recording engineer really knows what it originally sounded like. Metal recordings are also generally very compressed and so not a good test of dynamics and transients. A good test of a Hifi would involve acoustic instruments, violins, cellos, pianos, orchestras etc. You also need very well recorded source material.
comment 3y ago · link · parent
> Prefer polymorphism to “if/else” and “switch”
Algebraic data types and pattern matching (a more general version of switch), make many types of data transformation far easier to understand and maintain (versus e.g. the visitor pattern which uses adhoc polymorphism).
> Code should not know about the internals of objects it’s working with
This is interpreted by many as "don't expose data types". Actually some data types are safe to expose. We have a JSON library at work where the actual JSON data type is kept abstract and pattern matching cannot be used. This is despite the fact that JSON is a published (and stable) spec and therefore already exposed!
> Functions should be small
"Small" is a strange metric to optimise for, which is why I don't like Perl. Functions should be readable and easy to reason about. Let's optimise for "simple" instead.
> Functions should do one thing
This is not always practical or realistic advice. Most functions in OOP languages are procedures that will likely perform side effects in addition to returning a result (e.g. object methods). Should we also not do logging? :)
> “DRY” - Don’t Repeat Yourself
The cost of any abstraction must be weighed up against the repetition on a case-by-case basis. For example, many languages do not abstract the for-loop and effectively encourage users to write it out over and over again, because they have decided that the cost of abstracting it (internal iteration using higher-order functions) is too high.