Yoix
Encyclopedia
In computer programming, Yoix is a high-level
High-level programming language
A high-level programming language is a programming language with strong abstraction from the details of the computer. In comparison to low-level programming languages, it may use natural language elements, be easier to use, or be from the specification of the program, making the process of...

, general-purpose, interpreted
Interpreter (computing)
In computer science, an interpreter normally means a computer program that executes, i.e. performs, instructions written in a programming language...

, dynamic programming language
Dynamic programming language
Dynamic programming language is a term used broadly in computer science to describe a class of high-level programming languages that execute at runtime many common behaviors that other languages might perform during compilation, if at all...

. The Yoix interpreter is implemented using standard Java
Java (programming language)
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...

 technology without any add-on packages and requires only a Sun-compliant JVM to operate. Initially developed by AT&T Labs
AT&T Labs
AT&T Labs, Inc. is the research & development division of AT&T, where scientists and engineers work to understand and advance innovative technologies relevant to networking, communications, and information. Over 1800 employees work in six locations: Florham Park, NJ; Middletown, NJ; Austin, TX;...

 researchers for internal use, it has been available as free and open source
Open source
The term open source describes practices in production and development that promote access to the end product's source materials. Some consider open source a philosophy, others consider it a pragmatic methodology...

 software since late 2000.

History

In 1998, Java technology was still emerging: the Swing toolkit was an add-on package; interruptible I/O, regular expressions, and a printf capability were not yet features; nor had Java Web Start been developed. Moreover, Java scripting languages were largely non-existent at that time: Groovy and JRuby had not yet been invented and Jython had just been created in late 1997. Browsers in 1998 had limited feature sets, were too unstable for production use in an 8-hour shift and were still fighting skirmishes in the Browser Wars. In this environment, Yoix technology was created in response to a pressing need for a reliable, easy to distribute and maintain, GUI front-end for a mission-critical application being developed within AT&T, namely its Global Fraud Management System, which to this day monitors and tracks fraud activity related to voice traffic on AT&T's expanding networks: wireline, wireless, and IP. Yoix technology was first released to the public in late 2000 under the Open Source Initiative Common Public License V1.0.

The Yoix name came about partially from the fox hunting cry of encouragement to the hounds, partially to echo another familiar four-letter name that ends in ix, and partially to avoid too many false-positives in a Google search.

Overview

Yoix technology provides a pure Java programming language
Java (programming language)
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...

 implementation of a general purpose dynamic programming language
Dynamic programming language
Dynamic programming language is a term used broadly in computer science to describe a class of high-level programming languages that execute at runtime many common behaviors that other languages might perform during compilation, if at all...

 developed by researchers at AT&T Labs
AT&T Labs
AT&T Labs, Inc. is the research & development division of AT&T, where scientists and engineers work to understand and advance innovative technologies relevant to networking, communications, and information. Over 1800 employees work in six locations: Florham Park, NJ; Middletown, NJ; Austin, TX;...

. Its syntax and grammar should be easy to learn for those familiar with the C programming language
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

 and Java. To an end-user, a Yoix application
Application software
Application software, also known as an application or an "app", is computer software designed to help the user to perform specific tasks. Examples include enterprise software, accounting software, office suites, graphics software and media players. Many application programs deal principally with...

 is indistinguishable from a Java application, but to the application developer
Software developer
A software developer is a person concerned with facets of the software development process. Their work includes researching, designing, developing, and testing software. A software developer may take part in design, computer programming, or software project management...

 Yoix should provide a simpler coding experience than working in Java directly, much like writing Perl
Perl
Perl is a high-level, general-purpose, interpreted, dynamic programming language. Perl was originally developed by Larry Wall in 1987 as a general-purpose Unix scripting language to make report processing easier. Since then, it has undergone many changes and revisions and become widely popular...

 code can be simpler than writing C code.

Features

The Yoix language is not an object oriented language, but makes use of over 165 object
Object (computer science)
In computer science, an object is any entity that can be manipulated by the commands of a programming language, such as a value, variable, function, or data structure...

 types that provide access to most of the standard Java classes
Class (computer science)
In object-oriented programming, a class is a construct that is used as a blueprint to create instances of itself – referred to as class instances, class objects, instance objects or simply objects. A class defines constituent members which enable these class instances to have state and behavior...

