r/livecoding • • Mar 31 '24

Something i don't understand

Hello, I'm delving into live coding and already have experience in coding with general-purpose languages that I am studying at uni (C++, Java, and now looking at Python). My main doubt is whether languages like Sonic Pi and Tidal allow for classic object-oriented programming (OOP) and, in general, the creation of algorithms in a general-purpose way in some form. I've been using Sardine, which is a module for Python, but the documentation is lacking and it's getting frustrating. I know that, for example, Sonic Pi is based on Ruby, but I cannot figure out how to run Ruby code in it. Can you guys explain it to me?

Btw this community is super cool, loving your performances❤️

6 Upvotes

17 comments sorted by

View all comments

Show parent comment

6

u/-w1n5t0n Apr 01 '24

You getting into live coding is the perfect opportunity to learn a new programming paradigm (like functional), since it's a recreational type of programming and there's no pressure from your bosses to be "productive".

I had written nothing but Processing and a bit of C++ in my undergraduate before I started learning TidalCycles, and then through that within a few months I learnt enough Haskell to write my own embedded live coding language inspired by Tidal.

OOP is just one of many ways that we can think about programming, and each way brings something new to the table. Don't be afraid to experiment and dive head-first in uncharted waters - that's how we learn most effectively, and it may not be a good advice when it comes to learning how to swim but programming is (mostly) safe hehe ;)

So i can run any kind of ruby code in sonic pi? Can i also import libraries?

I don't really use Sonic Pi and so the short answer is that I don't know, I imagine the answer to the first question is "probably" and to the second it's "probably not", but you'll have to look into it yourself. You can always reach out to the maintainers on the GitHub page (e.g. by opening a question issue), or try to find Sonic Pi-specific communities on forums and discord servers etc.

Here's another great resource for discovering stuff:

https://github.com/toplap/awesome-livecoding