Better HN
topnewbestaskshowjobs
Log inSign up

lukasgelbmann

198 karma · joined Jan 29, 2018 (8y ago) · 49 submissions

Submissions

comment 2w ago · link · parent

Among other places, Tim also wrote a lot on StackOverflow. He’d answer all kinds of questions, both from novices and experts.[0][1]

I like reading his answers. He always seemed to have something interesting to say, and his answers are kind, light-hearted, approachable and insightful.

[0] https://stackoverflow.com/a/69859068

[1] https://stackoverflow.com/a/19391867

comment 3w ago · link · parent

What you probably won’t find, though, is the programmer’s else: “If X, Y. Else [meaning: if not X], Z.”

comment 3w ago · link · parent

I think it’s a different construction.

The programmer’s if-else goes like “If the window is open, close it. Else, leave it closed.” This is not a natural construction outside of programming, people would use “otherwise” or “if not” instead.

(“Else” stands for “if the window is not open” in the above.)

The Crime and Punishment if-else is more like “If the window is open, close it. Else, cold air will enter.” This is normal English.

(“Else” stands for “if you don’t close it” here. It can’t stand for “if the window is not open”.)

comment 4w ago · link · parent

> > Perhaps it will all come back, but now if you love me, give me up . . . else I shall begin to hate you, I feel it.

It’s not being used in the programming if-else sense here. He’s not saying “if you don’t love me, I shall begin to hate you”. He’s saying “if you don’t give me up, I shall begin to hate you”.

comment 4w ago · link · parent

Ah, you’re right. Though unless I’m mistaken again, Safari (but not Chrome and Firefox) still trusts AAA Certificate Services and handles this issue with revokations.

comment 4w ago · link · parent

> “This is being fixed now”

Wow, that was fast!

comment 4w ago · link · parent

I think the main problem is that the weak eMudhra intermediates were cross-signed by Sectigo. Certificate revokations are needed to handle this correctly.

Dropping the Sectigo root along with the eMudhra root is the easy and safe solution, and maybe this is what Apple should have done (it’s the workaround they recommend!). But it means that some small percentage of certificates that are fine won’t be accepted.

comment 4w ago · link · parent

Chrome dropped one of the eMudhra roots. The problem is that the weak eMudhra intermediates were cross-signed by Sectigo. ~~Browsers (at least Chrome) didn’t drop the Sectigo root, instead they store a revokation for the cross-signature.~~ (edit: this is wrong, see josephcsible’s answer below)

Dropping the Sectigo root along with the eMudhra root is the easy and safe solution, but it means that some small percentage of certificates that are fine won’t be accepted.

comment 4w ago · link · parent

Yes, it’s insane. Step 2 does next to nothing for security without step 3.

comment 4w ago · link · parent

Homebrew’s git (unlike homebrew’s curl) seems to default to using the system’s CA bundle, not homebrew’s. Is that a bug?

comment 4w ago · link · parent

You could be running a different version of curl, e.g. homebrew. Try `which curl` and `/usr/bin/curl <url>`.

comment 1mo ago · link · parent

> “We had O(n lg n) since 2019 already”

Yes, svat’s comment accounts for that by using little-o notation* in o(n log n). This was only achieved in the 2026 result.

* https://en.wikipedia.org/wiki/Little_o_notation

comment 1mo ago · link · parent

> “Impacts fewer than N distinct services or applications. N is 1 on our frontend monorepo[…]”

What kind of change impacts fewer than 1 services or applications? Is this meant to say “at most N”?

comment 1mo ago · link · parent

Yes, and variable length arrays were made an optional part of the standard in C11. Whereas flexible array members remain a standard required feature.

Flexible array members don’t allocate a dynamic amount of memory on the stack.

comment 2mo ago · link · parent

Right, UTF-8000 does have this property. Too late to edit my comment now, thanks for noticing that.

comment 2mo ago · link · parent

Self-synchronization in UTF-8 is intuitively a great thing to have, yet I don’t remember actively relying on it ever. Does anyone have a good example of when it‘s useful?

Another related nice property that UTF-8 has: substring search reduces to bytestring substring search. I.e. given two Unicode strings in UTF-8 encoding, you can check if one is a substring of the other by just treating them as bytestrings and checking if one bytestring is a substring of the other bytestring. This is a stronger property than self-synchronization: UTF-8 has it, but UTF-8000 doesn’t.

comment 2mo ago · link · parent

Insightful article. The author makes some great points about the dynamics of technical debt in organizations.

I think a sinking ship is a reasonably good metaphor though. A sunken ship is a horrible, terrible outcome.

In the metaphor, a codebase is sunken when it’s unviable to continue using it. The organization stops working on it and no longer runs it. At this point, the code is completely worthless to the business, like a ship at the bottom of the ocean. True, you could imagine the code getting worse theoretically. But in reality, it will just sit there and rot.[0] The business might attempt a rewrite or just discontinue the product.

