Skip to content

πŸŒ·πŸ“œ A lightweight, JavaScript-inspired scripting language with emoji support and modern features.

License

Notifications You must be signed in to change notification settings

cryptrunner49/tulipscript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŒ·πŸ“œ TulipScript

TulipScript is a lightweight, expressive scripting language inspired by JavaScript β€” but more fun. It supports Unicode and emoji identifiers, functional programming, file I/O, and is embeddable as a shared C library. Whether you're scripting a game or experimenting with creative code, TulipScript makes it joyful.


πŸš€ Quick Start

let hello = "Hello, World!"
println(hello)  // Outputs: Hello, World!

πŸ“– Explore language features in the Usage Guide β†’


✨ Features

  • 🌍 Unicode & Emoji Identifiers β€” Name your variables 🌸, Ο€, or anything you love.
  • 🧠 Familiar JavaScript-like Syntax β€” Use let, const, if, for, and more.
  • βš™οΈ Built‑in Functions β€” clock(), shuffle(), random_between() and others built-in.
  • πŸ“ File I/O β€” read_file() and write_file() to handle files natively.
  • 🧱 Structs & Closures β€” Define custom types and encapsulate behavior.
  • 🐧 Linux-Only β€” Works out of the box on most Linux distributions.
  • 🧬 Embeddable VM β€” Integrate TulipScript with C, Go, Rust, or C++ applications.

πŸ”½ Download

Get the latest prebuilt binaries and development files from the Releases β†’:


βš™οΈ Installation

βœ… Requirements

  • OS: Linux
  • Tools: gcc, make, pkg-config, libffi, readline
  • Go (Golang)

🧰 Install with Script

System-wide:

curl -sL https://github.com/cryptrunner49/tulipscript/raw/refs/heads/main/install.sh | bash -s -- install --system

User-only:

curl -sL https://github.com/cryptrunner49/tulipscript/raw/refs/heads/main/install.sh | bash -s -- install --user

πŸ— Build from Source

git clone https://github.com/cryptrunner49/tulipscript.git
cd tulipscript
make vm
./bin/tulip samples/scripts/rpg_game.tlp

🧠 Embedding TulipScript

TulipScript is easy to embed in other languages like C, Go, C++, and Rust.

βœ… Example in C

#include "libtulip.h"
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char** argv) {
    Tulip_Init(argc, argv);

    if (argc > 1) {
        Tulip_RunFile(argv[1]);
    } else {
        int exitCode;
        char* result = Tulip_InterpretWithResult("1 + 2;", "<script>", &exitCode);
        if (exitCode == 0) printf("Last value: %s\n", result);
        else printf("Execution failed with code %d\n", exitCode);
        free(result);
    }

    Tulip_Free();
    return 0;
}

πŸ›  Build & Run

make lib
gcc -o run_sample samples/lib/c/sample.c -Lbin -ltulip -Ibin
LD_LIBRARY_PATH=bin ./run_sample

πŸ” More Embedding Examples

Find ready-to-run embedding samples in:

These show how to use TulipScript with FFI across different ecosystems.


πŸ§ͺ Platform‑Specific Setup

Ubuntu / Debian

sudo apt update
sudo apt install gcc pkg-config make golang libffi-dev libreadline-dev

πŸ—Ί Roadmap

What’s next for TulipScript?

  • Elif
  • Pattern Matching
  • Switch Statement
  • Enums
  • Error Handling
  • Standard Library

✨ Track progress or suggest features via Issues β†’


🀝 Contributing

We’d love your help! Whether it's fixing bugs, improving docs, or proposing featuresβ€”your contributions matter.

πŸ‘‰ See the Contributing Guide β†’ to get started.


πŸ“„ License

TulipScript is licensed under the GNU GPL-3.0.
See the LICENSE for details.

About

πŸŒ·πŸ“œ A lightweight, JavaScript-inspired scripting language with emoji support and modern features.

Resources

License

Stars

Watchers

Forks

Packages

No packages published