Coder Social home page Coder Social logo

sheikhartin / farr Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 152 KB

A brand new programming language designed for developers with diverse coding interests! Yes, it's free to star ๐ŸŒŸ!

License: MIT License

Python 99.88% Dockerfile 0.12%
from-scratch from-scratch-in-python interpreted-programming-language programming-language

farr's Introduction

Farr

GitHub repo status GitHub license GitHub contributors GitHub tag (latest by date) GitHub repo size

Overcoming mental limitations

A programming language inspired by different things that aims to attract all kinds of developers. Ah, obviously that's impossible, but at least we have a good idea!

Getting Started

In our programming language, the well-known Fizzbuzz program is as follows:

/**
 * A small challenge to label numbers into three categories...
 */

let rng_start = (
  readln!("Enter the starting point of the range: ")
  .toint()
);
let rng_end = (
  readln!("And also the end: ")
  .toint()
);
if rng_start >= rng_end = {
  println("The start value must be smaller than the end value!");
  exit!(1);
}

for let i in [rng_start..rng_end] = {
  if ((% i 15) == 0) = {
    println("...Fizzbuzz");
  } else if ((% i 3) == 0) = {
    println("...Fizz");
  } else if ((% i 5) == 0) = {
    println("...Buzz");
  } else = {
    println("${i}"); // Or just pass `i` as an argument!
  }
}

Yes, we use prefix notation for mathematical operations that clearly indicate priorities. You should also put an equal sign behind the open brace before starting a block...

Would you like to see more code samples from the Farr programming language? Go to the examples folder...

Usage

Clone it first:

git clone https://github.com/sheikhartin/farr.git \
&& cd farr

For both cool developers and adventurous users:

pip install -e . \
&& export FARRPATH=$PWD \
&& farr -h

However, virtualization is usually a better option:

docker build -t farr . \
&& docker run -it farr -h

Once Farr is installed, you can use it in several ways:

To run a .farr file, use the run command:

farr run examples/linear_search/sol02.farr

Remember to replace the example code with your own Farr code.

To start an interactive Farr shell (REPL), use the shell command:

farr shell

To swiftly execute Farr code snippets right from your command line, use the cmd command:

farr cmd 'println("Hello, world!");'

Community

Join the Farr community here to discuss, ask questions, and share what you've built with Farr.

License

This project is licensed under the MIT license found in the LICENSE file in the root directory of this repository.

Disclaimer

As you know, you shouldn't use this language for a serious product [at least not yet]!

farr's People

Contributors

sheikhartin avatar

Stargazers

Maryam Kiyaee 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.