Some years ago I bought the third telephone of my life. It's an archaic looking "feature-phone" which I want to last as long as possible. I'm not planning to buy anything more.
But I don't want an expensive 500€ smartphone. I don't want an easily breakable touchscreen, and I'm convinced there's a way to refurbish all the cheap Chinese "feature-phones" to make something usable and fast without all the fuss of a multiple Gigabytes operating system on it. I'm not planning to watch Youtube videos on my phone, only send good old SMS, so the idea of buying a cheap feature phone, and see what I could do about it started to sprout in my mind.
I bought a cheap 10€ phone with a digit keyboard, and kept it in a drawer as an emergency tool for about two years. Then the emergency came in: the screen of my Firefox OS phone broke, and typing on it became an exhausting experience, to say the least. So I switched to the Chinese phone, and although it has a decent hardware, the software stack is completely out of place. What can we do about it?
Maybe we can live in a world where phones are used to place calls and send messages? Maybe we can live in a world where landfills are not stuffed with computer systems thousand times more powerful than what made us go to the moon, but still considered "old" because they cannot run the latest version of Snapchat? I'd like to live in that world, so I started a journey of retro-engineering to discover if I could make this dumb phone my phone.
For a long time, my favorite language was Python. It's fairly well designed
and useful for any task, from web servers like Django to 3D software like
Blender; from neural networks like TensorFlow to cloud computing platforms
Python offers so much libraries and tools for a developer to play with that
you feel you can achieve anything, given the right tool.
What I really enjoyed above all was the community, and the feeling that
everyone was according to the same set of standards (it was of course not
always the case) and that you could somehow easily agree on what was
"Pythonic" and what was not (spoiler alert: in fact, you cannot).
Now that I shifted to using lisp languages (especially Racket), I see my
past self as childish and primitive, but it has been a brease passing through
Python as a part of my road to becoming a better developer, and alas I may
never use Python again for personal projects, I have learned a lot and would
still recommend it for anyone wanting to achieve efficiently, quickly and
elegantly some IT project.
So what is so good in Racket, that it made me think I finally found the
language of my dreams?
Well, there's a lot of features that make Racket an awesome language to work
with: parameters, continuations, contracts, syntax-parse...
But the feature I want to write about today is by far the one I find really
transcendental: #lang (pronounce "hash-lang").
#lang allows writing your own languages. Let's dive into it!