Yoix

Last updated
Yoix
Yoixlogo.png
Paradigm Multi-paradigm; object-based, imperative, procedural
Designed by Rich Drechsler and John Mocenigo [1]
First appeared2000
Stable release
2.3.1 / November 25, 2011;12 years ago (2011-11-25)
Typing discipline Dynamic, Weak
OS Cross-platform
License Open Source Initiative Common Public License
Website https://github.com/att/yoix
Influenced by
C, Java, PostScript

In computer programming, Yoix is a high-level, general-purpose, interpreted, object-based, dynamic programming language. The Yoix interpreter is implemented using standard Java technology without any add-on packages and requires only a Sun-compliant JVM to operate.[ citation needed ]

Contents

Initially developed by AT&T Labs researchers for internal use, it has been available as free and open source 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[ dubious ] 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. [2]

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.[ citation needed ]

Overview

Yoix technology provides a pure Java programming language implementation of a general purpose dynamic programming language developed by researchers at AT&T Labs. Its syntax and grammar should be easy to learn for those familiar with the C programming language and Java. To an end-user, a Yoix application is indistinguishable from a Java application, but to the application developer Yoix should provide a simpler coding experience than working in Java directly, much like writing Perl 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 types that provide access to most of the standard Java classes. Because the Yoix interpreter is built entirely using Java technology, it means that Yoix applications are cross-platform, GUI-capable and both network and thread 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.[ clarification needed ] The Yoix language includes safe pointers, addressing, declarations, and global and local 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[ citation needed ]: 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.[ citation needed ]

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.[ dubious ]

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

Applications

The Yoix distribution includes the Yoix Web Application Instant Template (YWAIT), a software framework for building a Yoix web application. [3] A Yoix web application resides on a web server and is downloaded piecemeal at run-time on an as-needed basis by Yoix interpreters running on client machines. This model, analogous to the familiar model of client web browsers downloading a website 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 tools available in most modern operating systems, such as Linux or Mac OS X, or under Microsoft Windows with the help of add-on packages such as U/Win. The client side of a YWAIT-based application relies only on the Yoix interpreter and is thus platform independent, 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.[ improper synthesis? ] IDE enthusiasts may be nonplussed, but this Small Is Beautiful approach to software development has been highly effective in practice at AT&T.[ dubious ]

Data visualization

In addition to its role as a tool for building GUI applications, Yoix technology supports several modes of data visualization. [4]

Data mining

A data visualization 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 graph drawing and layout tool, which is another open source tool freely available from AT&T Labs. 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 output and a built-in DOT language parser to facilitate interaction with the GraphViz layout engines.

Organizing cells of data

The YChart data visualization 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[ when? ], 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 and data visualization applications.

Licensing

Yoix technology is free software licensed under the Open Source Initiative Common Public License. Yoix is a registered trademark of At&T Inc. [5]

Examples

1. Extract all HTML directives from the AT&T home page and write them to standard output.