. Because the Yoix interpreter
Interpreter (computing)
In computer science, an interpreter normally means a computer program that executes, i.e. performs, instructions written in a programming language...

 is built entirely using Java technology, it means that Yoix applications are cross-platform
Cross-platform
In computing, cross-platform, or multi-platform, is an attribute conferred to computer software or computing methods and concepts that are implemented and inter-operate on multiple computer platforms...

, GUI
Gui
Gui or guee is a generic term to refer to grilled dishes in Korean cuisine. These most commonly have meat or fish as their primary ingredient, but may in some cases also comprise grilled vegetables or other vegetarian ingredients. The term derives from the verb, "gupda" in Korean, which literally...

-capable and both network
Computer network
A computer network, often simply referred to as a network, is a collection of hardware components and computers interconnected by communication channels that allow sharing of resources and information....

 and thread
Thread (computer science)
In computer science, a thread of execution is the smallest unit of processing that can be scheduled by an operating system. The implementation of threads and processes differs from one operating system to another, but in most cases, a thread is contained inside a process...

 friendly, yet Yoix developers find themselves insulated from the more complex and error-prone parts of coding the same functionality directly in Java. It does not use reflection to access Java functionality and thus adds value by not only simplifying access to that functionality, but also improving application reliability by coding through both Java glitches and complicated Java features one-time, behind-the-scenes. The Yoix language includes safe pointers, addressing, declarations
Declaration (computer science)
In programming languages, a declaration specifies the identifier, type, and other aspects of language elements such as variables and functions. It is used to announce the existence of the element to the compiler; this is important in many strongly-typed languages that require variables and their...

, and global
Global variable
In computer programming, a global variable is a variable that is accessible in every scope . Interaction mechanisms with global variables are called global environment mechanisms...

 and local
Local variable
In computer science, a local variable is a variable that is given local scope. Such a variable is accessible only from the function or block in which it is declared. In programming languages with only two levels of visibility, local variables are contrasted with global variables...

 variables. In addition to supporting native user functions, users can add their own builtin functions written in Java.

Design

The two central elements in the Yoix design are borrowed from the PostScript language: dictionaries as language components and permissions-protected dictionaries as exposed system components. Homage to the Tcl language and its exposure philosophy should also be given, though it did not have a direct influence.

Another key Yoix design element involves pointers and addressing. Pointers and pointer arithmetic in the Yoix language is syntactically similar to what is found in the C language, but the Yoix implementation prevents using a pointer outside its bounds. In addition, the address operator always produces a valid, usable result.

Overall, the Yoix design attempted to make the language easy to learn by programmers experienced with the C and Java languages.

Applications

The Yoix distribution includes the Yoix Web Application Instant Template (YWAIT), a software framework
Software framework
In computer programming, a software framework is an abstraction in which software providing generic functionality can be selectively changed by user code, thus providing application specific software...

 for building a Yoix web application. A Yoix web application resides on a web server
Web server
Web server can refer to either the hardware or the software that helps to deliver content that can be accessed through the Internet....

 and is downloaded piecemeal at run-time on an as-needed basis by Yoix interpreters
Interpreter (computing)
In computer science, an interpreter normally means a computer program that executes, i.e. performs, instructions written in a programming language...

 running on client machines
Client (computing)
A client is an application or system that accesses a service made available by a server. The server is often on another computer system, in which case the client accesses the service by way of a network....

. This model, analogous to the familiar model of client web browser
Web browser
A web browser is a software application for retrieving, presenting, and traversing information resources on the World Wide Web. An information resource is identified by a Uniform Resource Identifier and may be a web page, image, video, or other piece of content...

s downloading a website
Website
A website, also written as Web site, web site, or simply site, is a collection of related web pages containing images, videos or other digital assets. A website is hosted on at least one web server, accessible via a network such as the Internet or a private local area network through an Internet...

 piecemeal as-needed at run-time, permits simple, efficient distribution and maintenance of applications and relies only on the ubiquitous web server and the Yoix interpreter. Building a web application using the YWAIT framework requires just a few standard Unix
Unix
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...

 tools available in most modern operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

s, such as Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

 or Mac OS X
Mac OS X
Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...

, or under Microsoft Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

 with the help of add-on packages such as U/Win
