YeAST: Yet Another Shell Trick
Here, I’ll introduce you to an old open source project idea that I recently revamped.
I call it /YeAST!
The old punchline was “Powerful next generation scripting” … the main idea was to mix different languages into a single script file to improve flexibility and compatibility between technical stacks.
I was inspired by what UNIX offered, and I decided to start by extending the shebang syntax!
Here is a basic example:
#! /usr/bin/env yeast ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /!\ DON'T DO THIS AT HOME OR WORK THIS IS FOR PEDAGOGICAL PURPOSE ONLY ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #! python print("Hi,") !##! ruby puts "Do you want some #! node process.stdout.write("yeast");!# in your pasta?"
… which output:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /!\ DON'T DO THIS AT HOME OR WORK THIS IS FOR PEDAGOGICAL PURPOSE ONLY ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Hi, Do you want some yeast in your pasta?
More examples, applied to REAL WORLD, are listed on the README page of the project.
THE PROBLEM or The Goals and Aims of the Project
YeAST aims to solve several issues that I have often encountered: interoperability, parrallel programming, quick prototyping and progressive refactoring.
First of all, to contribute to the development of more POSIX softwares, not especially by following the complex norm but by taking inspiration from the KISS original philosophy (Keep It Simple Stupid), by building small executables which are doing simple tasks and combining them together.
One way to do this is by scripting!
The writing of scripts is often wrongly seen as a dirty thing with which the sys-admin deals, a practice reserved for high level, interpreted, garbage collected, weakly typed languages … I’m going to call “script” any small piece of executable code.
Scripts are also a good way to encourage Open Source, with the idea that it’s easy to make contributions and distribute them because they do not come with a complex compilation process!
Finally I met too many beginners or intermediate developers lost in endless discussions about what’s the best technical stack (between language that’s quite similar), with the idea that choosing one of them is determinant for life.
The issue is: not everybody knows how to deal with Node NPAPI or Rust FFI to bind different languages together. Thinking about writing a piece of code in another language is usally a complex and time consuming optimization task …
So, I wondered how to find a generic solution to solve this problem!
I planned to work on a new, fully synchronous version based on a non-blocking version of cat that I wrote /tac!
I also will soon start to write a Jupyter kernel called JupYeASTer, a VSCode syntax support, and try to standardize a bit more this project by creating YWest (so much inspiration) : a quick alternative Haskell implementation.
Finally, I will soon be writing two articles about Palombe and Kombucha, two major components of what could be the YeAST ecosystem.
Feel free to let me know if you have any comments or questions on the purpose of this project or its implementation.