I disagree. First, there is nothing intrinsically "more performant" in Lua than in JavaScript -- they are both dynamically typed languages with objects and first-class functions. Also, there is a wide choice of VMs in in Javascript. While QtScript uses the webkit JS engine, which is fairly good and nothing prevents us to moving to V8 or something like that.
Lua does not meet the realtime constraints neither anyway. In my experience, the scripting language should not be the fastest, but the most expressive, because its goal is to allow very fast development and hackability. If you look around, other music software are also using a wide variety of similar approaches, like Ableton Live, which uses Python (which is slower but more expressive than JS), or Max/MSP, which uses JavaScript. What its missing in Mixxx is, however, an API in the scripting engine to bind a MIDI signal to a control. This way, the script can handle mode selection, but for every mode, the important MIDI messages (cue button, knobs and faders) still go through the engine directly. Something like: engine.connectMidiToControl(status, midino, group, control, options); engine.connectControlToMidi(group, control, status, midino, options); Which would be equivalent to defining an entry in the <controls> or <outputs> section of the XML file. If I were to critisize JavaScript, on the other hand, it would be because it is not always as concise and expressive as it could be. Fortunatelly, a wide range of languages nowadays compile to JavaScript, and that is one of the reasons my CoffeeScript project can exist at all. JP On 25/05/13 15:38, petah wrote: > Hi there, > > first post but I am NOT a student looking to rubberstamp GSoC all over my > resume :) > > RJ, you may remember me from www.hackerdjs.com/software/cdj2midi.html, > introduced by Mark Hills, through Adam D, I think. Since we last spoke I've > become a linux-head, been stalking Mixxx-devel for a month. Seeing you're > into 3D/games I'm surprised Mixxx uses Javascript, Python and qtScript but > not Lua. > > I'm guessing the initial choice of XML/Javascript was to attract more people > to write controller glue code but Mixxx has gotten a lot of > traction/attention since then. With a new focus on reliability, > Mixxx/hardware-interface drivers should really be written by somewhat > experienced programmers (at least not invite bad code). QA's a bitch now > cause you often don't have the hardware but if Mixxx's user base keeps > growing as it does you'll soon be able to threaten manufacturers *not* to > support their device:) > > Assuming Mixxx maintains its growth (vs withers & dies), driver and hardware > availability is a given, what matters is runtime quality/efficiency. Porting > the current ./res/controllers/ is a one-time effort. Also, the majority of > users will be non-techie DJs; at the top DJs with a coding assistant :) > > Wrt speed, Javascript engines can afford many luxuries when running in web > browsers (or servers) because they're not dealing with 10ms latencies. A > web-surfing user won't notice a garbage collector hiccup but in a "critical > realtime" app like Mixxx it's the end of the world for a very pissed DJ. > Hardcore videogames are somewhat similar and there's virtually no Javascript; > #1 engine is Lua because it's tiny and predictable; where the VM falls short > you bind native C code in a handful of lines. > > Either way I think it'd make sense to use the same VM for both drivers and > macros since they're really on the same path between the hardware interface > and Mixxx. > > (bowing out) > > -- p > > ------------------------------------------------------------------------------ > Try New Relic Now & We'll Send You this Cool Shirt > New Relic is the only SaaS-based application performance monitoring service > that delivers powerful full stack analytics. Optimize and monitor your > browser, app, & servers with just a few lines of code. Try New Relic > and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may > _______________________________________________ > Get Mixxx, the #1 Free MP3 DJ Mixing software Today > http://mixxx.org > > > Mixxx-devel mailing list > Mixxx-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mixxx-devel > ------------------------------------------------------------------------------ Try New Relic Now & We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, & servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may _______________________________________________ Get Mixxx, the #1 Free MP3 DJ Mixing software Today http://mixxx.org Mixxx-devel mailing list Mixxx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mixxx-devel