The GameLisp scripting language

Related tags

Command-line glsp
Overview

GameLisp

GameLisp is a scripting language for Rust game development.

To get started, take a look at the homepage. Please note that GameLisp currently requires the latest version of nightly Rust.

Update, March 2022: My game project is on hold, meaning that GameLisp is not currently under active maintenance. Due to issue #36, the glsp crate will fail to compile when using nightly Rust toolchains newer than 30th September 2021. Apologies for any inconvenience!

Contributing

Bug reports and pull requests are welcome. All contributions submitted for inclusion in the work will be dual-licensed as described below, with no additional terms or conditions.

Roadmap

Short-term goals for the language, in descending order of priority:

  • Fix issue #36
  • Add test suite
  • Add syntax-highlighting for more text editors
  • Report the location of mismatched parentheses when parsing
  • Work off some technical debt
    • Make gc timing more consistent when "unsafe-internals" is disabled
    • Optimize forn, collections, objects, and the write-barrier
    • Forbid names like iter from being bound as local variables
  • Add built-in functions for debugging
    • Convenient functions for running a REPL in-game
    • Some level of support for hotloading
  • Audit the crate's integer conversions and overflow (e.g. usize as u32 casts)
  • Add multiple-value operations for the DequeOps trait, like set_slice and starts_with
  • Add bindings to the regex and chrono crates, behind feature flags
  • Experiment with reflection, raw classes or metaclasses, as potential replacements for mixins and classmacros

License

This project is licensed under either of

at your option.

Comments
  • glsp-engine v0.2.0 compilation - errors

    glsp-engine v0.2.0 compilation - errors

    Hi, I am very interested to the project, I followed the instructions. Unfortunately when running cargo run I get twenty errors on the file wrap.rs:

    error: cannot specialize on Binder(OutlivesPredicate(T, ReStatic), []) error: cannot specialize on trait StdError error: cannot specialize on trait std::fmt::Display error: cannot specialize on trait Debug error: cannot specialize on Binder(OutlivesPredicate(T, ReStatic), []) (three times at lines 1552, 1887, and 2021 error: cannot specialize on trait Default error: cannot specialize on trait BuildHasher error: cannot specialize on trait Eq error: cannot specialize on trait PartialEq error: cannot specialize on trait Hash error: cannot specialize on trait Ord error: cannot specialize on trait PartialOrd error: cannot specialize on trait PartialEq error: cannot specialize on trait Eq error: cannot specialize on Binder(OutlivesPredicate(T, ReStatic), []) (lines 2492 and 2522) error: cannot specialize on trait engine::RGlobal (lines 2566 and 2586)

    How could I fix all of these? Thanks in advance best

    opened by sarini68 7
  • Compilation not working with (require) but working with (load)

    Compilation not working with (require) but working with (load)

    Hello, I'm having issues when I try to compile!() my GameLisp code. The compilation is fine, but once I execute the resulting binary, there's the following error:

    unhandled error in run() call:
    
    stack trace:
        glsp::load_compiled()
        (load) at compile-proc-macro:1
        glsp::load("./game/main.glsp")
        (require) at ./game/main.glsp:1
        glsp::require("game/structs.glsp")
    
    errors:
        invalid filename 'game/structs.glsp' passed to glsp::require
        The specified path cannot be found. (os error 3)
    thread 'main' panicked at 'global type roguelike_glsp::api::KeyPressed was never registered, or it has been dropped', [redacted]\.cargo\registry\src\github.com-1ecc6299db9ec823\glsp-engine-0.2.0\src\engine.rs:2595:25
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    

    I solved this problem by replacing all the (require) calls with (load) so it's not really an issue right now, but it seemed cleaner to call (require).

    My repository is here

    (also, any critic on my rust/glsp code is welcome)

    Thank you

    opened by scambier 0
  • Line:Column in error message when `parse_all` fails

    Line:Column in error message when `parse_all` fails

    I am experimenting with a language server extension and I am trying to highlight areas of the code that fail to parse. I am not sure if my approach is the best or even correct.

    At the moment I am calling parse_all(&code, None), and I am inspecting the error value. Unfortunately I can only get a message, with no information about line and column (or span) where the error is.

    opened by Fahien 1
  • Dropping `Root` outside `Runtime.run` panics

    Dropping `Root` outside `Runtime.run` panics

    In a project, I have a state struct that contains a glsp runtime and a struct that holds callbacks:

    struct Callbacks {
      //various callbacks of type: Option<Root<GFn>>
    }
    
    struct State {
      callbacks: Callbacks,
      runtime: Runtime,
      ...
    }
    

    At the very end of the program, when the state is dropped, it panics with the error: a Root or Gc has outlived its originating Runtime - aborting process

    I then tried manually dropping the callbacks before the end of the program, and it seems the panic occurs there, so it looks like I can't drop Roots unless I'm in a runtime environment. Is this intentional?

    opened by Grinshpon 3
  • Consider changing constructors from glsp:: functions into associated functions

    Consider changing constructors from glsp:: functions into associated functions

    The glsp namespace is currently cluttered with around 100 toplevel functions. When a new user looks at the docs.rs page, I expect this doesn't make a great first impression. The functions are also quite verbose (glsp:: is six characters), they're not very self-documenting at the call site (glsp::arr_from_iter is debatably less clear than Arr::from_iter), and they introduce name-collision problems in the prelude.

    Many of the toplevel constructors could be converted into associated functions. For example, glsp::coro could become Coro::new, and glsp::step_by could become GIter::step_by. A quick headcount suggests that this would eliminate around 40 toplevel functions.

    Possible downsides:

    • Most of the constructors would return a Root, which might be counterintuitive
    • This change could make constructors less discoverable
    • It would make the codebase less organised (we would need to add many with_engine invocations outside of engine.rs)
    opened by fleabitdev 0
  • Parser defect: number should take priority over abbreviation

    Parser defect: number should take priority over abbreviation

    The reference says:

    When the parser encounters a sequence of characters which could represent a symbol, or could represent a number or abbreviation, then the number or abbreviation will take priority.

    Currently this means that numbers starting with a period are parsed as meth-name, so e.g. (let decay-rate .05) fails with an "error: unbound symbol 'meth-name'" This is never helpful, as 05 is not a valid method name.

    opened by tyomitch 1
Open-source compiler for the Papyrus scripting language of Bethesda games.

Open Papyrus Compiler This project is still WORK IN PROGRESS. If you have any feature requests, head over to the Issues tab and describe your needs. Y

erri120 22 Dec 5, 2022
A safe, fast, lightweight embeddable scripting language written in Rust.

Bud (budlang) A safe, fast, lightweight embeddable scripting language written in Rust. WARNING: This crate is not anywhere near being ready to publish

Khonsu Labs 13 Dec 27, 2022
A plugin system for the Rhai embedded scripting language.

Rhai Dylib This crate exposes a simple API to load dylib Rust crates in a Rhai engine using Rhai modules. ?? This is a work in progress, the API is su

Rhai - Embedded scripting language and engine for Rust 6 Dec 27, 2022
Provides filesystem access for the Rhai scripting language.

About rhai-fs This crate provides filesystem access for the Rhai scripting language. Usage Cargo.toml [dependencies] rhai-fs = "0.1.2" Rhai script //

Rhai - Embedded scripting language and engine for Rust 6 Dec 5, 2022
YAL is Yet Another scripting Language(but worse)

YAL - Yet Another Language YAL is yet another scripting language(but worse). Syntax Basic syntax fun main() { print("Hello, World!"); } Fibonacci

MD Gaziur Rahman Noor 16 Nov 14, 2022
bevy_scriptum is a a plugin for Bevy that allows you to write some of your game logic in a scripting language

bevy_scriptum is a a plugin for Bevy that allows you to write some of your game logic in a scripting language. Currently, only Rhai is supported, but more languages may be added in the future.

Jarosław Konik 7 Jun 24, 2023
Shell scripting that will knock your socks off

atom Shell scripting that will knock your socks off. NOTE: Click the image above for a video demonstration.

adam mcdaniel 256 Dec 14, 2022
A command line interface meant to bridge the gap between Rust and shell scripting

clawbang A command line interface meant to bridge the gap between Rust and shell scripting. Intended for use with HEREDOCs and shebangs: $ clawbang <<

Chris Dickinson 52 Mar 25, 2022
Simple low-level web server to serve file uploads with some shell scripting-friendly features

http_file_uploader Simple low-level web server to serve file uploads with some shell scripting-friendly features. A bridge between Web's multipart/for

Vitaly Shukela 2 Oct 27, 2022
A CLI app that exposes most of the h3o API for scripting.

h3o-cli — A CLI app exposing the h3o API for scripting How to install Pre-compiled binaries You can download a pre-compiled executable for Linux, MacO

Hydronium Labs 5 Jan 10, 2023
The Amp programming language: a language designed for building high performance systems.

A language designed for building high performance systems. Platform Support x86_64-pc-windows ✅ x86_64-unknown-linux ⚠️ untested x86_64-unknown-darwin

The Amp Programming Language 5 Mar 17, 2023
An Interpreter for Brainfuck programming language implemented in the Rust programming language with zero dependencies.

Brainfuck Hello, Visitor! Hey there, welcome to my project showcase website! It's great to have you here. I hope you're ready to check out some awesom

Syed Vilayat Ali Rizvi 7 Mar 31, 2023
Nexa programming language. A language for game developers by a game developer

NexaLang Nexa programming language. A language for game developers by a game developer. Features High-Level: Nexa is an easy high level language Two M

Sabe 3 Aug 21, 2023
A C-like programming language that is similar to Rust's syntax. Toy programming language.

CRUST This is a hobby project to learn about compilers and language design. I've designed the language to be similar to C and Rust. Heavily inspired b

Mahmoud Almontasser 50 Jul 13, 2024
A Text User Interface library for the Rust programming language

Cursive Cursive is a TUI (Text User Interface) library for rust. It uses ncurses by default, but other backends are available. It allows you to build

Alexandre Bury 3.3k Jan 9, 2023
Voila is a domain-specific language launched through CLI tool for operating with files and directories in massive amounts in a fast & reliable way.

Voila is a domain-specific language designed for doing complex operations to folders & files. It is based on a CLI tool, although you can write your V

Guillem Jara 86 Dec 12, 2022
Standard Graphics is a command-line tool for printing 2D graphics from any language to any screen.

2D graphics in any programming language with just print statements!

Caleb Winston 123 Nov 20, 2022
Text-based to-do management CLI & language server

☑️ Todome (日本語版はこちら) Todome is a notation developed for making and editing to-do lists. It is inspired by Todo.txt, and in fact some of the todome not

monaqa 16 Aug 17, 2022
An elegant language for script-kiddies and terminal squatters.

Tonic An elegant language for script-kiddies and terminal squatters. About I started Tonic to complete the Advent of Code 2021. My eventual goal is to

Ryan Chandler 12 Nov 22, 2022