Re: f95 interpreter

From: Jason Nielsen (jdn_at_cs.sfu.ca)
Date: 10/18/04


Date: Mon, 18 Oct 2004 19:07:37 GMT


> Jason Nielsen <jdn@cs.sfu.ca> writes:
>
>> I was wondering if there is a good reason why an f95 interpreter
>> doesn't exist (or at least I'm not aware of one)...
>
> I hadn't been aware of the HiCest that Douglas Cox pointed out. A
> quick skim of the web site shows that it is a very much a
> subset and, while it might be a useful tool in its own right, it
> doesn't look plausible as something to develop/debug standard Fortran
> code in. (For just one example, no integer type - everything is real).
>
> I vaguely recall something about an old f77 (or maybe prior)
> interpreter.
>
>> Is it simply because it is really hard to do or
>> because nobody has taken the time/had the inclination to do it?
>
> Well, that's sort of two sides of the same reason. (If it were easy,
> then it wouldn't take much time/inclination). But I'd say that yes,
> that's part of it. It is clearly possible, at least with some modest
> restrictions. The question is whether there is sufficient market for
> such a thing. (The same market concept applies to free software - even
> when money isn't directly involved, it tends to take a substantial
> number of interested people to motivate a free software effort; we might
> as well call it a market).
>
> As to why there isn't adequate market. That's harder to say, but it
> is pretty easy to observe that there isn't. Occasionally people ask,
> like you, but you don't hear a lot of people asking, or almost anyone
> doing so very pointedly.
>
> A big piece of the Fortran market is performance oriented. That is
> sometimes cited as a reason. It might be a contributor, but I can't
> see it as the whole reason, because there are clearly also other
> segments of the market.
>

Well I assumed that was the case but I was wondering if there was some
other esoteric reason such as a Fortran brotherhood of interpreted
language haters ;-)! It seems to me that it wouldn't be that hard to do
since one could use an already existing interpreted language and simply
create the syntax on top of it (OCaml for instance using the camlp4
pre-processor) .... likely I'm being a bit naive here but that is my first
impression. Not as hard as making a compiler I would think and there
seems to be two separate open source groups working on that one! Thanks a
million to both groups although it does seem a little wasteful of
resources!

It seems to me that if f95 had such an interpreter that more people might
be attracted to the language. I actually write all my code in R and once
I have it working I translate it into Fortran and then make wrappers and
dynamically load it back into R. This might sound bizarre but I like the
speed of Fortran and the R environment for its graphics etc. It is pretty
easy to do with a good operator overloaded f95 module mimicking the R
syntax for most of the matrix functions and a perl script that changes
obvious differences in control structures... then manually add in data
types and inspect. I find this takes less time than trying to do it from
scratch in Fortran and less error prone! Thanks for the input.

Cheers,
Jason



Relevant Pages

  • Re: Intrinsic functions in fortran 90
    ... (PL/I will even convert character data, though that might be beyond the call of duty. ... Maybe more obvious, Fortran FORMATTED I/O has to interpret the format strings, or an intermediate representation of them. ... PL/I can, and usually does, do fixed/float conversions inline, though such conversions are often slow. ... the comparison to an interpreter is fair. ...
    (comp.lang.fortran)
  • Re: A question on Newtons Method
    ... > Jon Harrop wrote: ... >> archaic theoretical foundation, other languages aren't. ... >> forced to use old code, I see no reason to use Fortran. ... > repository there's every reason to join Fortran literacy club. ...
    (sci.math.num-analysis)
  • Was there a negative real zero possibility in early Fortran?
    ... 99 (WRITE ERROR MESSAGE) ... I already have found severe errors; one example is this original code ... I know this version was written for an IBM 360 in Fortran H (Fortran ... Is there any reason why the programmer is testing in some cases, ...
    (comp.lang.fortran)
  • Re: Bug tracking system recommendation
    ... >>for avoiding an interpreter is usually also reasons to avoid Java. ... and that reason might equally apply to Java as well. ... One reason to avoid interpreters is that you don't want to install extra ...
    (comp.lang.java.programmer)
  • Re: coding style as part of language spec.?
    ... Is the interpreter a lot smarter than ... whatever reason, it looks like this: ... False premise, that just never happens. ...
    (comp.programming)

Loading