+=

classic Classic list List threaded Threaded
48 messages Options
123
Reply | Threaded
Open this post in threaded view
|

Re: +=

Eduardo Ochs-2
Carlos Cardoso wrote:

> > I think that Lua is a fantastic language, but its syntax is sometimes
> > too verbose for people (like me!) who would like to use it for
> > one-shot programs, not only for "serious stuff" or for (there's a lot
> > of irony here, of course) programs that have to be maintainable by
> > non-programmers later. I guess that one of the main reasons to keep it
> > so simple is to make it easier to construct metaprogramming tools, but
> > these aren't ready yet...
>
> Fascinating.
>
> Your statement goes against everything I believed about part-time programmers
> (without the <IRONY> tags, of course).
>
> They usually like verbose languages, like Javascript, and don't want to
> go deep in logical constructions or sintax black magic.


Maybe you're seeing the world through business eyes, and the part-time
programmers you know are the kids that are doing home pages as a side
job...

Well, nowadays there are two different notions of "computer"; one,
more recent, says that a computer runs certain programs and lets you
play games, do office/business stuff, and access the internet; other,
that was the norm until the early 90s but is still alive and kicking
in the Free Software world, says that computers are machines that can
be programmed, and that we program them mainly because it is fun.
People with that second notion usually try many languages and choose
those that they find more powerful and more interesting; and not being
boring makes a language easier to learn, and more pleasurable to use.
How much black magic it contains usually matters little -- many people
like Perl and C++, for example. BTW, I like Forth, Tcl, Icon, Emacs
and Haskell (and now Lua), and I'm a mathematician in real life.

Cheers, and sorry for the bits of anger in my ramblings -- it's
because I have been treated as a "user" (that archetype created from
statistics and from Microsoft's contagious imagery) many times and I
still remember perfectly how it hurt...

  Eduardo Ochs
  http://angg.twu.net/
  http://angg.twu.net/eev-manifesto.html    <-- (take a look at this.)
  [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: +=

Eduardo Ochs-2
In reply to this post by Steve Dekorte-4
> > What about resurrecting the yacc-based parser, adapting it to the
> > new syntax, and including it in Lua-4.1, even if the default would
> > be to not even compile it? Then it would be easier for users to
> > experiment with changes on the syntax...
>
> I thought about this. It would be convenient for people wishing to extend 
> Lua's syntax to make sure they would not be breaking anything. but we 
> most certainly do not want to encourage people to create Lua derivatives,
> and still want to call it Lua. So, the yacc file is not going to happen
> (plus it'd be a lot of work.)
> --lhf

I thought that the license was quite clear on non-standard
derivatives:

 * The origin of this package must not be misrepresented; you must not
   claim that you wrote the original package. If you use this package in a
   product, an acknowledgment in the product documentation would be greatly
   appreciated (but it is not required).

 * Altered source versions must be plainly marked as such, and must not be
   misrepresented as being the original package.

Your point that the yacc parser would be a lot of work is fine, but I
disagree with the "encourage" part -- maybe because we come from
different worlds. I am the outcast that creates modified versions for
personal use, just for testing some ideas and for gaining more
knowledge of how the details work; I never do that for group projects
(I am just a lone hobbyist, and so I'm always outside every group),
and I always trust the official versions infinitely more than those
that I've modified, and I submit to upstream everything that I do that
I think is worth.

At this point I can't resist telling a personal story; being
pseudo-rational here won't work. Flames are welcome. :-)

At my university grad students that were not from the computing dept
were not allowed to borrow books from CS library, and got only a 300KB
quota on the computers of the lab controlled by the computing
department, that at one point served the whole university. I felt
treated like an enemy, and luckily some time later I got internet
access from home and stumbled on the GNU project, that had a more
hippy mentality and was much friendlier (Ok, they didn't have to deal
with engineering students!), and now (rays of light, please, plus
trumpets and a choir of angels) I see that being open to cooperation
works better than being afraid. I'll pray to Saint Ignucius of the
Church of Emacs and ask him to illuminate your heart and to make you
understand that happiness comes from sharing all debugging tools with
the public.

  Eduardo Ochs
  http://angg.twu.net/
  http://angg.twu.net/eev-manifesto.html
  http://angg.twu.net/tourism.html
  [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: +=

Eduardo Ochs-2
In reply to this post by Steve Dekorte-4
Michael T. Richter wrote:

> > BUT the point is: If we adapt LUA to serve OUR individual tastes, it
> > will grow fast, slow and useless.
>
> Like every committee or fan-base-"enhanced" language in history.
>
> Remember when Forth was small and elegant?

Yeah - when it was made by ourselves, for ourselves. Then came the ANS
standard and Forth became targeted to some fictitious everybody.

  Eduardo Ochs
  http://angg.twu.net/
  [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: +=

Michael T. Richter-2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>>> BUT the point is: If we adapt LUA to serve OUR individual tastes, it
>>> will grow fast, slow and useless.

>> Like every committee or fan-base-"enhanced" language in history.

>> Remember when Forth was small and elegant?

> Yeah - when it was made by ourselves, for ourselves. Then came the ANS
> standard and Forth became targeted to some fictitious everybody.

Exactly.  I would really hate to see this happen to Lua.

- --
Michael T. Richter
"Be seeing you."

-----BEGIN PGP SIGNATURE-----
Version: PGP Personal Privacy 6.5.3

iQA/AwUBOsLCD7TM3QkE7U/oEQL7HgCg9j8TQD9A4SHgPtuxSdMhGtzd+3sAoJfQ
NW0PJuMzYVFAco/bstzXMVYa
=1K/e
-----END PGP SIGNATURE-----



Reply | Threaded
Open this post in threaded view
|

Re: +=

Reuben Thomas-4
In reply to this post by Michael T. Richter-2
> > BUT the point is: If we adapt LUA to serve OUR individual tastes, it
> > will grow fast, slow and useless.
>
> Like every committee or fan-base-"enhanced" language in history.

Committee-agreed standards tend to be aiming to unify existing practice (as
in the case of the ANSI/ISO Forth standard), whereas "fan-based"
enhancements tend to extend a language or system.

Both have their ups as well as their downs: Perl and Python have both gone
through periods of massive expansion, which has created problems, but also
given a lot of experience on which to plan Perl 6 and Python 3000, which
both seem to be aiming to remove as well as add functionality.

Similarly, the Haskell 98 standard could not have arisen without the
experimentation in various compilers (especially GHC & Hugs) that preceded
it, and now it has three conforming compilers (nhc, GHC, Hugs), while GHC
especially continues to include new experimental features, which may be
considered for future versions of the standard.

> Remember when Forth was small and elegant?

...and it still is. It's easier with Forth than other languages, because of
the lack of a central fixed parser. The standard did an admirable job of

a) pulling together existing practice (the "easy" bit)
b) making the language machine-independent (hard)
c) giving the language a decent semantics (well-nigh impossible, but they
did it)

I was an active participant in comp.lang.forth from just before the
ratification of the standard for about 3 years, and it was noticeable that
while it attracted a lot of criticism (and caused a lot of pain), once
people had got used to it, there was a much greater sharing of ideas and
code on a common basis.

The standard still has its opponents (notably Forth's inventor, Charles
Moore), but what most of its detractors seem to ignore is that it's a very
flexible beast: you can write a program that makes many (non-standard)
assumptions about e.g. word length and number representation, and then
declare it to be a standard program with environmental dependencies (most
programs come out this way, with a longer or shorter list of dependencies).
This effectively tells you what you need to do to port the program from one
environment to another, something that the ISO C standard did not achieve.

Finally, compilers can implement subsets of the full standard and still be
standard compilers (or restricted compilers if they omit core parts of the
standard), provided they don't contravene the standard; hence, you can
certainly have small, elegant, standard systems (though admittedly not the
1K systems of which Charles Moore is champion).

-- 
http://sc3d.org/rrt/ | Si hoc legere scis nimium eruditionis habes.


Reply | Threaded
Open this post in threaded view
|

Re: +=

Nick Trout-2
In reply to this post by Luiz Henrique de Figueiredo
I agree. Lua has design goals which everyone seems happy with. Forks of the
language will not stick to these principles and will dilute development. The
developer base is small enough. An advantage of this is its very focussed,
but progress can be slow. I guess I've seen all these discussions on
comp.lang.python dozens of times and ultimately people become convinced,
conform or move on (and not many move on, I'll wager). Be grateful that the
developers of this language are strong willed!! :-) Python hasnt suffered
from Guido (the author) being stubborn and single minded. Do you want a Perl
type scenario?

You have Sol as a "research fork". Mess around with this and if you can come
up with a valid argument for changing the language semantics then maybe it
will happen. But then there will be related issues and the change will not
be as simple as it seems and essentially you've already got another
language. Sol is not Lua.

Most of the discussion about changing Lua seems to be to do with programming
style or aesthetics which to me seems a pretty weak argument for altering a
language. If you dont like the language, use another one! There are hundreds
of languages out there and you will have to adopt a different implementation
approach to get the best from each of them. There is usually a mechanism in
Lua for doing what you want, its just a question of finding the best method.
The metaprogramming aspects of Lua do take a bit of getting your head round.


----- Original Message -----
From: Luiz Henrique de Figueiredo
>What about resurrecting the yacc-based parser, adapting it to the new
>syntax, and including it in Lua-4.1, even if the default would be to
>not even compile it? Then it would be easier for users to experiment
>with changes on the syntax...

I thought about this. It would be convenient for people wishing to extend
Lua's syntax to make sure they would not be breaking anything. but we
most certainly do not want to encourage people to create Lua derivatives,
and still want to call it Lua. So, the yacc file is not going to happen
(plus it'd be a lot of work.)
--lhf


Reply | Threaded
Open this post in threaded view
|

Re: +=

Michael T. Richter-2
In reply to this post by Reuben Thomas-4
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>> Remember when Forth was small and elegant?

> ...and it still is. 

You and I have very different definitions of what constitutes "small".  I'm
more with Charles Moore.  I remember being impressed by how powerful a 4K
(or even smaller) Forth system could be.  I rather doubt that a
fully-compliant ANSI Forth system could be made that small.

- --
Michael T. Richter
"Be seeing you."

-----BEGIN PGP SIGNATURE-----
Version: PGP Personal Privacy 6.5.3

iQA/AwUBOsMuc7TM3QkE7U/oEQKzYACdHIuLnhUox7RT2DwmCH5whGJQz5cAn1UG
LKHx+F/9qo4Sao8dzGMsYp5U
=+nQZ
-----END PGP SIGNATURE-----



Reply | Threaded
Open this post in threaded view
|

Re: +=

Reuben Thomas-4
> >> Remember when Forth was small and elegant?
>
> > ...and it still is.
>
> You and I have very different definitions of what constitutes "small".  I'm
> more with Charles Moore.  I remember being impressed by how powerful a 4K
> (or even smaller) Forth system could be.  I rather doubt that a
> fully-compliant ANSI Forth system could be made that small.

OK, but a 4K system wouldn't do everything that a fully-compliant ANSI
system would. My own hand-rolled subroutine threaded ARM Forth, which is
fully ANSI compliant, though it's missing floating point and a couple of
other word sets, is about 30Kb of code when compiled (including headers).
That's a lot smaller than Lua, even when the latter is dynamically linked to
libc. The smallest Forth I've written, which was based on Charles Moore's
Machine Forth, came in at about 5.5Kb (for the complete binary image), and
implements just enough of Forth to implement itself. It's hard to see how
to make it significantly smaller without it's not being Forth any more
(though targeting it for the Thumb would probably help!).

-- 
http://sc3d.org/rrt/ | maxim, n.  wisdom for fools


Reply | Threaded
Open this post in threaded view
|

Re: +=

Carlos Cardoso
In reply to this post by Michael T. Richter-2
On Wed, 28 Mar 2001 16:23:31 -0500
"Michael T. Richter" <[hidden email]> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> > BUT the point is: If we adapt LUA to serve OUR individual tastes, it
> > will grow fast, slow and useless. 
> 
> Like every committee or fan-base-"enhanced" language in history.
> 
> Remember when Forth was small and elegant?

elegant and small was it.  ;)




Atenciosamente,

Carlos Cardoso
[hidden email]

-------------------------------------
Hands - o site brasileiro que coloca
as informações na palma de suas mãos.
       http://www.hands.com.br
-------------------------------------
HANDS - Eleita melhor empresa de Internet na
categoria serviços na Fenasoft  2000 .


Reply | Threaded
Open this post in threaded view
|

Re: +=

Luiz Henrique de Figueiredo
In reply to this post by Steve Dekorte-4
>Sol is not Lua.

I'm glad someone else said that. But in this case, it's pretty clear that Sol
is not Lua: it has a different name.

>If you dont like the language, use another one!

While this is certainly true and there are languages out there for every taste
(but clearly they do not cater for our needs: that's why we designed Lua!),
we don't want to shy people away from Lua, on the contrary.  I just want
to repeat here that we do listen to everything discussed in the list and
the needs of our users; several features suggested in the list have been
incoporated into Lua. On the other hand, it is also clear that Lua is not
designed in the list, nor by committee or poll. :-)

>The metaprogramming aspects of Lua do take a bit of getting your head round.

That's what Lua is all about: metamechanisms. Of course, it doesn't hurt that
it is also 100% portable, small, and very fast...
--lhf

Reply | Threaded
Open this post in threaded view
|

Re: +=

Michael T. Richter-2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> On the other hand, it is also clear that Lua is not
> designed in the list, nor by committee or poll. :-)

And for this I am truly grateful (as for the fact that you take input into
account).

- --
Michael T. Richter
"Be seeing you."

-----BEGIN PGP SIGNATURE-----
Version: PGP Personal Privacy 6.5.3

iQA/AwUBOsNIgLTM3QkE7U/oEQJv3gCfQVOwZIqM8Y2qDFUYe44fPhlRcXIAoNgC
o0mus5K0Ljqvx0dfLh59hmb6
=H1om
-----END PGP SIGNATURE-----



Reply | Threaded
Open this post in threaded view
|

Re: +=

Carlos Cardoso
In reply to this post by Luiz Henrique de Figueiredo
> 
> That's what Lua is all about: metamechanisms. Of course, it doesn't hurt that
> it is also 100% portable, small, and very fast...

I can live with that. Wow, I can live with it up and running in my Palm,
and I can live with fast and easy-coded applications written in a matter
of days. 



Atenciosamente,

Carlos Cardoso
[hidden email]

-------------------------------------
Hands - o site brasileiro que coloca
as informações na palma de suas mãos.
       http://www.hands.com.br
-------------------------------------
HANDS - Eleita melhor empresa de Internet na
categoria serviços na Fenasoft  2000 .


Reply | Threaded
Open this post in threaded view
|

Re: [OT] +=

Edgar Toernig
In reply to this post by Nick Trout-2
Nick Trout wrote:
> 
> Most of the discussion about changing Lua seems to be to do with programming
> style or aesthetics which to me seems a pretty weak argument for altering a
> language. If you dont like the language, use another one! There are hundreds
> of languages out there [...]

Hmm... without people changing existing languages to make it (in their
opinion) a better language you wouldn't have hundreds of them.  There
would be no Scheme or C or ...

And, the selection of one's favorite languages is only partially defined
by functionality.  A big aspect is style and aesthetics.  Especially in
a small language like Lua that is targeted at embedding I see no problem
if someone modifies it to better suit his taste or environment.  It
becomes part of the application and I think most time it simply does not
matter if it is no longer compatible to the official language.  Of course,
you can keep it a secret and don't tell anyone.  But IMHO it's much better
to share your ideas/work.

Ciao, ET.



Reply | Threaded
Open this post in threaded view
|

Re: +=

Edgar Toernig
In reply to this post by Michael T. Richter-2
"Michael T. Richter" wrote:
> 
> >>> BUT the point is: If we adapt LUA to serve OUR individual tastes, it
> >>> will grow fast, slow and useless.
>
> >> Like every committee or fan-base-"enhanced" language in history.
> 
> >> Remember when Forth was small and elegant?
> 
> > Yeah - when it was made by ourselves, for ourselves. Then came the ANS
> > standard and Forth became targeted to some fictitious everybody.
> 
> Exactly.  I would really hate to see this happen to Lua.

I would equally well hate what Chuck Moore made out of Forth.  Compare
FIG-Forth/Forth79 (slim and elegant) to ColorForth (stripped down to
an ugly something).

Ciao, ET.


Reply | Threaded
Open this post in threaded view
|

Re: +=

Edgar Toernig
In reply to this post by Luiz Henrique de Figueiredo
Luiz Henrique de Figueiredo wrote:
> 
> >Sol is not Lua.
> 
> I'm glad someone else said that. But in this case, it's pretty clear that Sol
> is not Lua: it has a different name.

Right.  It's not Lua.  First I thought about naming it
"Sol - Stand Alone Lua".  But because it is _not_ Lua
I called it "Sol - Son of Lua".  Fits IMHO much better
and should make clear that it's not the same :-)

Ciao, ET.

Reply | Threaded
Open this post in threaded view
|

Re: +=

Reuben Thomas-4
In reply to this post by Edgar Toernig
> I would equally well hate what Chuck Moore made out of Forth.  Compare
> FIG-Forth/Forth79 (slim and elegant) to ColorForth (stripped down to
> an ugly something).

To me FIG-Forth/Forth 79 are both rather arbitrary in many of their design
choices; nowhere near as elegant as Lua 4.0. An ANSI system with equivalent
functionality and all the deprecated bits removed would be rather more
elegant, to me, and probably about the same size. (Unfortunately, it
wouldn't be ANSI any longer, though.)

ColorForth, I agree, is rather anorexic; e.g. I don't really understand how
it can be better to say

X X X X X

rather than

5 0 DO X LOOP

although I do like the idea of colour tokens; it's sort of a Forth take on
coloured syntax highlighting, and it does make sense in a curious sort of
way.

But this is a Lua list, not a Forth list. Lua 4.0, I must admit, has got to
the stage where, apart from a few corners such as upvalues, it's difficult
to see how the language could be further improved without damaging it. The
implementation and API are another matter, though they're pretty darn good
too. It's definitely time to start concentrating on how Lua is used: it's
the sort of language which, like C, C++ and Forth (all for slightly
different reasons) gives you so much freedom that it's advantageous to work
out dialects in which to actually write your programs. The obvious examples
in Lua would be implementing OO and modules: both can be done pretty much
without changing the language, but need a certain amount of discipline
before they work properly.

-- 
http://sc3d.org/rrt/ | Slow Pedestrian Crossing


Reply | Threaded
Open this post in threaded view
|

Re: [OT] +=

Nick Trout-2
In reply to this post by Edgar Toernig
>>Hmm... without people changing existing languages to make it (in their
opinion) a better language you wouldn't have hundreds of them.  There
would be no Scheme or C or ...

Fair enough. I just don't want to see the goals of Lua diverted/diluted,
i.e.. I want Lua to get faster and smaller! :-) I'm pretty happy with Luas
progress and I don't have the time to tinker about and modify it.

People are obviously free to tinker with Luas code. I just hope that the
effort isn't detrimental to Luas development. The experimental mutation and
feedback has been good for its development I'm sure but different forks of
the language could lead to fragmentation?

Anyway I suppose what I was trying to say is that I support the developers
in not supplying an easy to modify syntax as this may lead to lots of little
Luas, which could cause a lot of confusion and until now the developers have
been very careful about standards.


Reply | Threaded
Open this post in threaded view
|

Re: [OT] +=

Reuben Thomas-4
> Anyway I suppose what I was trying to say is that I support the developers
> in not supplying an easy to modify syntax as this may lead to lots of little
> Luas, which could cause a lot of confusion and until now the developers have
> been very careful about standards.

I think there's a difference between having an easy-to-modify system and
having an easy-to-modify standard. On the other hand, the experience of
Forth shows that the two are strongly correlated. Ho hum.

-- 
http://sc3d.org/rrt/ | free, a.  already paid for (Peyton Jones)


Reply | Threaded
Open this post in threaded view
|

Re: +=

Edgar Toernig
In reply to this post by Reuben Thomas-4
Reuben Thomas wrote:
> 
> ColorForth, I agree, is rather anorexic;
                                 ^^^^^^^^
Hmm... my dictionary chokes on this one.  But doesn't sound good
anyway ;-)

> although I do like the idea of colour tokens; it's sort of a Forth take on
> coloured syntax highlighting, and it does make sense in a curious sort of
> way.

But if the color makes syntactic and semantic differences?!?  I'm not
sure of I should like that.  IMHO it's just a matter of time until he
makes special glyphs for each word so that a complete program fits on
the display of a modular phone ;-)

