Amir XYZ

OCaml, Reason, Revery, PySimpleGUI, friends forever

February 08, 2019

Hey, hello. What's up?

So I've been reading a bit (more) about OCaml, and realized I am better off learning a real language like Clojure or Go. Then I came to realize that my (very limited) OCaml training so far was not for nothing.

Regarding OCaml, I wanted to learn a languages that's both functional and strongly typed. I believe a lot in types that guard you against stupid things, see TypeScript vs JavaScript where you get away from annoying and stupid bugs like bad naming or badly accessed object properties. This is why I preferred to avoid things like Clojure, despite my somewhat limited work experience with that language that might have been a jumpstart with mastering a new language.

Putting the OCaml story aside, Clojure is actually very cool, especially because I wanna try it someday with spec which gives some type checking. I saw an online lecture about how cool it is to be dynamic and to have spec as well. Since then my dislike to dynamic languages softened, but I'll continue my story.

Alright, so I had some OCaml, which I realized is stupid to invest in, and then I realized some of the "cool kids" make real use of it, in the shape of ReasonML. There's this cool Neovim frontend project called Oni whose version 2 is developed with [revery] to provide a native client instead of the slower Electron hybrid. That's done with Reason. Interesting. So I am gonna give revery a test-drive even though it lacks documentation and is not too mature right now, as far as I realized.

And all of this was, because I wanted a GUI to something I hacked together in Python. It's supposed to be a utility that lets you tag files using the interface, and then filter by tags to find the files you want, or something like that.

I first created a CLI of this tool, which for the database uses Python's IniFileConfig which is nice (might use SQLite in the future). To be honest, this tool is garbage because it doesn't list files. Ideally it would give you some interactive terminal list of your where you can tag things. The same should be done with the GUI.

Frustrated with Python GUIs and the lust for learning revery, I started being sad and found PySimpleGUI. Then I was happy. Although I still have my suspicion. These days I'm playing with it for usage as my GUI.

The general idea of all of this, is because of my Idea Pool. It's a folder where I put all my recorded ideas, riffs, solos, song ideas, etc. I title them with stupid names like "kitten pee" or "pig magic". Tagging these kinds of files with tags such as "cool", "slow tempo", "awesome solo", "journey music", "orchestral" and so on, will be handy when I'm actually writing a real song.

Good night now.