It’s possible, but not a given, that a business sinks with one of its codebases. This can happen with a ship too, if a business relies heavily on it.

[0] https://en.wikipedia.org/wiki/Software_rot

18.

CSS is Turing Complete (2022)(github.com ↗)

2 points · by lukasgelbmann · 2mo ago · discuss

19.

The best dark mode toggle is probably none(lea.verou.me ↗)

5 points · by lukasgelbmann · 2mo ago · discuss

20.

Wikipedia and other sites slow or unavailable(wikimediastatus.net ↗)

8 points · by lukasgelbmann · 3mo ago · 4 comments

21.

We had a unit test once which only failed on Sundays (2015)(qntm.org ↗)

2 points · by lukasgelbmann · 3mo ago · discuss

22.

Cropping Images with CSS While Keeping a Focal Point in the Center (2023)(odland.dev ↗)

3 points · by lukasgelbmann · 3mo ago · discuss

comment 3mo ago · link · parent

Too late to edit, but the situation with İ is more complicated, and I got the mapping wrong for this specific casefold implementation.

What I should have said is that in the case of İ/i/I/ı, using str::to_lowercase for string matching wouldn’t be any less correct than using their locale-independent casefold.

The third character in the list, final sigma, is a good example that illustrates why using str::to_lowercase for string matching isn’t good.

comment 3mo ago · link · parent

There’s some interesting information in there. Unfortunately the person or LLM writing this got pretty confused right in the introduction already.

> “Suppose […] they type straße and you’ve stored STRASSE. To make these count as matches, you need […]”

Really bad example, because as the article says later on, this casefold crate won’t match those two strings because the ß → ss conversion isn’t done.

> “[str::to_lowercase and case folding] diverge on real characters—ß, İ, final sigma”

The main point is true (case folding is different from lowercasing), but two of the three examples are wrong. The casefold operation that they use maps ß to itself, as does str::to_lowercase. The casefold operation maps İ to U+0069 U+0307 regardless of locale, as does str::to_lowercase.

When I’m reading an article, these kind of mistakes in the introduction make me doubt the accuracy of the whole article. Which is a shame, because again, it’s an interesting write-up. The mistakes also make the article harder to follow, since the examples imply ß is folded to ss.

comment 3mo ago · link · parent

  Location: Europe (UTC+2)
  Remote: yes
  Willing to relocate: no
  Technologies: Python, SQL, C, Java, Go, PHP, JavaScript, Typescript, Claude Code, Analytics, Git
  LinkedIn: https://linkedin.com/in/lukas-gelbmann
  Email: me@lukasgelbmann.com
Senior software engineer, experienced with backend engineering, databases, data analytics, application security, web applications, and fullstack development.

comment 3mo ago · link · parent

> There are 349 million people in the US, so the number of arsonists is 0.0001% of the general population. The number of firefighters that are arsonists (100/65,795) is 0.0015%, so I suppose it's slightly higher that the general population.

You comparing arsonists/pop with firefighter-arsonists/arsonists. That’s the wrong comparison. You should be comparing arsonists/pop with firefighter-arsonists/firefighters. Or firefighters/pop with firefighter-arsonists/arsonists.

(On top of that, mixing numbers from different sources can be problematic. For example, how are repeat convictions treated in the different sources? Who counts as a firefighter?)

comment 4mo ago · link · parent

Author here.

Our aim isn’t to try and line up with the calendar that was in use at the time, 2026 years ago.

Instead, the aim (for 28times) is to implement the rules of the proleptic Gregorian calendar[0] correctly. The bug was that those rules weren’t followed for some rare values.

But to address your comment properly, I think I should justify why on Earth someone would want to use the proleptic Gregorian calendar for year 0 and before. In short, because it’s a useful fiction.

The biggest reason is interoperability: a lot of software follows proleptic Gregorian rules, aligning around ISO 8601. Probably a clear majority of date/time software. We want to line up with all that existing software that assigns a specific meaning to a string like "0000-02-01". That’s the first of February in the proleptic Gregorian calendar, even though it was a different date in the ancient Romans’ calendar.

The other reason is to keep it simple: since most people use the Gregorian calendar in present times, it’s simplest (for us as implementors, but also for users) to extend its rules into the distant past and distant future. The alternative for be to have multiple sets of rules, e.g. Julian and Gregorian calendar. (You might say it would be even simpler to just not allow timestamps before 1582. But there are use cases, e.g. in astronomy or history, where people want to work with timestamps before 1582, and even before 1 AD.)

[0] https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar

28.

A glitch in February of the year 0(28times.com ↗)

22 points · by lukasgelbmann · 5mo ago · 25 comments

comment 5mo ago · link · parent

I’m working on a time series management & analysis tool. The goal is to provide simple ways to work with time series data, including an API and visualisation.

https://28times.com

12