Ok, enough about Forth.

> Lua 4.0, I must admit, has got to
> the stage where, apart from a few corners such as upvalues, it's difficult
> to see how the language could be further improved without damaging it.
>[...]
> The obvious examples
> in Lua would be implementing OO and modules: both can be done pretty much
> without changing the language, but need a certain amount of discipline
> before they work properly.

That are two good examples.  But contrary to you I think it would be
better to allow some changes to the language to make these features
good.  Lua was not designed with these kind of things in mind.  For
example the change to the global table was one step in that direction.
Yes, this is a minor change but it makes big differences.  I could
imagine some more minor changes like this that would make OO-like
structures and modules as elegant as the rest of the language.

For example, I split objects in Sol.  There's an object instance table
(the usual object table of Lua) that holds the instance data and the
object class table that holds class data (member functions, static
class data, etc.)  It's called the method table in Sol.  Multiple
objects may share the same class table.  Access to the instance table
is via the dot (.) operator whereas access to the class table is
done via the colon (:) operator.  That's all.  A minor change but
big impact. [1]

Another thing I'm trying out is splitting the global table.  Every
module gets a 'private' table.  All global scope reads are first
done on the private table and global scope writes always write
into the private table [2].  Ok, this can be done with standard Lua.
But the difference is, that _every_ function (C and Sol) gets the
currently active private table attached to it.  When the function
executes, that attached private table is made the active one.  That
way you basically get the 'static' storage class of C. [3]  Another
small change which could make a difference.  At the moment some
things still have to be worked out but I let you know if I have
something to show.

Ciao, ET.


[1] That the class table also holds the tag methods for the objects
is another matter but it simplifies the language and its implementation.

[2] To write into the global table you have to use "global.name=xxx".

[3] As a side effect this makes _garbage collected_ dynamically loaded
binary modules (dl_open & co) pretty easy :-)


Reply | Threaded
Open this post in threaded view
|

Re: +=

Reuben Thomas-4
> > ColorForth, I agree, is rather anorexic;
>                                  ^^^^^^^^
> Hmm... my dictionary chokes on this one.  But doesn't sound good
> anyway ;-)

Anorexia nervosa is a disorder whose sufferers starve themselves.

> But if the color makes syntactic and semantic differences?!?  I'm not
> sure of I should like that.  IMHO it's just a matter of time until he
> makes special glyphs for each word so that a complete program fits on
> the display of a modular phone ;-)

Hmm...or one could just code in Japanese. But colour is used for syntactic
and semantic differences in syntax highlighting; it's just that it's
redundant there.

> That are two good examples.  But contrary to you I think it would be
> better to allow some changes to the language to make these features
> good.

So do I, actually.

-- 
http://sc3d.org/rrt/ | maximiste, n.  pessimiste


123