!!AB : Creating Compile Language : Part 1


Per the original spec for my Nonalphabetic Programming Language –dubbedd !!AB or NOTAB– I have finally gotten around to trying to turn it into an actual usable product. First time around, I haven’t gotten used to Flex/Bison yet, so I didn’t get anywhere. But this time, I think I have a slightly better grasp, and have something that seems to work. I’ve read some tutorials, but still have a long way to fully understand the syntax and logical procedure and grand vision for Flex/Bison.

It’s still at a very early stage. The source code can be found at this git repository for NOTAB.


First area I started with is text output, so that I can see the results of the sample source code written in !!AB language. It will only accept double-quotes and not single-quotes/apostrophe to enclose strings–in order to not use up the limited number of nonalphanumeric characters, nor to use symbols in combinations that are not intuitive. (Like why do languages have comments and comment blocks delimited by // and /*? This makes no sense.) Per the specs of this new language, the early draft of my Flex code went something like this:

\"                { BEGIN(MODE_STRING); }
<MODE_STRING>[^\"]*  { yylval.sval = strdup(yytext); return STRING; }

The program always begins in the INITIAL mode.
tells Flex this is a mode that the program will enter and leave when it encounters specific text in the source. In this case, this mode will try to capture a string of text between two double-quotes “”. This is an exclusive mode –signified by %x– which means only rules beginning with this code —
— will be processed while the lexer is under this mode. (The other type is inclusive mode, signified by %s.)

When it sees a double-quote while not in MODE_STRING mode, it will turn on this mode. While in this mode, any character besides the double-quote is considered part of the string, including newlines. That means a string can span multiple lines.

This mode will end when it meets the next double-quote. Caveat is that the !!AB spec desires that double-quotes within strings be escaped as \”. However, this is not possible yet, since my skill with Flex/Bison is still very lacking. Although one idea is to create a temporary string variable when it first enters this mode. Then create a new rule to additionally capture \”. Finally when it leaves this mode (but not before), the entire string will be returned.


Also completed the comment system. Much simpler than strings concept. Allows both single- and multi-line comments. Single line comment begins with single-quote ‘, and will ignore the rest of the line. Multi-line comment blocks are enclosed within ‘[ and ‘].

Flex goes like this:

"'["		       { BEGIN(MODE_COMMENT); }
	[^'\n]*      // ignore anything that's not a '
	'+[^'\]\n]*  // ignore ' not followed by ]
	\n           { ++line_num; }
	'+"]"        { BEGIN(INITIAL); }

'[^\[][^\n]*		; // comment, ignore rest of line

I designate a second mode for block comments. It initiates when it detects ‘[. It ignores pretty much every character while in this mode. The new line is to keep the line number for debugging, so you know the line number of the input source when you get an error.

There are two different checks during this mode. The comment mode exits when it meets ‘]. So you can have series of ‘ with or without a trailing ]. Therefore check both conditions to get the desired behaviour.

Also to ensure single line comments don’t interfere with multi-line, it must check against the opening bracket [ that starts multi-line mode.

Test Source

Here is the test source file written to the specs of the new language. It seems to work as expected.

$< "Hello Master " + "Xayvir."

$< "What about
$< "Or \n escaped newlines?"

$< "!!AB is such a \"great\" programming language" ' aka NOTAB

$< 890 + \
" beers on the wall."

$< "I have " + 11.01 + " dollars." 'US dollars

comment block

$< "Flavor text with" + '[ this should not appear '] " inside comment block"

$< "What about unclosed string?"

While writing this post but before completing, I went ahead and read more materials on getting Flex to do more complicated strings and comments. https://www.cs.virginia.edu/~cr4bd/flex-manual/Start-Conditions.html. So the strings section in final program is actually more advanced than what is posted in this post. (You can read that site rather than me repeat them here.)

Counterproductive Forced Diversity

Fantasy, long before forced diversity was preached, was more interesting because the resultant diversity was limitless–anything was possible, yet natural and fluid.

Unfortunately, with forced diversity, now there are restrictions to diversity, to fantasy, to imagination. These diversity advocates put in rules to how diverse or not your characters are. So when you see something out of the norm, you’ll be more nonchalant and think “okay so that’s the quota used here”; instead of just appreciating the fantasy, the creativity, the uniqueness of characters that go deeper than skin and race. After forced diversity, creators focus too much about tangible, visible, shallow traits.

Cantonese will not be endangered for a very long time

Cantonese will not be endangered for a very long time. Even in China mainland, its status is right behind Mandarin. There are a lot of arts I.e. music, movies, TV that heavily focus on Cantonese from Canton province and Hong Kong. Some award shows in Canton (and obviously Hong Kong) have separate categories for Cantonese and Mandarin. Thus as long these forms of media is popular on the internet and popular culture, the language will continue to flourish. Furthermore given that Hong Kong and Macau are special areas where the government has minimal interference, and thus doesn’t force them to prioritize Mandarin to replace Cantonese.
Continue reading Cantonese will not be endangered for a very long time

Shallow Theme Park MMOs

How about these shallow theme parks games with tedious “quest” hubs? Quest my ass, these are nothing but copy/paste list of chores. It’s worst than being a temp worker doing menial jobs from a headhunter office. It feels more like players are oxen being led by the nose, doing these boring menial tasks, mindlessly being stuffed with fodder until you want to vomit.

