Categorygithub.com/2dprototype/tender
repositorypackage
0.0.1
Repository: https://github.com/2dprototype/tender.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# README

Tender

Tender is a general-purpose programming language specially designed for image processing, 2D graphics, scripting, and more!

Overview

Tender is compiled and executed as bytecode on a stack-based virtual machine (VM) written in native Golang.

Features

  • Simple and highly readable syntax
  • Compiles into bytecode
  • Supports rich built-in modules
  • Optimized for 2D graphics

Quick Start

  1. Install Tender on your machine.
  2. Copy the sample code below:
// Basic example
str1 := "hello"
str2 := "world"

println(str1 + " " + str2)
// Canvas drawing example (similar to JS Canvas)
import "canvas"
	
var ctx = canvas.new_context(100, 100)
ctx.hex("#0f0")        // Set color to green
ctx.dash(4, 2)         // Define dashed stroke
ctx.rect(25, 25, 50, 50)  // Draw a rectangle
ctx.stroke()

ctx.save_png("out.png")  // Save output as PNG
  1. Save your code as hello.td (use the .td extension).
  2. Run your script using the following command:
tender hello.td

Installation

  1. Download the repository.
  2. Run the install.sh script to install Tender on your system.

Windows (Manual Installation)

  1. Download the tender.exe binary for your system from the bin directory, along with the pkg folder from pkg.
  2. Copy the files to your desired location with the following structure:
├───bin
│   └───tender.exe
└───pkg
    │   ansi.td
    │   cinf.td
    │   console.td
    │   enum.td
    │   fs.td
    │   matrix.td
    │   messagebox.td
    │   utf8.td
    │   vec2.td
    │   xml.td
    └───helper
  1. Add the path to the bin folder to your system's environment variables.

Documentation

Examples

Explore various examples demonstrating Tender’s features in the examples directory.


Dependencies

Tender uses the following dependencies:


Syntax Highlighting

Syntax highlighting is currently available only for Notepad++. Download the configuration file from here.


License

Tender is distributed under the MIT License. Additional licenses for third-party dependencies are provided in LICENSE_GOLANG and LICENSE_TENGO.


Acknowledgments

Tender is written in Go and inspired by Tengo. We extend our gratitude to the contributors of Tengo for their valuable work.