Category:Wren: Difference between revisions

Deleted paragraph about updating S/H which has now been completed.
(Added link to Tasks not implemented page.)
(Deleted paragraph about updating S/H which has now been completed.)
 
(6 intermediate revisions by the same user not shown)
Line 15:
The CLI tool (Wren CLI) has its own repository and is the main focus of examples written for RC.
The latest version 0.4.0 is available as a pre-built standalone executable for 64-bit Linux, MacOS and Windows and can be downloaded from [https://github.com/wren-lang/wren-cli/releases here].
 
Following the migration to Miraheze, RC now uses [https://pygments.org Pygments] (rather than GeSHi) for syntax highlighting and I have written a lexer for Wren which is included in version 2.14.0. However, at the time of writing (January 2023), RC is still using version 2.11.2 and it is not known when this will be updated to the latest version.
 
In the meantime 'ecmascript', which we currently use for the 'lang' attribute, is supported by virtue of a GeSHi mapping to the 'javascript' lexer and highlights all Wren 0.4.0 keywords except: ''is'', ''construct'' and ''foreign''. I suggest we continue to use that until the Wren lexer is available after which we can use the latter for new tasks and when updating existing tasks. A major effort would be needed to update all existing tasks straightaway given that there are almost 1,600 of them as at January 2023.
 
As a language mainly designed for embedding, Wren's standard library is (of necessity) quite small and I have therefore decided to create some additional modules to assist with writing Rosetta Code tasks so the same code does not have to be written or copy/pasted time and time again thereby bloating a task's script code unnecessarily. The ones written so far are listed below:
Line 25 ⟶ 21:
! No. !! Module name !! !! No. !! Module name
|-
| 1 || [https[://rosettacode.org/wiki/Category:Wren-fmt |fmt]] || || 2 || [https[://rosettacode.org/wiki/Category:Wren-str |str]]
|-
| 3 || [https[://rosettacode.org/wiki/Category:Wren-sort |sort]] || || 4 || [https[://rosettacode.org/wiki/Category:Wren-math |math]]
|-
| 5 || [https[://rosettacode.org/wiki/Category:Wren-trait |trait]] || || 6 || [https[://rosettacode.org/wiki/Category:Wren-seq |seq]]
|-
| 7 || [https[://rosettacode.org/wiki/Category:Wren-date |date]] || || 8 || [https[://rosettacode.org/wiki/Category:Wren-rat |rat]]
|-
| 9 || [https[://rosettacode.org/wiki/Category:Wren-pattern |pattern]] || || 10 || [https[://rosettacode.org/wiki/Category:Wren-big |big]]
|-
| 11 || [https[://rosettacode.org/wiki/Category:Wren-upc |upc]] || || 12 || [https[://rosettacode.org/wiki/Category:Wren-matrix |matrix]]
|-
| 13 || [https[://rosettacode.org/wiki/Category:Wren-set |set]] || || 14 || [https[://rosettacode.org/wiki/Category:Wren-llist |llist]]
|-
| 15 || [https[://rosettacode.org/wiki/Category:Wren-queue |queue]] || || 16 || [https[://rosettacode.org/wiki/Category:Wren-complex |complex]]
|-
| 17 || [https[://rosettacode.org/wiki/Category:Wren-dynamic |dynamic]] || || 18 || [https[://rosettacode.org/wiki/Category:Wren-ioutil |ioutil]]
|-
| 19 || [https[://rosettacode.org/wiki/Category:Wren-long |long]] || || 20 || [https[://rosettacode.org/wiki/Category:Wren-crypto |crypto]]
|-
| 21 || [https[://rosettacode.org/wiki/Category:Wren-sound |sound]] || || 22 || [https[://rosettacode.org/wiki/Category:Wren-polygon |polygon]]
|-
| 23 || [https[://rosettacode.org/wiki/Category:Wren-srandom |srandom]] || || 24 || [https[://rosettacode.org/wiki/Category:Wren-lsystem |lsystem]]
|-
| 25 || [https[://rosettacode.org/wiki/Category:Wren-turtle |turtle]] || || 26 || [https[://rosettacode.org/wiki/Category:Wren-ellipse |ellipse]]
|-
| 27 || [https[://rosettacode.org/wiki/Category:Wren-check |check]] || || 28 || [https[://rosettacode.org/wiki/Category:Wren-array |array]]
|-
| 29 || [https[://rosettacode.org/wiki/Category:Wren-gmp |gmp]] || || 30 || [https[://rosettacode.org/wiki/Category:Wren-ecm |ecm]]
|-
| 31 || [https[://rosettacode.org/wiki/Category:Wren-sql |sql]] || || 32 || [https[://rosettacode.org/wiki/Category:Wren-event |event]]
|-
| 33 || [https[://rosettacode.org/wiki/Category:Wren-i64 |i64]] || || 34 || [https[://rosettacode.org/wiki/Category:Wren-perm |perm]]
|-
| 35 || [https[://rosettacode.org/wiki/Category:Wren-linear |linear]] || || 36 || [https[://rosettacode.org/wiki/Category:Wren-regex |regex]]
|-
| 37 || [https[://rosettacode.org/wiki/Category:Wren-maputil |maputil]] || || 38 || [https[://rosettacode.org/wiki/Category:Wren-plot |plot]]
|-
| 39 || [https[://rosettacode.org/wiki/Category:Wren-debug |debug]] || || 40 || [https[://rosettacode.org/wiki/Category:Wren-table |table]]
|-
| 41 || [https[://rosettacode.org/wiki/Category:Wren-iterate |iterate]] || || 42 || [https[://rosettacode.org/wiki/Category:Wren-money |money]]
|-
| 43 || [https[://rosettacode.org/wiki/Category:Wren-vector |vector]] || || 44 || [[:Category:Wren-ordered|ordered]]
|-
| 45 || [[:Category:Wren-psieve|psieve]] || || ||
|}
<br>
To use a class or classes from a module (say ''fmt''), you need to import them into your script with Wren code such as the following. To use more than one class separate their names with commas:
 
<syntaxhighlight lang="wren">import "./fmt" for Conv, Fmt</syntaxhighlight>
 
These modules are subject to the same license as any other code submitted to Rosetta Code though contributors' user pages should be checked to see whether more permissive terms are available. If anyone wishes to add further modules, please do so using a similar model and append them to the list.
 
Line 79 ⟶ 81:
! No. !! Module name !! !! No. !! Module name
|-
| 1 || [https[://rosettacode.org/wiki/Category:DOME |DOME]] || || 2 || [https[://rosettacode.org/wiki/Category:Raylib-wren |Raylib-wren]]
|-
| 3 || [https[://rosettacode.org/wiki/Category:SpiderWren |SpiderWren]] || || 4 || [https[://rosettacode.org/wiki/Category:Wren-assert |Wren-assert]]
|-
| 5 || [https[://rosettacode.org/wiki/Category:Wren-json |Wren-json]] || || 6 || [https[://rosettacode.org/wiki/Category:Wren-test |Wren-test]]
|-
| 7 || [https[://rosettacode.org/wiki/Category:WrenGo |WrenGo]] || || 8 || [https[://rosettacode.org/wiki/Category:Wren-xsequence |Wren-xsequence]]
|}
<br>
9,476

edits