News for hackers. Stuff that matters.
Re:How Stdbuf Works by bxparks on Friday November 11, 2022 @12:57PM (#33564208)
Total tangent: What is the magic on that page that renders:

    if (putenv (var) != 0)
as

    if (putenv (var) ≠ 0)
on my browser (Firefox)?

When I try to copy that text, it copies as '!=' into my copypaste buffer.

Re:How Stdbuf Works by kec on Friday November 11, 2022 @01:01PM (#33564276)
They're using a webfont with a ligature for !=.
Re:How Stdbuf Works by bxparks on Friday November 11, 2022 @01:07PM (#33564388)
Sheeet, I didn't even know that was possible. Why would they use that font for displaying C code? I looked at that ≠ and spent a few minutes trying to figure out what language it was. Maybe I should uncheck the "Allow pages to choose their own fonts, instead of your selections above" option in Firefox, though it woulld probably break other websites.
Re:How Stdbuf Works by Arnavion on Friday November 11, 2022 @01:45PM (#33564908)
>Why would they use that font for displaying C code?

Using ligature fonts for programming became popular a few years ago. As in some people even use them in their editors.

Re:How Stdbuf Works by bspammer on Friday November 11, 2022 @01:51PM (#33564998)
Which is totally fine on their own machine, but using a webfont to force ligatures on anyone viewing their website is just confusing as a reader.
Re:How Stdbuf Works by Arnavion on Friday November 11, 2022 @02:05PM (#33565199)
No, I get it. I don't use them either because I find them confusing. I'm just telling you you missed out on what was a quite popular trend from a few years ago.
Re:How Stdbuf Works by remram on Friday November 11, 2022 @02:48PM (#33565828)
Lately my Firefox has been showing a ligature for "fi" in monospace code blocks, showing those two characters in the width of a single character. On every website with code blocks. It is mildly infuriating and I don't understand it.
Re:How Stdbuf Works by Arnavion on Friday November 11, 2022 @07:01PM (#33568431)
Right-click the ligature text -> Inpsect. In the Inspector, on the right there is a tab called "Fonts" (to the right of "Rules", "Layout", etc). That will show you what font(s) Firefox used to render all the text in the selected element.
Re:How Stdbuf Works by remram on Friday November 11, 2022 @09:52PM (#33569496)
I used Stylus to force ligatures off at some point, it mostly worked but caused some other issues.
Re:How Stdbuf Works by chrisshroba on Friday November 11, 2022 @02:17PM (#33565370)
FYI Fira Code is one example of a very popular programming font that supports ligatures (67k stars on GitHub) [1]. But totally get the frustration of seeing ligatures on the web and not understanding what was going on!

[1] https://github.com/tonsky/FiraCode

Re:How Stdbuf Works by kevin_thibedeau on Friday November 11, 2022 @10:15PM (#33569609)
> though it woulld probably break other websites.

It only breaks sites that are too poorly developed to respect the foundational principles of the web.

Re:How Stdbuf Works by bxparks on Friday November 11, 2022 @11:45PM (#33570044)
It breaks Google Calendar badly, almost unusable due to missing icons and spacing problems.
Re:How Stdbuf Works by hcm on Friday November 11, 2022 @02:28PM (#33565547)
(Author here) I don't see that in Chrome so had no idea that was happening – thanks for pointing it out! I'm not a fan of coding ligatures so I just pushed a change to turn it off.
Re:How Stdbuf Works by dubya on Friday November 11, 2022 @01:47PM (#33564945)
On Safari the 'notequal' is double-width, and you can select just half of it, which I didn't expect.
Re:How Stdbuf Works by bxparks on Friday November 11, 2022 @02:27PM (#33565521)
It's double wide on Firefox as well, and I could select half of it as well. I had to use a single "Unicode Character 'NOT EQUAL TO' (U+2260)" in my post on HN to describe what it looked like on my browser.
Re:How Stdbuf Works by layer8 on Friday November 11, 2022 @06:27PM (#33568181)
Those kinds of font ligatures are still separate characters.