diff --git a/.claude/agents/arm-architecture-expert.md b/.claude/agents/arm-architecture-expert.md index d115b123..46afa3c0 100644 --- a/.claude/agents/arm-architecture-expert.md +++ b/.claude/agents/arm-architecture-expert.md @@ -36,6 +36,8 @@ You are a world-class authority on the Arm architecture and an elite Rust system - https://developer.arm.com/documentation/ddi0487/mb — Arm Architecture Reference Manual for A-profile (the "Arm ARM", DDI 0487). Your primary spec. When you justify an encoding, cite the instruction's encoding diagram (e.g. "ADD (immediate) — sf|op|S|...|imm12|Rn|Rd"). Use WebFetch for sections. - AAPCS64 — the Procedure Call Standard for AArch64: argument/result registers, stack alignment, callee-saved set. Fetch when classifying arguments. - For Apple Silicon specifics (arm64e/arm64 differences, platform calling conventions), cross-check Apple's "Writing ARM64 Code for Apple Platforms". + - https://github.com/aidansteele/osx-abi-macho-file-format-reference + - https://github.com/apple-oss-distributions/xnu/blob/8d741a5de7ff4191bf97d57b9f54c2f6d4a15585/EXTERNAL_HEADERS/mach-o/loader.h ## Your code — know every line diff --git a/Cargo.lock b/Cargo.lock index 65e654b0..744e5009 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8187,6 +8187,7 @@ dependencies = [ "zo-codegen-backend", "zo-interner", "zo-sir", + "zo-token", "zo-ty", "zo-value", ] diff --git a/README.md b/README.md index 43664ca8..60aa64c2 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ zo (pronounced `/zuː/` just like "zoo") iS A PRACTiCAL, LiGHTWEiGHT, CROSS-PLAT **JOiN THE DEVOLUTiON.** -[home](https://zo.compilords.house) — [install](./crates/compiler/zo-notes/public/guidelines/01-install.md) — [initiation](https://zo.compilords.house/initiation) — [news](https://zo.compilords.house/news) — [discord](https://discord.gg/JaNc4Nk5xw) +[home](https://zo.compilords.house) — [install](./crates/compiler/zo-notes/public/guidelines/01-install.md) — [initiation](https://zo.compilords.house/initiation) — [spec](https://zo.compilords.house/spec) — [news](https://zo.compilords.house/news) — [discord](https://discord.gg/JaNc4Nk5xw) ## usage. @@ -49,6 +49,7 @@ ONE LANGUAGE. ONE COMPiLER. ONE BiNARY. ONE WiNDOW. ALL PLATFORMS — SAME SOURC --- + DEV MACHiNE: ``` @@ -65,7 +66,18 @@ Available Memory — 9.4 GB > *This project is about having fun again. It is maintained by a small group of volunteers during their spare time. We're exploring. zo is not the new X or better than Y, zo is just different. Period. Be gentle.* > [!CAUTION] -> *For transparency: regarding Ai usage, we're using Ai to build zo based on our architecture and specification (made by humans). The compiler currently covers over 1500 unit and integration tests.* +> *For transparency: regarding Ai usage, we're using Ai to build zo based on our architecture and [specification](https://zo.compilords.house/spec) (made by humans). The compiler currently covers over 1500 unit and integration tests.* + +## gallery. + +

+ + + + + + +

## sponsors & supports. diff --git a/apps/site/messages/de.json b/apps/site/messages/de.json index 0218c23f..7ff0cc69 100644 --- a/apps/site/messages/de.json +++ b/apps/site/messages/de.json @@ -7,19 +7,20 @@ "benchmarks_title": "## benchmarks", "community_description": "Ein Spielplatz für Compiler-Nerds, Frontend-Hacker und Kreative. Öffne ein Issue, oder sag Hi auf Discord.", "community_title": "## gemeinschaft", - "features_fast_content": "Von Grund auf mit modernen Compiler-Techniken gebaut für sofortige Ausführung und schnelles Debugging mit hilfreichen Fehlermeldungen.", + "features_fast_content": "Von Grund auf mit modernen Compiler-Techniken gebaut für sofortige Builds und schnelles Debugging mit hilfreichen Fehlermeldungen.", "features_fast_title": "Schnell", - "features_integrated_content": "Eine komplette Workstation mit eingebauten Werkzeugen — Paketmanager fret und Texteditor codelord.", + "features_integrated_content": "Eine komplette Workstation mit eingebauten Werkzeugen — Paketmanager fret und Texteditor codelord.", "features_integrated_title": "Integriert", "features_quote": "Weniger Arbeit machen, indem man keine Mühe verschwendet.", - "features_safe_content": "Statisch & stark typisiert. Nutzt Green- und OS-Threads, gekapselt in nursery task scopes; keine leaked threads, keine data races.", + "features_safe_content": "Statisch & stark typisiert, ohne null und ohne rohe Zeiger. Green- und OS-Threads laufen in nursery task scopes — keine leaked threads, kein geteilter veränderbarer Zustand.", "features_safe_title": "Sicher", "features_title": "## funktionen", - "features_unified_content": "Schreib Ui einmal mit ZSX — ziele auf nativ gpu oder Web dom.", + "features_unified_content": "Schreib Ui einmal mit ZSX — ziele auf Desktop gpu, Mobile uikit oder Web dom.", "features_unified_title": "Einheitlich", "foundations_description": "Angetrieben von modernen, verlässlichen Fundamenten für eine hochleistungsfähige Grafik- und Web-Integration.", "foundations_title": "## fundamente", "header_initiation": "Einführung", + "header_spec": "Spec", "header_news": "News", "hero_tagline": "Verwandle deine Gedanken sofort in typsichere Software und Ui.", "initiation_authors": "invisageable & die compilords", @@ -30,7 +31,7 @@ "initiation_subtitle": "Eine Einführung in zo.", "initiation_title": "Einführung", "initiation_translators": "Übersetzt von ...", - "manifesto_content": "zo ist ein Compiler eines Compilers in einem weiteren riesigen Compiler, der selbst in einem gigantischen Compiler steckt.\n\nZiel des Projekts ist es, die Entwickler-Experience zu verbessern und das Bauen von Software, die deine Kreativität widerspiegelt, mühelos zu machen. Wir fokussieren uns auf die Details, die zählen, und öffnen neue Dimensionen im Software-Universum, in denen das Verwandeln deiner Gedanken in Programme nicht nur einfach, sondern angenehm ist.\n\nzo ist ein komplettes Ökosystem, das dir die Schlüssel in die Hand gibt. Endlich hast du die Kontrolle über deine Workstation. Du wirst nie wieder im Blindflug arbeiten müssen. Unsere Werkzeuge liefern dir alle Informationen, die du für dein Programm brauchst — von Design bis Auslieferung.\n\nWir stellen uns gegen die ausufernde Software-Uniformität. zo vereint Web und GPU — nicht indem das Web in ein Canvas gezwungen wird, sondern durch das Zusammenspiel von Flexbox-Layouts mit roher GPU-Power. Wir tun alles, um die Grenzen der Innovation auszureizen.\n\nSchließ dich der Devolution an.", + "manifesto_content": "Ziel des Projekts ist es, die Entwickler-Experience zu verbessern und das Bauen von Software, die deine Kreativität widerspiegelt, mühelos zu machen. Wir fokussieren uns auf die Details, die zählen, wo das Verwandeln deiner Gedanken in Programme nicht nur einfach, sondern angenehm ist.", "manifesto_title": "## manifest", "nav_benchmarks": "Benchmarks", "news_description": "Alles rund um zo: Releases, Meilensteine und Design-Notizen.", @@ -50,8 +51,8 @@ "oss_merged_prs": "zusammengeführte PRs", "oss_stars": "Sterne", "oss_title": "## oss", - "prologue_description": "Eine Sprache zum Ausliefern, Ausführen und Erstellen von nativen und Web-Anwendungen, optimiert auf Geschwindigkeit. zo ist ein funktionsreiches Ökosystem mit Fokus auf hohe Leistung, Einfachheit und datenorientiertes Design.", - "prologue_punchline": "Eine Sprache. Ein Compiler. Eine Binärdatei. Nativ oder Webderselbe Quellcode.", + "prologue_description": "zo (ausgesprochen /zu:/ wie „zoo“) ist eine praktische, leichtgewichtige, plattformübergreifende und universelle Programmiersprache. Zum Ausliefern, Ausführen und Erstellen typsicherer Desktop-, Mobile- und Web-Anwendungen aus einer einzigen Codequelle.", + "prologue_punchline": "Eine Sprache. Ein Compiler. Eine Binärdatei. Ein Fenster. Alle Plattformenderselbe Quellcode.", "prologue_title": "Die Programmiersprache zo.", "purpose_description": "Kreative Entwickler sollten nicht zwischen einfachem Ui-Code und hoher Leistung wählen müssen. APIs sind zerstückelt, Werkzeuge sind zu komplex, die Entwicklungsschleife ist zu langsam. Wir haben zo als den Klebstoff entwickelt — eine einzige, intuitive Sprache, mit der du deine kreativen Gedanken sofort in robuste, plattformübergreifende Software verwandelst.", "purpose_quote_sentence": "Warum sich mit langsamen Compilern abfinden? Macht sie einfach schneller.", diff --git a/apps/site/messages/en.json b/apps/site/messages/en.json index 549e4a81..d237c255 100644 --- a/apps/site/messages/en.json +++ b/apps/site/messages/en.json @@ -3,23 +3,24 @@ "benchmarks_description": "Most of the compilers are 2-5x slower than they could be. zo is the fastest next-gen compiler tool to enhance the programmers productivity.", "benchmarks_disclaimer_methodology": "@methodology-and-full-numbers", "benchmarks_disclaimer_workload": "Workload: 10,000 lines of code compiled to native ARM64 binary (including Hindley-Milner type inference, monomorphization, type checking, constant folding, propagation, dead code elimination and link passes).", - "benchmarks_quote_sentence": "The faster your software runs, the less power his consumed.", + "benchmarks_quote_sentence": "The faster your software runs, the less power is consumed.", "benchmarks_title": "## benchmarks", "community_description": "A playground for compiler nerds, frontend hackers, and creatives. Open an issue, or come say hello on Discord.", "community_title": "## community", - "features_fast_content": "Built from scratch using modern compiler techniques for instant execution and rapid debugging with helpful error messages.", + "features_fast_content": "Built from scratch using modern compiler techniques for instant builds and rapid debugging with helpful error messages.", "features_fast_title": "Fast", - "features_integrated_content": "A complete workstation with built-in tools — package manager fret and text editor codelord.", + "features_integrated_content": "A complete workstation with built-in tools — package manager fret and text editor codelord.", "features_integrated_title": "Integrated", "features_quote": "Do less work by not wasting effort.", - "features_safe_content": "Statically & strongly typed. Uses green and OS threads wrapped in nursery task scopes; no leaked threads, no data races.", + "features_safe_content": "Statically & strongly typed, with no null and no raw pointers. Green and OS threads run in nursery task scopes — no leaked threads, no shared mutable state.", "features_safe_title": "Safe", "features_title": "## features", - "features_unified_content": "Write Ui once with ZSX — target native gpu or the web dom.", + "features_unified_content": "Write Ui once with ZSX — target desktop gpu, mobile uikit, or the web dom.", "features_unified_title": "Unified", "foundations_description": "Powered by modern and reliable foundations to deliver high-performance graphics and web integration.", "foundations_title": "## foundations", "header_initiation": "Initiation", + "header_spec": "Spec", "header_news": "News", "hero_tagline": "Turn your thoughts into type-safe software and Ui instantly.", "initiation_authors": "invisageable & the compilords", @@ -30,7 +31,7 @@ "initiation_subtitle": "An initiation to zo.", "initiation_title": "Initiation", "initiation_translators": "Translated by ...", - "manifesto_content": "zo is a compiler of a compiler inside another giant compiler that is itself inside a gigantic compiler.\n\nThe aim of the project is to enhance the developer experience, making it seamless to build software that reflects your creativity. We focus on details that matter, opening new dimensions in the software universe where transforming your thoughts into programs is not just easy, but enjoyable.\n\nzo is a complete ecosystem that gives you the keys. You finally have control over your workstation. You'll never have to work blind again. Our tools provide all the information you need for your program, from design to delivery.\n\nWe are against abundant software uniformity. zo unifies the web and the GPU — not by forcing the web into a canvas, but by harmonizing Flexbox layouts with raw GPU power. We will do everything we can to push the boundaries of innovation to the limit.\n\nJoin the devolution.", + "manifesto_content": "The aim of the project is to enhance the developer experience, making it seamless to build software that reflects your creativity. We focus on details that matter, where transforming your thoughts into programs is not just easy, but enjoyable.", "manifesto_title": "## manifesto", "nav_benchmarks": "Benchmarks", "news_description": "Everything related to zo, releases, milestones and design notes.", @@ -50,10 +51,10 @@ "oss_merged_prs": "merged PRs", "oss_stars": "stars", "oss_title": "## oss", - "prologue_description": "A language to ship, run and build native and web applications optimized for speed. zo is a feature-rich ecosystem focus on high-performance, simplicity and data-oriented.", - "prologue_punchline": "One language. One compiler. One binary. Native or Websame source.", + "prologue_description": "zo (pronounced /zu:/ just like “zoo”) is a practical, lightweight, cross-platform, general-purpose programming language. To ship, run and build type-safe desktop, mobile and web applications with one code source.", + "prologue_punchline": "One language. One compiler. One binary. One window. All platformssame source.", "prologue_title": "The zo programming language.", - "purpose_description": "Creative developers shouldn't have to choose between writing simple UI code and getting high performance. APIs are disjointed, tools are overly complex, and the development loop is too slow. We built zo to be the glue — a single, intuitive language that lets you turn your creative thoughts into robust, cross-platform software instantly.", + "purpose_description": "Creative developers shouldn't have to choose between simple UI code and high performance. APIs are disjointed, tools are overly complex, and the development loop is too slow. We built zo to be the glue — a single, intuitive language that lets you turn your creative thoughts into robust, cross-platform software instantly.", "purpose_quote_sentence": "Why accept slow compilers? Just make them faster.", "purpose_title": "## purpose", "reachout_copyright": "Compilords© 2024 — present.", diff --git a/apps/site/messages/fr.json b/apps/site/messages/fr.json index cc3f5b0e..d0139fc6 100644 --- a/apps/site/messages/fr.json +++ b/apps/site/messages/fr.json @@ -7,19 +7,20 @@ "benchmarks_title": "## benchmarks", "community_description": "Un terrain de jeu pour les geeks de compilateurs, les hackers du frontend, et les créatifs. Ouvre une issue, ou viens dire bonjour sur Discord.", "community_title": "## communauté", - "features_fast_content": "Construit à partir de zéro avec des techniques de compilateur modernes pour une exécution instantanée et un débogage rapide avec des messages d'erreur utiles.", + "features_fast_content": "Construit à partir de zéro avec des techniques de compilateur modernes pour des builds instantanés et un débogage rapide avec des messages d'erreur utiles.", "features_fast_title": "Rapide", - "features_integrated_content": "Une station de travail complète avec des outils intégrés — gestionnaire de paquets fret et éditeur de texte codelord.", + "features_integrated_content": "Une station de travail complète avec des outils intégrés — gestionnaire de paquets fret et éditeur de texte codelord.", "features_integrated_title": "Intégré", "features_quote": "Travailler moins en évitant de gaspiller des efforts.", - "features_safe_content": "Statiquement & fortement typé. Utilise des threads verts et OS encapsulés dans des nursery task scopes ; pas de threads perdus, pas de courses de données.", + "features_safe_content": "Statiquement & fortement typé, sans null ni pointeurs bruts. Les threads verts et OS s'exécutent dans des nursery task scopes — pas de threads perdus, pas d'état mutable partagé.", "features_safe_title": "Sûr", "features_title": "## fonctionnalités", - "features_unified_content": "Écris ton Ui une fois avec ZSX — cible le natif gpu ou le web dom.", + "features_unified_content": "Écris ton Ui une fois avec ZSX — cible le desktop gpu, le mobile uikit ou le web dom.", "features_unified_title": "Unifié", "foundations_description": "Propulsé par des fondations modernes et fiables pour offrir une intégration haute performance graphique et web.", "foundations_title": "## fondations", "header_initiation": "Initiation", + "header_spec": "Spec", "header_news": "Actus", "hero_tagline": "Transforme tes pensées en logiciels à typage sûr et en UI instantanément.", "initiation_authors": "invisageable & les compilords", @@ -30,7 +31,7 @@ "initiation_subtitle": "Une initiation à zo.", "initiation_title": "Initiation", "initiation_translators": "Traduit par ...", - "manifesto_content": "zo est un compilateur d'un compilateur à l'intérieur d'un autre compilateur géant lui-même à l'intérieur d'un compilateur gigantesque.\n\nL'objectif du projet est d'améliorer l'expérience développeur, en rendant fluide la création de logiciels qui reflètent ta créativité. Nous nous concentrons sur les détails qui comptent, en ouvrant de nouvelles dimensions dans l'univers du logiciel où transformer tes pensées en programmes n'est pas juste facile, mais agréable.\n\nzo est un écosystème complet qui te donne les clés. Tu as enfin le contrôle sur ton poste de travail. Tu n'auras plus jamais à travailler à l'aveugle. Nos outils fournissent toutes les informations dont tu as besoin pour ton programme, de la conception à la livraison.\n\nNous sommes contre l'uniformité abondante des logiciels. zo unifie le web et le GPU — pas en forçant le web dans un canvas, mais en harmonisant les layouts Flexbox avec la puissance brute du GPU. Nous ferons tout pour repousser les limites de l'innovation.\n\nRejoins la dévolution.", + "manifesto_content": "L'objectif du projet est d'améliorer l'expérience développeur, en rendant fluide la création de logiciels qui reflètent ta créativité. Nous nous concentrons sur les détails qui comptent, où transformer tes pensées en programmes n'est pas juste facile, mais agréable.", "manifesto_title": "## manifeste", "nav_benchmarks": "Benchmarks", "news_description": "Tout ce qui concerne zo : releases, étapes clés et notes de design.", @@ -50,10 +51,10 @@ "oss_merged_prs": "PRs fusionnées", "oss_stars": "étoiles", "oss_title": "## oss", - "prologue_description": "Un langage pour livrer, exécuter et créer des applications natives et web optimisées pour la vitesse. zo est un écosystème riche en fonctionnalités, axé sur la haute performance, la simplicité et l'orienté-données.", - "prologue_punchline": "Un langage. Un compilateur. Un binaire. Natif ou Webmême source.", + "prologue_description": "zo (prononcé /zu:/ comme « zoo ») est un langage de programmation pratique, léger, multiplateforme et généraliste. Pour livrer, exécuter et construire des applications à typage sûr pour le desktop, le mobile et le web, à partir d'une seule source de code.", + "prologue_punchline": "Un langage. Un compilateur. Un binaire. Une fenêtre. Toutes les plateformesmême source.", "prologue_title": "Le langage de programmation zo.", - "purpose_description": "Les développeurs créatifs ne devraient pas avoir à choisir entre écrire du code Ui simple et obtenir des performances élevées. Les API sont décousues, les outils sont trop complexes et la boucle de développement est trop lente. Nous avons conçu zo pour être la glue — un langage unique et intuitif qui te permet de transformer tes pensées créatives en logiciels robustes et multi-plateformes instantanément.", + "purpose_description": "Les développeurs créatifs ne devraient pas avoir à choisir entre du code Ui simple et des performances élevées. Les API sont décousues, les outils sont trop complexes et la boucle de développement est trop lente. Nous avons conçu zo pour être la glue — un langage unique et intuitif qui te permet de transformer tes pensées créatives en logiciels robustes et multi-plateformes instantanément.", "purpose_quote_sentence": "Pourquoi accepter des compilateurs lents ? Rendez-les plus rapides, c'est tout.", "purpose_title": "## objectif", "reachout_copyright": "Compilords© 2024 — présent.", diff --git a/apps/site/messages/ja.json b/apps/site/messages/ja.json index f658dd3d..ca5895f1 100644 --- a/apps/site/messages/ja.json +++ b/apps/site/messages/ja.json @@ -7,19 +7,20 @@ "benchmarks_title": "## ベンチマーク", "community_description": "コンパイラオタク、フロントエンドハッカークリエイターのための遊び場。issue を開くか、Discord で声をかけて。", "community_title": "## コミュニティ", - "features_fast_content": "現代的なコンパイラ技術でゼロから構築し、即時実行と、分かりやすいエラーメッセージによる高速なデバッグを実現。", + "features_fast_content": "現代的なコンパイラ技術でゼロから構築し、瞬時のビルドと、分かりやすいエラーメッセージによる高速なデバッグを実現。", "features_fast_title": "高速", - "features_integrated_content": "組み込みツール付きの完全なワークステーション — パッケージマネージャ fret とテキストエディタ codelord。", + "features_integrated_content": "組み込みツール付きの完全なワークステーション — パッケージマネージャ fret とテキストエディタ codelord。", "features_integrated_title": "統合", "features_quote": "余計な労力を省いて、仕事量を減らせ。", - "features_safe_content": "静的かつ強い型付け。Green スレッドと OS スレッドを nursery task scopes でラップ。スレッドのリーク無し、データ競合無し。", + "features_safe_content": "静的かつ強い型付けで、null なし・生ポインタなし。Green スレッドと OS スレッドは nursery task scopes で動作 — スレッドのリーク無し、共有可変状態なし。", "features_safe_title": "安全", "features_title": "## 機能", - "features_unified_content": "ZSX で Ui を一度書けば、ネイティブ gpu でも Web dom でも動く。", + "features_unified_content": "ZSX で Ui を一度書けば、デスクトップ gpu・モバイル uikit・Web dom のどこでも動く。", "features_unified_title": "統一", "foundations_description": "現代的で信頼できる基盤に支えられ、高性能グラフィックスウェブ統合を実現する。", "foundations_title": "## 基盤", "header_initiation": "入門", + "header_spec": "仕様", "header_news": "ニュース", "hero_tagline": "あなたの考えを、型安全なソフトウェアと Ui に即座に変える。", "initiation_authors": "invisageable と compilords", @@ -30,7 +31,7 @@ "initiation_subtitle": "zo への入門。", "initiation_title": "入門", "initiation_translators": "翻訳者 ...", - "manifesto_content": "zo は、巨大なコンパイラの中にあるコンパイラの中の、さらに巨大なコンパイラの中のコンパイラだ。\n\nこのプロジェクトの目的は、開発者体験を高め、あなたの創造性を映すソフトウェアづくりをシームレスにすることだ。私たちは大事なディテールに集中し、考えをプログラムに変えることが簡単なだけでなく、楽しいものになるよう、ソフトウェア宇宙に新たな次元を開いていく。\n\nzo は鍵をあなたに手渡す、完全なエコシステムだ。ようやくあなたは自分のワークステーションを支配できる。もう手探りで作業する必要はない。私たちのツールは、設計から配信まで、プログラムに必要なあらゆる情報を提供する。\n\n私たちはあふれかえるソフトウェアの画一化に抗う。zo はウェブGPUを統合する — ウェブをキャンバスに押し込めるのではなく、Flexbox レイアウトと生の GPU パワーを調和させることで。革新の境界を限界まで押し広げるために、できる限りのことを尽くす。\n\nディヴォリューションに参加せよ。", + "manifesto_content": "このプロジェクトの目的は、開発者体験を高め、あなたの創造性を映すソフトウェアづくりをシームレスにすることだ。私たちは大事なディテールに集中し、考えをプログラムに変えることを、簡単なだけでなく楽しいものにする。", "manifesto_title": "## 宣言", "nav_benchmarks": "ベンチマーク", "news_description": "zo に関するすべて:リリース、マイルストーン、デザインノート。", @@ -50,8 +51,8 @@ "oss_merged_prs": "マージ済み PR", "oss_stars": "スター", "oss_title": "## oss", - "prologue_description": "ネイティブウェブのアプリケーションを、速度に最適化された形で出荷・実行・構築するための言語。zo は高性能・シンプルさ・データ指向に特化した、機能豊富なエコシステムです。", - "prologue_punchline": "一つの言語。一つのコンパイラ。一つのバイナリ。ネイティブウェブか — ソースは同じ。", + "prologue_description": "zo (/zu:/、「zoo」と同じ発音) は、実用的で軽量、クロスプラットフォームの汎用プログラミング言語です。型安全デスクトップモバイルウェブアプリケーションを、単一のソースコードから出荷・実行・構築します。", + "prologue_punchline": "一つの言語。一つのコンパイラ。一つのバイナリ。一つのウィンドウ。すべてのプラットフォームソースは同じ。", "prologue_title": "zo プログラミング言語。", "purpose_description": "クリエイティブな開発者がシンプルな Ui コード高性能のどちらかを選ばなくていいようにすべきだ。API はバラバラ、ツールは複雑すぎ、開発ループは遅すぎる。zo はとして作られた — クリエイティブな考えを、堅牢でクロスプラットフォームなソフトウェアに即座に変える、単一かつ直感的な言語。", "purpose_quote_sentence": "なぜ遅いコンパイラを受け入れる?速くすればいいだけだ。", diff --git a/apps/site/messages/zh.json b/apps/site/messages/zh.json index 5134491d..3f9dff0c 100644 --- a/apps/site/messages/zh.json +++ b/apps/site/messages/zh.json @@ -7,19 +7,20 @@ "benchmarks_title": "## 基准测试", "community_description": "为编译器极客、前端黑客创作者打造的乐园。提交一个 issue,或来 Discord 打个招呼。", "community_title": "## 社区", - "features_fast_content": "采用现代编译器技术从零打造,实现即时执行,并配合有用的错误信息提供快速调试体验。", + "features_fast_content": "采用现代编译器技术从零打造,实现即时构建,并配合有用的错误信息提供快速调试体验。", "features_fast_title": "快速", - "features_integrated_content": "完整的工作站配备内置工具 — 包管理器 fret 与文本编辑器 codelord。", + "features_integrated_content": "完整的工作站配备内置工具 — 包管理器 fret 与文本编辑器 codelord。", "features_integrated_title": "集成", "features_quote": "通过不浪费精力来减少工作量。", - "features_safe_content": "静态强类型。使用包裹在 nursery task scopes 中的 green 与 OS 线程;没有泄露线程,没有数据竞争。", + "features_safe_content": "静态强类型,没有 null,也没有裸指针。green 与 OS 线程运行在 nursery task scopes 中 — 没有泄露线程,没有共享可变状态。", "features_safe_title": "安全", "features_title": "## 功能", - "features_unified_content": "用 ZSX 编写一次 Ui — 目标平台为原生 gpu 或网页 dom。", + "features_unified_content": "用 ZSX 编写一次 Ui — 目标平台为桌面 gpu、移动 uikit 或网页 dom。", "features_unified_title": "统一", "foundations_description": "由现代且可靠的基础驱动,提供高性能图形网页集成。", "foundations_title": "## 基础", "header_initiation": "入门", + "header_spec": "规范", "header_news": "新闻", "hero_tagline": "把你的想法瞬间变成类型安全的软件和 Ui。", "initiation_authors": "invisageable 与 compilords", @@ -30,7 +31,7 @@ "initiation_subtitle": "zo 的入门指南。", "initiation_title": "入门", "initiation_translators": "译者 ...", - "manifesto_content": "zo 是一个位于另一台巨型编译器内的编译器之中的编译器,而那台编译器又位于一个庞大编译器之中。\n\n该项目的目标是提升开发者体验,让构建反映你创造力的软件变得无缝。我们专注于真正重要的细节,在软件世界中打开新的维度,让你将思想转化为程序不仅容易,而且令人愉悦。\n\nzo 是一个完整的生态系统,把钥匙交到你手中。你终于对自己的工作站拥有控制权。你再也不必盲目工作。我们的工具为你的程序提供从设计到交付所需的全部信息。\n\n我们反对软件中泛滥的同质化。zo 把网页GPU统一起来 — 不是把网页塞进画布,而是让 Flexbox 布局与原生 GPU 算力和谐共处。我们会竭尽所能将创新的边界推到极致。\n\n加入这场反进化。", + "manifesto_content": "该项目的目标是提升开发者体验,让构建反映你创造力的软件变得无缝。我们专注于真正重要的细节,让你将思想转化为程序不仅容易,而且令人愉悦。", "manifesto_title": "## 宣言", "nav_benchmarks": "基准测试", "news_description": "所有与 zo 相关的内容:发布、里程碑、设计笔记。", @@ -50,8 +51,8 @@ "oss_merged_prs": "已合并 PR", "oss_stars": "星标", "oss_title": "## 开源", - "prologue_description": "一门用于发布、运行和构建原生网页应用的语言,针对速度进行优化。zo 是一个功能丰富的生态系统,专注于高性能、简洁与数据导向。", - "prologue_punchline": "一门语言。一个编译器。一个二进制文件。原生网页同一份源码。", + "prologue_description": "zo (读作 /zu:/,就像 “zoo”) 是一门实用、轻量、跨平台的通用编程语言。用一份源代码来发布、运行和构建类型安全桌面移动网页应用。", + "prologue_punchline": "一门语言。一个编译器。一个二进制文件。一个窗口。全平台同一份源码。", "prologue_title": "zo 编程语言。", "purpose_description": "创作型开发者不应该在简洁的 Ui 代码高性能之间做选择。API 各自为政,工具过于复杂,开发循环太慢。我们打造 zo 作为粘合剂 — 一门统一、直观的语言,让你瞬间把创意变成稳定、跨平台的软件。", "purpose_quote_sentence": "为何忍受缓慢的编译器?让它们更快就是了。", diff --git a/apps/site/package-lock.json b/apps/site/package-lock.json index bcff03f2..a883f4cc 100644 --- a/apps/site/package-lock.json +++ b/apps/site/package-lock.json @@ -8,15 +8,15 @@ "name": "zo-off-site", "version": "0.0.1", "dependencies": { - "@astrojs/sitemap": "^3.7.2", - "@astrojs/vercel": "^10.0.6", - "astro": "^6.2.1" + "@astrojs/sitemap": "^3.7.3", + "@astrojs/vercel": "^10.0.8", + "astro": "^6.4.6" }, "devDependencies": { "@inlang/paraglide-js": "^2.18.0" }, "engines": { - "node": ">=22.12.0" + "node": "24.x" } }, "node_modules/@astrojs/compiler": { @@ -26,26 +26,32 @@ "license": "MIT" }, "node_modules/@astrojs/internal-helpers": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/@astrojs/internal-helpers/-/internal-helpers-0.9.0.tgz", - "integrity": "sha512-GdYkzR26re8izmyYlBqf4z2s7zNngmWLFuxw0UKiPNqHraZGS6GKWIwSHgS22RDlu2ePFJ8bzmpBcUszut/SDg==", + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@astrojs/internal-helpers/-/internal-helpers-0.10.0.tgz", + "integrity": "sha512-Ry2R3VPeIN4uPCSA4xQc+e+vsJXkalKpEbDc07hV+a/o5Bs2N/s/uDcPJH/05L19DKh9tAy7e6JM3YZ6Cxfezw==", "license": "MIT", "dependencies": { - "picomatch": "^4.0.4" + "@types/hast": "^3.0.4", + "@types/mdast": "^4.0.4", + "js-yaml": "^4.1.1", + "picomatch": "^4.0.4", + "retext-smartypants": "^6.2.0", + "shiki": "^4.0.2", + "smol-toml": "^1.6.0", + "unified": "^11.0.5" } }, "node_modules/@astrojs/markdown-remark": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@astrojs/markdown-remark/-/markdown-remark-7.1.1.tgz", - "integrity": "sha512-C6e9BnLGlbdv6bV8MYGeHpHxsUHrCrB4OuRLqi5LI7oiBVcBcqfUN06zpwFQdHgV48QCCrMmLpyqBr7VqC+swA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@astrojs/markdown-remark/-/markdown-remark-7.2.0.tgz", + "integrity": "sha512-+YxmVQu1Bd+MFfSzjq1rOJvD9+nIOJzz5YIIhdIH01RrxRkKbyKoEgyIqP3yv51MhzMDgd79QaPv+kCVPT8vHw==", "license": "MIT", "dependencies": { - "@astrojs/internal-helpers": "0.9.0", - "@astrojs/prism": "4.0.1", + "@astrojs/internal-helpers": "0.10.0", + "@astrojs/prism": "4.0.2", "github-slugger": "^2.0.0", "hast-util-from-html": "^2.0.3", "hast-util-to-text": "^4.0.2", - "js-yaml": "^4.1.1", "mdast-util-definitions": "^6.0.0", "rehype-raw": "^7.0.0", "rehype-stringify": "^10.0.1", @@ -53,9 +59,6 @@ "remark-parse": "^11.0.0", "remark-rehype": "^11.1.2", "remark-smartypants": "^3.0.2", - "retext-smartypants": "^6.2.0", - "shiki": "^4.0.0", - "smol-toml": "^1.6.0", "unified": "^11.0.5", "unist-util-remove-position": "^5.0.0", "unist-util-visit": "^5.1.0", @@ -64,9 +67,9 @@ } }, "node_modules/@astrojs/prism": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@astrojs/prism/-/prism-4.0.1.tgz", - "integrity": "sha512-nksZQVjlferuWzhPsBpQ1JE5XuKAf1id1/9Hj4a9KG4+ofrlzxUUwX4YGQF/SuDiuiGKEnzopGOt38F3AnVWsQ==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@astrojs/prism/-/prism-4.0.2.tgz", + "integrity": "sha512-KTivpmnz6lDsC6o9H4+DNm2SrE/GHzw8cNAvEJwAvUT+eoaEnn/4NtbDNfRRaxaJHdp15gf+tfHAWiXR4wB3BA==", "license": "MIT", "dependencies": { "prismjs": "^1.30.0" @@ -76,9 +79,9 @@ } }, "node_modules/@astrojs/sitemap": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/@astrojs/sitemap/-/sitemap-3.7.2.tgz", - "integrity": "sha512-PqkzkcZTb5ICiyIR8VoKbIAP/laNRXi5tw616N1Ckk+40oNB8Can1AzVV56lrbC5GKSZFCyJYUVYqVivMisvpA==", + "version": "3.7.3", + "resolved": "https://registry.npmjs.org/@astrojs/sitemap/-/sitemap-3.7.3.tgz", + "integrity": "sha512-f8euLVsyeAmAkSm/1M2Kb8sL8byQmfgbvBNaHFItCheTj/IpiJYSEWVcqDHZ/yEHxiS7+w87mQkzwZaPHmk5GA==", "license": "MIT", "dependencies": { "sitemap": "^9.0.0", @@ -87,13 +90,12 @@ } }, "node_modules/@astrojs/telemetry": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/@astrojs/telemetry/-/telemetry-3.3.1.tgz", - "integrity": "sha512-7fcIxXS9J4ls5tr8b3ww9rbAIz2+HrhNJYZdkAhhB4za/I5IZ/60g+Bs8q7zwG0tOIZfNB4JWhVJ1Qkl/OrNCw==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/@astrojs/telemetry/-/telemetry-3.3.2.tgz", + "integrity": "sha512-j8DNruA8ors99Al39RYZPJK4DC1bKkoNm93mAMuBhY9TCNC4R8n1q7ovFnJ5qhGh5Lsh7pa1gpQVpYpsJPeTHQ==", "license": "MIT", "dependencies": { "ci-info": "^4.4.0", - "dlv": "^1.1.3", "dset": "^3.1.4", "is-docker": "^4.0.0", "is-wsl": "^3.1.1", @@ -104,12 +106,12 @@ } }, "node_modules/@astrojs/vercel": { - "version": "10.0.6", - "resolved": "https://registry.npmjs.org/@astrojs/vercel/-/vercel-10.0.6.tgz", - "integrity": "sha512-Ubd1M77QWqXXluFNL8/ynmfyZCfIUVuL6QRpPXGYOIQ8Dv3QBXM34e0CMig3OgmihSIWNv9sqQHzEHDyDJV9QQ==", + "version": "10.0.8", + "resolved": "https://registry.npmjs.org/@astrojs/vercel/-/vercel-10.0.8.tgz", + "integrity": "sha512-usxmHwMEWI+yaYioSB9eFZbmuFKPnMPmQlX2e9PZ3+v79Xo4IFiKVqblspV+CuOE3u/CtgcHdnC9khKjZlbMyA==", "license": "MIT", "dependencies": { - "@astrojs/internal-helpers": "0.9.0", + "@astrojs/internal-helpers": "0.10.0", "@vercel/analytics": "^1.6.1", "@vercel/functions": "^3.4.3", "@vercel/nft": "^1.3.2", @@ -1653,13 +1655,13 @@ ] }, "node_modules/@shikijs/core": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-4.0.2.tgz", - "integrity": "sha512-hxT0YF4ExEqB8G/qFdtJvpmHXBYJ2lWW7qTHDarVkIudPFE6iCIrqdgWxGn5s+ppkGXI0aEGlibI0PAyzP3zlw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-4.2.0.tgz", + "integrity": "sha512-Hc87Ab1Ld/vEbZRCbwx344I5v+4RU8CVToUTRkqXL1+TjbuOp9U5Xa0M23V4GEWHxVn+yO5otb+HkQVm3ptWQQ==", "license": "MIT", "dependencies": { - "@shikijs/primitive": "4.0.2", - "@shikijs/types": "4.0.2", + "@shikijs/primitive": "4.2.0", + "@shikijs/types": "4.2.0", "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4", "hast-util-to-html": "^9.0.5" @@ -1669,26 +1671,26 @@ } }, "node_modules/@shikijs/engine-javascript": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-4.0.2.tgz", - "integrity": "sha512-7PW0Nm49DcoUIQEXlJhNNBHyoGMjalRETTCcjMqEaMoJRLljy1Bi/EGV3/qLBgLKQejdspiiYuHGQW6dX94Nag==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-4.2.0.tgz", + "integrity": "sha512-fjETeq1k5ffyXqRgS6+3hpvqseLalp1kjNfRbXpUgWR8FpZ1CmQfiNHovc5lncYjt/Vg5JK/WJEmLahjwMa0og==", "license": "MIT", "dependencies": { - "@shikijs/types": "4.0.2", + "@shikijs/types": "4.2.0", "@shikijs/vscode-textmate": "^10.0.2", - "oniguruma-to-es": "^4.3.4" + "oniguruma-to-es": "^4.3.6" }, "engines": { "node": ">=20" } }, "node_modules/@shikijs/engine-oniguruma": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-4.0.2.tgz", - "integrity": "sha512-UpCB9Y2sUKlS9z8juFSKz7ZtysmeXCgnRF0dlhXBkmQnek7lAToPte8DkxmEYGNTMii72zU/lyXiCB6StuZeJg==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-4.2.0.tgz", + "integrity": "sha512-hTorK1dffPkpbMUk6Z+828PgRo7d07HbnizoP0hNPFjhxMHctj0Px/qoHeGMYafc6ju+u9iMldN4JbVzNQM++g==", "license": "MIT", "dependencies": { - "@shikijs/types": "4.0.2", + "@shikijs/types": "4.2.0", "@shikijs/vscode-textmate": "^10.0.2" }, "engines": { @@ -1696,24 +1698,24 @@ } }, "node_modules/@shikijs/langs": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-4.0.2.tgz", - "integrity": "sha512-KaXby5dvoeuZzN0rYQiPMjFoUrz4hgwIE+D6Du9owcHcl6/g16/yT5BQxSW5cGt2MZBz6Hl0YuRqf12omRfUUg==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-4.2.0.tgz", + "integrity": "sha512-bwrVRlJ0wUhZxAbVdvBbv2TTC9yLsh4C/IO5Ofz0T8MQntgDvyVnkbjw9vi50r1kx7RCIJdnJnjZAwmAsXFLZQ==", "license": "MIT", "dependencies": { - "@shikijs/types": "4.0.2" + "@shikijs/types": "4.2.0" }, "engines": { "node": ">=20" } }, "node_modules/@shikijs/primitive": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@shikijs/primitive/-/primitive-4.0.2.tgz", - "integrity": "sha512-M6UMPrSa3fN5ayeJwFVl9qWofl273wtK1VG8ySDZ1mQBfhCpdd8nEx7nPZ/tk7k+TYcpqBZzj/AnwxT9lO+HJw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@shikijs/primitive/-/primitive-4.2.0.tgz", + "integrity": "sha512-NOq+DtUkVBJtZMVXL5A0vI0Xk8nvDYaXetFHSJFlOqjDZIVhIPRYFdGkSoElDqNuegikcc3A76SNUa8dTqtAYA==", "license": "MIT", "dependencies": { - "@shikijs/types": "4.0.2", + "@shikijs/types": "4.2.0", "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4" }, @@ -1722,21 +1724,21 @@ } }, "node_modules/@shikijs/themes": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-4.0.2.tgz", - "integrity": "sha512-mjCafwt8lJJaVSsQvNVrJumbnnj1RI8jbUKrPKgE6E3OvQKxnuRoBaYC51H4IGHePsGN/QtALglWBU7DoKDFnA==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-4.2.0.tgz", + "integrity": "sha512-RX8IHYeLv8Cu2W6ruc3RxUqWn0IYCqSrMBzi/uRGAmfyDNOnNO5BF/Px7o97n4XTpmFTo5GbRaazuOWj+2ak2w==", "license": "MIT", "dependencies": { - "@shikijs/types": "4.0.2" + "@shikijs/types": "4.2.0" }, "engines": { "node": ">=20" } }, "node_modules/@shikijs/types": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-4.0.2.tgz", - "integrity": "sha512-qzbeRooUTPnLE+sHD/Z8DStmaDgnbbc/pMrU203950aRqjX/6AFHeDYT+j00y2lPdz0ywJKx7o/7qnqTivtlXg==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-4.2.0.tgz", + "integrity": "sha512-VT/MKtlpOhEPZloSH3Pb9WCZEBDoQVMa9jedp5UAwmJOar1DVc9DRODAxmYPW9M93IK4ryuqRejFfmlvlVDemw==", "license": "MIT", "dependencies": { "@shikijs/vscode-textmate": "^10.0.2", @@ -2035,15 +2037,15 @@ "license": "MIT" }, "node_modules/astro": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/astro/-/astro-6.2.1.tgz", - "integrity": "sha512-3g1sYNly+QAkuO5ErNEQBYvsxorNDSCUNIeStBs+kcXGchvKQl1Q9EuDNOvSg010XLlHJFLVFZs9LV18Jjp4Hg==", + "version": "6.4.6", + "resolved": "https://registry.npmjs.org/astro/-/astro-6.4.6.tgz", + "integrity": "sha512-48OBTBKR9ctbf+DQxpOuxGl8ebfn59zTuNQMBzptmG/Mi/H8IdfMSbJgGuX1I/4U6g9yazG1p4BHlf4+2hWU4Q==", "license": "MIT", "dependencies": { "@astrojs/compiler": "^4.0.0", - "@astrojs/internal-helpers": "0.9.0", - "@astrojs/markdown-remark": "7.1.1", - "@astrojs/telemetry": "3.3.1", + "@astrojs/internal-helpers": "0.10.0", + "@astrojs/markdown-remark": "7.2.0", + "@astrojs/telemetry": "3.3.2", "@capsizecss/unpack": "^4.0.0", "@clack/prompts": "^1.1.0", "@oslojs/encoding": "^1.1.0", @@ -2054,17 +2056,19 @@ "clsx": "^2.1.1", "common-ancestor-path": "^2.0.0", "cookie": "^1.1.1", - "devalue": "^5.6.3", + "devalue": "^5.8.1", "diff": "^8.0.3", "dset": "^3.1.4", "es-module-lexer": "^2.0.0", "esbuild": "^0.27.3", "flattie": "^1.1.1", "fontace": "~0.4.1", + "get-tsconfig": "5.0.0-beta.4", "github-slugger": "^2.0.0", "html-escaper": "3.0.3", "http-cache-semantics": "^4.2.0", "js-yaml": "^4.1.1", + "jsonc-parser": "^3.3.1", "magic-string": "^0.30.21", "magicast": "^0.5.2", "mrmime": "^2.0.1", @@ -2083,7 +2087,6 @@ "tinyclip": "^0.1.12", "tinyexec": "^1.0.4", "tinyglobby": "^0.2.15", - "tsconfck": "^3.1.6", "ultrahtml": "^1.6.0", "unifont": "~0.7.4", "unist-util-visit": "^5.1.0", @@ -2489,9 +2492,9 @@ } }, "node_modules/devalue": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/devalue/-/devalue-5.8.0.tgz", - "integrity": "sha512-2zA9pFEsnp7vWBZbXF5JAgAq0fsUIt/1XPbRiAmRV3lp/2C3upzH+sADiyy66aFCihoLEsrQHxNM5w1gIDfsBg==", + "version": "5.8.1", + "resolved": "https://registry.npmjs.org/devalue/-/devalue-5.8.1.tgz", + "integrity": "sha512-4CXDYRBGqN+57wVJkuXBYmpAVUSg3L6JAQa/DFqm238G73E1wuyc/JhGQJzN7vUf/CMphYau2zXbfWzDR5aTEw==", "license": "MIT" }, "node_modules/devlop": { @@ -2516,12 +2519,6 @@ "node": ">=0.3.1" } }, - "node_modules/dlv": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", - "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==", - "license": "MIT" - }, "node_modules/dom-serializer": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", @@ -2806,6 +2803,21 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, + "node_modules/get-tsconfig": { + "version": "5.0.0-beta.4", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-5.0.0-beta.4.tgz", + "integrity": "sha512-7nF7C9fIPFEMHgEMEfgIlO9wDdZ8CyHw27rWciFZfHvHDReIiPhsYuzPRXsfvBCqFy1l8RRyyWV7QLM+ZhUJsQ==", + "license": "MIT", + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "engines": { + "node": ">=20.20.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, "node_modules/github-slugger": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/github-slugger/-/github-slugger-2.0.0.tgz", @@ -3166,9 +3178,19 @@ "license": "MIT" }, "node_modules/js-yaml": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", - "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.2.0.tgz", + "integrity": "sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/puzrin" + }, + { + "type": "github", + "url": "https://github.com/sponsors/nodeca" + } + ], "license": "MIT", "dependencies": { "argparse": "^2.0.1" @@ -3197,6 +3219,12 @@ "node": ">=6" } }, + "node_modules/jsonc-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.3.1.tgz", + "integrity": "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==", + "license": "MIT" + }, "node_modules/kysely": { "version": "0.28.17", "resolved": "https://registry.npmjs.org/kysely/-/kysely-0.28.17.tgz", @@ -4647,6 +4675,15 @@ "node": ">=8" } }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "license": "MIT", + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, "node_modules/retext": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/retext/-/retext-9.0.0.tgz", @@ -4819,17 +4856,17 @@ } }, "node_modules/shiki": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-4.0.2.tgz", - "integrity": "sha512-eAVKTMedR5ckPo4xne/PjYQYrU3qx78gtJZ+sHlXEg5IHhhoQhMfZVzetTYuaJS0L2Ef3AcCRzCHV8T0WI6nIQ==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-4.2.0.tgz", + "integrity": "sha512-hjNax6o/ylDy9lefQEaSDtzaT3iVNtZ3WmpQnbuQNoG4xvnSKf2kSKbihZVO4JRG1TTMejs7CmNRYlWgAL66pQ==", "license": "MIT", "dependencies": { - "@shikijs/core": "4.0.2", - "@shikijs/engine-javascript": "4.0.2", - "@shikijs/engine-oniguruma": "4.0.2", - "@shikijs/langs": "4.0.2", - "@shikijs/themes": "4.0.2", - "@shikijs/types": "4.0.2", + "@shikijs/core": "4.2.0", + "@shikijs/engine-javascript": "4.2.0", + "@shikijs/engine-oniguruma": "4.2.0", + "@shikijs/langs": "4.2.0", + "@shikijs/themes": "4.2.0", + "@shikijs/types": "4.2.0", "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4" }, @@ -5032,26 +5069,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/tsconfck": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/tsconfck/-/tsconfck-3.1.6.tgz", - "integrity": "sha512-ks6Vjr/jEw0P1gmOVwutM3B7fWxoWBL2KRDb1JfqGVawBmO5UsvmWOQFGHBPl5yxYz4eERr19E6L7NMv+Fej4w==", - "license": "MIT", - "bin": { - "tsconfck": "bin/tsconfck.js" - }, - "engines": { - "node": "^18 || >=20" - }, - "peerDependencies": { - "typescript": "^5.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, "node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", diff --git a/apps/site/package.json b/apps/site/package.json index 731e85fb..b781ff7c 100644 --- a/apps/site/package.json +++ b/apps/site/package.json @@ -15,9 +15,9 @@ "zo:docs": "node ../site-tasks/build-llms-full.mjs" }, "dependencies": { - "@astrojs/sitemap": "^3.7.2", - "@astrojs/vercel": "^10.0.6", - "astro": "^6.2.1" + "@astrojs/sitemap": "^3.7.3", + "@astrojs/vercel": "^10.0.8", + "astro": "^6.4.6" }, "devDependencies": { "@inlang/paraglide-js": "^2.18.0" diff --git a/apps/site/src/components/structure/benchmarks.astro b/apps/site/src/components/structure/benchmarks.astro index 8eadc7c0..80174167 100644 --- a/apps/site/src/components/structure/benchmarks.astro +++ b/apps/site/src/components/structure/benchmarks.astro @@ -15,17 +15,14 @@ const benchmarks = [ { compiler: "zo", hot: 60, - throughput: "~167K LoC/s", }, { compiler: "clang", hot: 148, - throughput: "~67K LoC/s", }, { compiler: "rustc", hot: 321, - throughput: "~31K LoC/s", }, ]; @@ -33,7 +30,6 @@ const series: Series[] = benchmarks.map((benchmark) => ({ label: benchmark.compiler, value: benchmark.hot, display: `${benchmark.hot}ms`, - inBar: benchmark.throughput, })); --- diff --git a/apps/site/src/components/structure/header.astro b/apps/site/src/components/structure/header.astro index e9cbcda1..031e94a3 100644 --- a/apps/site/src/components/structure/header.astro +++ b/apps/site/src/components/structure/header.astro @@ -16,6 +16,7 @@ const { class: className, id } = Astro.props;
+ +

{open}

+ ; + + #render view; + } + ``` + +## closures + +Inline closures `fn() => expr` now unify their types, so a closure's parameters and result resolve, whether you bind it to a name or write it straight into an event. A closure captures the variables it names, and a captured `mut` stays mutable inside, so `count += 1` reaches back out and changes the state the view reads. + + ```zo + imu square: Fn(int) -> int = fn(x: int) -> int => x * x; + showln(square(7)); -- 49 + ``` + +## booleans + +`showln` prints booleans as `true` and `false` now, not `1` and `0`. + + ```zo + showln(true); -- true + showln(false); -- false + ``` + +## zo-styler + +The first step toward a built-in style system. `zo-styler` reads a `$: { }` block, with styles scoped to the component by default. It heads toward one styling story shared across web and native. + + ```zo + $: { + p { + color: blue; + font-weight: 800; + } + } + ``` + +Alongside the features, the corpus that proves them grew: more test programs under `zo-tests` and more how-to examples, each a small program that compiles and runs. diff --git a/apps/site/src/content/news/en/S01/S01E06-01-06-2026.md b/apps/site/src/content/news/en/S01/S01E06-01-06-2026.md index a80b5545..cdf808fd 100644 --- a/apps/site/src/content/news/en/S01/S01E06-01-06-2026.md +++ b/apps/site/src/content/news/en/S01/S01E06-01-06-2026.md @@ -1,136 +1,259 @@ -# S01E06 — 01-06-x2026. +# S01E06 — 01-06-2026. -> *0.4.0 released x— the turfu is coming.* +> *zo 0.4.0 — The Turfu is Coming.* -Un long mois de labeur est recompensé par un bon compilateur. Il n'y avait pas vraiment d'objectif pour ce milestone, le but était de stabiliser autant que possible l'architecture du compilateur. +A long month of work, rewarded by a good compiler. This milestone had no single goal. The aim was to stabilize the compiler's architecture as far as possible. -En effet, pleins de petits cas chiant ralentissait la création de programme en zo. Il a fallut les chasser, les corriger pour être capable d'écrire des programmes qui se rapproche des besoins réels d'un développeur. Certes, tous les cas n'ont pas été fixé, maintenant bon nombre d'entre eux ont des tests attitrés pour prévenir d'éventuelles régressions. +Plenty of small, irritating cases were slowing down the writing of zo programs. We had to hunt them down and fix them, to reach the point where you can write programs close to a real developer's needs. We haven't fixed every case, but many now carry a dedicated test, to guard against regressions. -Je me rends compte que je n'ai pas de méthodes rigoureuses pour m'assurer de pouvoir tester tous les cas. Certains sur les internets parleront de skill issues. Oui sûrement, cependant c'est de cette façcon que j'aime apprendre. +I'm aware I don't yet have a rigorous method for covering every case. The right answer will come. For now, this is how I like to learn: write the programs, hit the walls, fix what breaks. ## website -we release the first version of our website in `https://zo.compilords.house`. All documentation are moved there. -We also now provides llms.txt and llms-full.txt to improve our GEO because now we live in the AI era. So we provide any information regarding zo in those files. +zo has a home: `https://zo.compilords.house`. All the documentation now lives there: the initiation, the spec, and these news posts. We also publish `llms.txt` and `llms-full.txt`, so the models people now ask about everything can answer about zo from a single, authoritative source. -## Providers +## providers -zo est capable de communiquer avec le monde extérieur via le binding generator. c'est une feature encore expérimentale qui doit être améliorer, mais qui fera partie du coeur de zo. Ce qui nous offres des perspectives infinies. Rien n'est encore documenté mais ça ne serait tardé. - -Cela nous permet d'utiliser: +zo can talk to the outside world. A binding generator turns a C library into a zo provider, a typed surface you `load` and call. The feature is still experimental and will keep improving, but it already sits near the core of what zo can reach. **json** -You can now deal with JSON: list all methods following by a comma +Parse, read, and build JSON. The `Json` type carries the whole surface: `parse`, `kind`, `get`, `get_at`, `as_bool`, `as_int`, `as_f64`, `as_str`, `len`, `keys_len`, `key_at`, `to_str`, `array`, `object`, `push`, `set`, `write`, and `free`. + + ```zo + load core::json::*; + + fun main() { + imu data: Json = Json::parse("[10, 20, 30]"); + imu first: int = data.get_at(0).as_int(); -``` --- code snippet to highlight the usage. -``` + showln("first: {first}"); -- first: 10 + + data.free(); + } + ``` **raylib** -des programmes sont dores et déjà présent dans [zo-tests](). vous y trouvez par example le jeux de la vie, asteroid, arkanoid et d'autres examples plus simples. +Games already run. Under [zo-tests](https://github.com/invisageable/zo/tree/main/crates/compiler/zo-tests/provider/raylib) you'll find Conway's Game of Life, asteroids, arkanoid, and smaller examples. Opening a window is this short: + + ```zo + load core::c::*; + load provider::raylib; + + fun main() { + raylib::init_window(800, 600, CStr::new("zo + raylib")); + raylib::set_target_fps(60); + + loop { + if raylib::window_should_close() { break } + + raylib::begin_drawing(); + raylib::clear_background(0xFF000000); + raylib::draw_text(CStr::new("hello, zo!"), 12, 12, 32, 0xFFFFFFFF); + raylib::end_drawing(); + } + + raylib::close_window(); + } + ``` **sqlite** -... +A start, not yet complete. We plan full support for the milestone that begins now. -> *Le support n'est pas encore complet, mais prévu pour le milestones qui commence.* +## core & preload -## Core & Preload +`std` is gone, renamed `core`. We refined the `preload`, the set of packages zo makes available without an explicit `load`, and `core` grew a run of new packages. -`std` has been rename `core` and do not longer exist. We extend the core with the following new packages: +**random** — a small, seedable generator. -**refinement** + ```zo + load core::random::*; -`preload` has been refinement. Now zo embed the following packages as builtinn by default: + fun main() { + mut rng: Rng = Rng::new(42); + imu roll: int = rng.range(1, 100); -- list them + showln("{roll}"); + } + ``` -**new packages** +**regex** — compile a pattern, then match, find, replace, or split. -**random** + ```zo + load core::regex::Regex; -... + fun main() { + imu vowels: Regex = Regex::new("[aeiou]", ""); -**info** + showln(vowels.replace_all("hello", "*")); -- h*ll* + vowels.free(); + } + ``` -**regex** +**time** — a monotonic clock, durations, and sleep. -... + ```zo + load core::time::(Instant, Duration); -**time** + fun main() { + imu start: Instant = Instant::now(); + sleep(Duration::from_millis(10)); + imu ms: int = start.elapsed().as_millis(); -... + showln("{ms}"); -- >= 10 + } + ``` -**c** +**hash** — SHA-1 and SHA-256 digests. -`CStr` and `CBytes` + ```zo + load core::hash; -**env** + fun main() { + showln(hash::sha256("abc")); + -- ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad + } + ``` -**log** +**encoding** — base64, encode and decode. -**hash** + ```zo + load core::encoding::base64; -sha1, sha256 + fun main() { + showln(base64::encode("zo")); -- em8= + showln(base64::decode("em8=")); -- zo + } + ``` -**encoding** +**net** — TCP sockets and an HTTP client. -`base64` + ```zo + load core::http; -**net** + fun main() { + match http::get("http://127.0.0.1:8080/") { + Result::Pass(response) => showln(response.body), + Result::Fail(_) => showln("request failed"), + } + } + ``` -http +And more, each a small package in `core`: **c** (`CStr` and `CBytes` for the FFI boundary), **env** (read and set environment variables), **log** (`debug`/`info`/`warn`/`error`), **os**, **path**, **pool**, **info**, and **misato** for 3D. -**misato** +## concurrency -c'est un package pour faire de la 3d +zo runs concurrent work under a `nursery`, a scope that owns the tasks you `spawn` and does not return until they all finish. No leaked threads, no orphaned work. -**os** -.. + ```zo + nursery { + spawn server(fd); + spawn client(port); + } + ``` -**path** +`supervise` scopes children the same way, with one difference: a child panic cascades up instead of stopping at the scope. Reach for it when one failure should bring the whole subtree down. -... +A task is green by default. Thousands ride one OS thread through a cooperative scheduler. `spawn thread` gives a task its own OS thread, for CPU-bound work or a blocking call that would otherwise stall the others. -**pool** + ```zo + spawn worker(arg); -- green task + spawn thread os_worker(); -- dedicated OS thread + ``` -... +Tasks talk over typed channels, a `(Tx, Rx)` pair from `channel(n)`. `select` waits on several at once, taking the first that fires. -## concurrrent system + ```zo + nursery { + imu (tx1, rx1) := channel(1); + imu (tx2, rx2) := channel(1); -brief explanation of the concurrent system from the user perspective, not the technical and internal stuff. + spawn producer_a(tx1); + spawn producer_b(tx2); -see crates/compiler/zo-notes/personal/technical/concurrency.md + select { + rx1 => fn(value: int) => showln("chan1: {value}"), + rx2 => fn(value: int) => showln("chan2: {value}"), + } + } + ``` ## module system -We improve our module system to allow nested module and pubness isolation +Modules nest now, and visibility is real. A `pack` can hold another `pack`, and a name stays private unless you mark it `pub`. -## testing framework + ```zo + pack inner { + pack inner2 { + pub fun hello() { + showln("hello, modular world"); + } + } + } -zo now embedded a testing framework, not finished yet but the basis are in place via the `test` modifier. + fun main() { + inner::inner2::hello(); + } + ``` -## String and interpolation. +## testing -Une feature indispensable dans l'écriture de programmes. Vous pouvez désormer manipuler des chaines de caractères à votre guise. +zo carries a testing framework. It isn't finished, but the foundation is in place through the `test` modifier. A `test fun` runs under `zo test` and asserts with `check`. -see 7a19cf1fc8dc1de67b73f5a266e8742e0e2e9687 for interpolation or check examples in zo-tests + ```zo + fun add(left: int, right: int) -> int { + left + right + } -## Error Messages + test fun adds_small_numbers() { + check@eq(add(2, 3), 5); + } + ``` -C'est encore en chantier mais nous avons améliorer la hiérarchie de nos messages d'erreur pour être utile lors des phases de debug. désormais, il y a deux modes: `Humain` et `AI`. par défault c'est le mode humain qui fait foi, pour activer le mode `AI` utiliser le flag suivant à votre command zo `--format json`. +> *A `test fun` runs only under `zo test`. A normal build strips it, so tests never ship in your executable.* -``` --- afficher un message d'erreur parlant. -``` +## strings and interpolation -## agents +Indispensable, and now here. You can build and manipulate strings, and interpolate a value straight into a literal with `{...}`. -we add an agents.md file and redirect claude.md to that specific file. one source of truth can now deserve any agent models. it still needs improve because most of the time ai still not relie on it. + ```zo + imu total: int = 42; -this files contains all the rules, principles, code style, etc related to this project. + showln("total: {total}"); -- total: 42 + ``` + +> *For now, only a name goes inside the braces: `{total}`, not `{total + 1}`. Interpolating an expression is planned for the next milestone.* + +## error messages + +Still a work in progress, but the hierarchy of our diagnostics is sharper, built to be useful while you debug. Diagnostics come in two modes: human and AI. Human is the default. Pass `--format json` to your `zo` command for the machine-readable form. + +A zo error reads as an argument, not a bare complaint: a claim (the rule you broke), grounds (a caret on the offending source), and a resolution (the fix). + + ``` + [E0309] Error • Cannot mutate immutable variable + ╭─[ immutable.zo:3:3 ] + │ + 3 │ count = 1; + │ ──┬── + │ ╰──── cannot assign to immutable variable + │ + │ Help • Use 'mut' to declare a mutable variable + ───╯ + ``` + +`--format json` emits the same structure machine-readably, so a tool or an agent applies the fix without parsing prose. `code` and `id` name the error, `severity` ranks it, `message` is the claim, and `fixes` carries each edit as a `kind` / `text` / `description` triple. + + ```json + { "id": "immutable-variable", "code": "E0309", "severity": "error", + "message": "Cannot mutate immutable variable", + "fixes": [ { "kind": "insert", "text": "mut ", + "description": "Declare the variable as mutable with `mut`" } ] } + ``` + +## agents -We tried to avoid slop but this needs to be tackle has a full milestones task. We'll planify this soon. +We added an `AGENTS.md` and pointed `CLAUDE.md` at it, one source of truth that any agent model can rely on. It holds the project's rules, principles, and code style. It isn't only for the machines, either: contributors and volunteers read the same rules, so the whole team stays aligned. It still needs work. Most of the time the models lean on it less than they should. Taming that is its own milestone, and we'll plan it soon. diff --git a/apps/site/src/content/news/en/S01/S01E07-02-06-2026.md b/apps/site/src/content/news/en/S01/S01E07-02-06-2026.md deleted file mode 100644 index f159153c..00000000 --- a/apps/site/src/content/news/en/S01/S01E07-02-06-2026.md +++ /dev/null @@ -1,18 +0,0 @@ -# S01E07 — 02-06-2026. - -> **cheatsheet — from js to zo.** - -## comments. - -| js | zo | -| :------ | :----- | -| `//` | `--` | -| `/**/` | `-**-` | -| `/***/` | `-!` | - -## modules system. - -| js | zo | -| :------- | :----- | -| `export` | `pack` | -| `import` | `load` | diff --git a/apps/site/src/content/news/en/S01/S01E08-13-06-2026.md b/apps/site/src/content/news/en/S01/S01E08-13-06-2026.md new file mode 100644 index 00000000..456594cb --- /dev/null +++ b/apps/site/src/content/news/en/S01/S01E08-13-06-2026.md @@ -0,0 +1,134 @@ +# S01E08 — 13-06-2026. + +> *zo 0.5.0 — Road to Mobile.* + +0.4.0 stabilized the compiler. 0.5.0 spends that stability: one zo source now runs on the desktop, across Apple's platforms (iOS, tvOS, visionOS, watchOS), and on the web, with fine-grained reactivity, real components, styling, and forms. The toy grows up. + +## one source, every platform + +Targets collapse onto a single `--target` axis. The same program, no rewrite, picks where it runs. + +```sh +zo run hello.zo # desktop, native window +zo run hello.zo --target ios # iOS Simulator +zo run hello.zo --target visionos # visionOS Simulator +zo run hello.zo --target tvos # tvOS Simulator +zo run hello.zo --target watchos # Apple Watch Simulator +zo run hello.zo --target web # the browser +zo build hello.zo --target webview # a native webview .app +``` + +The web target is a backend: the compiler transpiles zo to a `public/` bundle. The Apple targets render through native UIKit in the Simulator. On device, glass panels paint real Liquid Glass. + +## fine-grained reactivity + +A write refreshes only what it drives. No runtime signals. The compiler builds the binding graph ahead of time, so when a `mut` changes, only the slots that read it repaint. The cost of an update is the size of the change, not the size of the view. + +```zo +fun main() { + mut items: []str = []; + + imu view: ::= <> + +
    {items.map(fn(item) =>
  • {item}
  • )}
