Commit Graph

220 Commits

Author SHA1 Message Date
22b9ed8f6f Merge branch 'master' into functional 2015-11-28 10:05:10 -08:00
a45a43606f Add an anonymous expression fn syntax. 2015-11-27 21:17:34 -08:00
6c0cbe36bb Allow lowercase names to be implicit top-level variables too. 2015-11-26 10:17:42 -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
f7d3c85329 added links on the community page to 'wrenjs' and 'wren-nest' 2015-07-15 17:40:12 -05:00
5fb6186d7d Make constructors just methods.
* Eliminate "new" reserved word.
* Allow "this" before a method definition to define a constructor.
* Only create a default constructor for classes that don't define one.
2015-07-10 09:18:22 -07:00
a44e07deba Some minor doc cleanups and tweaks. 2015-07-01 08:11:10 -07:00
70cc371379 Merge pull request #275 from sbrl/master
Document the IO class
2015-07-01 06:44:27 -07:00
4a15653c66 Add isEmpty to Sequence.
Thanks, Michel and Thorbjørn!
2015-06-30 06:52:29 -07:00
70d6753374 Renamed temporary filename to actual filename 2015-06-28 19:45:55 +01:00
ffddc579fd Fixed IO title and renamed file to temporary name 2015-06-28 19:45:08 +01:00
88e209132e Updated to match standard style conventions. 2015-06-27 12:50:29 +01:00
01ef6e4198 Added link to IO class to core template 2015-05-30 16:12:13 +01:00
0dab2f4be4 Added link to IO class documentation to core index 2015-05-30 16:11:26 +01:00
d3e12980d4 Attempted to document the IO class 2015-05-30 16:10:14 +01:00
3fd63eb2a5 Create IO.markdown 2015-05-29 10:40:16 +01:00
3f06553f7f Allow fibers as map keys. 2015-05-03 11:12:17 -07:00