[Taoscript-lang] Tao development progress

0 views
Skip to first unread message

Limin Fu

unread,
May 17, 2005, 11:15:04 AM5/17/05
to taoscri...@lists.sourceforge.net
Hi,

During the past weeks, I have made some progress in the development of Tao, including splitting subindexing operations from the numeric array types and starting to implement multi-threading supporting, simplifying the interfaces for extending and embedding Tao, and supporting scripting in non-english languages. In particular, the last two are almost done.

Now the interfaces for extending and embedding are very simple, and easy to use, because the interfaces are abstracted as pure virtual class, and all the internal Tao data types are subclassed from these pure virtual class. So most of the Tao data objects can be directly passed to and from C++ modules, and with abstract interfaces these Tao objects can be easily manipulated in C++ modules. Only two _very_small_ header files taoBase.h and taoPlugin.h are required to build a loadable C++ module, no need to link to additional libraries.

The embedding of Tao is even simpler than extending. The kernel of Tao is compiled into a dynamic loading library, which are also accessable through abstract interfaces defined in a header file. It's also true that one can embedding Tao with only 4 _very_small_ header files _without_ linking to Tao library! One can have a look into file taoMain.cpp as an instance for embedding.

For non-english languages, Tao allow users to provide a set of alternate keywords in any languages as an alternate keyword file ( *.akw ). As a result, one can write Tao script in any language he/she prefers (I have tried in Chinese, it works well. And this feature was done in a few hours!). The only requirement is that the character encoding of the akw file should be the same as the encoding for the source file.

This file can be provided to the Tao interpreter by option -k, if this option is not present, a default akw file with the same name as the source file is searched in the current directory.  akw file should include  two columns, for example,

class    ClassInChinese
routine  RoutineInChinese
...

By providing this file to the interpreter, one can use keyword "ClassInChinese" instead of "class". However, "class" is always available as the keyword.

All these features are only available in the CVS version of Tao.

Cheers,

FU Limin

Josef 'Jupp' SCHUGT

unread,
May 18, 2005, 5:20:26 PM5/18/05
to taoscri...@lists.sourceforge.net
Hi!

At Tue, 17 May 2005 17:15:04 +0200, Limin Fu wrote:

> class ClassInChinese

Klasse!

I should explain this: 'Klasse' is German for 'class'. As an
exclamation it means 'Great!' :->

Problem: How to describe the character encoding used? Suggestionq an
initial line using the comment character of most scripting languages
as the first character reading something like this:

# charset=utf-8
# charset=iso2022-cn
# charset=iso8859-15

The 'charset=' was taken from HTML.

Josef 'Jupp' SCHUGT


-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
Taoscript-lang mailing list
Taoscri...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/taoscript-lang

Limin Fu

unread,
May 19, 2005, 6:06:26 PM5/19/05
to taoscri...@lists.sourceforge.net
Hi!

On 5/18/05, Josef 'Jupp' SCHUGT <ju...@gmx.de> wrote:
Hi!

At Tue, 17 May 2005 17:15:04 +0200, Limin Fu wrote:

> class    ClassInChinese

Klasse!

I should explain this: 'Klasse' is German for 'class'. As an
exclamation it means 'Great!' :->

Problem: How to describe the character encoding used? Suggestionq an
initial line using the comment character of most scripting languages
as the first character reading something like this:

# charset=utf-8
# charset=iso2022-cn
# charset=iso8859-15

The 'charset=' was taken from HTML.

If the encoding for the keyword file and script file are the same, there is no need to specify the charset, the interpreter doesn't care what they encoded, it just compares the bytes directly when necessary.

Indeed, it would be nice if it can allow users to specify the charset explicitly, but to do  this, it requires a decoder for each charset to map different charsets to a standard charset. So far I don't know how to do it,  I don't know if it's possible to use the same decoders used by web-browsers.

However, it should be easy for people to use the same charset in the keyword and script files, since all systems and editers have some kind of default charset for themselves. Even if some files happened to have different charset, one can use web brower to open it, and copy&paste in an editor to save in certain charset.

FU Limin
Reply all
Reply to author
Forward
0 new messages