in progress

Well, this bold title draws inspiration from Seven Languages in Seven Weeks1 (2010) and Seven More Languages in Seven Weeks2 (2014), two books that explore programming paradigms in the "Seven in Seven" series. Those books introduce languages one by one, or sequentially. This post, however, adopts a parallel approach, meaning that selected eight of the fourteen languages will be covered simultaneously at each stage of learning.

All 14 programming languages mentioned are:

  1. Ruby
  2. Io
  3. Prolog
  4. Scala
  5. Erlang
  6. Clojure
  7. Haskell
    (the first seven)
  8. Lua
  9. Factor
  10. Elm
  11. Elixir
  12. Julia
  13. miniKanren
  14. Idris
    (the second seven)

As can be observed, some of them are well-known and popular today, with their killer applications, while others are less prominent. But, since 14 languages might be a bit too many and some of them share similar characteristics, the scope has been narrowed down to 8 featured languages (all right, based on my consideration and preference). These are listed and described below.

  1. Ruby
    dynamically typed, interpreted, garbage collection, everything-objected, first appeared in 1995
  2. Prolog
    untyped, both interpreted and compiled, logic programming, many implementations, first appeared in 1972
  3. Clojure
    dynamically typed, compiled, garbage collection, dialect of Lisp, first appeared in 2007
  4. Haskell
    statically typed, both interpreted and compiled, purely functional, first appeared in 1990
  5. Lua
    dynamically typed, interpreted, first appeared in 1993
  6. Factor
    dynamically typed, compiled, stack-based, functional, garbage collection, first appeared in 2003
  7. Elm
    statically typed, compiled to JavaScript, purely functional, domain-specific, first appeared in 2012
  8. Julia
    dynamically typed, compiled, first appeared in 2012

The goal is not to master each of the eight languages in such a short time, but to appreciate their quirks and subtleties. This will also support deeper use and study later on. Before diving in, reading the introduction chapter of Seven Languages in Seven Weeks is highly recommended.

All these languages were entirely unfamiliar to me until this experience, except for Julia, which I had briefly encountered.

Week 1

Get Started

To begin, here is a list of the 8 languages with their main websites. Let's set up 8 development environments in this way. The hardware used consists of two common laptops, running macOS® (ARM64) and Windows® (x86_64), respectively.

  1. Ruby Programming Language
  2. The GNU Prolog web site (one of the Prolog implementations)
  3. Clojure
  4. Haskell Language
  5. The Programming Language Lua
  6. Factor programming language
  7. Elm - delightful language for reliable web applications
  8. The Julia Programming Language

Thanks to modern advancements in package managers such as Homebrew for macOS and Scoop for Windows, installations have been significantly simplified. It is assumed that at least one package manager is already available. Nevertheless, some manual operations will also be included when necessary.

It is time to download and deploy the latest distributions.

Only the content followed by > is command input, and the rest is the output.

  • Ruby

Although you can easily try Ruby in your browser, you can also read the installation guide for help on installing Ruby. —Ruby Documentation

> brew install ruby
==> Downloading https://ghcr.io/v2/homebrew/core/ruby/manifests/3.3.6
...
> scoop install ruby
Installing 'ruby' (3.3.6-2) [64bit] from 'main' bucket
...

Check the situation by inspecting version.

> ruby -v
ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.arm64e-darwin24]

Ruby may be pre-installed on some systems. It looks like the issue of multiple Ruby versions co-existing on macOS needs to be solved.

An advanced way to do this is to use rbenv or Ruby Version Manager(RVM), for managing Ruby environments. Or configure the shell environment manually.

echo 'export PATH="/opt/homebrew/opt/ruby/bin:$PATH"' >> ~/.zshrc

This appends a PATH to the file .zshrc to set the Ruby installed by Homebrew to a higher priority. Then, restart the terminal and check the version again.

> ruby -v
ruby 3.3.6 (2024-11-05 revision 75015d4c1f) [arm64-darwin24]

On the other hand, it works well on Windows.

> ruby -v
ruby 3.3.6 (2024-11-05 revision 75015d4c1f) [x64-mingw-ucrt]
  • (GNU) Prolog

We provide both source and binary distributions for GNU Prolog. —The GNU Prolog web site

> brew install gnu-prolog
==> Downloading https://ghcr.io/v2/homebrew/core/gnu-prolog/manifests/1.5.0
...
> gprolog
GNU Prolog 1.5.0 (64 bits)
Compiled Jul  8 2021, 09:35:47 with clang
Copyright (C) 1999-2024 Daniel Diaz
| ?-

