Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
0.4.0.tar.gz | 2021-04-09 | 1.8 MB | |
0.4.0.zip | 2021-04-09 | 2.2 MB | |
README.md | 2021-04-09 | 4.8 kB | |
Totals: 3 Items | 4.0 MB | 0 |
0.4.0 contains 145 commits from 28 contributors!
Release blog post (highlights only).
Documentation
This release includes many documentation revisions, fixes, additions and gaps closed!
Language
- Add
continue
keyword for loops - https://github.com/wren-lang/wren/pull/822 - Add
as
keyword:import "..." for Name as OtherName
- https://github.com/wren-lang/wren/pull/775 - Add Support positive sign in scientific notation - https://github.com/wren-lang/wren/pull/706
- Add Fiber.try(value) to complement Fiber.call(value) - https://github.com/wren-lang/wren/pull/835
- Allow
.
to be on a different line (for fluent/builder APIs) - https://github.com/wren-lang/wren/commit/4c496c56a6bc51c5922a5ed19b6e0ec9b1b00de6 - Allow newlines in empty parameter lists - https://github.com/wren-lang/wren/pull/925
- Add raw strings using triple quotes
"""
- https://github.com/wren-lang/wren/commit/981ea4adf1f9631dca386675f87cf88a76cc79ce - Add
\e
escape character for strings - https://github.com/wren-lang/wren/pull/963 - Add Attributes to classes and methods - https://github.com/wren-lang/wren/pull/962
Modules
- Random: Random.sample optimizations - https://github.com/wren-lang/wren/pull/716
- List:
- Add
list.sort()
andlist.sort {|a, b| ... }
(quicksort) - https://github.com/wren-lang/wren/pull/802 - Add
list.swap(index0, index1)
for swapping elements within a list - https://github.com/wren-lang/wren/commit/38f50fe091159ff8b114b9cbd0054456f7ed5366 - Add
list.indexOf(value)
for finding values in a list - https://github.com/wren-lang/wren/commit/62009870a8031acf231e5fb5eba13e4f6d334a07 - Add
list.remove(value)
, removing by value not index - https://github.com/wren-lang/wren/commit/ecce1f6be9fb2a177e1c61577d5f1fd16e36cc80 - Num:
- Add
Num.tau
- https://github.com/wren-lang/wren/commit/89c5e224809effae59dfe3cb0e2425b23d1722f1 - Add
Num.nan
,Num.infinity
- https://github.com/wren-lang/wren/pull/781 - Add
Num.minSafeInteger
andNum.maxSafeInteger
- https://github.com/wren-lang/wren/pull/874 - Add
min(other)
,max(other)
,clamp(min, max)
- https://github.com/wren-lang/wren/commit/8361217369825cd3ce730586d43f3994733b997e - Add
cbrt
for cube root - https://github.com/wren-lang/wren/pull/905 - Add
exp
,log2
- https://github.com/wren-lang/wren/commit/433fbc40195ddf1c837c1c56e14e15e5633e1bb3
Fixes
- Fix stack corruption related to
Fn
calls - https://github.com/wren-lang/wren/pull/807 - Fix a byte offset bug in CODE_IMPORT_VARIABLE - https://github.com/wren-lang/wren/commit/28ad8aa9e07f9622de3483cf67ae688a51c1cbdb
- Fix some stack corruptions related to multiple wrenInterpret calls - https://github.com/wren-lang/wren/pull/730
- Fixed crash when GC collects module during import 2ce421ea
- Fix
Bool
,Num
andNull
allowing subclassing, which is invalid - https://github.com/wren-lang/wren/pull/831 - Fix config reallocateFn being required, it can now be left out as intended - https://github.com/wren-lang/wren/commit/33ab8be7e3a32182e1397e403d6ee8a5e8b342c8
- Fix returns in a constructor returning null, and disallow returning a value - https://github.com/wren-lang/wren/pull/845
API
- BREAKING: Add
userData
towrenReallocateFn
- https://github.com/wren-lang/wren/pull/788 - BREAKING: Add
WrenLoadModuleResult
which has aonComplete
callback, allowing freeing module strings - https://github.com/wren-lang/wren/pull/778 - Add
wrenGetVersionNumber
for external access via the API - https://github.com/wren-lang/wren/pull/958 - Add WREN_API prefix for correct dll exports for some compilers - https://github.com/wren-lang/wren/commit/a501fba4bbc9b3cda3574b230b5b1e8f9d4aeadd
- Add
wrenHasVariable
andwrenHasModule
queries, for use withwrenGetVariable
- https://github.com/wren-lang/wren/commit/182ca90b8c9e14a88837699f1fa95f61d19b0f0a - Add
wrenSetListElement
to complementwrenGetListElement
, and allow negative index for both - https://github.com/wren-lang/wren/commit/97ebcc72c36f8ea81ed8bbfac8e165f7ef74495f - Add Map functions to API - https://github.com/wren-lang/wren/pull/725
- wrenSetSlotNewMap
- wrenGetMapCount
- wrenGetMapContainsKey
- wrenGetMapValue
- wrenSetMapValue
- wrenRemoveMapValue
Other
- build; add util/generate_projects.py for regenerating project files
- vm; Allow computed goto when using clang on Windows
- vm; WREN_MAX_TEMP_ROOTS default is 8 (instead of 5)
- vm; GC debug times are printed in milliseconds, not seconds