Hacker News new | past | comments | ask | show | jobs | submit login
Dao Programming Language (daoscript.org)
99 points by copx on Aug 15, 2017 | hide | past | favorite | 26 comments



Author here, I will be happy to answer some questions.


This reminds me Stanza (http://lbstanza.org/). Do you know it and what differences would you point out ?


I didn't know it. But according the introduction in its website, the differences are very easy to spot on: the syntax is obviously different; Stanza compiles directly to native code, but Dao doesn't; Dao supports class and inheritance, but Stanza not; concurrency support is also different. The main similarity seems to be both having optional typing.


A. Is the language stable/mature enough for production use?

B. Do the concurrent features allow shared memory parallelism?

I currently use Lua if I need an embedded scripting language for a personal project and the one thing that annoys me is that Lua cannot utilize multiple cores effectively.


> A. Is the language stable/mature enough for production use?

The language is stable now in terms of features, there will be no more significant changes in the language in the forseeable future. However, the document on the website is a bit outdated, I will update it in the coming days.

As for the implementation, I cannot say for sure, but I believe it is sufficient stable now. My colleagues and I have been using Dao to develop commercial product prototype in the past half year, the only tricky problems we experienced had something to do with the wrapping of a game engine. All (no many actually) other problems are quite trivial. After solving the problems related to the wrapping, the product prototype has been working quite smoothly.

However, our use may not have covered all the features of Dao, so there could be some parts less stable than the parts we have been using. But since we are actually using Dao in real products, we are obviously obliged to make it as stable as possible:)

> B. Do the concurrent features allow shared memory parallelism?

Yes.


Is it pronounced Dow or Day-o?


Dow. It is the same word as Tao, but in the official Pinyin writing that matches its Mandarin pronounciation.


Would you please tell my brain. Every time it sees that name it insists on going "Daylight come and I wanna go home."


That makes me want to check it out more.


What's the Chinese character for Dao (if exists)?



Oh, sorry.

道: found it on the Chinese version.


Did you write the GC from scratch? How does it integrate with llvm?


Yes, I wrote the GC from scratch. I am not sure if it can be integrated well with llvm, I never thought about it. The concurrent GC algorithm (plus a single threaded incremental collector) in Dao was inspired by the algorithm proposed in http://researcher.watson.ibm.com/researcher/files/us-bacon/B....


IIRC reference counted GCs are easier to integrate with LLVM as there is no need to generate a global root set (which is one of the things that llvm makes hard).


Right, this property of reference counted GCs can make certain things simpler.

I just realized that you asked the question probably because of the LLVM-based JIT compiler for Dao. This JIT compiler actually does not deal with GC at all, it just compiles consecutive segments of VM instructions into functions that will be called by the VM. Only a subset of the total VM instructions are compilable this way. It was intended for programs with a significant amount of numeric computation.


I mostly submitted this here because Dao looks kinda interesting but I've never heard anything about it anywhere and thus was reluctant to invest time in it.

I know that the language has been around for years, though.

Has anyone here every used it?


Haven't used it either (Google suggests nobody but the author is actually using it seriously), but from a quick look it's basically a virtual machine in C, so probably competitive with Lua / Squirrel / the other dozen lightweight embedded scripting languages.

It's probably easiest to just use V8 for any new projects, it's the fastest / most maintained and the scripting API isn't really that much more complicated. Plus basically everyone knows JS these days. https://github.com/v8/v8/wiki/Getting%20Started%20with%20Emb...

Although Dao does have good concurrency/async features; V8 isn't really POSIX thread safe.

Random links which have Dao in them: http://lambda-the-ultimate.org/node/2085 https://github.com/r-lyeh/scriptorium https://stackoverflow.com/questions/2526300/list-of-lua-deri... http://lua-users.org/lists/lua-l/2009-03/msg00137.html https://developers.slashdot.org/story/13/05/29/0225227/dao-a... http://www.devtopics.com/dao-obscure-programming-language-of...


It took me a while to realize this is not the DAO from Ethereum, which incidentally, is such a (negatively) loaded name.

Maybe you should consider changing the name, at very list just so you don't get dismissed when reading the title alone in any post, newsletter, w/e.


Note: the Chinese word "dao" predates Ethereum by a very long time. I'd be more worried that it would be difficult to find since the word is so common.


How do I enable the LLVM jit? It doesn't seem to be included in the build system


You will need to clone https://github.com/daokoder/DaoJIT, and place it under dao/modules. Then edit dao/modules/makefile.dao to add:

  if( DaoMake::IsDir( "DaoJIT" ) ) modules.AddDirectory( "JIT", "DaoJIT" );
then it will be included in the building. After building, you can add "-j" option in the command line to turn on jit.

However, this module has not been tested for some time. It could be broken. It depends on older versions of LLVM, which is unfortunately not available on my laptop, so I cannot verify it now.


This has nothing to do with decentralized autonomous organizations of the blockchain world. From the page:

Dao is a lightweight and optionally typed programming language with many advanced features. It includes features that can make concurrent programming very simple. It provides well designed programming interfaces for easy embedding and extending.


Yeah, took me a minute to figure that out, too. I thought this was another EVM language.


This seems really interesting, but it looks kind of dead.

That's a shame, I'd love to get into it.

EDIT: Ignore me


Where did you get that idea?

https://github.com/daokoder/dao/ Last commit was 3 days ago

Project seems relatively active in general: https://github.com/daokoder/dao/graphs/commit-activity




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: