Coder Social home page Coder Social logo

barn-lang / barn Goto Github PK

View Code? Open in Web Editor NEW
52.0 1.0 5.0 18.04 MB

Barn is a simple programming language written in C that is compiled to C.

Home Page: https://barn-lang.github.io/barn-docs/

License: GNU General Public License v3.0

Shell 0.54% Vim Script 0.42% C 97.44% Makefile 0.25% Python 1.35%
programming programming-language compilator compilator-development programming-language-development

barn's Introduction

Barn Programming Language

About

Barn is a simple and efficient programming language designed for beginners and experienced programmers alike. It is compiled to C, making it fast and portable. Barn has a clean and easy-to-read syntax, making it a great choice for learning programming. It also has a growing community of users and contributors.

This repository includes the whole BarnC which is basically Barn compiler written in C, lot's of example programs in Barn and also extensions for well known editors like Vim, Visual Studio Code, Emacs

Get started with Barn

Welcome to the exciting world of Barn programming! For a seamless introduction to the language, we highly recommend exploring our documentation, which is available online. Dive into the details and unleash your creativity by visiting our documentation page.

If you don't have time to read our documentation check out everything underneath. To get started with Barn you have to install our compiler, to do it correctly put these commands into your (Linux/MacOS) terminal (Windows is not supported right now):

terminal

git clone https://github.com/barn-lang/barn && cd barn
make CC=gcc # Set the compiler you will use
make install
barn --version

After that let's dive into some programming. We will start with the most basic program we can write in any programming language yeah i mean a Hello World.

main.ba

@import "std.ba"

fun main() -> i32 {
    println("Hello, World!")
    return 0
}

That's all, after compiling this program by using this command barn ./main.ba and running it with ./a.out you should see a beautiful Hello, World! pop up in your terminal window! That is the most basic thing in Barn. We would also recommend to check out some examples in Barn right here

Finding & reporting bugs

Barn is a dynamic and evolving programming language, your feedback is crucial in ensuring its stability and performance. If you encounter any bugs or unexpected behavior, we encourage you to report them as fast as possible. If you find a bug please create a new github issue on this repository, please include code and terminal output.

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.