News for hackers. Stuff that matters.
Re:Ask HN: Anyone using proportional fonts for coding? by rhn_mk1 on Sunday July 30, 2023 @01:34AM (#36928160)
They preclude ASCII, but not Unicode diagrams.

Unicode block characters have constant width.

Unicode also contains fixed-width equivalents to ASCII letters: abc. Just add 0xFEE0 to the code point.

And 0x3000 is an ideographic space, with the same width.

    +---------+
    |         |                        +--------------+
    |   NFS   |--+                     |              |
    |         |  |                 +-->|   CacheFS    |
    +---------+  |   +----------+  |   |  /dev/hda5   |
                 |   |          |  |   +--------------+
turns into

    +---------+
    |         |                        +--------------+
    |   NFS   |--+                     |              |
    |         |  |                 +-->|   CacheFS    |
    +---------+  |   +----------+  |   |  /dev/hda5   |
                 |   |          |  |   +--------------+
EDIT: which would have looked much better had HN not replaced full spaces with the narrow kind.
Re:Ask HN: Anyone using proportional fonts for coding? by Kwpolska on Sunday July 30, 2023 @04:52AM (#36929238)
Those diagrams might look nice, but are hard to edit (for your average user without a CJK input method) and hard to copy things from (you can't get the string /dev/hda5 from your example, you'll get something Linux won't do anything meaningful with.)
Re:Ask HN: Anyone using proportional fonts for coding? by rhn_mk1 on Sunday July 30, 2023 @10:12AM (#36931306)
I don't think diagrams are meant to be copy-pasted from a lot, so I'm not worried about that.

For editing, I'd just use a conversion tool, and edit it in a fixed-width editor rather than directly in code. Yes, it's an extra tool, but I don't think it's that outlandish to edit pictures in a tool for editing pictures.

Re:Ask HN: Anyone using proportional fonts for coding? by hollerith on Monday July 31, 2023 @01:32PM (#36946042)
My experience is that I get annoyed when text isn't copyable whether or not someone means for it to be copyable.
Re:Ask HN: Anyone using proportional fonts for coding? by kazinator on Monday July 31, 2023 @01:09AM (#36939017)
... but issues would never happen outside of HN, so this is all cool.