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 Computational Algebraic Topology, lecture notes [pdf]
Thanks. This is something!
heinrichhartman··on Computational Algebraic Topology, lecture notes [pdf]
Does anyone have a reference to actual computational applications of Algebraic Topology?

These notes contain the definition of various chain complexes and groups (co-homology/homotopy) that are in-principle computable. However, I have not seen this being efficiently applied somewhere, and not been able to come up with interesting applications myself. Topics I have considered are:

1. Triangulation of solutions of equations (for e.g. homology computations) does not seem to be very popular, at least in dimension >3. I suspect this is a hard problem, but maybe I am just missing pointers to the right literature.

2. CAD applications or Computer Games have lot's of triangulated objects. Their topology seems to be not to be very interesting. Again: In dimension <=3 there is really not that much going on. And since you have constructed the object yourself, you probably know the geometry already.

3. Graphs appear everywhere, and can be viewed as 1-dimensional chain complexes but do not have interesting co-homology groups.

4. Did anyone compute homology groups for "Manifold Learning"?

It's also not clear to me, how much interesting information can be extracted from those homology groups. Applications of Homotopy/Homology in (semi-classical) Physics are already quite slim (apart from Quantum Field Theory, String Theory, Gauge Theory?!) as most of it takes place in contractible spaces $IR^n$.

heinrichhartman··on Apple removes first-party firewall exemption in macOS 11.2 beta 2
By choosing which markets you operate in and which products you develop you have a fair bit of influence which things are in your "financial interest".

E.g. creating a company with a business model which benefits from taxing CO2 emissions (Tesla) is morally great. Whereas having a business model which benefits from cheap oil (VW) is less so. Product decisions (electric vs. fuel engines) have a large effect on your long-term financial interests.

heinrichhartman··on Making a digital clock in Google Sheets
Thanks for sharing. Really surprised how straight forward your solution is!

Learned about REGEXEXTRACT and parametrized Strings.

Powerfull stuff.

As my job involves more and more Google Sheets Engineering lately. I really appreciate this kind of hacks!

heinrichhartman··on Goodreads plans to retire API access, disables existing API keys
I wonder how much banks are the problem here. I am not sure if payments of a few cents can be realized online without loosing money on fees to payment providers or banks.

AFAIK, this is the "micropayment" problem, that people were hoping bitcoin would solve.

heinrichhartman··on Who Americans spend their time with, by age
> where the women do all this crappy work

This is very disrespectful to the many women, and a growing number of men that are making a conscious choice to prioritize raising children and caring for a family over salary work.

The problem is forced labor here, i.e. not having a choice to enter the work force. Not that the work is inherently "crappy" - it is not.

heinrichhartman··on Using Emojis in Mathematical Notation
In my experience, math is 99% handwriting. You only put it into Latex once you solved the problem. Exploration and experiments are done on with pen and paper.

This is also the reason why notation is often terse, and highly domain/author specific. You get tired of writing long_variable_names very quickly if you do it OVER AND OVER by hand. Now think about how much work and confusion it would be to replace those symbols with little paintings...

heinrichhartman··on Using Emojis in Mathematical Notation
That's perfectly fine, and sometimes done in expository writing.

https://www.amazon.com/Algebraic-Geometry-Projective-Varieti...

This get's very tedious to write if you use this over and over in proofs.

heinrichhartman··on How Python bytecode is executed
Really enjoyed the read! Thanks for taking the time to write this down.

It's easy to forget, that if you are running "Python" in production, you are actually running CPython on a x86 VM configured with a bunch of *.py files. When things go sideways, you might find yourself in a situation where knowing CPython internals becomes relevant.

heinrichhartman··on RIAA Takedowns Backfire as Pirated MP3s Now Surface on GitHub
Looks like the project moved to GitLab:

https://gitlab.com/dstftw/youtube-dl/-/commits/master

Source: https://news.ycombinator.com/item?id=24960039

heinrichhartman··on On Abandoning the X Server
I would not consider this examples "Applications", but more configuration tools. I would also not expect to be able to port the OSX Clipboard manager to Windows or the "Displays" utility. From a new window server I would expect to have some ways to configure output, switch applications, manage clip-board but I would not expect to have my existing tools continuing to work.

If you are re-architecting a system from the ground-up there is always some fallout expected.

heinrichhartman··on Youtube-dl GitHub Template
Not daily, but frequently. In my experience ytdl breaks every 2-3 weeks and needs to be updated.
heinrichhartman··on Youtube-dl GitHub Template
So let's start a constructive discussion here:

