Linoleum (programming language)

From Wikipedia, the free encyclopedia
Linoleum
Paradigm(s) Procedural
Appeared in 1996
Designed by Alessandro Ghignola
Developer Alessandro Ghignola
Stable release 2.00 (2010 (2010))
Typing discipline weak, dynamic
Major implementations Windows, Linux (alpha)
Dialects none
OS Windows, Linux (alpha)
License WTOF (Lino v1.13), LGPL (Lino v1.2), (Lino v2.00, most parts of this software are licensed under the GNU LGPL version 2.1 or later)
Website www.anywherebb.com

    The L.in.oleum (often called Linoleum or simply Lino) is an unstructured, untyped, procedural programming language and a cross-platform assembler developed by Italian programmer Alessandro Ghignola beginning in 2001. The initials stand for Low-level INterfaced OverLanguage for Extremely Universal Machine-coding. The L.in.oleum programming language (hereafter referred to as Lino) is easier to learn than assembly languages. The Lino assembler is designed to assemble executable code for different central processing units (CPU) without needing changes to the source code.

    Design

    Lino is intended for writing general-purpose programs, especially when portability, execution speed, and module size are critical to the application's success. These traits are especially important in fields of study that demand performance-intensive programs. Examples of such fields (in which Lino is actually being used) include fractals, mathematics (such as an implementation of fast Fourier transform), and ray tracing, to name a few.

    This increased performance is achieved by Lino's nearly one-to-one ratio between Lino instructions and CPU instructions. That is, most instructions in Lino can be executed in one machine cycle, due to the way the language is set up. This gives a skilled programmer increased control over the computer, allowing for further optimization and tighter loops.

    Although Lino is a relatively new language, several useful programs are already being written in it. These programs, most of which are available via the official Lino discussion forums or from Peterpaul Klein Haneveld's site, are in various stages of development. The list below is by no means comprehensive.

    A selection of Lino programs
    Name
    Status
    Link
    Fire demo Completed Link
    Fractals (Mandelbrot set) Completed Link
    LinoLife, an implementation of Conway's Life Completed Available with Lino 1.2 package
    LinoPaint, a clone of Microsoft Paint Alpha Link
    Noctis V, the sequel to the freeware game Noctis IV (written in C++) Beta (Unreleased) Link
    Ray tracer (static and real-time) demo Kaizen Link
    Terrain mapping demo Alpha Link
    Text-based games Completed Link
    Text editor Completed Link
    Yahtzee Completed Link

    Note that many of the above links take you to forum threads where these programs are uploaded and discussed.

    In addition to the above programs, there are many more programs written in Lino, as well as dozens of libraries written in Lino. Interest in this unique language is maintained by a small but dedicated community of programmers.

    Examples and screen shots

    Hello world

    "Low-level programming languages usually have no direct equivalent of the print statement found in many high-level programming languages. Thus, while a Hello world example can be done in Lino, it is too long to quote here."

    Raising the power

    Rather, Ghignola introduces Lino by an example of its stack and mathematical abilities. Here is an example of a full Lino program.

    ( *** LINOLEUM Example 1: Raising the power! *** )
    
    "directors"
        program name = { Raise_the_power! }
        unit = 32;
    
    "programme"
        A = 7;
        B = 10;
    
    "raise"
        --> B;
        C = 1;
        ? B = 0 -> finished;
    
    "raise again"
        C * A;
        B ^ raise again;
    
    "finished"
        <-- B;
        show registers;

    The preceding program stores the value 7 in variable A and the value 10 in variable B. The program pushes the variable B onto the stack and sets the variable C equal to 1. Then it multiplies C by 7 for 10 loops. In other words:

    C = 1 * 7 * 7 * 7 * ...

    Finally the program pops B off the stack and (in its last line) shows the values of A, B, and C (which are CPU registers) on the screen.

    The above example is a nontraditional introduction to a programming language. But the language itself is nontraditional. For example, it allows access to the CPU registers, which most high-level programming languages don't allow the programmer to access. Also, it comes with its own GUI, called the iGUI, although the programmer is not forced to use it.

    Portability

    Each Lino program comes bundled with a Run Time Module included in the .exe file, so there is no installation process needed. In other words, each Lino program is essentially self-contained, though it may need external files (i.e. data files) in order to perform correctly.

    A Lino program does, however, need to be recompiled for each platform it's meant to run on—but the source code doesn't need to be changed. Dutch university student Peterpaul Klein Haneveld is currently working to create a fully functional Lino compiler for Linux (see below for further details).

    Free Lino compilers are available for these platforms:

    A port to a new platform requires ...

    The Lino compiler is written in Lino as of version 1.13. And as of version 1.2 (see below), the Lino compiler is itself a Lino library, which means it no longer needs to be ported. (For more details, read the Portability section above.) Lino libraries are stored as plain text files, just like programs.

    Source code is stored in .txt files. Such files can easily be read and edited by any text editor, such as Notepad. Currently, you can compile a file by right-clicking on it and choosing the option "Compile as LINOLEUM Source" or by dragging the file over the compiler's icon.

    Latest versions

    The latest stable version of the Lino compiler (Windows) is 2.0.

    Lino 2.0 has experienced many changes to the structure of the language, as well as the performance.

    -- Older Versions—Lino 1.2 (available from the main website) features an improved visual compiler and several minor improvements to the language, enough to warrant a jump from 1.14 to 1.2. Many of the improvements are bug fixes and improvements to existing features. There are also new features, such as the ability to print monochrome bitmaps, and to insert "jump alignment directives", which allow programs (if optimized by skilled programmers) to run more efficiently.

    The Lino 1.2 compiler can still compile as before, but it is now a visual compiler. This means that, unlike before, it can compile programs and view output from one place. The read-only (to prevent forking) code for the compiler (written in Lino as of this version) is available with the downloaded package (see the External links section below).

    The "Linux Linoleum Compiler" is still in alpha. As of 2010, it is being developed by Dutch university student Peterpaul Klein Haneveld. Development is now inactive but may resume with the release of Lino 1.2. Additionally, Peterpaul has released the source code for the Linux run-time module, available on the main website, for those interested in continuing the project.

    The first version of Linoleum 2 is available for download as of January 2010. It features a new set of libraries, a smaller run-time module and a text display mode, along with a refreshed code syntax. However, this release isn't as stable as the 1.2, and it lacks the module extensions required for additional features, such as network and audio support.

    External links

    • Official website This is Alessandro Ghignola's personal software house. Home Sweet Pixel, often abbreviated as HSP, is the official website of Lino, Noctis, and other programs, all of which are free.
      • Linoleum This is a direct link to the Linoleum section of the HSP site.
    • Peterpaul's Place This is the website of Dutch university student Peterpaul Klein Haneveld, an avid Lino programmer who is developing the Linux compiler.
    • Herbert Glarner's Linoleum libraries (data structures and algorithms)
    • Unified Programming Languages Archive: LINOLEUM This is a repository for archived Lino code.

    Footnotes

    1. ^ But there is an example of a Hello World program in the Lino documentation (example #12).
    2. ^ This last claim is supported by example in the "programme" section of the Lino documentation. It involves the use of CPU registers, which most high-level languages don't allow the programmer to access.
    3. ^ This example program was written by Alessandro Ghignola and is copyrighted by him. It is presented here unchanged except for deleting comments for the sake of brevity.
    4. ^ 32-bit versions of Windows range from Windows NT 3.5 up to and including Windows 7.
    This article is issued from Wikipedia. The text is available under the Creative Commons Attribution/Share Alike; additional terms may apply for the media files.