Jump to page: 1 2 3
Thread overview
MiniD dsource project set up
Jun 26, 2006
James Dunne
Jun 27, 2006
James Dunne
Jun 26, 2006
Rémy Mouëza
Jun 26, 2006
Rémy Mouëza
Jun 27, 2006
Kashia Buch
Jun 26, 2006
clayasaurus
Jun 27, 2006
Boris Wang
Jun 27, 2006
James Dunne
Jun 27, 2006
Rémy Mouëza
Jun 28, 2006
clayasaurus
June 26, 2006
Link: http://www.dsource.org/projects/minid

== What is MiniD? ==

MiniD is a statically-typed, object-oriented scripting language based on D and designed with D in mind as the host language.  It takes some features from other scripting languages as well, such as static closures, generators, and coroutines.  One of the main ideas behind making it D-based is an almost seamless integration of scripting into the host program, so that native code can very easily call script code and vice versa.

== How far along is it? ==

It's mostly just a grammar and some language specs right now; however, there's a reference compiler in the works which does the lexical and syntactic passes, and has the beginnings of the semantic pass as well.  It can be found into the repo.

== Is it open?  Licensing? ==

It's open.  Licensing?  It could be public domain for all I care.  If some of you more experienced OSS'ers have some comments on that, or if I should use something else (like zlib or MIT license), I'd like to hear it.  In fact, if someone wanted to bring it up on the MiniD forum on dsource, that'd be great.

The development is also open.  I'd love to hear any ideas and suggestions for features and other areas of development.

== Why MiniD? ==

It started as a sort of for-fun project, but eventually developed into something of a learning project.  I wanted to see what it was like to design and implement a compiler and VM.  Maybe I'll end up with a language that people want to use; maybe not.  In any case, it's my idea that perhaps by offloading things like typechecking into the compiler, the VM will be somewhat faster.  Maybe.  I hope :)


June 26, 2006
Jarrett Billingsley wrote:
> Link: http://www.dsource.org/projects/minid
> 
> == What is MiniD? ==
> 
> MiniD is a statically-typed, object-oriented scripting language based on D and designed with D in mind as the host language.  It takes some features from other scripting languages as well, such as static closures, generators, and coroutines.  One of the main ideas behind making it D-based is an almost seamless integration of scripting into the host program, so that native code can very easily call script code and vice versa.
> 
> == How far along is it? ==
> 
> It's mostly just a grammar and some language specs right now; however, there's a reference compiler in the works which does the lexical and syntactic passes, and has the beginnings of the semantic pass as well.  It can be found into the repo.
> 
> == Is it open?  Licensing? ==
> 
> It's open.  Licensing?  It could be public domain for all I care.  If some of you more experienced OSS'ers have some comments on that, or if I should use something else (like zlib or MIT license), I'd like to hear it.  In fact, if someone wanted to bring it up on the MiniD forum on dsource, that'd be great.
> 
> The development is also open.  I'd love to hear any ideas and suggestions for features and other areas of development.
> 
> == Why MiniD? ==
> 
> It started as a sort of for-fun project, but eventually developed into something of a learning project.  I wanted to see what it was like to design and implement a compiler and VM.  Maybe I'll end up with a language that people want to use; maybe not.  In any case, it's my idea that perhaps by offloading things like typechecking into the compiler, the VM will be somewhat faster.  Maybe.  I hope :) 
> 
> 

A cool project!  I'm also developing my own language.  A few quick notes after browsing through the docs on Trac:

1) Fix /wiki/LanguageSpec/Lexical section after Tokens, a sentence is broken.

2) With the escape sequences in string literals, how would I go about putting the number one after an ASCII character #1? \11?

3) Good to see the ability to define binary integer literals; they're immensely useful

4) Multiple setter functions allowed for properties (and seem to be required to have at least one) but only one getter function is allowed and is optional?  Why is this?

5) Regular assignment on /wiki/LanguageSpec/Expressions:  Is it a good idea to treat x = obj.prop = 4; as two separate expressions?  You're sort-of violating the general rule to not evaluate the property more than once.  Why not have the implementation of the setter functions return the value that was set?

6) Operation assignments: you don't state that you're going to check for the same setter/getter function call signature for a property, you just say that the property must have them both set.

7) So custom defined objects cannot be passed in varargs functions?

I would recommend renaming 'def' to 'local', just as it's more aesthetically pleasing to me.  Also, why do you have the 'def' keyword as the starter to function parsing in addition to global variable parsing, would you not use a separate keyword 'function' for that?

It would be nice to have generics implemented in a scripting language :)

-- 
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/MU/S d-pu s:+ a-->? C++++$ UL+++ P--- L+++ !E W-- N++ o? K? w--- O M--@ V? PS PE Y+ PGP- t+ 5 X+ !R tv-->!tv b- DI++(+) D++ G e++>e h>--->++ r+++ y+++
------END GEEK CODE BLOCK------

James Dunne
June 26, 2006
In article <e7ngne$a46$1@digitaldaemon.com>, Jarrett Billingsley says...
>
>Link: http://www.dsource.org/projects/minid
>
>== What is MiniD? ==
>
>MiniD is a statically-typed, object-oriented scripting language based on D and designed with D in mind as the host language.  It takes some features from other scripting languages as well, such as static closures, generators, and coroutines.  One of the main ideas behind making it D-based is an almost seamless integration of scripting into the host program, so that native code can very easily call script code and vice versa.
>
>== How far along is it? ==
>
>It's mostly just a grammar and some language specs right now; however, there's a reference compiler in the works which does the lexical and syntactic passes, and has the beginnings of the semantic pass as well.  It can be found into the repo.
>
>== Is it open?  Licensing? ==
>
>It's open.  Licensing?  It could be public domain for all I care.  If some of you more experienced OSS'ers have some comments on that, or if I should use something else (like zlib or MIT license), I'd like to hear it.  In fact, if someone wanted to bring it up on the MiniD forum on dsource, that'd be great.
>
>The development is also open.  I'd love to hear any ideas and suggestions for features and other areas of development.
>
>== Why MiniD? ==
>
>It started as a sort of for-fun project, but eventually developed into something of a learning project.  I wanted to see what it was like to design and implement a compiler and VM.  Maybe I'll end up with a language that people want to use; maybe not.  In any case, it's my idea that perhaps by offloading things like typechecking into the compiler, the VM will be somewhat faster.  Maybe.  I hope :)
>

Sorry, I don't want to be offensive, but I don't see lots of "interest" of doing a scripting language so close to D, althought without adding any "new" stuff that are typical of dynamic language.

The way I see it : D has lot of strength and weaknesses. What about doing a dynamic language that would make a kind of balance by supporting features that would releave D where it kind of fails ? From what I have seen, this is not what MiniD is planning to do. And maybe it is not what you intended to do.

First, I would either leave the strongly typing system for something more dynamic ( more like scripting language ), or keep it strong but would make much more type inference, going beyond what D is doing, something looking like Nemerle.

Second, I would implement some symbolic stuff or some kind of reflection to manipulate the type system or make something like meta object protocol to be able to programatically transform the MiniD programs. This could allow for aspect oriented stuffs and more.

Actually, I think that I am too demanding with a for-fun project. Maybe I should keep quiet and implement my own Pythonish/Smalltalkish language in D.

Anyway, D is a high level programming language, with features closed to dynamic languages and high performance. I think it's the language of choice to implement a scripting language. The more scripting language implemention we'll have, the best we'll be able to prove it.

MiniD is a good idea. Good luck !





June 26, 2006
Jarrett Billingsley wrote:
> Link: http://www.dsource.org/projects/minid
> 
> == What is MiniD? ==
> 
> MiniD is a statically-typed, object-oriented scripting language based on D and designed with D in mind as the host language.  It takes some features from other scripting languages as well, such as static closures, generators, and coroutines.  One of the main ideas behind making it D-based is an almost seamless integration of scripting into the host program, so that native code can very easily call script code and vice versa.
> 
> == How far along is it? ==
> 
> It's mostly just a grammar and some language specs right now; however, there's a reference compiler in the works which does the lexical and syntactic passes, and has the beginnings of the semantic pass as well.  It can be found into the repo.
> 
> == Is it open?  Licensing? ==
> 
> It's open.  Licensing?  It could be public domain for all I care.  If some of you more experienced OSS'ers have some comments on that, or if I should use something else (like zlib or MIT license), I'd like to hear it.  In fact, if someone wanted to bring it up on the MiniD forum on dsource, that'd be great.
> 
> The development is also open.  I'd love to hear any ideas and suggestions for features and other areas of development.
> 
> == Why MiniD? ==
> 
> It started as a sort of for-fun project, but eventually developed into something of a learning project.  I wanted to see what it was like to design and implement a compiler and VM.  Maybe I'll end up with a language that people want to use; maybe not.  In any case, it's my idea that perhaps by offloading things like typechecking into the compiler, the VM will be somewhat faster.  Maybe.  I hope :) 
> 
> 

If you use zlib/png license, then you can freely borrow code from the Squirrel project (with acknowledgment of course), and commercial applications can freely use it. :)

June 26, 2006
Rémy Mouëza wrote:
> Actually, I think that I am too demanding with a for-fun project. Maybe I should keep quiet and implement my own Pythonish/Smalltalkish language in D.

I guess there's not much use to make yet another scripting language unless it's a for-fun project. You might want to try Ruby. It has many features in common with D. I'm not sure if someone has already made an attempt to implement a Ruby interpreter in D.
June 26, 2006
In article <e7pe35$1ote$1@digitaldaemon.com>, =?ISO-8859-1?Q?Jari-Matti_M=E4kel=E4?= says...
>
>Rémy Mouëza wrote:
>> Actually, I think that I am too demanding with a for-fun project. Maybe I should keep quiet and implement my own Pythonish/Smalltalkish language in D.
>
>I guess there's not much use to make yet another scripting language unless it's a for-fun project. You might want to try Ruby. It has many features in common with D. I'm not sure if someone has already made an attempt to implement a Ruby interpreter in D.

I've tried to learn Ruby several times, but I did not manage to get really interested and keep going mainly because it has all the good things I like in Python ( and even code blocks à la Smalltalk ) but seems to have a little less clear syntax. It made me stick to Python. And D of course.

As I know Python more than Ruby, maybe I should look forward using PyPy to
implement a Python interpreter in D.
The problem also is that I want to do too much things... and don't have time to
do them all.


June 26, 2006
"James Dunne" <james.jdunne@gmail.com> wrote in message news:e7p9b3$1cps$1@digitaldaemon.com...

> 1) Fix /wiki/LanguageSpec/Lexical section after Tokens, a sentence is broken.

I'd fix it but I can't find any broken sentences.  Perhaps you meant the second sentence?  Maybe I should put quotes around the "...", since that means the D vararg token.

> 2) With the escape sequences in string literals, how would I go about putting the number one after an ASCII character #1? \11?

\0011 - The decimal escapes can only be three characters long, so it will suck up \001, and then the next 1 will be the next character.

> 3) Good to see the ability to define binary integer literals; they're immensely useful

I've found them to be as well :)

> 4) Multiple setter functions allowed for properties (and seem to be required to have at least one) but only one getter function is allowed and is optional?  Why is this?

Setters are optional, but multiple are allowed.  I'm also thinking of enforcing the rule that if there are any setters, at least one must take the same type of the property (so if you have an int property, and you have setters, there must be one that takes an int, but all the rest can be whatever).  You can only have one getter because of function overloading - getters are defined as something like "<proptype> __get()", and of course you can't overload based on return value.  It's optional in case you need a write-only property (for whatever reason).  So you can have read-only properties by only having a getter; write-only by only having setters; and read/write by having both.

> 5) Regular assignment on /wiki/LanguageSpec/Expressions:  Is it a good idea to treat x = obj.prop = 4; as two separate expressions?  You're sort-of violating the general rule to not evaluate the property more than once.  Why not have the implementation of the setter functions return the value that was set?

I'm not real fond of that either, and that part might change.  I suppose it'd be fine to allow property setters to return values so you can chain property assignments like this, but _personally_ I find assignment chaining to be in _bad taste_ ;) and so might disallow chaining property assignments altogether.  But that might be a little too draconian for some people.

> 6) Operation assignments: you don't state that you're going to check for the same setter/getter function call signature for a property, you just say that the property must have them both set.

If a writeable property is enforced to have one setter that takes the same type as the property as mentioned above, then this can work.

> 7) So custom defined objects cannot be passed in varargs functions?

No, they can - you use the .asObject() member of the vararg and then cast down to your class type.  All classes will inherit from Object, like in D (yet to write the class spec).

> I would recommend renaming 'def' to 'local', just as it's more aesthetically pleasing to me.

I tried local, but then that doesn't make sense for global variables.  I wanted something short and unambiguous.  'def' seemed to fit the bill, despite being a bit .. reminiscient of Lisp?  Oh well, it ended up being Python-esque anyway.

> Also, why do you have the 'def' keyword as the starter to function parsing in addition to global variable parsing, would you not use a separate keyword 'function' for that?

'def' begins all variable and function definitions except for function parameters where it's unambiguous what's expected.  I did acually have "function" start function declarations before, but with functions that _returned_ functions, it started getting really funny-looking:

function void function() foo() { }

I also had some grammar ambiguities when using "function" to begin functions when dealing with function literals.  As of now, "function" is _just_ used for the type, and it's nice that way.

> It would be nice to have generics implemented in a scripting language :)

It would be TERRIBLE to have generics in a scripting language ;)


June 26, 2006
"Rémy Mouëza" <ray.jay.ay.moueza@DoNtSpAm.gmail.com> wrote in message news:e7p9ui$1eoh$1@digitaldaemon.com...

> Sorry, I don't want to be offensive, but I don't see lots of "interest" of
> doing
> a scripting language so close to D, althought without adding any "new"
> stuff
> that are typical of dynamic language.
>
> The way I see it : D has lot of strength and weaknesses. What about doing
> a
> dynamic language that would make a kind of balance by supporting features
> that
> would releave D where it kind of fails ? From what I have seen, this is
> not what
> MiniD is planning to do. And maybe it is not what you intended to do.

You're absolutely right, and as I go along, MiniD might evolve into something far different from what it is now.

> First, I would either leave the strongly typing system for something more
> dynamic ( more like scripting language ), or keep it strong but would make
> much
> more type inference, going beyond what D is doing, something looking like
> Nemerle.

A type-inferred language would be very interesting to write.  Though I'd kind of like to stick to some form of static typing, if nothing else as a proof-of-concept that a statically-typed scripting language can be higher-performance than dynamically typed ones.

> Second, I would implement some symbolic stuff or some kind of reflection
> to
> manipulate the type system or make something like meta object protocol to
> be
> able to programatically transform the MiniD programs. This could allow for
> aspect oriented stuffs and more.

Bizarre!

> Actually, I think that I am too demanding with a for-fun project. Maybe I
> should
> keep quiet and implement my own Pythonish/Smalltalkish language in D.

Hehe :)  I'd like to see it.

> Anyway, D is a high level programming language, with features closed to
> dynamic
> languages and high performance. I think it's the language of choice to
> implement
> a scripting language. The more scripting language implemention we'll have,
> the
> best we'll be able to prove it.
>
> MiniD is a good idea.
> Good luck !

You too!


June 26, 2006
"clayasaurus" <clayasaurus@gmail.com> wrote in message news:e7pa43$1f94$1@digitaldaemon.com...

> If you use zlib/png license, then you can freely borrow code from the Squirrel project (with acknowledgment of course), and commercial applications can freely use it. :)

Cool, thanks for the tip.  I'm not real familiar with all the licensing that usually goes along with OSS.


June 26, 2006
Rémy Mouëza wrote:
> I've tried to learn Ruby several times, but I did not manage to get really interested and keep going mainly because it has all the good things I like in Python ( and even code blocks à la Smalltalk ) but seems to have a little less clear syntax. It made me stick to Python. And D of course.

I myself am starting to like Ruby - pure OOP :) Reminds me of Smalltalk, Perl and D - in a good way.

> As I know Python more than Ruby, maybe I should look forward using PyPy to implement a Python interpreter in D.

There's already PyD, http://dsource.org/projects/pyd. But it's only a wrapper around existing stuff. Perhaps converting existing code would be much easier from projects like Jython / IronPython since they're already syntactically almost like D.
« First   ‹ Prev
1 2 3