Small Language Wanted 
Author Message
 Small Language Wanted

[apologies if this is a re-post --- problems first time around]

Hello.  I am looking for a small language to use and modify for teaching
purposes.  Features I want include:

* small, simple implementation in C (at most one week for a senior
  student with a C/Unix background to read and understand source).

* very simple syntax --- preferably only a single syntactic form,
  like Scheme, Logo, and Forth.

* textual scoping of variables (which (sigh) rules out Logo itself)

* logical, integer, floating-point, and string data types (I'm
  happy to have single characters treated as 1-length strings)

Other features that would be nice include

* objects (something simple, like Object Logo, would do --- I
  regularly lambast physicists for using "old" languages like fortran,
  so I feel I should set a good example for students by using some
  modern ideas myself)

* a source-language de{*filter*}

* the ability to cross-call C

Note that a compiler is not needed; performance is not a primary
concern, so interpretation would be fine.

Any help would be much appreciated.

Thanks in advance,

 ========================================================================
  Gregory V. Wilson                    ||  For in much wisdom is much
  Technical Coordinator                ||  grief; and he that increaseth
  Edinburgh Parallel Computing Centre  ||  knowledge, increaseth sorrow.

 ========================================================================



Mon, 06 Feb 1995 16:05:07 GMT  
 Small Language Wanted
|> [apologies if this is a re-post --- problems first time around]
|>
|> Hello.  I am looking for a small language to use and modify for teaching
|> purposes.  Features I want include:
|>
|> * small, simple implementation in C (at most one week for a senior
|>   student with a C/Unix background to read and understand source).
|>
|> * very simple syntax --- preferably only a single syntactic form,
|>   like Scheme, Logo, and Forth.
|>
|> * textual scoping of variables (which (sigh) rules out Logo itself)
|>
|> * logical, integer, floating-point, and string data types (I'm
|>   happy to have single characters treated as 1-length strings)
|>  ...
You can try siod (Scheme In One Defun, Version 2.4)
available at world.std.com, BU.EDU (128.197.2.6), or try archie.
(If you like, I can mail it to you.)

Some adverti{*filter*}t copied from an other news group copied from \ldots:
(Don't know the original poster)
vvvvvv
What is SIOD? It is an extremely small scheme implementation in C
arranged as set of subroutines that can be called from any main
program for the purpose of introducing an interpreted extension
language.

How small is it? Compiling using the VAX/VMS C compiler results in a
total of 16333 bytes of executable code.

What features?
 * Lisp calls C and C calls lisp transparently
 * no hassle in C coded functions due to GC or EVAL considerations.
 * ability to hook into the read-eval-print loop without modifying the code.
 * ability to extend the datatypes without modifying the code.
 * mark-and-sweep or stop-and-copy GC selectable at runtime.
 * readmacros
 * macros
 * backquote (quasi-quote)
 * optionally loadable pratt (infix-language) parser

Platforms?
 * VAX/VMS * VAX UNIX * SUN-3 * SUN-4 * AMIGA * MACINTOSH * MIPS * CRAY
^^^^^^^

If you wan't a more complex system try kernel, a dynamic lisp interpreter
published (source code included) at Addison Wesley
(or try my extensions to it).

MfG

Klaus Elsbernd





Tue, 07 Feb 1995 16:29:44 GMT  
 Small Language Wanted
Quote:

>[apologies if this is a re-post --- problems first time around]

>Hello.  I am looking for a small language to use and modify for teaching
>purposes.  Features I want include:

>* small, simple implementation in C (at most one week for a senior
>  student with a C/Unix background to read and understand source).

>* very simple syntax --- preferably only a single syntactic form,
>  like Scheme, Logo, and Forth.

>* textual scoping of variables (which (sigh) rules out Logo itself)

>* logical, integer, floating-point, and string data types (I'm
>  happy to have single characters treated as 1-length strings)

    Your goals are mutually exclusive. You ask for a simple language
and then want to include many complicated features. There are versions
of Forth available in the form of C programs. You can get a good one
by ftp from prep.ai.mit.edu as part of the gnu collection. Look for
the file called tile.2.1.tar.Z. Since it is written in C and does
not exactly follow usual Forth practices, it is named a "threaded
interpretive language" or TIL.

Quote:
>  I regularly lambast physicists for using "old" languages like Fortran,
>  so I feel I should set a good example for students by using some
>  modern ideas myself)

  As a user of Fortran, I must protest the idea that Fortran is an
