Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLeitwolf112026-10-15 18:00:48 +0300
committerLeitwolf112026-10-15 18:00:48 +0300
commitef68517d39fc329cf3286ad70056e00acf8b4855 (patch)
tree913311567f43ec05ded9c7292b38da84c36f177b
parent9d1b19bc01d5d3d08e3528d69924a86e7e2bfc2a (diff)
downloadwebsite-ef68517d39fc329cf3286ad70056e00acf8b4855.tar.gz
Serve tala.run and the documentation of talac and Tazel
The language now lives at tala.run. One frontend build serves three sites and picks its content from the host name: - tala.run: the home page, /docs/overview, /docs/getting-started and a new /docs/syntax, a first look at programs, comments, declarations, operators and evaluation by need, with every sample taken from the public specification. - talac.tala.run: /docs/command-line and /docs/outputs, the compiler's options, the entry rule, warnings, --build and --emit, and the record of a check. - tazel.tala.run: /docs/commands and /docs/project-file, the commands of the build system, target selection, workspaces and the project DSL. The new pages are written in all four locales from one content model; a test keeps code samples and option names identical across them. The header links the three sites and forum.tala.run. On a development host ?site=talac or ?site=tazel selects a site. Corrections to the existing pages: - Getting started used `go run scripts/develop.go`, `talac check -File`, `talac build -File` and `-Help`; it now uses `go run ./helpers/cmd/...`, `--emit=metadata`, `--entry=` and `--help`. - The overview no longer names the retired .vxse extension, and the project DSL is evaluated by Tazel. - Canonical URLs, Open Graph data, robots.txt and the sitemap name tala.run; talac and tazel have their own robots and sitemap files, served per host by Nginx. The notice about the move is gone: the former domain redirects instead. - The leopard mark files are called tala-mark.svg and tala.svg. Nginx: ops/nginx/tala.conf serves the three hosts, redirects www.tala.run to tala.run and every path of xsharp-lang.xyz to the same path of tala.run, and keeps viget.xsharp-lang.xyz pointing at viget.progmasoft.com; tala.run has no ViGet host of its own. ops/nginx/forum.conf serves the informational page at forum.tala.run and redirects the former forum address to it.
-rw-r--r--REUSE.toml8
-rw-r--r--forum/index.html26
-rw-r--r--forum/tala-mark.svg (renamed from forum/visual-xsharp-mark.svg)0
-rw-r--r--forum/tala.svg (renamed from forum/visual-xsharp.svg)0
-rw-r--r--frontend/index.html8
-rw-r--r--frontend/public/hosts/talac/robots.txt64
-rw-r--r--frontend/public/hosts/talac/sitemap.xml15
-rw-r--r--frontend/public/hosts/tazel/robots.txt64
-rw-r--r--frontend/public/hosts/tazel/sitemap.xml15
-rw-r--r--frontend/public/robots.txt2
-rw-r--r--frontend/public/sitemap.xml11
-rw-r--r--frontend/public/tala-mark.svg (renamed from frontend/public/visual-xsharp-mark.svg)0
-rw-r--r--frontend/src/App.vue48
-rw-r--r--frontend/src/content/routes.ts34
-rw-r--r--frontend/src/content/syntax.ts234
-rw-r--r--frontend/src/content/talac.ts441
-rw-r--r--frontend/src/content/tazel.ts466
-rw-r--r--frontend/src/content/types.ts32
-rw-r--r--frontend/src/main.ts31
-rw-r--r--frontend/src/pages/DocPage.vue60
-rw-r--r--frontend/src/pages/GettingStartedPage.vue38
-rw-r--r--frontend/src/pages/OverviewPage.vue16
-rw-r--r--frontend/src/seo.ts35
-rw-r--r--frontend/src/site.ts83
-rw-r--r--frontend/src/styles/site.css9
-rw-r--r--frontend/tests/seo.test.mjs24
-rw-r--r--frontend/tests/site-integrity.test.mjs113
-rw-r--r--frontend/tests/sites.test.mjs145
-rw-r--r--frontend/tsconfig.json1
-rw-r--r--ops/nginx/forum.conf43
-rw-r--r--ops/nginx/tala-maintenance.conf (renamed from ops/nginx/xsharp-maintenance.conf)10
-rw-r--r--ops/nginx/tala.conf279
-rw-r--r--ops/nginx/xsharp.conf137
33 files changed, 2202 insertions, 290 deletions
diff --git a/REUSE.toml b/REUSE.toml
index 9a1ed0b..a2500d3 100644
--- a/REUSE.toml
+++ b/REUSE.toml
@@ -10,14 +10,16 @@ path = [
"backend/Progmasoft.Tala.Website.Api/appsettings.json",
"backend/Progmasoft.Tala.Website.Api/packages.lock.json",
"backend/Progmasoft.Tala.Website.Api.Tests/packages.lock.json",
- "forum/visual-xsharp.svg",
- "forum/visual-xsharp-mark.svg",
+ "forum/tala.svg",
+ "forum/tala-mark.svg",
"frontend/.prettierrc.json",
"frontend/package-lock.json",
"frontend/package.json",
"frontend/public/sitemap.xml",
"frontend/public/tala.svg",
- "frontend/public/visual-xsharp-mark.svg",
+ "frontend/public/tala-mark.svg",
+ "frontend/public/hosts/talac/sitemap.xml",
+ "frontend/public/hosts/tazel/sitemap.xml",
"frontend/public/tala-social.png",
"frontend/tsconfig.json",
]
diff --git a/forum/index.html b/forum/index.html
index 804f507..6bf0709 100644
--- a/forum/index.html
+++ b/forum/index.html
@@ -7,31 +7,35 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="robots" content="noindex, nofollow" />
<meta name="theme-color" content="#11101a" />
- <link rel="icon" type="image/svg+xml" href="/visual-xsharp-mark.svg" />
- <link rel="stylesheet" href="/site.css?v=2026-10-12" />
+ <link rel="icon" type="image/svg+xml" href="/tala-mark.svg" />
+ <link rel="stylesheet" href="/site.css?v=2026-10-15" />
<title>The forum isn't open yet. · Tala</title>
- <script src="/site.js?v=2026-10-12" defer></script>
+ <script src="/site.js?v=2026-10-15" defer></script>
</head>
<body>
<header>
- <a class="brand" href="https://xsharp-lang.xyz/">
- <img src="/visual-xsharp-mark.svg" alt="" />Tala
+ <a class="brand" href="https://tala.run/">
+ <img src="/tala-mark.svg" alt="" />Tala
</a>
<div class="tools">
- <button id="theme" type="button" aria-label="Switch color theme">☀</button>
+ <button id="theme" type="button" aria-label="Switch color theme">
+ ☀
+ </button>
</div>
</header>
<main>
<span class="eyebrow" id="eyebrow">Community / coming later</span>
<h1 id="title">The forum isn't open yet.</h1>
<p id="message">
- We will open the Tala forum when the community is ready for it. There are no accounts,
- posts, or discussion service here today. For now, follow the language and compiler in the
- public repository.
+ We will open the Tala forum when the community is ready for it. There
+ are no accounts, posts, or discussion service here today. For now,
+ follow the language and compiler in the public repository.
</p>
<div class="links">
- <a id="home" href="https://xsharp-lang.xyz/">Tala home →</a>
- <a id="source" href="https://github.com/Progmasoft/tala">Source repository ↗</a>
+ <a id="home" href="https://tala.run/">Tala home →</a>
+ <a id="source" href="https://github.com/Progmasoft/tala"
+ >Source repository ↗</a
+ >
</div>
</main>
<footer>© 2026 Progmasoft · Tala</footer>
diff --git a/forum/visual-xsharp-mark.svg b/forum/tala-mark.svg
index 4cd4c7f..4cd4c7f 100644
--- a/forum/visual-xsharp-mark.svg
+++ b/forum/tala-mark.svg
diff --git a/forum/visual-xsharp.svg b/forum/tala.svg
index a281693..a281693 100644
--- a/forum/visual-xsharp.svg
+++ b/forum/tala.svg
diff --git a/frontend/index.html b/frontend/index.html
index 1812639..ec6accc 100644
--- a/frontend/index.html
+++ b/frontend/index.html
@@ -12,18 +12,18 @@
/>
<meta property="og:type" content="website" />
<meta property="og:site_name" content="Tala" />
- <meta property="og:url" content="https://xsharp-lang.xyz/" />
+ <meta property="og:url" content="https://tala.run/" />
<meta property="og:title" content="Tala — Make the whole program understandable" />
<meta
property="og:description"
content="A native language with a clear source model, explicit ownership, and an inspectable compiler."
/>
- <meta property="og:image" content="https://xsharp-lang.xyz/tala-social.png" />
+ <meta property="og:image" content="https://tala.run/tala-social.png" />
<meta property="og:image:width" content="1280" />
<meta property="og:image:height" content="640" />
<meta name="twitter:card" content="summary_large_image" />
- <link rel="icon" type="image/svg+xml" href="/visual-xsharp-mark.svg" />
- <link rel="canonical" href="https://xsharp-lang.xyz/" />
+ <link rel="icon" type="image/svg+xml" href="/tala-mark.svg" />
+ <link rel="canonical" href="https://tala.run/" />
<title>Tala</title>
</head>
<body>
diff --git a/frontend/public/hosts/talac/robots.txt b/frontend/public/hosts/talac/robots.txt
new file mode 100644
index 0000000..1bb6b21
--- /dev/null
+++ b/frontend/public/hosts/talac/robots.txt
@@ -0,0 +1,64 @@
+# SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com>
+# SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1
+
+User-agent: Googlebot
+Allow: /
+
+User-agent: Google-Extended
+Allow: /
+
+User-agent: OAI-SearchBot
+Allow: /
+
+User-agent: ChatGPT-User
+Allow: /
+
+User-agent: GPTBot
+Disallow: /
+
+User-agent: Claude-SearchBot
+Allow: /
+
+User-agent: Claude-User
+Allow: /
+
+User-agent: ClaudeBot
+Allow: /
+
+User-agent: PerplexityBot
+Disallow: /
+
+User-agent: Perplexity-User
+Disallow: /
+
+User-agent: Bytespider
+Disallow: /
+
+User-agent: CCBot
+Disallow: /
+
+User-agent: meta-externalagent
+Disallow: /
+
+User-agent: meta-externalfetcher
+Disallow: /
+
+User-agent: FacebookBot
+Disallow: /
+
+User-agent: DuckAssistBot
+Allow: /
+
+User-agent: Amazonbot
+Disallow: /
+
+User-agent: Google-CloudVertexBot
+Disallow: /
+
+User-agent: MistralAI-User
+Disallow: /
+
+User-agent: *
+Allow: /
+
+Sitemap: https://talac.tala.run/sitemap.xml
diff --git a/frontend/public/hosts/talac/sitemap.xml b/frontend/public/hosts/talac/sitemap.xml
new file mode 100644
index 0000000..47937fa
--- /dev/null
+++ b/frontend/public/hosts/talac/sitemap.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com> -->
+<!-- SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1 -->
+<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
+ <url>
+ <loc>https://talac.tala.run/docs/command-line</loc>
+ <changefreq>monthly</changefreq>
+ <priority>0.8</priority>
+ </url>
+ <url>
+ <loc>https://talac.tala.run/docs/outputs</loc>
+ <changefreq>monthly</changefreq>
+ <priority>0.8</priority>
+ </url>
+</urlset>
diff --git a/frontend/public/hosts/tazel/robots.txt b/frontend/public/hosts/tazel/robots.txt
new file mode 100644
index 0000000..61d4db2
--- /dev/null
+++ b/frontend/public/hosts/tazel/robots.txt
@@ -0,0 +1,64 @@
+# SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com>
+# SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1
+
+User-agent: Googlebot
+Allow: /
+
+User-agent: Google-Extended
+Allow: /
+
+User-agent: OAI-SearchBot
+Allow: /
+
+User-agent: ChatGPT-User
+Allow: /
+
+User-agent: GPTBot
+Disallow: /
+
+User-agent: Claude-SearchBot
+Allow: /
+
+User-agent: Claude-User
+Allow: /
+
+User-agent: ClaudeBot
+Allow: /
+
+User-agent: PerplexityBot
+Disallow: /
+
+User-agent: Perplexity-User
+Disallow: /
+
+User-agent: Bytespider
+Disallow: /
+
+User-agent: CCBot
+Disallow: /
+
+User-agent: meta-externalagent
+Disallow: /
+
+User-agent: meta-externalfetcher
+Disallow: /
+
+User-agent: FacebookBot
+Disallow: /
+
+User-agent: DuckAssistBot
+Allow: /
+
+User-agent: Amazonbot
+Disallow: /
+
+User-agent: Google-CloudVertexBot
+Disallow: /
+
+User-agent: MistralAI-User
+Disallow: /
+
+User-agent: *
+Allow: /
+
+Sitemap: https://tazel.tala.run/sitemap.xml
diff --git a/frontend/public/hosts/tazel/sitemap.xml b/frontend/public/hosts/tazel/sitemap.xml
new file mode 100644
index 0000000..6623a07
--- /dev/null
+++ b/frontend/public/hosts/tazel/sitemap.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com> -->
+<!-- SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1 -->
+<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
+ <url>
+ <loc>https://tazel.tala.run/docs/commands</loc>
+ <changefreq>monthly</changefreq>
+ <priority>0.8</priority>
+ </url>
+ <url>
+ <loc>https://tazel.tala.run/docs/project-file</loc>
+ <changefreq>monthly</changefreq>
+ <priority>0.8</priority>
+ </url>
+</urlset>
diff --git a/frontend/public/robots.txt b/frontend/public/robots.txt
index 8a9b365..2b84f74 100644
--- a/frontend/public/robots.txt
+++ b/frontend/public/robots.txt
@@ -61,4 +61,4 @@ Disallow: /
User-agent: *
Allow: /
-Sitemap: https://xsharp-lang.xyz/sitemap.xml
+Sitemap: https://tala.run/sitemap.xml
diff --git a/frontend/public/sitemap.xml b/frontend/public/sitemap.xml
index 1f705af..f78be2c 100644
--- a/frontend/public/sitemap.xml
+++ b/frontend/public/sitemap.xml
@@ -3,17 +3,22 @@
<!-- SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1 -->
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
- <loc>https://xsharp-lang.xyz/</loc>
+ <loc>https://tala.run/</loc>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>
<url>
- <loc>https://xsharp-lang.xyz/docs/overview</loc>
+ <loc>https://tala.run/docs/overview</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
- <loc>https://xsharp-lang.xyz/docs/getting-started</loc>
+ <loc>https://tala.run/docs/getting-started</loc>
+ <changefreq>monthly</changefreq>
+ <priority>0.8</priority>
+ </url>
+ <url>
+ <loc>https://tala.run/docs/syntax</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
diff --git a/frontend/public/visual-xsharp-mark.svg b/frontend/public/tala-mark.svg
index 4cd4c7f..4cd4c7f 100644
--- a/frontend/public/visual-xsharp-mark.svg
+++ b/frontend/public/tala-mark.svg
diff --git a/frontend/src/App.vue b/frontend/src/App.vue
index 6fb769b..91877d2 100644
--- a/frontend/src/App.vue
+++ b/frontend/src/App.vue
@@ -6,9 +6,11 @@ import { computed } from "vue";
import { RouterLink, RouterView } from "vue-router";
import { localeLabels } from "./locales";
import { locale, supportedLocales, theme } from "./preferences";
+import { forumUrl, site, siteHome, siteUrl, type Site } from "./site";
const labels = {
"en-US": {
+ syntax: "Syntax",
home: "Home",
overview: "Overview",
start: "Getting started",
@@ -18,10 +20,9 @@ const labels = {
language: "Language",
status: "In active development",
footer: "A Progmasoft project. Tala is an independent language identity.",
- domainNotice:
- "This site is moving to a new domain within a month. xsharp-lang.xyz will keep working and will redirect to the new address.",
},
"de-DE": {
+ syntax: "Syntax",
home: "Startseite",
overview: "Überblick",
start: "Erste Schritte",
@@ -31,10 +32,9 @@ const labels = {
language: "Sprache",
status: "In aktiver Entwicklung",
footer: "Ein Progmasoft-Projekt. Tala hat eine eigenständige Sprachidentität.",
- domainNotice:
- "Diese Website zieht innerhalb eines Monats auf eine neue Domain um. xsharp-lang.xyz bleibt erreichbar und leitet dann auf die neue Adresse weiter.",
},
"ru-RU": {
+ syntax: "Синтаксис",
home: "Главная",
overview: "Обзор",
start: "Начало работы",
@@ -44,10 +44,9 @@ const labels = {
language: "Язык",
status: "В активной разработке",
footer: "Проект Progmasoft. Tala — самостоятельный язык со своей идентичностью.",
- domainNotice:
- "В течение месяца сайт переедет на новый домен. xsharp-lang.xyz продолжит работать и будет перенаправлять на новый адрес.",
},
"he-IL": {
+ syntax: "תחביר",
home: "בית",
overview: "סקירה",
start: "צעדים ראשונים",
@@ -57,15 +56,19 @@ const labels = {
language: "שפה",
status: "בפיתוח פעיל",
footer: "פרויקט של Progmasoft. ל-Tala זהות שפה עצמאית.",
- domainNotice:
- "האתר יעבור לדומיין חדש בתוך חודש. xsharp-lang.xyz ימשיך לפעול ויפנה לכתובת החדשה.",
},
} as const;
const copy = computed(() => labels[locale.value]);
-// The notice belongs to the domain that is being left: a visitor of the new
-// domain, or of a preview, has nothing to be told.
-const onDepartingDomain = /(^|\.)xsharp-lang\.xyz$/.test(window.location.hostname);
+const hostname = window.location.hostname;
+const brand = { language: "Tala", talac: "talac", tazel: "Tazel" }[site];
+// The other two sites are linked by their names, which read the same in every language.
+const siblings = (["language", "talac", "tazel"] as const)
+ .filter((other): other is Site => other !== site)
+ .map((other) => ({
+ label: { language: "Tala", talac: "talac", tazel: "Tazel" }[other],
+ href: siteUrl(other, siteHome[other], hostname),
+ }));
function toggleTheme() {
theme.value = theme.value === "dark" ? "light" : "dark";
@@ -75,17 +78,22 @@ function toggleTheme() {
<template>
<a class="skip-link" href="#main">Skip to content</a>
<div class="site-shell">
- <p v-if="onDepartingDomain" class="domain-notice" role="status">{{ copy.domainNotice }}</p>
<header class="site-header">
- <RouterLink class="brand" to="/" :aria-label="`Tala ${copy.home}`">
- <img src="/visual-xsharp-mark.svg" width="31" height="31" alt="" />
- <span>Tala</span>
+ <RouterLink class="brand" :to="siteHome[site]" :aria-label="`${brand} ${copy.home}`">
+ <img src="/tala-mark.svg" width="31" height="31" alt="" />
+ <span>{{ brand }}</span>
</RouterLink>
<nav class="primary-nav" aria-label="Primary navigation">
- <RouterLink to="/">{{ copy.home }}</RouterLink>
- <RouterLink to="/docs/overview">{{ copy.overview }}</RouterLink>
- <RouterLink to="/docs/getting-started">{{ copy.start }}</RouterLink>
- <a href="https://forum.xsharp-lang.xyz/">{{ copy.forum }}</a>
+ <template v-if="site === 'language'">
+ <RouterLink to="/">{{ copy.home }}</RouterLink>
+ <RouterLink to="/docs/overview">{{ copy.overview }}</RouterLink>
+ <RouterLink to="/docs/getting-started">{{ copy.start }}</RouterLink>
+ <RouterLink to="/docs/syntax">{{ copy.syntax }}</RouterLink>
+ </template>
+ <a v-for="sibling in siblings" :key="sibling.href" :href="sibling.href">{{
+ sibling.label
+ }}</a>
+ <a :href="forumUrl">{{ copy.forum }}</a>
</nav>
<div class="header-tools">
<label class="language-control">
@@ -115,7 +123,7 @@ function toggleTheme() {
<p>{{ copy.footer }}</p>
</div>
<div class="footer-links">
- <RouterLink to="/docs/overview">{{ copy.overview }}</RouterLink
+ <a :href="siteUrl('language', '/docs/overview', hostname)">{{ copy.overview }}</a
><a href="https://github.com/Progmasoft/tala/tree/main/Spec">Specification</a
><a href="https://github.com/Progmasoft/website">Website source</a>
</div>
diff --git a/frontend/src/content/routes.ts b/frontend/src/content/routes.ts
new file mode 100644
index 0000000..515d310
--- /dev/null
+++ b/frontend/src/content/routes.ts
@@ -0,0 +1,34 @@
+// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com>
+// SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1
+
+import type { Locale } from "../locales";
+import { siteTopics, type Site } from "../site.ts";
+import { syntaxRoutes } from "./syntax.ts";
+import { talacRoutes } from "./talac.ts";
+import { tazelRoutes } from "./tazel.ts";
+import type { DocRoute } from "./types";
+
+/** The documentation pages each site renders from content; the language site also has hand-built pages. */
+export const contentRoutes: Record<Site, readonly DocRoute[]> = {
+ language: syntaxRoutes,
+ talac: talacRoutes,
+ tazel: tazelRoutes,
+};
+
+// The two hand-built pages of the language site name themselves in their own components; the sidebar of a content
+// page needs their names too.
+const languagePageNames: Record<Locale, Record<string, string>> = {
+ "en-US": { "/docs/overview": "Overview", "/docs/getting-started": "Getting started" },
+ "de-DE": { "/docs/overview": "Überblick", "/docs/getting-started": "Erste Schritte" },
+ "ru-RU": { "/docs/overview": "Обзор", "/docs/getting-started": "Начало работы" },
+ "he-IL": { "/docs/overview": "סקירה", "/docs/getting-started": "צעדים ראשונים" },
+};
+
+/** The sidebar of a documentation page: every topic of the site, in order. */
+export function sidebarFor(site: Site, locale: Locale): { path: string; label: string }[] {
+ return siteTopics[site].map((path) => {
+ const content = contentRoutes[site].find((route) => route.path === path);
+ const label = content ? content.topic[locale].nav : (languagePageNames[locale][path] ?? path);
+ return { path, label };
+ });
+}
diff --git a/frontend/src/content/syntax.ts b/frontend/src/content/syntax.ts
new file mode 100644
index 0000000..66ef5ba
--- /dev/null
+++ b/frontend/src/content/syntax.ts
@@ -0,0 +1,234 @@
+// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com>
+// SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1
+
+import type { DocRoute, DocTopic } from "./types";
+
+// Every sample below is taken from the public specification under Spec/Language.
+const program = `namespace Examples.HelloWorld;
+
+public class HelloWorld {
+ public static void Main() {
+ String language = "Tala";
+ Console.Println("Hello from " + language + "!");
+ }
+}`;
+const comments = `-- A comment runs to the end of the line.
+
+--[[
+normal
+long comment
+]]
+
+++value; -- there is ++, and no decrement:
+value -= 1; -- -- always starts a comment`;
+const declarations = `class User { -- internal
+ String name; -- internal
+ void Print() {} -- internal
+}
+
+data Point { -- a copy-on-write value type
+ int x;
+ int y;
+}
+
+object Application { -- one named singleton
+}`;
+const operators = `2 ** 3 ** 2 -- power, right-associative: 2 ** (3 ** 2)
+first \\= second -- inequality
+not true -- logical NOT; ! is bitwise
+a < b && b < c -- relations do not chain`;
+const evaluation = `int total = Sum(values); -- nothing is computed here
+
+if (verbose) {
+ Print(total); -- Sum(values) is computed here, if this is reached
+}`;
+
+const specification = "https://github.com/Progmasoft/tala/tree/main/Spec/Language";
+
+const syntax: DocTopic = {
+ "en-US": {
+ nav: "Syntax",
+ title: "Syntax · Tala",
+ description:
+ "A first look at the syntax of Tala: programs, comments, declarations, operators and evaluation by need.",
+ section: "DOCUMENTATION / SYNTAX",
+ heading: "A first look at the syntax",
+ lead: "The examples on this page come from the public specification. It is the normative description of the language and lists valid and invalid forms side by side.",
+ blocks: [
+ { kind: "heading", text: "A program" },
+ {
+ kind: "text",
+ text: "A program starts in the parameterless public static void Main() of a class. There is no top-level function. A file declares its namespace; the namespace does not have to match the path of the file.",
+ },
+ { kind: "code", code: program },
+ { kind: "heading", text: "Comments" },
+ {
+ kind: "text",
+ text: "-- starts a comment wherever it stands outside a string. That is why the language has ++ and no decrement operator: write value -= 1.",
+ },
+ { kind: "code", code: comments },
+ { kind: "heading", text: "Declarations" },
+ {
+ kind: "text",
+ text: "Names are case-sensitive. A declaration without an access modifier is internal; no context defaults to private. There are no forward and no partial declarations, and declaration order does not affect visibility.",
+ },
+ { kind: "code", code: declarations },
+ { kind: "heading", text: "Operators" },
+ {
+ kind: "text",
+ text: "Precedence is fixed; there are no user-defined precedence groups. Inequality is \\=, logical NOT is not, and && and || join Boolean values. // is integer division that rounds, and + joins Strings.",
+ },
+ { kind: "code", code: operators },
+ { kind: "heading", text: "Evaluation by need" },
+ {
+ kind: "text",
+ text: "Tala evaluates by need: binding a name computes nothing, a value is computed when it is first needed, and at most once. A value that is never needed is never computed.",
+ },
+ { kind: "code", code: evaluation },
+ {
+ kind: "note",
+ title: "The specification",
+ text: `The full rules, with every valid and invalid example, are in ${specification}. A specification example is not proof that the current compiler accepts it.`,
+ },
+ ],
+ },
+ "de-DE": {
+ nav: "Syntax",
+ title: "Syntax · Tala",
+ description:
+ "Ein erster Blick auf die Syntax von Tala: Programme, Kommentare, Deklarationen, Operatoren und Auswertung nach Bedarf.",
+ section: "DOKUMENTATION / SYNTAX",
+ heading: "Ein erster Blick auf die Syntax",
+ lead: "Die Beispiele dieser Seite stammen aus der öffentlichen Spezifikation. Sie ist die maßgebliche Beschreibung der Sprache und stellt gültige und ungültige Formen nebeneinander.",
+ blocks: [
+ { kind: "heading", text: "Ein Programm" },
+ {
+ kind: "text",
+ text: "Ein Programm beginnt im parameterlosen public static void Main() einer Klasse. Es gibt keine Funktion auf oberster Ebene. Eine Datei deklariert ihren Namespace; er muss nicht zum Pfad der Datei passen.",
+ },
+ { kind: "code", code: program },
+ { kind: "heading", text: "Kommentare" },
+ {
+ kind: "text",
+ text: "-- beginnt außerhalb eines Strings überall einen Kommentar. Deshalb hat die Sprache ++ und keinen Dekrement-Operator: Man schreibt value -= 1.",
+ },
+ { kind: "code", code: comments },
+ { kind: "heading", text: "Deklarationen" },
+ {
+ kind: "text",
+ text: "Namen unterscheiden Groß- und Kleinschreibung. Eine Deklaration ohne Zugriffsmodifizierer ist internal; kein Kontext ist standardmäßig private. Es gibt keine Vorwärts- und keine partiellen Deklarationen, und die Reihenfolge der Deklarationen beeinflusst die Sichtbarkeit nicht.",
+ },
+ { kind: "code", code: declarations },
+ { kind: "heading", text: "Operatoren" },
+ {
+ kind: "text",
+ text: "Die Rangfolge ist fest; benutzerdefinierte Rangfolgegruppen gibt es nicht. Ungleichheit ist \\=, logisches NICHT ist not, && und || verbinden Wahrheitswerte. // ist ganzzahlige Division mit Rundung, und + verbindet Strings.",
+ },
+ { kind: "code", code: operators },
+ { kind: "heading", text: "Auswertung nach Bedarf" },
+ {
+ kind: "text",
+ text: "Tala wertet nach Bedarf aus: Einen Namen zu binden berechnet nichts, ein Wert wird berechnet, wenn er zum ersten Mal gebraucht wird, und höchstens einmal. Ein Wert, der nie gebraucht wird, wird nie berechnet.",
+ },
+ { kind: "code", code: evaluation },
+ {
+ kind: "note",
+ title: "Die Spezifikation",
+ text: `Die vollständigen Regeln mit allen gültigen und ungültigen Beispielen stehen unter ${specification}. Ein Beispiel der Spezifikation beweist nicht, dass der aktuelle Compiler es annimmt.`,
+ },
+ ],
+ },
+ "ru-RU": {
+ nav: "Синтаксис",
+ title: "Синтаксис · Tala",
+ description:
+ "Перво