Quests should feel epic, but these quest-based games have zero sense of epicness. “Go ten feet over there and pick vegetables from my garden.” wow epic quest. “I’m donning my legendary sword and armor…to go farming?” Quests don’t feel adventurous, meaningful any more. You just go from place to place to serve these forgettable NPCs. I did a bunch of quests in so many other MMORPGs, but I can’t tell you the how, what, or even why I did them. Because they told me to, like I’m their damn intern or servant. FFXIV even call them duties. Like it’s my duty as an adventurer to serve these useless NPCs.

This quest grind is more boring and lame than just camping. Which BTW AC2 had a very nice balance between quests and camping. Both types of gameplay are enjoyable in AC2. Really great liberty to play however you like.

Anyway, AC2 quest felt organic, had natural flow. It wasn’t all “do step one, return to me, do step two, return to me or go to next NPC.” Stupid choppy back-and-forth is disorienting, mind-numbing. No, instead, each part of AC2 quests flowed smoothly from step to step. Some steps were more involved. So devs allowed more freedom for players on how they want to pursue their goals.

Open-ended, organic, smoothly flowing, liberating, involved, mindful, purposeful–these are keywords to describe AC2 style of quests.

Suspense in Combat

I’ve tried dozens of MMOs, and still nothing comes close to capture the experience, spirit, and atmosphere of Asheron’s Call 2. Open, seamless world, dropping items onto the environment, unique races and classes, etc.

But the crucial difference for me why those other games don’t hook me: lack of suspense in combat. So many games’ combat is based on trite, mindless, repetitive action. But action by itself doesn’t connect deeply with the player.

What is missing from these games is suspense, which AC 2 somehow was able to evoke. Kind of hard to explain–it has to be experienced personally: a real sense of dread, of impending failure, of “oh so close, please don’t die!”. It’s an experience that cannot be emerged by endless action and quick reflexes. There has to be more than just action; memorable experience (in games, books, movies alike) has to bring about a sequence of strong emotions, like peril, fear, belief, celebration.

Alas, it’s apparently almost impossible to find the same feelings in other MMOs (the many that I’ve tried) as I did in AC2. An essence of human experience that is absent, forgotten; something that cannot be implemented, replicated or replaced with better technology, skill, and flash.

TablesPlus plugin

TablesPlus plugin for WordPress

Alternative ways to create tables.
See Lightweight Markup for how to format tables.
For VSV format, read Versatile Separated Values



Name Score 1 Score 2
BEAKL 8 104 132
BEAKL 9 120 144
BEAKL 10 44 99


Name Score 1 Score 2
BEAKL 8 104 132
BEAKL 9 120 144
BEAKL 10 44 99

Name Age Gender
Hammie 20.5 F
Chow, Vivian 40 F
Amuseum 25 M
Shena’Fu 18+5/12 F
Grndr-1245 21 months
Fairy Nuff 14 K N/A

Continue reading TablesPlus plugin

My NBA All-Time Dream Team

Team #1

PG – Stephen Curry
SG – Michael Jordan
SF – Lebron James
PF – Tim Duncan
C – Wilt Chamberlain
Coach – Phil Jackson

All of them excel at both offense and defense. All of them are winners and team players. There is nothing this team can’t do.

Chamberlain, Jordan, Curry led their teams to record-setting wins per season. Duncan also posted several 60+ wins seasons. Amazingly, they perform even better during the playoffs, when it counts.

Offensively, this team is a beast. Combine for 19 times scoring champions: Jordan 10, Chamberlain 7, James and Curry 1 each. Jordan, James are the most efficient players in the game. In terms of PER, Jordan #1, James #2, Chamberlain #5, Duncan #13, Curry #20.

Curry is the best shooter ever. He’s a real threat at the perimeter, dropping 3s like nobody’s business. Jordan, James are decent enough at 3s; they shoot better during playoffs. With practice and adjustments, James can be a reliable 3-point shooter. Even if they miss, they can rely on Chamberlain to get the rebound; he owns the career rebound record, plus 11 rebounding titles.

Defensively this team are serious contenders. Combined All-Defensive First Team 24 times. Jordan 9, Duncan 8, James 5, Chamberlain 2. (This award only began 5 years before he retired.) Combined 4 times steals leader: Jordan 3, Curry 1. Duncan is all-time playoffs block leader by a good margin, and 5th in regular season. (Chamberlain retired before they started recording blocks, but he would’ve been up there.)

Hierarchy: A Magic Variant

Rarity Matters = ‘Hierarchy’

Consider that 60 cards is same amount as four 15-card booster packs. Then consider the rarity of the cards you’ll get from opening those fresh packs.

With four packs, you get 1 mythic, 3 rares, 12 uncommons, and the rest commons. These new rules similarly restricts deck building by following the same ratios for a minimum 60-card deck. A deck can have any amount of commons and Basic Lands.

Additional rule: no more than three (3) copies of any card except Basic Lands.

Each additional 15 cards in your deck beyond 60 cards grants another 1 rare and 3 uncommons. For each additional 60 cards of your deck size, you may include a mythic instead of a rare.

You can trade from higher rarity for same ratio of lower rarity, or vice versa. That means you can omit 1 mythic for 3 more rares or 12 uncommons. Omit 1 rare to add 3 more uncommons. In reverse, you can trade in 3 uncommons for 1 rare or 12 uncommons for 1 mythic. Likewise, trade 3 rares for 1 mythic. Fill vacancies with commons or basics.

A card’s rarity is based on its latest printing in a core, expansion, or draftable set that are legal for that format. This includes supplemental draftable products like conspiracy and masters.

These rules can be applied to official and unofficial formats. So you can have Hierarchy Standard and Hierarchy Modern, etc.

Games & Design, MTG, Idols, Hacking, Ergonomics