Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ANN: FEMTOL

10 views
Skip to first unread message

Arjen Markus

unread,
Apr 1, 2007, 4:15:51 AM4/1/07
to
ANNOUNCE: FEMTOL - A reimplementation of Tcl in FORTRAN
-------------------------------------------------------

I am pleased to announce FEMTOL 0.1 alpha - a reimplementation of the
Tcl
language and interpreter in FORTRAN 77. While the implementation is
not
complete yet, it is in a useable state and I would lilke to encourage
you all to try it.

Where to get it?
----------------

FEMTOL is available via the CVS repository of the SourceForge project
http://ftcl.sf.net. The remaining limitations are documented there.

Why FORTRAN 77?
---------------

I had a number of personal reasons to realise the FEMTOL program and
accompanying library: Fortran and Tcl are my two favourite programming
languages and this is the ultimate combination.

But more importantly, the technical and educational reasons:
- FORTRAN 77 is a venerable standard for a widespread, yet
underestimated
language.
- While several newer standards exist, most notably Fortran 90/95,
these
are not routinely taught in Computer Science classes.
- As FORTRAN 77 has no pointers, just like Java, there can be no
memory
leaks, no dangling or uninitialised pointers, all well-known sources
of nasty bugs in C.
- The programming model for character strings is much more robust than
in C. Forget to take the trailing nul character into account and you
enter a wilderness filled with strange and highly intractable bugs.
Not so with FORTRAN 77!
- Furthermore, FORTRAN 77 allows many optimisations and debugging
facilities that are simply impossible in C, such as array-bound
checking and the absence of aliasing.
- Because FORTRAN 77 has built-in support for complex number, FEMTOL
allows complex arithmetic.
Here is a simple example:

FEMTOL>
set x (0,1)
(0,1)
FEMTOL>
* $x $x
(-1.,0.)

Future developments
-------------------
The last couple of years free Fortran 95 compilers have become
available. This makes extending FEMTOL with array operations (known
from
the NAP extension for instance) quite feasible at little exta cost.
Fortran 95 will also enable me to solve most, if not all, of
the remaining limitations.

Michael Schlenker

unread,
Apr 1, 2007, 7:24:43 AM4/1/07
to
Arjen Markus schrieb:

> ANNOUNCE: FEMTOL - A reimplementation of Tcl in FORTRAN
> -------------------------------------------------------
>
> I am pleased to announce FEMTOL 0.1 alpha - a reimplementation of the
> Tcl
> language and interpreter in FORTRAN 77. While the implementation is
> not
> complete yet, it is in a useable state and I would lilke to encourage
> you all to try it.

Cool. What version of Tcl do you try to reimplement?
Did you already run something like tclbench on it?

Michael

Beliavsky

unread,
Apr 1, 2007, 9:59:25 AM4/1/07
to
On Apr 1, 6:24 am, Michael Schlenker <schl...@uni-oldenburg.de> wrote:
> Arjen Markus schrieb:
>
> > ANNOUNCE: FEMTOL - A reimplementation of Tcl inFORTRAN
> > -------------------------------------------------------
>
> > I am pleased to announce FEMTOL 0.1 alpha - a reimplementation of the
> > Tcl
> > language and interpreter in FORTRAN77. While the implementation is

> > not
> > complete yet, it is in a useable state and I would lilke to encourage
> > you all to try it.
>
> Cool. What version of Tcl do you try to reimplement?
> Did you already run something like tclbench on it?

Hmmm. It IS April 1. At Sourceforge in the file ftcl-0.9.zip I see
Fortran 90, not Fortran 77 code. Despite the reasons cited by Mr.
Markus for using Fortran 77, I'd be surprised if a knowledgeable
Fortran 95 programmer (which he is) wrote an interpreter in F77.
Fortran 90 and later versions do have pointers, which can cause memory
leaks if used improperly, but one could decide not to use them but
still leverage the other modern features of Fortran 95.

Egg on my face if I am wrong about this -- no offence is intended to
Mr. Markus.

Arjen Markus

unread,
Apr 2, 2007, 2:42:33 AM4/2/07
to

You are quite right - for a serious project regarding an
interpreter I would not use FORTRAN 77. But in this special
case, I did: it is in the CVS repository (not the released files).

The thing that proved to be very hard was the lack of recursive
routines, not so much lack of dynamic memory allocation or the
fixed string length in FORTRAN 77.

So the interpreter in that repository is less complete than
I intended, and I did have a very hard deadline :).

Regards,

Arjen

Beliavsky

unread,
Apr 2, 2007, 9:03:22 AM4/2/07
to
On Apr 1, 4:15 am, "Arjen Markus" <arjen.mar...@wldelft.nl> wrote:
> ANNOUNCE: FEMTOL - A reimplementation of Tcl in FORTRAN
> -------------------------------------------------------
>
> I am pleased to announce FEMTOL 0.1 alpha - a reimplementation of the
> Tcl
> language and interpreter in FORTRAN 77. While the implementation is
> not
> complete yet, it is in a useable state and I would lilke to encourage
> you all to try it.

I tried to compile the sources in the CVS repository using

g95 femcmd.f femparse.f femtst.f

and got the error message

femcmd.f:(.data+0x0): undefined reference to `fmpnam_'

and I get a similar message with Lahey/Fujitsu, but the program
compiles and runs with Intel Visual Fortran and gfortran .

I'm glad I qualified my statements in the other message :).


Arjen Markus

unread,
Apr 3, 2007, 2:48:29 AM4/3/07
to

femparse.f and femtst.f are test drivers.

You should compile/link via:

g95 -o femtol femtol.f femcmd.f

Regards,

Arjen

0 new messages