Dao, a New Programming Language Supporting Advanced Features With Small Runtime
New submitter NeoHermit writes "This language (Dao) has never been mentioned on Slashdot before, but it might be interesting to many people here. As it has recently become feature-complete and just made its first beta release, it may be the right time to mention it here. Dao is an optionally-typed programming language that supports many advanced features with a small runtime. The feature list is probably as long as that of Python, but they are supported by a much smaller runtime (somewhere between Lua and Python, but closer to Lua). Besides optional typing, the other major features that worth mentioning include: built-in support for concurrent programming for multicore computers, very friendly C programming interfaces for embedding and extending, a LLVM-based JIT compiler, a Clang-based module for embedding C/C++ codes in Dao, and a Clang-based tool for automatic binding generation from C/C++ header files. You can also see many familiar features from other languages."
It's basically Go with fewer features, next!
Monstar L
Just what we need, yet another beta language with subset n of the hot new features de jour. wait up man, I haven't finished python, scala, groovy, golang, dart, the new C++ spec, and oh yeah C, since its now back in style, yet...
If not, then it is just another fail, as functional programming styles are not supported. From the web-page, it seems it is indeed just another failure.
If they had either, it would be a significant step in the right direction. Optional typing is definitely highly desirable.
Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
This language (Dao) has never been mentioned on Slashdot before, but it might be interesting to many people here.
A pretentious name? (ears perk up) Go on...
Dao is an optionally-typed programming language
ARRRRGH! Comeon guys, type casting is so important even answers.com has a bloody writeup on it. Strousoup is right now spinning in his grave so furiously I'm sure it's causing a small earthquake right now on some pacific island...
that supports many advanced features with a small runtime.
Runtime? So it's like Java then... it's interpreted. Ooookay, well, I suppose runtime languages have their place amongst the honored...
The feature list is probably as long as that of Python
And already we have our first example of why type casting is important: The programmer/submitter here isn't sure what the feature list of the language is, because everything is represented as an abstract object. /snark
Built-in support for concurrent programming for multicore computers,
I'm not entirely sure what that even means. Does it support threading? Is it stackless? Are you talking about the ability to set processor affinity for a given thread or process? "concurrent programming" to me could even mean using two keyboards.
very friendly C programming interfaces for embedding and extending, a LLVM-based JIT compiler, a Clang-based module for embedding C/C++ codes in Dao, and a Clang-based tool for automatic binding generation from C/C++ header files.
So basically, your language is incomplete so you're giving people the ability to link in stuff to makeup for it. Okay, that's cool... I guess.
Well kid, I'm sorry your parents named you Dao. Like all parents, I'm sure they expect great things from you. Unfortunately, it seems you're suffering from a rare birth defect where half your brain is missing and you're a midget. You're also cojoined to your twin, who they named 'C'. Now they're going to try surgery soon to separate you from your twin bro, but I'm gonna be honest here: You're probably not going to make it. Sorry kid, tough break.
#fuckbeta #iamslashdot #dicemustdie
if it can't then its 2/3 useless
Have fun designing programs that manipulate massive amounts of state with functional programming style. Given that nobody has figured out how to do a first person shooter with a functional langauge, makes me suspect that they aren't the one answer to every problem. In fact even a relatively simple game is quite awkward in a functional style.
I guess you can't solve every problem with lambda calculus and retain your sanity.
So if Dao is optionally typed, what are the other programming input options? Voice input? Graphical point n click input?
It won't be feature complete until the runtime is a bloated mess of 15 year old code. Any 'new' language is most certainly feature incomplete until it's been around the block long enough for people to have a clear understanding of what's missing.
Why would someone want to use this language instead of an established language? So there is a feature list. Is there something there that is compelling enough to leave an established language community?
A language alone has little value. It's the community / ecosystem that makes it worthwhile.
How about zero!
WTL is an open-source C++ framework for creating Windows applications that typically require no installation, no runtime whatsoever, and generally compile to an exe less than 100K in size!
Slashdot.insertathead(slashvertisement)
or whatever the syntax is.
"Yet Another Pissant Programming language". Can we quit pretending that "new is better" and just use the stuff that actually works?
A Chinese ripoff of Go.
Cool.
I don't have any numbers, but I'm pretty sure anything with an LLVM JIT shouldn't have a "small runtime" as its headline feature. LLVM is a fantastic tool, and a minimal use of it isn't huge (or even big) by most standards, but using an off the shelf JIT compiler really shouldn't make you celebrated for a small runtime.
Anyway, looks like it has some implicit type conversions (I saw a float to int in an example), and optional typing. I prefer explicit conversions and explicit typing (like Go has for example). I also prefer statically compile languages.
As for the feature set, I don't see anything about generics, templates or meta-programming, but at least theres some something that looks like Java generics on one of the build in map classes in an example.
It seems to have good closure support, and looks good at wrapping/calling C and C++.
Does anyone know of an example generic collection in Dao? That is the one thing I'd like from Go thats its not very good at, so I'm always on the lookout for how languages solve that.
Anyway, it seems like a usable language, which I have no reason to use, and several reasons not to (JIT, lower readability than Go among other things). Their promotion fails to provide anything I miss in Go, or Python.
Sure, it might be better at some things than C++ (it can call C++, and has closures, and other nice things in a garbage collected environment), but I don't use C++ because its a good language: I use it because I have to.
I think I'll learn Rust and Haskell before bothering with Dao (AKA, most likely I won't get to it). They look interesting but I see nothing in Dao, except perhaps for being good at calling into C, that interest me, and I can call into C great from C, Go, Python, C++, and Rust if I learned it, and apparently as of 2010, Haskell.
New language: big feature, not too bloated JIT, and can call C and C++ code easily. So? Why should I care?
Apparently it has an extensible syntax (I generally see that as a bad thing) and garbage collection, and nice scripting language like syntax. Perhaps it would be good for creating domain specific languages to control your C++ code? Thats the only real use case I see, but its competing with exiting python tool chains for that, as well as Lua. Not to mention I'm not really sure if thats something worth doing.
Go is good for servers. Whats Dao good for?
Have gnu, will travel.
Yet Another Programming Language
Looking at sample code, Dao looks very similar to Matlab, especially with lists/cells, vectors, matrices, and loops. The biggest differences are: a closing brace instead of "end" and routine instead of function.
They're going to need a new name though, because searching for anything returns the Microsoft Data Access Object.
It should be called DOA, not Dao.
I was at first intrigued by the summary, but then it got worst and worst as I saw the examples. Semi-colon statement rules in the Pascal tradition? Ugh.
I thought the word that is pronounced "Dao" is spelled as "Tao", meaning "the Way". So, what is a "Dao"?
CREMATE HIM!
As the dustmen say: 'It's the only way to ensure he meets the Final Death.'
First time I've seen Chinese contributing to an open source project without being chased by the FSF. Instead of contributing to an existing open source language they are creating a new one with a ... Actually the guy is in a US university. Oh well. I'll keep waiting.
Its going to get a lot of traction in the Philippines as my IP (assigned by a major local telco) is banned from the site
Dao doesn't seem to have "optional typing", it seems to have a choice between static and dynamic typing.
Could we have someone, maybe an editor, tighten up the summary a bit? Here's what I see: /." : 3
idea : # times it occurs
"Let's mention this on
"It's done" : 2
small runtime : 2
features : 3 (plus that laundry list of actual features)
Instead, let's try this:
"The Dao language has recently made its first beta release, and we think you Slashdotters will Eff'ing love it. Dao is an optionally-typed programming language that supports many advanced features (probably as many as Python ) with a small runtime (closer to Lua than Python). Besides optional typing, Dao also has built-in support for concurrent programming for multicore computers, very friendly C programming interfaces for embedding and extending, an LLVM-based JIT compiler, a Clang-based module for embedding C/C++ codes in Dao, and a Clang-based tool for automatic binding generation from C/C++ header files."
See? That wasn't so tough, probably took 5 minutes, and is much more readable....
Is a new language really what we were waiting for ? I seriously doubt it. Existing languages already do, or are capable to do, the most exotic things for us. I look at it from a software architect's viewpoint: what we need is not yet another language, we need new design and programming paradigms. Like, for example, people in the place I currently work for reacted enthusiastically upon the BDD ( Behaviour-Driven Design ) idea; most of the somewhat older engineers had never heard of it. We need new ways and schools of thought, resulting into what already happened and has been happening in other engineering domains for a long time: the hiding of complexity. IMHO, Dao does not contribute toward this goal. Certainly, as in intellectual and engineering exercise, the creation of a new programming language is interesting. Nowadays, such compiler- / interpreter-construction exercises are within the reach of any graduate student. It does not, however, reach into the heart of many of the "wicked problems" with which engineers in real life are confronted.
Religous speak to God. Insane are spoken to by God. When all shut up, one can finally hear Shostakovich in peace
Daylight come and me wanna go home.
Okay, so here is my uninformed opinion and some free unsolicited advice ;-)
First of all, some people here are just too defeatist. Yes, it looks a lot like Go and has only few exceptional features, but it's certainly not the worst programming language I've ever seen and e.g. seems to be overall better than Python - if we ignore, for the time being, the external library support which makes Python so great. I agree with others that optional typing is a bad idea, though. Many optimizations will be hard to implement in future and loose typing should be explicit (as e.g. in polymorphic types).
Since I'm sort of a hobby programming language enthusiast, working on my own toy language in my spare time, there is one annoying thing I must mention, though. Why do so many contemporary language designers choose C-style syntax and not Algol/Pascal/Ada style? Just because they know C best? All of these C-clones, each of them with their own little quirks and specialities, don't really make the syntax more compelling or easier to read. (It would be okay if they behaved exactly like C, I guess, but then they wouldn't be languages on their own.) Why not go for block-style syntax or the Python wite space route instead?
Take a look at Ada, for example. Yes, I know, the syntax is verbose and has to many double-uses of keywords. It is a bit archaic. However, on the bright side, Ada programs really are extremely readable. You can easily scan through GNAT's source code and understand how the packages work without looking at additional documentation! I'm not saying, "Hey, let's all switch to Algol-style syntax", and not everybody likes the way Python deals with white space either, but a little bit more variation would be nice.
Which brings me to another issue. If you invent a new language, please make sure twice already in the design phase that it can be optimized later. Nothing is more annoying than an overall nice language that also becomes popular, only to turn out to be basically unoptimizable later. If a function has no side effects, if a data structure is immutable, if instructions or data structure traversals can be executed in parallel, please give us a way to indicate that within the language unless it can be inferred automatically. At least in theory, a new programming language ought to be capable of being as fast as C[1], Fortran, or Ada. Otherwise you could just save yourself lots of trouble and translate it to C++ or SBCL right from the start...
Footnote [1]: To be taken with a grain of salt. Arguably, C is the the first in the list only because of extensive compiler optimizations not because of its language features.
YABL. Come on, people, really?
Unsafe arrays.
Forced-indexing into arrays.
Not interested.
The scourge of software development is the number of languages, and the Balkanization of an industry that used to have standards. I think that we have enough languages with C, C++, Java, C#, Objective-C, Perl, Python, Ruby, PHP, JavaScript, REXX, LISP, Haskell, Clojure, Lua, R, Ruby, Dart, Go, etc (the full list would go on for days) and all the reinvented wheels in each language for database access, MVC, etc. Being a software developer these days is cognitively difficult because these languages are all the same, but different. They share superficial syntax similarities, but they all do the same thing in a different way. (As an exercise, list the different ways to get the length of a string in different languages.) I often know exactly what I want to do, but have trouble remembering how to do it in any specific language.
There are 2 problems: Each vendor wants to Balkanize the world with their own languages. (Microsoft=C#, IBM=Java, Apple=Objective-C, etc.) And, everyone in open source wants to be the next Larry Wall or Guido and start a new language rather than work to improve existing ones.
and let me assure you, when we were bullseyeing wamprats, there wasn't no goddamn virtual machine. just you and the trigger and beggar's canyon. that was it. and if you bought the farm? well, we poured out a 40 at your funeral, but we didn't put any flowers on your grave.
this is worse than dogs and cats living together.
Is the code cromulent? Does it have a cromulator?
Not because it's a bad language. It may be great. The fact is that nobody... I mean *nobody* needs one more obscure little language whose wondrous new features would just be another add-in library in C++. This is a mental masturbation tool for the Mom's basement crowd. Nothing more.
Please do not read this sig. Thank you.
n/t
you had me at #!
I agree with your conclusion that too many people don't know what they need code to do. I disagree on optional typing. For large applications I think typing is necessary, but for small things it really can get in the way and slow things down.
For simple data processing apps I like Python because a=5 is automatically an integer and b=2.5 is automatically a float, I don't need or want to include type information on every variable - particularly temporaries with intermediate results (cause it looks like shit inline and I don't want to go back to top and declare them). I totally agree that this is lazy programming practice, but again I think it's appropriate for small throw-away programs or prototypes. OTOH in those cases a compiler could infer the type of an expression if the types used in that expression are already known. Why isn't this done?
In a CAS, the matrix multiply, for example, just needs to add and multiply values from elements in the matricies. It doesn't care what types they are.
Of course it cares. All elements of each matrix need to have types such that the operations A * B = C and C + C = D are defined. The common case is that all the elements are of the same type, and this type is a ring. Otherwise, should the entire matrix multiplication fail, or should individual elements be undefined? But you're right that these types don't necessarily have to be explicit. This looks like a good application for inferred static typing, as in ML-family languages.
The way it's proposed that it will work is that you define (e.g.) a number concept, which encapuslates the idea that +,-,*,/ and perhaps exp and log are implemented.
By "number" do you mean "element of a field"? Matrices of appropriate size support +, -, and *, but generally not / without (expensively) computing an inverse. Vectors support + and - with vectors of like size, and * and / with a scalar on the right side. But there are several different interpretations for vector * vector: "scaling", which is elementwise multiplication; "dot product", or sum of scaling; and "cross product", used for finding an orthogonal vector, which isn't binary unless the vectors are of length 3.
You then write the code, and it checks the code against the concept
What's the difference between a concept and what Java calls an interface?
Concepts generally make heavy use of overloading, so, for example, numeric algorithms all look like numeric algorithms.
Even though Java doesn't translate operators into method calls, a lot of other languages do, such as C++ and Python. Those could be included in a concept/interface.
Crucially, concepts provide retroactive modelling, so that anything which fits the right concept is an example of the concept: there is no need to go and make sure the type is derived from the right interface.
Is this supposed to be analogous to the difference between nominative typing and duck typing?
The big difference however is that a concept is more than just a list of methods that a type supports. You can essentially include a much more detailed list of predicates
I'm still not understanding what sort of predicate cannot be expressed as implementing a particular method.
for instance that it must be incrementable
A type that supports the "increment" method is incrementable.
must be dereferencable, the derference type must be addable to any numeric type
A type that supports a "dereference" method that returns an object whose type implements the appropriate "numeric" concept/interface would satisfy this predicate.
Um, it seems to me that the reason why Dao exists is because it has better support in the Chinese-speaking community than any other language; i.e. it solves the "not invented here" syndrome. Given things like the DragonChip project and the focus on making China more independent of the outside world, if anything I'm surprised it took so long for a major language to come from that region.
Am I the only one to notice this, or does everyone things languages just appear, and aren't developed by real people with various affinities and psychological motivations?
Even if you're referring to a "freestanding" implementation of C without most of the standard library, the runtime still needs to clear uninitialized statically allocated variables to 0 (for numeric types) or (void *)0 (for pointer types) before calling main().
I don't know the first thing about Dao, but I'm always interested in any environment that makes embedding/extending easier. When you're working with a 15 year old code base, it's a lot cheaper to embed existing libraries into a new system than it is to re-write them. (Or, add new capabilities to a old system via extending).
Alas, there has never been a language where this capability doesn't end up being an absolute CM nightmare.
In the course of every project, it will become necessary to shoot the scientists and begin production.
dao means knife in Chinese, but why the name? Is it because it is cutting edge?
Every time I see the word "codes" in the documentation, I throw up a little. It's an otherwise decent documentation, but man, does it have to reuse the language wart that makes us laugh and cry so hard at the clueless "show me teh codes" posts on the forums?
A successful API design takes a mixture of software design and pedagogy.
For interfaces it would require everything to be derived from ConvertibleToBool, which requires everyone to agree in advance which interfaces to use.
In C++, this would be "implements operator bool()"; in Python 2, this would be "implements __len__() or __nonzero__()". Again, the difference is that concepts can be imposed on existing third-party code.
Maps would allow you to use a vector as a stack without writing and using a wrapper class.
Then what would be the practical difference between a concept map and a (templated) wrapper class that either extends or contains the type being wrapped? I'm just trying to figure out how concepts could be implemented in existing languages.
I understand that when working on large projects, especially with mediocre programmers, you may want to restrict the number of tools available. That's fine; but that belongs in your firm's coding guidelines, not the language spec. If they can't or won't follow those guidelines, then either fire them or write a tool to automatically catch disallowed constructs.
Forcing all programmers to do extra work to minimize the damage done by incompetents is a horrible, horrible paradigm and keeps us locked into the vicious cycle of minimalistic==>expressive==>minimalistic-again programming languages.
The Tao of Dao!
Sure enough, the cow costume was hanging up next to the superhero outfit and sailors uniform. (S,Spud)