HNHacker News
TopNewBestAskShowJobs

hither_shores

249 karma · joined February 21, 2022

submissionscomments
hither_shores··on Functional programming should be the future of software
In a strict language or with poorly optimized lazy code, yes. If you can get good stream fusion, not really. If your code fuses really well (common for lists, harder elsewhere) the whole thing will happen on the stack.
hither_shores··on Functional programming should be the future of software
In most situations, you use persistent data structures where you only have to copy the modified leaves.

If you really need your type to be backed by a contiguous block of memory, you batch updates (stencils, SIMD, etc.)

hither_shores··on Functional programming should be the future of software
> in pure FP either lookup or insert can be no better than O(log(n))

For single operations, yes. But what we really care about is usually the amortized performance over many operations, which can still be constant time.

hither_shores··on Functional programming should be the future of software
You shouldn't need to install any dependencies beyond `base` for hello world in Haskell:

```

module Main where

main :: IO ()

main = putStrLn "Hello, world!"

```

If you mean installing Dhall's dependencies (https://github.com/dhall-lang/dhall-haskell/blob/master/dhal...), those aren't too crazy, but they're definitely not all "beginner level". Template Haskell in particular is quite heavyweight.

hither_shores··on How I survived a year in ‘the hole’ without losing my mind
It's not up to him. "Preventive detention" is still potentially a life sentence, it just has to be renewed by the court every five years after the initial 21 year sentence is up.
hither_shores··on How I survived a year in ‘the hole’ without losing my mind
Officially, it's all of them. From title 18 section 3553 of the US code:

> The court, in determining the particular sentence to be imposed, shall consider ...

> (2) the need for the sentence imposed—

> (A) to reflect the seriousness of the offense, to promote respect for the law, and to provide just punishment for the offense;

> (B) to afford adequate deterrence to criminal conduct;

> (C) to protect the public from further crimes of the defendant; and

> (D) to provide the defendant with needed educational or vocational training, medical care, or other correctional treatment in the most effective manner;

https://www.law.cornell.edu/uscode/text/18/3553

hither_shores··on Inside the Proton
With special-relativistic classical mechanics? Of course. With special-relativistic quantum mechanics? No.
hither_shores··on Inside the Proton
Antiparticles are the conjugates of the negative energy solutions for normal matter. The negative energy solutions themselves are still not physical.
hither_shores··on Inside the Proton
The mass of what? There aren't literally three quarks inside a proton.
hither_shores··on Inside the Proton
For a free field, yes. But the entities we actually interact with are ... interacting. Mode expansion doesn't work here. Electrons, photons, etc. aren't really "particles" in the sense of ordinary quantum mechanics at all.
hither_shores··on Inside the Proton
> So an energetic system where the masses don't add up doesn't seem like an epoch defining mystery to me.

Bound states aren't really made of their constituents in a classical sense. A proton is a particular configuration of the quark fields (really it's more complicated than this), but not a simple sum of quark particle states. And in particular, its mass doesn't have to be the sum of the masses of particle states.

hither_shores··on Inside the Proton
> Are we still wrongly talking about billiard balls?

No. Particles are (approximately-)localized excitations in the corresponding field. Think waves, not water balloons.

hither_shores··on Inside the Proton
Lattice methods are probably the most common nonperturbative approach to QCD.
hither_shores··on Inside the Proton
Virtual particles are part of an indexing scheme for perturbation series - saying that you leave the perturbative regime when you have "too many" of them is like saying that crystalline solids melt when they have too many normal modes.
hither_shores··on Being on a board as an employee
> Exactly my point except their interests tend to be aligned with the other stockholders of the company since they all make money from the stock.

...because of how executive compensation is typically structured. Non-executive employees can also receive stock grants.

hither_shores··on Probability (1963)
> but the result will have a lot of functions that are not differentiable and, thus, not quantum mechanics wave functions. So, I would be reluctant to take the resulting actual Hilbert space as what physics was talking about.

Wavefunctions aren't differentiable functions, because they're not functions. They're distributions - described in general by the rigged Hilbert space structure I described previously, and in the simplified normalizable case typical of introductory courses by L^2(R^n).

> to try to understand what is known and maybe to try to clean up what is commonly called its many loose ends and maybe make progress in some applications, e.g., condensed matter physics, super conductivity, maybe even something as common as just why a grid of wire reflects radar waves, maybe connecting with gravity, dark energy, the first second, the Casimir effect, Hawking radiation, and I would include entanglement, then IMHO we need to be as clear as possible on the definitions, theorems, proofs, passing between physics and pure math, etc.

Ok, but that's not what undergraduate textbooks are for. If you want mathematical physics without any pedagogical concessions, go read mathematical physics papers.

hither_shores··on Probability (1963)
> The set of real numbers is commonly defined and their properties established in a first course in abstract algebra.

A set modelling the real numbers is defined in introductory math courses. The process of quotienting out all the set-theoretic slag to arrive at the real numbers, singular, is generally skipped. As well it should be: it's too ugly to be an end in itself, and too subtle to be of use to freshmen.

> Hilbert space? A complete inner product space where complete means every Cauchy convergent sequence converges.

I said rigged Hilbert spaces. The proper setting for QM is a Hilbert space equipped with dense subspace P of test functions (for which the inclusion P -> H is continuous). This induces an inclusion of dual spaces H* -> P*, and Reisz-Frechet gives us a natural isomorphism H ~ H*, so we have the "Gelfand triple": P -> H -> P*.

The view from 10,000 feet here is that P describes the space of possible measurements, P* describes the distributions, and the fact that the inner product <P, P*> factors through H is a compactness condition. So in particular, a plane wave |k> lives in P*, not H.