UWIN
UWIN is a computer software package created by David Korn which allows programs written for the operating system Unix be built and run on Microsoft Windows with few, if any, changes...

. The client side of a YWAIT-based application relies only on the Yoix interpreter and is thus platform independent
Cross-platform
In computing, cross-platform, or multi-platform, is an attribute conferred to computer software or computing methods and concepts that are implemented and inter-operate on multiple computer platforms...

, running wherever Java runs. Because the Yoix software development philosophy aims to keep things simple by eschewing the popular tendency for multiple embedded specialized languages and the YWAIT framework permits easy, incremental screen development in a simple, logical source tree hierarchy, development of a Yoix web application is reduced to the basics: a command prompt and a text editor. IDE
Integrated development environment
An integrated development environment is a software application that provides comprehensive facilities to computer programmers for software development...

 enthusiasts may be nonplussed, but this Small Is Beautiful
Small Is Beautiful
Small Is Beautiful: Economics As If People Mattered is a collection of essays by British economist E. F. Schumacher. The phrase "Small Is Beautiful" came from a phrase by his teacher Leopold Kohr...

approach to software development has been highly effective in practice at AT&T
AT&T
AT&T Inc. is an American multinational telecommunications corporation headquartered in Whitacre Tower, Dallas, Texas, United States. It is the largest provider of mobile telephony and fixed telephony in the United States, and is also a provider of broadband and subscription television services...

.

Data Visualization

In addition to its role as a tool for building GUI applications, Yoix technology supports several modes of data visualization
Data visualization
Data visualization is the study of the visual representation of data, meaning "information that has been abstracted in some schematic form, including attributes or variables for the units of information"....

.

Data Mining

A data visualization
Data visualization
Data visualization is the study of the visual representation of data, meaning "information that has been abstracted in some schematic form, including attributes or variables for the units of information"....

 module called YDAT (Yoix Data Analysis Tool) has been included in the public Yoix distribution since release 2.1.2. YDAT uses a data manager component to coordinate data display and filtering among its several visualization components that include an event plot, a graph drawing pane, histogram filters and tabular detail. YDAT is able to display graphs generated by the GraphViz
Graphviz
Graphviz is a package of open-source tools initiated by AT&T Labs Research for drawing graphs specified in DOT language scripts. It also provides libraries for software applications to use the tools...

 graph drawing and layout tool, which is another open source
Open source
The term open source describes practices in production and development that promote access to the end product's source materials. Some consider open source a philosophy, others consider it a pragmatic methodology...

 tool freely available from AT&T Labs
AT&T Labs
AT&T Labs, Inc. is the research & development division of AT&T, where scientists and engineers work to understand and advance innovative technologies relevant to networking, communications, and information. Over 1800 employees work in six locations: Florham Park, NJ; Middletown, NJ; Austin, TX;...

. YDAT is highly configurable at the Yoix language level. The image below is a screenshot of a Yoix YDAT instantiation, which in this example is being used to analyze vehicle auction transactions.

Graph Drawing

Yoix technology provides good support for graph drawing. In addition to graph display mentioned above as part of the YDAT module, data types in the Yoix language support building, manipulating and traversing graph structures. Native Yoix functions support the DOT language
DOT language
DOT is a plain text graph description language. It is a simple way of describing graphs that both humans and computer programs can use. DOT graphs are typically files that end with the .gv extension. The .gv extension is preferred, as .dot also is used by Microsoft Office 2003.Various programs...

 output and a built-in DOT language
DOT language
DOT is a plain text graph description language. It is a simple way of describing graphs that both humans and computer programs can use. DOT graphs are typically files that end with the .gv extension. The .gv extension is preferred, as .dot also is used by Microsoft Office 2003.Various programs...

 parser to facilitate interaction with the GraphViz
Graphviz
Graphviz is a package of open-source tools initiated by AT&T Labs Research for drawing graphs specified in DOT language scripts. It also provides libraries for software applications to use the tools...

 layout engines.

Organizing Cells of Data

The YChart data visualization
Data visualization
Data visualization is the study of the visual representation of data, meaning "information that has been abstracted in some schematic form, including attributes or variables for the units of information"....

 toolkit was added to the Yoix distribution with release 2.2.0. YChart allows one to organize and display cells of data. Two interactive YChart applications contained in the Yoix distribution are a Periodic Table of the Elements and a Unicode Chart. A program to demonstrate using YChart with variable width cells, as might occur with a schedule, is also available in the Yoix distribution.