old language. Since structured programming concepts were introduced
into Fortran many years ago, there are no "modern" programming ideas
that are need in Fortran to accomplish its purpose of scientific
and mathematical computation. The mathematical notation used by
physicists is an old language and they don't have much interest in
changing it. So why should they want to switch from Fortran? Perhaps
if other computing languages included things like exponential operations
( ** ), and complex number arithmetic there would be more reason to use
something besides Fortran.
  The best new idea that physicists (and every other programmer) should
use is extensive commenting so human beings can read source listings.
That would be the greatest advance since digital computers were invented.
   Of course if you want a language that can be modified to include any
new idea that you want to try, Forth is a very good choice. And I've
heard that Lisp and Scheme are good for that too.


Tue, 07 Feb 1995 22:01:11 GMT  
 Small Language Wanted

Quote:
Mike Coughlin writes:
>   As a user of Fortran, I must protest the idea that Fortran is an
> old language. Since structured programming concepts were introduced
> into Fortran many years ago, there are no "modern" programming ideas
> that are need in Fortran to accomplish its purpose of scientific
> and mathematical computation. The mathematical notation used by

Of course one can express "scientific and mathematical computations"
in Fortran, C, TeX, postscript, etc.  However, the tremendous interest
in "object-oriented" programming among engineers and scientists shows
that they have finally come to realize that the structure and
organization of data are important---not exactly one of Fortran's
strong points.

--
John Baugh



Tue, 07 Feb 1995 22:44:44 GMT  
 Small Language Wanted
Quote:

!Mike Coughlin writes:

        [...Fortran works...]

!Of course one can express "scientific and mathematical computations"
!in Fortran, C, TeX, PostScript, etc.  However, the tremendous interest
!in "object-oriented" programming among engineers and scientists shows
!that they have finally come to realize that the structure and
!organization of data are important---not exactly one of Fortran's
!strong points.                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^

Have you taken a look at Fortran-90 lately?  If you have, you'll have
noted that the structure and organization of data are indeed strong
points in F90.  As far as the recent (1980-present) fashionable
interest in object-oriented this-and-that, F90 supports data-hiding via
modules, generic subprograms, operator and function overloading...

F90 is not a 'small language', but it is an excellent tool in its
appropriate application domain (science and engineering).  People seem
to be especially reluctant to 'update' their opinions regarding
Fortran, and casting the baby out with the bathwater is all too
common.

!--
!John Baugh

--



Tue, 07 Feb 1995 23:37:33 GMT  
 Small Language Wanted

: >  I regularly lambast physicists for using "old" languages like Fortran,
: >  so I feel I should set a good example for students by using some
: >  modern ideas myself)
:   As a user of Fortran, I must protest the idea that Fortran is an
: old language. Since structured programming concepts were introduced
: into Fortran many years ago, there are no "modern" programming ideas
: that are need in Fortran to accomplish its purpose of scientific
: and mathematical computation.

I disagree.  There are some "modern" programming ideas that are necessary
for scientific and mathematical computation, such as all the various types
of 'tree data structures' and such things requiring dynamically allocated
objects and some sort of pointer notion,

: The mathematical notation used by
: physicists is an old language and they don't have much interest in
: changing it.

and even worse, there are alot of useful mathematical notions that should be
in a mathematical programming language that have been defined away as
uninteresting by the "modern" computer science community.  The surging
importance of parallel computing (for which the primary users are
scientists) might perhaps reverse the trend, but I'm not confident.

Examples:

1)  One that I'd appreciate (this has been hashed over many times) is
    array index notation.  A(i,j) = B(i,k)*C(k,j).  I do NOT think that
    matrix and vector computations are best done by "overloading operators"
    with a "class library".

2)  Mathematicians (like the infamous Prof. Rubin) would probably enjoy
    fast multiprecision arithmetic, though this wouldn't be as useful for
    scientists.

I'm sure that there are other examples, that I can't quite think of
right now.

