1
0
forked from Mirror/wren
Commit Graph

376 Commits

Author SHA1 Message Date
ff69b12c2c Fix sample in doc/site/error-handling
Add missing constructor.
2016-02-11 18:06:51 -05:00
a2e03279e2 Fix abs code sample in doc/site/modules/core/num
-123.abs returns -123 because the dot has higher precedence so it's
 really -(123.abs).
2016-02-11 17:58:09 -05:00
68ab4e88c0 Merge branch 'master' of https://github.com/munificent/wren 2016-02-09 07:24:55 -08:00
8b36e2f00b Add sample(_) and sample(_,_) to Random. 2016-02-09 07:24:45 -08:00
82307232cc Update wrenInterpret doc/site/embedding-api 2016-02-08 08:34:56 -05:00
d4a4b26203 Add Random.shuffle(). 2016-02-07 10:38:39 -08:00
79558d95e5 Move File.stat() -> Stat.path().
Thanks, Michel!
2016-02-07 09:56:16 -08:00
ffb5ada9fb Move the community docs to the wiki. 2016-01-24 15:39:35 -08:00
71e2458a6c Add API for accessing command-line arguments.
- Add process module with Process class.
- Add "arguments" and "allArguments" methods.
- Docs for same.
- Support passing additional arguments to command line.
- Add "--help" support to command line.
2016-01-22 07:57:26 -08:00
056ae61493 Tweak some docs. 2016-01-21 21:38:27 -08:00
94208647ab Test File.stat() on a directory. 2016-01-01 10:05:31 -08:00
5cd8a06fa0 File.stat(). 2016-01-01 09:58:44 -08:00
b054526df8 Add an optional offset to File.readBytes(). 2015-12-30 08:13:19 -08:00
6e2ec92e0d Fix parameter format in docs. 2015-12-29 22:35:14 -08:00
452cc88082 Fix a few typos in the docs. 2015-12-29 22:29:13 -08:00
8854dfb07e Docs for the io module! 2015-12-29 21:56:44 -08:00
5454152dff Merge pull request #313 from acook/patch-1
Fixing a couple of typos in the classes docs.
2015-11-25 08:59:16 -08:00
fb72e0fff7 Document method scope. 2015-11-21 14:00:21 -08:00
03163a760f Document interpolation. 2015-11-21 09:20:50 -08:00
da3eac9a48 Fixing a couple of typos in the classes docs. 2015-11-20 12:56:27 -06:00
de7b062a03 Tweak module docs a bit. 2015-11-09 07:42:48 -08:00
902289d7dd Document the "random" module. 2015-11-09 07:37:06 -08:00
82706b74fc Reorganize site to make room for documenting the other built-in modules. 2015-11-08 13:31:22 -08:00
8c0dae1320 Move precedence table to syntax page. 2015-11-08 10:59:23 -08:00
0bf5dc42ef Remove outdated docs. 2015-11-07 13:00:49 -08:00
7ae9888c4f It turns out "is" is just a normal overridable operator. Who knew? 2015-11-07 13:00:24 -08:00
931d9ca4d3 Reorganize the language guide.
- Rename "Expressions" -> "Method Calls".
- Organize "Types" and "Language" into a single linear narrative.
- Mobile-specific navigation to handle the longer guide.
- Rename "Fibers" -> "Concurrency".
- Get rid of duplicate stuff about signatures in "Classes".
- Add next/prev links to each page in the guide.
- Move "Contributing" and "Community" up to the top level.
- Move the precendence table to a separate "Grammar" page.
- Lots of other little stuff.
2015-11-07 11:09:04 -08:00
720c03cf49 Add System.gc(). 2015-10-24 10:56:27 -07:00
545a4cbf7e Style example output and errors in the docs. 2015-10-18 15:56:52 -07:00
e968b4bf98 Fix two typos in the docs. 2015-10-03 21:45:59 -07:00
e41d9eac7c Tweak the embedding docs a bit. 2015-10-02 21:25:55 -07:00
bacbd85543 Add .isInfinity and .isInteger to Num. 2015-09-30 08:41:43 -07:00
b05a74da19 Revamp how runtime errors and fiber switching is handled.
- Add Fiber.transferError(_).
- Primitives place runtime errors directly in the fiber instead of on
  the stack.
- Primitives that change fibers set it directly in the VM.
- Allow a fiber's error to be any object (except null).
2015-09-29 22:57:03 -07:00
a944ead5b4 Give the docs some love. 2015-09-22 21:19:38 -07:00
505b48fdac Add a real Pygments lexer for Wren (finally!). 2015-09-22 07:59:54 -07:00
251752fcfb Make join() require parentheses without a separator. 2015-09-16 07:15:48 -07:00
58e4d26648 "IO" -> "System".
Get rid of the separate opt-in IO class and replace it with a core
System class.

- Remove wren_io.c, wren_io.h, and io.wren.
- Remove the flags that disable it.
- Remove the overloads for print() with different arity. (It was an
  experiment, but I don't think it's that useful.)
- Remove IO.read(). That will reappear using libuv in the CLI at some
  point.
- Remove IO.time. Doesn't seem to have been used.
- Update all of the tests, docs, etc.

I'm sorry for all the breakage this causes, but I think "System" is a
better name for this class (it makes it natural to add things like
"System.gc()") and frees up "IO" for referring to the CLI's IO module.
2015-09-15 07:46:09 -07:00
92c2b2d5e0 Copy edit the string docs. 2015-09-12 09:42:31 -07:00
fe143644b3 Rationalize string lengths.
The .count getter on string returns the number of code points. That's
O(n), but it's consistent with the rest of the main string API.

If you want the number of bytes, it's "string".bytes.count.

Updated the docs.

Fixes 68. Woo!
2015-09-11 21:33:26 -07:00
c0b5ec9f15 Move codePointAt() to separate CodePointSequence class. 2015-09-11 07:56:01 -07:00
2e83f056c1 No more default constructors.
Fixes #296.
2015-09-01 08:16:04 -07:00
6559edbc56 Update docs to mention libuv. 2015-08-30 22:38:40 -07:00
556af50f83 Revise low level fiber semantics to play nicer with schedulers.
Now that I'm starting to write a real async scheduler on top of Wren's
basic fiber API, I have a better feel for what it needs. It turns out
run() is not it.

- Remove run() methods.
- Add transfer() which leaves the caller of the invoked fiber alone.
- Add suspend() to return control to the host application.
- Add Timer.schedule() to start a new independently scheduled fiber.
- Change Timer.sleep() so that it only transfers control to explicitly
  scheduled fibers, not any one.
2015-08-30 22:15:37 -07:00
610952f727 Update line count in docs. 2015-08-20 22:34:33 -07:00
69b0d34065 Start working on docs for the embedding API. 2015-08-20 22:02:13 -07:00
71ab3ca887 Use "construct" instead of "this" to define constructors. 2015-07-21 07:24:53 -07:00
bc822cd4c7 Merge branch 'master' into constructor-methods 2015-07-19 12:49:23 -07:00
214794db67 Fix a tiny typo. 2015-07-19 09:10:42 -07:00
d91c06d18b Tweak IO library a bit:
- Reword some docs.
- Make IO.printAll() public.
- Require () on read.
2015-07-18 14:09:00 -07:00
c095b72976 Reorganize community docs a bit. 2015-07-18 11:19:52 -07:00