[NTLK] Developer news...

Steven Frank stevenf at panic.com
Mon Mar 9 14:01:19 EDT 2020


> On Mar 9, 2020, at 6:06 AM, Matthias Melcher <m.melcher at robowerk.de> wrote:
> 
> https://github.com/MatthiasWM/NEWT64
> 
> It will compile and run NewtonScript in 64 bit already. It's untested, and particularly the package reader and writer, and streaming format reader and write will probably not work.
> 
> Any testing and feedback is appreciated.

I successfully built the newt binary and it runs, although it maybe needs math lessons:

--------
$ newt -b -e 'foo := 1 + 2'

*** byte code ***
'{
	class: CodeBlock, 
	instructions: <Binary, class "binary", length 8>, 
	literals: [
		literals: 
		foo
	], 
	argFrame: {
		_nextArgFrame: NIL, 
		_parent: NIL, 
		_implementor: NIL
	}, 
	numArgs: 0
}

     0 : 24                  push-constant (b =   4)
     1 : 27 00 08            push-constant (b =   8)
     4 : c0                            add          
     5 : a8               find-and-set-var (b =   0)
     6 : 70                       find-var (b =   0)
     7 : 02                         return          
--------

Seems to be adding 4 + 8 rather than 1 + 2.  Unless this is a quirk of how NS represents numbers?  (I will once again confess to having very little NS experience.)

What would be helpful, especially to me, is a small number of NewtonScript samples, and what their correctly compiled bytecode is supposed to look like.  Got any?

Steven




More information about the NewtonTalk mailing list