MWENGE'S WEBSITE

GITHUB   EMAIL   SOCIAL   DONATE


November 26, 2022
POLYGLOT PROGRAMMING PICKLED PEPPER PIPELINE

I made a polyglot programming pipeline thing. This is a classic case of having a slightly off-beam idea and following through on it the whole way regardless of how useful the end result may turn out.

The idea is that you can run practically any programming language of your choice against your data and that you can string together scripts written in different languages to create something resembling a data pipeline. In the video above we hit CTRL-ENTER to run a Python script which parses a file called EXECUTIVE.AGC and write a comma-separated file (csv) as output. We then go to the next step in the pipeline by using ALT-RIGHT and run a SQL query against that csv output.

That is the whole of the idea in a nutshell. As you can see from the video you can flick between steps in the pipeline pretty easily and the scripts themselves run quite quickly, nearly blink-and-you'll-miss-it.

NAVIGATING

The UI at the bottom lets you know which step in the pipeline you're at. The UI on the side lets you know which pipeline you're in. Here's a video showing me switching between steps in the pipeline using ALT-LEFT and ALT-RIGHT.

Notice that creating new steps in the pipeline is as simple as navigating beyond the last one. Notice also that the output from the previous step is made available to the current step as input.txt. It's also available on stdin.

In the next video I'm switching between pipelines using ALT-UP and ALT-DOWN. At any time I can load a file into the current step I'm working on using CTRL-O.

CODING

It does a reasonable job of guessing which language you're using thanks to guesslang. Below we first run a Python script, then we paste in a Javascript snippet. The step description changes from *.py to *.js to indicate that the change in language has been recognized.

The help file (F1) gives some more hints on the supported languages and how to force language recognition if that becomes necessary (and it sometimes does with particularly short code snippets).


BUT MY DATA!

Of course everything you do persists between sessions. You can even save down all your pipelines to a zip file and import them in another instance on another computer. This is necessary because there's no server side to this at all - everything you do is local to your computer from the data you read and write to the code you run.

*