This shows that the Prolog runtime has been successfully installed.

For Windows, simply download and run the auto-installer.

  • Clojure

Clojure (the language) is provided as a Java ARchive (JAR) file, available in the Maven Central Repository, a public repository for JVM-based artifacts. If needed, you can find more detailed version information on the Releases page. —Clojure Guides

> brew install clojure
==> Downloading https://ghcr.io/v2/homebrew/core/clojure/manifests/1.12.0.1488
...
> clojure
Clojure 1.12.0
user=>

For Windows, to avoid using Windows Subsystem for Linux(WSL), download and run the installer from clj-msi, a Clojure installer.

> clojure
Downloading: org/clojure/clojure/1.12.0/clojure-1.12.0.pom from central
...
Clojure 1.12.0
user=>

This shows that Clojure is ready.

  • Haskell

Welcome, new Haskeller!

A complete Haskell development environment consists of the Haskell toolchain (compiler, language server, build tool) and an editor with good Haskell support. —Haskell Get started

Use GHCup to install GHC, cabal-install, Stack and haskell-language-server, instead of installing GHC directly or deprecated Haskell Platform.

> brew install ghcup
==> Downloading https://ghcr.io/v2/homebrew/core/ghcup/manifests/0.1.30.0
...

To install on Windows, the homepage of GHCup provides following PowerShell script.

> Set-ExecutionPolicy Bypass -Scope Process -Force;[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; try { & ([ScriptBlock]::Create((Invoke-WebRequest https://www.haskell.org/ghcup/sh/bootstrap-haskell.ps1 -UseBasicParsing))) -Interactive -DisableCurl } catch { Write-Error $_ }
Picked C:\ as default Install prefix!
Welcome to Haskell!

This script can download and install the following programs:
...

Run and then fill in its options. Also, check the setup.

> ghcup --version
The GHCup Haskell installer, version 0.1.30.0
  • Lua

Use the live demo to play with Lua if you don't want to install anything on your computer. To run Lua programs on your computer, you'll need a standalone Lua interpreter and perhaps some additional Lua libraries. —Lua: getting started

> brew install lua
==> Downloading https://ghcr.io/v2/homebrew/core/lua/manifests/5.4.7
...
> scoop install lua
Installing 'lua' (5.4.7-2) [64bit] from 'main' bucket
...

Test the command line REPL environment of Lua.

> lua
Lua 5.4.7  Copyright (C) 1994-2024 Lua.org, PUC-Rio
>
  • Factor

Binary packages are the recommended route for new users who wish to try Factor. —factorcode.org

It is only released, however, for x86_64 on macOS. So, Rosetta 2 is necessary.

> brew install factor
==> Downloading https://downloads.factorcode.org/releases/0.100/factor-macos-x86
...

zsh: command not found? Configure the PATH for one's shell environment.

> echo 'export PATH=/Applications/factor:"$PATH"' >> ~/.zshrc

To set up on Windows, download and run the self-installing executable.

Test the command line REPL environment of Factor.

> factor
Factor 0.100 x86.64 (2281, heads/master-80a4633f05, Sep 11 2024 14:22:41)
[Clang (GCC Homebrew Clang 18.1.8)] on macos
IN: scratchpad
  • Elm

...Things are going well, but we need to get Elm working on your computer for the next couple sections! —Elm Introduction Guide

> brew install elm
==> Downloading https://ghcr.io/v2/homebrew/core/elm/manifests/0.19.1-3
...
> scoop install elm
Installing 'elm' (0.19.1) [64bit] from 'main' bucket
...

Try to call command help messages.

> elm
Hi, thank you for trying out Elm 0.19.1. I hope you like it!
...
  • Julia

Julia installation is straightforward, whether using precompiled binaries or compiling from source. Download and install Julia by following the instructions at https://julialang.org/downloads/. —Julia Documentation

> brew install julia
==> Downloading https://ghcr.io/v2/homebrew/core/julia/manifests/1.11.2
...
> scoop install julia
Installing 'julia' (1.11.2) [64bit] from 'main' bucket
...

Test the command line REPL environment of Julia.

> julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.11.2 (2024-12-01)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia>

Finally, one or more code editors (or IDEs) are required to handle the composing of above languages. Here, Visual Studio Code and its extensions for these languages will be used, but a detailed setup guide is not included, as readers are encouraged to explore and configure them.

Elements

Week 2

Week 3

Week 4