diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 00000000..101ed8f7 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,5 @@ +This is the (likely imcomplete) list of people who have made Wren what it is. +If you submit a patch to Wren, please add your name and email address to the +end of this list. + +Robert Nystrom \ No newline at end of file diff --git a/README.md b/README.md index 9cc916da..87a2b30f 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,27 @@ -Wren is a *small, clean, fast, class-based scripting language.* Think Smalltalk -in a Lua-sized package. +## Wren is a small, fast, class-based concurrent scripting language + +Think Smalltalk in a Lua-sized package with a dash of Erlang and wrapped up in +a familiar, modern [syntax][]. ```dart IO.print("Hello, world!") class Wren { - adjectives { ["small", "clean", "fast"] } - languageType { "scripting" } + flyTo(city) { + IO.print("Flying to ", city) + } } + +var adjectives = new Fiber { + ["small", "clean", "fast"].map {|word| Fiber.yield(word) } +} + +while (!adjectives.isDone) IO.print(adjectives.call) ``` - * **Wren is small.** The codebase is under 4,000 semicolons which keeps the - language and libraries small enough to fit in your head. You can skim - [the whole thing][src] in one sitting. - - * **Wren is clean.** The codebase is *small*, but not *dense*. It is readable - and [lovingly-commented][nan]. It's written in warning-free standard C99. + * **Wren is small.** The codebase is about [5,000 lines][src]. You can + skim the whole thing in an afternoon. It's *small*, but not *dense*. It + is readable and [lovingly-commented][nan]. * **Wren is fast.** A fast single-pass compiler to tight bytecode, and a compact object representation help Wren [compete with other dynamic @@ -25,12 +31,24 @@ class Wren { but many have unusual or non-existent object models. Wren places [classes][] front and center. + * **Wren is concurrent.** Lightweight [fibers][] are core to the execution + model and let you organize your program into an army of communicating + coroutines. + * **Wren is a scripting language.** Wren is intended for embedding in applications. It has no dependencies, a small standard library, - and [an easy-to-use C API][embedding]. + and [an easy-to-use C API][embedding]. It's written in warning-free + standard C99. +If you like the sound of this, [give it a try][try]! Even better, you can +[contribute to Wren itself][contribute]. + +[syntax]: http://munificent.github.io/wren/syntax.html [src]: https://github.com/munificent/wren/tree/master/src [nan]: https://github.com/munificent/wren/blob/46c1ba92492e9257aba6418403161072d640cb29/src/wren_value.h#L378-L433 [perf]: http://munificent.github.io/wren/performance.html [classes]: http://munificent.github.io/wren/classes.html +[fibers]: http://munificent.github.io/wren/fibers.html [embedding]: http://munificent.github.io/wren/embedding-api.html +[try]: http://munificent.github.io/wren/getting-started.html +[contribute]: http://munificent.github.io/wren/contributing.html \ No newline at end of file diff --git a/doc/site/contributing.markdown b/doc/site/contributing.markdown index acbc8aa7..009f9083 100644 --- a/doc/site/contributing.markdown +++ b/doc/site/contributing.markdown @@ -2,22 +2,71 @@ ^category reference It should be obvious by now that Wren is under active development and there's -lots left to do. I'd be delighted to have your help. +lots left to do. I am delighted to have you participate. Wren uses the OSI-approved [MIT license][mit]. I'm not sure exactly what that means, but I went with the most permissive license I could find. The source is developed [on GitHub][github]. My hope is that the codebase, -tests, and documentation are easy to understand and contribute to. If they -aren't, that's a bug. If you're looking for somewhere to get started, try -writing some example programs in Wren and see what rough spots you run into. -You can also look through to code for `// TODO` or help improve -[these docs][docs]. +tests, and [documentation][docs] are easy to understand and contribute to. If +they aren't, that's a bug. -If you have questions, feel free to [file an issue][issue] or email me -(`robert` at `stuffwithstuff.com`). +## Finding something to hack on + +Eventually, the [issue tracker][issue] will be populated with a more complete +set of changes and features I have in mind. Until then, one easy way to find +things that need doing is to look for `TODO` comments in the code. + +Also, writing code in Wren and seeing what problems you run into is incredibly +helpful. Embedding Wren in an application will also exercise lots of corners of +the system and highlight problems and missing features. + +Of course, new ideas are also welcome as well! If you have an idea for a +significant change or addition, please do get in touch first before writing +lots of code to make sure your idea will be a good fit. + +## Making a change + +The basic process is simple: + +1. **Make sure you can build and run the tests locally.** It's good to ensure + you're starting from a happy place before you poke at the code. Running the + tests is as simple as: + + :::sh + $ make test + + If there are no failures, you're good to go. + +2. **[Fork the repo][fork] so you can change it locally.** Please make your + changes in a separate [feature branches][] to make things a little easier on + me. + +3. **Change the code.** Please follow the style of the surrounding code. That + basically means `camelCase` names, `{` on the next line, keep within 80 + columns, and two spaces of indentation. If you see places where the existing + code is inconsistent, let me know. + +4. **Write some tests for your new functionality.** They live under `test/`. + Take a look at some existing tests to get an idea of how to define + expectations. + +5. **Make sure the tests all pass, both the old ones and your new ones.** + +6. **Add your name and email to the [AUTHORS][] file if you haven't already.** + +7. **Send a [pull request][].** Pat yourself on the back for contributing to a + fun open source project! I'll take it from here and hopefully we'll get it + landed smoothly. + +If at any point you have questions, feel free to [file an issue][issue] or +email me (`robert` at `stuffwithstuff.com`). *Thank you!* [mit]: http://opensource.org/licenses/MIT [github]: https://github.com/munificent/wren +[fork]: https://help.github.com/articles/fork-a-repo/ [docs]: https://github.com/munificent/wren/tree/master/doc/site -[issue]: https://github.com/munificent/wren/issues \ No newline at end of file +[issue]: https://github.com/munificent/wren/issues +[feature branches]: https://www.atlassian.com/git/tutorials/comparing-workflows/centralized-workflow +[authors]: https://github.com/munificent/wren/tree/master/AUTHORS +[pull request]: https://github.com/munificent/wren/pulls diff --git a/doc/site/index.markdown b/doc/site/index.markdown index 0e538893..e328c4f2 100644 --- a/doc/site/index.markdown +++ b/doc/site/index.markdown @@ -41,6 +41,9 @@ a familiar, modern [syntax][]. and [an easy-to-use C API][embedding]. It's written in warning-free standard C99. +If you like the sound of this, [give it a try][try]! Even better, you can +[contribute to Wren itself][contribute]. + [syntax]: syntax.html [src]: https://github.com/munificent/wren/tree/master/src [nan]: https://github.com/munificent/wren/blob/46c1ba92492e9257aba6418403161072d640cb29/src/wren_value.h#L378-L433 @@ -48,3 +51,5 @@ a familiar, modern [syntax][]. [classes]: classes.html [fibers]: fibers.html [embedding]: embedding-api.html +[try]: getting-started.html +[contribute]: contributing.html \ No newline at end of file