|
From: | Marcus G. Daniels |
Subject: | Re: [Swarm-Modelling] Announce: metaABM 1.0.0 |
Date: | Thu, 22 Nov 2007 15:03:45 -0700 |
User-agent: | Thunderbird 2.0.0.9 (X11/20071115) |
Miles T. Parker wrote:
All of the C derivatives are "pretty close" structurally and syntactically -- which is why I think an Obj-C or C++ would be a good next order target to shoot forHow about JavaScript? Mozilla's working on integrating the Adobe/Macromedia JIT into Firefox, so there's the possibility it will be approximately as fast as Java in a few months. Javascript is even more mutable and dynamic than Objective C. Also modern JavaScript has useful features for ABM. For example, there's a `yield' operator so that one `for' loop can yield to another and back again (much like a multilevel discrete event simulator, but simpler and closer to the language). Concerning the C variants: C# also has a `yield'. And C# has parallelizable language-level query:
http://msdn.microsoft.com/msdnmag/issues/07/10/PLINQ/default.aspxI find this kind of functional query clean and versatile. Consider this ray tracer:
http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx
Language integrated query is, I think, quite relevant to common ABM tasks like an agent looking around its neighborhood, especially if it is implicitly parallel! And it doesn't mean depending on a Microsoft implementation. Mono has most of C# 3.0 implemented.
But there's always a place for keeping real CPU architectures in mind and C++ seems to most practical option here. GCC now has OpenMP, and libstdc++ a substantial set of parallelized operations:
http://gcc.gnu.org/onlinedocs/libstdc++/parallel_mode.htmlA toolkit that was built from the ground up this way (like libstdc++ is built up from OpenMP), or adopted such a library in many operations ought to scale well. People that wanted to do Objective C things could just use the GCC Objective C++ compiler for some parts of a model.
Finally, perhaps with this metamodeling approach or others there's the possibility of not targeting a conventional programming language at all, but to have the modelling framework make calls against something like LLVM (http://llvm.org) and have native code generated in memory for the model itself. Such an approach would of course build on a set of standard libraries for non-model things like the GUI.
Marcus
[Prev in Thread] | Current Thread | [Next in Thread] |