Live data from Hacker News

Monospaced Programming Fonts with Ligatures

hanselman.com

211–220 of 246 posts

Re: Monospaced Programming Fonts with Ligatures

#211
post #48
post #15

I like switching fonts every couple of years just to keep it fresh. My font right now is Iosevka: https://be5invis.github.io/Iosevka/ A font generated from its source code. You can build your own variant. It has ligatures as well. I like that it’s not as wide as many other monospace fonts.

I've rifled through many a programming font, bought Pragmata Pro at one point (as you can see I also like taller fonts), tried many others over the years (Monoid was my previous favorite ligatured font). Iosevka is my current favorite. My customization args are part of my dotfiles repo so I can install it exactly how I like on any new system without effort.

Out of curiosity, what are your customization args for Iosevka?

I do like it a lot, but find myself going back and forth between it, Fira Code, Pragmata Pro and Operator Mono.

Re: Monospaced Programming Fonts with Ligatures

#212

> Picking a programming font is like picking a religion. No matter what you pick someone will say you're wrong. Most people will agree at least that monospaced fonts are ideal for reading code and that both of you who use proportionally spaces fonts are destined for hell, or at the very least, purgatory. I guess I'm destined for hell or purgatory then. Hanselman is not alone. I had the CEO of one company look over my…

At least you still get people complaining about you. It means they care for your soul. Try using a tab-size of 3 spaces.

[deleted]

Re: Monospaced Programming Fonts with Ligatures

#213
post #177
post #66

Earlier quoted context omitted.

I assume potential sarcasm would be related to the difficulty differentiating between similar symbols, based on length, with different lexicographic meanings. For example, dash vs endash vs emdash, etc: ‒ – — ― If those symbols were used in a programming language and had different meanings, differentiating quickly could be much more difficult than seeing the difference between -, --, ---, and so on at a glance.

Just recorded this GIF of typing out a function with the added visual cues: http://imgur.com/a/LQVV2 IMO it's comparable to a WYSIWYG equation editor vs looking at raw LaTeX - conceptual errors pop more.

Also out of curiosity, what editor / plugins are those?

Re: Monospaced Programming Fonts with Ligatures

#214
post #15

I like switching fonts every couple of years just to keep it fresh. My font right now is Iosevka: https://be5invis.github.io/Iosevka/ A font generated from its source code. You can build your own variant. It has ligatures as well. I like that it’s not as wide as many other monospace fonts.

There is even a Chinese/Japanese version: https://be5invis.github.io/Iosevka/inziu.html Thank you! I've been looking for something like this for ages.

Re: Monospaced Programming Fonts with Ligatures

#215

> Picking a programming font is like picking a religion. No matter what you pick someone will say you're wrong. Most people will agree at least that monospaced fonts are ideal for reading code and that both of you who use proportionally spaces fonts are destined for hell, or at the very least, purgatory. I guess I'm destined for hell or purgatory then. Hanselman is not alone. I had the CEO of one company look over my…

On the one hand, I agree that the time of typewriters and their fonts is (or should be) long gone. On the other hand, something keeps telling me that program code is not (and should not be) exactly a piece of literature, and there may be some advantages to being able to see code as a two-dimensional object rather than linear text.

Block selection and anything having to do with IO formatting are very good reasons why monospaced fonts are still useful.

That being said the idea that a programmer being resistant to changing their font style is indicative of general intellectual laziness is one of the most laughable things I've ever heard. I'd be more convinced if someone told me that refusing to change syntax highlighting themes implied you're a bad programmer.

Re: Monospaced Programming Fonts with Ligatures

#216
post #190

Earlier quoted context omitted.

nah, it's a bad habit. It means constant readjustment and unnecessarily bloated diffs every time you change a function or variable name. or the lovely foo := a; bar := b; then a day later foo := a; bar := b; foobar := cd; which also points to the problem that it lends itself to premature constant readjustment because a day later you have to move every thing again because as it turns out you really needed foobarlist a…

Here is a thought. Maybe no formatting characters should be allowed to be saved embedded in source code, and instead presentation filters should handle everything related to formatting, documentation, etc. It might work..

