Skip to content

Commit

Permalink
hello commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mahdin-hc committed Oct 18, 2024
0 parents commit 18b24f1
Show file tree
Hide file tree
Showing 179 changed files with 33,700 additions and 0 deletions.
119 changes: 119 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# 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:**

```go
// Basic example
str1 := "hello"
str2 := "world"

println(str1 + " " + str2)
```

```go
// 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
```

3. **Save your code as `hello.td`** (use the `.td` extension).
4. **Run your script using the following command:**

```bash
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](bin) directory, along with the `pkg` folder from [pkg](pkg).
2. **Copy the files to your desired location** with the following structure:

```bash
├───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
```

3. **Add the path to the `bin` folder** to your system's environment variables.

---

## Documentation

- **[Runtime Types](https://github.com/2dprototype/tender/blob/master/docs/runtime-types.md)**
- **[Built-ins](https://github.com/2dprototype/tender/blob/master/docs/builtins.md)**
- **[Operators](https://github.com/2dprototype/tender/blob/master/docs/operators.md)**
- **[Standard Library](https://github.com/2dprototype/tender/blob/master/docs/stdlib.md)**

## Examples

Explore various examples demonstrating Tender’s features in the [examples](examples) directory.

---

## Dependencies

Tender uses the following dependencies:

- [go-mp3](https://github.com/hajimehoshi/go-mp3)
- [gorilla/websocket](https://github.com/gorilla/websocket)
- [ebitengine/oto/v3](https://github.com/ebitengine/oto/v3)
- [exp/shiny](https://pkg.go.dev/golang.org/x/exp/shiny)
- [fogleman/gg](https://github.com/fogleman/gg)

---

## Syntax Highlighting

Syntax highlighting is currently available only for **Notepad++**. Download the configuration file from [here](misc/syntax/npp_tender.xml).

---

## License

Tender is distributed under the [MIT License](LICENSE). Additional licenses for third-party dependencies are provided in [LICENSE_GOLANG](LICENSE_GOLANG) and [LICENSE_TENGO](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.
6 changes: 6 additions & 0 deletions build_android_arm64.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
mkdir build
mkdir "build/android_arm64"
set GOARCH=arm64
set GOOS=android
go build -o build/android_arm64/tender -ldflags "-s -w" cmd/tender/main.go
pause
6 changes: 6 additions & 0 deletions build_darwin_amd64.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
mkdir build
mkdir "build/darwin_amd64"
set GOARCH=amd64
set GOOS=darwin
go build -o build/darwin_amd64/tender -ldflags "-s -w" cmd/tender/main.go
pause
6 changes: 6 additions & 0 deletions build_linux_amd64.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
mkdir build
mkdir "build/linux_amd64"
set GOARCH=amd64
set GOOS=linux
go build -o build/linux_amd64/tender -ldflags "-s -w" cmd/tender/main.go
pause
6 changes: 6 additions & 0 deletions build_windows_386.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
mkdir build
mkdir "build/windows_386"
set GOARCH=386
set GOOS=windows
go build -o build/windows_386/tender.exe -ldflags "-s -w" cmd/tender/main.go
pause
6 changes: 6 additions & 0 deletions build_windows_amd64.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
mkdir build
mkdir "build/windows_amd64"
set GOARCH=amd64
set GOOS=windows
go build -o build/windows_amd64/tender.exe -ldflags "-s -w" cmd/tender/main.go
pause
Loading

0 comments on commit 18b24f1

Please sign in to comment.