|
|
Label: ♦english
♦news
|
[786] Dao 1.2 Beta1 is released! |
Comment |
dao
created at Sunday, 2012-05-06, 23:37:47
dao
modified at Sunday, 2012-05-06, 23:48:33
2 Replies, 1557 Hits
After a very long time of development, the first beta release for Dao 1.2 is finally available ( http://daovm.net/download ). Though it is still a beta release, it should be considerably more robust than any previous releases. Moreover this release is considered feature complete, it includes all the features I have planned. Also it worths mentioning that the license of Dao has been switched from GNU LGPL to the Simplified BSD License.
However, the documentations haven't been updated accordingly, but you can find a few examples for the new features in the demo directory. If you have any question, please ask on the forum ( http://daovm.net/forum )
or in the mailing list ( http://daovm.net/mailist ).
This release included many new features and improvements. Here I will mention just a few of the most prominent new features:
- Abstract interface type:
An abstract interface type is like a class with only abstract methods,
which specify what methods must be implemented to be compatible with the interface.
Class instances and C data types can be matched to such interface types if only if they
implemented all the methods as specified by the interface types.
- Meta fields
Arbitrary number of objects can be associated to another object as meta fields
by operator -> in form of obj1->field=obj2 .
It can be used to do prototype based programming.
Or it can be simply used to ensure an object is GC'd after another object.
- Enum/flag/symbol type
This type is more or less a combination C++ enum and Ruby symbol.
It has the advantage of both, and can be used in situations where C++ enum
or Ruby symbol are typically used.
- Variant or disjoint union type
Variant type is a combination of two or more types in form of type1|type2|... .
A variable of a variant type can a hold value of any of the element type.
- Runtime class creation
Anonymous class can now be created in the same way as anonymous function.
- Code section methods (similar to Ruby code blocks):
Code section/block method is an alternative to functional methods in other languages such as Python. Unlike Ruby code blocks which are compiled as closure and passed as parameter(so it's essentially a syntax sugar), Dao code section is really a code section in its host function, no closure is created a runtime. When needed, the method locate the code section in the host function and run that section of codes.
Functional methods from Dao 1.1 are now replaced by a number of built-in code section methods
which are more flexible than those functional methods. Moreover, the built-in module "mt" now have a number of parallelized code section methods which make parallel programming very easy.
- Asynchronous class and future value:
Asynchronous class is a class whose instance methods will be executed asynchronously,
namely, calling a method on an instance object of such class will return
a future value immediately, and the execution will be started in different thread.
Such executions are scheduled such that only one method is actively executed
for any single object at any time, namely, multiple executions on the same object
are mutually exclusive. A future value can also be returned by the code section method
mt.start::{ code_block }. Future values can be used to schedule the corresponding threads.
- Typed function decorator:
Function decorators are functions that modify the behavior of other functions. Unlike Python
where decorator is little more than a syntax sugar, Dao function decorator can have strict
type checking so that each function decorator can only be applied to certain functions based
function type information.
- DaoJIT, a LLVM-based JIT compiler for Dao:
It can be enable from command line with option "-j".
Please see DaoJIT Tests for some testing results.
- ClangDao, Clang-based automatic binding tool:
ClangDao uses the C/C++ frontend of Clang to parse C/C++ header files and
generate proper wrapping codes for Dao. It has been used successfully to generate
a number of binding for Dao, please see http://daovm.net/projects
for a list of such bindings.
- DaoCXX, a module for embedding C/C++ codes in Dao source codes:
It is based on Clang as well. With this module one can embed C/C++ codes
as verbatim string (another new feature) in Dao source codes, then DaoCXX
will do the rest of the job to compile the C/C++ codes, and create proper interface
for Dao. Examples are available with this module.
- Many more such as:
Hash map type, Customized for-in iteration, Data serialization,
Template-like C data type, Auxiliary methods and Standard help system etc.
Please see ChangeLog
for a more complete list, and
thread/244 ,
thread/485 ,
thread/574 and
thread/639
for more information.
Comments
Pompei2 commented at Monday, 2012-05-07, 15:49:45
Pompei2 modified at Tuesday, 2012-05-08, 08:37:09
Good news!
Unfortunately, I have been too busy to participate for some time and will stay so for the foreseeable future. But I will try to do basic testing on my machines.
The first bug: the link in the download section is broken, it should be: http://dao.googlecode.com/files/dao-1.2-beta1-2012-05-06.tgz (instead of dao-lang.google...)
The second bug: in the CMakeLists.txt, around lines 140, where there is IF(APPLE), add:
IF(APPLE)
SET( CMAKE_SHARED_LINKER_FLAGS "-undefined dynamic_lookup" )
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
add_definitions(-DMAC_OSX)
endif()
ENDIF()
Third bug/request: exiting the interpreter:
When compiled with readline support, CTRL-D doesn't quit the interpreter, but it should. Without readline that works well.
In addition, the interpreter exits with a segmentation fault when I CTRL-C, but it shouldn't. On CTRL-C, I'd expect it to cancel the current line I started writing and show me an empty one, just like in bash. Or at least not crash.
With above mentioned changes, it compiles well on:
- mac os x using gcc-4.2
- mac os x using gcc-4.7 (macports)
- mac os x using Xcode
and the runs both with and without "make install" step. I might check on more systems later.
Note: The -DMAC_OSX is needed by daoMain.c in order to avoid a missing readline function.
Edit: Just tested it on my openSuSE box with gcc 4.6 and it works there too. The CTRL-C crash is present there too.
fu commented at Monday, 2012-05-07, 18:32:27
Many thanks for the bug reports. Now the link is fixed (copy&paste is really prone to mistakes).
Don't worry about not having much time to participate the development, it's totally understandable.
|
| | | 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
|