Giter Club home page Giter Club logo

biro's Introduction

biro

biro (pronounced as B-row and mispelling of bro) is an esoteric programming language.

Principle of biro: Don't complicate things

Rules

  • Typed language
  • Initialization of variables is mandatory
  • All global variable declaration or function declaration starts with biro
    biro a : num = 0 // global variable
    
    biro myfunc(a,b) : (num,num,str)
  • Local variables are prefixed with smallbiro
    smallbiro i : num = 0 // local variable

Features

  • Every loop is infinite loop. Break it using condition.
  • No else, only if. Why do we need else when we have if?
  • Arithmetic operators
  • Logical operators
  • No bitwise operators (why do we need them, we can implement them using arithmetic operators)
  • Built-in Data types and structures
    • number (always a float)
    • string
    • boolean
    • array
    • stack
    • queue
  • Biro have three comparison operator equals or ==, more or > and less or <. Why do we need >=, <= when they can be written as a == b or a > b and a == b or a < b respectively.

Equivalent of Biro in other languages

Biro Python C++
loop while True while(true)
is condition ? if condition : if (condition)
donate return return
proceed continue continue
leave break break
attempt try try
arrest except catch
equals == ==
more > >
less < <
and and &&
or or ||
true True true
false False false
num float float
str str std::string
bool bool bool

How your biro works?

+-------------+                  +------------+
|             |   preprocessor   |            |
|    biro     +----------------->|  pirocode  |
|             |                  |            |
+-------------+                  +-----+------+
                                       |
                                       |  transpile
                                       |
                                       |
                                       v
 +--------------+                +------------+
 |              |    compile     |            |
 |  executable  |<---------------+    C++     |
 |   birocode   |                |            |
 |              |                +------------+
 +--------------+

biro's People

Contributors

meetesh-saini avatar

Stargazers

Ishaan Verma avatar Kartikey Subramanium avatar Dhananjay Chauhan avatar

Watchers

 avatar Kartikey Subramanium avatar

biro's Issues

Simplify comparision operators.

Why complicate things????

Motivation

Biro has three whole comparison operators. THREE!!! I dont like this kind of bloat from a language that claims to be "Don't complicate things." Frankly this just disgusts me. Biro-Lang... more like Bro-This-Is-Trash-Lang

Solution

Just have one comparison operator <=>, which in of it self is sufficient for all comparison needs. Daddy Turing would be very proud.

Examples

  1. a = 5 and b = 5, a <=> b would return 0.
  2. a = 6 and b=5.999999999, a <=> b would return 1.
  3. a = 723.68349 and b = 723.6835, a <=> b would return -1

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.