What are the next steps for the community?

- Should we re-locate to a different space?

- Shall we wait until a lawsuit has been filed?

- Shall we wait until we have a legal response?

The good thing is that the website https://yt-dl.org is sill up, and the original author seems to have control over it. If there is some coordination behind it, I don't see why the community could not re-locate to a different place, where it is less likely to be sabotaged by what seems to be an inappropriate DMCA takedown.

heinrichhartman··on Hands-Free Coding: How I develop software using dictation and eye-tracking
> The biggest issue I've found so far is voice strain

My singing teacher started out as a voice therapist. He is still working with a lot of people with damaged voices that are there for therapeutic reasons as well as professional opera singers that there to level-up their game.

He says, the best thing you can do for your voice is to sing.

Singing will give you the proper "support" from your lungs and train the vocal muscles without wearing them out. One of the key aspects here is producing high quality vowels, and don't let the sound be disturbed by consonants. This is opposite to how the voice is used when speaking (in most languages), where consonants are of primary importance for people to understand what you are saying. However, consonants are interruptions in the air-flow and can easily wear the voice out and cause stain.

heinrichhartman··on Prefer Fakes over Mocks
> How do I know without looking whether the fake store method REALLY stores the doc, or whether someone set it up to just return OK?

Why would you not look into the fake implementations? If it's just a two liner that takes the parameters and writes them to disk, then that's a LGTM from me. You would not test every getter/setter method in any of your classes, would you?

If it's more complex than this, you can absolutely write tests for your fakes. In many cases fake data-stores use tested backends, and tested client libraries. If the client wrapper is complex enough then you can/should test it as well.

heinrichhartman··on Contravariant Functors Are Weird
Let me give you another example:

Let X be a set, and

    Fun(X) = { real valued functions on X }.
Then X -> Fun(X) is contra-variant.

Indeed, if $F: X -> Y$ is a map between set, and f \in Fun(Y). Then you have a natural function $f \circ F: X -> IR \in Fun(X)$. This is sometimes called a pull-back of $f$.

Functors of the kind Space -> { some stuff* that lives on X } are often contra-variant. E.g. functions, vector bundles, sheaves, differential forms, etc.

heinrichhartman··on I built an app to fix my depression
> I think, as op also insinuates, it is all about acceptance.

I second this. From my experience you have to START WITH ACCEPTING the status quo and honestly looking at it without judging or being ashamed. It helps me to tell myself: "This is not terrible. I am alive. I have a job. My body is still working OK."

From there FOCUS ON THE DELTA: What can I do today that will bring me into a slightly better position tomorrow.

Avoid thinking about the past ("I ate too much today.", "I did not exercise all week."). This is done. No way to change it.

Don't set high expectations. You only need to know where you want to be, and that you are going into the right direction. It does not matter much if you arrive there in one week or in five years.

heinrichhartman··on Mathematicians Should Stop Naming Things After Each Other
Having worked in mathematics for 10+ years, I can tell for sure, that the least problem you will face when trying to understand Calabi-Yau manifolds are the naming conventions.

Unwrapping the last term alone is a multi-year endevour if you start from scratch:

> [A] manifold is a locally ringed space, whose structure sheaf is locally isomorphic to the sheaf of continuous (or differentiable, or complex-analytic, etc.) functions on Euclidean space [IR^n]. -- https://en.wikipedia.org/wiki/Manifold#Mathematical_definiti...

Note that definition, does barely use inventor's names and is still very dense and hard to unwrap.

I never found naming conventions to be a notable problem.

heinrichhartman··on Essential C (2003) [pdf]
Thanks for this!
heinrichhartman··on Essential C (2003) [pdf]
While we are here, does anyone have a good resource about memory management strategies in C?

Topics:

* Best practices for C function signatures (caller allocates (which size?), callee allocates (where? which allocator?))

* Memory Ownership Models

* Borrowing

* Reference Counting

* Garbage Collectors and C-Libraries providing this functionality

* Interning Objects (Strings)

* RAII [1]? And it's benefits/flaws

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

