Live data from Hacker News

Writing prettier Haskell with Unicode syntax and Vim

alt-romes.github.io

41–50 of 62 posts

Re: Writing prettier Haskell with Unicode syntax and Vim

#42
post #5

On Linux I input special characters using the Compose key. Works everywhere, not just in Vim.

Windows really needs X11 compose key sequences. Yes, I use Linux, but also Windows.

WinCompose offers this. I find it slightly buggy with caps as compose, but it works well enough and it can read an XCompose config file. (It does not honor XCompose includes IIRC, you have to merge everything into one file.)

https://github.com/samhocevar/wincompose

Re: Writing prettier Haskell with Unicode syntax and Vim

#43
post #12

I’d like to voice the contrarian opinion that, as someone who isn’t a mathematician, these symbols make the code look like gibberish to me. I had to squint to even see the circle on the end of the lollipop symbol, no way I’m not mistaking that for a hyphen. I don’t know the names for these symbols, so my brain has to 1) learn new images, 2) pattern match them throughout the code. I would be totally lost. If the code…

IMHO the mathematical language is an impediment for learning math for exactly this reason. It's chock full of cryptic symbols with no obvious meaning that make it incomprehensible to anyone who has not taken years to learn it and also surprisingly difficult to enter into a computer. Math is hard to read because quill pens were difficult to use and much of the syntax was made up on the spot by people who were better a…

You can go back and read maths texts from before algebra was in common use. Before people had these symbols they had to write out their proofs and derivations using the plain language of their day.

tldr; it’s tedious reading those proofs. And it’s laborious to write them. Such labour limits the thoughts one can have. Once algebra has solidified there was an explosion in the pace and depth of mathematics.

The symbols are there for a good reason.

Re: Writing prettier Haskell with Unicode syntax and Vim

#44
post #5

On Linux I input special characters using the Compose key. Works everywhere, not just in Vim.

Windows really needs X11 compose key sequences. Yes, I use Linux, but also Windows.

I’ve previously used a nice little tool called WinCompose for exactly that. Looks like it’s still going:

http://wincompose.info/

Re: Writing prettier Haskell with Unicode syntax and Vim

#45
post #12

I’d like to voice the contrarian opinion that, as someone who isn’t a mathematician, these symbols make the code look like gibberish to me. I had to squint to even see the circle on the end of the lollipop symbol, no way I’m not mistaking that for a hyphen. I don’t know the names for these symbols, so my brain has to 1) learn new images, 2) pattern match them throughout the code. I would be totally lost. If the code…

If you Google for ∀ you'll get a explanation of what it means. Same for ∫. Specialized fields require specialized knowledge. Same goes for programming, especially subfields of it. Every company has their own brand of programming language, C++ at Microsoft isn't the same as C++ at Google or Redhat or Apple. A new employee at a job will take months to be oboarded because they have to learn the company's dialect. During that onboarding, they'll learn about new words and they'll also introduce new symbols if they have to.

What does that mean for code that is being developed out in the open? Does it raise the bar for entry? Arguably there's already a bar to entry, which is being able to read English and being able to program in the first place. That there are some parts of the code that say "here be dragons" to the uninitiated who haven't yet Googled the meaning of the unfamiliar words and symbols seems like an entirely reasonable state of the world. If it's sufficiently popular, an explanation article, like https://en.wikipedia.org/wiki/Fast_inverse_square_root can be made, or an entire site, like http://explainxkcd.com.

There will always be more things to know (just today I learned about thixomolding. The science behind that has its own set of symbols to pick up), some of it will just require additional learning in order to learn.

Re: Writing prettier Haskell with Unicode syntax and Vim

#46
post #41
post #5

On Linux I input special characters using the Compose key. Works everywhere, not just in Vim.

I do this, too. I haven't yet found a solution that works very well for macOS— a few years ago, some mappings were not possible with the solutions I found.

control-command spacebar brings up the emoji picker, and some of the symbols are in there, but like you said, not everything.

∀ ° ∫ Ω

Re: Writing prettier Haskell with Unicode syntax and Vim

#47
post #41

Earlier quoted context omitted.

I do this, too. I haven't yet found a solution that works very well for macOS— a few years ago, some mappings were not possible with the solutions I found.

control-command spacebar brings up the emoji picker, and some of the symbols are in there, but like you said, not everything. ∀ ° ∫ Ω

I do really like modern emoji pickers in general. Compose keys are nice, but I love fuzzy filter interfaces that search as you type. Compared to compose sequences, they let you get up to a reasonable speed very quickly.

Re: Writing prettier Haskell with Unicode syntax and Vim

#48

Earlier quoted context omitted.

IMHO the mathematical language is an impediment for learning math for exactly this reason. It's chock full of cryptic symbols with no obvious meaning that make it incomprehensible to anyone who has not taken years to learn it and also surprisingly difficult to enter into a computer. Math is hard to read because quill pens were difficult to use and much of the syntax was made up on the spot by people who were better a…

You can go back and read maths texts from before algebra was in common use. Before people had these symbols they had to write out their proofs and derivations using the plain language of their day. tldr; it’s tedious reading those proofs. And it’s laborious to write them. Such labour limits the thoughts one can have. Once algebra has solidified there was an explosion in the pace and depth of mathematics. The symbols…

Yeah, but reading novels from those days is also tedious. Doesn't mean they can't be improved.

Re: Writing prettier Haskell with Unicode syntax and Vim

#49
post #41
post #5

On Linux I input special characters using the Compose key. Works everywhere, not just in Vim.

I do this, too. I haven't yet found a solution that works very well for macOS— a few years ago, some mappings were not possible with the solutions I found.

I got you covered: https://michaelgoerz.net/notes/the-us-international-scientif...

Re: Writing prettier Haskell with Unicode syntax and Vim

#50

Earlier quoted context omitted.

You can go back and read maths texts from before algebra was in common use. Before people had these symbols they had to write out their proofs and derivations using the plain language of their day. tldr; it’s tedious reading those proofs. And it’s laborious to write them. Such labour limits the thoughts one can have. Once algebra has solidified there was an explosion in the pace and depth of mathematics. The symbols…

Yeah, but reading novels from those days is also tedious. Doesn't mean they can't be improved.

Sure: And the best way we have found (maybe just so far?) has been to introduce more symbolism. But even today, all guides on good mathematical writing urge you not to go overboard with them; a well-written mathematical text is a reasonable mixture of symbols and prose.

In fact, it’s pretty common for math students to want to use only symbols at some point. What they write becomes unintelligible to everyone else (and maybe even themselves) and at some point they (usually) wise up.

Post reply on HN