Commit Graph
930 Commits
Author SHA1 Message Date
Luchs f132f59649 Add syntax example file 2015-04-25 18:10:17 +02:00
Bob Nystrom 4147ef2500 Merge pull request #259 from minirop/import-keyword
added missing "import" keyword
2015-04-22 07:46:13 -07:00
Bob Nystrom 7c1ede0a3d Merge branch 'master' of https://github.com/munificent/wren 2015-04-22 07:45:39 -07:00
Bob Nystrom bfce24151e Tweak docs. 2015-04-22 07:45:20 -07:00
Bob Nystrom fea844382f Merge branch 'doc-todos' of git://github.com/gsmaverick/wren into gsmaverick-doc-todos 2015-04-22 07:22:42 -07:00
Bob Nystrom 9f30400b7d Merge pull request #258 from patriciomacadden/fix-typo
fix typo: orde => order
2015-04-22 07:21:13 -07:00
Bob Nystrom 732dd18019 Merge pull request #256 from bjorn/toList_docs
Some documentation updates
2015-04-22 07:19:00 -07:00
minirop 701e97510a added missing "import" keyword 2015-04-19 23:13:40 +02:00
Gavin Schulz c3497ee840 Code review changes. 2015-04-19 13:32:15 -07:00
Patricio Mac Adden 512500be17 fix typo: orde => order 2015-04-17 23:13:36 -03:00
Thorbjørn Lindeijer d59031d614 Some documentation updates
Some Sequence.list references remained after it was renamed to
Sequence.toList.
2015-04-06 17:21:32 +02:00
Bob Nystrom e4f3072460 Merge branch 'master' of https://github.com/munificent/wren 2015-04-06 06:53:59 -07:00
Bob Nystrom ef06eed680 Minor clean-ups. 2015-04-06 06:53:53 -07:00
Bob Nystrom 94f7993bd2 Merge pull request #255 from patriciomacadden/add-myself-to-authors
Add myself to AUTHORS
2015-04-06 06:45:11 -07:00
Patricio Mac Adden 6d2cbcf3b6 Add myself to AUTHORS 2015-04-05 19:52:12 -03:00
Gavin Schulz d0bebbd380 Add docs for fiber.call. 2015-04-04 16:50:40 -07:00
Gavin Schulz 1cd83eccbc Add docs for fn.call. 2015-04-04 15:29:10 -07:00
Gavin Schulz e754fcc49f Add docs for list.insert. 2015-04-04 15:23:16 -07:00
Bob Nystrom bb3de9eeba Don't confuse the GC if a collection occurs after a compile error. 2015-04-03 23:12:14 -07:00
Bob Nystrom 82ce1d8be9 Fix up Meta.eval(_).
- Made it use primitives instead of foreign functions.
- This fixed an issue where the interpreter loop was running re-entrantly.
- Which in turn fixed a GC bug.
- Report a runtime error if the argument isn't a string.
- Report a runtime error if the source doesn't compile.
2015-04-03 21:22:58 -07:00
Bob Nystrom 9ffdc09672 Merge pull request #252 from lluchs/broken-link
Fix broken link to wren.h
2015-04-03 18:51:21 -07:00
Bob Nystrom 455196db81 Merge pull request #249 from lluchs/clang-absolute-value
Fix warning in clang 3.5 (-Wabsolute-value)
2015-04-03 18:38:10 -07:00
Luchs 62e76a5780 Fix broken link to wren.h 2015-04-04 00:51:42 +02:00
Bob Nystrom 75a3051fae .list -> .toList
Fix #248.
2015-04-03 11:22:34 -07:00
Bob Nystrom 563a090865 Push more core class creation into the core library itself. 2015-04-03 08:00:55 -07:00
Bob Nystrom 278f1c063b Merge branch 'refactoring' of git://github.com/patriciomacadden/wren into patriciomacadden-refactoring 2015-04-03 07:19:17 -07:00
Luchs 45fc872214 Fix warning in clang 3.5 (-Wabsolute-value) 2015-04-01 17:42:20 +02:00
Bob Nystrom b46828e93e Update docs for map(_) and where(_). 2015-04-01 07:31:15 -07:00
Bob Nystrom f4a836c66e Merge branch 'deferred_execution' of git://github.com/bjorn/wren into bjorn-deferred_execution
Conflicts:
	builtin/core.wren
	src/vm/wren_core.c
