Syntax highlighting and other fluff

September 18, 2018

I've been programming for little over 5 years now, and I've always been obsesed with how my terminals, editors, tiling WMs (ah, the Linux and *BSD days) and other stuff that you productively waste time on. Automate whole setup with multiple bash and Ansible scripts, so you crash your system and get everything up and runing with running single file. Yea, high school was blast! But as I got into faculty time became more and more precious. And I just couldn't justify spending whole weekend programming XMonad. And I completely moved to Macs, so now I see Linux and BSDs mostly through SSH or tty in VM. But on the plus side I switched to Emacs around the time I moved to macOS. And that was the interesting thing because before that I was mostly Vim guy. But I just really dig the appeal of Emacs' unified environment for everything. I invested shiton of time into configuring and programming it, but mostly because I like programming in Lisp. It was great that I could just write everything in that Emacs modified Lisp dialect hit (M-x eval-buffer) and voila, I see the results.

I was programming more and more in Lisp, I got a hang of paredit so I can say I embraced the brackets really easily. But suddenly I found myself striping away all the colors in my terminals and environments. Colors in themes that I've used for a quite long time became jarring and irritating. Does this occurrence correlate to syntax of Lisplike languages? I think to a certain extent it does. Programming in Lisp and Clojure is much different to anything else I've done in my life in terms of computers. Okay, maybe assembly programming was, khm, different expirence, but I've done it mostly because I was enrolled to Electrical Engineering course before I changed faculty.


And the even more interesting thing that coding in lisp brought is coloring the parentheses for Rust. We all now how different beast Rust is. A modern language, oriented on performance and lower level programming, no GC, but maintining safety and correctnes with strict rules provided by the compiler and borrow checker. I will write separete blog post just on my experience of learning it, but for now we won't go any further as this is my random-introductory blog post. I am not sure why it felt so good to color up those parentheses in rust source code, but Rust is data oriented language. Scopes are very important there, syntax contains a lot of <,'{([ so it made me really see the data through code and scopes with parentheses colored.

Now back on turning off colors, while many people are pro-syntax highlighting oriented, because it is there to give you context of where you are in code, when to pay attention etc etc, I found that it mostly gave me headaches and distracted me from being focused what lays behind all those pixels on screen. I've seen a lot of older developers that started programming back in the 70s and 80s without having syntax highlighting and I tried to give it a shot but it was too hard core for me. It felt like reading code on paper, and I got PTSD from doing exams by writing code with pen and paper. Then I saw few developers (Steve Losh for concrete example) who found really smart balance between