importyoix.*.*;URLatt=open("https://www.att.com","r");Stringtext;intcnt=0;while(cnt>=0){if((cnt=fscanf(att," <%[^>]>",&text))>0)printf("<%s>\n",text);elsecnt=fscanf(att," %*[^<]");// discard}

2. Build and display a GUI 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.

importyoix.*.*;JFramejf={Dimensionsize=NULL;// auto-size windowFlowLayoutlayoutmanager={inthgap=18;// 0.25 inch gap};Stringtitle="Wikipedia Yoix Example";// window titleStringborder="Simple Button Example";// border titleArraylayout={newJButton{Stringtext="Press for Message";actionPerformed(ActionEventev){showMessageDialog(root,"Hello, world.","Message Example");}},newJButton{Stringtext="Press to Exit";actionPerformed(ev){// ActionEvent declaration can be omittedexit(0);}},};};// set frame location to center of screen now that frame size is knownjf.location=newPoint{intx=(VM.screen.width-jf.size.width)/2;inty=(VM.screen.height-jf.size.height)/2;};// make it visiblejf.visible=TRUE;

3. The code shown here was used to generate the Yoix logo 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.

importyoix.*.*;BuildYoixLogoImage(doubleheight,Colorcolor,intaddshadow){// create the basic image, without shadowGenImage(doubleheight,Colorcolor,Fontimagefont,doublescale){Imageyoixlogo={inttype=TYPE_RGB_ALPHA;Colorimgcolor=color;doublescale=scale;Fontimagefont=imagefont;Fontregfont=imagefont.scalefont(0.5,0.5);Graphicsgraphics={Fontfont=imagefont;inttextantialiasing=TRUE;};doubleywd=stringWidth(graphics.font,"Y");Dimensionsize={doubleheight=height;doublewidth=ywd*5.25;};doubleowd=stringWidth(graphics.font,"o");doubleiwd=stringWidth(graphics.font,"i");doublexwd=stringWidth(graphics.font,"x");ywd+=iwd;ywd/=2.0;paint(Rectangler){doublealpha=1.0;doublealpha2=0.3333;intlimit=12;graphics{gsave();erasedrawable(0.0);// for transparent PNGrectclip(r);setrgbcolor(imgcolor.red,imgcolor.green,imgcolor.blue);translate(48*this.scale,44*this.scale);for(n=0;n<limit;n++){moveto(0.0,0.0);setfont(this.imagefont);// "handmade" kerningshow("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);}Fontbasefont={Stringname="ClearviewATT-plain-48";};doublescale=height/90.0;Fontimagefont=basefont.scalefont(scale,scale);if(addshadow){Imagelogo=GenImage(height,color,imagefont,scale);image=newImage{inttype=TYPE_RGB_ALPHA;Imagesource=logo;Imageimg=logo;// convolve image to make a (lightened) shadowImageshadow=newImage{inttype=TYPE_RGB_ALPHA;Imagesource=img;Arraykernel=newArray[100];Pointerptr;for(ptrinkernel)*ptr=0.0055;paint(){convolve(kernel);}};// combine the image and shadow into one imagepaint(Rectangler){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 imagedoublesz=(argc>1)?atof(argv[1]):270;intshdw=1;intprint=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;}}Imageyoixlogo=BuildYoixLogoImage(sz,Color.black,(sz>=72)&&shdw);if(print){Streamoutput;if((output=open(argv[2],"w"))!=NULL){encodeImage(yoixlogo,"png",output);close(output);}}else{JFramejf={intvisible=TRUE;Dimensionsize=NULL;Arraylayout={newJPanel{Dimensionpreferredsize={doublewidth=yoixlogo.size.width;doubleheight=yoixlogo.size.height;};Colorbackground=Color.white;Imagebackgroundimage=yoixlogo;intbackgroundhints=SCALE_NONE;},};};}

Related Research Articles

<span class="mw-page-title-main">GIF</span> Bitmap image file format family

The Graphics Interchange Format is a bitmap image format that was developed by a team at the online services provider CompuServe led by American computer scientist Steve Wilhite and released on June 15, 1987.

<span class="mw-page-title-main">PostScript</span> File format and programming language

PostScript is a page description language and dynamically typed, stack-based programming language. It is most commonly used in the electronic publishing and desktop publishing realm, but as a Turing complete programming language, it can be used for many other purposes as well. PostScript was created at Adobe Systems by John Warnock, Charles Geschke, Doug Brotz, Ed Taft and Bill Paxton from 1982 to 1984. The most recent version, PostScript 3, was released in 1997.

Scalable Vector Graphics (SVG) is an XML-based vector image format for defining two-dimensional graphics, having support for interactivity and animation. The SVG specification is an open standard developed by the World Wide Web Consortium since 1999.

<span class="mw-page-title-main">Vector graphics</span> Computer graphics images defined by points, lines and curves

Vector graphics are a form of computer graphics in which visual images are created directly from geometric shapes defined on a Cartesian plane, such as points, lines, curves and polygons. The associated mechanisms may include vector display and printing hardware, vector data models and file formats, as well as the software based on these data models. Vector graphics is an alternative to raster or bitmap graphics, with each having advantages and disadvantages in specific situations.

<span class="mw-page-title-main">Dots per inch</span> Measure of dot density

Dots per inch is a measure of spatial printing, video or image scanner dot density, in particular the number of individual dots that can be placed in a line within the span of 1 inch (2.54 cm). Similarly, dots per centimetre refers to the number of individual dots that can be placed within a line of 1 centimetre (0.394 in).

Vector Markup Language (VML) is an obsolete XML-based file format for two-dimensional vector graphics. It was specified in Part 4 of the Office Open XML standards ISO/IEC 29500 and ECMA-376. According to the specification, VML is a deprecated format included in Office Open XML for legacy reasons only.

<span class="mw-page-title-main">C syntax</span> Set of rules defining correctly structured programs

The syntax of the C programming language is the set of rules governing writing of software in C. It is designed to allow for programs that are extremely terse, have a close relationship with the resulting object code, and yet provide relatively high-level data abstraction. C was the first widely successful high-level language for portable operating-system development.

DOT is a graph description language, developed as a part of the Graphviz project. DOT graphs are typically stored as files with the .gv or .dot filename extension — .gv is preferred, to avoid confusion with the .dot extension used by versions of Microsoft Word before 2007. dot is also the name of the main program to process DOT files in the Graphviz package.

<span class="mw-page-title-main">Method overriding</span> Language feature in object-oriented programming

Method overriding, in object-oriented programming, is a language feature that allows a subclass or child class to provide a specific implementation of a method that is already provided by one of its superclasses or parent classes. In addition to providing data-driven algorithm-determined parameters across virtual network interfaces, it also allows for a specific type of polymorphism (subtyping). The implementation in the subclass overrides (replaces) the implementation in the superclass by providing a method that has same name, same parameters or signature, and same return type as the method in the parent class. The version of a method that is executed will be determined by the object that is used to invoke it. If an object of a parent class is used to invoke the method, then the version in the parent class will be executed, but if an object of the subclass is used to invoke the method, then the version in the child class will be executed. This helps in preventing problems associated with differential relay analytics which would otherwise rely on a framework in which method overriding might be obviated. Some languages allow a programmer to prevent a method from being overridden.

Cairo (graphics) Vector graphics-based software library

Cairo is an open-source graphics library that provides a vector graphics-based, device-independent API for software developers. It provides primitives for two-dimensional drawing across a number of different backends. Cairo uses hardware acceleration when available.

A computer font is implemented as a digital data file containing a set of graphically related glyphs. A computer font is designed and created using a font editor. A computer font specifically designed for the computer screen, and not for printing, is a screen font.

<span class="mw-page-title-main">OpenSceneGraph</span>

OpenSceneGraph is an open-source 3D graphics application programming interface, used by application developers in fields such as visual simulation, computer games, virtual reality, scientific visualization and modeling.

In computer programming, an entry point is the place in a program where the execution of a program begins, and where the program has access to command line arguments.

In computer programming, the term hooking covers a range of techniques used to alter or augment the behaviour of an operating system, of applications, or of other software components by intercepting function calls or messages or events passed between software components. Code that handles such intercepted function calls, events or messages is called a hook.

The canvas element is part of HTML5 and allows for dynamic, scriptable rendering of 2D shapes and bitmap images. It is a low level, procedural model that updates a bitmap. HTML5 Canvas also helps in making 2D games.

In software engineering, a fluent interface is an object-oriented API whose design relies extensively on method chaining. Its goal is to increase code legibility by creating a domain-specific language (DSL). The term was coined in 2005 by Eric Evans and Martin Fowler.

Clutter is a discontinued GObject-based graphics library for creating hardware-accelerated user interfaces. Clutter is an OpenGL-based 'interactive canvas' library and does not contain any graphical control elements. It relies upon OpenGL (1.4+) or OpenGL ES for rendering,. It also supports media playback using GStreamer and 2D graphics rendering using Cairo.

<span class="mw-page-title-main">Lively Kernel</span> Open-source web programming environment

The Lively Kernel is an open-source web programming environment, developed by Dan Ingalls when he was at SAP Research. It supports desktop-style applications with rich graphics and direct manipulation abilities, but without the installation or upgrade troubles of conventional desktop applications. Development began at Sun Microsystems Laboratories in Menlo Park, California, and later moved to the Hasso Plattner Institute in Potsdam-Babelsberg near Berlin.

QML is a user interface markup language. It is a declarative language for designing user interface–centric applications. Inline JavaScript code handles imperative aspects. It is associated with Qt Quick, the UI creation kit originally developed by Nokia within the Qt framework. Qt Quick is used for mobile applications where touch input, fluid animations and user experience are crucial. QML is also used with Qt3D to describe a 3D scene and a "frame graph" rendering methodology. A QML document describes a hierarchical object tree. QML modules shipped with Qt include primitive graphical building blocks, modeling components, behavioral components, and more complex controls. These elements can be combined to build components ranging in complexity from simple buttons and sliders, to complete internet-enabled programs.

ArkUI is a declarative based user interface framework for building user interfaces on native HarmonyOS applications developed by Huawei for the ArkTS and Cangjie programming language.

References

  1. "Visualizing and Analyzing Software Infrastructures". IEEE Software. 2001. p. 70.
  2. Richard L. Drechsler & John M. Mocenigo. "The Yoix Scripting Language as a Tool for Building Web-Based Systems". doi : 10.1007/3-540-45745-3_8 2002.
  3. "The Yoix Scripting Language and Interpreter".
  4. Jaech, J.; North, S.; Peery, M.; Schroeder, W.; Thomas, J. (2003). "The visualization market: Open source vs. Commercial approaches". IEEE Transactions on Ultrasonics, Ferroelectrics and Frequency Control. pp. 21–24. doi:10.1109/VISUAL.2003.1250350. ISBN   0-7803-8120-3.
  5. "The Yoix® Scripting Language". Internet Archive Wayback Machine. July 1, 2016. Archived from the original on September 21, 2015. Retrieved November 20, 2016.