Roadmap¶
Ḍād 0.2 is the first public release. A whole web app can be written in it today: the
interface, server functions, tables in SQLite and routes, in one file or several. It runs
with dad dev, goes online with dad serve, and becomes a static site with dad build.
This page shows how it is built, what is done, and what comes next.
Architecture¶
*.dad ─► lexer ─► parser ─► syntax tree ─► checker ─┬─► interpreter ─► dad run · dad dev · dad serve · playground (WebAssembly)
└─► JavaScript compiler ─► dad build (static site, or app.js for Node)
tables ─► SQLite (migrations from table changes)
- One program, written in Go.
dadis a single binary for each system, with no dependencies: SQLite is built in (modernc.org/sqlite, pure Go), and so are the page script, the stylesheet and the Kufi font. - A hand-written parser, recursive descent with Pratt parsing for expressions, so that error messages can be precise and in Arabic.
- A checker that reports only what is certain: undefined names with suggestions,
arguments, declared types, members, and
طابقthat misses cases. A program with mistakes doesn't run. - Two ways to run, one behaviour. The interpreter is the reference. The JavaScript compiler is tested against it: every example prints the same output and the same errors, and pages render the same HTML after the same clicks.
- Pages render on the server in
dad devanddad serve(like Phoenix LiveView), and in the browser afterdad build.
Phases¶
| Phase | Goal | Status |
|---|---|---|
| 0. Specification | The specification, the grammar, sample programs, the lexer | ✅ Done |
| 1. Core language | Parser, checker, interpreter, programs in several files, JavaScript compiler, Arabic errors | ✅ Done. Next: smart casts for optional values, generic types, unused-variable warnings |
| 2. Interface | مكون, حالة, صفحة, the elements, right to left by default |
✅ Done for 0.3: in dad dev, the playground and dad build, with several pages, 22 elements, themes and forms that check their fields. Next: updating only what changed |
| 3. Server and data | خادم functions, جدول in SQLite, مسار, dad dev, dad serve |
✅ Done. Next: users and sign-in, permissions, requests in parallel |
| 4. Tooling | VS Code extension, dad fmt, the playground, the dad lsp language server |
✅ Done, and in 0.3: moving across the files of a program, a live preview of the interface, and git's changes in the right-to-left editor |
| 5. Distribution | Homebrew, winget, .deb and .rpm, install scripts, the tutorial in English and Arabic |
✅ Done in 0.2 |
What comes next¶
These are the next steps, roughly in order:
- The interface, for 0.3: ✅ several pages, each with its own address; ✅ more elements (drop-down lists, radio buttons, text areas, dates and times, tables of records, lists, tabs, dialogs, alerts, icons); ✅ customizing the look without CSS, and with it; ✅ forms that check their fields.
- Users and sign-in, for 0.4, and permissions on server functions and routes, so that programs with private data can go online. Their sign-in pages are made of ordinary pages and forms.
- Requests in parallel in
dad serve, for busier sites. - Updating only what changed on a page (signals), instead of laying out the whole component again.
- A sharper checker: smart casts after
إذا ن != عدم, generic types, warnings for unused names. - Signed installers for macOS and Windows.
Done so far¶
Phase 1: the core language¶
- ✅ The syntax tree (
internal/ast) and the parser, with Arabic errors that give the line and column (internal/parser) - ✅
dad run: the interpreter (internal/interp), in the terminal and in the playground - ✅ Golden tests: each example has its expected output in
examples/output/ - ✅ Programs in several files (
internal/module):استوردandخاص, checked across files, and followed by every command and by the editor - ✅ The checker (
internal/check). Programs with mistakes don't run - ✅ The JavaScript compiler (
internal/codegen/js) anddad build
Phase 2: the interface¶
- ✅ Components with state, and the elements
عمود،صف،بطاقة،عنوان،فقرة،زر،حقل،مربع_اختيار،صورة،رابط،فاصل - ✅ Pages in
dad dev: rendered on the server, updated in place, reloaded on save. They use a right-to-left Kufi stylesheet with light and dark themes - ✅ The playground shows the interface (in WebAssembly, tables in memory)
- ✅ Static sites from
dad build: components render in the browser, and tables live in its storage - ✅ Several pages (
صفحة): each at its own address, with links that open in place,انتقل, the back button and a page for addresses with none - ✅ Ten more elements:
قائمة_منسدلة،اختيار،منطقة_نص،جدول_عرض،قائمة_عناصر،ألسنة،نافذة،تنبيه،أيقونة، and dates and times inحقل - ✅ Customizing the look: options on elements, a theme with
سمة, and the program's own stylesheet withصنف - ✅ Forms (
نموذج): labels, rules on fields (مطلوب, lengths, limits, emails, numbers,تحقق), mistakes in Arabic under each field, and buttons that run only when every field is right
Phase 3: server and data¶
- ✅ Tables behind a
Storeinterface: in memory for the playground and the tests, and in SQLite fordad run,dad devanddad serve - ✅ Migrations when a table changes, and simple
حيثconditions run as SQL - ✅
dad dev: routes with{params}, server functions at/_dad/call/<name>, a developer page, and live reload that keeps the data - ✅
dad serve: the production server
Phases 4 and 5: tooling and distribution¶
- ✅ The VS Code extension, with a right-to-left editor, and the Ḍād Mono font
- ✅
dad fmt, in the Kotlin style - ✅
dad lsp, for definitions, references, rename, hover, completion and the outline in any editor, across the files of a program, with the workspace's symbols - ✅ Release builds for macOS, Windows and Linux on Intel and ARM: Homebrew, winget,
.deb,.rpmand install scripts - ✅ The tutorial in English and Arabic, and this site in both languages
- ✅ In VS Code: a live preview of the interface beside
the code (
dad preview), and in the right-to-left editor go to definition, references, rename, a right-click menu and git's changes in the gutter
Costs to know about¶
- A signed and notarized macOS installer needs the Apple Developer Program, at $99 a year. Until then, Homebrew and the install script cover macOS.
- A signed Windows installer needs a code-signing certificate. Until then, winget and the zip archive cover Windows.