#5 User-friendly CLIs - Build your own interactive DSL
Channel: Lorenzo Barasti
Date: 20/06/2020

This video is the last part of a series where we build our own interactive Domain-Specific Language (DSL) in Crystal.

In session 5, we define a user-friendly CLI that will either launch the REPL or run a script, depending on whether a file path is provided. 
Some of the topics we'll touch on along the way:
* REPL's magic commands
* Parsing CLIs options and arguments
* Macros!!!

You can check out the code here: https://github.com/lbarasti/byoidsl
Slides: https://docs.google.com/presentation/d/1LqobezGMYtgEbPsVNJq-HRHqONVHo8Svv1H09NOH884/edit?usp=sharing

References
* magic commands in ipython: https://ipython.readthedocs.io/en/stable/interactive/magics.html
* clim, a shard to build CLIs: https://github.com/at-grandpa/clim
* Macros in Crystal: https://crystal-lang.org/reference/syntax_and_semantics/macros.html

Cross-posting live-coding sessions from https://www.twitch.tv/lbarasti
Announcing live-coding sessions and initiatives @ https://twitter.com/lbarasti