<div dir="ltr"><span class="Apple-style-span" style="border-collapse: collapse; color: rgb(80, 0, 80); "><span style="border-collapse: collapse; font-family: 'Courier New'; line-height: 16px; ">Hi, <br> <br>I started some 3d engine community <a href="http://code.google.com/p/m-nebula/" target="_blank" style="text-decoration: underline; color: rgb(0, 0, 204); ">http://code.google.com/p/m-nebula/</a> <br>
based on well polished, stable and robust scriptable 3d engine. <br> <br>Currently it supports TCL, Lua and Python, I want to add LISP (already many <br>years I want, but only now got a little time for it). And I very motivated after I <br>
found this project <a href="http://impromptu.moso.com.au/" target="_blank" style="text-decoration: underline; color: rgb(0, 0, 204); ">http://impromptu.moso.com.au/.</a> I understand well the power <br>of LISP and LISP dialects like Scheme and I think people will get a very nice <br>
environment with LISP powered by 3d engine that supports 3d, audio and video. <br>The engine is also cross-platform - some small effort (mostly make cleanup/order <br>in pakfiles and makefiles) needs to finish Mac & Linux ports. <br>
<br>I've decide to use ECL for this project because it seems to be most suitable <br>small and portable and it's a Common LISP. <br> <br>I've started well after i founjd sample of usage cl_boot, cl_shutdown and si_safe_eval <br>
in the mail list I also found the cl_def_c_function <br> <br>and then I stuck, I can't get when I shiuld use make_simple_base_string and when <br>c_string_to_object, what to do with errors and how to provide proxy to exported <br>
for script commands, in Tcl the commands of engine objects called by replacing <br>"unknown" command of Tcl. In Python new python object type defined for same <br>purpose. I don't know how to make it currently for Ecl. <br>
Actually I'll be glad to help to extend the documentation for 7.2 of reference <br>and for externals.h and to provide a samples, but I need a help and directions of how to start. <br>Here is an example that supposed to be near to final result: <br>
<br>extern cl_object eclcmd_New <br> <br>nEclServer::nEclServer() : refFileServer(kernelServer, this) <br>{ <br></span><blockquote style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 40px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">
<span style="border-collapse: collapse; font-family: 'Courier New'; line-height: 16px; ">//... </span><br><span style="border-collapse: collapse; font-family: 'Courier New'; line-height: 16px; ">cl_boot(argc, argv); </span><br>
<span style="border-collapse: collapse; font-family: 'Courier New'; line-height: 16px; ">//... </span><br><span style="border-collapse: collapse; font-family: 'Courier New'; line-height: 16px; ">cl_def_c_function(cl_intern(1, make_simple_base_string("new")), (void*)eclcmd_New, 2); </span><br>
<span style="border-collapse: collapse; font-family: 'Courier New'; line-height: 16px; ">//... </span><br></blockquote><span style="border-collapse: collapse; font-family: 'Courier New'; line-height: 16px; ">} <br>
<br> <br>//------------------------------------------------------------------------------ <br>/** <br>eclcmd_New <br>(C) May-3-2009 + by plushy <br>*/ <br>cl_object eclcmd_New(cl_object class_name, cl_object name) <br>
{ <br></span><blockquote style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 40px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">
<span style="border-collapse: collapse; font-family: 'Courier New'; line-height: 16px; ">if (ecl_stringp(class_name) && ecl_stringp(name)) </span><br><span style="border-collapse: collapse; font-family: 'Courier New'; line-height: 16px; ">{ </span><br>
</blockquote><blockquote style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 40px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">
<blockquote style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 40px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">
<span style="border-collapse: collapse; font-family: 'Courier New'; line-height: 16px; ">nRoot* o = nEclServer::kernelServer->NewNoFail(ecl_base_string_pointer_safe(class_name), ecl_base_string_pointer_safe(name)); </span><br>
<span style="border-collapse: collapse; font-family: 'Courier New'; line-height: 16px; "> </span><br><span style="border-collapse: collapse; font-family: 'Courier New'; line-height: 16px; ">if (o) </span><br>
<span style="border-collapse: collapse; font-family: 'Courier New'; line-height: 16px; ">{ </span><br></blockquote></blockquote><blockquote style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 40px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">
<blockquote style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 40px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">
<blockquote style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 40px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">
<span style="border-collapse: collapse; font-family: 'Courier New'; line-height: 16px; ">return make_simple_base_string(o->GetFullName().c_str()); /// can I return object in some way ? </span><br></blockquote></blockquote>
</blockquote><blockquote style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 40px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">
<blockquote style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 40px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">
<span style="border-collapse: collapse; font-family: 'Courier New'; line-height: 16px; ">} </span><br><span style="border-collapse: collapse; font-family: 'Courier New'; line-height: 16px; ">else </span><br>
<span style="border-collapse: collapse; font-family: 'Courier New'; line-height: 16px; ">{ </span><br></blockquote></blockquote><blockquote style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 40px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">
<blockquote style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 40px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">
<blockquote style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 40px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">
<span style="border-collapse: collapse; font-family: 'Courier New'; line-height: 16px; ">//@# return cl_cerror() ? what should I return ? </span><br></blockquote></blockquote></blockquote><blockquote style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 40px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">
<blockquote style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 40px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">
<span style="border-collapse: collapse; font-family: 'Courier New'; line-height: 16px; ">} </span><br></blockquote></blockquote><blockquote style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 40px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">
<span style="border-collapse: collapse; font-family: 'Courier New'; line-height: 16px; ">} </span><br><span style="border-collapse: collapse; font-family: 'Courier New'; line-height: 16px; ">//@# return cl_cerror() ? what should I return ? </span><br>
<span style="border-collapse: collapse; font-family: 'Courier New'; line-height: 16px; ">return Cnil; //@# ? what should I return ? </span><br></blockquote><span style="border-collapse: collapse; font-family: 'Courier New'; line-height: 16px; ">} <br>
<br>Ilya </span></span><br></div>