HNHacker News
TopNewBestAskShowJobs

gdwatson

599 karma · joined July 29, 2012

submissionscomments
gdwatson··on Myna: Monospace typeface designed for symbol-heavy programming languages
Beside being a neat font in its own right, Iosevka allows for custom builds with different settings, selection from a bunch glyph variants, and custom ligature choices. It's pretty incredible.
gdwatson··on Removing XSLT for a more secure browser
The first few times you use it, XSLT is insane. But once something clicks, you figure out the kinds of things it’s good for.

I am not really a functional programming guy. But XSLT is a really cool application of functional programming for data munging, and I wouldn’t have believed it if I hadn’t used it enough for it to click.

gdwatson··on Liquibase continues to advertise itself as "open source" despite license switch
“They convinced a bunch of developers that their definition of Open Source that was specifically crafted to protect business interests is canon.”

They adopted the existing Debian Free Software Guidelines as the Open Source Definition. The DFSG are good, actually, and represent an important community consensus outside the FSF.

gdwatson··on Just let me select text
The point isn't that the developer should disable text selection whenever he thinks it's unnecessary, which would indeed be silly. It's that sometimes the user interface rules for navigating selectable text conflict or interfere with the user interface rules for navigating, say, a set of tab panes. In that situation, making the tab titles selectable will cause grief.

I agree with your address example. That is user data, and it should be selectable.

gdwatson··on Just let me select text
I agree. The closer to a traditional desktop U.I. you get, the jankier selecting clickable text becomes. For a simple web form, leaving labels selectable is no big deal and probably a win. But for something trying to behave like a tabbed dialog box, it breaks navigation left and right.
gdwatson··on GMP damaging Zen 5 CPUs?
Which motherboards enable PBO out of the box? That’s crazy! I know that motherboard manufacturers set some sketchy default turbo durations for Intel CPUs back when Intel was cagey about the spec and let them get away with it, but I thought that AMD was stricter about such things.
gdwatson··on GMP damaging Zen 5 CPUs?
It sounds like their lawyers have done the appropriate counter-challenge with YouTube, so the video will go back up unless Bloomberg sues them in the next so many days. And this is Gamers Nexus, so I presume they will fight to keep it as is on principle.

Personally, I found the length of the quotes from politicians kind of tedious, but I sure wouldn’t want them to capitulate to Bloomberg after this.

gdwatson··on Building the mouse Logitech won't make
My Logitech G603 runs quite happily on Eneloops, for the best of both worlds.
gdwatson··on German contest to live in depopulated Soviet-era city proves global hit
This is one of those cases where the left–right spectrum just doesn’t capture the interplay of various economic, social, and cultural positions.
gdwatson··on UK backing down on Apple encryption backdoor after pressure from US
That didn’t placate the UK government, because it didn’t just want access to British users’ data – it wanted access to any Apple user’s data from anywhere in the world.

I suspect that disabling advanced data protection in the UK was meant to let Apple say it was complying as far as it could while fighting the main order.

gdwatson··on Stdio(3) change: FILE is now opaque
BSD has had funopen(3) since 4.4, so it has an alternative. FreeBSD has implemented fopencookie(3) since v11, but FreeBSD is the BSD most willing to implement Linux interfaces for various reasons.
gdwatson··on German court rules Meta tracking technology violates European privacy laws
As an American, my reservations about European privacy laws are related to jurisdiction, and none of them applies here. I welcome this decision.
gdwatson··on Meta and Yandex are de-anonymizing Android users' web browsing identifiers
If unethical behavior is more lucrative than ethical, it will always be tempting. But that doesn't make it ethical.
gdwatson··on Parallel ./configure
Yeah, I think the dream was more like, “The compiler looks at a map or filter operation and figures out whether it’s worth the overhead to parallelize it automatically.” And that turns out to be pretty hard, with potentially painful (and nondeterministic!) consequences for failure.

Maybe it would have been easier if CPU performance didn’t end up outstripping memory performance so much, or if cache coherency between cores weren’t so difficult.

gdwatson··on Parallel ./configure
Historically, different Unixes varied a lot more than they do today. Say you want your program to use the C library function foo on platforms where it’s available and the function bar where it isn’t: You can write both versions and choose between them based on a C preprocessor macro, and the program will use the best option available for the platform where it was compiled.

But now the user has to set the preprocessor macro appropriately when he builds your program. Nobody wants to give the user a pop quiz on the intricacies of his C library every time he goes to install new software. So instead the developer writes a shell script that tries to compile a trivial program that uses function foo. If the script succeeds, it defines the preprocessor macro FOO_AVAILABLE, and the program will use foo; if it fails, it doesn’t define that macro, and the program will fall back to bar.

That shell script grew into configure. A configure script for an old and widely ported piece of software can check for a lot of platform features.

gdwatson··on Parallel ./configure
Superscalar processors (which include all mainstream ones these days) do this within a single core, provided there are no data dependencies between the assignment statements. They have multiple arithmetic logic units, and they can start a second operation while the first is executing.

But yeah, I agree that we were promised a lot more automatic multithreading than we got. History has proven that we should be wary of any promises that depend on a Sufficiently Smart Compiler.

gdwatson··on We are the builders
“DOGE = Curtis Yarvin's RAGE from his butterfly revolution blog post.”

I rarely have the patience or temperament to read Yarvin, so I can’t say whether you are right or not. But I can say that his critique of progressive institutions has resonated with a much larger share of the right than his positive vision of politics.

And this makes sense! It’s entirely possible to have insight into the problems your side is facing while being off base about the solutions. That’s pretty common to intelligent, eccentric thinkers across the political spectrum.

