HNHacker News
TopNewBestAskShowJobs

delhanty

1,230 karma · joined April 12, 2014

https://x.com/delhanty

Moderate countabilist

Making DOG’s ModeLer (#DOGML)

dogml.eth - expiration date: 2072.09.14 at 17:07 (UTC+09:00)

submissionscomments
delhanty··on Surreal numbers (2014)
The late Alexander Bogomolny's take got submitted, but gathered zero comments:

Surreal Numbers (cut-the-knot.org) - https://news.ycombinator.com/item?id=3734829 - March 2012 (0 comments)

delhanty··on Japan Solves Coronavirus Crisis with Magical Math
Also, the delta variant (B.1.167) is just on the verge of breaking out in Japan:

> 2021-06-07 B.1.617系統の変異株(デルタ株等) n=87 (+34)

> 2021-05-31 B.1.617系統の変異株(デルタ株等) n=53 (+24)

> 2021-05-24 B.1.617 インドで最初に検出された変異株 n=29 (+21)

https://www.mhlw.go.jp/stf/seisakunitsuite/newpage_00054.htm...

From the latest PDF linked there.

Hiroshima prefecture has gone from 1 case to 7 cases in 1 week.

Kanagawa prefecture has gone from 3 cases to 8 cases in 1 week.

We can suspect from experience in other countries (India, Malaysia, the UK, Vietnam, Taiwan, ...) that delta will out-compete other variants.

So if we wish to guess what COVID-19 cases in Japan will look like 3 months out (post-Olympics) it's best to focus on the rise in the delta variant.

delhanty··on If Apple is the only organisation defending our privacy, it is time to worry
Apple also has a question mark attached to its commitment to privacy in China.

Even though the Twitter thread below is by a NYT reporter, it sounds directionally credible given how embedded Apple is in China, both from a manufacturing point of view and also as a growing market.

2021-MAY-18

"NEW: Apple is jeopardizing its Chinese users’ data and augmenting the Chinese government’s censorship to placate authorities and keep its business running. Here is our multiyear investigation into Apple's Faustian bargain in China: ..."

https://twitter.com/jacknicas/status/1394378309325230080

delhanty··on The Hypnotic World of Degenerate Spirals
>In mathematics, a spiral is a curve which emanates from a point, moving farther away as it revolves around the point.

I'm surprised by that definition and always thought of a spiral as a curve with a monotonic signed-curvature function.

So, for example, the Euler/Cornu Spiral has a point of inflection where the curvature changes sign at the point of inflection, but the curvature increases continuously all the way from -infinity to + infinity as you travel along the length of the curve. So under my definition the whole Euler Spiral would count as a spiral, even though it stops revolving/emanating from a point just under 1/4 turn after the inflection point.

If you split a curve into segments at its curvature minimum and maximum points (vertices in the differential geometry sense [0]) then each segment has monotonic curvature and I'd define those as spiral segments. Vertices and monotonic curvature segments are preserved under inversion, which is mathematically useful.

In contrast, inflection points with zero curvature are not preserved under inversion. So the Euler spiral can be transformed by a suitable inversion to a curve like the one defined by Wikipedia, that is a curve emanating out from, for example, the origin.

Edit: just spotted this in the Wikipedia article on spirals 1]:

> Spirals which do not fit into this scheme of the first 5 examples:

> A Cornu spiral has two asymptotic points.

> The spiral of Theodorus is a polygon.

> The Fibonacci Spiral consists of a sequence of circle arcs.

> The involute of a circle looks like an Archimedean, but is not:

The Cornu spiral I've covered.

The spiral of Theodorus doesn't have a monotonic curvature function - it's a polygon approximation of the Archimedes Spiral, which does.

The Fibonacci Spiral's curvature function is a monotonic step-function.

The involute of a circle is a log-aesthetic curve, all of which have monotonic curvature functions. (The logarithmic spiral and the Euler spiral are also log-aesthetic curves.)

[0] https://en.wikipedia.org/wiki/Vertex_(curve)

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

delhanty··on Playlist for iOS
I understand why Brave are subject to the Apple AppStore TOC.

What I am not clear about is why Brave would be subject to YouTube’s TOC.

delhanty··on Playlist for iOS
Curious to know: Why are Brave subject to YouTube’s TOS?
delhanty··on A strange determinant – Timothy Gowers solves a problem [video]
Essentially then, the LU decomposition of P is just the matrix form of Vandermonde’s - which I recall now.

So I’m surprised that Timothy Gowers didn’t just write that down.

delhanty··on A strange determinant – Timothy Gowers solves a problem [video]
I've watched the video as far as Timothy Gowers sets out the problem. Now here's my attempt at a mental-arithmetic solution plan:

1. For any n, attempt to do an LU decomposition of the Pascal matrix P into the product of lower-triangular matrix L and upper-triangular matrix U.

2. By symmetry, these should be mirror-images of one another in the leading diagonal.

3. det(L) det(U) = det(P), which we know is 1. Also, by symmetry det(L) = det(U), which must then be either 1 or -1. The simplest approach would be to guess that is 1 and that the leading diagonal is all 1s.

4. Induct the first 3 cases, by mental arithmetic to reach:

  1 0 0     1 1 1     1 1 1
  1 1 0  *  0 1 2  =  1 2 3
  1 2 1     0 0 1     1 3 6
5. Guess that L and U are also Pascal's triangle arranged as rows and columns respectively.

6. Compute the bottom right corner for a couple more cases as a check:

  1^2 + 3^2 + 3^2 + 1^2 = 20
  1^2 + 4^2 + 6^2 + 4^2 + 1^2 = 70
... seems OK. So I guess, for the bottom right corner there's a binomial identity something like:

  $\sum_{k=0}^n \binom{n}{k}\binom{n}{k} = \binom{2n}{n}$
and a more general version of that identity for the cell (i,j) with 0 <= i, j <= n

  $\sum_{k=0}^n \binom{i}{k}\binom{j}{k} = \binom{i+j}{n}$
on an (n+1) x (n+1) matrix.
delhanty··on Ask HN: What was the biggest contributor to your happiness in the past year?
Selenomethionine [0]

> Selenoproteins seem to be of special importance in the development and functioning of GABAergic (GABA, γ-aminobutyric acid) parvalbumin positive interneurons of the cerebral cortex and hippocampus. Dopamine pathway might be also selenium dependent as selenium shows neuroprotection in the nigrostriatal pathway and also exerts toxicity towards dopaminergic neurons under higher concentrations. Recent findings also point to acetylcholine neurotransmission involvement.

[0] Importance of selenium and selenoprotein for brain function: From antioxidant protection to neuronal signalling

https://pubmed.ncbi.nlm.nih.gov/26398431/

delhanty··on Fitting Cubic Bézier Curves
Actually, they do give a comprehensive analysis of infection points and singularities for the cubic polynomial segment with given endpoints, tangents and magnitudes. There's a diagram of square with some (maybe superficial) similarity to the one in "High Accuracy Geometric Hermite Interpolation".

Chapter III Parametric Cubic Spline Curves

4 A Theorem Concerning Segments of Parametric Cubic Curves

Also, it's based on earlier papers by Su Buqing from around 1977.

delhanty··on I Don’t ‘Do’ Arduino
Yeah! If you go back far enough real programmers didn’t see the point of this new fangled assembly language making things too easy.

https://forum.osdev.org/viewtopic.php?t=28852

delhanty··on Fitting Cubic Bézier Curves
Thanks for those ideas.
delhanty··on Fitting Cubic Bézier Curves
IIRC, in your thesis, the method of approximating Euler spirals is exact at the midpoint and has errors at the end.

Say if instead, one wanted the reverse - an Euler spiral approximation that was exact at the endpoints and was allowed errors in the middle. Do you have any idea of the best method to achieve that?

(So to make it concrete, if one had end points and end tangents that were compatible with fitting a spiral, which should define a unique Euler spiral segment. Let's say it's parameterized by turning angle rather than length.)

delhanty··on Fitting Cubic Bézier Curves
Fair enough - aware that you're not a fan of biarcs from your thesis.

>The simplicity of the arc as primitive curve has some nice features though, for example the fact that parallel curve is nearly trivial.

Yes.

Also, IIRC, Alexey Kurnosenko uses them in one of his papers to bound the regions of when it's possible to fit a spiral to end point data,

https://arxiv.org/a/kurnosenko_a_1.html

delhanty··on Fitting Cubic Bézier Curves
You probably didn't.

You seem a concientious author and I thought that, from having read your thesis, you were probably not aware of the book and might like to know about it.

There's interesting material in there on nonlinear splines because its a fairly old book (1989) that summarizes how they used nonlinear splines, biarcs etc in the Chinese shipbuilding industry in the decade or two priot to that.

Particularly, the survey of methods on how to choose free parameter in the biarc is not something you see much these days.

Edit: Interestingly, like you they refer to the "Euler Spiral - rather than "Cornu Spiral" or "Klothid"/"Clothoid". Another name, I see in literature from that era is "LINCE" (Linear Curavture Element) such as in [0].

[0] Two-dimensional curve synthesis using linear curvature elements https://www.sciencedirect.com/science/article/abs/pii/001044...

