Code
Here's some projects I'd like to share:
Song Detector
Every now and then I like to stream myself playing songs on the guitar. My workflow is as follows:
- My main monitor is displaying the chords and lyrics of the song I'm currently playing, from the website Ultimate Guitar.
- My second monitor is used to preview the stream and display chat. The software used for streaming is OBS.
This program works like this:
- A shell script using a tool called kdotool (because I'm currently running CachyOS with KDE Plasma Wayland) looks at all active windows with
Ultimate-Guitar.comin the name. If it finds one, it sends the name to a Java program. - That Java program cleans the string, and outputs a nice
"Song" by Artistformat to a text file. - There is a text source in OBS that is constantly looking at that text file. This way, the name of the current song being looked at is displayed on stream!
CiCAda - Compiler in C for Ada
This was a really fun university project. For our Compilers class, we had to write a compiler for a subset of a language. The teacher picked Ada, specifically because it was a programming language that none of us had worked with.
So our group (me and another friend) wrote a little compiler in C to handle a very small subset of the Ada language. We used Flex and Bison for input parsing, but the rest was all good old fashioned structs and unions in C.
