Central Github repo's

timothybone's icon

I notice that there are patches and externals available on a variety of websites, that in short, there's just lots and lots of max patches out there, and not really much of a centralized storehouse, let alone code versioning system.

Is there any interest in a project like this?
Perhaps it's useful for beginners, and for organizational purposes.

Andrew Pask's icon

Yes, I believe there is interest in a project like this.

-A

mark's icon

i'd be quite interested.

timothybone's icon

Let me check I get what you're saying nicolas -- you've listed three examples of documented sources of max code, and are now asking how github is an improvement . Is that correct?

In response (though i'd certainly like to hear other people chime in) --
Github is a popular way to connect open-source developers, so right there's it's going to foster productivity/collaboration.

it's really efficient for coordinating efforts -- pull requests, issues, multiple owners of the repo, wiki.
I don't see it as just the fancy new place for code (for rational, consider why github is popular)

Personally I'm interested in documenting the loads of max patches that I've come across that are mostly not documented, i.e. never made it into any of those 3 bins you mention.

What do you think? Can you spot an advantage to developing a Comprehensive github repo's?

timothybone's icon

Nicolas Danet -- you are the man. Thanks for adding your 2 cents. I think you and I agree completely so far, lol, alot of work and can't have expectations!

I think what I've found using the cycling74 boards so far is that it is an amazing resource pool of great people -- AND that I would be quite happy to work together with these people, but just using these comment boards promotes small projects individually developed AND/OR projects that get a series of feedback when people get questions, but a serious lack of comprehensive open-source project development.
I would much prefer to see the coolest projects (and arguably the most challenging) taking place in a more comprehensive environment, i.e. github.

So then perhaps I am suggesting two different things here:
1)a github repo that storehouses all the random patches that are just all over the net. (addendum to this, it does its best to document/organize)
2) github repo's for the coolest projects people are working on.

Arguably #2 is already happening (there's plenty of max github projects), so for this point perhaps I am now rambling.

In any case, I don't claim the best ideas, If I can convince the community to keep chiming in....

Funk Eater's icon

I think in the past was difficult to share more complex work. Also I see that most of the externals available are not provided as source code, just the compiled version.

With max 6 and packages it's a lot easier to share and try patches. If you do not like it, just delete the package. What now is missing in my opinion is some kind of package manager. Like npm for node.js for example. A central registry which provides description and download links. If the developers than use git hub for their projects it would be even better.

A single central repository like you discussed (or did I get it wrong?) is the wrong way I think. For example I would like to be the owner of my repository and decide who is allowed to contribute and what patches to accept. But still provide my work as source and allow others to fork etc.

Git hub is great and more max users should use it to build a real development community in addition to this excellent forum.

Nat's icon

I use a text editor called Sublime Text that has a lot of plugins. A user decided to do something similar to what is discussed here. He made a central repo on github with information on each plugin, basically the plugin's github repo adress and name and description. He then coded a plugin for Sublime Text that manages plugins, allowing you to add/remove/update. With the new packages functionality this could be a very nice thing in Max...
I think I'd be interested in contributing to this... Although I would'nt want to start conding something if Cycling is already doing it..

Jeremy's icon

I met a user at Code Control who is working on something like this using JavaScript/Nodes.js and it is awesome. He was principally envisioning it for Max for Live Devices, but I think it could be easily extended to packages. I'll make sure that he sees this thread and maybe he'll have something to say about it. Then again, maybe not. :-)

Best, Jeremy

timothybone's icon

I hadn't thought of a package manager, cool!

Jeremy -- Please do, I'd be stoked to contribute to this kind of project.

Funk Eater's icon

+1 I'm in too.

hems's icon

Hey Jeremy thanks for the words.

Folks, as he said initially the idea was to make a "live package manager", but actually nothing would hold and we can definitely transform this into something more eclectic...

The software is in very early stage, it completely written in coffee script and run over node.js ( all free ) and its "open sourced" at https://github.com/hems/lpm

As you guys stated the biggest challenge would be to put all those devices from all those sources into a big list, and then somehow keep it up to date.

Someone could volunteer for making the "mcguyver script" to crawl and parse all those sites and generate a list, and then maybe we could have a "job" running somewhere to automatically update the list every day, or something like that.

Not sure how it could work regarding permission to distribute devices, anyone has a clever idea for that?

Jeremy's icon

