Gah! Make up your mind.

  • Thread starter Thread starter VomitHatSteve
  • Start date Start date
VomitHatSteve

VomitHatSteve

Hat STYLE. Not contents.
I feel the need to rant for a bit. Feel free to ignore me.

JesusSonic needs to make up its mind as to whether it's a programming language or a scripting language! It tries to be an easy to use scripting-type language (weakly typed, automatic memory management), but then it tries to allow complex, low-level functionality too (modifying individual audio samples, allowing you to specifically copy and allocate memory, etc.)

Why can't it just function like C? Let me specifically allocate my arrays and integers myself. Let me decide if that variable is going to be an int or a float. Let me access files directly instead of going through wav specific memcopy functions!

And write some better documentation! If your users are going to be performing low-level functionality (like, say, real-time anything), let them know what's going on under the hood so that they can make good programming decisions instead of just guessing. What's the scope of this variable I used inside a loop in my @init section? Who knows? The documentation sure isn't going to tell me. Is the line "var = 5000" going to give me an integer with a value of 5000? A float with a value of 5000.0? An array starting at local memory location 5000? Something else entirely? Does this array of 'n' elements end on element n or n-1?

It's trying to be an amalgam of C and perl, and it's not doing a very good job of either.

Ok. I'm done now.
 
well you cold pull your hair out some more...
or you could post this on a forum that is likely to get you the answers you seek.
forum.cockos.com

greetings
.t
 
I feel the need to rant for a bit. Feel free to ignore me.

JesusSonic needs to make up its mind as to whether it's a programming language or a scripting language! It tries to be an easy to use scripting-type language (weakly typed, automatic memory management), but then it tries to allow complex, low-level functionality too (modifying individual audio samples, allowing you to specifically copy and allocate memory, etc.)

What's wrong with having a low level scripting language?

Why can't it just function like C? Let me specifically allocate my arrays and integers myself. Let me decide if that variable is going to be an int or a float. Let me access files directly instead of going through wav specific memcopy functions!
Well it's simpler than C. EVERYTHING is a float. File access is restrictive, yes, but that's largely because it's not designed for heavy use of external files.

You can allocate memory from the global address space as you like. You just set a variable to where you want to access, and then access. So yes, you can't malloc() etc, but you can manage memory allocation yourself.

And write some better documentation! If your users are going to be performing low-level functionality (like, say, real-time anything), let them know what's going on under the hood so that they can make good programming decisions instead of just guessing. What's the scope of this variable I used inside a loop in my @init section? Who knows? The documentation sure isn't going to tell me.


The docs on reaper.fm/sdk/js/ aren't that bad. I suppose a line saying "there is only global scope" would be useful...

Is the line "var = 5000" going to give me an integer with a value of 5000? A float with a value of 5000.0? An array starting at local memory location 5000? Something else entirely? Does this array of 'n' elements end on element n or n-1?

var=5000 sets "var" to 5000, which is a float, but you can treat as an integer, or a pointer to memroy location 5000. The pointer doesn't have a length...
It's trying to be an amalgam of C and perl, and it's not doing a very good job of either.

I don't see anything like perl in there. It's largely C expression syntax, but heavily oriented towards math (as everythings float, ^ is pow instead of xor, etc), and different if/else syntax ( ? and : are used exclusively).

If you don't like it, that's fine.. I agree it does need some things, like for example functions etc... but once you get used to "everything's a float" and "I can manage memory however I want" then it works pretty well.

Of course, a lot of this is optimized for fast compiling, low executable overhead, and reasonable execution speed...
 
As I said, I was venting. As with all specialized languages like this. It's really hard to find help when your code isn't working right. Add to that the difficulty of debugging anything that runs in real-time, and it gets really frustrating.
The reason I vent is because there are aspects I do really like. The basic workings of it are really simple. It's integrated nicely into reaper. etc. It's just that I keep on running into the same few problems, and they get really obnoxious.

The perl-esque aspect I referred to is the occasional stray variable borrowed verbatim from perl. For example $pi.

there is only global scope
...
everything's a float

See THAT's the sort of thing the documentation needs to tell me. Thank you.

Really, my primary complaint is the documentation. The basic details you need to know to use any language extensively (i.e. how is data stored, scoping, etc.) are glaringly absent.

I'm putting the language down in frustration for a bit. In a day or two, I'll start again, and then I'll probably post questions that come up in a more suitable forum.
 
feel free to write the documentation

Shoving out 12 versions of reaper a day leaves little time for it :)

Maybe you could make a book like nicholas' ( http://www.lulu.com/content/1295509 ) and Lulu it to pay for the time it took you
 
I'm just here to complain, not to actually fix things! :D
 
See THAT's the sort of thing the documentation needs to tell me. Thank you.

Actually, that's in the docs:

reaper.fm/sdk/js/basiccode.php has it:

# Variables do not need to be declared. Simply using a variable is enough to create it.
# All variables have a global scope (meaning you can access them from any code section).
# All variables represent real values (i.e. 0, 1, 3.14159, -3, 3000000000000000.0 are all values that they can represent).
# In addition to variables, JS effects also have approximately 8 million slots of local RAM, and 1 million slots of shared (global across all effects) RAM.

etc.. ;)

I actually was going to go add stuff at your request, then realized it was already there. heh.
 
Hey, I click on Reaper, load my project, mix until I get ear fatigue, come back and mix some more, decide I can't polish the turd any further and render it down.

Why do I need to know the programming language? Too much for my little brain to comprehend.
 
Back
Top