Skip to content

Releases: wenyan-lang/wenyan

v0.3.4

29 Jul 05:11
Compare
Choose a tag to compare

Bugfixes

v0.3.3 - new npm org @wenyan

27 Apr 05:07
Compare
Choose a tag to compare

Move to the new npm org @wenyan. Thanks for the donation!

Now you can use:

npm i -g @wenyan/cli

v0.3.2

20 Feb 05:12
Compare
Choose a tag to compare

Features

Standard Library

  • Top-level array for Wonton (d8dfb63)
  • Fixes in 列經 (PR #578, thanks @wenfeng0218)

Examples

  • 玲瓏塔 (PR #578, thanks @wenfeng0218)
  • 漢諾塔·堆棧法 and 斐氏列·數組法 (PR #580, thanks @wenfeng0218)

Misc

Thanks

Thanks for our first financial contributor @wenfeng0218 on Open Collective!

v0.3.1

29 Jan 14:38
Compare
Choose a tag to compare

Standard Library

Fixes

Examples

Misc

  • Improve responsive for the website (PR #568, thanks @MaoSHYJ)

v0.3.0

17 Jan 06:33
Compare
Choose a tag to compare

BREAKING CHANGE: compile API change

As we mentioned in the v0.2.0 release, the support of using lang as the first argument of compile is now REMOVED. Please use the new API instead.

// before
compile('js', source, { ... })
// after
compile(source, { lang: 'js', ... })

New Online IDE

The fresh new Online IDE is now landed. With file explorer, rendering, a better editor, auto-complete, wyg support, dark mode and more. Please do check it out! (PR #515 #526 #535 #536 #537 #546 #551 #552)


We are now moved to Typescript!

We have rewritten our codebase to Typescript. The typing declaration file is also shipped in @wanyanlang/core.

Check out for #543 for more details.

Features

  • Importing nested modules structure is now landed (PR #534, thanks @antfu)

Fixes

Stdlib

Tests

Examples

v0.2.4

11 Jan 05:30
Compare
Choose a tag to compare

import in, elseif, if true, if false, any

Thanks to everyone who contributed their ideas, a selection of proposed new syntaxes are now added

js/c++ wenyan issue
continue 乃止是遍 #392
else if 或若 #365
if (ans) { 若其然者 #513
if (!ans) { 若其不然者 ditto
auto #486
require('path/to/something') 吾嘗觀「「某樓」」中「「某閣」」中「「某書」」之書。 #475

refer to #519 for more details

v0.2.3

10 Jan 06:34
Compare
Choose a tag to compare

序.wy

Think 序.wy the Wenyan version of index.js.

For example, the reader now will search for a module 四庫全書 for a given path /tmp/examples

  • /tmp/examples/四庫全書.wy
  • /tmp/examples/四庫全書/序.wy

The first match will be imported. Refer to #512 for more details.

藏書樓

Think 藏書樓 the Wenyan version of node_modules.

藏書樓 will be included as importPaths by CLI automatically. It will do an up searching for 藏書樓 from the cwd (just as node did)

v0.2.2

09 Jan 18:34
Compare
Choose a tag to compare

New Website Domain http://wy-lang.org!

We are now using Netlify to build our website & IDE. The legacy links will redirect to http://wy-lang.org automatically.

Features

  • New option importPaths for specifying the import searching directories, (PR #499, by @antfu)
  • New option allowHttp for allowing import scripts from the web (default to false). refer to #499 for more details.

Fixes

Examples

v0.2.1

06 Jan 03:14
Compare
Choose a tag to compare

Static Type Inference

When the option is turned on, the compiler will now raise exceptions if your code does not typecheck. Also it is capable of producing type signatures for inspection, e.g. ./example/quicksort.wy produces the following:

[0-347] {
  快排 : (('a) arr) -> (('a) arr)
  己 : (num) arr
  [33-285] {
    首 : ('a) arr
    頷 : ('a) arr
    尾 : ('a) arr
    甲一 : 'a
    甲餘 : ('a) arr
    乙 : ('a) arr
    [136-201] {
      丁 : 'a
    }
  }
}

For more detail, please refer to #486

Standard Library

3rd Party Compilers

Fixes

  • Stdlib was not bundled correctly. (PR #481, thanks @antfu)

v0.2.0

02 Jan 06:59
Compare
Choose a tag to compare

⚠ BREAKING CHANGE: compile API change

The first argument lang move to option, please switch to new API.

//before
compile('js', source, { ... })
// after
compile(source, { lang: 'js', ... })

The old API is still functional for temporary backward compatible, the support will be REMOVED in the next minor update.

Wenyan Snippets Site, #459

Please do check it out. Any feedbacks are welcome!

New Execute API

Check out API Document and #473

Fixes

Docs