Re: [NTLK] Feasibility of getting away from NTK

From: Zachery Bir (zbir_at_urbanape.com)
Date: Thu May 20 2004 - 14:07:15 PDT


On May 20, 2004, at 3:33 PM, Paul Guyot wrote:

> 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

Right, so I gathered.

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

Good :)

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

I've got the whole NewtDev package installed in /Developer/

> 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).

Sadly, I have little (more like no) experience with C++.

> 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.

I'm more a high-level programmer. Python is my poison. The closest I've
come to interpreting anything is writing custom handlers for XML
parsers. I've never taken a compiler course (nor read the seminal works
like Structure and Interpretation of Computer Programs, though, I've
got the PDF ;^)

Zac

-- 
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 : Thu May 20 2004 - 14:30:02 PDT