Oh, man -- giant Nasal flame war and I totally missed it. Melchior just now pointed me here. Sadly (or, well, not at all, actually) Andy's been doing a lot more of the daddy thing than the hacker thing recently. Some quick shots after the fact:
Nicolas Quijano wrote: > It's also brilliant, smaller (runs on cellphones) and faster than > nasal (that's an opinion, but I really can't see how anyone says > Nasal is fast, at least from my experience so far) While Lua is pleasingly small, it's certainly not smaller than Nasal, either in code size or size of runtime data (especially at runtime: Lua lacks anything like the vector type Nasal has and can't represent packed arrays). And I also had Nasal running on various phones* back in 2004/5 when I was doing that stuff for my day job. [* Not, by the way, that phones are particularly "small" any more. Sure they can run Lua and Nasal: also Javascript, one or more JVMs, a .NET CLR interpreter, often a flash interpreter, bash, perl, python, VB, ...] As far as speed goes, the last time I was doing any benchmarking Nasal was about as fast as Perl 5 or Python 2.2 at most things. It's garbage collector was faster, its symbol lookup about the same or slightly faster, and its bytecode interpreter somewhat slower. I'm not aware of any FlightGear usage where Nasal's performance is an issue, but I'm willing to take bug reports. And I'm amused that you feel free to express an "opinion" about a quantitative subject. Either Nasal is or is not faster or smaller than Lua; I'm not sure what your opinion is coming from if not measurements. :) > And I won't mention that is has no adequate documentation and no > debugger. Period. (<-- that's very serious) If you say so. I've been writing script code in perl and python for a decade and a half and haven't ever felt the need to use a debugger in either environment. That's very much a taste thing. If you can't handle the need to call print() or write an if() to inspect or trigger on runtime state and want to type into a command window instead, that's cool. Just don't pretend that everyone feels the same way. The documentation thing sounds more like a cheap shot than a real complaint -- is there something you'd like to see documented that isn't? We don't have books on Nasal. We certainly do have docs. So as far as flames go, some stuff off the top of my head that was, I think, true at some point in the past. I'm not 100% confident on all this, because my Lua knowledge is pretty stale. + Nasal is threadsafe. Lua has a global interpreter lock. + Nasal is stackless for interpreted code. Lua recurses on the CPU stack. + Nasal is a true functional language, with lexical scoping, runtime binding and true closures. Lua has a clunky global namespace. + Nasal has complete programmatic control over the runtime namespace for any piece of code, making "modules" a question of script coding and allowing a bunch of neat metaprogramming tricks along the lines of what the Ruby folks do with their monkey patching. Take a look at the (non-FlightGear) Gtk library for some examples. Lua, again, has a clunky global namespace. + Nasal's data model matches what you are used to from perl, python and javascript. Lua's is ... odd. + Nasal has a true garbage collector. Lua has a reference counter that can't handle circular references. + Nasal has syntax that makes sense in the modern world and to programmers exposed to other languages like Javascript. Lua looks like PL/1. But hell, there's really nothing (other than cosmetics) wrong with Lua. As you mention, it's grown into a large community with lots of documentation and libraries and professional-looking trappings. None of that was true in 2003/4 when Nasal was in its infancy, but it is now, and I can see why it would be attractive. If you want to do the integration work and maintain it (remember, there's a ton of code outside the interpreter you need to write to be able to do useful things inside the simulator), feel free. > Why was Nasal chosen in the first place ? Wasn't it to supplement a > fledgling FDM module at the time, yasim, that was lagging behind > jsbsim and its property system ? Or so I've inferred and been told Ooh, a YASim flame too. Bring it on. :) Andy ------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel