'Bhai-Lang' Is A Java-Based Programming Script Built By Two Indian 'Bros'

TheSloth

The Slowest One
*www.indiatimes.com/technology/news/bhai-lang-java-programming-script-564501.html

A new programming language is in town. The "Bhai-lang" toy programming language was written in Typescript and makes programming look a lot more fun.

"Bhai" is a Hindi word for brother. To use the language, users are required to write "hi bhai" as the entry point code while everything must end with "bye bhai." All code written inside these tags will be valid while everything outside of it will be ignored.
To declare variables, programmers would be required to use "bhai ye hai." Different values and functions may be allotted to variables as per a programmer's requirement. Javascript never sounded easier!

The new Javascript library was created by Rishabh Tripathi and Aniket Singh, both software development engineers at Groww and Amazon respectively


*im.indiatimes.in/content/2022/Mar/Capture22_6230622259e1b.PNG?w=515&h=352&cc=1
 

Desmond

Destroy Erase Improve
Staff member
Admin
Title says Java based, but the article says Javascript/Typescript based.

Besides this reminds me of FiM++ (Friendship is magic ++) - FiM++ - Esolang

Code:
Dear Princess Celestia: Letter describing my experiences with the Collatz sequence.

Today I learned about the Collatz sequence.
Did you know that the final value is one?

Did you know that Spike likes the number 53135714?

Did you know cakes are two?
Did you know that too much cake is three?

By the way, Spike can like any number greater than zero, especially when cakes are involved.

I did this while Spike had more than one:
    I said Spike, because he was helping me taste-test Pinkie Pie's cake sequence.
    Pinkie Pie made the remainder of Spike and the cakes.
    When Pinkie Pie had not less than one:
        Spike made the product of Spike and too much cake, because he felt odd.
        Spike got one more, because he is a greedy dragon.
        I said Spike!
    That's what I did.
    Spike made the quotient of Spike and the cakes, because we were even again.
That's what I did.

I said the final value, because Pinkie Pie's baking sequence was complete!

Your faithful student, Twilight Sparkle.
 

Desmond

Destroy Erase Improve
Staff member
Admin
^What!! What is this! This is funny to read.
How to interpret the because statements?
From the link above:
Classes begin with the header "Dear", followed by the name of the parent class (Base class is "Princess Celestia"), and end with "Your faithful student,", followed by the programmer's chosen alias. Functions start with the text "I learned" followed by the function name and end with "That's all about" and a re-statement of the function name. The main function is denoted by placing the word "Today" before the initial "I learned".

Branching statements are supported in FiM++, as well as try-catch-finally blocks.

One thing that most sets this language apart is its strive to be layman-readable. To do this, it utilizes synonyms (e.g. a line can end in ., ,, ;, :, !, or ? depending simply on the coder's preference) and allows whitespace in class, function, and variable names.
 

Desmond

Destroy Erase Improve
Staff member
Admin
How to interpret the because statements?
I think it's interpreted something like this:
Spike made the product of Spike and too much cake, because he felt odd.
is equivalent to:
if spike is odd then spike = spike * too_much_cake

or something like this.
 

Nerevarine

Incarnate
*shakespearelang.com/1.0/

A New Beginning.

Hamlet, a literary/storage device.
Juliet, an orator.

Act I: The Only Act.

Scene I: The Prince's Speech.

[Enter Hamlet and Juliet]

Juliet: Thou art the sum of an amazing healthy honest noble peaceful
fine Lord and a lovely sweet golden summer's day. Speak your
mind!

[A pause]

Juliet: Thou art the sum of thyself and a King. Speak your mind!

Thou art the sum of an amazing healthy honest hamster and a golden
chihuahua. Speak your mind!

[Exeunt]
 

Desmond

Destroy Erase Improve
Staff member
Admin
Also not quite an esoteric language as the above examples, but there is Inform7 which is a natural language programming language that is used to create text adventure games: *inform7.com/

Code:
    "Straw Boater"

    Boathouse is a room. "A boathouse circa 1915, which -- though in poor repair -- still suggests Sunday afternoon jaunts taken by women in white gowns and men in straw hats."

    North of the Boathouse is the Shallow Water. The description of Shallow Water is "Just south is the boathouse, and beyond it are trees and the marble terrace of the house above. The water deepens to the north."

    North of Shallow Water is Deep Water. The description of Deep Water is "From here the boathouse has dwindled invisibly to the south, and you have a broad panorama of the shoreline, all the way down to the Skeleton Point Lighthouse in the southeast."

    A vehicle has some text called the movement sound. The sailboat and the motorboat are vehicles in the Boathouse. The movement sound of the motorboat is "VRRRROOOMMMM..." Understand "boat" as the sailboat. Understand "boat" as the motorboat.

    After going somewhere by a vehicle (called cart):
        if the movement sound of the cart is not "", say "[the movement sound of the cart][paragraph break]";
        continue the action.

    Instead of exiting when the player is in a vehicle and the location is not the Boathouse:
        say "You're not dressed for a swim."

    Instead of going somewhere when the player is not in a vehicle:
        say "You'd rather not try to make this journey by swimming alone."

    Test me with "n / get in sailboat / n / get out / s / get in motorboat / n / n".
 

Nerevarine

Incarnate
Also not quite an esoteric language as the above examples, but there is Inform7 which is a natural language programming language that is used to create text adventure games: *inform7.com/

Code:
    "Straw Boater"

    Boathouse is a room. "A boathouse circa 1915, which -- though in poor repair -- still suggests Sunday afternoon jaunts taken by women in white gowns and men in straw hats."

    North of the Boathouse is the Shallow Water. The description of Shallow Water is "Just south is the boathouse, and beyond it are trees and the marble terrace of the house above. The water deepens to the north."

    North of Shallow Water is Deep Water. The description of Deep Water is "From here the boathouse has dwindled invisibly to the south, and you have a broad panorama of the shoreline, all the way down to the Skeleton Point Lighthouse in the southeast."

    A vehicle has some text called the movement sound. The sailboat and the motorboat are vehicles in the Boathouse. The movement sound of the motorboat is "VRRRROOOMMMM..." Understand "boat" as the sailboat. Understand "boat" as the motorboat.

    After going somewhere by a vehicle (called cart):
        if the movement sound of the cart is not "", say "[the movement sound of the cart][paragraph break]";
        continue the action.

    Instead of exiting when the player is in a vehicle and the location is not the Boathouse:
        say "You're not dressed for a swim."

    Instead of going somewhere when the player is not in a vehicle:
        say "You'd rather not try to make this journey by swimming alone."

    Test me with "n / get in sailboat / n / get out / s / get in motorboat / n / n".
Yes this is something worth noticing. The rest are just replacements.
 

RumbaMon19

Feel Pain.
Reminds me of LOLCODE

*www.lolcode.org/


HAI 1.2
HOW IZ I POWERTWO YR NUM
BTW RETURN 1 IF 2 TO POWER OF 0
BOTH SAEM NUM AN 0, O RLY?
YA RLY, FOUND YR 1
OIC

BTW CALCULATE 2 TO POWER OF NUM
I HAS A INDEX ITZ 0
I HAS A TOTAL ITZ 1
IM IN YR LOOP UPPIN YR INDEX TIL BOTH SAEM INDEX AN NUM
TOTAL R PRODUKT OF TOTAL AN 2
IM OUTTA YR LOOP

FOUND YR TOTAL
IF U SAY SO
BTW OUTPUT: 8
VISIBLE I IZ POWERTWO YR 4 MKAY
KTHXBYE
 
Top Bottom