Coder Social home page Coder Social logo

hug's Introduction

hug

My own lil easy-to-use programming language inspired by GDScript & Rust, focused on being beginner-friendly while providing advanced features and incredible speed.

Features

Currently working features are:

  • External function calling (define dynamic library with @extern(location = "path_to_lib.so") module name, then a function with @extern function name;).
  • Because of the prior feature, you can create Hug libraries in C or Rust. Tools are available for Rust libs.
  • Very basic variables (no math yet, nor mutability)
  • Lexer based off Rust's lexer
  • Messy code that will need cleanup
  • Interpreted by a VM (similair to how Java works)
  • Bare bones core library with these variable types:
    • Int8 - Int128 - Sized integers
    • UInt8 - UInt128 - Sized unsigned integers (always positive)
    • Float32, Float64 - Sized floats
    • String - Text
    • Char - A single character (8 bits)
    • Function - Pointer to Hug function
    • ExternalFunction - Pointer to external (dynamically loaded) function

Usage

NOTE: The other/ directory contains a file for syntax highlighting in sublime text (not fully finished yet)

IMPORTANT: Currently, the Core library is compiled to a dynamic library, the extension differs per platform. Make sure to change this line in hug_core/hug/core.hug:

@extern(location = "target/debug/libhug_core.dylib") module core

To any of these depending on your platform:

Windows:

@extern(location = "target/debug/libhug_core.dll") module core

MacOS:

@extern(location = "target/debug/libhug_core.dylib") module core

Linux:

@extern(location = "target/debug/libhug_core.so") module core

No precompiled binaries are available yet, but you can run it yourself using:

cargo run -- <args for hug>

For a list of commands run:

cargo run -- --help

Running a .hug file:

cargo run -- run <file>

Running the unit test:

cargo test

And lastly, disabling debug output:

cargo run --release -- <args for hug>

hug's People

Contributors

hugo4it avatar

Stargazers

Andrew Johnson avatar  avatar

Watchers

 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.