30c9f1ee37
initial 0.4.0 blog post
2021-04-08 22:09:02 -07:00
4a18fc489f
tests; maps; remove test that now asserts in debug
...
for now, as there doesn't seem to be a way to test for that , it fails CI
0.4.0
2021-04-08 21:46:31 -07:00
d763c72e3d
fix use of NULL_VAL, also invalid when nan tagging is disabled
2021-04-08 21:40:06 -07:00
34b01226a4
fix use of UNDEFINED_VAL which is invalid when nan tagging is disabled
2021-04-08 21:34:27 -07:00
a4ae905384
Introduce Attributes ( #962 )
...
* introduce Attributes for classes and methods
2021-04-08 21:30:09 -07:00
5244a9d001
Add an additional escape sequence \e. ( #963 )
2021-04-08 10:16:24 -07:00
9e86b0d26a
clarify the list of escapes to show the whole list
2021-04-08 10:11:01 -07:00
e260b467c4
made wren version number accessable via function ( #958 )
2021-04-08 09:33:22 -07:00
1307bdfb64
value: Rename validateKeyTypeto wrenMapIsValidKey. ( #965 )
2021-04-08 09:10:55 -07:00
06b71897b0
Surface error messages for map key values in the API with asserts
...
closes https://github.com/wren-lang/wren/pull/921
2021-04-07 23:08:31 -07:00
059e407ed3
wren/compiler: Allow multiline empty parameter lists and calls. ( #925 )
2021-04-07 22:58:46 -07:00
fd1d095588
Add preamble for Timer module ( #920 )
...
Opening remarks also needed here.
2021-04-07 22:56:51 -07:00
7a131a67e6
Add preamble for Scheduler module ( #919 )
...
We need some opening remarks here to get rid of the TODO.
2021-04-07 22:56:29 -07:00
e4052a25d7
wren/vm: Add wrenIsFalsyValue. ( #866 )
2021-04-07 22:54:49 -07:00
041f1bab8d
Fix returning from constructors ( #845 )
...
* Fix returning from constructors
1. Do not allow returning with a value
2. Return the instance, correctly, even when the user returned explicitly
* revise error message for consistency, revise implementation details a bit, fix extra args to finishBody
* clarify tests a bit
* document constructor return
Co-authored-by: ruby0x1 <ruby0x1@pm.me >
2021-04-07 22:53:05 -07:00
68f5c096d8
Disallow non-Num arguments in Num for min(_), max(_), clamp(_,_), pow(_) and atan(_) ( #859 )
...
* Disallow non-Num arguments in `Num.min(_)`, `Num.max(_)`, `Num.clamp(_,_)`
Previously this was an Undefined Behavior
* also validate args for pow, atan2, add tests, fix error messages
Co-authored-by: ruby0x1 <ruby0x1@pm.me >
2021-04-07 22:04:58 -07:00
4847b37789
minor cleanup
2021-04-07 21:56:19 -07:00
28da4b449c
Add Num.[max/min]SafeInteger ( #874 )
2021-04-07 21:45:00 -07:00
61cc6cb745
more minor doc fixes
2021-04-07 21:37:12 -07:00
0ab930c9c2
reorder some docs a bit, fix missing constructor
2021-04-07 21:21:50 -07:00
d38c047a5a
documentation revisions and missing pieces
2021-04-07 20:54:18 -07:00
0be504832e
fix code documentation
2021-04-07 18:36:11 -07:00
4cd374e1a7
fix amalgamation documentation
2021-04-06 19:59:42 -07:00
5e60bbf0cf
document string range indexing for substring
2021-04-06 19:56:28 -07:00
197c0ff4f9
fix loadModuleFn description in header
2021-04-06 19:49:40 -07:00
e3c76a3e76
Raw strings now ignore whitespace on both ends for consistency and clarity
...
added more tests, updated documentation
2021-04-04 22:28:57 -07:00
8304fd5ecc
docs; strings; fix formatting for example
2021-04-04 14:02:07 -07:00
ea684194db
try; update for testing latest
2021-04-04 13:54:58 -07:00
981ea4adf1
Add raw string literals
...
Also document + test multi line literals.
2021-04-04 13:52:32 -07:00
345f919e26
make WREN_API_DLLEXPORT required, fixes statically linked versions
...
-_-
2021-04-04 13:29:32 -07:00
853f5a3414
fix link in fiber page
2021-04-04 12:31:45 -07:00
11bea3ca01
Add documentation for Fiber.transfer methods ( #949 )
2021-04-04 12:20:15 -07:00
33ab8be7e3
fix possibility of having no reallocate function ( #954 )
...
Before, if a config was provided it was expected to have a reallocate function, now it can remain null and the default will be used.
2021-04-04 11:24:48 -07:00
a501fba4bb
add WREN_API declaration for proper symbol export
...
Brought up by @Orcolom
Detected for MSVC or similar and can be explicitly activated by defining WREN_API_DLLEXPORT (or manually defining WREN_API to __declspec( dllexport ) before include).
Can be disabled by using a blank `#define WREN_API` before include.
Note: to use the import variant, `#define WREN_API __declspec(dllimport)` before including the wren header.
2021-04-04 11:18:40 -07:00
615a6aa208
try; fix random and meta properly
2021-04-03 22:09:19 -07:00
94e835cdd6
minor clean up of try readme
2021-04-03 22:02:13 -07:00
3c0fe12102
try; add try implementation + details, update to latest main branch
2021-04-03 21:58:31 -07:00
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
4d1d0d972e
rename some test functions that clash with libc ( #936 )
...
* rename some test functions that clash with cosmopolitan libc
2021-03-07 16:38:29 -08:00
5b290cacc5
Tentative fix for Num class docs issue on the wren.io site. ( #932 )
2021-03-02 11:11:21 -08:00
dfa7d9c895
doc/site/functions Fn.new() clarification [minor] ( #931 )
...
In the description of Fn.new():
- Fix a typo
- Add the referent of "that" for clarity
2021-03-02 09:27:23 -08:00
2bc895c26d
added documentation on * operator for strings ( #930 )
2021-02-18 19:16:09 -08:00
208bbc02a5
revert #826
...
3a06580b89
2021-02-13 10:17:59 -08:00
9dfbc021a0
wren/compiler: Store value in the correct token. ( #923 )
2021-02-06 07:53:39 -08:00
ae6fdb3da7
Add docs for newly merged ( #905 ) Num.cbrt method ( #918 )
2021-01-31 10:22:19 -08:00
3a06580b89
Don't use strtoll() with explicit base to parse hex, instead use strtod() ( #826 )
...
`strtod()` automatically recognizes the `0x` and converts to hex
This has two advantages:
1. Simplify code (no need of argument `isHex` to `makeNumber`, no `if`)
2. Allow numbers larger than `long long` if they fit into `double`
2021-01-30 21:44:52 -08:00
0fa16a20ec
Fix deprecated Python timing in benchmark & give more error info. ( #844 )
...
- Note: process_time gives CPU time used and perf_counter is absolute time used.
- Looks to have noise of about 1-2%.
2021-01-30 21:40:20 -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
4ac41c36db
Added hexadecimal number literals example ( #876 )
2021-01-30 21:32:42 -08:00