Interactive 2D Graphics

The Yoix distribution also includes a Yoix package, called Byzgraf, for rendering basic data plots such as line charts, histograms and statistical box plots.

Limitations and Focus

As currently implemented, the Yoix language is interpreted, which means that, for example, it is probably not the right choice for computationally intensive applications unless one codes those computations in a Java module extension. Similarly, excessive looping will also display the limitations of this interpreted language. The focus of the language is interactive standalone or client/server GUI
Gui
Gui or guee is a generic term to refer to grilled dishes in Korean cuisine. These most commonly have meat or fish as their primary ingredient, but may in some cases also comprise grilled vegetables or other vegetarian ingredients. The term derives from the verb, "gupda" in Korean, which literally...

 and data visualization
Data visualization
Data visualization is the study of the visual representation of data, meaning "information that has been abstracted in some schematic form, including attributes or variables for the units of information"....

 applications.

Licensing

Yoix technology is free software licensed under the Open Source Initiative
Open Source Initiative
The Open Source Initiative is an organization dedicated to promoting open source software.The organization was founded in February 1998, by Bruce Perens and Eric S. Raymond, prompted by Netscape Communications Corporation publishing the source code for its flagship Netscape Communicator product...

 Common Public License
Common Public License
In computing, the CPL is a free software / open-source software license published by IBM. The Free Software Foundation and Open Source Initiative have approved the license terms of the CPL....

. Yoix is a registered trademark
Trademark
A trademark, trade mark, or trade-mark is a distinctive sign or indicator used by an individual, business organization, or other legal entity to identify that the products or services to consumers with which the trademark appears originate from a unique source, and to distinguish its products or...

 of AT&T Intellectual Property
AT&T
AT&T Inc. is an American multinational telecommunications corporation headquartered in Whitacre Tower, Dallas, Texas, United States. It is the largest provider of mobile telephony and fixed telephony in the United States, and is also a provider of broadband and subscription television services...

.

Examples

1. Extract all HTML
HTML
HyperText Markup Language is the predominant markup language for web pages. HTML elements are the basic building-blocks of webpages....

 directives from the AT&T
AT&T
AT&T Inc. is an American multinational telecommunications corporation headquartered in Whitacre Tower, Dallas, Texas, United States. It is the largest provider of mobile telephony and fixed telephony in the United States, and is also a provider of broadband and subscription television services...

 home page and write them to standard output.


import yoix.*.*;

URL att = open("http://www.att.com", "r");
String text;
int cnt = 0;
while (cnt >= 0) {
if ((cnt = fscanf(att, " <%[^>]>", &text)) > 0)
printf("<%s>\n", text);
else cnt = fscanf(att, " %*[^<]"); // discard
}


2. Build and display a GUI
Gui
Gui or guee is a generic term to refer to grilled dishes in Korean cuisine. These most commonly have meat or fish as their primary ingredient, but may in some cases also comprise grilled vegetables or other vegetarian ingredients. The term derives from the verb, "gupda" in Korean, which literally...

 with two buttons in a titled frame (i.e., window) that also has a titled border. One button pops up a message when pressed, the other quits the example. The window is sized automatically to just fit its components, and some additional code calculates its location to put it in the center of the screen before making it visible.


import yoix.*.*;

JFrame jf = {
Dimension size = NULL; // auto-size window

FlowLayout layoutmanager = {
int hgap = 18; // 0.25 inch gap
};

String title = "Wikipedia Yoix Example"; // window title
String border = "Simple Button Example"; // border title

Array layout = {
new JButton {
String text = "Press for Message";

actionPerformed(ActionEvent ev) {
showMessageDialog(root, "Hello, world.", "Message Example");
}
},
new JButton {
String text = "Press to Exit";

actionPerformed(ev) { // ActionEvent declaration can be omitted
exit(0);
}
},
};
};

// set frame location to center of screen now that frame size is known
jf.location = new Point {
int x = (VM.screen.width - jf.size.width) / 2;
int y = (VM.screen.height - jf.size.height) / 2;
};

// make it visible
jf.visible = TRUE;


