Re: Decompilable interpreter/compiler hybrid

Timothy Knox <tdk@thelbane.com>
4 Jul 2003 00:05:46 -0400

          From comp.compilers

Related articles
Decompilable interpreter/compiler hybrid samir.ribic@alemsistem.com.ba (2003-07-02)
Re: Decompilable interpreter/compiler hybrid tdk@thelbane.com (Timothy Knox) (2003-07-04)
Re: Decompilable interpreter/compiler hybrid alex_mcd@btopenworld.com (Alex McDonald) (2003-07-04)
Re: Decompilable interpreter/compiler hybrid Martin.Ward@durham.ac.uk (Martin Ward) (2003-07-04)
Re: Decompilable interpreter/compiler hybrid vbdis@aol.com (2003-07-13)
| List of all articles for this month |
From: Timothy Knox <tdk@thelbane.com>
Newsgroups: comp.compilers
Date: 4 Jul 2003 00:05:46 -0400
Organization: Compilers Central
References: 03-07-022
Keywords: design
Posted-Date: 04 Jul 2003 00:05:46 EDT

On Wed, Jul 02, 2003 at 12:44:19AM -0400, Samir Ribic wrote:
> I have an idea to design simple programming language that will be in
> the same time compiled and interpreted. The language can consist of
> expressions, functions and statements EXIT IF to conditionally leave
> function, and LOOP IF to conditionally restart the function.
>
> The idea is that :
> a) Source code is same as object code (interpreter's idea). In memory
> actually stands only machine object code. When displayed on screen, or
> edited in editor, it will be decompiled to ASCII. Every time when the
> line is entered, it will be compiled to machine code
>
> b) However, the object code is standalone and can be run without
> additional interpreters or libraries. (compiler's idea)
>
> The language is aimed for diskless computers with very low RAM (8 bit
> computers or pocket devices) where keeping source and object code in
> memory is too limiting, while interpreters are too slow.
>
> Does such kind of decompilable interpreter/compiler hybrid exist?
> AFAIK, the most similar concept has language Forth, however it still
> needs an interpreter.


I guess I must not understand your problem. Specifically, why is Forth an
unacceptable choice for your problem domain? Yes, Forth has an interpreter,
but the whole language is so incredibly lightweight that including all of
the baggage that a development environment brings with it (ie IDE, sample
code, documentation, and so on) could for a long time (ie as recently as
1998 or so) fit on TWO floppy disks. And THAT was an environment for doing
Mac OS development. I remember hacking around with Forth back in the early
1980s where the entire environment (interpreter, editor, dictionary, AND
operating system) could fit in 8KB of memory.


So if you are simply trying to find decompilable languages with a small
memory footprint and a combination interpreted/compiled nature, look hard
at Forth. OTOH, if you are simply looking to create such a language as a
fun personal project, again, look hard at Forth, as your language can learn
much from the Forth way of thinking.


Just my 2.36 yen, YMMV, void where prohibited by law.
--
Timothy Knox
tdk@thelbane.com
"War is Peace. Freedom is Slavery. Windows is an Operating System."


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.