Using Popular Programming Languages - Programming Linux - Ubuntu Unleashed 2017 Edition (2017)

Ubuntu Unleashed 2017 Edition (2017)

Part V: Programming Linux

Chapter 42. Using Popular Programming Languages


In This Chapter

Image Ada

Image Clojure

Image COBOL

Image D

Image Dart

Image Elixir

Image Erlang

Image Forth

Image Go

Image Fortran

Image Groovy

Image Haskell

Image Java

Image JavaScript

Image Lisp

Image Lua

Image Mono

Image OCaml

Image Perl

Image PHP

Image Python

Image Ruby

Image Rust

Image Scala

Image Scratch

Image Vala

Image References


Students and developers who pay attention to either computer programming history or current trends are already aware of a vast swath of possibilities that deserve some attention. The goal of this chapter is to introduce many different languages available for you to use, some that are old and some that are new.

This short chapter does not teach you how to use these languages, but rather exposes you to them, making you aware of their existence and giving just enough information about them to help you decide whether each one sounds interesting or useful to you and points to resources to help guide your next steps. The introductions include information for installing and getting started with each language on Ubuntu. Sometimes the version of the language included in the Ubuntu repositories is a little outdated or is a free (as in freedom) version instead of an official, proprietary version. If you discover you need something more up-to-the-minute current or a version not mentioned, check the “References” section to find links to more information for most languages.

The organization of this chapter was tricky. The original idea was to order the chapter by how well known a language is, but that is problematic. Older languages generally have better name recognition, even though newer ones might be more commonly used. How do we measure popularity and use it to enforce order on a list of programming languages? The people who use them tend to form strong emotional bonds with those they prefer, just as geeks do with text editors (Emacs versus vi), email programs (web based versus Thunderbird versus Mutt), and more important matters like comic book universes (Marvel versus DC). Ultimately, it seemed like an alphabetic order would be best. If your favorite language is not included in this edition, and you think it should be included in future editions, please email your suggestion and reasoning to the author at matthew@matthewhelmke.com for consideration.

