1
0
forked from Mirror/wren
Commit Graph

82 Commits

Author SHA1 Message Date
ecce1f6be9 List; add remove(value)
Having to encode this behaviour at every call site is tedious. It makes a lot of sense to just have the method available on list itself.
2021-04-03 19:55:42 -07:00
5b290cacc5 Tentative fix for Num class docs issue on the wren.io site. (#932) 2021-03-02 11:11:21 -08:00
2bc895c26d added documentation on * operator for strings (#930) 2021-02-18 19:16:09 -08:00
ae6fdb3da7 Add docs for newly merged (#905) Num.cbrt method (#918) 2021-01-31 10:22:19 -08:00
af5227f03b Mention List.[Range] in the docs (#870) 2021-01-30 21:34:27 -08:00
1720a20979 In List.+(other), other should be an iterable, list is not required (#872)
We're iterating over it but do not check it's actually a list:

cb51d61a64/src/vm/wren_core.wren (L363-L369)
2021-01-30 21:33:54 -08:00
79000a320e Proposed additions to Map class docs. (#888)
The Map class documentation is missing a few details which I think should ideally be covered. The proposed changes should be self evident.
2021-01-30 21:22:54 -08:00
f1225ef7dd Add docs for remaining bitwise operators (#887)
I mentioned in #881 that the `^`, `<<` and `>>' bitwise operators were currently undocumented so this fixes that.

Have also added a note to Num.tau to clarify that this means `twice pi `and is not the golden ratio for which `tau` is sometimes used as an alternative to `phi`.
2021-01-30 21:21:59 -08:00
57bebd41ca Adds documentation for System.writeAll method (#886) 2021-01-30 21:21:33 -08:00
0f8b44e61b Fix undocumented methods in the Num class ( #879) (#884) 2021-01-30 21:21:18 -08:00
96eb68bae3 Fix undocumented methods in the List class ( #878) (#883)
Also noted that the ```add``` method returns the added item.
2021-01-30 21:21:07 -08:00
81aff84415 Fix incorrect heading (#871)
There was a space instead of `#`
2020-12-13 20:48:18 -08:00
a294da7974 Only the method name should be bold, not including the parameters list (#862) 2020-12-03 19:50:21 -08:00
c572345c3c &infinity; is not a valid HTML symbol - use &infin; (#863) 2020-12-03 19:48:49 -08:00
89c5e22480 add Num.tau 2020-12-03 13:20:15 -08:00
8361217369 Num; add min, max and clamp 2020-12-03 13:18:13 -08:00
38f50fe091 List; add swap(index0, index1) 2020-12-03 13:17:53 -08:00
62009870a8 List; add indexOf(value) 2020-12-03 13:17:26 -08:00
3d5e68fc01 Added List.sort(comp) to List module (#802) 2020-12-03 11:59:07 -08:00
a11d66cbd3 WIP wren/core: Add DEF_NUM_CONSTANT (with Num::infinity and Num::nan). (#781)
* wren/vm: Add "wren_math.h".
* wren/core: Add DEF_NUM_CONSTANT.
* wren/core: Add `Num::infinity` constant.
* wren/core: Add `Num::nan` constant.
2020-12-03 11:37:53 -08:00
f5339993ce Add support for Fiber.try(_) (#835)
* Add support for Fiber.try(_)
* Add documentation for Fiber.try(_)
* Add another test for Fiber.try(_)
2020-12-03 08:21:37 -08:00
94e4888b6a Fix link in null.markdown (#848) 2020-11-25 21:09:37 -08:00
f769599bc6 docs; fix random module docs missing a closing tag (thanks @totallyRonja) 2020-08-29 12:03:46 -07:00
433fbc4019 core; num; add exp & log2
I've had a couple use cases in time that the code is significantly clearer with these, and makes porting less error prone
2020-07-10 19:38:45 -07:00
9fb6d02b5c main branch reference fixes 2020-06-12 10:11:49 -07:00
d69d7e482d Added description of to the Num class docs (#726) 2020-06-05 15:08:52 -07:00
d585a080e8 Merge pull request #751 from wren-lang/0.3.0-refactor
0.3.0 refactor
2020-06-05 14:57:20 -07:00
fa2a3d9576 Clarify modulus documentation for sign
closes #695
2019-09-17 22:27:47 -07:00
451098db05 docs: Fixed broken link to overview about maps
Closes #672
2019-04-09 17:44:15 +02:00
a437e804ba Added String.fromByte with docs and unit test 2019-02-27 08:10:54 -05:00
57a1d809d8 docs; replace wren repo URL to point to organization 2019-02-05 18:41:31 -08:00
7cc7c715c9 docs; list; add + operator documentation 2019-02-05 18:18:38 -08:00
21024bfa13 docs; formatting and tidying
- quick clean up pass on layout and colors for clarity/legibility
- added logo to the sidebar
- fix various css things like a full height page when content is shorter, so the footer doesn't creep away from the bottom
- start using em instead of px for consistency across devices
2019-02-05 18:18:24 -08:00
09f4beff4a Add trim methods on String:
- trim()
- trim(chars)
- trimEnd()
- trimEnd(chars)
- trimStart()
- trimStart(chars)
2018-07-15 10:48:56 -07:00
4c9209c1b2 Update file.markdown
minor fix to close() language
2018-06-03 23:06:40 -05:00
1be76bb478 Correct method examples in Range docs 2017-10-23 13:48:43 -04:00
1661f5368f Allow passing a value when first starting a fiber.
If the function the fiber is created from takes a parameter, the value
passed to the first call() or transfer() gets bound to that parameter.

Also, this now correctly handles fibers with functions that take
parameters. It used to leave the stack in a busted state. Now, it's a
runtime error to create a fiber with a function that takes any more
than one parameter.
2017-10-19 20:45:13 -07:00
2021e086bf Don't automatically flush on every System.write().
It's handy because it ensures writes are flushed to the terminal before
any calls to read from stdin, but it's also gratuitously slow.

Instead, added a Stdout class with an explicit flush() method that can
be called by the user.

Fix #445.
2017-10-09 07:16:05 -07:00
eba0b97aa2 Merge pull request #472 from KyleCharters/master
Add Num .round
2017-10-06 07:51:55 -07:00
2bb531d860 Tweak Fiber.error docs. 2017-10-05 06:50:45 -07:00
84f2252c68 Add Num .round 2017-09-20 20:27:02 -04:00
16bab57056 fix #468 2017-09-16 21:38:35 -07:00
8f14bfb4b8 Fix typo in Num documentation
The documentation for the bitwise or operator described the behavior of the bitwise and operator.
2017-03-30 17:45:12 -05:00
9f93119377 Merge branch 'take_and_skip' of https://github.com/bjorn/wren into bjorn-take_and_skip 2017-03-15 07:15:00 -07:00
9efb18bae2 Typo: "seperator" -> "separator". 2017-03-15 07:06:07 -07:00
32aa43d1df Split and replace in wren. 2017-03-07 21:15:06 -05:00
f5d9443d0a Added Sequence.take and Sequence.skip
These lazy iterator producing methods are useful when working with
arbitrary sequences and you need to skip or take some number of elements
at the start.
2017-02-10 21:43:59 +01:00
4fe3ad3f8b Docs for Num.log and Num.pow(). 2017-01-20 07:24:46 -08:00
09ef904d32 Use DBL_MIN instead of DBL_EPSILON for Num.smallest. 2016-08-27 17:25:32 -07:00
b8b0f36521 Merge branch 'num-properties' of https://github.com/Nelarius/wren into Nelarius-num-properties 2016-08-27 17:18:21 -07:00