Off the cuff, I think you probably would want an opt-in system, rather than a "grab everything that already exists" situation. Why?

- developers should create packages for their distributions
- developers should register their packages with some central system and create a kind of "master receipt" for the package when it is uploaded onto the central site (or linked or however it's handled)
- this receipt gets updated every time the developer updates their package, preferably automatically (which is why on-site hosting, rather than linking, is probably better -- the receipt update simply happens as part of the upload process)
- when installing, the manager grabs the package, generates a local version of the receipt and installs both somewhere, permitting relatively simple deinstallation and update checking

Challenges include elegantly handling user-local editing of package content. And the usual challenges involved in herding cats. But I actually suspect that this would be pretty easy to get working on a bare-bones level, although I tend to underestimate effort involved in coding projects.

Good luck, Jeremy

nick rothwell | project cassiel's icon

There's quite a lot of machinery for this kind of thing in the Java world: Maven does it for JARs, and Leiningen (a Clojure system using Maven libraries) does it for Clojure libraries with fallback to the Maven repositories.

A key point is that GitHub is *not* the go-to place for distributions: oven-ready binaries are pushed to Maven repos and signed with private keys (generally after some automated regression testing). The Maven/Leiningen machinery knows where the repos are, examines the published dependencies, and fetches and links accordingly. (I suspect npm does something similar.) Publication of updates is the responsibility of the owner of the sources, regardless of GitHub forks and merge requests.

Nat's icon

Here are the instructions on how to submit packages to the Sublime Text main repository, could be similar for Max:

Basically there is a central repository that contains information on all packages/plugins. If a dev wants to add his package, he forks that repo, adds his package (a link to his git repo) and sends a pull request.

hems's icon

very good points guys ( :

@Nick : i would appreciate having insights from the java / clojure world.. my references now are npm and ruby gems...

@Jeremy :

1. would need to have some sort of "manifest" file where the user specify some basic informations about the package. i do think JSON is the way to go ( for instance a package.json from npm package: https://github.com/hems/theoricus/blob/0.1.9/package.json )

2. yeah we'll need a website / central database ( anyone up for quickly rolling up a rails app? i can provide free server .. just get in touch.. i have some plans for rolling this system in a ultra fast rails-way but unfortunately i have to finish some personal stuff in the next couple of months )

3. indeed

And to conclude: I did choose coffee script which is a very accessible and easy to learn language ( http://coffeescript.org for anyone starting coffee script i would recommend this very neat and friendly tool for compiling: https://github.com/serpentem/coffee-toaster )

nick rothwell | project cassiel's icon

We should chat about that over a beer sometime. The Maven system is pretty battle-hardened. (Maven and Leiningen actually fetch much of themselves using their own machinery.) I have a passing familiarity with the way Perl and Python do this, as well as RPM, APT and the like; I suspect most of the systems are similar.

Re: CoffeeScript: it does look nice, but I'm a little suspicious of some of the arbitrary-looking and irregular syntax. I got burned by this in early releases of Groovy. I'll stick with the ClojureScript compiler, although it's a bit of a monster.

timothybone's icon

I contact clint over at maxforlive.com and would like to put this idea on this thread, ask what you guys think:
to integrate with already existing repositories, an approach is to email the owners of maxforlive repositories, informing them of a package manager, and to submit their projects, OR respond to the email that they don't mind if someone else packages it.

timothybone's icon

I just wanted to add this:
How cool it would be to be able to dynamically load maxpat's into a maxpat, download them as needed by the user.

Let's say you've got a mastering patch that has links to a massive list of possible maxpat's. The user chooses XYZ obscure reverb, then the patch goes and downloads it and loads it into the patcher.

Nat's icon

So I decided to build a proof of concept, to make it work I would need packages ;)
Anyone has links to max6.1 formatted zips or github repos ?

Thanks !

timothybone's icon

The link to the proof of concept is here:
https://github.com/natcl/max_package_downloader

hems's icon

nice one Nat ( :

i think i can pretty much delete mine now :P

good work!

hope c74 / Clint Sand help you guys to finish this beautifully and perhaps integrate into the official distribution ( :

Nat's icon

Thanks :)
Well my intention was not to bypass anyone, but when I came across jit.uldl I decided to give it a go and a couple hours later I had something functional. There's still work to do however, mainly come up with a package_info file structure to facilitate upgrades, platform selection etc. But main work will have to come from the community in the form of max 6.1 packages.
Also, I'll be more than happy if other people contribute, that's why it's on github !

Tj Shredder's icon

This all sounds awesome, I came across the package manager via TapTools. Though it doesn't work with the latest Max beta, I get the error messages listed further down on opening the Package Downloader from the extras menu. It did download a nonfunctional Taptools zip (it had a wrong name) but worked with the eijies.:
Now I need some simple instructions or "how to's" to place my St.ools on GitHub and include it into this system...

MXJ System CLASSPATH:
/Applications/Max 6.1/Cycling '74/java/lib/jitter.jar
/Applications/Max 6.1/Cycling '74/java/lib/jode-1.1.2-pre-embedded.jar
/Applications/Max 6.1/Cycling '74/java/lib/max.jar
MXJClassloader CLASSPATH:
/Applications/Max 6.1/Cycling '74/java/classes/
/Volumes/GuepysAir/Users/st/Documents/Max/Packages/max_package_downloader-master/java-classes
/Volumes/GuepysAir/Users/st/Documents/Max/Packages/St.Packages/java-classes
/Volumes/GuepysAir/Users/st/Documents/Max/Packages/TapTools/java-classes
/Volumes/GuepysAir/Users/st/Documents/Max/Packages/Third Party/java-classes
Jitter initialized
Jitter Java support installed
java.lang.NoClassDefFoundError: org/json/JSONException
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2436)
    at java.lang.Class.getDeclaredMethods(Class.java:1793)
    at com.cycling74.max.MaxObject._get_all_methods(MaxObject.java:2173)
    at com.cycling74.max.MaxObject._init_mxj_message_table_low(MaxObject.java:2519)
    at com.cycling74.max.MaxObject._init_mxj_message_table(MaxObject.java:2498)
Caused by: java.lang.ClassNotFoundException: org.json.JSONException
    at com.cycling74.max.MXJClassLoaderImpl.lookupClassData(MXJClassLoaderImpl.java:220)
    at com.cycling74.max.MXJClassLoaderImpl.doLoadClass(MXJClassLoaderImpl.java:111)
    at com.cycling74.max.MXJClassLoaderImpl.loadClass(MXJClassLoaderImpl.java:88)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    ... 6 more
mxj: could not find constructor
(mxj) unable to construct instance of package_downloader

Nat's icon

Hi Stefan, you're probably getting this error because you're running the latest commit of the package downloader with max 6.1.2.
If you download the latest Version of Max (6.1.3) and make sure you have the latest changes for the Max Package downloader it should solve the issue. You can follow the instructions here if you want your package included :
https://github.com/natcl/max_package_downloader#contributing-packages

It is preffered to host your package on github but you can also host a zip of your package and a package-info.json file on your own server if you prefer that.

Please let me know if it works with 6.1.3

Vincent Goudard's icon

As far as I am concerned, it does not work with Max 6.1.3 and the version you mentionned.
The project looks very promising though... Any news ?

Nat's icon

Did you upgrade to Mavericks ? There are some problems with mxj and mavericks. Can you try putting typing mxj in an object box, alt clicking the box to invoke the help and trying to load the package dowbloader again ?

Vincent Goudard's icon

Sorry that i didn't mention system specs :
- MacBookPro 2.8GHz Intel Core 2 Duo, 4Go 1067Mhz DDR3
- OSX 10.7.5
- Max 6.1.3

Max window shows the following when opening extra/PackageDownloader:

java.lang.NoClassDefFoundError: org/json/JSONException
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2475)
    at java.lang.Class.getDeclaredMethods(Class.java:1818)
    at com.cycling74.max.MaxObject._get_all_methods(MaxObject.java:2173)
    at com.cycling74.max.MaxObject._init_mxj_message_table_low(MaxObject.java:2519)
    at com.cycling74.max.MaxObject._init_mxj_message_table(MaxObject.java:2498)
Caused by: java.lang.ClassNotFoundException: org.json.JSONException
    at com.cycling74.max.MXJClassLoaderImpl.lookupClassData(MXJClassLoaderImpl.java:220)
    at com.cycling74.max.MXJClassLoaderImpl.doLoadClass(MXJClassLoaderImpl.java:111)
    at com.cycling74.max.MXJClassLoaderImpl.loadClass(MXJClassLoaderImpl.java:88)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    ... 6 more
mxj: could not find constructor
(mxj) unable to construct instance of package_downloader

Nat's icon