Numbered headings
The manual numbers its parts, sections and subsections, 1, 1.1, 1.1.1, in its table of contents too. The titles that numbered themselves no longer do: Part III is "The standard library", 3, and the appendices are 4.1 to 4.4 rather than A to D. The std/random section after the appendices is gone; Part III has it. 🤖 Generated with [ECA](https://eca.dev) Co-Authored-By: eca-agent <git@eca.dev>
This commit is contained in:
parent
7ed3b382ee
commit
6cd4628e02
3 changed files with 6 additions and 9 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
@section{Part III — The standard library}
|
@section{The standard library}
|
||||||
|
|
||||||
A short tour of the standard library. Each module's full reference is its own page under @link["modules/index.html"]{Modules}.
|
A short tour of the standard library. Each module's full reference is its own page under @link["modules/index.html"]{Modules}.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
@section{Appendices}
|
@section{Appendices}
|
||||||
|
|
||||||
@subsection{Appendix A — Coming from Scheme or ML}
|
@subsection{Coming from Scheme or ML}
|
||||||
|
|
||||||
Bjolang sits at the crossroads of two major functional programming lineages. From the Scheme and Lisp tradition, it draws its uniform S-expression syntax, prefix notation, code-as-data perspective, and hygienic macro system. From the ML family—specifically OCaml and F#—it inherits static Hindley-Milner type inference, algebraic data types, compile-time exhaustiveness checking, traits, and high-performance immutable data structures.
|
Bjolang sits at the crossroads of two major functional programming lineages. From the Scheme and Lisp tradition, it draws its uniform S-expression syntax, prefix notation, code-as-data perspective, and hygienic macro system. From the ML family—specifically OCaml and F#—it inherits static Hindley-Milner type inference, algebraic data types, compile-time exhaustiveness checking, traits, and high-performance immutable data structures.
|
||||||
|
|
||||||
|
|
@ -50,7 +50,7 @@ The main shifts you will encounter coming from ML are:
|
||||||
- Automatic colour twins: In many typed asynchronous languages, asynchronous functions have distinct types (@code{Task<'T>} or @code{Async<'T>}) that cannot be passed to standard higher-order functions like @code{List.map} without creating asynchronous duplicates (@code{List.mapAsync}). Bjolang solves this "function colouring problem" at the compiler level: higher-order functions declaring @code{-?->} parameters automatically generate both synchronous and suspending twins, allowing the exact same @code{list-map} to be used whether your callback performs I/O or pure computation.
|
- Automatic colour twins: In many typed asynchronous languages, asynchronous functions have distinct types (@code{Task<'T>} or @code{Async<'T>}) that cannot be passed to standard higher-order functions like @code{List.map} without creating asynchronous duplicates (@code{List.mapAsync}). Bjolang solves this "function colouring problem" at the compiler level: higher-order functions declaring @code{-?->} parameters automatically generate both synchronous and suspending twins, allowing the exact same @code{list-map} to be used whether your callback performs I/O or pure computation.
|
||||||
}
|
}
|
||||||
|
|
||||||
@subsection{Appendix B — Reading compiler errors}
|
@subsection{Reading compiler errors}
|
||||||
|
|
||||||
Bjolang's frontend is designed to catch structural, typing, and concurrency errors early, providing descriptive diagnostics that point directly to the source of the problem before code reaches the C# compiler. Below are some of the most common compiler messages you will encounter, what causes them, and how to resolve them.
|
Bjolang's frontend is designed to catch structural, typing, and concurrency errors early, providing descriptive diagnostics that point directly to the source of the problem before code reaches the C# compiler. Below are some of the most common compiler messages you will encounter, what causes them, and how to resolve them.
|
||||||
|
|
||||||
|
|
@ -246,7 +246,7 @@ When compiled, the macro expander reports:
|
||||||
(def/thunk answer 42)
|
(def/thunk answer 42)
|
||||||
}|
|
}|
|
||||||
|
|
||||||
@subsection{Appendix C — How it compiles}
|
@subsection{How it compiles}
|
||||||
|
|
||||||
Bjolang targets the .NET 10 CLR by compiling to readable, high-performance C# 12 code, which is then compiled into managed assemblies by the Roslyn compiler. Rather than running an interpreter or emitting raw IL bytes, compiling through C# allows Bjolang to leverage RyuJIT's advanced optimization pipeline, benefit from modern runtime features like value types and spans, and interoperate seamlessly with the broader .NET ecosystem.
|
Bjolang targets the .NET 10 CLR by compiling to readable, high-performance C# 12 code, which is then compiled into managed assemblies by the Roslyn compiler. Rather than running an interpreter or emitting raw IL bytes, compiling through C# allows Bjolang to leverage RyuJIT's advanced optimization pipeline, benefit from modern runtime features like value types and spans, and interoperate seamlessly with the broader .NET ecosystem.
|
||||||
|
|
||||||
|
|
@ -363,7 +363,7 @@ When you run @code{bjo run game.bjo} again:
|
||||||
|
|
||||||
You can pass @code{-c} to force an unconditional rebuild, or @code{-d} to create an unoptimized debug build with AST and generated C# dumps.
|
You can pass @code{-c} to force an unconditional rebuild, or @code{-d} to create an unoptimized debug build with AST and generated C# dumps.
|
||||||
|
|
||||||
@subsection{Appendix D — Editor support}
|
@subsection{Editor support}
|
||||||
|
|
||||||
Editing Bjolang code is most pleasant in Emacs, where specialized major modes support both Bjolang source files and Samizdat documentation.
|
Editing Bjolang code is most pleasant in Emacs, where specialized major modes support both Bjolang source files and Samizdat documentation.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,10 @@
|
||||||
(meta (title "The Bjolang manual")
|
(meta (title "The Bjolang manual")
|
||||||
(date "2026-09-29"))
|
(date "2026-09-29"))
|
||||||
|
|
||||||
|
@numbered-headings
|
||||||
@toc[#:depth 3]
|
@toc[#:depth 3]
|
||||||
|
|
||||||
@include["_01.Language-basics.sz"]
|
@include["_01.Language-basics.sz"]
|
||||||
@include["_02_.Writing-programs.sz"]
|
@include["_02_.Writing-programs.sz"]
|
||||||
@include["_03.Standard-library.sz"]
|
@include["_03.Standard-library.sz"]
|
||||||
@include["_04.Appendices.sz"]
|
@include["_04.Appendices.sz"]
|
||||||
|
|
||||||
@subsection{std/random}
|
|
||||||
|
|
||||||
@defmodule[(std random)]
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue