Hi everyone,
just a quick bug fix release addressing an issue with the midi_sysex
function. Go and grab it whilst it’s still fresh!
Hi everyone,
just a quick bug fix release addressing an issue with the midi_sysex
function. Go and grab it whilst it’s still fresh!
Just tried to see what the new warning looks like for functions with initial caps:
def Test
puts "Test"
end
Test()
And it doesn’t appear to warn at all… I’m guessing my PR got pulled in to this release since it’s not throwing an error anymore, but something isn’t working with the warning.
I’ll try to get my local build going again and play around to see if I can get it working.
Hi @emlyn,
using def
to define functions is not supported. Instead prefer define
D’oh! Should have paid more attention…
Did you remove the condition on block.arity == 0
on purpose? I believe the functions will behave normally if they are always called with at least one parameter, it’s just the zero arity call that requires parentheses. But I guess always warning is simpler and more consistent.
Yes, the intention was to indicate with a warning that functions starting with capital letters aren’t supported but not block their creation with an exception like before.
That makes sense, but my point was that, unless I’m mistaken, functions starting with capital letters do in fact behave normally if they have a non-zero arity - it’s only strictly necessary to warn if block.arity
is zero.
deb files for Raspberry Pi 32 and 64 bit for Sonic Pi 4.0.3 should be uploaded tomorrow. I’ve got them ready.
Isn’t it odd that the “no implicit conversion of Array to Integer” glitch only affected midi_sysex
? I trust the gurus spot checked other functions as well?
It was just a very minor syntax error introduced with the major v4 internal restructuring. We’ve had nearly a year’s worth of beta releases so hopefully most of the major issues have been caught already - but there are always bugs in software. Do let us know if you have any other issues.
True, if we were just looking to warn on behaviour change specific to Ruby’s functionality. However, I think the general stance of not officially supporting functions that start with capital letters is easier to communicate
These have now been uploaded and are available here: Release Dovetail · sonic-pi-net/sonic-pi · GitHub