Code Monkey home page Code Monkey logo

hadron's Introduction

Hadron

Hey!

If you have any ideas (syntax / features / improvement), please leave them here, I would really appreciate that.

Hello and welcome to Hadron ๐Ÿ‘‹, an early-stage language development project! We're thrilled that you've stopped by our project and hope you'll consider contributing to help us speed up development.

We welcome any ideas, feedback, and contributions from the community. Whether you're a seasoned developer or just starting out, we'd love to hear from you.

Please take a look at our documentation and feel free to reach out to us if you have any questions.


Hadron is a custom programming language written in C. It is designed to be a versatile language that can be transcompiled to other languages or interpreted. It aims to provide a simple and intuitive syntax, while still being powerful and flexible.

Planned Features

  • Simple and intuitive syntax
  • Static type system
  • On-demand garbage collection
  • Support for closures and anonymous functions
  • First-class functions
  • Modules and namespaces
  • Interoperability with C code
  • Transcompilation to C, JavaScript, Python, and other languages

Getting Started

To build Hadron, you need to have clang installed on your system. You can build Hadron by running the following commands:

git clone https://github.com/hadron-lang/hadron.git
cd hadron
make

To run the interpreter, you can use the following command:

./hadron

To transcompile to C, you can use the following command:

./hadron -l c input.hdn -o output.c

To transcompile to other languages, you can replace c with the target language. For example:

./hadron -l js input.hdn -o output.js

Examples

Please note that the syntax may change in the future.

Here is an example of a "Hello, world!" program in Hadron:

fx main {
  IO:out("Hello, world!")
}

And here is an example of a function that calculates the nth Fibonacci number:

fx fib(i32 n) {
  if n < 2 { return n; }
  else { return fib(n-1) + fib(n-2); }
} i32

fx main() {
  IO:out(fib(10));
}

Contributing

We welcome contributions to Hadron! If you find a bug or have an idea for a new feature, please open an issue on our GitHub repository. If you would like to contribute code, please submit a pull request. Before submitting a pull request, please make sure your code follows our coding style and passes our tests.

License

Hadron is released under the MIT License. See LICENSE for details.

hadron's People

Contributors

ms-is-coding avatar ms-temp avatar

Stargazers

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