From 2334da2516ae5bcd8d264b04b238ac25852e67415e451649d38bdf2a2c4473c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20Bj=C3=B6rnstam?= Date: Mon, 26 Oct 2026 09:54:53 +0100 Subject: [PATCH] proper english --- _01.Language-basics.sz | 2 +- _02_.Writing-programs.sz | 10 +++++----- _04.Appendices.sz | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/_01.Language-basics.sz b/_01.Language-basics.sz index e71b7b8..ca23c14 100644 --- a/_01.Language-basics.sz +++ b/_01.Language-basics.sz @@ -197,7 +197,7 @@ If you keep something on purpose, start its name with an underscore: @code{(def Bjolang follows scheme's naming conventiens. Predicates end with @code{?}. Mutating functions end with @code{!}. Conversions are written using @code{->}. -While the base types are lowercase (which is a design mishap), types should be capitalized. Record and struct fields are lower case. +While the base types are lowercase (which is a design mishap), types should be capitalised. Record and struct fields are lower case. @subsection{Functions} diff --git a/_02_.Writing-programs.sz b/_02_.Writing-programs.sz index 2853270..4fc9eb7 100644 --- a/_02_.Writing-programs.sz +++ b/_02_.Writing-programs.sz @@ -256,7 +256,7 @@ As a general guideline: use @code{include} when you want to divide a single larg @subsection{Projects and packages} -Up to this point, our programs have consisted of standalone files importing neighboring modules directly by relative path. While that approach is convenient for quick scripts and small experiments, any software that pulls in external dependencies or is meant to be consumed by other developers should be structured as a project. +Up to this point, our programs have consisted of standalone files importing neighbouring modules directly by relative path. While that approach is convenient for quick scripts and small experiments, any software that pulls in external dependencies or is meant to be consumed by other developers should be structured as a project. A project is simply a directory containing a @code{manifest.bjodat} file. When operating inside a project directory, @code{bjo} understands the package's identity, resolves dependencies, and manages builds automatically. Outside of a project, the CLI falls back to single-file execution just as before. @@ -985,7 +985,7 @@ Functions that may suspend execution—whether waiting on a channel, sleeping, o Bjoroutines execute as lightweight fibers scheduled across a managed thread pool. When a fiber suspends at a @code{sync} point, it yields its underlying thread back to the pool. As a result, maintaining thousands of waiting fibers incurs the memory overhead of small heap objects rather than expensive OS threads. -Because calling a suspending function means the caller may also have to wait, function coloring applies: bjoroutines can only be directly invoked from within other bjoroutines: +Because calling a suspending function means the caller may also have to wait, function colouring applies: bjoroutines can only be directly invoked from within other bjoroutines: @codeblock[#:lang "text"]|{ Type Error at colour.bjo:7: calling 'think' is a yield point, and a yield point is not allowed here. @@ -997,7 +997,7 @@ Type Error at colour.bjo:7: calling 'think' is a yield point, and a yield point To enter concurrent execution from the start, @code{main} can itself be defined with @code{defbjo}. -In practice, this coloring is less infectious than in many other languages. Most standard I/O functions (such as @code{file-read-text}) are automatically emitted with dual implementations: a synchronous blocking path and an asynchronous suspending path. An ordinary @code{defun} that calls standard I/O similarly gets both versions generated under the hood; when called from a bjoroutine, it transparently executes the non-blocking suspending version: +In practice, this colouring is less infectious than in many other languages. Most standard I/O functions (such as @code{file-read-text}) are automatically emitted with dual implementations: a synchronous blocking path and an asynchronous suspending path. An ordinary @code{defun} that calls standard I/O similarly gets both versions generated under the hood; when called from a bjoroutine, it transparently executes the non-blocking suspending version: @codeblock[#:lang "bjolang"]|{ (: size-of (-> string int)) @@ -1162,7 +1162,7 @@ Cancellation in Bjolang is cooperative rather than preemptive. Cancelling a scop Depending on the desired lifecycle and supervision strategy, fibers can be started using four distinct forms: @read-table{ -| Form | Scope behavior | +| Form | Scope behaviour | |------------------------------------+----------------------------------------------------------| | @code{(spawn (f x))} | Awaited by scope; propagates failure on error | | @code{(bjo (f x))} | Awaited by scope; yields a promise holding value/failure | @@ -1773,7 +1773,7 @@ In this expansion, the internal counter variable @code{count} is generated hygie @subsubsection{Pattern macros: def/pattern} -The @code{def/pattern} form defines macros intended for use within pattern-matching positions rather than ordinary expressions. Nullary pattern macros can be referenced simply by their bare capitalized name: +The @code{def/pattern} form defines macros intended for use within pattern-matching positions rather than ordinary expressions. Nullary pattern macros can be referenced simply by their bare capitalised name: @codeblock[#:lang "bjolang"]|{ ;; Face matches a jack, a queen or a king. diff --git a/_04.Appendices.sz b/_04.Appendices.sz index 0f5bdbf..5f200a9 100644 --- a/_04.Appendices.sz +++ b/_04.Appendices.sz @@ -377,7 +377,7 @@ Key editing features and keybindings include: @subsection{Why it is a sad world on dotnet} -The reason bjolang runs on dotnet is mostly because of inertia. I had a lot of code already written for c#, and reimplementing RRB trees or CHAMPs in ocaml is nothing I felt like doing. Running on dotnet comes with tradeoffs, most notably function colouring. Had I gone with ocaml5, I would have gotten effect handlers, which means delimited control, which means everything can potentially be a bjoroutine. Now I have async, which means colouring and compiling functions in two ways and sad faces all the way down. +The reason bjolang runs on dotnet is mostly because of inertia. I had a lot of code already written for c#, and reimplementing RRB trees or CHAMPs in ocaml is nothing I felt like doing. Running on dotnet comes with tradeoffs, most notably function colouring. Had I gone with ocaml5, I would have got effect handlers, which means delimited control, which means everything can potentially be a bjoroutine. Now I have async, which means colouring and compiling functions in two ways and sad faces all the way down. The longer I have come with bjolang, the more I have started looking sideways at ocaml. When it comes to selecting abstractions, ocaml and racket are somehow almost always spot on, which means my main design guideline is "when in doubt, look at ocaml/racket/(guile)". A lot of the things that were not implemented in bjolang are things that simply were too expensive on dotnet, but more or less free on ocaml.