472,371 Members | 1,391 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,371 software developers and data experts.

Dao language 1.0 beta is release!


After a few months' effort, I have finished the implementation of Dao
Virtual Machine(DVM), and released it as 1.0-beta. The DVM is
implemented as a very efficient virtual register machine. This version
has implemented all the features I have planned. Most importantly, the
implementation has been switched from C++ to standard C. As a
consequence, the binary code of DVM is much smaller than before (as
executable 250KB, as dynamic linking library 300KB, linux/gcc4). The
efficiency has also been improved as well. The structure of DVM has
been changed slightly, such that the embedding and extending of DVM
becomes more convinient. In fact, now the mechanism to call internal
functions is exactly the same as the mechanism to call extended
functions. To allow DVM being more freely used, GLPL (GNU Lesser
General Public Licence) has been adopted since this release. The DVM
can be compiled and run in both windows and linux, but so far, it is
tested mainly under linux. As before, the documentation of Dao is not
well prepared yet; and there are only a few extended modules available
for using. These two things will be the prioritized work in the near

website: http://www.xdao.org
documentations: http://www.xdao.org/daoweb.dao?page=document

Changed or new features

Multiple lines comment: <<<...>>is changed to #{...#}, which can be
used anywhere in the scripts.

Built-in functions have been organized into some basic libraries:
stdlib, stdio, math, reflect, coroutine, thread etc. So now Built-in
function xyz(...) should be used abc.xyz(...), where "abc" is the
proper library. For convinience and efficiency, one may also do:
xyz = abc.xyz;

More methods are added for basic data types;

Bit operations |, &, ^, ~, <<, >>;

Typed variables, assignment between variable of different types will
issure an error:

a : 1; # a is a number; not compiled virtual instruction;
a := 1; # a is a number; compiled into assignment instruction;

The right side of : or := must be a const. This kind of syntax is for
consistence with syntax for specifying typed parameters in function

Similarly class may have typed instance variables. Moreover, "my a :=
1" will also specify the default value for the variable;

Class instance creation by enumeration:
class MyNumber
my value := 0;

num1 = MyNumber{ 123 };

num2 = MyNumber {
value @= 456; # may specify the name of variables to be

Be cautious when enumerating class members without speficying names
to create class instances for derived classes.

Creating multi-dimensional array:

changed from
list = { 2, 3 } : 100;
array = [ 2, 3 ] : 100; # 2 X 3 matrix
list = 100 <@{ 2, 3 };
array = 100 <@[ 2, 3 ];

operator <@can be called arrange operator. A<@>B, arrange A or copies
of A into a list or array of shape B. If B is a list, this operator
will create a new list which has shape specified by B, and contains A
or copies of A as elements. If B is a numeric array, this operator will
create a numeric array with shape B; if A is also a numberic array, the
resulting array will contain multiple subarrays that are equal to A.

This new operator is introduce because the previous using colon for
multiple purpose is confusing.

Support coroutines similar to Lua coroutines;

Previous built-in functions sort(),apply(),noapply() have become
methods of list
or numeric array with some changing in syntax:

sort( list, @0 < @1, n );
list.sort( @{ @0 < @1 }, n );
apply( array[ 1:5, : ], @0 + @1 * @2 );
array.apply( @{ @0 + @1 * @2 }, { 1:5, : } );

Expressions that are used as parameters should be put inside @{ }. The
advantage for this is,
simpler parsing; and moreover, they can be passed to C extending

Extending modules:
New modules available:
- DaoCGI: CGI web programming;
- DaoFastCGI: FastCGI web programming;allow DVM to run as FastCGI
- DaoSqlite: binding to Sqlite3 database; lighttpd +sqlite +dao could
be a good option
for some websites, since each of them is designed to be
light and efficient.
- DaoOpenGL: 3D graphics; support upto DaoOpenGL1.1£¬including GLU;
- DaoSDL: binding to Single DirectMedia Layer, partially finished;
- DaoCamellia: binding to camellia image processing library;

The previous modules DaoMySQL, DaoBLAS and DaoPython are not yet
upgraded accordingly for this release.

Have fun!

Limin Fu

Nov 20 '06 #1
0 813

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Anthony Baxter | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On behalf of the Python development team and the Python community, I'm happy to announce the first beta of Python 2.4. Python 2.4b1 is an beta...
by: Anthony Baxter | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On behalf of the Python development team and the Python community, I'm happy to announce the second beta of Python 2.4. Python 2.4b2 is a beta...
by: ik | last post by:
ERROR after uninstalling SQL Server 2005 Express I get this message, SQLDMO has not been registered. Please re-run your setupand contact your system administrator. GREAT!!! ReInstalled SQL...
by: Eddie Paz | last post by:
I have a program written in MFC. I'm at the point where I need to start working on the major release (tons of new features needed - new fiscal year budget and all-). I'm looking into vc++.net...
by: Flare | last post by:
Hi We are starting our implementation of a medium scale web application. The delivery is set to last february so it is "close" the release of Net 2.0. Would it be both legal and wise to develope...
by: clintonG | last post by:
Membership is broken and who knows what else. Does anybody have any referrals to current documents that explain what was changed and how one might respond? <%= Clinton Gallagher...
by: Marc G. Fournier | last post by:
After almost 9 months of development, the PostgreSQL Global Development Group is proud to announce that development on PostgreSQL 8.0.0 has now finished, and is ready for some serious testing. ...
by: Marc G. Fournier | last post by:
After 4 weeks of work, involving alot of bug fixes, and documentation improvements, to the source tree, we have just released our 4th Beta of 8.0.0. Most of the items on Bruce's Open Items list...
by: Marc G. Fournier | last post by:
Its been almost 4 weeks since Beta4, and alot of work, involving alot of bug fixes, and documentation improvements, to the source tree, we have just released our 5th Beta of 8.0.0. All of our...
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...
by: jack2019x | last post by:
hello, Is there code or static lib for hook swapchain present? I wanna hook dxgi swapchain present for dx11 and dx9.
by: DizelArs | last post by:
Hi all) Faced with a problem, element.click() event doesn't work in Safari browser. Tried various tricks like emulating touch event through a function: let clickEvent = new Event('click', {...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.