But you can't teach this to introductory physics students. They won't have the necessary math background for several years. (Many of them will never have it). And yet they have to be taught.

hither_shores··on Calculus with types
I think you're looking for "combinatorial species". This paper gives a decent introduction in a programming context: https://www.cas.mcmaster.ca/~carette/publications/labelled-s...
hither_shores··on Calculus with types
The particular example is not the point. The question you should be asking is

> would I ever have a need to understand what happens when you perform algebraic manipulations on data structures

and the answer is as usual that it depends on what you're working on. Parsers? Absolutely. CRUD apps? Yes, but only if you look for them. Numerical linear algebra? Probably not.

hither_shores··on Probability (1963)
> really stupid mistakes such as this one by Feynman

It's not a mistake, it's a "lie-to-children" fundamentally no different from an intro analysis class talking about "the" real numbers. Freshmen aren't ready for model theory, and they're not ready for rigged Hilbert spaces.

hither_shores··on Against Effective Altruism
> realism (i.e. admitting that there is no objective way to measure goodness or other moral qualities)

Moral realism is the position that mind-independent moral facts exist; it doesn't entail any particular belief about how or whether we can come to know them.

hither_shores··on Free Markets Don’t Buy Peace
It's from Weber. Here's the relevant paragraph of Politics as a Vocation:

> 'Every state is founded on force,' said Trotsky at Brest-Litovsk. That is indeed right. If no social institutions existed which knew the use of violence, then the concept of 'state' would be eliminated, and a condition would emerge that could be designated as 'anarchy,' in the specific sense of this word. Of course, force is certainly not the normal or the only means of the state--nobody says that--but force is a means specific to the state. Today the relation between the state and violence is an especially intimate one. In the past, the most varied institutions--beginning with the sib--have known the use of physical force as quite normal. Today, however, we have to say that a state is a human community that (successfully) claims the monopoly of the legitimate use of physical force within a given territory. Note that 'territory' is one of the characteristics of the state. Specifically, at the present time, the right to use physical force is ascribed to other institutions or to individuals only to the extent to which the state permits it. The state is considered the sole source of the 'right' to use violence. Hence, 'politics' for us means striving to share power or striving to influence the distribution of power, either among states or among groups within a state.

hither_shores··on A study of lights at night suggests dictators lie about economic growth
> You can reconcile both if the employees have a controlling stake in the corporation, either because they collectively have most shares, or because their shares have more voting weight. This is more or less the European social-liberal model.

Not really. This sort of model was an aim of many social-democratic (not social-liberal: those are the FDP in Germany, the Liberals/LibDems in the UK, etc.) parties before the neoliberal turn in the late 70s, but it was never actually achieved. Germany comes the closest: workers get 50%-1 board seats at large employers, but that's not the same as ownership.

hither_shores··on Ten Years of TypeScript
> I can't help but feel like the two are connected. I _do_ have some beefs with the language itself, though. The export syntax concept is awful, the overly flexible type system to which I still haven't seen the point with and of course the whole thing needs to be transpiled to actually run.

They are connected, but almost exclusively in the JS -> TS direction: typescript imports are javascript imports, the type system is messy because javascript is messy (whether complete compatibility with javascript was a good goal is another question...), etc.

> But the whole NodeJS/TypeScript community seems to have no common direction whether it comes to dependency managers, coding styles, transpilers, bundlers or much about any other “best practice” paradigms.

Yep.

hither_shores··on What to Do If a Nuclear Disaster Is Imminent
> Putin cannot afford to lose a war or to lose Russian territory. Putin is only president for life. No Russian leader has personally survived such an event, all the way back to the tsars.

Alexander I survived losing the wars of the third and fourth coalitions against Napoleon, Alexander II survived losing the Crimean war, Kerensky survived losing WWI, Lenin survived losing the Polish-Soviet war, Gorbachev survived losing the Soviet-Afghan war, Yeltsin survived losing the Chechen war...

hither_shores··on Rust 2024 the Year of Everywhere?
> the Linux kernel core is very high quality C

The Linux kernel core is the product of decades of effort by thousands of people, many of them world-class experts in the relevant domains. Very, very few software projects receive anything close to that.

No one is claiming that writing safe C code is impossible; the problem is that writing unsafe C code is easy.

hither_shores··on Rust 2024 the Year of Everywhere?
> I don't think it's really possible to seriously consider Haskell as somehow less "dizzyingly complex" than rust unless you're already a math postgrad.

This seems clearly false to me. Haskell has a higher abstraction ceiling than Rust, but unless you want to contribute to a particularly heavyweight library (`lens` comes to mind) you can get by just fine without going anywhere near it. In practice, most code in both languages maxes out at or below the mathematical sophistication of an introductory algebra class.

hither_shores··on Learn how to unleash the full potential of the type system of TypeScript
> I think it's like that because they had to hack it on top of Javascript

This is the source of most of typescript's flaws, but the mediocre type syntax was a deliberate choice: it's all erased at compile time, so javascript imposes no constraints. My guess is that it's just because many of the original typescript devs were on the C# language team.

hither_shores··on Energy Efficiency across Programming Languages (2017) [pdf]
The linked c code sample sorts the array, then accumulates the unique elements in a single pass. The python code sample makes a separate pass over `unique` for every element of `items`.
hither_shores··on Philosophy of mathematics – a reading list (2020)
> philosophers take it to mean that one believes in Plato's Theory of Ideas.

This is not accurate. Platonism, in a contemporary context, is the view that abstract objects exist. And so in particular to be platonist about mathematics is to believe in the existence of mathematical entities.

← PreviousPage 2 of 6Next →