Nonalphabetic programming language
Programming language where common and simple operations and expressions (excluding variables) are typed with non-alphabetic symbols. Allows various programming paradigms, including procedural, object oriented, and functional. Balanced ternary is the base for logic and digit operations. Decimal numbers are preferred for human readability. Array index starts at 1.
Continue reading Nonalphabetic Programming Language→
PLURPS – Programming Language Using Role-Playing Syntax
Just an idea to write code as if we are playing a RPG. Very initial brainstorm.
Class – class
New instance – create
Delete instance – kill
If – attack
Then – hit
Else – miss
Function – skill
Parameters – targets
Return – result
Switch – menu
Case – option
Array – group
Add to array – join
Delete from array – leave
For – fight <stat> <value |number>
Next in loop – grind
Increment – up (<stat> up <optional number|default 1>)
Decrement – down (<stat> down <optional number|default 1>)
Break – flee
Continue – skip
Variable – stat
Integer – number
String – quote
Local – melee
Global – ranged
End block – done
True – yes
False – no
Output – say
The following examples may or may not be valid. Only to show what it could or should look like.
Example 1: say "Hello World"
fight level 0
grind level < enemies.size
attack goblin > 25
attack player.hp <= 0
The code for inserting mana symbols is [ mana]cost[/mana]. Put the entire cost inside. Hybrid halves and Phyrexian mana should be separated by a slash ‘/’, in any order. Use 2 for monocolor hybrid and P for Phyrexian. Put a semicolon between the numbers if there are two consecutively, but want them to show up separately.
These are the valid letters, numbers, and hybrids that can be used within the mana tags:
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
b c e g h i p q r s t u w x y z
w/u u/w u/b b/u b/r r/b r/g g/r w/b b/w u/r r/u b/g g/b r/w w/r g/u u/g
2/w w/2 2/u u/2 2/b b/2 2/r r/2 2/g g/2
p/w w/p p/u u/p p/b b/p p/r r/p p/g g/p
The coding for making card links and deck lists is completed. This page will teach you how to use them in your posts. Besides typing the shortcodes, you can also use the corresponding buttons on the toolbar when creating or editing your post.
Since this is a blog, I shall blog about the process of the creation of a WordPress plugin that provides basic utilities for Magic: the Gathering blogs (such as the one you’re reading now). This plugin I shall dub “MTG Utilities”. There are a few MTG plugins out there and together they seem to work fine. But I want a single plugin that provides what I need and it should be somewhat customizable and flexible. The main code will be ported from my mod I made for Simple Machines forums.