Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I happened to work on a project which have some parts that is similar to your project, It's a cross-platform system running on Win-CE,Android,iOS, I need maximize cross-platform-able code, C/C++ combine with a embeddable language is a good choice. here is my solution related to your questions. </p> <blockquote> <ol> <li>If you were in my position which language would you chose ?</li> </ol> </blockquote> <p>The <a href="http://www.hartcomm.org/protocol/about/eddl_features.html" rel="nofollow">DSL</a> in my project is similar to yours. for performance, I wrote a compiler with Yacc/Lex to compile the DSL to binary for runtime and a bunch of API to get information from binary, but it's annoying when there is something modified in DSL syntax, I need to modify both compiler and APIs, so I abondoned the DSL, turned into XML(don't write XML directly, a well defined schema is worthy), I wrote a general compiler converting XML to lua table, reimplement APIs with lua. by doing this I got two benefits: Readability and flexibility, without perceivable performance degradation.</p> <blockquote> <ol start="2"> <li>Are there any alternatives I should consider (don't suggest languages that don't have an embeddable implementation). Javascript v8 perhaps ?</li> </ol> </blockquote> <p>Before choosing lua, I considerd <a href="http://www.softintegration.com/solution/embedded" rel="nofollow">Embedded Ch</a>(mostly used in industrial control system) , embedded lisp and lua, at last lua stand out, because lua is well integrated with C, lua have a prosperous community, and lua is easy to learn for another team member. regarding Javascript v8, it's like using a steam-hammer to crack nuts, if used in a embedded realtime system.</p> <blockquote> <ol start="3"> <li>Does lisp fit the domain better ? I don't think lua and lisp are that different in terms of what they provide. Call me out :D</li> </ol> </blockquote> <p>For my domain, lisp and lua have the same ability in semantic, they both can handle XML-based DSL easily, or you might even wrote a simple compiler converting XML to lisp list or lua table. they both can handle domain logic easily. but lua is better integrated with C/C++, this is what lua aim for.</p> <blockquote> <ol start="4"> <li>Are there any other properties (like the ones below) I should be thinking about ?</li> </ol> </blockquote> <p>Working alone or with team members is also a weighting factor of solution selection. nowadays not so many programmers are familiar with lisp-like language.</p> <blockquote> <ol start="5"> <li>I assert that any form of embedded database IO (see the example DSL below for context) dwarfs the scripting language call on orders of magnitude, and that picking either will not add much overhead to the overall throughput. Am I on the right track ? :D</li> </ol> </blockquote> <p><a href="http://theowoll.netau.net/benchmark.html#result" rel="nofollow">here</a> is a list of programming languages performance, <a href="http://surana.wordpress.com/2009/01/01/numbers-everyone-should-know/" rel="nofollow">here</a> is a list of access time of computer components. if your system is IO-bound, the overhead of script is not key point. my system is a O&amp;M(Operation &amp; Maintenance) system, script performance is insignificant.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload