Jump to content

Category:Wren: Difference between revisions

Deleted paragraph about updating S/H which has now been completed.
(Updated blurb re syntax highlighting.)
(Deleted paragraph about updating S/H which has now been completed.)
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 and then WikiTide, RC now uses Pygments (rather than GeSHi) for syntax highlighting and I have written a lexer for Wren which can now be specified instead of 'ecmascipt' which was used previously. The latter was only supported by virtue of a GeSHi mapping to the 'javascript' lexer but it appears that this mapping no longer works and so all tasks/modules will need to be updated to use the 'wren' lexer in due course.
 
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 72 ⟶ 70:
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="ecmascriptwren">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.
9,485

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.