HNHacker News
TopNewBestAskShowJobs

larsrc

699 karma · joined June 19, 2019

Works on developer tools at Google since 2010. Previously worked at a Danish startup and at the Danish State Library doing digital archiving. Co-maintainer of Dia for 8 years. Co-founder of AustinMUD, lead maintainer for 5 years.
submissionscomments
larsrc··on Go: Sentinel errors and errors.Is() slow your code down by 3000%
One of me and my PhD advisor got it wrong. When "120% slower" is vastly faster than "80% slower", there will be confusion.
larsrc··on Saint Michael Sword: Are the cathedrals really on a straight line?
Looking at that map of sites in France alone, randomly distributed is a good first approximation for figuring out the probability.

Pondered the estimation a bit more. The first two points of a group of 7 define a line. The probability of the remaining five being close enough to the line is just the probability of each being close enough, to the power of five. We can roughly estimate that probability as the "close enough" distance divided by the total area. Let's just normalize. Let's assume distribution within a unit square Some of the lines would not cut in a way that most of the "close enough" area is inside the box, but that's a constant factor and not to big.

Given n points and the probability p7 that seven points lie close enough to a line, we take the number of different sets of seven points, N7 = (n choose 7). The likelihood of a match is (1-(1-p7)^N7).

This is a very rough estimation, of course, but it gives some idea of the likelihood.

larsrc··on Slow-spinning radio neutron star breaks all the rules
The rules are more like guidelines, you see.

The universe has had a lot of opportunities to come up with wacky stuff.

larsrc··on Saint Michael Sword: Are the cathedrals really on a straight line?
I would say the next logical step is figuring out the probability that with this many points, what is the likelihood of 7 of them being this close to being on a line? We can assume a uniform random distribution on the unit circle or square for simplicity.
larsrc··on Not Just Scale
It's still a SPOF, though.
larsrc··on Go: Sentinel errors and errors.Is() slow your code down by 3000%
You understood what they meant, though. But yeah, it's confusing. I argued with my PhD advisor over this several times. "50% slower" or "10% slower" is ready to understand, but "96% slower" is harder to figure out, and it's easy to dismiss the difference between 96% and 98% because the numbers are similar
larsrc··on Addition with flamethrowers – why game devs don't unit test
Disclaimer: never was a game dev

You're conflating unit tests and functional/integration tests there. A unit test should test that a single function/method/class does what it's expected to do. The game design changes should change how they are put together, but not often what they do. If your setThingOnFire() method suddenly also flips things upside down, you're going to have a bad day. Instead your callers should add calls to flipThingUpsideDown().

larsrc··on Microwaves Not Made in China
That's unavoidable for anything even slightly complex. The FairMouse project (https://www.nager-it.de/en/maus#language) shows the full graph for a plain computer mouse. Microwaves are more complex.
larsrc··on Why Make Art in the Dark?
Even if most didn't live in caves, if enough of them spent enough time there they would surely end up painting something. And caves are good places for paintings to survive.

I'm not even sure one could separate religious and non-religious purposes. I think there was much less of a distinction. Even in ancient Rome, the gods were involved in many everyday activities, it would surely have been even more so in the Stone Age

larsrc··on Štar: an iteration construct for Common Lisp
Me too. Don't name your thing with diacritics most people don't know how to make on a keyboard.
larsrc··on Why Make Art in the Dark?
Because that was home? The caves provided shelter for predators and the elements, and a fixed place for a fire. So sitting around when there was spare time, of course one would scribble on the walls.

Also, survivorship bias.

larsrc··on Why the CORDIC algorithm lives rent-free in my head
Some related articles with hardware implementations: https://arxiv.org/pdf/2211.04053 https://hal.science/hal-01327460/document https://archive.ll.mit.edu/HPEC/agendas/proc05/Day_1/Abstrac...

I would love to see how it compares to regular software and hardware trigonometric implementations on various kinds of hardware through the ages.

larsrc··on Design docs at Google (2020)
Design docs are the _mise en place_ of software development.
larsrc··on Design docs at Google (2020)
Googler here. I used to hate writing design docs, even though I have several published papers. But a few years back I realized the main benefits for me:

* It empties my head of the immediate parts of the idea, letting me move on to deeper parts and more productive considerations.

* It makes flaws more obvious, especially to myself.

* It makes it easier to share these thoughts, especially with people in other offices. They usually give really good feedback.

* It gives me a much better idea of how much work is involved than if I just start coding.

* It usually points out some things I need to learn before I start coding - adjacent systems, appropriate tech choices, etc.

