HNHacker News
TopNewBestAskShowJobs

gdwatson

599 karma · joined July 29, 2012

submissionscomments
gdwatson··on Intel One Mono Typeface
OpenType fonts can define ligation pairs. If the editor implements OpenType ligatures, it will read the instructions from the font and implement them. There will probably be a setting to enable or disable ligatures entirely, and there may be another one for which ligatures to include.
gdwatson··on Microfeatures I'd like to see in more languages
There are coding fonts that make the "-" look more like a minus than a hyphen. I know that Iosevka and its variants do.
gdwatson··on Microfeatures I'd like to see in more languages
Python has keyword arguments to functions. In that context, a single star packs or unpacks a list of positional arguments and a double star packs or unpacks a dictionary of keyword arguments.
gdwatson··on This is the year of the RSS reader?
Twitter dropped RSS support years ago when they were locking down clients and otherwise siloing themselves. Have they added it back?
gdwatson··on A Practical Guide to CSS Media Queries
The article is using CSS "pixels," which are meant to reflect the size of one pixel on a 96-dpi desktop display, not device pixels. If you're using any kind of UI scaling, the width the CSS layout sees will be reduced accordingly.

Scaling the layout up to a 27-32" 4k screen makes sense for some web applications, but it's not obvious how to do it for common text layouts.

gdwatson··on Making a Go program faster with a one-character change
“Implicit reference semantics” means that variables ordinarily refer to objects rather than containing them. “Value semantics” means that variables contain values rather than references, though there are pointer types that let you explicitly store references when you want them. (Often this is discussed in terms of parameter passing, for historical reasons, but the same ideas apply to variables more generally.)

If your language has implicit reference semantics, “x = y” will cause x and y to refer to the same object. If it has value semantics, x will be a copy of y.

gdwatson··on The changing fortunes of Japanese camera manufacturers
While most camera companies have come to focus on full-frame (i.e., 35mm) sensors in the last few years, Fuji has stuck to APS-C (one size down from full frame) and digital medium format (one size up).

Fuji’s medium-format line is called GFX; I don’t know too much about it except that it’s well regarded and inexpensive by medium-format standards. I would look into it if you are interested in landscape photography or high-resolution studio work and you are willing to spend serious money to make that happen.

Fuji’s APS-C line is focused on producing something which is pleasant to physically handle and use. It’s historically been smaller and handier than full-frame competitors and focused on physical controls for a lot of core settings. The different models within the APS-C range are distinguished as much by their form factors and controls as by their technical capabilities. Some of these advantages have been eroded over the years as they have competed with bigger cameras, particularly in video. But they have just released the X-H2 and X-H2S, targeted at action and event photographers, which should free the classic X-T and X-Pro series to return to their roots.

Concrete APS-C models to check out: X-T4 if you want an SLR-style mirrorless with more physical controls; X-Pro3 if you love old rangefinders; X-H2 and X-H2S if you want a PASM dial or heavy video. Fuji is expected to announce the X-T5 on November 2, and the rumors have it looking good, so I’d keep an eye out for reviews.

gdwatson··on What Fortran does better than C-like languages
> The 'break' keyword does the exact same function as a goto, why not use a goto? The 'continue' keyword does the exact same function as a goto, why not use a goto?

A break from a named loop is one statement and a label. A goto is one statement and a label. You don’t lose structure by putting the label at the end of the loop instead of the beginning.

Unnamed break is incredibly common, so having a built-in shorthand is quite ergonomic; it also lets you avoid defining a label, which named break doesn’t do. The argument for continue is similar, but continue is less common and maybe doesn’t justify its keyword status. else, for, and do-while all take blocks, so they have the opportunity to encode structure in a way that a break from a named loop doesn’t.

gdwatson··on Best Pens for 2022: Gel, Ballpoint, Rollerball, and Fountain Pens
I used to use the G2 and I liked it, but I think the Uni-ball Signo DX (the UM-151 the article endorses) is a better pen in the same vein. It’s smoother and doesn’t skip, and I can still get a fine, dark line that makes my handwriting legible. (I like 0.38mm tips in both pens, personally.)
gdwatson··on Framework Laptop with Ubuntu Review
I run Mint with 2x scaling on mine and I like it a lot. The screen's not quite as sharp as the one on the old XPS it replaced, but it's still quite nice.

I run a middling-width monospace font, and I can't quite fit two 80-column windows side by side at 2x without reducing the font size, but if you want that then you want smaller text anyway. (If you run a narrow font it shouldn't be an issue.) Other UI elements are not unreasonably large in my opinion, but YMMV.

gdwatson··on Implementing Hash Tables in C
When the load factor of an open-addressed hashtable gets too high, you allocate a larger set of buckets and rehash the table’s existing contents into them. You’ll have to do this with a chained hashtable anyway, as performance will start to approach O(n) once the table is overloaded.

This does mean that insertion time goes from a true O(1) to an amortized O(1), but that’s usually not an issue. (You can do the rehashing gradually if you really have to, but it’s probably not worth the complexity.)

gdwatson··on A Provenance-aware Memory Object Model for C [pdf]
"...in LLVM, all variables start with their address taken, so the optimizer needs to reason about when all uses of the address are known."

Why is this? Does it simplify SSA construction, or is there another reason?

gdwatson··on Pip has dropped support for Python 2
Single-codebase compatibility means that the same code can run under both Python 2 and Python 3.

The initial expectation was that translation tools would solve this problem, but it didn’t really work out that way. Adding language features and library shims to make it possible to write pidgin Python that would run under either version meant that you could migrate libraries and parts of large codebases one at a time until the whole thing ran under Python 3.

gdwatson··on Creating Comfy FreeBSD Jails Using Standard Tools
I had some issues running latest on a desktop machine back when it was default. Switching to quarterly made updates smooth sailing; the only issues I remember after that were from a big X upgrade.
gdwatson··on Analyzing the Design of Unusual Japanese Butter Tableware
454g is one pound, which is a very natural bulk unit for butter in English customary measures, so it's not too surprising that it survives in Canada. We Americans may have contributed to the survival of the size, but I'm sure we didn't introduce it.
gdwatson··on France: Thousands of protesters wrongly punished under draconian laws
I'm sorry that you're being downvoted; I don't think that's warranted.

>> Literal thought crimes.

> These are explicit acts, not thoughts, and not new offences.

> "Contempt of public official", I think they mean "outrage a agent" in French, does not mean the feeling but the act of showing 'contempt' as in insulting or threatening.

As the expression is usually used, "thought crimes" can refer to speech acts.

This may reflect a difference between American ideas of free speech and those more common in Europe. (I don't understand the variety of European views very well.) Most Americans are going to view anything that smacks of lèse majesté as a thought crime and react accordingly. And I don't think we're wrong to do so.

gdwatson··on Ask HN: What RSS Reader do you use?
Flym is pretty great; I use it on my tablet. It's simple and not as configurable as some, but it consistently does the right thing out of the box.
gdwatson··on Apple responds to Epic Games lawsuit, says CEO asked for special treatment
Epic says that it made a deal with OnePlus to preinstall Fortnite, but Google leaned on the manufacturer to scrub the deal.[1] I think that puts joining the Play store in a different light.

[1] https://www.theverge.com/2020/8/13/21368395/fortnite-epic-ga...

gdwatson··on The new Clang _ExtInt feature provides exact bitwidth integer types
In practice, little-endian machines have the first bit field in the least-significant bits of the data type they fit into (usually but not always an int), and big-endian machines have the first bit field in the most-significant bits.
gdwatson··on We called it RAID because it kills bugs dead
He didn’t say which platform it ran on. Was Microsoft still using Xenix internally at the time?
gdwatson··on TTY-Exit: terminal exit codes for humans and machines
It seems to be a Ruby equivalent to sysexits.h.[1] I don't know how widely used the codes are, but the idea is neat.

[1] https://manpage.me/index.cgi?apropos=0&q=sysexits&sektion=0&...

gdwatson··on Programming Language Checklist
I think those were included specifically to poke fun at Lisp. The list isn’t meant to be taken very seriously.
gdwatson··on Programming Language Checklist
I’ve loved this list for a long time. It’s a play on the old spam solution checklist: https://craphound.com/spamsolutions.txt .
gdwatson··on Rooms can be as bright as the outdoors
My experience is that daylight-blue (5000K–6500K) LEDs or fluorescents feel unnatural unless they are quite bright; something in the animal part of my brain worries that the sun is broken. Low CRI bulbs also feel off, which makes intuitive sense I suppose.

I've found that high CRI warm white (2700K) bulbs are the way to go for me.

I have these at home, and I like them a lot: https://www.lowes.com/pd/GE-Relax-60-Watt-EQ-A19-Soft-White-... . (I bought them at Home Depot, but it looks like they no longer sell them.)

gdwatson··on Smart TVs like Samsung, LG and Roku are tracking everything
Were you not able to return it?
gdwatson··on Conflicts in the GNU project now affect Guile
I think they are relevant to his discussion of RMS, not his discussion of Mike Weaver.

I read the e-mail thread and was trying to understand its relationship to the ongoing public arguments over the leadership of GNU. Andy Wingo's blog posts seemed to illumine his perspective in that debate.

gdwatson··on Conflicts in the GNU project now affect Guile
I don't know anything about the current goings on, but I read Wingo's blog for his fascinating technical insights. He has written some controversial things on hiring and collaboration that I do not agree with but do find helpful to understand what he's writing here about RMS:

https://wingolog.org/archives/2017/09/04/the-hardest-thing-a...

https://wingolog.org/archives/2017/09/05/a-new-interview-que...

Edit: The important takeaway for me is that he regards a host of project-unrelated views, including pro-free-speech views, as disqualifying.

gdwatson··on HEAD – A guide to <head> elements
It makes mobile web browsers be honest about the size and resolution[1] of their screens; without it, they lie and claim to have desktop-sized viewports.

Once the browser is being honest about its screen, you can use CSS media queries and the like to do responsive web design, giving mobile devices content that fits them and is touch-friendly. If the browser is claiming a desktop-sized viewport, your options are to either serve a desktop layout or to do User-Agent sniffing and the like.

[1] All high-res devices today maintain a distinction between a CSS pixel (approximately 1/96 in.) and a device pixel, and they give their resolution in CSS pixels. This is dishonest from the point of view of 1995, but it’s convenient and it’s what web designers expect today.

gdwatson··on Microsoft has removed the “use offline account” option when installing Windows
I use that at work, so I didn't realize the current situation, but I don't think that's an option in the home version.
gdwatson··on Plastics: What's Recyclable, What Becomes Trash and Why
They're going from metric to US measures?
← PreviousPage 3 of 7Next →