Plebeian Grandstand – False Highs, True Lows

a3878634671_16
True Lows. The more i’m listening to this album the more i’m getting deeper into a chaotic abyss. A black hole which devours everything. Even light can’t escape. Abyssmal forces reign over all types of matter.

Over the years black metal has evolved. And make no mistake, it is still evolving. Artists throughout the world have reshaped it, deconstruct it and then reconstruct it, producing some albums that can now be called as classics. Personally, this continuous experimentation excites me a lot. Sometimes it is impossible to predict what artists will come up with.

Plebeian Grandstand is not your typical black metal band. Believe me, it’s not. The first album i heard from them was Lowgazersnamely their previous album. That album was pure gold. It revealed to me a band that was creative, inspired and with a will to take things to another level. For the record let’s just say that Plebeian Grandstand is a black metal band, formed in Toulouse, France back in 2005.

This month they released their new, full length album called ”False Highs, True Lows”. You can find eight songs inside this album. What we have here is a blend of mainly black metal, hardcore and some noise ambient. In my opinion this album is the definition of cold sound as it was shaped back in late 90’s and early 00’s. Remember albums like ”Thorns”, ”Rebel Extravaganza” and ”666 international”? The way i see it, the band from Toulouse filtered this sound and created their own style. In ”False Highs, True Lows” i think they distanced themselves a bit from mathcore, moving even closer to black metal. You’ ll find no comfort here. Only eight nihilistic hymns. Prepare thy self to get lost in some grim and eerie soundscapes. Forget everything you know and just experience this album.

”False Highs, True Lows” is an excellent album and probably one of the best albums i’ ve listened to in months. Black metal fans dig in:

Advertisements

Necrot – The Labyrinth

Necrot-1500x1500
Today is going to be about brutal, death metal. Necrot is a three piece band from the United States. On April they released their new, full length album called ”The Labyrinth”. Eight tracks form an album of good ol’ death metal. You know it’s going to get ugly with an album cover and song titles like that (take for example ”Contagious Pain”). In my opinion, these guys here are not interested in changing the way you think of death metal. But they sure as hell know their craft. ”The Labyrinth” is of course beyond heavy. Find here excrutiating riffs, blastbeats which we all love and awesome death metal growls. Apart from that i have to say this album took me back in the day when this music was the shit. I liked all eight tracks but if i had to pick a favorite one that would have to be either ”Scattered” or ”The Abyss”. Overall i must say i enjoyed this album. I also think if you’ re into death metal you’ re going to enjoy it too. Here are some links where you can also listen to ”The Labyrinth”:

10 signs you’ re getting older

Yes, it’s true. We’ re getting older. Here you can find some of these signs. It’s perhaps one of those times where you simply say ”damn, i hadn’t realized that. Facts go in no particular order.

Number 1: ”Master of Puppets” came out thirty years ago

It’s true. It actually came out on March 3, 1986. I mean, think about it. Thirty years. Damn….

Number 2: Many of your favorite bands have decided to call it quits

Unfortunately these things happen. Personally i wish Isis was still around.

Number 3: New bands have emerged but apparently you have no idea.

I don’t know about you, but it happens to me a lot. I mean people talk about their favorite bands and they mention names like Thy art is murder or Asking Alexandria and i’m like ”I’m terribly sorry, i’ ve no idea”.

Number 4: I’ve seen Kobe Bryant getting drafted and then retiring from basketball.

That makes me feel a bit old.

Number 5: In a gig you now prefer siting in the back, or by the bar.

Personally, yes most of the times i now sit in the back.

Number 6: Some of your favorite venues are now closed.

This used to be Rodon club in Athens. Many big heads have played here (Ramones for example). I’ve seen many bands here. Bands like Sepultura, Iced Earth, Dimmu Borgir, Paradise Lost, e.t.c. Now it’s a super market.

Number 7: Some modern expressions make no sense to you.

You know what i’m talking about. Rofl, swag and other stuff like that.

Number 8: You’ re still buying records, when most people nowadays don’t.

Also there aren’t many record stores left.

Number 9: ”When i was a kid, we had no smart phones or internet”

That’s true. Kids these days have these stuff and we have become older.

Number 10: Some statements may shock you.

It happened to me and clearly i didn’t expect it. It happened about a year ago inside the bus.

Random high school kid: ”What are you listening to ?”

Me: ”Slayer”

Random high school kid: ”I’ve heard of this slayer but i’ve never listened to any of his songs”

Me ”……..”

Clara Engel – Visitors are allowed one kiss

a2377321086_10
According to claraengel.net, Clara Engel is an independent, multi-faceted artist and musician based in Toronto, Canada. This april she released her new album called ”Visitors are allowed one kiss”. This album also features many musical guests like Thor Harris and Aidan Baker. You can find five songs here. Her music is rather dark and atmospheric, that’s for sure. There’s a feeling of sweet melancholy throughout her songs. Nevertheless there’s one thing here that no one can deny. Clara has some serious vocal skills. She has a beautiful voice. First track is called ”Swans”. It’s an interesting track no doubt. It’s like an entry to a thorny, mystical pathway. ”Uneasy Spirit” is more of a country, folkish song if you will. ”Swallow me” is perhaps the album’s best track. And that’s because Clara’s voice sounds here more enchanting than ever. It’s like a forest elf singing somewhere in the Tolkin cosmos. The thing is we’ re dealing here with five good written songs. To be perfectly honest this music is not exactly my thing but in my opinion it’s definitely good music and worthy of your attention. Below this text you can find some links where you can also listen to ”Visitors are allowed one kiss”. Have you already heard this album? What did you think about it? Feel free to leave a comment in the comment section.

Code Generation with C preprocessor

In this article, i will present you one quite neat technique which could allow someone to utilize C preprocessor‘s power in order to dynamically generate content for his data structures based on the content of a generated text file.

Before showing & explaining the demo code, it would be nice first to share some background information regarding the technique & its objectives. The latest project that we were assigned at work is the implementation of a compiler, which will compile a text file containing source code of that specific language. I won’t dive into detail about the language’s syntax, all i could say that it is an imperative language, such as C.

In order to have a compiler, the first thing you will need to do is to be able to read characters from an input stream & parse that input. The input text should conform according to the rules of the grammar of that specific language. In order to write his own grammar for her language, a compiler maker could use a combination of Lex/Bison/Yacc or Antlr4. In our case, we selected Antlr4, a quite modern, fast & neat parser generator. Antlr accepts as input an Antlr4 grammar file & generates code that could parse input text that conforms to the grammar that we specified in our grammar file. The generated code’s programming language could vary based on your preference, Antlr4 can spit a lexer, a parser, a listener and a visitor class files in C#, Python, Java & Javascript. In addition, it generates a token file, containing all different tokens that are accepted by our grammar’s rules. A token is a word that consists of one or more characters that is accepted by our parser. For instance, if in our grammar, a multiplication rule exists such as the following:

MULTIPLICATION: ‘*’;

the token file will contain the following line:

MULTIPLICATION = 1

which means that the token ‘*’ has been assigned the rule label ‘MULTIPLICATION’ that has token id equal to 1, because our grammar consist of just one rule, the multiplication rule. If we decide later to extend our grammar with an additional rule, let’s say the division rule, we will add the new rule

DIVISION: ‘/’;

and rerun Antlr. The generated token file will now contain two tokens,

MULTIPLICATION = 1
DIVISION = 2

Each time we extend our language with new rules, new tokens are generated. We will need a way to handle dynamically generated tokens for our language; if someone could remove a rule from your grammar by mistake, the syntactic analysis part won’t be in synchrony with the semantic analysis part anymore, and this will be not good at all.

Imagine now that you would like to encapsulate all different tokens in an enum class, which will be named TokenType, which will be a private member of our Token class. You would like this enum class to be populated with all different tokens, each time Antlr parses the grammar file & generates a token file. The enum class will contain exactly the tokens contained in the token file. How someone could do that, without parsing anything in just a few lines of C code? Well, by using the C preprocessor of course!

Demo

1. Preparation – Convert the token file

We reconsidered our small grammar containing only a multiplication & a division rule, and we added some additional rules and we concluded with the following rule set of our demo grammar file (it is not valid Antlr4 code, just demo).

ADDITION : ‘+’;
DEDUCTION : ‘-‘;
MULTIPLICATION : ‘*’;
DIVISION : ‘/’;
LEFT_PARENTHESIS : ‘(‘;
RIGHT_PARENTHESIS : ‘)’;
INCREMENT : ‘++’;
DECREMENT : ‘–‘;
POINTER_ARROW : ‘->’;

From this grammar file, Antlr generated the following token file

ADDITION = 1
DEDUCTION = 2
MULTIPLICATION = 3
DIVISION = 4
LEFT_PARENTHESIS = 5
RIGHT_PARENTHESIS = 6
INCREMENT = 7
DECREMENT = 8
POINTER_ARROW = 9

In order to make our technique to work, we will need to convert our token file in the following format:

TOKEN(ADDITION,1)
TOKEN(DEDUCTION,2)
TOKEN(MULTIPLICATION,3)
TOKEN(DIVISION,4)
TOKEN(LEFT_PARENTHESIS,5)
TOKEN(RIGHT_PARENTHESIS,6)
TOKEN(INCREMENT,7)
TOKEN(DECREMENT,8)
TOKEN(POINTER_ARROW,9)

You will see later why we needed to perform this conversion. The converted token file will be named tokens.inc

2. Populate the token types

Our Token class contains the enum class NodeType, which enumerates all detected token by our parser. This is possible, by including the tokens.inc file which is interpreted by the C preprocessor as a #define function style definition. For each TOKEN(a,b) statement of the tokens.inc file, a new enumeration is added to our enum class NodeType; each label (a) of the enum is initialized by the value of each token (b). In the end, we discard the TOKEN definition. Of course, the label of the definition could be whatever;i just used the word TOKEN for convenience.

#include <iostream>

class Token  {
public:
    enum class TokenType  : int {
    	#ifndef TOKEN
    	    #define TOKEN(name,value) name = value,
    	    #include "tokens.inc"
        #endif
        LAST
    };
private:
    TokenType m_Type;
public:
    Token(TokenType type) : m_Type(type){}
    int getNumberOfTokenTypes() {return static_cast<int>(TokenType::LAST) - 1;}
};

int main(int argc, char**argv)
{
    Token token(Token::TokenType::MULTIPLICATION);
    std::cout << token.getNumberOfTokenTypes() << std::endl;
}

Another nice thing that i wanted to show, is the LAST token type that i have added after the “initialization list” of the token types. By adding that last type, we know the amount of different available token types. The cpp file instantiates a multiplication node and prints the amount of available types (Toke::TokenType::LAST – 1). Consider that if the token type MULTIPLICATION for some reason is not included in the tokens.inc file, the cpp program won’t compile.

In our case & by using the previous grammar, by compiling (g++ -std=c++11) & running the cpp executable, we get:

gclkaze@tzertzelos:~/Tzertzelos/Scriptz/C++/PreprocessorPower$ ./a.out
9

If i remove the last rule (POINTER_ARROW) & run the cpp program, we will get:

gclkaze@tzertzelos:~/Tzertzelos/Scriptz/C++/PreprocessorPower$ ./a.out
8

The amount of available types changes based on the content of the tokens.inc file, that is generated based on the most recent Anltr4-powered grammar.

I found it quite powerful to be able to generate code content in such an easy way, with just using a conditional include statement and a define preprocessor directive & just utilizing the C preprocessor, such a neat & concise solution.

Hope you enjoyed & learned a thing or two,

if you already knew, even better,

kazeone

Links

Antlr4ANother Tool for Language Recognition

Yacc : Yet Another Compiler-Compiler

Bison : The YACC-compatible Parser Generator

Lex : A Lexical Analyzer Generator

C preprocessor

enum class (C++11)

Syntactic analysis(Compiler Construction)

Semantic Analysis (Compiler Construction)

Music

Cult Of Luna – Salvation