You will notice an interesting mix of old and new languages here. Some have asked why these languages are included, especially the older ones. They are included because they are still in use in the real world. There may not be many or even any new projects being created using some of these languages, but if you are attentive, you are likely to find each of these in use somewhere. A quote from The Register illustrates this beautifully, “The venerable PDP-11 minicomputer is still spry to this day, powering GE nuclear power-plant robots—and will do so for another 37 years. That’s right: PDP-11 assembler coders are hard to find, but the nuclear industry is planning on keeping the 16-bit machines ticking over until 2050—long enough for a couple of generations of programmers to come and go.” (from: http://www.theregister.co.uk/2013/06/19/nuke_plants_to_keep_pdp11_until_2050/). The PDP-11 came out in 1970 and has not been produced since the early 1990s. Programming languages, like programs, always seem to outlast their expected or intended lifespan. Who knows? Learning that old language that everyone laughs about may benefit you with a well-paying, unique job as well as help you to think about human-computer communication in a different way.

Ada

Ada is based on Pascal. It is named after Ada Lovelace (1815-1852), who wrote the first algorithm designed to be processed by a machine, specifically the mechanical computing device created by Charles Babbage.

The language is most known for its use in embedded systems, especially in the aeronautics and avionics realm. Ada is well known as a reliable and efficient real-time language. It is most commonly encountered in aircraft systems, air traffic control and railroad systems, and medical devices. It is also often used as a teaching language for computer science courses.

Language highlights include static typing, concurrency, synchronous message passing, protected objects, modularization, and exception handling. Ada is object oriented, has standard libraries for things like I/O and containers, good interfaces to other languages like C, and works well with distributed systems and numeric processing.

To use Ada on Ubuntu, you write programs in your favorite text editor. To compile, you need the package gnat, which is the GNU Ada Compiler. You may want to consider gnat-gps, which installs the Gnat Programming System, an integrated development environment (IDE) specifically for Ada and C programming.

Clojure

Clojure is a newer dialect of Lisp that runs on the Java Virtual Machine (JVM). It is intended for general-purpose use. It encourages functional programming and is designed to make writing multithreaded applications easier. Because of the close integration with Java, Clojure applications can be packaged and deployed to JVM environments without adding complexity. It also provides easy access to Java frameworks, and Clojure’s data structures all implement standard Java interfaces.

Closures are a common in programming, especially in functional programming languages, including Clojure. (The name is rumored to be a mash-up of closure and Java.) Typically, variables are designed to only work within a defined function. A closure is a way to bend that rule temporarily. A closure starts with a function and allows the value of one or more variables from that function to be available outside of that function while being maintained in the function. Another way to phrase that is to say a closure is a combination of a function and the variables that were in scope at the time that the function was defined; the function can refer to those variables even if they are no longer in scope when the function is called. When you are working in a programming language with first-class functions that can be passed around like variables, closures are a convenient way to provide encapsulation without using objects or classes. An example use of a closure is when a function is encapsulated completely within another function but is still able to read the state of a variable that exists in the containing function.

Clojure is unlike most languages in that you don’t generally install Clojure itself; it’s just a library that’s loaded into the JVM. You don’t interact with it directly, you use a build tool and editor/IDE integration instead (well, except for when you are interacting using the REPL—in any case, you never run a tool called “clojure” from the command line). That process is a bit beyond the short introduction of this chapter; however, you can get started quickly using one of these two methods:

Image Install clojure. Among other things, this installs a REPL (read-eval-print loop, an interactive programming environment) that can be used by entering clojure at the command line. When you install this package, you get what you need for using Clojure in a JVM, but you need to set up your development environment to use Clojure. See the documentation from each environment for instructions. Note that the most popular, perhaps even the de facto, build tool for Clojure is Leiningen, which adds some really useful functionality, such as the ability to manage project dependencies, start a REPL easily, and even install Clojure itself. See https://github.com/technomancy/leiningen#readme for more.

Image You can try Clojure in a live REPL using www.try-clojure.org.

COBOL

COBOL, Common Business Oriented Language, has been around since the 1960s and is one of the oldest programming languages, and is still the dominant language for (legacy) business applications. The majority of big business applications, such as payroll and accounting, were written in COBOL, and most programmers who knew it well have retired. A job market exists for younger programmers willing to learn it and willing to support older applications that are stable and trusted and still running all over the place. This is especially true if you are able to understand the business processes modeled in COBOL and can integrate it with modern technology, which isn’t always an easy task.

COBOL’s syntax was designed to mimic natural human language. Often a newcomer can read COBOL source code and have a pretty good idea of what it does, even if the reader has little to no programming experience. An interesting feature in early COBOL that is deprecated in more recent versions is self-modifying code, which had the potential to create some interesting situations. COBOL has always been a little controversial, as illustrated by the time that Edsger Dijkstra remarked that “the use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offense.”

In a 2012 survey in ComputerWorld, 46% of the respondents said they are already noticing a Cobol programmer shortage, while 50% said the average age of their Cobol staff is 45 or older and 22% said the age is 55 or older (see: https://www.computerworld.com/s/article/9225099/Cobol_brain_drain_Survey_results). Organizations are trying to move away from COBOL, but it is still in extensive use.

To use COBOL on Ubuntu, you write programs in your favorite text editor. To compile, you need the package open-cobol, which actually translates the programs into C and compiles them using gcc.

D

The D language is a lot like C, but much newer. It has similar syntax. It also has static typing. However, it is much newer and has some differences that are designed for convenience, power, and continued efficiency. In D, you are able to write large amounts of code without redundantly specifying types. Static inference deduces types and other code properties. Also, memory management is automatic and you have built-in linear and associative arrays, slices, and ranges. D has new methods of dealing with concurrency, scaling, and internal integration of features in a way that the presence of one feature does not harm another, for example offering classic polymorphism, value semantics, functional style, contract programming, and more. Like C, D is compiled to native code.

We haven’t really seen D in use in the “real world” yet, but it is receiving a lot of attention in the academic and research world. The buzz among programmers is that D is very promising and could become a successor to C, as it is intended to be.

To use D on Ubuntu, you write programs in your favorite text editor. To compile, you must first download and install a package from the D Programming Language website at http://dlang.org/download.html. There are instructions on that site.

Dart

Dart is a new language and open-source project headed up by Google. The goal is a suite of tools and libraries focused on scalable web application engineering. You write code in Dart and it is compiled to JavaScript, which means that what you write will already be able to run in every major web browser and on nearly all servers. Dart is class based and object oriented. The code is concise without being enigmatic. The syntax looks very familiar and is pretty easy to figure out if you have some experience with other major languages. Dart allows you to create and use types, but does not require it, and is designed to be modular and scalable with the ability to organize your code with functions, classes, libraries and so on. The compiler can weed extraneous libraries from your code, such as those you included but never used, during compilation to create a smaller application. It can even minify as it compiles to JavaScript.

To use Dart on Ubuntu, download it along with the editor and tools from the Dart website at www.dartlang.org.

Elixir

Elixir is a dynamic, functional language based on Erlang. It has an interactive mode and an executable mode. The main differences between Elixir and Erlang lie in the realm of convenience. Elixir has its own package management system, macros, and build tool. It is compatible with existing Erlang libraries. Its main use at the moment is for building scalable web-based applications.

To use Elixir on Ubuntu, install the package elixir.

Erlang

From the official website, “Erlang is a programming language used to build massively scalable soft real-time systems with requirements on high availability. Some of its uses are in telecoms, banking, e-commerce, computer telephony and instant messaging. Erlang’s runtime system has built-in support for concurrency, distribution and fault tolerance.” Erlang is a declarative, functional language that includes real-time garbage collection and hot-swapping of code. It is primarily designed for distributed applications used in essential applications that require extreme uptime.

Erlang’s greatest strength is its ability to create a large number of concurrent processes, each with low overhead, and allow them to communicate with one another using an asynchronous message handling system. In addition, the Erlang developers have a philosophy of development that emphasizes keeping things running, meaning that future stable Erlang updates should not break running code. They like to test extensively and try to break as much as possible in testing to prevent breakage in production systems. One of the technical editors mentioned a neat feature while reading this chapter: Erlang’s processes can communicate with each other even if they don’t live on the same box. You have to explicitly allow this in your code, but the ability is built in to the language runtime and syntax and is not a third-party library.

To use Erlang on Ubuntu, you write programs in your favorite text editor. To compile, you need the package erlang, which installs the Erlang/OTP runtime, applications, sources, code examples and the Erlang editing mode for Emacs.

Forth

Forth first appeared in the 1970s. It is an interactive, procedural, imperative language with typeless data that runs as a shell. Sets of instructions can be saved and compiled as bytecode programs. It is a very small language by itself and is therefore very useful in boot loaders and embedded systems, and has even been used by NASA in space applications.

On the surface, Forth is a simple language, but it is highly extensible. In essence, a programmer creates a dictionary, beginning with the small set of predefined words. These are combined in new ways to extend the lexicon and create new things that may be done. This is powerful, but it is also dangerous. The lack of standards can lead to less-than-stellar programmers creating unclear sets of vocabulary that make it impossible for anyone else to maintain what they have written. However, thoughtful programmers who are disciplined and organized have created highly complex, yet maintainable, programs in Forth that have been used for decades across multiple platforms.

Perhaps Forth might be described as a language for experienced programmers who can handle total control over the CPU and want to build sophisticated systems running in extremely limited environments. If you are old enough to remember HP calculators and their “reverse Polish” notation, where the operator is placed after the operands, you will find Forth familiar.

To use Forth on Ubuntu, install the package gforth, which is the GNU implementation of a Forth programming environment.

Go

Go is an open-source project and language being developed by people at Google. It is an expressive language that aims for concise, clean code and efficient use of resources. It has concurrency mechanisms built in to take advantage of multiple core machines and networked machines. Go includes a unique type system designed for flexible and modular code, and it’s a compiled language that also has garbage collection. It is advertised as “a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language.”

To use Go on Ubuntu, write your programs in your favorite text editor and install the golang compiler. Install the golang-docs package for technical documentation.

Fortran

Fortran was developed by IBM in the 1950s for engineering and scientific applications. Its popularity spread quickly in areas of science that are dominated by numeric computation. Today, many of those same Fortran programs are still maintained and in use in fields such as weather modeling and prediction, fluid dynamics, and segments of chemistry and physics. In a published article from 2010, Eugene Loh, an engineer at Oracle, called Fortran the most commonly used and perhaps the ideal language for high performance computing (http://queue.acm.org/detail.cfm?id=1820518).

Fortran is a terse language in which complex applications may be written with relatively few statements. It is a procedural language with object-oriented abilities. It excels at numeric computation and is often used as the language in which programs are written to test supercomputers for speed.

To use Fortran on Ubuntu, you write programs in your favorite text editor. To compile, you need the package gfortran, the GNU Fortran 95 compiler, which compiles Fortran 95 on platforms supported by the gcc compiler. It uses the gcc back end to generate optimized code.

Groovy

Groovy, like Clojure, is designed for the JVM. It was written to enable features like closures and dynamic typing from popular languages like Python and Ruby to be used by Java developers. It uses a Java-like syntax, making it familiar to those programmers. It can be compiled into standard Java bytecode and used within any Java project. It can also be used dynamically for scripting, templating, or writing unit tests.

To use Groovy on Ubuntu, you must first install a JVM. Then, you need the package groovy. You can then run Groovy code in a shell by entering groovysh at the command line, in an interactive console by entering groovyConsole, or run a specific Groovy script by entering the script file’s name at the command line prefaced by groovy, like this:

matthew@seymour:~$ groovy scriptname.groovy

Haskell

Haskell is a purely functional programming language. It has built-in concurrency and parallelism and good support for integration with other languages. In that sense, it is similar to Erlang. From the beginning in 1990, it has been developed as an open-source project with strong community input and participation. Haskell uses lazy evaluation, meaning that the evaluation of an expression is put off until the last possible moment, until its value is required. This significantly speeds up runtime by avoiding unnecessary or repeated evaluation.

To use Haskell on Ubuntu, install haskell-platform, a suite of tools and libraries that contain the most important and best-supported components. It is meant to be a starting point for Haskell developers who are looking for libraries to use. To compile, you need the package ghc, which is the Glorious Glasgow Haskell Compilation system (GHC), a compiler for Haskell.

Java

Java was created by Sun Microsystems, now owned by Oracle, as a write-once, run-anywhere language. Java programs are compiled to a bytecode that will run on any JVM. A Java Virtual Machine (JVM) must exist on a hardware platform for Java code to run, but no recompilation of the program itself is needed for it to run on different hardware platforms. Java is object oriented, and writing program instructions for a virtual machine is generally easier than doing so for a real machine. Java syntax is similar to C and C++ but is a bit simpler and has fewer low-level abilities. It is currently one of the most popular programming languages. Originally, Java technology was proprietary and licensed for use by Sun. In May 2007, several years before being bought by Oracle, Sun finished relicensing and releasing most Java technology under the GNU GPL. (There were parts they could not relicense because they did not own the copyright to the code.)

Java uses automatic garbage collection to remove objects from memory when they are no longer in use. This frees programmers from thinking about memory management. It includes a graphical user interface library called Swing.

Most Java development occurs in an IDE, several of which are available from the Ubuntu repositories. The most popular include Eclipse (www.eclipse.org) and NetBeans (www.netbeans.org). Each of these include plug-ins that help the programmer include and use libraries, compile to bytecode, and do many other tasks quickly and efficiently.

To program in Java on Ubuntu, you write programs in your favorite text editor or IDE. To compile, you need the package default-jdk, which installs the Java Development Kit appropriate for the hardware being used.

JavaScript

JavaScript is an object-oriented, functional programming language designed primarily for scripting. It supports closures, dynamic and weak typing, and has a syntax that is influenced by C and Java, even though it is unrelated to either (except for the circumstantial name similarity with Java). JavaScript was designed to be used by the Netscape web browser as a way to run short programs on web clients. The name is a result of a mid-1990s marketing agreement between Netscape and Sun to try to leverage the buzz about Java and make JavaScript the shiny, new programming language for the Web. You will occasionally see JavaScript referred to using its original name, EMCAScript. The JavaScript trademark is now owned by Oracle under a license from the technology creators, including Mozilla, the descendant of Netscape.

JavaScript is easily the most popular scripting language for the Web, widely used in programming web applications. Combined with HTML and CSS, it is used to create interesting, diverse, and powerful websites. JavaScript has spawned tons of extensions and development kits such as Node.js and JSP. It is commonly combined with other technologies like XML to create interactive websites using Ajax. Information is often passed using JavaScript Object Notation, or JSON, which is rapidly becoming the successor to XML. Whether people love JavaScript or hate it, it is universally acknowledged as a “must know” technology for programmers today.

To use JavaScript on Ubuntu, you write programs in your favorite text editor. Nothing special is needed. Put the script somewhere and open it with your web browser.

Lisp

Lisp is slightly younger than Fortran, making it not-quite the oldest language discussed in this chapter. It was first released in 1958. Clojure, discussed earlier, is a dialect of Lisp. Lisp is designed to process lists. Linked lists are the language’s main data structure. It was originally created to be used as a practical mathematical notation for computer programs but became popular as a program for research in artificial intelligence.

There have been many versions of Lisp over the years, and many dialects. The most commonly used “regular Lisp” in use today is probably ANSI Common Lisp, of which there are also multiple implementations. To use ANSI Common Lisp on Ubuntu, install the package clisp. Type clisp from the command line to bring up a REPL (from which you may exit by entering quit).

Many Lisp programmers prefer to use Emacs as their editor, which was written in a Lisp dialect called elisp. Emacs includes many useful tools for Lisp and has other plug-ins available. From here it is easy to save code in files, compile it, and enable it to be run a programs rather than from the REPL interface.

Another interesting dialect of Lisp is Scheme, which is also available from the Ubuntu repositories, but is not covered in this chapter.

Lua

Lua is a scripting language created in Brazil in the 1990s. It is similar to and based on Scheme. It is a dynamically typed procedural language with memory management and garbage collection. It is small and often used for embedded applications. It can be compiled on any platform that has a C compiler. Lua is also extensible with a reputation for being simple without being simplistic. It was originally designed for extending applications but is frequently used for standalone and general-purpose needs.

To use Lua on Ubuntu, you write programs in your favorite text editor. To run them, you need the package lua50, which is the Lua interpreter. Run a program by entering lua programName at the command line.

Mono

Although Microsoft intended it for Windows, the Microsoft .NET platform has grown to encompass many other operating systems. No, this isn’t a rare sign of Microsoft letting customers choose which OS is best for them. Instead, the spread of .NET is because of the Mono project, which is a free reimplementation of .NET available under the GPL license.

Because of the potential for patent complications, it took most distros a long time to incorporate Mono, but it’s here now and works just fine. What’s more, Mono supports both C# and Visual Basic .NET, as well as the complete .NET 1.0 and 1.1 Frameworks (and much of the 2.0 Framework, too), making it easy to learn and productive to use.

There were some fears that Mono might cease to exist. In early May 2011, Attachmate bought Novell along with its SUSE Linux distribution. Novell headed up the Mono project. One of the first things that Attachmate did after the acquisition was cancel the Mono project. Then they laid off all the Mono developers, about 30 people.

On May 16, 2011, the lead developer of Mono, Miguel de Icaza, announced on his blog the creation of a new company called Xamarin (http://xamarin.com). The new company was created to continue Mono development and to build Mono applications. Many, if not most, of the original developers working on Mono at Novell are now employed by Xamarin. On July 18, 2011, it was announced by SUSE that an intellectual property agreement and perpetual license had been extended to Xamarin to continue to use and develop Mono as a platform and products that use Mono.

No one knows what the future holds for Mono, but at least we know it has not yet been abandoned. Mono and a few programs written in Mono are installed by default in Ubuntu 12.04, but plans for 12.10 were uncertain when this chapter was finalized for this edition. It is certain that Mono will continue to be available from the Ubuntu repositories, but whether it will be installed by default is not. You can learn more about Mono from http://mono-project.com/. Either way, to compile your own programs in Mono on Ubuntu, you need to install the mono-devel package.

OCaml

Functional programming never really goes away. Sometimes the most elegant way to write something is not by using a class or a method or a framework. Sometimes, the most elegant implementation is simply a function. This is why Lisp endures and why newer languages like OCaml and Haskell appear. Well, we say “appear,” but in reality OCaml is a modern dialect of a very old functional language called ML, which was developed in the early 1970s. OCaml is used primarily, but not exclusively, in the financial world, in programs for electronic trading, markets, and investments. It has an advanced type system and supports not only functional, but also imperative and object-oriented styles of programming. It includes a memory manager and incremental garbage collection.

To use OCaml on Ubuntu, you write programs in your favorite text editor. To run them, you need the package ocaml, which includes two compilers. ocamlc compiles to bytecode and ocamlopt compiles to native code.

Perl

This language has a digital-only chapter, found in previous editions of the book, at www.informit.com/title/0134268113.

Perl is a well-established programming language that has been around since the 1980s. It started as a Common Gateway Interface (CGI) language for web servers. Over time, people have used it for scripting, systems administration, network programming, and a ton of other things. You will find Perl everywhere being used in ways never dreamed of by its originators. It is an incredibly flexible and powerful language. The downside to that is that it is also a complex language that some joking describe as looking like a cat walked across your keyboard. If you know what you are doing with Perl, you can work magic. If you can’t remember what you did and didn’t document it, you will probably end up hating yourself along with anyone else who has to interact with your code. All joking aside, it is worth learning, even just a little.

Perl is installed by default and already in use on your system. To use Perl on Ubuntu, you write programs in your favorite text editor. Nothing special is needed. Put the script somewhere and run it from the command line, like this: perl yourscriptname.pl.

PHP

This language has a digital-only chapter, found in previous editions of the book, at www.informit.com/title/0134268113.

PHP is another well-established programming language originally created for web development, but which now sees use in many other roles. Often it is used for simple scripts on servers. PHP is kind of a cross between Java and Perl. It is quick and easy to learn and commonly found. PHP is another one worth learning, even if just a little.

PHP is installed by default and already in use on your system. To use PHP on Ubuntu, you write programs in your favorite text editor. Nothing special is needed. Put the script somewhere and run it from the command line, like this: php yourscriptname.php.

Python

This language has a digital-only chapter, found in previous editions of the book, at www.informit.com/title/0134268113.

Python is one of the easiest to read languages out there. It has been developed with the idea that there should be one obvious “right” way to do things. As a result, most people who use it believe that Python requires very few comments in the code, because the code is easy to read and understand. For the most part, they are right. Python is also a power, fast, easy to use and learn language that is worth learning, even if just a little.

Python is installed by default and already in use on your system. To use Python on Ubuntu, you write programs in your favorite text editor. Nothing special is needed. Put the script somewhere and run it from the command line, like this: python yourscriptname.py.

Ruby

In Ruby, everything is an object. Every object can be given its own properties and methods. You can use closures (called blocks in Ruby). You do not need to declare variables, and only single inheritance exists. Ruby includes garbage collection, exception handling, and can be extended by writing extensions in C. Ruby was heavily influenced in different ways by Lisp, Perl, Python, and Smalltalk and was originally designed for systems administration-type scripting.

Most Ruby programmers seem to prefer using Ruby in combination with a web application framework called Rails, making what is known as Ruby on Rails. This framework is strongly tied to the DRY philosophy: “Don’t repeat yourself.” Every piece of information is stored in a single, unambiguous place. Ruby on Rails runs on top of a web server like Apache or Nginx and is extensible using Ruby Gems (rubygems.org).

To use Ruby on Ubuntu, you write programs in your favorite text editor. To run them, you can install the interpreter package ruby1.8 from the Ubuntu repositories. Because Ruby changes often, the official Ruby documentation recommends not using a distribution’s package manager, but rather downloading the latest version directly from the Ruby website.

Rust

Rust is developed by Mozilla, the people behind the Firefox browser. It is advertised on www.rust-lang.org as

“...a curly-brace, block-structured expression language. It visually resembles the C language family, but differs significantly in syntactic and semantic details. Its design is oriented toward concerns of ‘programming in the large’, that is, of creating and maintaining boundaries—both abstract and operational—that preserve large-system integrity, availability and concurrency.”

Rust is not yet available in the Ubuntu repositories, but as it is being developed and used by people at Mozilla, it is likely to be of interest to a few of this book’s readers and deserves a quick mention here.

Scala

Scala takes its name from “scalable language.” It is designed to grow with its users’ needs. Scala runs on a JVM. It is suited for both functional and object-oriented programming. Scala programs are bytecode compatible with Java and you can call either language from the other. Support for the .NET Framework is also available. Scala syntax is much more succinct than Java. Programs are generally shorter to write. Like Ruby, in Scala everything is an object. Types are inferred and do not need to be made explicit. Like Clojure, it suits the desire that many have to perform functional programming on a JVM.

To use Scala on Ubuntu, you write programs in your favorite text editor. To compile, you need the package scala. To compile, use scalac sourceFile and to run using the interpreter, use scala sourceFile.

Scratch

Scratch is a programming language primarily designed for educators and children. It is from MIT and was created with the hope of making it easy to create fun interactive stories, animations, games, music, and art, all while teaching creative thinking, systematic reasoning skills, mathematical and computational ideas, and collaboration. Creations can be shared on the Web and then accessed from anywhere. Scratch has an online component, but development happens on a local machine.

To use Scratch on Ubuntu, install scratch. Then, check out the website at http://scratch.mit.edu to get started.

Vala

Vala is a very new language. It was designed to make the lives of the developers of GNOME easier by bringing features from modern languages into C for use in the GNOME desktop environment development. The syntax is very similar to C#. Vala is a compiled language, but instead of being complied directly to bytecode, Vala is compiled to C, which is then compiled with a C compiler for each specific platform.

In C, a programmer must manually manage reference in memory. In Vala, this is automated if the built-in reference types are used instead of plain pointers. Vala also uses the GNOME GObject system to provide reference counting. For the most part, usage of Vala is primarily by people working on GNOME, which makes sense because this is the reason Vala was developed. Time will tell whether it receives wider interest.

To use Vala on Ubuntu, you write programs in your favorite text editor. To compile, you need the package valac, which is the Vala Compiler. You then need to compile the output from that with a C compiler such as the GNU C Compiler described in Chapter 38, “Using Programming Tools for Ubuntu.”

References

Image www.adaic.org/—The main website for the Ada Information Clearinghouse, an excellent resource for learning Ada.

Image http://clojure.org/—The main website for Clojure.

Image www.cobol.com/—The main website for Cobol.

Image http://dlang.org/—The main website for D.

Image http://www.dartlang.org—The main website for Dart.

Image http://elixir-lang.org/—The main website for Elixir.

Image www.erlang.org/—The main website for Erlang.

Image www.forth.org/—The main website for the Forth Interest Group, a great place to learn more about Forth.

Image www.jwdt.com/~paysan/gforth.html—The main website for Gforth, the GNU project’s implementation of Forth.

Image http://gcc.gnu.org/fortran/—The main website for Gfortran.

Image http://groovy.codehaus.org/—The main website for Groovy.

Image http://haskell.org/—The main website for Haskell.

Image www.java.com/—The main website for Java.

Image www.w3schools.com/js/default.asp—The W3C Tutorial page for JavaScript. The site is also a great place to learn HTML and CSS.

Image www.lisp.org/—The Association of Lisp Users web page.

Image www.clisp.org/—The main website for GNU Cisp, an implementation of Common Lisp.

Image www.lua.org/—The main website for Lua.

Image www.perl.org/—The main website for Perl.

Image http://php.net/—The main website for PHP.

Image www.python.org/—The main website for Python.

Image www.ruby-lang.org/en/—The main website for Ruby.

Image www.scala-lang.org/—The main website for Scala.

Image http://live.gnome.org/Vala—The main website for Vala.

Image http://scratch.mit.edu—The main website for Scratch.

Image https://help.ubuntu.com/community/PowerUsersProgramming—A wiki page about programming using Ubuntu as your development platform.