docs: reflow all markdown files to 80-char width and add control-flow page with branching/looping content
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
^title Getting Started
|
||||
|
||||
Getting Wren up and running on your machine should be pretty straightforward. Tiny C programs with no dependencies are nice that way. If you're on a Unix or Mac and you can rock a command line, it's just:
|
||||
Getting Wren up and running on your machine should be pretty straightforward.
|
||||
Tiny C programs with no dependencies are nice that way. If you're on a Unix or
|
||||
Mac and you can rock a command line, it's just:
|
||||
|
||||
:::bash
|
||||
$ git clone https://github.com/munificent/wren.git
|
||||
@@ -8,13 +10,20 @@ Getting Wren up and running on your machine should be pretty straightforward. Ti
|
||||
$ make
|
||||
$ ./wren
|
||||
|
||||
For Mac users, there is also an XCode project in the repo that you can use to hack on Wren. That's what I develop in. It builds fine from there but *may* not have the exact same build settings. The Makefile is the canonical way to compile it.
|
||||
For Mac users, there is also an XCode project in the repo that you can use to
|
||||
hack on Wren. That's what I develop in. It builds fine from there but *may* not
|
||||
have the exact same build settings. The Makefile is the canonical way to
|
||||
compile it.
|
||||
|
||||
For our Windows bretheren, there's still a little work to be done. Ideally, the repo would include a Visual Studio solution for building Wren. I don't have a Windows machine, but if you do, I would be delighted to take a patch for this.
|
||||
For our Windows bretheren, there's still a little work to be done. Ideally, the
|
||||
repo would include a Visual Studio solution for building Wren. I don't have a
|
||||
Windows machine, but if you do, I would be delighted to take a patch for this.
|
||||
|
||||
## Interactive mode
|
||||
|
||||
The above instructions will drop you into Wren's standalone interpreter in interactive mode. You can type in a line of code, and it will immediately execute it. Here's something to try:
|
||||
The above instructions will drop you into Wren's standalone interpreter in
|
||||
interactive mode. You can type in a line of code, and it will immediately
|
||||
execute it. Here's something to try:
|
||||
|
||||
:::dart
|
||||
IO.print("Hello, world!")
|
||||
@@ -24,11 +33,14 @@ Or a little more exciting:
|
||||
:::dart
|
||||
for (i in 1..10) IO.print("Counting up ", i)
|
||||
|
||||
You can exit the interpreter using good old Ctrl-C or Ctrl-D, or just throw your computer to the ground and storm off.
|
||||
You can exit the interpreter using good old Ctrl-C or Ctrl-D, or just throw
|
||||
your computer to the ground and storm off.
|
||||
|
||||
## Running scripts
|
||||
|
||||
The standalone interpreter can also load scripts from files and run them. Just pass the name of the script to wren. Create a file named "my_script.wren" in your favorite text editor and paste this into it:
|
||||
The standalone interpreter can also load scripts from files and run them. Just
|
||||
pass the name of the script to wren. Create a file named "my_script.wren" in
|
||||
your favorite text editor and paste this into it:
|
||||
|
||||
:::dart
|
||||
for (yPixel in 0...24) {
|
||||
@@ -56,9 +68,11 @@ Now run:
|
||||
:::bash
|
||||
$ ./wren my_script.wren
|
||||
|
||||
Neat, right? You're a Wren programmer now! The next step is to [read more docs](syntax.html) and learn your way around the language. If you run into bugs, or have ideas or questions, any and all of the following work:
|
||||
Neat, right? You're a Wren programmer now! The next step is to [read more
|
||||
docs](syntax.html) and learn your way around the language. If you run into
|
||||
bugs, or have ideas or questions, any and all of the following work:
|
||||
|
||||
* Tell me on twitter at [`@munificentbob`](https://twitter.com/intent/user?screen_name=munificentbob).
|
||||
* Tell me on twitter at [@munificentbob](https://twitter.com/intent/user?screen_name=munificentbob).
|
||||
* [File a ticket](https://github.com/munificent/wren/issues) at [the GitHub repo](https://github.com/munificent/wren).
|
||||
* Send a pull request.
|
||||
* Email me at [`bob@stuffwithstuff.com`](mailto:bob@stuffwithstuff.com).
|
||||
* Email me at [`robert@stuffwithstuff.com`](mailto:robert@stuffwithstuff.com).
|
||||
|
||||
Reference in New Issue
Block a user