Language Atlas (mini-courses for more languages) Module 1 – Start here: how the atlas works and how to learn a language fast
How the Language Atlas works
What every atlas mini-course contains, how to read and repeat a recorded example with its exact command and version, and why a language is in or out.
What you will learn
- Explain the four parts of every atlas mini-course: setup, idioms, a signature feature and a tested project
- Reproduce a recorded example with the exact command and toolchain pin shown in it
- Use the language register to see why a language is in the atlas, waiting or left out
What you’ll learn
What you will learn
- Explain the four parts of every atlas mini-course: setup, idioms, a signature feature and a tested project
- Reproduce a recorded example with the exact command and toolchain pin shown in it
- Use the language register to see why a language is in the atlas, waiting or left out
On this page
The same small program prints 55 in Tcl, Objective-C and Visual Basic, yet it takes one command to run in Tcl, two in Objective-C and a project file in Visual Basic. The Language Atlas gives 12 less common languages a short course each, and every example in it shows the commands that ran it and the version of each tool that printed its output, so that you can repeat any run on your own computer.
This lesson shows how the atlas is laid out: the four lessons each language gets, how to read a recorded terminal session: A run of commands typed one after another in a terminal, kept with what each one printed. In a recorded session the lines after $ are the commands to type, and the lines below them are their output. and repeat it, why one Tcl expression prints 9 on one version and 11 on another, and the register that says why a language is in the atlas, waiting for a later edition or left out.
Every atlas language gets the same four lessons
Take Tcl. Its mini-course has four lessons, and every other language of the atlas has the same four, in the same order:
- Setup and where it is used. Install the pinned toolchain, check that it reports the pinned version and run a first program.
- Idioms, compared with a language you know. Tcl next to Python and Bash, Visual Basic next to C#. Each idiom is a pair of short programs that print the same thing.
- The signature feature. What the language does that the one you know does not: for Tcl, its event loop and coroutines.
- A project with tests. One small program that uses the first three lessons, with tests that say when it works.
The order follows what each lesson needs. Idioms can only be compared once something runs, the signature feature reads naturally only after the everyday idioms do, and the project needs all three. Step through the four lessons for Tcl, and see where a failing project test sends you:
The drawing shows the whole scene; its 5 steps are listed below.
Every step as text
- Lesson 1: setup. Lesson 1 installs the pinned toolchain, checks that it reports the pinned version and runs a first program. For Tcl that means tclsh answering with its exact version, such as 9.0.4. The lesson also shows where the language is used, so you know what code you will meet.
- Lesson 2: idioms. Lesson 2 meets the language through one you already know: Tcl through Python and Bash, Visual Basic through C#. Each idiom is a pair of short programs that print the same thing, and the traps that change results get runs of their own.
- Lesson 3: the feature. Lesson 3 teaches what the language does that the one you know does not: for Tcl its event loop and coroutines, for Ada contracts, for Gleam processes and actors. It is the reason to learn the language at all.
- Lesson 4: a project. Lesson 4 builds one small program that uses the first three lessons, with tests that say when it works. For Tcl it is a summariser for timing reports.
- When a test fails. A failing project test usually points at an idiom: a division, a comparison or a string length that works differently from the language you know. Go back to lesson 2 for that idiom, fix the line, and run the tests again.
The way back from lesson 4 to lesson 2 is the one you will use most. In a new language, tests rarely fail on syntax, which the compiler or interpreter rejects at once; they fail on an idiom that means something else, such as a division. The twelve languages, with the language each one’s lesson 2 starts from and each one’s signature feature:
| Language | Lesson 2 starts from | Lesson 3, the signature feature |
|---|---|---|
| ABAP | Java and Python | objects, exceptions and unit tests |
| Visual Basic .NET | C# | LINQ, XML literals and asynchronous code |
| Object Pascal | Python and C | classes, generics and exceptions |
| Ada | C and Java | contracts, tasks and a first SPARK proof |
| Tcl | Python and Bash | events, coroutines and domain-specific languages |
| Objective-C | Swift and C | memory, blocks and calls from Swift |
| Groovy | Java | closures, domain-specific languages and static checking |
| D | C, C++ and Python | programs that run at compile time |
| Gleam | JavaScript and Python | processes, actors and calls into other languages |
| Nim | Python | macros, memory and its C and JavaScript back ends |
| Elm | JavaScript | The Elm Architecture, JSON and ports |
| Crystal | Ruby | macros, fibers and C bindings |
The track page lists each language’s four lessons under a module of its own. A capstone module at the end asks for one money-splitting specification in any atlas language.
Checkpoint
Check: The four lessons of each language
A recorded session names its commands and its versions
Here are the three programs of the opening, one per tab. Each says hello and adds the whole numbers 1 to 10; the Visual Basic program comes with its project file, which says how to build it:
Tcl · pin/hello.tcl
# Says which Tcl runs it, then adds the whole numbers 1 to 10.
puts "Hello from Tcl [info patchlevel]"
set total 0
for {set n 1} {$n <= 10} {incr n} {
incr total $n
}
puts "1 + 2 + ... + 10 = $total" Objective-C · pin/hello.m
// Says hello, then adds the whole numbers 1 to 10.
#import <Foundation/Foundation.h>
#include <stdio.h>
int main(void) {
@autoreleasepool {
NSString *greeting = @"Hello from Objective-C";
printf("%s\n", greeting.UTF8String);
NSInteger total = 0;
for (NSInteger n = 1; n <= 10; n++) {
total += n;
}
printf("1 + 2 + ... + 10 = %ld\n", (long)total);
}
return 0;
} Visual Basic · pin/hello/Program.vb
' Says hello, then adds the whole numbers 1 to 10.
Module Program
Sub Main()
Console.WriteLine("Hello from Visual Basic")
Dim total As Integer = 0
For n As Integer = 1 To 10
total += n
Next
Console.WriteLine($"1 + 2 + ... + 10 = {total}")
End Sub
End Module Visual Basic project · pin/hello/Hello.vbproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<OptionStrict>On</OptionStrict>
</PropertyGroup>
</Project> None of the three languages runs in the browser here, so this page shows a recorded terminal session instead: each
command as it was typed after a $, and below it what the command printed.
from session import run
# One small program in three atlas languages. Each tool first says which version it is; then the program is built
# where the language needs a build, and run. The last three lines run one Tcl expression on two versions of Tcl.
run("""
echo 'puts [info patchlevel]' | tclsh9.0
tclsh9.0 pin/hello.tcl
clang --version | head -n 1
clang -fobjc-arc -Wall -Wextra -framework Foundation pin/hello.m -o hello
./hello
dotnet --version
dotnet run --project pin/hello
echo 'puts "[info patchlevel]: 010 + 1 = [expr {010 + 1}]"' | /usr/bin/tclsh
echo 'puts "[info patchlevel]: 010 + 1 = [expr {010 + 1}]"' | tclsh9.0
""") Output
$ echo 'puts [info patchlevel]' | tclsh9.0
9.0.4
$ tclsh9.0 pin/hello.tcl
Hello from Tcl 9.0.4
1 + 2 + ... + 10 = 55
$ clang --version | head -n 1
Apple clang version 21.0.0 (clang-2100.3.34.2)
$ clang -fobjc-arc -Wall -Wextra -framework Foundation pin/hello.m -o hello
$ ./hello
Hello from Objective-C
1 + 2 + ... + 10 = 55
$ dotnet --version
10.0.401
$ dotnet run --project pin/hello
Hello from Visual Basic
1 + 2 + ... + 10 = 55
$ echo 'puts "[info patchlevel]: 010 + 1 = [expr {010 + 1}]"' | /usr/bin/tclsh
8.5.9: 010 + 1 = 9
$ echo 'puts "[info patchlevel]: 010 + 1 = [expr {010 + 1}]"' | tclsh9.0
9.0.4: 010 + 1 = 11
Recorded with Python 3.14.8 on macOS 26 arm64. To run it yourself: mise exec python@3.14.8 -- python3 pin_session.py
Read it from the top. Each part starts by asking a tool for its version, and the answer is the
toolchain pin: The exact version of the compiler, interpreter or SDK that an example was built and run with, such as Tcl 9.0.4 or the .NET SDK 10.0.401. Another version may print something else for the same file. of what follows: tclsh9.0 answered 9.0.4, clang answered Apple clang
version 21.0.0, and dotnet answered 10.0.401. Then come the commands that build and run the program. Tcl runs the
script directly. Objective-C, a superset of C, is compiled first: clang writes a program named hello, and the next
line runs it. Visual Basic needs its project file, and dotnet run builds the project before it runs it. All three
print 55.
Under the session, the page says it was recorded with Python 3.14.8 and gives a Python command. That is the small
script that typed the commands and kept what they printed, so the session replays the same way every time. You do not
need it to repeat the run: the commands to type are the lines after each $.
Repeating a session takes five moves, and two of them can send you back. Step through them with this session’s own versions:
The drawing shows the whole scene; its 7 steps are listed below.
Every step as text
- Read the record. Start at the top of the session. Its first lines are each tool answering a version question: tclsh9.0 said 9.0.4, clang said Apple clang version 21.0.0, dotnet said 10.0.401. Those are the pins.
- Install the version. Install that version, or find out whether one you have reports it. One Mac can hold several Tcls: on the Mac that recorded this session, tclsh9.0 answered 9.0.4 and macOS's own /usr/bin/tclsh answered 8.5.9, which is not the pin.
- Ask your tool. Type the same version command in your own terminal and compare its answer with the record before you run anything else.
- Another version. If your tool reports another version, go back and install the pinned one. With a different version, a different output tells you nothing about the program: 010 + 1 is 9 on Tcl 8.5.9 and 11 on Tcl 9.0.4.
- Type the commands. With the pinned version in place, type each command that follows a $, in the order shown. A build line, such as the clang line, leaves a program behind that the next line runs.
- Compare the output. Compare what you see with the recorded output, line by line. The same version and the same output means you have repeated the run.
- Output differs. The same version and a different output points at what you typed, the folder you typed it in or the files themselves. Check the command and the file, then type it again.
The version comes first because a run on another version proves nothing about the program, as the next section shows with one line of Tcl.
Repeat the Tcl part
Install Tcl 9 (on a Mac, Homebrew calls the package tcl-tk), save the Tcl tab as hello.tcl, then type
echo 'puts [info patchlevel]' | tclsh and tclsh hello.tcl. On Tcl 9.0.4 your output matches the session line
for line. On any other version, such as 9.1.0, the hello line names that version instead: the tool changed that
line, not the program.
Checkpoint
Check: Reading and repeating a recorded session
One Tcl expression, two versions, two answers
The last two lines of the session run the same expression, expr {010 + 1}, on two Tcls of one Mac. macOS still
ships Tcl 8.5.9 as /usr/bin/tclsh, while the tclsh9.0 used above is 9.0.4:
| Command | Version it reports | 010 + 1 printed |
|---|---|---|
/usr/bin/tclsh |
8.5.9 | 9 |
tclsh9.0 |
9.0.4 | 11 |
Neither answer is a bug. Before 9.0, Tcl read a number that starts with 0 as octal, so 010 was eight. The Tcl 9.0
release notes record the change in one line: “0NNN format is no longer octal interpretation. Use 0oNNN”. In Tcl 9,
010 is ten, and an octal number needs the 0o prefix.
So the version is part of an example, as much as the file is. A recorded output is a fact about one version: the same script can print something else on the next release, and you cannot tell which from the output alone. That is why every atlas session starts with the version lines, and why the first check when your output differs is the version, not the program. The 9.0 release notes list other incompatible changes too; the third lesson of this module reads them as a reference reader would.
Key idea
A recorded output is true for the version that printed it: match the version first, then compare the output.
Checkpoint
Check: Why the version is part of an example
The register says why a language is in, waiting or out
A language joins the atlas when a free toolchain runs it from a command line, so every example can show a real run that you can repeat, and when its official documentation can be cited. The register keeps every language that was considered, with one of three statuses and the reason for it:
| Language | Status | Why |
|---|---|---|
| ABAP | In the atlas | Its home is inside proprietary SAP systems, but the MIT-licensed abaplint transpiler runs a large part of the language on Node.js |
| Visual Basic .NET | In the atlas | The free .NET SDK builds and runs Visual Basic projects, as the session above shows |
| Objective-C | In the atlas | Apple clang compiles it, as above; its examples run on macOS only |
| Tcl | In the atlas | Its licence lets anyone use, copy and change it and its documentation, without a fee |
| Standard ML, Smalltalk, Raku, Forth | Waiting | Considered for a later edition of the atlas, with no date set |
| VBScript | Left out | It runs only on Windows, and Microsoft has deprecated it |
| LabVIEW | Left out | Its language, G, is graphical: a program is a diagram, not text that a page can show with its output |
| Solidity | Left out | A language for smart contracts: code that moves money on a blockchain needs a security-first course of its own |
| OCaml, Scala, Elixir | Left out | Each is taught in a track of its own on MySmartCoPilot Learn |
ABAP shows that the rules are applied, not assumed. Its own runtime belongs to SAP systems, so it could have been left out with VBScript. Instead its examples run on the abaplint transpiler, a transpiler: A compiler whose output is source code in another high-level language rather than machine code. The abaplint transpiler turns ABAP into JavaScript, which Node.js then runs. that turns ABAP into JavaScript for Node.js, which Exercism’s ABAP test runner also depends on. The choice has a price that the ABAP lessons state: the transpiler takes ABAP 7.02 syntax, newer syntax is converted first, and topics that only an SAP system can show are named as such.
VBScript’s reason comes from Microsoft’s own list of deprecated Windows features:
VBScript is deprecated. In future releases of Windows, VBScript will be available as a feature on demand before its removal from the operating system.
A course about a language on its way out of its only platform would teach towards nothing.
Organisations named on this page
MySmartCoPilot has no link with Apple, Microsoft, SAP, NI, Exercism or any other organisation named in this lesson. Each one is named only as the maker or publisher of a language, a tool or a document.
Checkpoint
Check: The language register
Practise: check a run against its record
The exercise turns the five moves of repeating a session into code: find the version in what a tool printed, and
compare your output with the record only when the version is the pin. Its sample tests use this lesson’s own session,
from the hello programs to 010 + 1 on both Tcls.
Exercise · Easy · Python
Check your own run against a recorded session
You typed the commands of a recorded session on your own computer and want to know whether your run matches the record. Write two functions in run_check.py.
version_of(line) returns the first version number in a line that a tool printed when asked for its version: one or more digits, then one or more groups of a dot and digits. It returns None when the line holds no version.
version_of("9.0.4")is"9.0.4", whattclsh9.0printed forinfo patchlevel.version_of("Apple clang version 21.0.0 (clang-2100.3.34.2)")is"21.0.0".version_of("10.0.401")is"10.0.401", whatdotnet --versionprinted.
check_run(pin, version_line, recorded, mine) compares your run with the record and returns one of three strings:
"other version"when the version inversion_lineis notpin. Compare nothing else: with another version, a different output says nothing about the program."same"when the version is the pin and the two outputs have the same lines. Spaces at the end of a line, Windows line endings (\r\n) and empty lines at the very end do not count as differences."other output"when the version is the pin and the outputs differ.
The sample tests use the lesson's own session: the hello programs, and 010 + 1 on Tcl 8.5.9 and Tcl 9.0.4.
Starter code · run_check.py
def version_of(line):
"""Return the first version number in the line, such as "21.0.0", or None when the line has none."""
# Replace this line with your code.
return None
def check_run(pin, version_line, recorded, mine):
"""Return "same", "other version" or "other output", as the prompt describes."""
# Replace this line with your code.
return "same" The sample tests · test_run_check.py
from run_check import check_run, version_of
def test_versions_from_the_session():
"""finds the version in what tclsh9.0, clang and dotnet printed"""
assert version_of("9.0.4") == "9.0.4"
assert version_of("Apple clang version 21.0.0 (clang-2100.3.34.2)") == "21.0.0"
assert version_of("10.0.401") == "10.0.401"
def test_no_version_in_the_line():
"""returns None for a line without a version number"""
assert version_of("zsh: command not found: tclsh") is None
def test_same_run():
"""says "same" for the pinned version and the recorded output"""
recorded = "Hello from Tcl 9.0.4\n1 + 2 + ... + 10 = 55\n"
assert check_run("9.0.4", "9.0.4", recorded, recorded) == "same"
def test_other_version_is_checked_first():
"""says "other version" for Tcl 8.5.9, whatever it printed"""
assert check_run("9.0.4", "8.5.9", "11\n", "9\n") == "other version"
assert check_run("9.0.4", "8.5.9", "11\n", "11\n") == "other version"
def test_other_output():
"""says "other output" when the version is the pin and a line differs"""
assert check_run("9.0.4", "9.0.4", "010 + 1 = 11\n", "010 + 1 = 9\n") == "other output"
def test_line_ends_do_not_count():
"""ignores spaces at the ends of lines, Windows line endings and a missing last newline"""
recorded = "Hello from Visual Basic\n1 + 2 + ... + 10 = 55\n"
mine = "Hello from Visual Basic \r\n1 + 2 + ... + 10 = 55"
assert check_run("10.0.401", "10.0.401", recorded, mine) == "same" A hint
Check the version first and return straight away when it is not the pin. For the outputs, compare lists of lines: text.splitlines() already treats \r\n as a line break, and line.rstrip() drops the spaces at the end of a line.
Results of the sample tests
| Test | Result | Details |
|---|
What your code printed
The sample tests run on this device, in your browser (Pyodide): nothing is sent to mysmartcopilot.com. The first run downloads Python (about 13.5 MB), which is kept for the next runs. A check in your browser is feedback for you, not proof that the code is right for every input.
Then work through the self-check on the four ideas of this lesson, from the four lessons of a mini-course to the register. It begins with the idea your earlier answers show you know least:
Practice that adapts to you
Practise this lesson
10 questions about 4 ideas of this lesson. Each answer is explained at once, and what you get right is kept in this browser.
Interview questions
Warm-up (fresher to mid-level): What is a toolchain pin, and why does a recorded output need one?
A toolchain pin is the exact version of the compiler, interpreter or SDK that a program was built and run with, such
as Tcl 9.0.4 or the .NET SDK 10.0.401. A recorded output is only true for that version: expr {010 + 1} prints 9 on
Tcl 8.5.9 and 11 on Tcl 9.0.4, because Tcl 9 stopped reading a leading zero as octal. Without the pin, someone who
gets a different answer cannot tell whether the program, the input or the tool changed. With it, the first check
takes a second: ask the tool for its version and compare. Teams pin toolchains in files for the same reason, such as
a global.json that names the .NET SDK, so that a laptop and a build server use the same compiler.
Two more questions about repeatable runs, of the kind a team asks someone who will own a build:
Model answers open with any pass: ₹79 for 1 week ($2.99), one payment that never renews.
-
Fresher to senior
A script in your pull request prints an invoice total of 1,184 cents on your laptop, but a teammate running the same commit gets 1,183. How do you find out whether the toolchain, the input or the code causes it, and how do you stop it happening again?
-
Mid to senior
Your team's build calls tclsh to generate a report. On one build agent tclsh is Tcl 8.5.9, on the others Tcl 9.0.4, and the reports differ. How do you find this quickly, and how do you make every agent use one Tcl?
Flashcards · 7 cards
Recall it, then check
Say the answer to yourself before you look: recalling it is what makes it stick.
-
Which four lessons does every Language Atlas language get, in which order?
Setup and where the language is used, its idioms next to a language you already know, its signature feature, and then a small project with tests. Each lesson relies on the ones before it.
-
In a recorded terminal session, which lines are the commands to type?
The lines that follow a $. What sits under a command is its output, and every session opens by asking each tool for its version.
-
Your output differs from a recorded run. What do you compare first?
The version the tool reports against the pin of the session. An output only holds for the version that printed it, so a run on another version says nothing about the program yet.
-
What does expr {010 + 1} print on Tcl 8.5.9, and on Tcl 9.0.4?
9 on Tcl 8.5.9, which takes a leading 0 to mean octal, and 11 on Tcl 9.0.4, where 010 is ten. Tcl 9 spells octal with the prefix 0o.
-
What does a language need before it can join the atlas?
A free toolchain that runs it from a command line, so that each example can show a real run you can repeat, and official documentation to cite.
-
How can the atlas teach ABAP without an SAP system?
Its examples run on the MIT-licensed abaplint transpiler, which turns ABAP into JavaScript for Node.js. The price: it reads 7.02 syntax, and topics only an SAP system can show are marked as such.
-
Why is VBScript left out of the atlas?
It runs only on Windows, and Microsoft lists it as deprecated, to become a feature on demand before it is removed. A course would teach towards a language that is leaving its only platform.
Key takeaways
- Every atlas language gets four lessons in the same order: setup, idioms compared with a language you know, the signature feature, and a project with tests.
- A recorded session starts with each tool’s version, and the lines after each
$are the commands to type. - Repeat a run in order: match the version first, then type the commands, then compare the output line by line.
- The same Tcl expression,
010 + 1, prints 9 on Tcl 8.5.9 and 11 on Tcl 9.0.4, so the version is part of every example. - The register gives every language that was considered a status and a reason: in the atlas, waiting for a later edition, or left out.
Terms in this lesson
- terminal session
- A run of commands typed one after another in a terminal, kept with what each one printed. In a recorded session the lines after $ are the commands to type, and the lines below them are their output.
- toolchain pin
- The exact version of the compiler, interpreter or SDK that an example was built and run with, such as Tcl 9.0.4 or the .NET SDK 10.0.401. Another version may print something else for the same file.
- transpiler
- A compiler whose output is source code in another high-level language rather than machine code. The abaplint transpiler turns ABAP into JavaScript, which Node.js then runs.
References
- Tcl/Tk 9.0 release notes (Numbers: 0NNN is no longer octal) (Tcl Core Team)
- Tcl/Tk license terms (Tcl Core Team)
- Programming with Objective-C: About Objective-C (Apple)
- Visual Basic documentation (Microsoft)
- abaplint transpiler: ABAP to JS transpiler and runtime (abaplint)
- @abaplint/transpiler-cli (package licence: MIT) (npm)
- Exercism ABAP test runner: package.json (its abaplint dependencies) (Exercism)
- Deprecated features in the Windows client (VBScript) (Microsoft)
- LabVIEW: a graphical programming environment (NI)
- Solidity documentation (Solidity team)
Related tools
Report a problem with this lesson
Kept only in this browser. Your Learn progress