2015-04-01 07:22:02 -07:00
Bob Nystrom 561d46ef1d Merge pull request #241 from bjorn/sequence_each
Added Sequence.each
2015-04-01 07:10:21 -07:00
Bob Nystrom 92a054f76a Don't make locals in scope in their own initializer. 2015-04-01 07:05:40 -07:00
Bob Nystrom 2256448017 Fix whitespace. 2015-04-01 06:43:44 -07:00
Bob Nystrom c826348c2b Merge pull request #247 from ComFreek/patch-2
Fixed char-subscripts warning
2015-04-01 06:42:38 -07:00
Patricio Mac Adden fca4e3d9e2 refactor defineSingleClass and defineClass 2015-03-31 22:58:55 -03:00
Thorbjørn Lindeijer a8ea2a91a6 Use deferred execution for Sequence.map and Sequence.where
The methods Sequence.map and Sequence.where are now implemented using
deferred execution. They return an instance of a new Sequence-derived
class that performs the operation while iterating. This has three main
advantages:

* It can be computationally cheaper when not the whole sequence is
  iterated.

* It consumes less memory since it does not store the result in a newly
  allocated list.

* They can work on infinite sequences.

Some disadvantages are:

* Iterating the returned iterator will be slightly slower due to
  the added indirection.

* You should be aware that modifications made to the original sequence
  will affect the returned sequence.

* If you need the result in a list, you now need to call Sequence.list
  on the result.
2015-03-31 22:25:07 +02:00
Thorbjørn Lindeijer c00d6ad694 Added Sequence.each
This is a bit of a style preference since of course you can always write
the same thing with a for loop. However, I think sometimes the code
looks better when using this method.

It also provides an alternative to Sequence.map for cases where you
don't need the resulting list, and one that becomes especially necessary
when Sequence.map is changed to return a new sequence. The example in
the README.md file was using Sequence.map in a way that required this
alternative in that case.
2015-03-31 21:53:29 +02:00
ComFreek 2a26ceeea7 Fixed char-subscripts warning 2015-03-31 18:27:44 +02:00
Bob Nystrom 13c519d0be Merge branch 'master' of https://github.com/munificent/wren 2015-03-30 07:39:37 -07:00
Bob Nystrom 9bdbc05be1 Flush benchmark output after each ".".
Thanks, Michel!
2015-03-30 07:39:21 -07:00
Bob Nystrom 54ee4987d1 Merge pull request #242 from patriciomacadden/fix-function-call
Fix wrong function call
2015-03-28 18:08:51 -07:00
Patricio Mac Adden 515b9317c7 Fix wrong function call 2015-03-28 17:01:21 -03:00
Bob Nystrom 37e1e8fe77 Remove outdated comment. 2015-03-28 10:19:38 -07:00
Bob Nystrom 07f9d4d2be Tweak Sequence.all() and Sequence.any().
When possible, they return the actual value from the predicate
instead of always just "true" and "false". This matches && and ||
which evaluate to the RHS or LHS when appropriate.
2015-03-28 10:18:45 -07:00
Bob Nystrom a7fafce265 Pull out opcode definitions into an X-macro file. 2015-03-28 09:56:07 -07:00
Bob Nystrom 6254a2e15e Invert the return value for finishBloc().
Thanks, Michel!
2015-03-28 09:15:19 -07:00
Bob Nystrom 53ee453f0f Merge pull request #239 from bjorn/sequence_list
Added Sequence.list
2015-03-28 09:06:49 -07:00
Bob Nystrom 5bb3154e83 Copy editing. 2015-03-27 20:59:15 -07:00
Bob Nystrom 72c38a59ce More stuff for working with strings and bytes!
- "\x" escape sequence to put byte values in strings: "\x34"
- String.byteAt(index) gets value of byte in string.
- String.bytes returns a raw sequence of bytes for a string.
- String.codePointAt(index) gets the code point at an offset as a raw number.
2015-03-27 20:44:07 -07:00
Thorbjørn Lindeijer b409569b6f Added Sequence.list
This helper method turns any sequence into a List.
2015-03-27 22:59:58 +01:00
Bob Nystrom 7d45dda383 String.fromCodePoint(). Fix #219. 2015-03-27 07:43:36 -07:00