This answers some Frequently Asked Questions about Newt, the native Newton development environment. This is same content as the usual FAQ text, but with references to a separate page for information about current releases. As time permits, I plan to revise this FAQ to correspond to new versions of Newt, and to clarify old & new user questions.
For most current information, see main NewtDevEnv page or revision history.
Newt (aka NewtDevEnv) is an environment for developing applications using NewtonScript and saving as packages directly on your Newton. (You can also use a PC, Mac or Unix system to edit source code and transfer and debug via terminal emulator).
Keywords: object-oriented programming, application development environment, NewtonScript, NTK.
History. Like a chameleon, Newt has evolved to provide different functionality to different users. The first version of Newt in Oct. '93, inspired by the Inspector Gadget and Dot2Dot examples from Apple, allowed you to draw graphics using NewtonScript -- the turtle, its amphibious cousin and name inspiration, used Logo. You, the learner, could use Newt to explore mathematics via a turtle microworld, or add NewtonScript methods to emulate Logo commands and data structures.
With enthusiastic feedback from early users, successive versions allowed you to create objects based on Newton interface prototypes and save as an application. Newt's application icon reflects both its original turtle personality as well as its later, and more dominant, application personality.
NewtonScript is Newton's built-in, object-oriented (o-o) language. NewtonScript (NS) shares ancestry with dynamic o-o languages like Smalltalk, Self, Common Lisp, and ObjectLogo. NewtonScript code is compiled into bytecodes and interpreted on the Newton. Although NewtonScript is fast enough for most applications (especially on NOS 2.x), a RISC(native) compiler in NTK 1.5 can be used to dramatically speed up selected NewtonScript methods (though making them much larger in the process). For more advanced users, familiarity with o-o concepts and constructs would be useful; for others, Newt could provide an introduction to these ideas.
Like NTK from Apple, Newt uses NewtonScript to define objects and methods. NTK provides an excellent (and the only) framework for building large, complex, industrial-strength applications. However, a high-end desktop (Mac or Windows) required for NTK can be bulky (and expensive) for development.
With Newt, you can develop applications directly on your Newton, or develop them in a text editor on a PC, Unix workstation or Macintosh. You can copy the text into NCK, or use use a desktop terminal emulator to transfer the source text using Sloup and also to debug.
Newt is shareware and costs $25.00**, including support. However, as a one person effort, Newt does not have as much documentation and as many features as NTK. See later questions for further discussion of Newt's current features and limitations.
**Students or Newt's Cape users: ask me about a discount.
VisualNewt is a Newton-based graphical interface by Serg Koren. It can be used as a front-end for creating NewtonScript source code that can then be used by Newt, or it can use Newt's plugins directly for constants and saving packages. Since VisualNewt is still in its early stages, the integration and overlap between NewtDevEnv and VisualNewt is evolving; to give users greater choice (and avoid charging twice for shared plugins), there are two different configurations for each currently, with or without plugins, e.g.,
You create an application from source text that is stored in a Notes folder, e.g., Business. The source text contains object definitions for your application, and optional methods to add to Newt itself for use in development. Once you have built an application in Newt, you run and test it directly in Newt.
From Newt, you can save an application as a package using the NewtPack plug-in, and then run it from Extras, use package utilities to archive it, or back it up to the desktop with NCK and then use an ExtractPackage utility.
The Newt Application Tutorial (NewtATut) book (current release) demonstrates this basic application development process.
Basically, yes, if you have enough documentation, frame heap, and perseverance. You may also need to structure your application and adapt NTK examples somewhat to fit Newt's style and to work around Newton system limitations. Newt has been tested extensively with 200+ examples, including versions of most of the DTS (Apple Developer Technical Support) examples, and other publicly available source examples. A few examples:
Since Newt 3.0, there is no difference (as far as I can tell) between a Newt and a NTK-generated package. Both reside in a special area known as package memory. When you open your application, the package uses some dynamic memory -- also known as frame heap -- for run-time state (the "view"); however, much of the application (the "template") remains in read-only package memory. Although NewtPack does not save font or store parts currently, it does save applications, books, autoparts and multipart packages.
During development, Newt creates an application entirely in dynamic memory, except for references to built-in (ROM) objects. During the save process, Newt copies the application into package memory.
In ancient versions of Newt (pre-3.0, and for 3.0 users of pre-1.3 ROM OMP (Original Message Pads), RUNewt could be used to save Newt applications in a soup. You could later run these applications with RUNewt, or beam/mail them to other users. It served as an installer (for Newt applications), launcher (similar to Extras) and a run-time library (for "platform functions"). RUNewt is no longer needed/supported since NewtPack works even on OMP (at least for "small" applications).
Newt can currently construct most of the DTS (Developer Technical Support) examples that come with NTK and many others (see examples.txt). However, since applications mostly reside entirely in heap when they are constructed, you may eventually see the dreaded "Newton does not have enough memory to do what you want now. Do you want to Restart?" (or Exception |evt.ex.outofmem|: (-48216) Ran out of Frames Heap memory).
Hopefully, newer revisions of the Newton system software and hardware will allocate more space for frame heap and manage it more effectively. You can also use package utilities to reduce the number of packages that you have installed. Newt 3.x also handles heap better and allows larger applications to be developed and saved as packages.
Practically, the maximum for a regular application (entirely in heap) would be ~50K. However, if certain objects are obtained from other packages (e.g., PlatFunc) or from soups via special techniques (e.g., library packages; guitune.nwt), packages can be much larger -- over 100K.
There are two formats for an application:
You can transfer the source from Notes by emailing or beaming directly to another Newton, or by transferring the text to a desktop text file via Newton Connection Kit or Sloup. The other Newton user can then build and compile the application from the NewtonScript source using Newt.
You can beam a Newt-generated package to another Newton (for 1.x, use a third-party utilities such as BeamPkg or ScrollEx). You can backup to your desktop computer using Newton Connection Kit, then use a Mac or Windows ExtractPackage utility to copy the package from the backup file, and then give this to someone else on a floppy, send as an email attachment, or upload to an information server/service. For NOS 2.x, use Package Buddy, X-Port or Newton Package Uploader.
Since Newt 3.1, normal ("form") packages appear in Extras automatically when they are saved and installed. If you have "autoparts", these are patches or plug-ins that do not appear in Extras (except in NOS 2.x "Extensions"). Newt can also save books (created programmatically); Newt's Cape can also save books. Newt will add the ability to create other kinds of packages (font parts, store parts,...) as these are documented (and there is demand).
Newt currently includes and documents 59 common system prototypes and viewclasses (all those documented in NTK) for 1.x (and another 140+ protos for NOS 2.0). User prototypes are an economical way to define your own version of a system prototype with your own default and additional slots and methods, and use it in several places in your application. You can also include objects that contain other views, e.g., an NTK "linked layout". Finally, you can use other objects in the ROM or in other applications (e.g., the Life 1.4 example borrows native code methods).
"Platform functions" are additional functions (like RegisterCardSoup) that are not built-in to the Newton ROMs, but are normally included as needed by NTK. All of the platform functions are provided by the PlatFunc plug-in and can be used by a Newt application.
With Sloup, you can transfer hexadecimal strings that represent bitmap, PICT, sound and IR remote control code resources -- these can be copied directly from ResEdit. After you upload these to a "Bitmaps", "Sound" or "IRCD" soup, your application can access these at definition or at run-time. All of the DTS examples involving graphics, sound and IR have been built, saved and run successfully. However, there are some size constraints, especially for sounds, due to heap limitations (see How large an application can I build with Newt?). There may be other 3rd party solutions appearing that will assist in the conversion and transfer of graphic resources. For example, the Newt's Cape Graphic Converter can convert GIF, PICT and BMP graphics files for transfer to the Newton.
You can use a variety of techniques to enter/edit source code.
As you add objects to your application in Newt, you can test objects and behaviors incrementally. In addition, you can use Newt with NTK's Inspector or with Sloup as a remote debugging tool to evaluate and print expressions interactively via the keyboard, or programmatically Print values and errors. Newt does not currently support more advanced features such as trace or breakloop.
(Sloup has been mentioned in several earlier answers). Although Sloup is not required for Newt, it is a very convenient, free companion tool that can be used in conjunction with a desktop terminal emulator to:
Newt does not currently provide a layout editor or object browser like NTK -- instead, objects are organized hierarchically via "pathnames" and represented textually. Newt does not provide constants as generally as NTK: it provides development-time constants for "Evaluate" slots, and a limited form of "DefConst". Most compile-time functions from NTK can be accessed in Newt via built-in or user-defined methods.
On the plus side, since development is incremental, you can test the behavior and layout of an application immediately and more accurately without having to go through a complete build and upload cycle. You can also test install and remove scripts interactively. It is very easy to add "helpBooks" with Newt (see NewtATut example) or Newt's Cape; for NTK, Bookmaker is cumbersome. It may even be easier to build and re-use user prototypes and "linked layouts" in Newt compared to NTK. Newt's "declare" mechanism for naming children is simpler. NTK has some separate constructs such as "afterScripts" that Newt finesses.
NTK provides profiling, which can be useful for determining bottlenecks in an application. It also provides for native RISC compilation -- this can provide significant speedup (though at a much larger size) for selected methods that primarily do primitive integer and array operations. Although Newt cannot currently compile to native code, it can use existing native code, e.g., from a "code library" such as Life.
Newt is appropriate if you want to learn about NewtonScript programming and Newton application development, if you would like to build and distribute small to moderate-sized applications, or if you want to do some portable prototyping or lack a NTK-capable system. Since Newt complements NTK, some Newt users are also using or considering NTK. Newt's turtle personality can provide a portable learning environment for children. Current world-wide Newt users include PC developers, university students, professors, financial traders,....
Newt could evolve in many possible directions: more examples, more documentation, non-programmatic application interfaces, support for application-specific development like database forms, integration with other Newton applications -- as with most shareware, how Newt will evolve depends greatly on the feedback and level of support from users.
Here is latest public version of Newt
Short descriptions and latest file URLs may be found on the current Newton page for:
Newt is an inexpensive, compatible way to start learning about NewtonScript, prototype objects and the Newton system. Even if you have NTK, Newt can provide new perspectives and examples for (portable) Newton programming.
Newt is fully functional for many applications, but its public documentation is minimal and includes only a few examples. Registered users can download* files via http(web) or ftp for the latest versions of packages, additional development plug-ins (listed in plugins.txt), 200+ source examples (listed in examples.htm), and a 80+ page manual** (Acrobat format) describing Newt features and NewtonScript syntax and (1.x) functions.
As a registered user, you also receive additional packages (Sloup, beta and native versions of Newt, NewtPack), other information (Q&A documents, tutorials), patches for bugs (though there aren't many), notification about upcoming releases and examples, priority in answers to questions, and feedback on your applications (as time permits). Finally, registration encourages me to continue development of Newt and other shareware packages, and provides immediate relief for you of the insidious "shareware procrastination guilt syndrome".
*File Formats : Downloading is recommended (you access the most recent files more quickly, and I save time also).
**Electronic Documentation: Since the documentation is rapidly growing and changing, it has become impractical to provide a paper manual currently. Documentation is available initially as HTML files (and books via Newt's Cape), with some older files in Acrobat format.
*Email: If you provide me your preferred email address, it's easier for me to clarify options with you, and keep you informed about upcoming releases, examples, etc.
See the general registration info or current Newt registration info for a text form and more information about these options. To register: PayPal