News for hackers. Stuff that matters.
Re:Esverify: LiquidHaskell inspired verification for JavaScript by roywiggins on Saturday December 01, 2018 @03:32AM (#18575911)
This is tangential but this is the second post recently using fancy ligature fonts in code examples and it's... jarring.
Re:Esverify: LiquidHaskell inspired verification for JavaScript by johnhenry on Saturday December 01, 2018 @04:36AM (#18576057)
Have you tried them in your IDE yet? https://github.com/tonsky/FiraCode
Re:Esverify: LiquidHaskell inspired verification for JavaScript by afranchuk on Saturday December 01, 2018 @09:05AM (#18576798)
Yeah, they can definitely be jarring at first. But if you use them for a little while in a terminal that supports them (I use kitty[1]), the non ligature font will look jarring instead. I'm not so sure about using them for online code samples, though...

[1]: https://sw.kovidgoyal.net/kitty/

Re:Esverify: LiquidHaskell inspired verification for JavaScript by roywiggins on Saturday December 01, 2018 @12:49PM (#18577852)
Right- I did look at them when they first came to my attention and I do like the look. If I were more of a fan of terminal customization I would probably give them a go. But it's weird to see them in code samples online.

I remember when I first was looking at them, I realised that they aren't even all consistent. I think it was the the "<=" ligature. <= can either be glossed as a left arrow or a less-than-or-equal, and at least one font decided somewhat inexplicably that it was an arrow. These fonts have no idea what the semantics are of what you're actually coding (since they're just ligatures) so insofar <= always means less-than-or-equal then you're fine, but if you find some language where it means assignment you'll need a different font!

Re:Esverify: LiquidHaskell inspired verification for JavaScript by saagarjha on Saturday December 01, 2018 @06:13AM (#18576292)
Surprisingly, the way this was set up seems to completely break word selection in my browser. I'm sure there's a way to make this work, but the particular way they're doing it is unsatisfactory.
Re:Esverify: LiquidHaskell inspired verification for JavaScript by quickthrower2 on Saturday December 01, 2018 @04:51AM (#18576108)
They are nice, they make the code look like the mathematics that it is.
Re:Esverify: LiquidHaskell inspired verification for JavaScript by Lio on Saturday December 01, 2018 @06:02AM (#18576265)
The problem with using symbols that fall outside of original ASCII set is that they’re hard to type.

It feels, to me, like a failure of user interface when someone has to resort to a mouse for input.

Like watching someone trying to play a piano on screen with a mouse. I’m sure it’s possible to compose that way but it looks so clumsy compared to someone fluently playing a keyboard.

EDIT: looks like most of these fonts are just being used for substitutions. I guess I’m neutral on that. Looks nice but I think I still prefer raw text version. Could be convinced either way.

Re:Esverify: LiquidHaskell inspired verification for JavaScript by roywiggins on Saturday December 01, 2018 @12:51PM (#18577864)
These are abusing/using the facility modern fonts have to elaborate ligatures that modify the display of characters when they sit next to each other. Which is very straightforward once you know how it works but as you've learned is confusing when you haven't and are looking at these things for the first time in a code sample.

If you copy and paste these examples into a text editor, the font won't have the ligatures and you'll see the characters as you'd expect. They're not inserting weird codepoints to display the symbols; there's a literal < and = next to each other and the font renderer looks them up in a table and renders the mathematical less-than-or-equal symbol.

English script doesn't have many ligatures (ff, and fi are common ones, the bars on the ff are combined, and the dot on the i is subsumed into the bar of the f) but some languages and scripts have lots, I think Arabic does. Cursive English is all ligatures since letters join up differently depending on the letters next to them.

Re:Esverify: LiquidHaskell inspired verification for JavaScript by davidy123 on Saturday December 01, 2018 @10:29AM (#18577132)
You could look into using "compose key." It's quite intuitive and opens up a whole new world of expression.
Re:Esverify: LiquidHaskell inspired verification for JavaScript by levjj on Saturday December 01, 2018 @12:54PM (#18577871)
With ligatures, the symbols are still just ASCII, so you type '>=' but it looks like '≥' on your screen.
Re:Esverify: LiquidHaskell inspired verification for JavaScript by quickthrower2 on Saturday December 01, 2018 @04:42PM (#18579143)
Æ, ӕ <- these are examples of the intended use for a ligature.
Re:Esverify: LiquidHaskell inspired verification for JavaScript by ummonk on Saturday December 01, 2018 @10:43AM (#18577197)
You are looking at the raw text version. This is just how the font displays the raw text.