Racket is my language of choice for pretty much everything now. It's the Lisp I've been always dreaming of: simple at its core while having all the batteries included to work on complex tasks like web development, servers, or games.
It is often described as a "Language-oriented programming language" for its ability to create languages on the fly.
I happen to have another wonderful language in my toolbox, that I reserve for most of the "down to the metal" activities. I would describe that language as a "Compiler-oriented language". It's called Forth.
Forth was created in the 70s by Charles H. Moore, which makes it, in the minds of today's young and fashion-victim devs, a language for dinosaurs.
I've been recently asked to explain (thanks @ambrevar) why I would use this, instead of Racket. So, without further ado, let's dive into the old, dusty and undocumented world of Forth, the language of the dinosaurs. Maybe there's still a place for it in our crazy cyber world (stay if you want dino-cyborgs).
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 many 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!