[Lu Song asks about executing from pathnames with chinese characters, and whether Unicon can execute code it reads in from an input file.]
Dear Lu Song, Unicon's system() function and its relatives seem to have a bug executing programs with spaces in the path. Also, the Unicon VM does not know much about multi-byte or variable-width character sets. Depending on the chinese characters' encoding this might cause failure. I am interested in improving Unicon's support for such character sets, but it won't happen unless some volunteers or sponsors step forward. The question of whether Unicon can execute data as code is also interesting. Lisp has an "eval" function that treats data as code, and this is a frequently requested feature. As far as I know, simple subsets of eval() functionality have been developed for the Icon Program Library, but no one has sat down and attempted to write a complete eval() in Unicon or add one to the runtime library. Some features written for the monitoring facilities could make an eval() written in Unicon more capable than what was possible in standard Icon, and someday the load() function may be extended to support an efficient eval() capability. But at the moment a full-fledged "eval" function is not available. Examples of Unicon features that make an eval() subset written in Unicon more flexible than what was done earlier for Icon: variable(s) : produce the variable whose string name is s constructor(recname, fields...) : produce a record constructor The part that is not easy about writing eval() is to actually generate VM bytecode from the strings of source text. For simple expressions one could write an interpreter, but for a full-fledged eval(), more is needed, such as the ability to define new procedures. The load() function can almost help with this, but not quite. Clint [EMAIL PROTECTED] ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Unicon-group mailing list Unicon-group@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/unicon-group