diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0db8d0 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +_cache/ diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..2eaf4f3 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "manual"] + path = manual + url = https://rikspucko.koketteriet.se/bjoli/BjoManual.git diff --git a/_resources/glasnost.css b/_resources/glasnost.css new file mode 100644 index 0000000..d87410c --- /dev/null +++ b/_resources/glasnost.css @@ -0,0 +1,3 @@ +/* The logotype on the front page: centred, and no wider than the column. */ +.logo { text-align: center; margin: 1em 0 2em; } +.logo img { max-width: 12em; height: auto; } diff --git a/bjolang-logo.svg b/_resources/logo.svg similarity index 100% rename from bjolang-logo.svg rename to _resources/logo.svg diff --git a/index.sz b/index.sz new file mode 100644 index 0000000..686a3e3 --- /dev/null +++ b/index.sz @@ -0,0 +1,29 @@ +(meta (title "Bjolang") + (listing? #f)) + +@div["logo"]{@image["/_resources/logo.svg" #:alt "Bjolang"]} + +Bjolang is a Lisp for .NET. It has types that are inferred, unions that are +matched exhaustively, traits, hygienic macros, and bjoroutines, and it +compiles to C#. + +@codeblock[#:lang "bjolang"]|{ +(import (std prelude)) + +(type (: Shape (Union (: Circle double) + (: Rect double double)))) + +(: area (-> Shape double)) +(defun (area shape) + (match shape + ((Circle r) (* 3.14159 (* r r))) + ((Rect w h) (* w h)))) + +(defun (main args) + (loop (:for s [(Circle 1.0) (Rect 2.0 3.0)]) + (:do (println #"area: ${(area s)}"))) + 0) +}| + +@link["manual/"]{Read the manual}, or go straight to the +@link["manual/modules/"]{library reference}. diff --git a/manual b/manual new file mode 160000 index 0000000..27c7d64 --- /dev/null +++ b/manual @@ -0,0 +1 @@ +Subproject commit 27c7d646415f30cc43113fc2440b61886e9b7e7d8950aea03e72c8e4d1b5280a