Pnuts
   HOME

TheInfoList



OR:

{{distinguish, text=the smaller research station at the
Semipalatinsk Test Site The Semipalatinsk Test Site or Semipalatinsk-21 (; ), also known as "The Polygon", was the primary testing venue for the Soviet Union's nuclear weapons. It is located in Zhanasemey District, Abai Region, Kazakhstan, south of the valley of the Ir ...
, known to the Department of Defense as PNUTS (Possible Nuclear Underground Test Site) Pnuts is a
dynamic Dynamics (from Greek δυναμικός ''dynamikos'' "powerful", from δύναμις ''dynamis'' "power") or dynamic may refer to: Physics and engineering * Dynamics (mechanics), the study of forces and their effect on motion Brands and enter ...
scripting language In computing, a script is a relatively short and simple set of instructions that typically automation, automate an otherwise manual process. The act of writing a script is called scripting. A scripting language or script language is a programming ...
for the
Java platform Java is a set of computer software and specifications that provides a software platform for developing application software and deploying it in a cross-platform computing environment. Java is used in a wide variety of computing platforms fr ...
. It is designed to be used in a dual language system with the
Java programming language Java is a high-level, general-purpose, memory-safe, object-oriented programming language. It is intended to let programmers ''write once, run anywhere'' ( WORA), meaning that compiled Java code can run on all platforms that support Jav ...
. The goals of the Pnuts project are to provide a small, fast scripting language that has tight integration with the Java language. Pnuts uses syntax that is simple and friendly to Java developers, while also being very expressive.


Relationship to Java

Because Java and Pnuts share the same type system, Java code can easily invoke or define Pnuts functions. Likewise, Pnuts code can easily manipulate Java objects. Pnuts code can even define Java classes. Because Pnuts compiles to Java byte codes, these classes can be used by Java just like any other class. A class written in Pnuts can even later be replaced by a class written in Java with no other code changes. Pnuts syntax can look very similar to Java. The following is a code sample written in Java that is also a valid Pnuts script: import java.util.ArrayList; import java.util.List; List countries = new ArrayList(); countries.add("Canada"); countries.add("Austria"); countries.add("Brazil"); Collections.sort(countries); for (String country : countries) System.out.println("Hello " + country); Alternatively, the expressiveness of Pnuts could be utilized: use("pnuts.lib") // Standard module that makes sort, println and other functions available. countries = Canada", "Austria", "Brazil" sort(countries) for (country : countries) println("Hello " + country)


History

Pnuts was originally developed in 1997 by Toyokazu Tomatsu as a testing tool for Java classes. Pnuts has since been extended, mainly focusing on essential functionality required for a Java-based
scripting engine A template processor (also known as a template engine or template parser) is software designed to combine ''template''s with data (defined by a data model) to produce resulting documents or programs. The language that the templates are writte ...
, such as a
module system Modular programming is a software design technique that emphasizes separating the functionality of a program into independent, interchangeable modules, such that each contains everything necessary to execute only one aspect or "concern" of the de ...
and bytecode compiler. Commercial usage of Pnuts includes
Rockwell Automation Rockwell Automation, Inc. is an American provider of industrial automation and digital transformation technologies headquartered in Milwaukee, Wisconsin. Its brands include Allen-Bradley, FactoryTalk software and LifecycleIQ Services. Rockwell ...
's FactoryTalk development system. It looks like the project is no longer under development.


External links


Rockwell Automation - FactoryTalk
JVM programming languages Scripting languages Object-oriented programming languages Java programming language family