3. The code shown here was used to generate the Yoix logo
Logo
A logo is a graphic mark or emblem commonly used by commercial enterprises, organizations and even individuals to aid and promote instant public recognition...

 image in PNG format that can be seen in the language description box near the top of this page. Command-line arguments allow the size of the image to be specified as well as select between PNG image output or display in an on-screen window.


import yoix.*.*;

BuildYoixLogoImage(double height, Color color, int addshadow) {
// create the basic image, without shadow
GenImage(double height, Color color, Font imagefont, double scale) {
Image yoixlogo = {
int type = TYPE_RGB_ALPHA;
Color imgcolor = color;
double scale = scale;
Font imagefont = imagefont;
Font regfont = imagefont.scalefont(0.5, 0.5);
Graphics graphics = {
Font font = imagefont;
int textantialiasing = TRUE;
};
double ywd = stringWidth(graphics.font, "Y");
Dimension size = {
double height = height;
double width = ywd * 5.25;
};
double owd = stringWidth(graphics.font, "o");
double iwd = stringWidth(graphics.font, "i");
double xwd = stringWidth(graphics.font, "x");
ywd += iwd;
ywd /= 2.0;
paint(Rectangle r) {
double alpha = 1.0;
double alpha2 = 0.3333;
int limit = 12;

graphics {
gsave;
erasedrawable(0.0); // for transparent PNG
rectclip(r);
setrgbcolor(imgcolor.red, imgcolor.green, imgcolor.blue);
translate(48 * this.scale, 44 * this.scale);
for(n=0; n moveto(0.0, 0.0);
setfont(this.imagefont);
// "handmade" kerning
show("Y", alpha);
if (n 0) {
moveto(ywd, 0.0);
show("o", alpha);
moveto(ywd + owd - 0.3 * iwd, 0.0);
show("i", alpha);
moveto(ywd + owd + 0.8 * iwd, 0.0);
show("x", alpha);
moveto(ywd + owd + 0.8 * iwd + xwd, -this.imagefont.height * 0.33);
setfont(this.regfont);
show("\xAE", alpha);
alpha = alpha2;
}
alpha *= 0.75;
rotate(30);
}
grestore;
}
}
};

return(yoixlogo);
}

Font basefont = {
String name = "ClearviewATT-plain-48";
};
double scale = height / 90.0;
Font imagefont = basefont.scalefont(scale, scale);

if (addshadow) {
Image logo = GenImage(height, color, imagefont, scale);
image = new Image {
int type = TYPE_RGB_ALPHA;
Image source = logo;
Image img = logo;
// convolve image to make a (lightened) shadow
Image shadow = new Image {
int type = TYPE_RGB_ALPHA;
Image source = img;
Array kernel = new Array[100];
Pointer ptr;
for(ptr in kernel) *ptr = 0.0055;
paint {
convolve(kernel);
}
};
// combine the image and shadow into one image
paint(Rectangle r) {
graphics {
gsave;
moveto(0, 0);
showimage(this.img);
moveto(this.img.size.height * 0.005, this.img.size.height * 0.02);
showimage(this.shadow);
grestore;
}
}
};
} else {
image = GenImage(height, color, imagefont, scale);
}

return(image);
}

// rudimentary argument processing (getopt is also available)
// first argument is height of image
double sz = (argc > 1) ? atof(argv[1]) : 270;
int shdw = 1;
int print = 0;
// second argument: if 0/1 turn shadow off/on, otherwise
// assume it is a filename for printing.
if (argc > 2) {
if (argv[2] =~ "^[01]$") {
shdw = atoi(argv[2]);
} else {
print = 1;
}
}

Image yoixlogo = BuildYoixLogoImage(sz, Color.black, (sz >= 72) && shdw);

if (print) {
Stream output;

if ((output = open(argv[2], "w")) != NULL) {
encodeImage(yoixlogo, "png", output);
close(output);
}
} else {
JFrame jf = {
int visible = TRUE;
Dimension size = NULL;
Array layout = {
new JPanel {
Dimension preferredsize = {
double width = yoixlogo.size.width;
double height = yoixlogo.size.height;
};
Color background = Color.white;
Image backgroundimage = yoixlogo;
int backgroundhints = SCALE_NONE;
},
};
};
}

External links
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK