around the world

The developer created the programming language Rockstar. Programs on it look like 80’s lyrics

The programmer wants recruiters to stop looking for “rock-stars of development.”

AC / DC, photo by Associated Press
AC / DC, photo by Associated Press

British developer Dylan Beattie (Dylan Beattie) created the programming language Rockstar, based on rock songs of the 80’s. To write on it, you need to know the lyrics of hits of the end of the last century. Language description and specification Beatty published on GitHub.

According to the developer, Rockstar “is created to develop programs that at the same time are lyrics.” Beatty said that he came up with a language that recruiters would no longer call developers “rock stars” and indicate this in job openings.

Because if we make Rockstar a real (and completely meaningless) programming language, then recruiters will no longer be able to talk about “rock-stars of development.” Besides, it’s funny.

Dylan Beattie

The developer noted that if his language starts to use, then you can make stickers. Because “who does not want a sticker on the laptop with the inscription:” certified developer-rock star. “

Beatty described the syntax of the language in detail. According to him, Rockstar gives programmers an “unprecedented level of poetic liberties” when it comes to “the composition and structure of their programs.”

Unlike other languages, the use of comments in Rockstar is “strongly discouraged.” But if you still want, then the developer advises using parentheses: in this case they can not be used for complex arithmetic expressions. Also, do not try to be brief.

It’s rock’n’roll: the audience will find its own meaning.

from the specifications of the programming language Rockstar

The language also supports variables. There are two ways to declare and use them in Rockstar. “Classic” variables start with one of the keywords: a, an, the or my. After this, you can specify a unique name for the variable, which must be typed exclusively in uppercase letters from a to z.

“Nominal” variables should be called as proper names and start with a capital letter. They can contain as many spaces as there are large letters in them.

Such variables developers can use to create customer IDs, tax rates or distances in kilometers. In this case it is recommended to use the names of famous songs 80, e.g., Tommy, Gina, Doctor Feelgood, Mister Crowley, Kayleigh, Tom Sawyer, Billie Jean and Janie.

Variables do not need to be declared beforehand – they are dynamically typed. And with the help of pronouns he, she, it, and the other can be used to refer to the last variable.

Also in the language are the types of variables, which are based on ECMAScript system, but the value undefined «did not sound too rock ‘n’ roll”, so it was replaced with a mysterious ( «weird»).

Types of variables in the Rockstar language

  • Mysterious – the value of any variable that does not have a value is indicated by the word mysterious.
  • Null (“empty”) is an empty type. Is equal to zero or false (“false”). The keywords nothing, nowhere and nobody are recognized as null aliases.
  • Boolean (“Boolean”) is a logical type with two values: true (true) or false (“false”). Right, Yes and Ok are True aliases. Wrong (wrong), No (“no”) and Lies (“lies”) are False aliases.
  • Number (number) – numbers in Rockstar are stored using the digital type DEC64.
  • String (“string”) – strings in Rockstar are sequences of 16-bit unsigned integers in UTF-16 encoding.
  • Object (“object”) – a set of named data properties, as in ECMAScript.

A single quotation mark in Rockstar is considered as a letter of the alphabet. According to the developer, this sounds unusual “until the programmers remember that” I is not talkin ” bout love “- an ideal rock and roll offer.”

Arithmetic operations in Rockstar are performed using the operators plus (“plus”), minus (“minus”), times (“times” – multiplication), over (“through” – division) and keywords with (“with”), without (“Without”), of and by, which duplicate functions.

Arithmetic Examples in Rockstar

  • Put the whole heart in my hand “- multiply” your heart “with” everything “and assign the result to” my hands “
  • My world is nothing without your love – Create my world with the result of subtracting your love from scratch

In addition, one of the features of Rockstar – “poetic literals”, allowing you to express “monstrous melancholy and designate a variable.” For example, using them, assigning a variable value of 100 looks like a string from a rock hit of the 80’s – “Tommy was a lovestruck ladykiller” (“Tommy was a heartbreaker in love”).

An example of a primitive task FuzzBuzz in Rockstar language
An example of a primitive task FuzzBuzz in Rockstar language

Beatty also described several ideas, for example, distributing stickers “certified developer Rockstar” to anyone who can write at least one line in the language, and also generate an account using the lyrics in the code.

In December 2016, the students of St. Petersburg College created a programming language “for gopnik” YoptaScript

Back to top button