Skip to content

Releases: wren-lang/wren

0.4.0

09 Apr 04:55
4a18fc4
Compare
Choose a tag to compare

0.4.0 contains 145 commits from 28 contributors!

About Wren

Release blog post (highlights only).

Documentation

This release includes many documentation revisions, fixes, additions and gaps closed!

Language

  • Add continue keyword for loops - #822
  • Add as keyword: import "..." for Name as OtherName - #775
  • Add Support positive sign in scientific notation - #706
  • Add Fiber.try(value) to complement Fiber.call(value) - #835
  • Allow . to be on a different line (for fluent/builder APIs) - 4c496c5
  • Allow newlines in empty parameter lists - #925
  • Add raw strings using triple quotes """ - 981ea4a
  • Add \e escape character for strings - #963
  • Add Attributes to classes and methods - #962

Modules

  • Random: Random.sample optimizations - #716
  • List:
    • Add list.sort() and list.sort {|a, b| ... } (quicksort) - #802
    • Add list.swap(index0, index1) for swapping elements within a list - 38f50fe
    • Add list.indexOf(value) for finding values in a list - 6200987
    • Add list.remove(value), removing by value not index - ecce1f6
  • Num:
    • Add Num.tau - 89c5e22
    • Add Num.nan, Num.infinity - #781
    • Add Num.minSafeInteger and Num.maxSafeInteger - #874
    • Add min(other), max(other), clamp(min, max) - 8361217
    • Add cbrt for cube root - #905
    • Add exp, log2 - 433fbc4

Fixes

  • Fix stack corruption related to Fn calls - #807
  • Fix a byte offset bug in CODE_IMPORT_VARIABLE - 28ad8aa
  • Fix some stack corruptions related to multiple wrenInterpret calls - #730
  • Fixed crash when GC collects module during import 2ce421e
  • Fix Bool, Num and Null allowing subclassing, which is invalid - #831
  • Fix config reallocateFn being required, it can now be left out as intended - 33ab8be
  • Fix returns in a constructor returning null, and disallow returning a value - #845

API

  • BREAKING: Add userData to wrenReallocateFn - #788
  • BREAKING: Add WrenLoadModuleResult which has a onComplete callback, allowing freeing module strings - #778
  • Add wrenGetVersionNumber for external access via the API - #958
  • Add WREN_API prefix for correct dll exports for some compilers - a501fba
  • Add wrenHasVariable and wrenHasModule queries, for use with wrenGetVariable - 182ca90
  • Add wrenSetListElement to complement wrenGetListElement, and allow negative index for both - 97ebcc7
  • Add Map functions to API - #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

Commits since 0.3.0

0.4.0 pre-release

03 Dec 21:49
7d3f063
Compare
Choose a tag to compare
0.4.0 pre-release Pre-release
Pre-release

This release is a draft.

Language

  • Add continue keyword - #822
  • Add as: import "..." for Name as OtherName - #775
  • Add Support positive sign in scientific notation - #706
  • Add Fiber.try(value) to complement Fiber.call(value) - #835
  • Allow . to be on a different line (for fluent/builder APIs) - 4c496c5

Modules

  • Random: Random.sample optimizations - #716
  • List:
    • add list.sort() and list.sort {|a, b| ... } (quicksort) - #802
    • add list.swap(index0, index1) for swapping elements within a list - 38f50fe
    • add list.indexOf(value) for finding values in a list - 6200987
  • Num:
    • add Num.tau - 89c5e22
    • add Num.nan, Num.infinity - #781
    • add min(other), max(other), clamp(min, max) - 8361217
    • add exp, log2 - 433fbc4

Fixes

  • Fix stack corruption related to Fn calls - #807
  • Fix a byte offset bug in CODE_IMPORT_VARIABLE - 28ad8aa
  • Fix some stack corruptions related to multiple wrenInterpret calls - #730
  • Fixed crash when GC collects module during import 2ce421e
  • Fix Bool, Num and Null allowing subclassing, which is invalid - #831

API

  • BREAKING: Add userData to wrenReallocateFn - #788
  • BREAKING: Add WrenLoadModuleResult which has a onComplete callback, allowing freeing module strings - #778
  • Add wrenHasVariable and wrenHasModule queries, for use with wrenGetVariable - 182ca90
  • Add wrenSetListElement to complement wrenGetListElement, and allow negative index for both - 97ebcc7
  • Add Map functions to API - #725
    • wrenSetSlotNewMap
    • wrenGetMapCount
    • wrenGetMapContainsKey
    • wrenGetMapValue
    • wrenSetMapValue
    • wrenRemoveMapValue

Other

  • build; add util/generate_docs.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

Commits since 0.3.0

0.3.0

05 Jun 22:29
Compare
Choose a tag to compare

Blog

Read the 0.3.0 release blog for more details, and plans for 0.4.0.

Note You can try Wren on http://wren.io/try, and Wren CLI now has downloads.

0.3.0 changelog

0.3.0 is a fairly specific release, aimed at fixing build issues across platforms,
streamlining the process for new users and making embedding easier.
This is a stepping stone for working on language features and improving the VM,
hacking on the docs and the VM is simpler than ever!

Builds now work out of the box on all primary platforms.
Previously there was issues on Windows and other platforms due to unix-ey workflows being the default.

All the python scripts have also been fixed and updated (to python 3), and work consistently
across all platforms out of the box too (including the tests, benchmarks, metrics etc).
Like before, there was some things that didn't hold up on Windows or Mac. Fixed!

A lot of work has been done to also clarify the distinction between the CLI project and the VM,
as well as move the CLI to it's own repo!
This removes a lot of code that wasn't being used, and also been clarified the project structure.

Docs have also had a clean up, and a new page to try Wren directly on the doc page was added.

Language/VM

  • CLI moved to own repo
  • Use premake for project generation, see projects/
  • Fix builds across platforms. "Just works" on all primary platforms.
  • Fix amalgamated script generator and amalgamated build
  • Fix unicode parsing and other issues in all python scripts
  • All python scripts are python3 now, and run on all platforms correctly
  • Test runner isolated and unified for VM tests
  • Remove SASS and Pygments requirements from docs, just python now
  • Updated docs to clarify VM/CLI split
  • Added Try page for running wren code in the docs

0.2.0

01 Oct 06:38
Compare
Choose a tag to compare

Blog

Read the 0.2.0 release blog for details, and plans for 0.3.0.

0.2.0 changelog

0.2.0 spans a pretty wide time period with around 290 commits.
This includes many bug fixes, improvements, clarity in the code and documentation and so on.
There are some minor API changes, be sure your header is up to date so the compiler can tell you what changed. There's too many changes to explicitly list, so below is the obvious user facing stuff that was easy to spot in the history.

Most noteworthy is that 'relative imports' are a slightly breaking change,
but help pave the way forward toward a consistency for modules.

Language/VM

  • import was made smarter, differentiating relative from logical
  • Fiber can now accept a value from the first call/transfer
  • Improved performance/distribution of number hashing (details)
  • Added String.trim, String.trimEnd, String.trimStart variants
  • Added String.split, String.replace, String.fromByte
  • Added String.indexOf(needle, startIndex)
  • Added Sequence.take and Sequence.skip
  • Added Num.pow, Num.log, Num.round
  • Added Num.largest, Num.smallest
  • Added List.filled(count, value)
  • Added Map iteration (MapEntry)

C API

  • Added wren.hpp for use in c++
  • Added void* user data to WrenVM
  • Added wrenAbortFiber
  • Allow hosts with no module loader to still load optional modules.

CLI

Please note that beyond 0.2.0 the CLI will have it's own changelog.
This list is not exhaustive. For a fuller history see the commit log above.

  • Add path module
  • Add --version
  • Add REPL written in Wren
  • Add Stdin.isTerminal
  • Added Platform class
  • Rename process module to os