Yes, it's also good for promo, but a successful project is better.

I often get comments on how useful my docs are, so I think I'm onto something.

larsrc··on Design docs at Google (2020)
> Worst case scenario is when by improving the problem definition a simple solution appears that doesn't require a complex design. The author having invested a lot of time in a complex design (that historically and many committees still look for to promote off of) will push back against anything that is simple. The difficult trick is helping the engineers to improve their problem definition early in the writing process.

The worst case is really when even more time has been spent coding, testing, releasing, and integrating the overly complex design, and then it's extra work on top to get rid of it.

> Anywhere else I would have been grabbed after lunch and would have worked on defining the problem for a few hours with the team at the whiteboard.

I do that at Google regularly, often in parallel with writing the doc. Nothing beats talking with an experienced engineer directly.

larsrc··on Design docs at Google (2020)
> You have a point in that bureaucracy can needlessly get in the way of meaningful change.

What a good early design doc can do is turn meaningless changes (e.g., doing a project for the sake of promo) into meaningful non- or minimal change. The best code is the one not written.

And at least in my area (Core), the design docs only go through anything like a formal process when it's a larger project that would take years or multiple engineers. Other areas are probably different.

larsrc··on Design docs at Google (2020)
Caveat: Googler here.

One of the things that had been problematic at Google is the creation of many more products than are really needed, leading to the infamous Google Graveyard. One of the reasons I have come to like writing design docs for my ideas is that a lot of the ideas turn out to be crap when they get written out. Quite a few are good enough that they have already been done, or close enough, which my colleagues can then inform me of. This is a very lightweight way of trimming out useless projects.

And no, Reader wasn't useless. Different story.

larsrc··on AMA: I'm Dave Greene, an accidental expert on Conway's Game of Life
Wolfram's "A New Kind of Science" posited the study of cellular automata as a revolutionary new field of science. Did you agree then? Do you now? If you changed you mind, why?
larsrc··on The problem with invariants is that they change over time
Usually an invariant is something you explicitly state about a data structure or algorithm, and which must hold before and after an operation, but can be temporarily violated.

What you are talking about here are assumptions, which are usually implicit and sometimes not even part of the thought process. One purpose of writing a design document is considering and stating the relevant assumptions.

larsrc··on The problem with invariants is that they change over time
Thanks to Titus Winters for the phrase "Software engineering is programming integrated over time". Handling evolution of software is different from just writing it.
larsrc··on The problem with invariants is that they change over time
Some "required" fields in very commonly used protos ended up being unused, but everybody has to fill them out all the time. If they didn't, the proto wouldn't even parse, by design.

Protobufs explicitly do not have a built-in version system (though of course you could add an optional field for it), presumably because it is better to inspect the data than build in assumptions that a certain version overs a certain invariant.

larsrc··on A Sketch of the Biggest Idea in Software Architecture (2022)
Protocol Buffers are the narrow waist of Google.
larsrc··on The Airship to Orbit Project
Why do amateur space craft and submarines go together? See Copenhagen Suborbitals.
larsrc··on The Airship to Orbit Project
Seems lots of people consider just getting high to be sufficient for them. /j
larsrc··on The Airship to Orbit Project
And "airmosphere".
larsrc··on How much faster are the Gnome 46 terminals?
Nice tests, but could you please use 0-based Y-axes in the charts? You're visually exaggerating the improvements.
larsrc··on LaTeX3 Automatic Labels for Fun and No Profit
A nice intro to making macros, which is one of the most powerful parts of LaTeX indeed.

Autoref itself seems a fine way of messing up your references and making your source code less readable. The beauty of naming is that you have the context at hand. Moving around blocks of text, or adding and removing text, happens throughout the process. With autoref, you now have to remember to _sometimes_ update the refs or get subtly different references. I wouldn't trust myself to get that right.

larsrc··on Quality is a hard sell in big tech
Google has 100000+ employees to create mess, and not nearly enough to clean up that mess. They have done a _lot_ to improve the coding culture over the years, without that it would have been unworkable.

As for the generations, may I have the honour of knowing your age, my friend?

larsrc··on 3D printed titanium structure shows supernatural strength
Are these properties unique to printing in titanium? Doesn't sound like it. So hopefully we will see this as an infill option soon.
larsrc··on Why do east Asian firms value drinking?
For an interesting and humorous tour of drinking across history and cultures, read Mark Forsyth's "A Short History of Drunkenness". Getting hammered had been crucial, even sometimes obligatory, in many places throughout history.
← PreviousPage 3 of 10Next →