Readit News logoReadit News
lqr commented on Show HN: What country you would hit if you went straight where you're pointing   apps.apple.com/us/app/lea... · Posted by u/brgross
munchler · 4 months ago
I think about this sometimes, so I like the idea, but how do you define “straight” on an oblate spheroid? Great circle, constant direction (e.g. “due east”), or something else?
lqr · 4 months ago
The mathematical field of Differential Geometry can answer this question precisely: https://en.wikipedia.org/wiki/Geodesic#Affine_geodesics

An oblate spheroid is an example of a Riemannian manifold: a smooth object that looks like a plane (or, in general, any ℝ^n) locally, and has a way to measure angles between vectors in that local plane.

All Riemannian manifolds have an object called the Levi-Cevita connection, which defines how vectors in the local plane (tangent space) most naturally map to vectors in other tangent spaces in the immediate neighborhood.

Standing at a point on the Earth and looking in a certain direction gives us 1) a point on the manifold, and 2) a direction in that point's tangent space.

We then take an infinitesimally small step forward, and apply the Levi-Cevita connection to get from the old tangent space to the (infinitesimally nearby) new tangent space, and repeat. This defines an ordinary differential equation. Integrating the differential equation gives us a curve through the manifold.

Within some neighborhood of the initial point, this curve is a geodesic, i.e. the shortest path between the initial point and all subsequent points on the curve. This matches our typical intuition of "straight".

(Disclaimer: I am currently learning about this topic, but am not an expert.)

edit: https://en.wikipedia.org/wiki/Geodesics_on_an_ellipsoid goes into some interesting specifics about the results of this process on ellipsoids.

lqr commented on I wasted weeks hand optimizing assembly because I benchmarked on random data   vidarholen.net/contents/b... · Posted by u/thunderbong
lqr · 5 months ago
In this example, random numbers provoked the worst case too often. However, in other situations random numbers are "too nice". For example, a random matrix with independent identically-distributed zero-mean entries is overwhelmingly likely to be well-conditioned, have no repeated eigenvalues, etc. Testing numerical algorithms on random data alone is a bad idea.
lqr commented on I'd rather read the prompt   claytonwramsey.com/blog/p... · Posted by u/claytonwramsey
lqr · 8 months ago
For math and writing, we still have in-class exams as an LLM-free evaluation tool.

I wish there was some way to do the same for programming. Imagine a classroom full of machines with no internet connection, just a compiler and some offline HTML/PDF documentation of languages and libraries.

lqr commented on Tracing the thoughts of a large language model   anthropic.com/research/tr... · Posted by u/Philpax
nomel · 9 months ago
I've looked into using NN for some of my specific work, but making sure output is bounded ends up being such a big issue that the very code/checks required to make sure it's within acceptable specs, in a deterministic way, ends up being an acceptable solution, making the NN unnecessary.

How do you handle that sort of thing? Maybe main process then leave some relatively small residual to the NN?

Is your poking more like "fuzzing", where you just perturb all the input parameters in a relatively "complete" way to try to find if anything goes wild?

I'm very interested in the details behind "critical" type use cases of NN, which I've never been able to stomach in my work.

lqr · 9 months ago
This paper may be interesting to you. It touches on several of the topics you mentioned:

https://www.science.org/doi/10.1126/scirobotics.abm6597

lqr commented on The Performance Impact of C++'s `final` Keyword   16bpp.net/blog/post/the-p... · Posted by u/hasheddan
GuB-42 · 2 years ago
"inline" is confusing in C++, as it is not really about inlining. Its purpose is to allow multiple definitions of the same function. It is useful when you have a function defined in a header file, because if included in several source files, it will be present in multiple object files, and without "inline" the linker will complain of multiple definitions.

It is also an optimization hint, but AFAIK, modern compiler ignore it.

lqr · 2 years ago
10 years ago it was already folklore that compilers ignore the "inline" keyword when optimizing, but that was false for clang/llvm: https://stackoverflow.com/questions/27042935/are-the-inline-...

Deleted Comment

lqr commented on Paul Erdős, the most prolific mathematician   scientificamerican.com/ar... · Posted by u/hilux
OldGuyInTheClub · 2 years ago
Would a mathematician weigh in on who had more impact?
lqr · 2 years ago
It is not even close. Almost every branch of modern mathematics includes an important contribution from Euler in its history. Erdos was a specialist by comparison.

If you sample a random person with a math degree, the probability that they believe Erdos had more impact than Euler is 0. ;)

lqr commented on Ask HN: Non-Tenure Track Computer Science Academic Job Market in 2024    · Posted by u/jiyunakenkyusha
lqr · 2 years ago
I applied to tenure-track positions the current cycle. A lot of places were hiring non-TT lecturers too, and a few were hiring only non-TT.

The application-submitting phase of the current cycle is over for TT positions, and some of the listings have been taken down. No idea if non-TT hiring follows the same cyclic pattern. But if the listings are looking thin, you should check again around November.

Not having a Ph.D. might disqualify you for some positions, but definitely not all of them. Teaching experience with positive evaluations will help a lot!

I wouldn't worry too much about laid-off developers/researchers. The huge majority of them will try to find another high-paying job.

lqr commented on Collision Detection (2015)   jeffreythompson.org/colli... · Posted by u/todsacerdoti
markisus · 2 years ago
Minimizing Minkowski difference between convex bodies can also be formalized as a quadratic program. I wonder how the GJK performs against the QP formulation.
lqr · 2 years ago
Here is a recent and interesting paper connecting GJK and convex optimization [1]. They show that GJK is equivalent to the iterations of the Frank-Wolfe algorithm applied to the QP, and that recent improvements to Frank-Wolfe can be applied to improve GJK.

Frank-Wolfe is a somewhat less well-known (compared to simplex, interior point, etc) convex optimization algorithm with many interesting properties [2, Section 3.3].

[1] https://roboticsproceedings.org/rss18/p039.html

[2] https://arxiv.org/abs/1405.4980

u/lqr

KarmaCake day86July 6, 2021View Original