| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Developers: NTK «Einstein Toolkit» Tutorial ROM Board | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
A NewtonScript IDE built into Einstein |
Einstein ToolkitEinstein now comes with a built-in developer environment (IDE) to compile and run scripts, and build and analyse packages. To launch this feature, named Toolkit, press Shift-Apple-T / Shift-Ctrl-T. |
Toolkit opens an editor window with a little NewtonScript example. You can test the Toolkit by slecting [Project - Run] from the pulldown menu, or simply by pressing Apple-R / Ctrl-R. |
Within seconds, the script should compile, and a package is created and uploaded to Einstein. If everything works, Toolkit will launch your new app for testing. To make sure that Toolkit did actually create a new app from scratch, go back into the editor, and change the text "Say Hello" into something else: "Aloha!". Press Apple-R / Ctrl-R, and Toolkit will compile, install, and run your new version of the sample app. |
NewtonScript and Einstein ToolkitToolkit uses newt/64 to compile the user code into a preset environment to achieve quick first results. It also allows complex code by describing every detail of the Package file. Toolkit is currently limited to a single script file. |
Line by Line
|
InternalsToolkit generates a Package description (add p(newt.app); to the bottom of the script to see what the predefined package description does. You can provide your own Package description by writing your own (newt.app := {...};). Toolkt generates its own local path to store a copy of the compiled packes. You can define a custom path by adding newt.pkgPath := "/some/path/hello.ns"; to the top of the script. |
Decompiling an existing PackageThe EInstein Toolkit can analyse and partially decompile existing .pkg files. Choose [Project - Decompile Package...] from the pulldown menu, choose a Package fiel on your file system, and Toolkit will present the data structure of the Package, ready to recompile into a new package. Toolkit currently functions into bytecode. It will eventually recreate NewtonScript for functions. |
TutorialCheck out the introductory tutorial to NewtonScript here. |
(c) 2021 messagepad@matthiasm.com - Impressum |