diff --git a/_01.Language-basics.sz b/_01.Language-basics.sz index bc3721a..db3e2f2 100644 --- a/_01.Language-basics.sz +++ b/_01.Language-basics.sz @@ -1,6 +1,26 @@ @section{Getting started} -Bjolang needs only two things: dotnet 10 and an f# compiler. Once those are installed you build the compiler using dotnet build -c Release, run ./build_std.sh and ./run_tests.py and ./run_bjo_tests.py in the main directory. Then you can use the bjo executable in the bjo directory. Personally I alias a shell command to the path of bjo, since there currently is no way to install it properly. +Bjolang is only installed from source. There are no releases or packages: you clone the repository at @link["https://github.com/bjoli/Bjolang"]{github.com/bjoli/Bjolang} and build it where it is. + +It needs only two things: dotnet 10 and an f# compiler. The .NET 10 SDK comes with both. Once that is installed, clone the repository and build the runtime, the compiler and the standard library: + +@codeblock[#:lang "text"]|{ +git clone https://github.com/bjoli/Bjolang +cd Bjolang +dotnet build BjolangRuntime/BjolangRuntime.csproj -c Release +dotnet build -c Release +./build_std.sh +}| + +If you want to make sure everything works, run @code{./run_tests.py} and @code{./run_bjo_tests.py} in the same directory. Then you can use the bjo executable in the bjo directory: @code{./bjo/bjo run hello.bjo}. Personally I alias a shell command to the path of bjo, since there currently is no way to install it properly. Compiled programs find the standard library in the directory you built it in, so leave the checkout where it is. + +To update, pull and build again: + +@codeblock[#:lang "text"]|{ +git pull +./bjo/bjo rebjo +./build_std.sh +}| @subsection{Your first bjolang program} @@ -61,7 +81,7 @@ This can then be destructed using pattern matching. @subsubsection{Editor support} -Bjolang was written in emacs, and emacs is currently the only editor with limited bjolang support through the file bjomode.el in the main github repository. It lacks any fancy things, but handles a modicum of indentation and syntax highlighting. +Bjolang was written in emacs, and emacs is currently the only editor with limited bjolang support through the file bjomode.el in the @link["https://github.com/bjoli/Bjolang"]{main github repository}. It lacks any fancy things, but handles a modicum of indentation and syntax highlighting. @subsection{Values, types and signatures}