HNHacker News
TopNewBestAskShowJobs

heinrichhartman

2,496 karma · joined September 28, 2015

Blog: HeinrichHartmann.com Keybase: https://keybase.io/hartmann Twitter: @HeinrichHartman http://twitter.com/Heinrichhartman GitHub: https://github.com/HeinrichHartmann/
submissionscomments
heinrichhartman··on Why don't we define “imaginary” numbers for every “impossibility”? (2012)
fixed.
heinrichhartman··on Why don't we define “imaginary” numbers for every “impossibility”? (2012)
Yes! Fixing
heinrichhartman··on Why don't we define “imaginary” numbers for every “impossibility”? (2012)
yes!
heinrichhartman··on Why don't we define “imaginary” numbers for every “impossibility”? (2012)
For polynomial equations, the construction works in quite some generality, and is known as quotient ring: https://en.wikipedia.org/wiki/Quotient_ring

Given any polynomial P (e.g. x^2 + 1) over a filed F (e.g. reals) we can form: `R = F[X]/P`

This is an algebraic "set" that supports addition, substraction, multiplication and has 0,1 but not division in general. Elements are elements of F and a new symbol X that satisfies "P(X) = 0".

Examples:

     R[X]/(x^2 + 1) = C
     R[X]/x = R
     C[X]/(x^2 + 1) = C + C.x
     R[X]/1 = 0
# Properties

- If the polynomial P is invertible, i.e. has degree 0 and is not zero, then the resulting ring is zero R[X]/P = 0. This is what happens in the example x = x-1 (which corresponds to P = x - 1 - x = -1).

- If the polynomial P has degree 1 (i.e. P=aX+b), then the equation P=0 is equivalent to x=-b/a, representing an element already present in R, hence the ring R[X]/P is equal to R.

- If the polynomial P is irreducible (i.e. not a product of two proper polynomials) then the quotient R[X]/P is a field. This happens in the case R[x]/(x^2 + 1) which results in the complex numbers.

- If the polynomial P is a product of two polynomials P1,P2 which don't have common divisors, then R[X]/P = R[X]/P1 + R[X]/P2, this happens in the case that C[X]/(x^2+1), since P = x^2 + 1 factors as (x+i)*(x-i) in C. The equivalent result for integers is known as Chinese Remainder Theorem.

heinrichhartman··on What a good debugger can do
Contrasting perspective from John Carmack [1] who drops into a debugger all the time to explore state, understand program behavior, debug things, etc.

Looks like there is no universal golden path. Differing environments make different approaches effective.

[1] https://www.youtube.com/watch?v=tzr7hRXcwkw

heinrichhartman··on Carp lang: statically typed Lisp, no GC
The project compiles LISP to C (with Haskell code-base) and relies on a C compiler to generate executables. This means you will have to get your C dependencies in-place to work with carp.

I was trying this from `nix-shell -p carp` and immediately ran into issue with this when building the hello world example from the README. (Package sdl2 was not found).

Not sure how to fix this just adding `- p SDL` to the nix-shell prompt does not help, as the invoked compiler does not know where to look.

Any recommendations here? I want to avoid using a global clang/gcc installation for various reasons. Is running this under `nix` a good idea? Should I move this into a container?

heinrichhartman··on An intutive counterexample to the axiom of choice
The axiom of choices is about picking elements of infinitely many sets at once.

In the example we are talking about a single set. The deduction "the set is non-empty => we can pick an element" is much more basic than AC.

heinrichhartman··on Liquid democracy: two experiments on delegation in voting
We looked into the data in 2015 and wrote this paper: https://arxiv.org/abs/1503.07723

From the abstract:

A common objection against the use of these platforms is the delegation system, where a user can delegate his vote to another user, giving rise to so-called super-voters, i.e. powerful users who receive many delegations. It has been asserted in the past that the presence of these super-voters undermines the democratic process, and therefore delegative democracy should be avoided. In this paper, we look at the emergence of super-voters in the largest delegative online democracy platform worldwide, operated by Germany's Pirate Party. We investigate the distribution of power within the party systematically, study whether super-voters exist, and explore the influence they have on the outcome of votings conducted online. While we find that the theoretical power of super-voters is indeed high, we also observe that they use their power wisely.

The Related Work section may also be of interest for you.

heinrichhartman··on Dotfiles Management
I had problems installing python dependencies with compiled library dependencies this way, eg pandas. Does that generally work for you?
heinrichhartman··on Python 2 removed from Debian
> That was a decade ago, to finding that the "python" command still launches a Python 2.7 interpreter in 2023 is just beyond belief.

The problem is not the end-user invoking the command.

The problem is scrips expecting `#!/usr/bin/env python` to invoke python-2.

heinrichhartman··on NixOS on M1
I don't change habits depending on the site that is linked. And I appreciate a summary in the comments.
heinrichhartman··on NixOS on M1
I am greatful for this summary, as I usually check the comments before the link, to see if its worth to click through the cookie consent and Ad spam found on most sites, as well as digging out punchlines from lengthy articles.
heinrichhartman··on Our Trip to Prime Number Theorem (2021)
The 1859 paper by Bernhard Riemann which introduced the zeta-function and linked it to the Prime Number distribution is only 9 pages and quite approachable. It inspired much of analytic number theory:

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

It also contains his famous conjecture:

"One now finds indeed approximately this number of real roots within these limits, and it is very probable that all roots are real. Certainly one would wish for a stricter proof here; I have meanwhile temporarily put aside the search for this after some fleeting futile attempts, as it appears unnecessary for the next objective of my investigation"

heinrichhartman··on Tips for analyzing logs
Looks great, but I struggle to get this working with the two main log sources on my system:

1) systemd logs (binary data stored at /var/log/journal)

2) docker logs (from various containers running on the host)

Any hints on getting this working? I don't see this covered in the docs (https://docs.lnav.org/en/latest/formats.html).

heinrichhartman··on Links mentioning Mastodon flagged as sensitive on Twitter?
Not seeing a flag.
heinrichhartman··on Google removed our website from search because it uses YouTube-dl
The case is more nuanced than it looks from the outset. In this case YTDL is executed on the provider's premise not on the users machines. So you are not distributing a tool, you are providing a service that scrapes videos from YouTube.

I still think that a DMCA takedown should not apply (and the regulation is BS) but this looks to be a different case. E.g. I could completely understand why Google would not want such a feature in your product for Business reasons.

heinrichhartman··on Ask HN: Which books do you consider real gems in your field of work/study?
# Pure Mathematics / Geometry

- Harshorne - Algebraic Geometry

- Bott, Tu - Differential Forms in Algebraic Topology

- Milnor, Stasheff - Characteristic Classes

- Milnor - Morse Theory

- Serre - Linear Representations of Finite Groups

- Fulton - Intersection Theory

heinrichhartman··on Poly-time algorithm for deciding Hilbert Nullstellensatz. A proof of P=NP
That was an honest question. I agree the paper is bad, but I struggle to find the first mistake.
heinrichhartman··on Poly-time algorithm for deciding Hilbert Nullstellensatz. A proof of P=NP
Can you pin-point the first error?
heinrichhartman··on Facebook gives data to Nebraska police prosecuting teenager for abortion
What value does a law have if you are not enforcing it?
heinrichhartman··on Technical reasons to choose FreeBSD over GNU/Linux (2020)
#TIL Will check this out! Thanks!

- I can see the Dockerfile equivalent (Bastillefile). - Not sure about the image distribution (Docker repositories) and Cluster management parts (Mesos, K8S)

heinrichhartman··on Technical reasons to choose FreeBSD over GNU/Linux (2020)
I would like to be on the jails train, but the build/deployment story always felt inferior.

I have never seen anyone build jail-images from CI and deploying them to fleets of FreeBSD hosts. This may be technically feasible with zfs send/recieve but in practice people I know distributed packages (not images) to 10s of FreeBSD jails/hosts.

I want to deploy container images to a cluster - not install a package in a zone/jail. Is anyone doing this with FreeBSD/Solaris? (Outside of Joyent)

heinrichhartman··on Ask HN: Is having a personal blog/brand worth it for you?
Thanks for writing these blogs! Always appreciated finding them here [1].

[1] https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que...

heinrichhartman··on Former PM Abe Shinzo dies after being shot
Imagine how his gun would have looked like if he lived in the US...
heinrichhartman··on The big six matrix factorizations
> I could be misunderstanding, but I think you'd get all the algebraic > content out of it by computing the dimensions of the image and kernel, > then working with them from there on. Why would you want to have a > matrix decomposition that separated them?

Well. Sometimes you want to know a solution to a problem and not only the dimension of the solution space : )

Also for composition: If you have "compatible" matrices B,C. How do you compute the restriction: A|_ker(B), A|_im(B) or co-restrictions (factor projections): A/ker(C), A/im(C), etc.

heinrichhartman··on The big six matrix factorizations
Sure, but from an algebraic (categorical) perspective, taking kernels, co-kernels and images are the most fundamental operations you can think of.

The question is: How do you compute them in an effective (avoiding full SVD) and stable way?

heinrichhartman··on The big six matrix factorizations
It's not unique, but it can be implemented in a way that is stable. E.g. SVD does this (but is quite overkill for the requirements).

It's highly relevant from an algebraic perspective, hence it's curious that it's not covered (at all) in the numeric literature.

heinrichhartman··on The big six matrix factorizations
As it turns out, the author does cover the rank-decomposition (under the name "Rank-Revealing Factorization") in his blog as well:

https://nhigham.com/2021/05/19/what-is-a-rank-revealing-fact...

heinrichhartman··on The big six matrix factorizations
From a theoretical perspective the most fundamental decomposition is the rank-decomposition:

A = X D Y

with X,Y invertible and D diagonal. It's called rank decomposition, because you can read off the rank from A by counting the non-zero entries in D. It's also useful to determining bases for the image and the kernel of A. Every math student learns a version of that in their first lecture series of Linear Algebra.

Curiously, the rank decomposition is not covered in the numerical literature. Also it's not possible to derive a rank decomposition from LR, QR decomposition, although the underlying algorithms (Gauss, Gram-Schmidt) could be used to do so.

It took me multiple weeks of work, to understand what the problem with this algorithms is, and what the practical options are to establish a rank decomposition are. Full details are available on my blog:

https://www.heinrichhartmann.com/posts/2021-03-08-rank-decom...

TL;DR. Your options are (1) SVD, (2) QR factorization with column pivoting (part of LAPACK), (3) LDU factorization with total pivoting (not implemented in BLAS/LAPACK/etc.)

heinrichhartman··on Monarch: Google’s Planet-Scale In-Memory Time Series Database
Good to hear. I also learned a lot from this discussion!
← PreviousPage 2 of 15Next →