gdwatson··on The Origins of Wokeness
He’s been interested in how taboos influence our thought and speech for a long time: https://www.paulgraham.com/say.html .
gdwatson··on Intel announces Arc B-series "Battlemage" discrete graphics with Linux support
Arguably 1440p is the sweet spot for gaming, but I love 4k monitors for the extra text sharpness. Fortunately DLSS and FSR upscaling are pretty good these days. At 4k, quality-mode upscaling gives you a native render resolution about 1440p, with image quality a little better and performance a little worse.

It’s a great way to have my cake and eat it too.

gdwatson··on Intel announces retirement of Pat Gelsinger
This is in large part an OEM issue. Dell or HP will definitely have an Intel version of the machine you are looking for, but AMD versions are hit and miss.

I think this is partly because big OEMs doubt (used to doubt?) AMD’s ability to consistently deliver product in the kind of volume they need. Partly it’s because of Intel’s historically anticompetitive business practices.

gdwatson··on HTML Form Validation is underused
And he loses his page state if there is an error. You have to do server-side validation regardless, but client-side validation can be a lot more pleasant for the user.

I used to think it doubled your workload to do both, but if you are using JS-free client-side validation, I think that the server can just return an HTTP error guilt-free for any invalid input that the browser will catch. It’s a pretty good compromise for format validation.

gdwatson··on 10% of Cubans left Cuba between 2022 and 2023
> Is Cuba a dictatorship? No.

Would you clarify what you mean by this? Does the first secretary of the Communist party no longer have de facto dictatorial power?

gdwatson··on GCC always assumes aligned pointer accesses (2020)
If the language standard leaves some behavior undefined, other sources (e.g., POSIX, your ABI, your standard library docs, or your compiler docs) are free to define it. If they do, and you are willing to limit your program’s portability, you can use that behavior with confidence. But they also leave many behaviors undefined, and you can’t rely on those.

For implementation-defined behavior, the language standard lays out a menu of options and your implementation is required to pick one and document it. IMHO, many things in the C standard are undefined that ought to be implementation-defined. But unaligned pointer accesses would be hard to handle that way; at best you could make the compiler explicitly document whether or not it supports them on a given architecture.

gdwatson··on The Downsides of C++ Coroutines
Thanks for laying out the C++ situation. Your concern makes practical sense.
gdwatson··on The Downsides of C++ Coroutines
C++ solved this by shipping something that are not coroutines and branding it coroutines anyway. … They aren't coroutines, and by squatting on the name, make it borderline impossible that C++ will ever have coroutines.

I am not a C++ person, but I protest this characterization. You obviously know the categories and I suppose you know the history, but I will recount them so that everyone else understands my objection.

O.G. coroutines emerged in a world where subroutines were, by and large, not reëntrant. Function parameters, local variables, and return addresses were static, and there was no call stack in the modern sense. This is why the old timers said that coroutines were a generalization of subroutines; only the jump instruction of the call/return really needed to change.

Once call stacks became common, coroutines fit awkwardly, and people tried to adapt them in various ways.¹ The world has settled on two designs for reconciling coroutines to the call stack: thick and thin coroutines. Thin coroutines allow suspension within the body of the coroutine but not within subroutine calls; this way the size of the coroutine’s state can be known at compile time and its interaction with the stack is relatively clear. Thick coroutines (i.e., green threads) can be suspended within a subroutine call, and thus require their own slices of stack — either separate from the main stack or copied from and to it as the coroutine is suspended and resumed.

Thin coroutines are absolutely coroutines. They are truer to the original definition than thick coroutines are! They are more limited than thick coroutines, true; whether that makes them better or worse is a matter of design trade-offs. But they certainly deserve the name.

[1] Simula 67, to my understanding, treated objects as a kind of coroutine instance where function definitions in the coroutine body became methods that closed over its local variables.

gdwatson··on A 17th-century font in a 21st-century thesis
Too late to edit, but I was thinking of the lorem ipsum screenshots when I said the thesis. That'll teach me to reply off the cuff.
gdwatson··on A 17th-century font in a 21st-century thesis
https://imgur.com/a/5UebhP4

Something about taking a screenshot on a scaled display makes my first image (at 125% scaling) look bigger than it should be; at 80% magnification it looks about the same size as it does in my browser, so edges may not come across quite right. (100/125 = 0.8, so that’s probably not a coincidence.)

I set scaling to 100% for the second image, and that one looks true to life size, so it’s probably the better reference.

Edit: On comparison, it’s not the serifs. Maybe it’s the lighter overall color on the page, or maybe it’s the way that autohinting exaggerates the contrast between thick and thin strokes.

gdwatson··on A 17th-century font in a 21st-century thesis
I'm usually a fan of Windows-style font rendering that snaps on-screen text to the pixel grid. But for this typeface it seems to heavily exaggerate the roughness as the different serifs snap all over. The pictures of the print pages look much nicer.

How does it look on a Mac monitor?

gdwatson··on A 17th-century font in a 21st-century thesis
Computer Modern is okay on paper, but I find it very frustrating to read on screen. I wonder if the Fell types are similar ‐‐ the scan of the thesis, where the letters aren't fit to the pixel grid, looks a lot nicer.

I do like Baskerville, but I am a little sad that the only open source version I know of, Libre Baskerville, changes the design so much for the screen. Caslon is in the same boat.

gdwatson··on Space After Periods (1993)
Historically English-language typography, in contrast to French typography, used a larger space between sentences than between words. Typists imitated this traditional style. The single-space style gained typograhic ground through the twentieth century, becoming the norm in the 1950s.

Preferring a single space between sentences is a reasonable choice. But flagging or "correcting" the two-space style is simply a mistake.

← PreviousPage 2 of 7Next →