GithubHelp home page GithubHelp logo

knockoutez / risor-io Goto Github PK

View Code? Open in Web Editor NEW

This project forked from risor-io/risor

0.0 0.0 0.0 2.38 MB

A fast and flexible embedded scripting language for Go projects.

Home Page: https://cloudcmds.github.io/tamarin

License: Apache License 2.0

Shell 0.04% JavaScript 0.10% Python 0.07% Lua 0.02% Tcl 0.58% Go 98.71% TypeScript 0.29% Makefile 0.18%

risor-io's Introduction

Risor

CircleCI MIT license Go.Dev reference Go Report Card Releases

A fast and flexible embedded scripting language for Go projects. Risor compiles scripts to bytecode internally which it then runs on a lightweight Virtual Machine (VM). Risor is written in pure Go.

Risor modules integrate the Go standard library, making it easy to write scripts using functions that you're already familiar with as a Go developer.

Notice: Project Renamed

Risor is a young project and until June 28, 2023 was known as Tamarin. For various reasons, the project needed a new name that would take the project into the future. Risor is a fun name, a bit shorter, and I can get a domain name for the project. Thanks for bearing with me during this update!

Documentation

Documentation is available at risor-io.github.io/risor.

Getting Started

The Quick Start in the documentation is where you should head to get started.

If you use Homebrew, you can install the Risor CLI as follows:

brew tap risor-io/risor
brew install risor

Having done that, just run risor to start the CLI or risor -h to see usage information.

Using Risor

Risor is designed to be versatile and accommodate a variety of usage patterns. You can leverage Risor in the following ways:

  • REPL: Risor offers a Read-Evaluate-Print-Loop (REPL) that you can use to interactively write and test scripts. This is perfect for experimentation and debugging.

  • Library: Risor can be imported as a library into existing Go projects. It provides a simple API for running scripts and interacting with the results, in isolated environments for sandboxing.

  • Executable script runner: Risor scripts can also be marked as executable, providing a simple way to leverage Risor in your build scripts, automation, and other tasks.

  • API: (Coming soon) A service and API will be provided for remotely executing and managing Risor scripts. This will allow integration into various web applications, potentially with self-hosted and a managed cloud version.

Quick Example

Here's a short example of how Risor feels like a hybrid of Go and Python, with new features like pipe expressions for transformations, and with access to portions of the Go standard library (like the strings package):

array := ["gophers", "are", "burrowing", "rodents"]

sentence := array | strings.join(" ") | strings.to_upper

print(sentence)

Output:

GOPHERS ARE BURROWING RODENTS

Syntax Highlighting

A Risor VSCode extension is already available which currently only offers syntax highlighting.

You can also make use of the Risor TextMate grammar.

Contributing

Risor is intended to be a community project. You can lend a hand in various ways:

  • Please ask questions and share ideas in GitHub discussions
  • Share Risor on any social channels that may appreciate it
  • Open GitHub issue or a pull request for any bugs you find
  • Star the project on GitHub

Discuss the Project

Please visit the GitHub discussions page to share thoughts and questions.

Credits

Check CREDITS.md.

License

Released under the Apache License, Version 2.0.

Copyright Curtis Myzie / github.com/myzie.

risor-io's People

Contributors

dependabot[bot] avatar myzie avatar raff avatar skurfuerst avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.