Category Archives: programming

Layers of Computing

A theory that crossed my mind when pondering the relationship between functions and threads.

Layers of Computing
1: memory, storage
2: address
3: data, pointer, array, class (Turing)
4: instruction, operation, expression(2GL)
5: function, loop, routine (3GL)
6: thread, process (4GL)
7: algorithm, solution, library(5GL)
8: application, product
9: operating system, language, I/O
10: computer, brain
11: intelligence
12: universe

Nonalphabetic Programming Language

Nonalphabetic programming language
called !!AB

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

PLURPS Programming Language Using Role-Playing Syntax

Just an idea to write code as if we are playing a RPG. Very initial brainstorm.

Terms:
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"

Example 2:

fight level 0
grind level < enemies.size
   attack goblin > 25
      hit
         enemies[level]
      miss
   done
   attack player.hp <= 0
      hit
        flee
   done
   level up
done

MTG Utilities: Mana

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

and their corresponding symbols:




Continue reading MTG Utilities: Mana

MTG Utilities: Overview

MTG Utilities is a plugin for WordPress that consists of three major functions to assist and enhance your blog:

  • Card links and images, using [ card ] [ /card ]
  • Deck lists, using [ deck ] [ /deck ]
  • Mana symbols, using [ mana ] [ /mana ]

Last updated 11-04-16 v2.0
DOWNLOAD Plugin from WordPress.org

Default URL to card database query:
http://magiccards.info/query?q=!
Default URL to card image query:
http://gatherer.wizards.com/Handlers/Image.ashx?type=card&name=

For more information, instructions, and examples about the MTG Utilities plugin for WordPress, please read the following posts:

MTG Utilities: Making of a WordPress Plugin

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.

Continue reading MTG Utilities: Making of a WordPress Plugin