Notation for expressing standard mathematical computations
(I'm not talking about logic or set theory or other esoterica like that)
hasn't been substantially improved since original Fortran.

: So why should they want to switch from Fortran? Perhaps
: if other computing languages included things like exponential operations
: ( ** ), and complex number arithmetic there would be more reason to use
: something besides Fortran.

Agreed.  It's unconscionable to make things *worse* than 1959 Fortran.

:   The best new idea that physicists (and every other programmer) should
: use is extensive commenting so human beings can read source listings.

I think it's the clarity of thought that makes the real difference.

: That would be the greatest advance since digital computers were invented.
:    Of course if you want a language that can be modified to include any
: new idea that you want to try, Forth is a very good choice. And I've
: heard that Lisp and Scheme are good for that too.

--

-Institute for Nonlinear Science, University of California, San Diego
-*** AD: Archive for nonlinear dynamics papers & programs: FTP to
-***     lyapunov.ucsd.edu, username "anonymous".



Wed, 08 Feb 1995 04:49:22 GMT  
 Small Language Wanted

: Not to fan a flame war, but indeed C++ is _excellent_ for working with
: complex numbers, etc.  And, nobody will accuse you of using an outdated
: language.

C++:  complex A, B, C;

C = A + B

{ get A and B, call "+" operator.  Create new temporary structure for
  result by calling complex constructor.  Run "+" operator.
  call overloaded "=" operator.  Copy into C. Delete temporary.}

And can C++ optimize

for (i=1; i<1000; i++) {
        <junk not altering A and B>
        C = A + B
        <more junk not altering A and B>
        func(C)

Quote:
}

by taking out C=A+B as a loop invariant?

How can it if the "+" and "=" operators could conceivably do *ANYTHING*
which might possibly alter something else somewhere else.

With enough effort no doubt, this problem could be fixed to make
code that's not much worse than Fortran-IV.  (The point is that
the algebra of complex numbers and matrices and vector operations restricts
what can happen allowing more optimization.)

In case you're wondering, yes I think that OO programming can be a
good thing, even in scientific programs, but I also believe that the
"textbook examples" of classes, i.e. complex numbers and vectors and
matrices are *too important* to do without special treatment.  If it were
possible to do these right, and still as special cases of a fully general
notion, great, but that's not here today.

: C is an excellent language for scientific stuff, and C++ even better.

Personally, I think C is an excellent language for writing Unix
utilities, and barely tolerable for scientific programs, useful only because
Fortran 77 doesn't have dynamically allocatable memory and structures.
I think that C++ really sucks. (Modula-3 and Eiffel perform that function
better, I think).

:
: Check out the flame-war du jour in soc.college for more information on
: how Scheme "is great|sucks" compared to C which "is great|sucks".

sorry, I should contain myself....

:       Darrin
: --

--

-Institute for Nonlinear Science, University of California, San Diego
-*** AD: Archive for nonlinear dynamics papers & programs: FTP to
-***     lyapunov.ucsd.edu, username "anonymous".



Wed, 08 Feb 1995 05:08:09 GMT  
 Small Language Wanted

Quote:

>Mike Coughlin writes:
>>   As a user of Fortran, I must protest the idea that Fortran is an
>> old language. Since structured programming concepts were introduced
>> into Fortran many years ago, there are no "modern" programming ideas
>> that are need in Fortran to accomplish its purpose of scientific
>> and mathematical computation. The mathematical notation used by

>Of course one can express "scientific and mathematical computations"
>in Fortran, C, TeX, PostScript, etc.  However, the tremendous interest
>in "object-oriented" programming among engineers and scientists shows
>that they have finally come to realize that the structure and
>organization of data are important---not exactly one of Fortran's
>strong points.

Not to fan a flame war, but indeed C++ is _excellent_ for working with
complex numbers, etc.  And, nobody will accuse you of using an outdated
language.

I used Fortran up until about 2 years ago.  It does do about anything that
you want, and DEC's Fortran compiler for VMS is probably the best single
compiler that I've ever met (in terms of optimization).  But, the lack
of structures, pointers, and recursion are crippling.  I know that they are
adding/have added some of these features, but they still aren't everywhere,
yet.

C is an excellent language for scientific stuff, and C++ even better.

Check out the flame-war du jour in soc.college for more information on
how Scheme "is great|sucks" compared to C which "is great|sucks".

        Darrin
--


"It's a marvel of vegetable containment..."



Wed, 08 Feb 1995 01:12:08 GMT  
 Small Language Wanted

Quote:


>!Mike Coughlin writes:
>    [...Fortran works...]

>!Of course one can express "scientific and mathematical computations"
>!in Fortran, C, TeX, PostScript, etc.  However, the tremendous interest
>!in "object-oriented" programming among engineers and scientists shows
>!that they have finally come to realize that the structure and
>!organization of data are important---not exactly one of Fortran's
>!strong points.                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
>^^^^^^^^^^^^^^^

