3 ms·
Processing 2.0 will "compile" to JavaScript
- wccrawford 15y agoI can find nothing on that page that says it will compile to JS. I see a sister project that appears to interpret Processing code in a browser, but nothing about compiling to it.
- Impossible 15y agoIf you look at the modes section on the change list they mention that processing.js will be a mode in the standard Processing IDE along with standard and android. Up until now Processing.js has always been separate from the official Processing release.
- sylvinus 15y agoSo there will be an "official" JS VM but there will be no actual compilation. Title should be updated IMHO.
- extension 15y agoMy understanding is that Processing always "compiles" (or more accurately, transliterates) to some other language -- originally Java and now JavaScript as well.
- scott_s 15y agoA source-to-source compiler is still a compiler, and it still compiles. Transliteration implies that there is a one-to-one mapping between concepts in the source language and the target language, which is rarely the case. (If so, why bother with another language? Some of the languages which are a more readable CSS may come close, but my understanding is that they still have a few abstractions that don't exist in CSS.)
- jamesbritt 15y agoSo there will be an "official" JS VM but there will be no actual compilation. You enter code using the Processing language, and if you've selected the JavaScript "mode" it will output JavaScript that uses processing.js and canvas. Prior to 2.0 the modes were "standard" (i.e. Java byte code) and "android" (Dalvik byte code, I presume, since you get an apk file).
- daviddaviddavid 15y agoLame title. Saying that it will compile to JavaScript implies (or at least suggests) that it will no longer compile to Java. The page clearly says that JavaScript will be one of several "modes". C'mon.
- jamesbritt 15y agoSome additional info to reduce some apparent confusion. I learned about Processing 2.0 from here: http://www.creativeapplications.net/processing/generative-art-in-html5-processing-javascript-tutorial/ http://www.creativeapplications.net/processing/generative-ar... I already knew about the IDE modes; being able to generate an Android app straight from Processing code is pretty slick (especially as you mix in stuff like Pure Data) though it has some limitations. The above link adds, "Processing 2.0 adds a third option, 'JavaScript', which allows you to publish direct to HTML5 Canvas (using the now in-built Processing.js). And it works. It just works." The best Processing page I could find that included this was the changes page, which also nicely lists other new features. I picked the word "compile", in quotes, because while see as in fact compiling, I also tend to think of compiling as taking a high level level and outputting something lower-level. Though that's not a necessary condition, I had a feeling that if I left off the quotes there'd be complaints about how this wasn't really compiling, title is misleading, etc.. But there you go. edit: also, video: http://vimeo.com/28117873 http://vimeo.com/28117873
- wasabistudio 15y agoThis could be useful. However, if this is done by using Processing.js, then there are some gaps that need to be addressed. Last time I checked, the JavaScript version does not support vlw fonts and loads fonts differently. There is also the file IO that is not supported in PJS.