delhanty··on Fitting Cubic Bézier Curves
For the Prior Work, I gave you this reference on Twitter in response to your tweeted question.

>Computational Geometry: Curve and Surface Modeling by Liu Ding-Yuan and Su Buqing - Chapter 2 covers Béziers. Originally published in Chinese in 1989 - Chinese shipbuilding industry splines. Maybe of interest? (IIRC you don't reference it in your thesis.)

https://twitter.com/delhanty/status/1370618402654461953

In chapter 4, they have a construction for a GC2 Bézier spline space curves - pairs of quadratics and cubics.

Generally, they cover a lot of the same material that you do in your thesis.

delhanty··on AWS director sues Amazon, alleging systemic racism in corporate office
Aren't these sort of articles from tech media whataboutism to distract from their own lack of diversity?

This article gives some perspective:

https://oonwoye.com/2020/07/31/tech-journalism-is-less-diver...

Amazon is actually the most diverse company that Oo Nwoye surveyed.

delhanty··on Japanese people may have gained longevity by balancing their diets
It seems plausible to me.

A small amount of meat could fix a vitamin B12 deficiency.

delhanty··on Stalking her daughter’s killers across Mexico, one by one
Given that, according to your profile, you're an appellate lawyer, and the more crime there is, the more work there is for lawyers generally (though maybe not for you personally) that seems like an instance of

>“It is difficult to get a man to understand something, when his salary depends on his not understanding it.”

Upton Sinclair ~ 1934

https://www.goodreads.com/quotes/21810-it-is-difficult-to-ge...

delhanty··on Deprecating SHA1
Thank you for that reply - particularly the informative explanation.

I was sort of assuming it must be a reference to the parallel schemes because with SHA256(MD5(x)), once you had an MD5 collision you would be done.

delhanty··on Deprecating SHA1
For clarity, which part of petertodd's comment are you replying to?

(I'm learning a little cryptography from this thread, so the above is a straight question.)

delhanty··on Eli Lilly says its monoclonal antibody cocktail is effective against Covid-19
Actually, I'm generally pro-freedom where there is no obvious victim. But that's not true in this case. The way I see it is you can suffer the more modest loss of freedom of mask wearing now. Or you can ignore that and have lockdowns imposed on you later.

>Unfortunately, masks became a political issue here in a way that probably had nothing to do with those dumb CDC press releases.

You want to believe that, but I think in your heart you know that is not true. Those messages seeped into the public consciousness. I'd be astonished if they're not being cited by MAGA et al against you now.

Generally, if you treat people like children, like the CDC did, they won't respond by behaving like adults.

delhanty··on Eli Lilly says its monoclonal antibody cocktail is effective against Covid-19
>Wait, you do understand that people are saying to get the flu shot so people don't get the flu, right?

For sure, but I don't happen to agree. It was on the news here in Japan this morning - flu cases have pretty much disappeared this season - presumably because everyone is wearing masks.

>Where do you get your data about annual influenza deaths? If you have a good source, I'm willing to take a look.

I can look for it, but IIRC the several 10,000 annual influenza deaths are a statistical projection. There was an article somewhere from someone in ER during the peak of the COVID-19 deaths saying they had pretty much never seen an actual influenza death - and that was the experience of other people in ER - so there was a mismatch between the statistical projection and lived experience.

>It's important not only so you don't get sick, but also so you don't spread it to others who may have a weaker immune system. We're all in this together.

The best way to do that is to wear masks. Here in Japan - nobody here ever said that "masks don't work for non-medics who haven't been trained to put them on properly". So we don't now have the problem with lots of MAGA folks running around saying "masks don't work".

delhanty··on Eli Lilly says its monoclonal antibody cocktail is effective against Covid-19
>Getting a flu shot is important. Please get yours this season so we can help reduce the spread of yet another deadly respiratory virus that kills thousands of people each year.

It turns out that masks are far more effective than flu shots, so no, I'm not going to get a flu shot. Anyway, IIRC, "kills thousands of people each year" is a statistical projection that doesn't actually stand up to scrutiny. Certainly, it's nothing like COVID-19.

>There was a lot of debate about masks.

There was a lot of misinformation spread because of the failure to stockpile PPE. That misinformation is still doing harm now because the MAGA folks are running around saying "masks don't work"

>I don't know what you're implying by the phrase 'argument by authority,' but we're talking about people who have spent their entire careers in the field of medicine. Normally we call those people 'scientists' and 'experts.'

Unfortunately, medical experts credibility is now shot by spreading false information about masks, and by downplaying the risk of COVID-19 in January and February by telling everybody to get a flu shot. Then I wonder how many people died on ventilators when intubated on MAX ..

As a group you're weren't operating at the level of Dennis Richie or Donald Knuth, so you have work to do to regain credibility.

In fact, you're still not now. You should focus less on evidence-based medicine and more on risk asymmetry. Mask wearing (even of cloth masks) had very little downside and a potentially huge upside. But we had to wait for evidence. The same is true of vitamin-D now. Look for low-risk interventions. If we don't have the resources to mass test the at-risk population, we should encourage those on poor diets to take 1000IU a daythis winter. But we will have to wait until next year for evidence.

delhanty··on Eli Lilly says its monoclonal antibody cocktail is effective against Covid-19
>there's a very real likelihood that Vit D deficiency may just be a proxy for an unhealthy lifestyle

Seriously! You think that it might be possible that vitamin D deficiency doesn't exist at all and that people used to get rickets because of an unhealthy lifestyle. You're kidding right ...?

In case, it's not clear, I repeat:

>By the way, I'm not advocating for long-term, high-dose consumption (say over 2000 IU) consumption of vitamin D.

What I am advocating for is:

>What we should be doing now is mass-testing the at-risk population to identify those people with blood levels below 30 ng/ml and then do what is necessary to bring them up into the 30 to 40 ng/ml range. ...

Actually, I agree that the evidence for supplementation with vitamin D for general health, and improving all-cause mortality isn't there. That's why I wrote:

>Ideally that could be done with sunlight, or food high in vitamin D - for example oily fish, liver, dried-shitake, ...

But there's a sharp difference between the general health, then general respiratory disease, then COVID-19. As Deva Boone writes:

>But maybe Covid is different. Covid is a respiratory infection, and in meta-analyses severe Vitamin D deficiency does appear to increase the risk of respiratory infections. We also have a plausible mechanism through which Vitamin D could influence Covid. ...

OK, now you quote Deva Boone:

>No, not really. There is suggestive evidence from a small pilot study. There is likely an effect,

Her position is disputed here [0] in the HN comments by kovach

devaboone >Here is what the article states: "Therefore, a multivariate logistic regression analysis was performed to adjust the model by possible confounding variables such as hypertension and type 2 diabetes mellitus for the probability of the admission to the Intensive Care Unit in patients with Calcifediol treatment vs Without Calcifediol treatment (odds ratio: 0.03 (95%CI: 0.003-0.25) (Table 3). The dependent variable considered was the need to be treated or not in ICU (dichotomous variable).) CI:-0.30 - 0.03 p:0.08." The statement is worded in a confusing way, but that is a non-significant p value. Of course we should not put too much into "statistical significance" but it is interesting to note.

kovach >The only reason that p value is a bit high in that second multivariate analysis is because of the uncertainty of how much all the different risk factors like hypertension, T2DM, age >= 60 etc. affect ICU admission numbers. But even with those variables controlled, the 95% confidence interval is 0.003-0.25, which at worst is a 4-fold reduction in ICU risk. > >We should also note that the Calcifediol treatment group had 14 patients ≥ 60 years old, and the non-Calcifediol group had 5. So the study looks even better with that in mind...

Another thing about this study, is that it's actually megadosing. IIRC, something like 100,000 IU on day 1, 50,000 IU on day 3.

That's probably safe in the short-term in a hospital setting as devaboone states. But further more, it's probably necessary in the context of keeping COVID-19 patients out of the ICU. If they have COVID-19 because they're low in vitamin-D, then a 5000 IU capsule is probably not going to be enough.

That's why I'm advocating to mass-test the at-risk population, and supplement until they're above 30 ng/ml.

[0] https://news.ycombinator.com/item?id=24410547

delhanty··on Eli Lilly says its monoclonal antibody cocktail is effective against Covid-19
Re: "game changer", I was referencing the comment by war1025 that polyclonal anti-bodies were a game changer.

>Sounds like Trump got a similar cocktail from a different company. The speed of his recovery and the fact that him having Coronavirus isn't even part of the news cycle anymore seems like a strong indicator that the treatment is probably a game changer.

>A lot of really smart people with decades of experience in the field, and a direct clinical role have collected a variety of approaches that seem to work. Unfortunately, none of them have characterized Vit D as a 'game changing drug.'

Sorry - I'm more impressed by a single randomized open label, double-masked clinical trial than I am by argument by authority. Perhaps we can check back here in a couple of years time ...

I can't help remembering how actual doctors in the field were telling us back in February to "get a flu shot", or "masks only work for doctors who've been trained to put them on properly". I'm so happy that I'd already purchased my N95 masks in January while you guys were asleep.

delhanty··on Eli Lilly says its monoclonal antibody cocktail is effective against Covid-19
>That trial has several issues.

Which are what?

>It's been shown to not be helpful in severe cases.

That's a fairly strong assertion! Stronger than, "there is no evidence that is helpful in severe cases" for example.

You wouldn't happen to have a reference to back it up by any chance?

Anyway, I'm wondering why vitamin D is held to a higher standard than the polyclonal antibodies or Remdesivir. Where is the evidence that they're helpful in severe cases?

By the way, I'm not advocating for long-term, high-dose consumption (say over 2000 IU) consumption of vitamin D.

Deva Boone (devaboone) 's blog points out that this can lead to dangerously high calcium levels and has been covered on here several times recently [0][1]:

>Eventually we worked out what happened with Shannon: In 2013 she was diagnosed with mild osteopenia, a thinning of the bones that can be a precursor to osteoporosis. Her Vitamin D was low at the time, so her physician started her on over-the-counter Vitamin D supplementation at 5000 international units (IUs) daily. Five years later, she was still on this dose, and her blood Vitamin D level had risen to 79 ng/ml. This level is within what many labs call the normal range, between 30 and 100 ng/ml, but levels above 70 are almost always a result of high dose supplementation, and I have seen toxicity with levels between 70 and 100 ng/ml. (A better “normal range” based on what I have seen would probably be between 30 and 60.) Vitamin D builds up over time, so the longer someone is on a high dose, the more likely she is to develop toxicity. Shannon’s calcium levels began rising in the fall of 2018, when her severe symptoms developed.

What we should be doing now is mass-testing the at-risk population to identify those people with blood levels below 30 ng/ml and then do what is necessary to bring them up into the 30 to 40 ng/ml range. Ideally that could be done with sunlight, or food high in vitamin D - for example oily fish, liver, dried-shitake, ... But for the at risk demographic, in practice one would probably need moderately high-dose supplements, combined with monthly testing until they're above 30 ng/ml, followed by a switch to a lower-dose maintenance dose.

[0] https://www.devaboone.com/post/vitamin-d-part-2-shannon-s-st...

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

delhanty··on Eli Lilly says its monoclonal antibody cocktail is effective against Covid-19
It's completely predictable that the expensive drugs that Trump got (the monoclonal antibodies & Remdesivir) dominate the news cycle, while the cheap ones don't. From, the Physician to the President's report on October 2nd [0]:

>Following PCR-confirmation of the President’s diagnosis, as a precautionary measure he received a single 8 gram dose of Regeneron’s polyclonal antibody cocktail. He completed the infusion without incident. In addition to the polyclonal antibodies, the President has been taking zinc, vitamin D, famotidine, melatonin and a daily aspirin.

If there's a game changing drug for COVID-19 in there I'd say it was vitamin D.

We covered the Spanish randomized open label, double-masked clinical trial of vitamin D just over a month ago. [1][2]

>“Of 50 patients treated with calcifediol, one required admission to the ICU (2%), while of 26 untreated patients, 13 required admission (50%) p value X2 Fischer test p < 0.001.”

[0] https://twitter.com/PressSec/status/1312122950133272576

[1] https://www.sciencedirect.com/science/article/pii/S096007602...

[2] https://news.ycombinator.com/item?id=24366006

delhanty··on NestedText, a nice alternative to JSON, YAML, TOML
There's a lot of value to the ecosystem here if it could be standardized - possibly it should be an RFC.

Combined with what rswail wrote about encoding hierarchies, with careful design, those CSV sections could be embedded as tables.

If that was used as a base format for other formats, then objection that encoding for boolean and numerics wasn't standardized might go away.

delhanty··on NestedText, a nice alternative to JSON, YAML, TOML
I don't know whether that's an "aside" comment, but it's interesting and informative anyway!

Another variant of the idea that I was mulling over was to base a roughly NestedText level of abstraction on UTF-8 transparent characters, and then combine that with what Animats was talking about as a standardized GUI for trees, dictionaries etc.

A recent trend is that programming languages have more than one bijectively equivalent syntax. For example, ReasonML [0] and OCaml are two bijectively text based syntaxes. That idea could be extended to a NestedText like syntax being bijectively equivalent to a text based syntax. Editors like Visual Studio Code infer that sort of information continually on the fly, but it sort of gets lost in the toolchain. Compilers could operate at a higher-level of abstraction than lexing/scanning. Git merge might also work better if could operate at a NestedText like level of abstraction.

[0] https://en.wikipedia.org/wiki/Reason_(syntax_extension_for_O...

← PreviousPage 3 of 15Next →