>Have you taken a look at Fortran-90 lately?  If you have, you'll have
>noted that the structure and organization of data are indeed strong
>points in F90.  As far as the recent (1980-present) fashionable
>interest in object-oriented this-and-that, F90 supports data-hiding via
>modules, generic subprograms, operator and function overloading...

Seeing as how I haven't seen any Fortran-90 compilers around, the
improved features in this "new" language are largely irrelevant.  From
what I can see, most of the people that have been writing code in
Fortran are still using the features of Fortran-77.  

If you develop F90 code, you're throwing away portability, because
it's not clear that many people actually have access to a F90
compiler.  It certainly isn't something that gets bundled as the
"standard Fortran compiler" on the university mainframes.  If YOU
develop F90 code, I certainly won't be able to use it, because between
the dozen or so different systems I have access to, NONE of them has
an F90 compiler.  Several of them have quite nice F77 compilers...
All of them have C (in at least K&R form), some have C++, most have
Lisp, and some have Forth.  No F90 on the list...

The even BIGGER problem is the fact that these improved features
really make it a new language.  The fact that it may be backwards
compatible is NOT a bonus.  It just means that a lot of people will
continue to write "old style" FORTRAN code, and just ignore the
features that have been added.  And the people that want to go OOP
will have to do it in what is, in essence, a new language.  And
this means that there's not much cost to ACTUALLY going to a new
language, like C++.

Scientists and engineers use FORTRAN because it is the language that
they were taught.  I would be surprised if there are very many
universities that are teaching their new undergrads FORTRAN-90 right
now.  They're either teaching F77, because they have (a) Texts for
that, (b) Compilers for that, and (c) Instructors with 15 years of
experience at teaching FORTRAN-77.

FORTRAN 77 will never die - like it or not - and I seriously doubt
that it will be supplanted by FORTRAN 90.

--
Christopher Browne

University of Ottawa
Master of System Science Program



Wed, 08 Feb 1995 07:15:11 GMT  
 Small Language Wanted

Quote:

> Could everyone who follows up this flame war please remove
> comp.lang.logo from the newsgroup list?  Thank you.

Likewise for comp.lang.scheme, please.
--
Larry Campbell             The Boston Software Works, Inc., 120 Fulton Street



Wed, 08 Feb 1995 23:45:50 GMT  
 Small Language Wanted

Quote:


>: Not to fan a flame war, but indeed C++ is _excellent_ for working with
>: complex numbers, etc.  And, nobody will accuse you of using an outdated
>: language.

>C++:  complex A, B, C;

>C = A + B

>{ get A and B, call "+" operator.  Create new temporary structure for
>  result by calling complex constructor.  Run "+" operator.
>  call overloaded "=" operator.  Copy into C. Delete temporary.}

The calls to operator "+" and operator "=" will be inlined.
Smart compilers (including Cfront) will optimize the temporary away.
The resulting object code is exactly the same as would result from
equivalent Fortran.

Quote:
>And can C++ optimize

>for (i=1; i<1000; i++) {
>    <junk not altering A and B>
>    C = A + B
>    <more junk not altering A and B>
>    func(C)
>}

>by taking out C=A+B as a loop invariant?

Yes.

Quote:
>How can it if the "+" and "=" operators could conceivably do *ANYTHING*
>which might possibly alter something else somewhere else.

These operators are declared as inline functions, so the
compiler can see exactly what they do and can thus make the
appropriate optimizations.

--

This .signature virus is a self-referential statement that is true - but
you will only be able to consistently believe it if you copy it to your own
.signature file!
--

This .signature virus is a self-referential statement that is true - but
you will only be able to consistently believe it if you copy it to your own
.signature file!



Thu, 09 Feb 1995 16:41:17 GMT  
 
 [ 11 post ] 

 Relevant Pages 

1. Summary: Small Language Wanted

2. Summary: Small Language Wanted

3. Small Language Wanted

4. Scientists as Programmers (was Re: Small Language Wanted)

5. Summary: Small Language Wanted

6. Summary: Small Language Wanted

7. Small Language Wanted

8. Scientists as Programmers (was Re: Small Language Wanted)

9. Small Language Wanted

10. Wanted: small meta-data language

11. WANTED: Small Smalltalk for teaching purposes

12. Newbie wants to write a small program...

 

 
Powered by phpBB® Forum Software