Git supports custom "clean/smudge" filters on push and pull exactly for this sort of things. Unfortunately neither github not gitlab consider them so your online diffs would look like a mess of you did that.

Re: Monospaced Programming Fonts with Ligatures

#217
post #190

Earlier quoted context omitted.

nah, it's a bad habit. It means constant readjustment and unnecessarily bloated diffs every time you change a function or variable name. or the lovely foo := a; bar := b; then a day later foo := a; bar := b; foobar := cd; which also points to the problem that it lends itself to premature constant readjustment because a day later you have to move every thing again because as it turns out you really needed foobarlist a…

Here is a thought. Maybe no formatting characters should be allowed to be saved embedded in source code, and instead presentation filters should handle everything related to formatting, documentation, etc. It might work..

It looks interesting, but then one would have to define a normalization for the AST - either something like an XML printout of the AST, or a standard formatting for source code (perhaps whitespace-only minification?). It would also pose an issue when presenting code in "dumb" media (eg. a txt file).

Re: Monospaced Programming Fonts with Ligatures

#218

> Picking a programming font is like picking a religion. No matter what you pick someone will say you're wrong. Most people will agree at least that monospaced fonts are ideal for reading code and that both of you who use proportionally spaces fonts are destined for hell, or at the very least, purgatory. I guess I'm destined for hell or purgatory then. Hanselman is not alone. I had the CEO of one company look over my…

I used to have a coworker who was REALLY slow at reading code. For the longest time, I couldn't figure out why, but eventually he told me he was dyslexic.

I mentioned that I had hear of some fonts that were specifically made for people with dyslexia, so he downloaded one and tried it out. There was an almost immediate improvement in his output of code, and it was always interesting to go read over his shoulder and see things not-monospaced.

Personally, I only stick to monospaced fonts, but I wouldn't be totally opposed to trying something else. I even tried dotsies for a while (http://dotsies.org/) but could never get used to it and it slowed me down too much.

Re: Monospaced Programming Fonts with Ligatures

#219

Earlier quoted context omitted.

On the one hand, I agree that the time of typewriters and their fonts is (or should be) long gone. On the other hand, something keeps telling me that program code is not (and should not be) exactly a piece of literature, and there may be some advantages to being able to see code as a two-dimensional object rather than linear text.

Block selection and anything having to do with IO formatting are very good reasons why monospaced fonts are still useful. That being said the idea that a programmer being resistant to changing their font style is indicative of general intellectual laziness is one of the most laughable things I've ever heard. I'd be more convinced if someone told me that refusing to change syntax highlighting themes implied you're a b…

> ...the idea that a programmer being resistant to changing their font style is indicative of general intellectual laziness is one of the most laughable things I've ever heard.

Let me just mention that this isn't what I said at all. I don't blame you for misunderstanding, I must not have explained my thoughts clearly.

I didn't say anything about intellectual "laziness", and I certainly didn't mean that someone who didn't want to change their coding font was intellectually lazy.

I was talking about intellectual curiosity, specifically with reference to my former CEO who questioned the sanity of anyone who would code in a proportional font.

Instead of wondering why someone would make such a non-mainstream decision and being even slightly interested in their reasons for it, he simply dismissed it out of hand as the bad habit of a weirdo.

That's the lack of intellectual curiosity I was talking about.

Re: Monospaced Programming Fonts with Ligatures

#220
post #175

Earlier quoted context omitted.

The diff could be smarter and notice that you just inserted some white space. Many GUI apps actually do that but unfortunately not your typical diff or git which insist in dealing with full lines only.

I'm sure many know, but for those who don't, `diff` (and `git diff`) accept -w and -b to ignore all white space and changes in the amount of white space, respectively. I find these very handy. Somewhat related, if you're looking at a diff on GitHub and want to ignore whitespace, you can just tack on `?w=1` to the URL ( https://github.com/blog/967-github-secrets ).

For github I crafted together this little bookmarklet to ignore whitespace on diffs (use it daily for our code reviews):

javascript:(function()%7Bopen(location.href+'?w=1');%7D)();void(0);

Post reply on HN