Why Ruby instead of Clojure

This is really a question for Sam I guess! I discovered sonic pi through the links from the (now defunct?) Overtone project, and was curious what motivated the switch from Clojure to Ruby for the server. To be clear, this isn’t a complaint, just curiosity.

From what I have heard Sam talk about in interviews, part of the decision was that Sonic Pi was originally made as a tool to help teach children how to code, so he wanted to choose a language that is more accessible to beginners. He also needed to be able to justify his reasoning for using something besides Python to the educational powers that be in the UK. Ruby seemed to have some acceptable selling points to pass that scrutiny.

Here are a few podcasts he’s appeared on where he talks about this in more detail.
http://www.se-radio.net/2016/11/se-radio-episode-274-sam-aaron-on-sonic-pi/

https://devchat.tv/ruby-rogues/215-rr-sonic-pi-with-sam-aaron

2 Likes

here’s my impression of what happened:

*dance music playing in the background*

"hmmm, i know what this song needs... more cowbell, less parenthases!"

hehe, i guess that’s probably not what happened, but anyway…

3 Likes

dance music playing in the background

“hmmm, i know what this song needs… more cowbell, less parenthases!”

Totally not! I love lisps and I very much prefer to code in Clojure than Ruby.

The short and simple reason why Sonic Pi isn’t Clojure is that the JVM support for the Raspberry Pi 1 at the the time Sonic Pi started (~7 months after the Raspberry Pi was released) was very poor and things took a very long time to boot.

I used to be a professional Ruby programmer and Ruby didn’t suffer from any delays in booting. It is also a pretty flexible language (although nowhere near as flexible as a lisp) and is similar to Python so isn’t too alien for schools.

2 Likes

Ah that totally makes sense, should have been able to figure that one out. I’m a professional Python programmer, but I really like the idea of doing music in lisp, so I’m intrigued by your stack of ruby, erlang, supercollider, and C++. Supercollider is really nicely architected. I will definitely dig into the code. And probably start more threads with other questions!

Do you still work with Clojure as the algorithmic composition language (for lack of a better term for that bit) in other contexts? And have you tried it with any other lisps?

thanks, really looking forward to learning more about the project.

I just was curious if “Overtone” has any connection to Sonic Pi and landed on this thread started 2018.
Java is available on Raspberry Pi some time, actually the Version includes OpenJDK11 (a version dated to 2018). I am interested bot not up to date with this item.
Clojure’s base is java, it is available on Raspberry Pi since about 2019 (?)
Running Clojure on the Raspberry Pi

I am not a Lisp fan but prefer the object oriented language paradigm. Worked on AI problems some time and found the model of OOP more useful than functional programming. I understand that the functional programming is greatest for theorists with no need to contact/handle problems of the the physical world practically.

I cannot infer if the Overtone project can get restarted on Raspberry Pi as clojure is now available on RPi?