Support https requests #3152
Replies: 5 comments
-
The Ruby inside Sonic Pi is manually-compiled on a machine running the oldest supported version of macOS. If I remember correctly it was a bit tricky to build with openssl and as we don't use it internally it was easiest to drop it out of the build. Also, all the new network stuff is happening on the BEAM side of things, so there's even less motivation to work on this - in addition to it being very unlikely to be a properly supported language feature. However, if you were to build Sonic Pi yourself, you could use a more standard system install of Ruby which presumably would have openssl support and should get you going: https://github.com/sonic-pi-net/sonic-pi/blob/dev/BUILD-MAC.md |
Beta Was this translation helpful? Give feedback.
-
Thanks @samaaron, interesting background. Should I maybe open (or alter this into) a request for some sort of first class (probably BEAM-powered) http/https support? My goal is to get data from the internet into a place where Sonic Pi can react to it. It doesn't have to be ruby's Net::HTTPS API. Honestly that API is not my favorite so maybe better if it's not that 😆 |
Beta Was this translation helpful? Give feedback.
-
👋🏻 - I still think this could be a really cool feature. Opening up the whole internet as an input for sonic pi compositions. |
Beta Was this translation helpful? Give feedback.
-
Agreed that it's interesting. My main concern is that Sonic Pi doesn't currently have any supported text manipulation tools other than stuff inherited from Ruby which can't be assumed to either work or be there in a future version. So whilst it might be possible to (fairly easily) teach Sonic Pi to grab some text from a URL, there are no tools to work with that text to convert it to something usable for musical purposes. This may change with a shift to an Elixir-based runtime. |
Beta Was this translation helpful? Give feedback.
-
Another thought I had here was maybe there's some easy way to use something else to grab the data and give it to sonic pi locally. Maybe via an OSC channel? It's not quite as direct, but if it's a simple thing to do (thinking |
Beta Was this translation helpful? Give feedback.
-
It'd be great to include https support for doing things like building audio streams from online data sources (I used elasticsearch at one point last year or so). I tried just requiring https but looks like at last the macos build doesn't include openssl.
Any chance of getting it included?
Beta Was this translation helpful? Give feedback.
All reactions