Re: [NTLK] Feasibility of getting away from NTK

From: Paul Guyot (pguyot_at_kallisys.net)
Date: Thu May 20 2004 - 12:33:21 PDT


Aux environs du 20/05/04 ā 15:08 -0400, sous le titre "Re: [NTLK]
Feasibility of getting away from NTK", Zachery Bir prit sa plus belle
plume pour écrire les mots suivants:
>So, now I think I'm focused enough to explore and read up on this
>stuff. Any pointers? Start more generally with respect to
>compilers/interpreters, or get into Newton-y bowels with you?

If you want to go to path (b) (i.e. replace NTK with something else
capable of compiling NewtonScript code) you need:
- a NewtonScript bytecode interpreter
- a NewtonScript compiler

There is no need to dive into any bowels for this.

As far as reading is concerned, I suggest the NewtonScript Reference
and Newton Formats 1.1. Both are on UNNA (I think).

Compilation probably should be done with the help of tools like Lex
and Yacc. I also suggest using the DCL as the underlying library to
manipulate NewtonScript objects (i.e. frames, arrays, immediates and
so on). It probably could be improved performance-wise (there is no
garbage collect, instead everything is ref-counted on the stack), but
the DCL exists and it already generates NSOF and packages. It would
save a lot of time on the interpreter (at least to get it working). I
suspect writing an 1.x interpreter with the DCL would take a week at
most with hobbyist skills and time and a good level in C++. (the 2.0
format is not documented but once you got 1.x functions working, it
will be very easy to also get 2.x optimized functions working as
well).

Alternatively, the compiler could directly generate NSOF and the NSOF
could be used as the input to the DCL to generate packages from it.
The only missing part in package generation is relocation, but this
won't be a problem until you are able to generate native code.

I can give you more pointers if you tell me what your skills are and
what your objectives are.

Paul

-- 
Philosophie de baignoire - consultations sur rendez-vous.
NPDS/NewtonOS: http://newton.kallisys.net:8080/
Apache/FreeBSD: http://www.kallisys.com/
-- 
This is the NewtonTalk list - http://www.newtontalk.net/ for all inquiries
Official Newton FAQ: http://www.chuma.org/newton/faq/
WikiWikiNewt for all kinds of articles: http://tools.unna.org/wikiwikinewt/


This archive was generated by hypermail 2.1.5 : Fri May 21 2004 - 04:00:01 PDT