proper english

This commit is contained in:
Linus Björnstam 2026-10-26 09:54:53 +01:00
parent d05f4c91dd
commit 2334da2516
3 changed files with 7 additions and 7 deletions

View file

@ -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.