+ ; + + #render view; +} +``` + +Lists ride the same path: `items.map(...)` binds the rows to the view, keyed diffs move only the rows that moved, an appended item no longer rebuilds the whole list, and an in-place write, `items[index] = v`, patches a single row. + +## components + +A zsx component is a function that returns markup. It takes props as parameters, and `` calls it. + +```zo +fun greeting(name: str) -> { + return

hello, {name}!

; +} + +fun main() { + imu page ::=
+ + +
; + + #render page; +} +``` + +Components nest, carry their own per-instance state, splice children through ``, take callbacks as `Fn` props so events flow back out, and cross pack boundaries, with a guard that rejects a component that includes itself. + +## styling + +`zo-styler` reads a scoped `$: { }` stylesheet with Tailwind-like shorthand, and the same rules reach every target. Interaction states are real: `:hover`, `:active`, `:focus`, `:disabled`. + +```zo +$: { + .btn { + bg: #2563eb; + c: white; + } + .btn:hover { + bg: red; + } +} + +fun main() { + imu page ::= ; + + #render page; +} +``` + +Borders, shadows, text wrap, and caps fill in alongside container surfaces, class selectors, background images, and the `material: glass` opt-in. + +## forms + +HTML-faithful form controls land: text inputs, checkbox, radio, and select. They bind to state through `@input` and `@submit`, and the event carries the control's value. + +```zo +load core::zsx::*; + +fun main() { + mut text: str = ""; + + imu view: ::= text = event.value} + />; + + #render view; +} +``` + +## naming-convention warnings + +`zo-checker` now warns when a name strays from zo's conventions: a function or variable that isn't `snake_case`, a type that isn't `PascalCase`. It is a warning, not an error. It nudges, it doesn't block. + +## diagnostics and developer experience + +Diagnostics gain a third audience. Alongside human and JSON, `--format=xml` emits a form built for agents. Color is TTY-aware, and you can suppress it. `-q` / `--quiet` drops the build banner, `--help` leads with examples, exit codes map to failure modes, and build status moves to stderr, the way Cargo does it, so a program's own output stays clean on stdout. + +An agent reads the same diagnostic as XML, one well-formed document, isomorphic to the JSON: + +```xml + + + Cannot mutate immutable variable + + + mut + Declare the variable as mutable with `mut` + + + + +``` + +> *The document also carries the source `` and the primary `` (byte, line, and column), so an agent locates and applies the fix without parsing prose.* + +## language and internals + +One arrow: `=:>` is gone. The `arr` pack becomes `array`. diff --git a/apps/site/src/content/news/fr/S01/S01E01-05-01-2026.md b/apps/site/src/content/news/fr/S01/S01E01-05-01-2026.md new file mode 100644 index 00000000..173b7b39 --- /dev/null +++ b/apps/site/src/content/news/fr/S01/S01E01-05-01-2026.md @@ -0,0 +1,39 @@ +# S01E01 — 05-01-2026. + +> *zo 0.1.0 — Skrrrt-Skuuu!* + +La première version de zo est disponible. Cette idée est né par l'absence d'un langage de templating intégré au au sein des languages de programmation modernes. zo puise sont inspiration principale d'`es4` et `E4X`. Ce projet a été abandonné. Voici à quoi il ressemblait : + + ```js + let sales = + + + + ; + + alert(sales.item.(@type == "carrot").@quantity); + alert(sales.@vendor); + for each(let price in sales..@price) { + alert(price); + } + ``` + +> *Source — [ECMAScript for XML](https://en.wikipedia.org/wiki/ECMAScript_for_XML) — wikipedia* + +Tout part d'ici, zo intègre une extension de syntaxe surnommé zsx. Cette extension permet de déclarer des composants typés et de cibler différentes platformes Desktop, Mobile et Web à partir du même code source : + + ```zo + fun main() { + mut count: int = 0; + + imu counter: ::= <> + + {count} + + ; + + #render counter; + } + ``` + +Ceci n'est qu'une facette de zo, derrière le champ des possibles permet de créer tout types d'applications. Pour en savoir plus je t'invite à suivre l'[initiation](https://zo.compilords.house/initiation). diff --git a/apps/site/src/content/spec/en/spec.md b/apps/site/src/content/spec/en/spec.md new file mode 100644 index 00000000..548fad6d --- /dev/null +++ b/apps/site/src/content/spec/en/spec.md @@ -0,0 +1,747 @@ +# The zo Programming Language Specification. + +> *Turn your thoughts into type-safe software and Ui instantly.* + +This reference manual is for the zo programming language. + +@author — invisageable +@author — compilords + +## Disclaimer + +> *zo is in early development. We are opening gates, testing some paths. Changes will be made, certain parts work, certain parts don't. Some of them will be removed.* +> +> *Some features described in this manual may not be available yet. It crafts the foundation as a draft. This document is not the final specification.* +> +> *For any suggestion, keep your focus on reductions to the language. What feature can be combined or omitted? At this point, every ``additive'' feature we're likely to support is already on the table. The task ahead involves combining, trimming, and implementing.* + +## Introduction + +zo is a child of Rust-prehistory — Graydon Hoare's original Rust — and inherits most of its concepts and philosophy. It is no imitation: zo departs from Rust as it stands today and finds its own niche in zsx (zo Syntax Extension), a builtin for composing cross-platform user interfaces. It is a general-purpose language, suited to building and maintaining applications of any kind. + +zo mixes imperative, functional, and concurrent code in a single program. Its concurrency follows communicating sequential processes (CSP): lightweight tasks each keep their own state and coordinate over channels, never through shared memory. Generics and compile-time metaprogramming are built in, and a foreign function interface reaches C directly. + +### Goals + +zo is built around a few aims: + + - Compile millions of lines a second. + - Catch whole classes of error before a program runs. + - Emit diagnostics that people and machines both read. + - Keep a failure to the task that raised it. + - Draw one cross-platform interface from a single source. + - Run many tasks at once. + - Ship a standard library with the common tools included. + - Express intent clearly and precisely. + - Keep the compiler simple. + - Run programs efficiently. + +> *NOTE — the methods behind these goals are proven, not experimental — other languages already ship them. zo's wager is that the right techniques, well combined and made fast, outdo new theory.* + +zo is built for the problems of its moment: software that runs unchanged on native targets and the web, that treats the interface as part of the program, and that people and machines read and write together. Those pressures place safety, concurrency, and the developer's experience at the center of the design. + +### Features + +The sections below highlight zo's most notable features, set against how other languages solve the same problems. + + - **No Null, No Raw Pointers** + + zo has **no null value**. Where another language returns null to mean "nothing here", zo returns `Option` — `Some(T)` or `None` — so the absence shows up in the type. You cannot reach the value without matching both cases, so a null dereference is not a mistake you can make in zo. The same idea appears as `Maybe` in Elm and `option` in ML. + + zo has **no raw pointers** either: no pointer arithmetic, no address-of-local, nothing to leave dangling. + + - **Lightweight Tasks and Channels** + + zo runs work as tasks — **lightweight threads** that the language runtime schedules itself. Tasks are cheap to create, and their stacks grow on demand, so each starts small. `spawn f(x)` starts a green task — `spawn thread f(x)` puts the work on its own OS thread. Every `spawn` belongs to a `nursery`, a scope that waits for the tasks inside it to finish before control moves on. + + Tasks usually coordinate through **channels**. `channel()` returns a sender and a receiver — `Tx` and `Rx` — so one task calls `send` while another calls `recv`, and `select` waits on several channels at once. This is the model Go and Newsqueak use. zo's prime sieve is the chain of filter stages Rob Pike first wrote in Newsqueak. + + Shared memory is still allowed where it pays off. A single `Vec` can pass into several tasks that each write a separate region — useful for splitting a grid across workers — though zo leaves it to you to keep those regions disjoint. + + - **zsx — Ui as a builtin** + + Most languages reach for a separate framework to build a user interface. zo builds one in. zsx — the zo Syntax Extension — lets you write interface markup directly in source: elements like `