Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/barn-lang/barn
Barn is a simple programming language written in C that is compiled to C.
https://github.com/barn-lang/barn
compilator compilator-development programming programming-language programming-language-development
Last synced: 9 days ago
JSON representation
Barn is a simple programming language written in C that is compiled to C.
- Host: GitHub
- URL: https://github.com/barn-lang/barn
- Owner: barn-lang
- License: gpl-3.0
- Created: 2022-10-08T15:51:18.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-21T15:46:34.000Z (4 months ago)
- Last Synced: 2024-08-01T14:02:45.197Z (3 months ago)
- Topics: compilator, compilator-development, programming, programming-language, programming-language-development
- Language: C
- Homepage: https://barn-lang.github.io/barn-docs/
- Size: 17.6 MB
- Stars: 52
- Watchers: 1
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-programming-languages - Barn - Barn is a simple programming language written in GoLang and compiled to C++. Syntax is very simple, and Barn can call C/C++ functions natively so creating new bindings should be easy. Barn was written with the goal of being as fast and easy to use as possible. Barn is just a little project with which I can chill and just code. (Uncategorized / Uncategorized)
README
# Barn Programming Language
## AboutBarn 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](https://barn-lang.github.io/barn-docs/documentation.html).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`
```kotlin
@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](./examples/)
## 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](https://github.com/barn-lang/barn/issues), please include code and terminal output.