|
|
Label: ♦english
♦news
fu
created at Thursday, 2009-06-04, 00:59:18
31 Replies, 4054 Hits
Dao-1.0.1 is released!This release mainly includes: enhanced support for debugging, some bug fixings and improvements of implementation. Download: http://daovm.net/dao/download_en Comments
atai commented at Monday, 2009-07-13, 13:44:10
This language looks interesting.
Can I make some suggestion? add the keyword continue as an alias for skip because people from C expect this Also add a do { ... } while ( ...) in the manner of C
atai commented at Monday, 2009-07-13, 13:44:10
This language looks interesting.
Can I make some suggestion? add the keyword continue as an alias for skip because people from C expect this Also add a do { ... } while ( ...) in the manner of C
fu commented at Monday, 2009-07-13, 18:30:25
I will add them in the next releases.
Thank you for your suggestions.
atai commented at Tuesday, 2009-07-14, 03:14:46
In the demo program return_param.dao,
I see there is a line Test( & i ); Is this some attempt to support passing-by-reference? It does not seem to have any effect, and the documentation does not mention any such operator & for passing-by-reference...
fu commented at Tuesday, 2009-07-14, 07:09:27
Parameter passing by reference for primitive data types was supported in a few previous releases, in the recent releases, this support is limited only to C functions. I didn't mention it in documentations because I was not sure about this. I feel that it is not really needed when Dao functions can return multiple values. Supporting it for C functions just makes it simpler for wrapping and using C/C++ library, because parameter passing by reference is used in many C/C++ libraries.
atai commented at Wednesday, 2009-07-15, 04:10:16
Hi, just one more comment... in cases of similar constructs to the C language, it seems to me that it is the best to adapt the same behavior as the C counter part, if there is no other reason to prefer one choice over another... This helps with language adaption because people like familiarity.
Specific example: the switch statement in Dao differs from the C in behavior: in Dao each case statement breaks automatically instead of explicit breaks and no case following through... if there is no specific reason for this choice, would it be possible to adapt the C behavior?
fu commented at Wednesday, 2009-07-15, 22:08:21
Normally, Dao will try to have the same behavior as the C counter parts of similar constructs.
However, some differences are introduced due to some specific reasons.
For example, the switch-case statement is designed to be different, due to the fact that, in C, sometimes bugs are introduced by unintentional omitting "break" in a case block, not by accidentally adding a "break". So with the automatic breaking in switch-case statement in Dao, even if a user is used to C switch-case statement, he will not create bugs by adding explicit breaks. So I consider automatic breaking is safer than mandatory explicit breaking. Moreover, I planned to enhance switch-case statement in the following ways: 1. multiple cases as: case C1, C2, C3 : 2. case range: case 1 - 10 : So the switch-case statement in Dao does not mean to be like the one in C.
atai commented at Thursday, 2009-07-16, 05:59:41
One more comment*
dao seems to link the readline library unconditionally for now. That library is GPLed so that means program linking to it must be GPLed (note the Free Software Foundation has mentioned this several times) ... dao may want to link to it conditionally (not linking by default~ so dao can stay LGPLed. I would imagine in the majority of uses, for example, batch processing and embedding use (as an extension language) inside another application, readline is not useful.
fu commented at Thursday, 2009-07-16, 06:21:57
fu modified at Thursday, 2009-07-16, 06:32:14
Actually, I was aware of this possible problem, and had carefully avoid it.
In the released source codes, there are two files with the main function:
While compiling by simply "make" will use "daoMaindl.c", which uses the readline library, and is released under GPL. Moreover, compiling in this way does not link against the Dao library statically, instead, it uses Dao through dlopen(). If it is compiled in this way, one can see the following when run dao -v:
A simple shell for the Dao Virtual Machine. Copyright(C) 2006-2009, Fu Limin. This shell is distributed under GNU General Public License. Dao Virtual Machine (1.0.1, XXX XX 2009) Copyright(C) 2006-2009, Fu Limin. Dao can be copied under the terms of GNU Lesser General Public License. Dao Language website: http://www.daovm.net
atai commented at Thursday, 2009-07-23, 02:20:17
Does Dao support nested functions, and if so, lexical scoping?
fu commented at Thursday, 2009-07-23, 07:47:34
But, the nested function can not access the local variables of the function that contains it. If it is necessary to access the outer local variables, closure can be used.
routine test()
{ a = 1; routine nested(){ c = a; # wrong! stdio.println( 'nested' ); } nested(); rout = routine(){ c = a; # OK stdio.println( 'closure' ); } rout(); } test();
atai commented at Wednesday, 2009-07-29, 06:09:59
Does Dao support tail recurscion? I cannot find documentation on that...
fu commented at Thursday, 2009-07-30, 03:19:51
Not yet, but it will be supported soon (in the next release in august).
Actually I have planned to implemented it long time ago, but then it slipped my mind due to other work, until you remind me of it by this comment:).
ybabel commented at Tuesday, 2009-08-04, 08:01:22
Hello,
I find DAO very interresting. A nice language, an IDE, and now QT bindings ... What's the roadmap for the next releases ? How does it compare to main scripting language like LUA, Python, Ruby ?
fu commented at Tuesday, 2009-08-04, 18:49:01
fu modified at Tuesday, 2009-08-04, 18:49:37
Thank you for your comments.
At this moment, I only have a clear plan for the next release which will come out this month. I haven't set a roadmap for the releases after that, mainly because I am not sure how much time I will have. Generally, what I planned to do is listed here: http://www.daovm.net/dao/faq_en#6 . As you can see, some are done. I think after the next release, priority will be given to developing tools, modules and packages, so changes to the language will be minor. The next release will include several improvements suggested since the 1.0 release, including:
I always find it hard to answer question like comparison to other languages:), let's simply put like this, Dao is oriented somewhere in between of Lua and Python, Ruby, with good efficiency, it will try to avoid introducing too many complexities as in Python and Ruby, but certainly offer sufficient features. To mention somethings that are different in Dao from these languages, Dao has a more interesting typing system and a more powerful macro system than they do. And I personally believe the C interfaces of Dao are better than the C interfaces of them, as it can be seen from how easily binding to Qt4.5 and other libraries were built;). The season that it is simpler to build bindings for Dao is also partially due to the typing system Dao has.
ybabel commented at Wednesday, 2009-08-05, 14:27:54
So the goal is bio informatics ! GREAT :-)
Which means, graph, 3D, and a powerful IDE and language. So I'm eager to see the result. It's a lot of work to create all of this nearly from the ground-up !
It's been a long time I'm searching such a tool. At first I was curious about DAO macro system, because it's more easy for end user to handle a DSL, and I don't wanted complex system to develop new languages. Then I was seduced by the clean and beatiful code. After that I was amazed by the IDE. I can assure you that no other language have theses qualities. I've spent much time to find one matching theses criterias. So, congratulations, great work, and long live DAO :-) Will you develop the IDE with QT and DAO itself ? it would be great to have it all integrated and easily scriptable.
fu commented at Thursday, 2009-08-06, 05:27:52
Will you develop the IDE with QT and DAO itself ? it would be great to have it all integrated and easily scriptable.
Yes, this is something in my mind to do, but not in the highest priority. I need to find time for this (or to find somebody who knows well Qt and is willing to take it over).
atai commented at Thursday, 2009-08-06, 17:53:48
Trying to be samiliar to C-like languages with exceptions, such as Java, can "catch" be an alias for "rescue" in try { ... } rescue ( ... ) { ... }
fu commented at Thursday, 2009-08-06, 18:25:59
Right, it will be included as well. "catch" is also used in C++, so it worth to be there.
atai commented at Friday, 2009-08-07, 18:12:31
Hi, it seems Dao supported pass by reference before (as mentioned in earlier posts). While there may be difference views on whether pass by reference or returns via touples is better, if the cost to system performance (overhead) is not high (I assume the code is in there just disabled somehow), why not supporting both?
Perl 6 seems supporting pass by reference as part of the core design.
fu commented at Saturday, 2009-08-08, 04:34:01
The main reason that I excluded parameter passing by reference (for simple/primitive data types) was that,
I changed to use a memory more efficient way to store simple data, in this storage scheme, passing reference of simple data has become difficult. I had an implementation of passing reference, but the implementation was too ugly and introduced much overhead, so I abandoned that implementation.
Passing local variables as references to C functions can be implemented in a simple way, that's what is done currently. Passing local variables as references to ordinary Dao functions could also be done in a similar and simple way, but I am not sure if it is good idea to support something in a limited way. I need to think of a better way for supporting this.
atai commented at Wednesday, 2009-08-12, 23:20:55
In Dao it is Pascal style
name : type ; instead of type name ; as in C. This seems to make Dao a mixture of Pascal style and C style. Is this choice intentional (easier to parse the Pascal style declaration) or just historical? I guess if Dao is of a totally new design today it would follow a pure C style or a pure Pascal style instead of a mixture.
fu commented at Thursday, 2009-08-13, 05:43:49
This choice was partially historical and partially intentional. In the beginning, Dao did not support explicit variable types, when I started to implement the optional typing feature, I found it was simpler to parse Pascal style.
However, the more serious reason was from the consideration of type names for functions and tuples. In Dao a function type could look like this,
routine<a:string,b=int>=>float
which is more close to the following function prototype that it represents,
routine test( a : string, b = 123 ) => float
So as you can see, the fact that parameter "b" has a default value of integer is nicely represented in the type name. With C style, the type name may have to be,
routine<string:a,b=int>=>float
which do not look very reasonable.routine<string:a,int=b>=>float Similarly for tuples, a tuple is something like this,
t = ( name => 'Mike', index => 123 )
A type name like,
# or: t = ( name : 'Mike', index : 123 ) in some other languages
tuple<name:string,index:int>
would look more natural. Pascal style looks more consistent to this.There are also other places (parameter passing by names, class instance construction by initializing members by names) where syntax such name=>value is used. So declaring variable type by name:type looks more consistent with them too.
atai commented at Thursday, 2009-08-13, 17:02:42
Dao's static type system does look very powerful. It enables interesting possible reasoning based on the type data rarely possible in other languages ...
atai commented at Thursday, 2009-09-03, 00:29:21
hoping we can see the next release soon...
fu commented at Thursday, 2009-09-03, 07:09:38
The implementations for this release is done, I just need to do a few more tests, and update the documentation before releasing it. Within two weeks, you should see the new release:-)
It is delayed because I implemented some improvements that were not planned. One improvement might actually be interesting to you, that is, the parameter passing by reference, which was actually a by-product included when I changed parts of the internal data storage and accessing methods to fix a few bugs. Another by-product is the constant parameters specified by "const" keyword.
atai commented at Thursday, 2009-09-03, 17:27:15
reference parameter and const parameter: Wonderful!
atai commented at Thursday, 2009-09-17, 09:18:19
Hi, I guess the answer is true, that Dao supports multiple VMs in the same process, but just to make sure, that Dao allows multiple interpreters embedded in the same C program and process, right?
This should give Dao advantage over Ruby or Python which suffer from a global lock.
fu commented at Friday, 2009-09-18, 01:59:45
if the interpreter is compiled with multi-threading enabled.
atai commented at Wednesday, 2009-11-11, 18:35:48
seems to be a subset of what Dao provides, language wise. Maybe it is time to write a comparsion between Go and Dao...
neilhhw commented at Sunday, 2009-11-29, 05:25:49
傅兄辛苦了,Dao语言和那些库和其他库的绑定就是你一个人开发的?太不容易了!有你的邮箱吗?咱们交流下,呵呵~
|
fu: Many thanks (Jul.04,04:29) klabim: fixed Hi, great, now my test works now :- ). (Jun.30,17:51) Nightwalker: Few suggestions (Jul.03,14:37) |