GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Main page
  • Contents
  • Current events
  • Random article
  • About Wikipedia
  • Contact us
  • Help
  • Learn to edit
  • Community portal
  • Recent changes
  • Upload file
  • Special pages
  • Search
  • Donate

This view

  • Original page
  • New address

GeezerVison is showing en.wikipedia.org — Pnuts - Wikipedia

icon
This article needs more citations. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.
Find sources: "Pnuts" – news · newspapers · books · scholar · JSTOR
(November 2018) (Learn how and when to remove this message)
The topic of this article may not meet Wikipedia's general notability guideline. Please help demonstrate the notability of the topic by citing reliable secondary sources that are independent of the topic and provide significant coverage of it beyond a mere trivial mention. If notability cannot be shown, the article is likely to be merged, redirected, or deleted.
Find sources: "Pnuts" – news · newspapers · books · scholar · JSTOR
(November 2018) (Learn how and when to remove this message)
Pnuts
ParadigmObject-oriented, Scripting
DeveloperToyokazu Tomatsu (Sun Japan)
First appeared1997
Stable release
1.2.1 / July 24, 2007 (2007-07-24)
Typing disciplinestatic, dynamic, duck
PlatformJVM
OSCross-platform
LicenseSun Public License
Websitehttp://java.net/projects/pnuts (2017 archive)
Influenced by
Java
Not to be confused with the smaller research station at the Semipalatinsk Test Site, known to the Department of Defense as PNUTS (Possible Nuclear Underground Test Site).

Pnuts is a dynamic scripting language for the Java platform. It is designed to be used in a dual language system with the Java programming language. 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<String> countries = new ArrayList<String>(); 
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, such as a module system and bytecode compiler.

Commercial usage of Pnuts includes Rockwell Automation's FactoryTalk development system.

It looks like the project is no longer under development.

External links

  • Rockwell Automation - FactoryTalk
Retrieved from "https://en.wikipedia.org/w/index.php?title=Pnuts&oldid=956140378"
Categories:
  • JVM programming languages
  • Scripting languages
  • Object-oriented programming languages
  • Java programming language family
Hidden categories:
  • Articles needing additional references from November 2018
  • All articles needing additional references
  • Articles with topics of unclear notability from November 2018
  • All articles with topics of unclear notability
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.