shithub: limbobyexample

Download patch

ref: b91b86a9b63f3a767c8cbf9c46a794fb00a86883
parent: a441e96695c14e570905835af9157b7b3d17e82e
author: seh <henesy.dev@gmail.com>
date: Mon Feb 25 08:49:59 EST 2019

add hello world

diff: cannot open b/HelloWorld//null: file does not exist: 'b/HelloWorld//null'
--- /dev/null
+++ b/.gitignore
@@ -1,0 +1,2 @@
+*.sbl
+*.dis
--- /dev/null
+++ b/HelloWorld/hello.b
@@ -1,0 +1,15 @@
+implement Hello;
+
+include "sys.m";
+include "draw.m";
+
+Hello: module {
+	init:	fn(nil: ref Draw->Context, nil: list of string);
+};
+
+init(nil: ref Draw->Context, nil: list of string) {
+	sys := load Sys Sys->PATH;
+
+	sys->print("Hello World! ☺\n");
+	exit;
+}
--- a/README.md
+++ b/README.md
@@ -4,6 +4,22 @@
 
 These exercises are tested on the [purgatorio](http://code.9front.org/hg/purgatorio/) fork of the Inferno operating system.
 
+The `;` rune in examples indicates a command to be run from the Inferno sh(1) shell. 
+
+## Building
+
+If a given example provides a mkfile:
+
+	; mk
+
+Otherwise, there will only be one file, a Limbo source file which can be built with:
+
+	; limbo file.b
+
+You could then run said file with:
+
+	; file
+
 ## Index
 
 [Hello World](./HelloWorld)