FrancoisBosun
a year ago
This looks very, very interesting! Good work. My only nitpick is the ligatures. I believe pipelining in Elixir uses the |> operator, but the blog post uses a kind of triangle pointing to the right. Due to my previous exposure to Elixir, I guessed that it must have been |>, but if I hadn’t know, then I would be really confused when I tried to write that in my editor to replicate the code.
sbuttgereit
a year ago
I agree. I use ligatures in my own coding and so to my eyes, the presentation was very natural... but for someone that doesn't/hasn't I think your point is completely correct.
It's better to not use ligatures for publication, such as in this scenario.
(Now that I've said that, I better go check and see if I've made this mistake due to just not thinking about it.... hmm.....)
lawn
a year ago
I personally like some types of ligatures, but I think it's good to not use them when others should read the code.
mise_en_place
a year ago
100% agree, it's just jarring to anyone who's developed in Elixir before. It's just like dquote characters on MacOS ("smart quotes")
LorenzoGood
a year ago
I, as a new elixir user, was personally confused by this exact thing as well.
carrja99
a year ago
A lot of folks configure their editor to render |> as a rotated triangle.
Kamq
a year ago
Sure, but putting it in a code sample is similar to putting opening/closing quotes in a code sample instead of "
It makes it harder for people to copy and paste and play with.
dpatterbee
a year ago
If you copy and paste that triangle you will get "|>".
brightball
a year ago
There is some editor plugin that converts it visually to a triangle. I have seen other people use it.
arrowsmith
a year ago
It’s a font, not an editor plugin.
Not sure which font specifically is used in the article but an example of a monospace font with ligatures is Fira: https://github.com/tonsky/FiraCode
lvass
a year ago
prettify-symbols-mode in Emacs.