As the title says, I want to create my own language.
I want it to have a similar syntax to Python (but I don't want it to
be Python, I have some ideas about it which are surely going to make
it incompatible).
I want it to be programmed in Lisp.
I'd like to know what would you do if you were me. For example, where
to start looking for information, what books to read, what errors to
avoid, what design to choose, and whatever yo may think about it.
Also, ideas about how the language might be are also welcome.
On 20 oct, 21:28, Javier <·······@gmail.com> wrote:
> As the title says, I want to create my own language.
> I want it to have a similar syntax to Python (but I don't want it to
> be Python, I have some ideas about it which are surely going to make
> it incompatible).
> I want it to be programmed in Lisp.
What does that mean ? A language is not programmed, compilers or
interpreters are. But this has nothing to do with the language itself.
> I'd like to know what would you do if you were me. For example, where
> to start looking for information, what books to read, what errors to
> avoid, what design to choose, and whatever yo may think about it.
>
> Also, ideas about how the language might be are also welcome.
Briefly said, you want to create your own language but don't know much
more about it... Not sure this is the best place for such a request.
-Nicolas
Javier schreef:
> As the title says, I want to create my own language.
Look at this excellent post by Scott McKay listing "some questions a
prospective language designer should ask himself when starting the
designing a programming language."
http://article.gmane.org/gmane.comp.lang.lightweight/2552
- Willem
Javier <·······@gmail.com> writes:
> As the title says, I want to create my own language.
> I want it to have a similar syntax to Python (but I don't want it to
> be Python, I have some ideas about it which are surely going to make
> it incompatible).
> I want it to be programmed in Lisp.
>
> I'd like to know what would you do if you were me. For example, where
> to start looking for information, what books to read, what errors to
> avoid, what design to choose, and whatever yo may think about it.
>
> Also, ideas about how the language might be are also welcome.
Everyone want their own programming language. :)
3 pieces of suggestion:
-learn courses like "programming language concept"
-make your idea clearer
-try as many programming languages as you can
Then you may want to think your idea again...
--
http://www.cnliufeng.com/
On 2008-10-20, Javier <·······@gmail.com> wrote:
> As the title says, I want to create my own language.
> I want it to have a similar syntax to Python (but I don't want it to
> be Python, I have some ideas about it which are surely going to make
> it incompatible).
> I want it to be programmed in Lisp.
There is an actual Python implementation written in Common Lisp called
CLPython.
You might want to take a look at the internals. Hopefully, CLPython will teach
you the lesson that Python-like syntax can just be translated to a Lisp
notation, and everything that is interesting happens after that.
> I'd like to know what would you do if you were me. For example, where
> to start looking for information, what books to read, what errors to
> avoid, what design to choose, and whatever yo may think about it.
The main error to avoid is to design a syntax similar to Python.
What is interesting in languages is their semantics, not syntax.
Programming language semantic ideas can be encoded in a generic abstract syntax
tree syntax, which can be written as Lisp expressions.
If you don't have interesting ideas about programming language semantics,
syntax isn't going to help.
Syntax is just a superficial user interface, and one which actually gets in the
way.
If you want to experiment with programming language semantic ideas, then having
to maintain a Python-like syntax is only going to get in your way. As your
ideas change and evolve, you will need to make changes in the syntax to
accomodate them in your experimental implementation, and that will mean you
will have to spend time hacking on extending the Python-like syntax.
If you're someone with poor quality ideas which are far and few in between,
then this approach will make you feel smarter; you will be able to fill in the
gaps in your intellectual creativity with hacking on the parser. Some coders
like hacking on parsers, because while they are doing that, they feel like they
are great computer scientists who are expressing their flare for programming
language design.
On Oct 20, 3:04 pm, Kaz Kylheku <········@gmail.com> wrote:
> What is interesting in languages is their semantics, not syntax.
bullshit ran rampant!
suppose now that lisp's nested paren is now not interesting anymore!
and the regularity of XML syntax is not important!
> Programming language semantic ideas can be encoded in a generic abstract syntax
> tree syntax, which can be written as Lisp expressions.
so can it be written in any nestinged form, such as xml.
what bullshit lispers have.
> If you don't have interesting ideas about programming language semantics,
> syntax isn't going to help.
syntax is the most important element of programing lang.
> Syntax is just a superficial user interface, and one which actually gets in the
> way.
Yeah, english gets in your way. Maybe u should try telepathy.
Lol'd, another interesting newsgroup day.
am going to have a muffin and coffee with milk.
Further readings:
The Concepts and Confusions of Prefix, Infix, Postfix and Fully Nested
Notations
http://xahlee.org/UnixResource_dir/writ/notations.html
Xah
∑ http://xahlee.org/
☄
On 21 oct, 00:04, Kaz Kylheku <········@gmail.com> wrote:
> On 2008-10-20, Javier <·······@gmail.com> wrote:
>
> > As the title says, I want to create my own language.
> > I want it to have a similar syntax to Python (but I don't want it to
> > be Python, I have some ideas about it which are surely going to make
> > it incompatible).
> > I want it to be programmed in Lisp.
>
> There is an actual Python implementation written in Common Lisp called
> CLPython.
>
> You might want to take a look at the internals. Hopefully, CLPython will teach
> you the lesson that Python-like syntax can just be translated to a Lisp
> notation, and everything that is interesting happens after that.
>
> > I'd like to know what would you do if you were me. For example, where
> > to start looking for information, what books to read, what errors to
> > avoid, what design to choose, and whatever yo may think about it.
>
> The main error to avoid is to design a syntax similar to Python.
>
> What is interesting in languages is their semantics, not syntax.
>
> Programming language semantic ideas can be encoded in a generic abstract syntax
> tree syntax, which can be written as Lisp expressions.
>
> If you don't have interesting ideas about programming language semantics,
> syntax isn't going to help.
>
> Syntax is just a superficial user interface, and one which actually gets in the
> way.
>
> If you want to experiment with programming language semantic ideas, then having
> to maintain a Python-like syntax is only going to get in your way. As your
> ideas change and evolve, you will need to make changes in the syntax to
> accomodate them in your experimental implementation, and that will mean you
> will have to spend time hacking on extending the Python-like syntax.
This is interesting, but I don't intend to make a python-like syntax
all the way, just the indentation (whitespace) meaning.
I'm perhaps thinking about a syntax which is a mix of Dylan and
Python.
I'll put an example in another post.
Javier <·······@gmail.com> wrote:
+---------------
| Kaz Kylheku <········@gmail.com> wrote:
| > Javier <·······@gmail.com> wrote:
| > > I'd like to know what would you do if you were me...
| > > what errors to avoid, what design to choose...
| >
| > The main error to avoid is to design a syntax similar to Python.
...
| This is interesting, but I don't intend to make a python-like
| syntax all the way, just the indentation (whitespace) meaning.
+---------------
Of course, many consider that to have been Python's biggest *mistake*!!
-Rob
-----
Rob Warnock <····@rpw3.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607
On Mon, 20 Oct 2008 20:48:49 -0500, Rob Warnock wrote:
> Of course, many consider that to have been Python's biggest *mistake*!!
But most of these also dislike the parens in Lisp. I like both.
regards,
Marek
On Mon, 20 Oct 2008 12:28:02 -0700, Javier wrote:
> As the title says, I want to create my own language. I want it to have a
> similar syntax to Python (but I don't want it to be Python, I have some
> ideas about it which are surely going to make it incompatible).
> I want it to be programmed in Lisp.
>
> I'd like to know what would you do if you were me. For example, where to
> start looking for information, what books to read, what errors to avoid,
> what design to choose, and whatever yo may think about it.
>
> Also, ideas about how the language might be are also welcome.
You should figure out _why_ you want to do that, and what are the goals
you are trying to achieve.
If the only objective is that this language should be a new one created
by you, then your task is easy because you can keep the language simple.
I would suggest that you introduce a single operator called !, that adds
413 to its argument.
Examples:
!0 => 413
!42 => 455
!!!3.141593 => 1242.141593
What an excellent language! The Scheme folks would admire it for its
simplicity. Implementation can be pretty fast because of constant
folding (if you ask nicely, people here will hack together a compiler for
you).
And it will be all your own.
HTH,
Tamas
On 21 oct, 00:12, Tamas K Papp <······@gmail.com> wrote:
> I would suggest that you introduce a single operator called !, that adds
> 413 to its argument.
>
> Examples:
>
> !0 => 413
> !42 => 455
> !!!3.141593 => 1242.141593
>
> What an excellent language! The Scheme folks would admire it for its
> simplicity. Implementation can be pretty fast because of constant
> folding (if you ask nicely, people here will hack together a compiler for
> you).
What a bullshit.
We have a word in spanish, impossible to translate into english, which
describes you perfectly: "gilipollas".
Have a nice day.
Javier wrote:
> On 21 oct, 00:12, Tamas K Papp <······@gmail.com> wrote:
>
>
>>I would suggest that you introduce a single operator called !, that adds
>>413 to its argument.
>>
>>Examples:
>>
>>!0 => 413
>>!42 => 455
>>!!!3.141593 => 1242.141593
>>
>>What an excellent language! The Scheme folks would admire it for its
>>simplicity. Implementation can be pretty fast because of constant
>>folding (if you ask nicely, people here will hack together a compiler for
>>you).
>
>
> What a bullshit.
> We have a word in spanish, impossible to translate into english, which
> describes you perfectly: "gilipollas".
Not "imbecile"?
http://waytoownstate.blogspot.com/2008/06/do-you-know-what-gilipollas-and-imbcil.html
hth,kxo
On 21 oct, 02:09, Kenny <·········@gmail.com> wrote:
> Javier wrote:
> > On 21 oct, 00:12, Tamas K Papp <······@gmail.com> wrote:
>
> >>I would suggest that you introduce a single operator called !, that adds
> >>413 to its argument.
>
> >>Examples:
>
> >>!0 => 413
> >>!42 => 455
> >>!!!3.141593 => 1242.141593
>
> >>What an excellent language! The Scheme folks would admire it for its
> >>simplicity. Implementation can be pretty fast because of constant
> >>folding (if you ask nicely, people here will hack together a compiler for
> >>you).
>
> > What a bullshit.
> > We have a word in spanish, impossible to translate into english, which
> > describes you perfectly: "gilipollas".
>
> Not "imbecile"?
Not really... it might be an "imbecile" with very bad intentions, but
not exactly.
I would translate it as... well, somebody who acts as a fool, with the
intention to ridiculize or make harm to another one, but he doesn't
realize that he is acting as a fool, so at the end he is really the
fool, but not the person he attacks.
Of course, this is very complicated to explain, but spanish understand
it rapidly, without all this mental thoughts. ;-)
As you see, there are a lot of gilipollas in the newsgroups. ;-)
> http://waytoownstate.blogspot.com/2008/06/do-you-know-what-gilipollas...
Ok, delicate theme...
Nationalists... as you can see, it is the typical "flamewar" that
happens in some countries (something similar, but with more intensity,
than what is happening with some californians which are trying the
independence from the USA). I particularly hate any discussion of
these things and try to ignore them, but there are a number of
"gilipollas" in both sides, and I think they both are wrong, that are
constantly bothering the rest of the country...
Javier wrote:
> On 21 oct, 02:09, Kenny <·········@gmail.com> wrote:
>
>>Javier wrote:
>>
>>>On 21 oct, 00:12, Tamas K Papp <······@gmail.com> wrote:
>>
>>>>I would suggest that you introduce a single operator called !, that adds
>>>>413 to its argument.
>>
>>>>Examples:
>>
>>>>!0 => 413
>>>>!42 => 455
>>>>!!!3.141593 => 1242.141593
>>
>>>>What an excellent language! The Scheme folks would admire it for its
>>>>simplicity. Implementation can be pretty fast because of constant
>>>>folding (if you ask nicely, people here will hack together a compiler for
>>>>you).
>>
>>>What a bullshit.
>>>We have a word in spanish, impossible to translate into english, which
>>>describes you perfectly: "gilipollas".
>>
>>Not "imbecile"?
>
>
> Not really... it might be an "imbecile" with very bad intentions, but
> not exactly.
> I would translate it as... well, somebody who acts as a fool, with the
> intention to ridiculize or make harm to another one, but he doesn't
> realize that he is acting as a fool, so at the end he is really the
> fool, but not the person he attacks.
> Of course, this is very complicated to explain, but spanish understand
> it rapidly, without all this mental thoughts. ;-)
>
> As you see, there are a lot of gilipollas in the newsgroups. ;-)
Oh, sure, I'd translate it as "Usenet participant".
>
>
>
>>http://waytoownstate.blogspot.com/2008/06/do-you-know-what-gilipollas...
>
>
> Ok, delicate theme...
> Nationalists... as you can see, it is the typical "flamewar" that
> happens in some countries (something similar, but with more intensity,
> than what is happening with some californians which are trying the
> independence from the USA). I particularly hate any discussion of
> these things and try to ignore them, but there are a number of
> "gilipollas" in both sides, and I think they both are wrong, that are
> constantly bothering the rest of the country...
>
We call those "campaign spokespersons".
hth,kzo
Well although you seem a bit rude, I also like indentation, so here's
an indentation reader for guile scheme:
http://srfi.schemers.org/srfi-49/srfi-49.html
Might need a small amount of changing to run though.
I've had similar wants for an indentation based lisp, and it's a lot
easier if you just change the reader and add some library code. done.
Right now I'm a bit stuck at getting mzscheme to use my reader, but
after that Lisp will reach the masses and world domination will ensue.
On 21 oct, 11:36, Ali <·············@gmail.com> wrote:
> Well although you seem a bit rude, I also like indentation, so here's
> an indentation reader for guile scheme:
>
> http://srfi.schemers.org/srfi-49/srfi-49.html
>
> Might need a small amount of changing to run though.
>
> I've had similar wants for an indentation based lisp, and it's a lot
> easier if you just change the reader and add some library code. done.
> Right now I'm a bit stuck at getting mzscheme to use my reader, but
> after that Lisp will reach the masses and world domination will ensue.
Oh, it's a good start.
Why did you choose Scheme instead of CL?
Ali wrote:
> Well although you seem a bit rude, I also like indentation, so here's
> an indentation reader for guile scheme:
>
> http://srfi.schemers.org/srfi-49/srfi-49.html
>
> Might need a small amount of changing to run though.
>
> I've had similar wants for an indentation based lisp, and it's a lot
> easier if you just change the reader and add some library code. done.
> Right now I'm a bit stuck at getting mzscheme to use my reader, but
> after that Lisp will reach the masses and world domination will ensue.
I hope you remembered to change the name. We all agreed on that a while
ago. Oh, and that package error. Ron says we have to fix that, too.
hth, kenny
On Mon, 20 Oct 2008 16:13:38 -0700, Javier wrote:
> On 21 oct, 00:12, Tamas K Papp <······@gmail.com> wrote:
>
>> I would suggest that you introduce a single operator called !, that
>> adds 413 to its argument.
>>
>> Examples:
>>
>> !0 => 413
>> !42 => 455
>> !!!3.141593 => 1242.141593
>>
>> What an excellent language! The Scheme folks would admire it for its
>> simplicity. Implementation can be pretty fast because of constant
>> folding (if you ask nicely, people here will hack together a compiler
>> for you).
>
> What a bullshit.
> We have a word in spanish, impossible to translate into english, which
> describes you perfectly: "gilipollas".
Why? I gave you a language that matched your design goals. If you don't
like it, maybe it is time to redefine those goals.
Oh wait, you didn't have any. Nevermind.
Tamas
On 20 Oct, 20:28, Javier <·······@gmail.com> wrote:
> As the title says, I want to create my own language.
> I want it to have a similar syntax to Python (but I don't want it to
> be Python, I have some ideas about it which are surely going to make
> it incompatible).
> I want it to be programmed in Lisp.
>
> I'd like to know what would you do if you were me. For example, where
> to start looking for information, what books to read, what errors to
> avoid, what design to choose, and whatever yo may think about it.
>
> Also, ideas about how the language might be are also welcome.
Generally interesting languages start with a problem. The problem is
'I want to do X'.
eg X =
database query SQL
KR Prolog
text processing Snobol
and so on. Designing a language without a problem is designing a
solution and then looking for a question it answers. Not good.
Often a language designed to solve a problem turns out to have wider
application than the original domain (e.g. ML was initially designed
as the metalanguage for a programmable proof assistant - the LCF). So
start with a problem you feel is not addressed in existing languages
and then design your language.
Mark
On 21 Oct, 14:47, Mark Tarver <··········@ukonline.co.uk> wrote:
> On 20 Oct, 20:28, Javier <·······@gmail.com> wrote:
>
> > As the title says, I want to create my own language.
> > I want it to have a similar syntax to Python (but I don't want it to
> > be Python, I have some ideas about it which are surely going to make
> > it incompatible).
> > I want it to be programmed in Lisp.
>
> > I'd like to know what would you do if you were me. For example, where
> > to start looking for information, what books to read, what errors to
> > avoid, what design to choose, and whatever yo may think about it.
>
> > Also, ideas about how the language might be are also welcome.
>
> Generally interesting languages start with a problem. The problem is
> 'I want to do X'.
>
> eg X =
> database query SQL
> KR Prolog
> text processing Snobol
>
> and so on. Designing a language without a problem is designing a
> solution and then looking for a question it answers. Not good.
>
> Often a language designed to solve a problem turns out to have wider
> application than the original domain (e.g. ML was initially designed
> as the metalanguage for a programmable proof assistant - the LCF). So
> start with a problem you feel is not addressed in existing languages
> and then design your language.
>
> Mark
Just add to the above ....
Here's another tip. If you don't know what problem you're supposed to
be solving then experiment with an existing language Blub and write an
interpreter for it in Lisp. You should be able to load a Blub file
and run it within Lisp. This will teach you tokenising, type
correctness, parsing and a load of useful stuff. Then when your big
idea comes through you will have the know-how to implement it. I'd
suggest C as Blub for a start.
There is an example in this group - though the language Minim is a toy
one for benchmarking - for you to look at. Its written in umpteen
languages (Qi, Lisp, Haskell ...) as part of a challenge problem.
http://groups.google.co.uk/group/comp.lang.lisp/browse_frm/thread/7b1ab36f5d5cce0a/54afe11153025e27?hl=en&lnk=gst&q=Minim#54afe11153025e27
Mark
On Oct 20, 2:28 pm, Javier <·······@gmail.com> wrote:
> As the title says, I want to create my own language.
> I want it to have a similar syntax to Python (but I don't want it to
> be Python, I have some ideas about it which are surely going to make
> it incompatible).
> I want it to be programmed in Lisp.
>
> I'd like to know what would you do if you were me. For example, where
> to start looking for information, what books to read, what errors to
> avoid, what design to choose, and whatever yo may think about it.
>
> Also, ideas about how the language might be are also welcome.
http://www.cs.brown.edu/~sk/Publications/Books/ProgLangs/
http://www.cs.indiana.edu/eopl/
From: Javier
Subject: Re: I want to create my own language
Date:
Message-ID: <gdq19g$m2n$1@aioe.org>
Grant Rettke wrote:
> http://www.cs.brown.edu/~sk/Publications/Books/ProgLangs/
>
> http://www.cs.indiana.edu/eopl/
Very nice!
Thanks.