DEV Community

Camilo
Camilo

Posted on

Wren Playground: A RunJS for Wren

Hello I created an small alternative to https://runjs.app/ but for the Wren language called Wren Playground.

GitHub logo NinjasCL / wren-playground

A Simple Playground for Thinkering with Wren

Wren Playground

A simple playground for playing with Wren

video.mp4

Components

Imports

  • import "!{{module}}`" for Module: Imports from built-in modules.

  • import "~{{module}}" for Module: Imports from HOME directory.

  • import "#{{module}}" for Module: Imports from .wren directory.

Constants

There are a few constants:

  • %{date.iso}: Returns the current ISO 8601 date

  • %{date.unix}: Returns the unix timestamp in milliseconds

  • %{~}: Returns the path to user’s HOME directory

  • %{#}: Returns the path to .wren directory

Modules

Modules from Rosetta Wren have been built-in to complement Wren CLI standard modules. Import them using !{{module name}} Example import "!fmt" for Fmt

  • fmt

  • str

  • sort

  • math

  • trait

  • seq

  • date

  • rat

  • pattern

  • big

  • upc

  • matrix

  • set

  • llist

  • queue

  • complex

  • dynamic

  • ioutil

  • long

Custom Wren CLI

You can override the custom wren_cli used. Just put a wren or wren.exe in your .wren directory.

.wren directory

Is a directory where you can…







It was created using the following components:

Have fun!

Discussion (0)