Giter Club home page Giter Club logo

ham's Introduction

πŸ– ham, a programming language made in Rust

NOTE: I'm learning rust, I am still a noob

status: alpha

You can download it from here.

Goals

  • Speed
  • Security
  • Comfort

Language Ideas

  • Rust interoperability
  • Manifest file
  • Ability to import files from:
    • Local file system
    • HTTP urls
    • By name (this would use some kind of remote registry to translate it to HTTP urls)
  • std library
  • Low-level (networking, file system...) APIs

Project ideas

  • CD integration to release a new version in each commit
  • More unit tests

Example

fn calc(value){
    // If the value is 5 end the function
    if value == 5 {
        return 0
    }
    
    // Add 1 
    value.mut_sum(1)
        
    // Print it's value
    println(format("Value is {}", value))
        
    // Call the function again with the latest value    
    return calc(value)
}

// This will print from `Value is 1` to `Value is 5`
let _ = calc(0)

There are more examples in /examples.

About

ham is a general purpose language. It is heavily inspired by Rust and TypeScript.

Usage

Built-in repl:

ham repl

Run files:

ham run examples/demo.ham

Run a project (This will run 1_project/src/main.ham automatically):

ham run examples/1_project

Contribuding

Compiling:

cargo build --release

Linting:

cargo clippy

Formatting:

cargo fmt

Testing:

cargo test

Install mdbook:

cargo install mdbook

Build the book:

mdbook build

Watch for changes on the book:

mdbook watch

Running directly:

cargo run -- run examples/demo.ham

Made by Marc EspΓ­n Sanz

MIT License

ham's People

Contributors

marc2332 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.