Chapter 39

Using Popular Programming Languages

Students and developers who pay attention to either computer programming history or current trends are already aware of a vast array 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; this chapter also 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 a more up-to-the-minute version or a one that is 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 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 [email protected] for consideration.

You will notice an interesting mix of old and new languages here. Some have asked why some of the 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 them in use somewhere. A 2013 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 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 life span. 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, has good interfaces to other languages like C, and works well with distributed systems and numerical 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 element in programming, especially in functional programming languages, such as Clojure. (The language’s name is rumored to be a mash-up of closure and Java.) Typically, variables are designed to work only within a defined function. Using 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 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 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, using closures is a convenient way to provide encapsulation without using objects or classes. An example of the use of a closure is a function being encapsulated completely within another function but still being able to read the state of a variable that exists in the containing function.

Clojure is unlike most other 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 but use a build tool and editor/IDE integration instead (well, except when you are interacting using the REPL; in any case, you do not typically run a tool called clojure from the command line other than the REPL). That process is a bit beyond the short introduction of this chapter; however, you can get started quickly by installing the clojure package. Among other things, installing this package also 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.

COBOL

COBOL, Common Business Oriented Language, has been around since the 1960s. It 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 percent of the respondents said they were already noticing a Cobol programmer shortage, while 50 percent said the average age of their Cobol staff was 45 or older and 22 percent said the age was 55 or older (see 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 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 such 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 https://dlang.org/download.html, following the instructions at the site.

Dart

Dart is a new language and an open source project headed up by Google. It 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 it does not require types, and it is designed to be modular and scalable, offering 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.

Elm

Elm is a functional language that compiles to JavaScript. It is designed to help make websites and web apps with an emphasis on simplicity. The goal of simplicity is confidence while programming, confidence that nothing has been forgotten or misunderstood. Elm includes reliable refactoring, automatically enforced sematic versioning for all Elm packages, and friendly error messages.

To use Elm on Ubuntu, you have to download the official binary from a GitHub repo (official installers exist for Windows and macOS). The lack of official packaging for Linux may eliminate the possibility of using Elm in many organizations and companies, but if you are interested, take a look at the current install instructions at https://guide.elm-lang.org/install/elm.html.

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 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, which first appeared in the 1970s, 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 it 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 a 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.

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 numerical 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 (https://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 numerical 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.

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.

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 or in an interactive console by entering groovyConsole, or you can 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 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 that of 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 Sun could not relicense because it 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 IDEs are Eclipse (www.eclipse.org) and NetBeans (www.netbeans.org). Each of these includes plug-ins that help a 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 and dynamic and weak typing, and it 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.

Kotlin

Kotlin is a staticly typed, cross-platform language that runs on the Java virtual machine and can also be compiled to JavaScript source code, or you can use the LLVM compiler. It has a concise syntax and supports both object-oriented and functional programming styles. It is open source and has seen use in mobile programming for Android, where it is becoming quite popular for new projects and is even supported in the Android Studio 3.0 IDE as an alternative to the standard Java compiler. Kotlin was created and is supported by JetBrains, which is a global software vendor.

To use Kotlin on Ubuntu, install the snap package using

matthew@seymour:~$ snap install --classic kotlin

Lisp

Lisp is slightly younger than Fortran—first released in 1958—making it not quite the oldest language discussed in this chapter. 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, as well as 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 as 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 lua5.3, 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.

You can learn more about Mono from https://mono-project.com. In any case, 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

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 this is that it is also a complex language that some jokingly 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—as will 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.

Note that there was a development effort underway to replace Perl 5. The new version was to be called Perl 6, but had diverged far enough away from Perl 5 that the decision was made to rename it to Raku. You can learn about Raku at www.raku.org.

This book has a digital-only chapter on the Perl language, available at www.informit.com/title/9780136778851.

PHP

PHP is another well-established programming language originally created for web development but that 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 language worth learning, even if you learn 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.

This book has a digital-only chapter on the PHP language, available at www.informit.com/title/9780136778851.

Python

Python is one of the easiest languages to read. 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 powerful, fast, easy-to-use and easy-to-learn language that is worth learning, even if you learn 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.

This book has a digital-only chapter on the Python language, available at www.informit.com/title/9780136778851.

Raku

Raku is the next evolution of Perl and was developed by people from the Perl community. Originally slated to become Perl 6, thus far it is primarily a specification with an early stage implementation available as Rakudo Star, which you can download as source at https://rakudo.org/star/.

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 and exception handling, and it 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 system 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 RubyGems (see https://rubygems.org/).

To use Ruby on Ubuntu, you write programs in your favorite text editor. To run them, you can install the interpreter package ruby-full 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 follows:

…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. It is also quickly catching up to the Go Language and may surpass it soon as the language of choice for large-scale web applications in the cloud.

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 that of Java. Programs are generally shorter to write. As in 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. Use scalac sourceFile to compile, 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 and check out https://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 GNOME desktop environment development. The syntax is very similar to that of 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 references 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, Vala is primarily used 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.”

References

www.adaic.orgThe Ada Information Clearinghouse, an excellent resource for learning Ada

https://clojure.orgThe main website for Clojure

https://dlang.orgThe main website for D

www.dartlang.orgThe main website for Dart

https://elixir-lang.orgThe main website for Elixir

https://elm-lang.orgThe main website for Elm

www.erlang.orgThe main website for Erlang

www.forth.orgThe main website for the Forth Interest Group, a great place to learn more about Forth

www.gnu.org/software/gforth/The main website for Gforth, the GNU project’s implementation of Forth

https://gcc.gnu.org/fortran/The main website for Gfortran

https://groovy-lang.orgThe main website for Groovy

https://haskell.orgThe main website for Haskell

www.java.comThe main website for Java

www.w3schools.com/js/default.aspThe W3C Tutorial page for JavaScript, which is also a great place to learn HTML and CSS

https://kotlinlang.org/The main website for Kotlin

https://lisp-lang.orgThe main website for Common Lisp

www.clisp.orgThe main website for GNU Clisp, an implementation of Common Lisp

www.lua.orgThe main website for Lua

www.perl.orgThe main website for Perl

https://php.netThe main website for PHP

www.python.orgThe main website for Python

https://raku.orgThe main website for Raku

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

www.scala-lang.orgThe main website for Scala

https://live.gnome.org/ValaThe main website for Vala

https://scratch.mit.eduThe main website for Scratch

https://help.ubuntu.com/community/PowerUsersProgrammingA wiki page about programming using Ubuntu as your development platform

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.15.135.175