Max5 – The new "source code" language, usage?
Apr 23, 2008 at 9:38pm
Max5 – The new "source code" language, usage?
So… I’m pretty new to the whole Max/MSP world (well, I’ve been lurking for some years I guess, but I took the plunge only some months ago) – and I’ve been wondering what’s better about the new text-style (copy/paste) source coming out of Max 5 in comparison to the old < 4.6 sources.
How did you Max wizards use the old sources, just for sharing files or did you actually use them to look/read?
Why am I asking? Well, it’s my idea that if anyone was to make a new language today it’d be quite easy to skip out on these old style brackets and what not, especially with a descriptive language such as Max5 (unless I am missing something, it’s a markup language).
To give you a clearer vision of what I am after, I have included a ZIP-file with two text files, one using the new Max5 syntax and one using a more readable syntax that uses indentation instead of brackets and comma-separation (,).
Do I see that the syntax will change in the close future, probably not – but I think that the discussion is quite interesting. With all the nice graphics updating that made Max5 got into the year 2000 – why didn’t the syntax follow?
Apr 23, 2008 at 9:45pm
>With all the nice graphics updating that made Max5 got into the year 2000 – why didn’t the syntax follow?
It did follow. It uses JSON which has become very popular in recent years. Have you heard of “web 2.0″ and AJAX and all that mumbo jumbo? A very large portion of that technology uses JSON as the data transfer format. It’s all over the web these days.
You are proposing something like YAML, which is a bit simpler and more readable. YAML is currently gaining in popularity but is not as widespread as JSON and maybe never will be.
Anyway, I’m sure this new JSON format is here to stay for quite a while so get used to it…
Apr 23, 2008 at 10:00pm
Quote: Adam Murray wrote on Wed, 23 April 2008 23:45
Yeah sorry, I forgot to mention them two. Just because JSON is more widespread, that doesen’t mean it has to be all good though. And as JSON practically is YAML, except the occasional use of /* */ commenting and a lot of brackets gone missing – why not go for readability instead (YAML)?
> You are proposing something like YAML, which is a bit simpler and more readable. YAML is currently gaining in popularity but is not as widespread as JSON and maybe never will be.
> Anyway, I’m sure this new JSON format is here to stay for quite a while so get used to it…
True true. Still… Was the old syntax only used for sharing purposes or did it have other purposes? If so I see some releveance to keeping this discussion, even though C’74 is not likely to change the syntax in years.
I do realise the enormous amount of work being put into the Max 5 release and I’m not trying to give the people at C’74 a hard time or anything. Just see this as reflection.
Apr 23, 2008 at 10:28pm
> why not go for readability instead (YAML)?
> True true. Still… Was the old syntax only used for sharing purposes or did it have other purposes? If so I see some releveance to keeping this discussion, even though C’74 is not likely to change the syntax in years.
It’s purpose is just the file format AFAIK.
But by supporting a text format, and updating the older cryptic format to the more structured JSON, it looks like it’ll be easy for people to use the format for other purposes now. Patch generators seems like the obvious thing. Patch Stats (analyzing how deep does the patch go, the most common objects, etc) is another possibility. And coming from a software engineering perspective, I sometimes wonder what patch refactoring tools could be like…
I’m just happy to have a format I can easily process in another programming language. Doesn’t matter so much to me whether it’s XML, or JSON, or YAML, or whatever.
Apr 23, 2008 at 11:01pm
i am truly excited to see what kind of patch-generation tools people come up with now that JSON is the maxpat format. it’s the bright side of the no-more-patches-posted-on-list-via-email sadness.
yes, i’m posting this via the forum. workflow change! sigh.
Apr 23, 2008 at 11:09pm
These are exactly the kinds of reflections I was going for! Good stuff. I have to load up the Ruby interpreter and try the Json gem out with these files and see what magic can be done.
Apr 23, 2008 at 11:32pm
FWIW, JSON is effectively a subset of YAML.
IMHO, one of the big reasons brackets or some other mechanism are
Really these “human-readable” files, are more for Max or other
People are free to write their own XML< ->(whitespace structuring)YAML< -
Enjoy your brackets…
You must be logged in to reply to this topic.