Context: I feel that understanding the C memory primitives in not that hard (stack variables, malloc/free, C++'s new). But how to use them is devilishly tricky. I have seen little information about this.

heinrichhartman··on Two Features of JavaScript that you might not know
money
heinrichhartman··on File System Interfaces for Go – Draft Design
Calling stat on all the files is just really expensive if your directly is large.
heinrichhartman··on An update on our security incident
What I find most problematic about the attac is the incident response by Twitter.

As people pointed out here, hijacking Twitter accounts can lead to big stock market crashes, mass panics ("bomb found at XXX") and maybe even military escalations.

Under this circumstances, leaving a platform with an unknown number of compromised accounts online, seems irresponsible to me. In such a case you must stop the bleeding ASAP, either by locking up "important" accounts (what they eventually did, after a few hours!) or taking the site offline.

Next time this happens, we might not be so lucky.

heinrichhartman··on Cool URIs Don't Change (1998)
Yes. Have you tried to do that even for moderately complex sites?

I have tried to do it a few times, and eventually just gave up. Carrying forward bad naming decisions from the past, is tremendous effort. When cleaning up the house, I also don't leave around sticky notes at the places where I removed documents from.

On top of this:

- When using static site generators, it's not even possible to do 301 redirects (you would have to ugly slow JS version).

- It does not help if you don't own the old DNS name anymore.

heinrichhartman··on Cool URIs Don't Change (1998)
I think this is just unrealistic. Let's look at this example:

    http://www.pathfinder.com/money/moneydaily/1998/981212.moneyonline.html
This consists of:

0. Access protocol

1. Hostname/DNS name

2. Arbitrary chosen path hirarchy

3. File extension

This is really a description where to find a document ("locator" not "identifier"). So, if you are:

- re-organizing / cleanup your file structure

- change or hide the file extension

- enable HTTPS

- migrating files to a different domain name

This WILL change the URL. What are you going to do? Not cleanup your space anymore? Stick to HTTP? So URLs DO change. That's just the reality.

If you want something that does not change, don't link to a location but link to content directly: E.g.

- git hashes do not change

- torrent/magnet Links don't change

- IPSFS links do not change.

Or use a central authority, that stewards the identifier:

- DOI numbers don't change

- ISBN numbers don't change

heinrichhartman··on Modes, Medians and Means: A Unifying Perspective (2013)
If you model x_i as a random sequence generated by a random variable:

    X ~ s + eps
Where eps is normal distributed with mu=0,sigma>0. The probability density of the observation x_1, \dots, x_n is:

   p(x_1,\dots,x_n) = C * exp(-(s-x_1)^2) * exp(-(s-x_2)^2) ... * exp(-(s-x_n)^2)
Taking the log you get

   Log(p(x_1,\dots,x_n)) = - C' * sum_i (s-x_i)^2
So the probability density of your observation is maximized if the sum-of-squares is minimized.

This means if you set s to mean(x_i), you will maximize the "log-likelyhood" of your observation.

heinrichhartman··on Help Message for Shell Scripts
I like to do:

    help() { cat $0 }
"May the source be with you." : )
heinrichhartman··on Woodworking for Engineers
> How is this different from professional woodworking?

Professional wood-shop costs easily >$100K :)

Number one cost factor, IMHO, is space for a shop. You need enough room to store and handle lumber. If you have that, you can start with hand tools (saws, chisels, planes) for let's say ~300$. This will in-principle allow you to do everything. People have done this for ages, this way.

Power tools make woodworking much faster. I would start with a jig saw, drill press, circular hand saw. This will be another ~800.

The first expensive mile stone is the table-saw. This will be the most used tool in your shop. Everything gets better when you have access to a good table saw. I have spent 1.2K on mine.

Next upgrades are miter-saw, band saw, planer, jointer. They need a lot of space and are not cheap. This is were you enter the more professional realm.

To get high quality versions of all that tools will cost a lot of money. Oftentimes ebay has used tools for small money. E.g. I bought 15 hand planes for ~100 EUR last year and 50EUR for a used drill press.

Happy woodworking!

heinrichhartman··on Ask HN: Which tools have made you a much better programmer?
Lots of great tips/tools here. Let me add this to the list:

Dash https://kapeli.com/dash

Makes browsing documentation really fast and convenient. Have that bound to F1 in my emacs to lookup the current word at point. So you instantly zap to man pages, lua reference manual, python docs, perl docs, ... you name it. Highly recommended.

heinrichhartman··on Show HN: Jqview, a simple native GUI for inspecting JSON with jq
You can get something fairly similar with fzf, using the --preview trick from [1]:

    echo '' | fzf --print-query --preview "cat *.json | jq {q}"
https://paweldu.dev/posts/fzf-live-repl/
← PreviousPage 5 of 15Next →