Apr 052011
 

One thing has become remarkably clear over the last while – that the old "left and right" division of political views is frankly meaningless today. Left and Right represent almost directly opposite viewpoints between the US and Europe for one thing and the names talk about the two major viewpoints in politics as they existed shortly after the French revolution – while ignoring most of the nuances that real people tend to think and actively encouraging the most annoying problem in modern politics – which is to split all of politics into a simple two-sided coin without consideration for the fact that somebody may feel different on a specific issue (or set of issues) to how he feels about others. 

The political compass attempts to address this and makes a good effort with fairly solid scientific criteria, but it occurred to me while preparing a character for a new dungeons and dragons campaign yesterday, that DnD has actually already achieved almost the exact same summary of views as the political compass – and done so much more concisely.

The only tricky bit is that in real life, nobody ever admits to being evil – especially the ones who are, but then – which insane warlord has ever called himself an insane warlord ? But if you look at how the word is defined in DnD it's really not that wrong. DnD declares alignment on two axis – the first refers to your approach to law, order and authority (this is the equivalent to the compass's north-south axis) and the second refers to how the characters treat other people (good, neutral, evil). 

For those not into DnD let me explain how these alignments work and how they combine. The legal alignment comes in lawful, neutral or chaotic.

  • Lawful characters are absolutely obedient to laws and authority, they believe in order above all and never question the status quo. The most difficult thing for a lawful character to ever do would be to question his superiors. Knights would almost always play lawful characters.
  • Neutral characters pragmatists. They see the law as useful and needed, but not as something to  admire or revere – they will question laws and work to end bad laws. If authority is wrong they will question it, but they won't actively lead a rebellion except as a last resort. Many classes fall in this area, a typical wizard for example will often be neutral.
  • Chaotic characters are actively opposed to all forms of law and authority and will actively and deliberately ignore rules and work against authority whenever they want to.

Then there is the social alignment:

  • Good characters are primarily concerned with the welfare of others. They are selfless about working to defend the weak, feed the hungry and all their actions are governed by intensely caring attitudes toward others. Almost all healing classes are aligned as good.
  • Neutral characters are unconcerned with other people's welfare – they won't go out of their way to help others, but they don't actively try to harm them either (unless the gain is very good) They care about their own success and believe that the success and happiness of ever other member of society is their own responsibility.
  • Evil characters are selfish and care only for their own advancement and needs. They will actively and readily harm others to get their way. If somebody has something an evil character wants, they will take it, even if they have to kill the other person to get it. 

These are then combined to create a particular type of character. Some make great sense, some combinations need a bit of thinking about. Lawful good characters are often public protector types, part of the system – believing that over-all the social structures benefit others and working for the good of the people in them while obeying orders meticulously.

Lawful evil characters obey the rules, but actively harm or exploit others – the head enforcer of a corrupted state who actively enforces draconian rules passed from above would be a perfect example of a lawful evil character.

Chaotic evil is the one most GM's actively try never to deal with as they are a nightmare in campaigns. Only caring for themselves they disobey laws and orders they don't feel like and will harm others (including party members) for personal gain whenever they feel there is a gain to be made. This is the thief without honor.

Now taking this approach out of the DnD world and applying it to politics can be a fun (and sensible) way I think of considering how political ideas and systems (and people) work, and interact with each other. Let's take some examples:

Lawful Good: The Dalai Llama is a good example of this. Living by a strict code of behavior himself but altruistic and peace-loving in the extreme (fighting for his people through strictly pacifist means) – these are the hallmarks of lawful good at it's strongest. Ghandi would be another example. A less extreme example would be U.S. President Barack Obama. A holder of authority (and in some ways an expander there-off) who believes in the validity of that authority and the rule of law, but ultimately with what seems to be a genuine concern for the welfare of his people. 

Lawful Neutral: This is the typical modern day American Republican and hardcore capitalist. They are authoritarian about social norms and other matters which many would consider to be personal choice, while being highly against regulations about economic or social welfare matters as they believe that in these case individual choice and responsibility are all that matters. Their neutral economics are not per se harmful (nor is it good) but it does have the downside of actively enabling those who are evil. By not wanting constraints on any economic activity – they remove the constraints that stop others from acting with evil intent.

Lawful Evil: This is the ones who take authoritarianism to extremes and create police states where the rule of law is absolute and unquestioned, civil rights have disappeared and the people live in fear. Stalin, Hitler, Pol Pot … most of history's greatest butchers in fact were lawful evil. Lawful yes, because they believed and promoted the power of the state, evil because they abused that power at the expense of their own (and other) people. Another variation would be Al Queda. Believing in an absolute authority and law system  – to the point of their willingness to murder and terrorize all who do not agree with it. 

Neutral Good: Nelson Mandela is the obvious example. He wasn't lawful – since he actively rebelled against a legal system he was opposed to (to the point of committing high treason in fact), but his intentions were the betterment of his people. Later he would go down in history for his forgiving and reconciling attitude to the people who had harmed his people in the first place. I can think of hardly a better example of Neutral Good and how he interacted with the Lawful Evil of the system he replaced once he was in power only strengthens that. 

Neutral Neutral: The perfect middle of the road pragmatist. You will find something like this in the system of the Netherlands for example. Where laws are lax on things that do not really affect other people  – but considered important in the matters that do, and society is generally caring but not outright socialist. This is about the closest I can find, Netherlands may actually be too far to the "Good" side to qualify, it's a tricky one and seems to have very few true adherents. Perhaps proving that all people have biases and true pragmatism is somewhat of an idealistic proposal.

Neutral Evil: Jacob Zuma. Most other corrupt politicians. They aren't chaotic – they form part of the power structure and promote it and obey it's laws when convenient, but will disobey if there is sufficient personal gain. Due to their position – this disobedience for personal gain must inevitably harm others, since they know this and don't care (in fact they do not wish to see upliftment for their people as it would weaken their powerbase) – this makes them evil.

Chaotic Evil: The bad guy in XXX. This is the character whose insistence on anarchism is both extreme and selfish, they do not believe their freedom should be constrained by "not harming others" and will actively seek the destruction of all power and authority systems even at the cost of innocent lives. I used a fictional example first as it's easily recognized but make no mistake that plenty of real examples exist. Timothy McVeigh was chaotic/evil aligned.  All corporations are Chaotic Evil. They flaunt and disobey laws whenever they can, and care only about one thing: profit. They are in fact legally constructed not to be allowed to be anything but this.

Chaotic Neutral: American Libertarianism (or Capitalist Libertarianism), this is the realm of those who believe in true individual freedom without concern for others. They aren't intent on harming others but believe that other people's happiness and success are their own responsibility and society must not enforce any systems to care for and uplift them – leaving all charity down to personal choice. Chaotic Neutral thinkers tend not to be particularly harmful themselves but like Lawful Neutral they actively enable Chaotic Evil by removing any barriers to their operation.

Chaotic Good: This is the realm of Joseph Proudhorn and all European/Socialist Libertarians. This is the thinking style that true equality must be both civil and economic to be meaningful. This is very much the philosophy I personally ascribe to. Chaotic Good politics want to see the greats possible (if not complete) removal of state authority, deeming all laws ultimately harmful and preffering direct-democratic systems to govern communities on a small scale with instantly recallable structures to prevent power build-ups which can be abused. Deeply concerned with the welfare of their fellow man they reject the enablement of chaotic evil people and enterprises and will instead  promote cooperations and worker-owned business over all else as fair and just ways to do business for the benefit of all rather than the few and to prevent the role of "manager" from simply being yet another type of authority to abuse.

 

See ? It works !

 

May 242008
 

Dear Scarlet,
Let me say first of all that you are a pretty talented actress. In fact, very few actresses with as much looks as you are that good at actually acting. You could have gotten by on your looks, but instead, you chose to learn to act. I respect that.

However. In the name of all that is good and holy. Please do not ever try to sing again. You suck at it.

May 052008
 

After nearly 3 months of very hard (and secret) labor, I can finally reveal my latest project. GeekBling a South African based online T-Shirt shop with a specific focus on computer programmers, savvy users and other geeks of various degrees.

It’s all about pride, and living life passionately. Check it out.
Ifyoucan

Apr 232008
 

Just to prove how crazy IRC can get sometimes.

[01:12] <silentcoder> Kernel: Warning, IRC conversation level dangerously low
[01:12] <Myke> BUKKITS!
[01:12] <UmbralRaptor> .match skippy generate
[01:12] <sporksbot> I don’t know anything about skippy matching generate.
[01:12] <UmbralRaptor> .match skippy asking
[01:12] <sporksbot> [skippy] (1/1) * skippy takes note: asking stupid questions and generally being clueless about something creates activity in chat channels…
[01:13] <Myke> Where’s mai bukket?
[01:13] <silentcoder> mmm
[01:13] <silentcoder> right
[01:13] * silentcoder hides Myke’s bukkit
[01:13] <UmbralRaptor> Myke: /dev/null/
[01:13] <silentcoder> rofl
[01:13] <UmbralRaptor> (or did you want something other than the bit bucket?)
[01:13] <silentcoder> UmbralRaptor:++
[01:14] <mostlyharmless> cat /dev/random >> /dev/null/
[01:14] <mostlyharmless> that should fill mah buckkit!
[01:14] <silentcoder> cat | icanhascheezburgr.coom
[01:15] <silentcoder> hah
[01:16] <silentcoder> cat /dev/lol ?
[01:17] <shminux> heh
[01:16] <silentcoder> cat /dev/lol ?
[01:17] <shminux> heh
[01:17] <Myke> /dev/lol!
[01:17] <Myke> someone needs to make a patch
[01:18] <Myke> [19:17:52] 0 root@fulgidous:/dev$ file /dev/lol
[01:18] <Myke> /dev/lol: character special (0/0)
[01:18] <silentcoder> mmm, I reckon /dev/lol should be randomly symlinked to another device file on any stat call
[01:19] <silentcoder> so if you cat to or from /dev/lol you can never predict what exactly will happen
[01:19] <dfranke> Myke: I’d so do that if I had the time.
[01:19] <silentcoder> you could dump /dev/fb to a file
[01:19] <silentcoder> or overwrite /dev/sd1
[01:19] <krikkert> Or send output to /dev/monitor ?
[01:20] <krikkert> ;p
[01:20] <silentcoder> funny no ?
[01:20] <shminux> that’s no lol
[01:20] <Myke> guys
[01:20] <Myke> c’mon
[01:20] <silentcoder> shminux: it is if you like to live dangerously
[01:20] <silentcoder> oh, and default to world writeable
[01:20] <Myke> $ cat /dev/lol
[01:20] <Myke> It’s a lolcat
[01:20] <Myke> …
[01:20] <silentcoder> I invented it
[01:20] <silentcoder> I know that
[01:20] <silentcoder> hah I got it
[01:21] <Myke> …
[01:21] <silentcoder> /dev/lol should on read fetch the latest lol from icanhazcheezburger.com
[01:21] <silentcoder> and then parse it through aalib
[01:21] <silentcoder> and output the result
[01:21] <Myke> !
[01:21] <Myke> You’d need a daemon or some serious kernel code
[01:21] <silentcoder> well you’d need a driver
[01:22] <silentcoder> and your driver would need some low level http stuff
[01:22] <silentcoder> but it’s not THAT hard
[01:22] <shminux> not necessarily
[01:22] <silentcoder> simpler than most file systems
[01:22] <krikkert> FUSE?
[01:22] <silentcoder> krikkert: mmm that would make it a block device though
[01:23] <Myke> I don’t think so.
[01:23] <silentcoder> or rather, require it to be
[01:23] <shminux> you can cron retrieve the last lol and put it in /dev/lol
[01:23] <silentcoder> and still not quite work
[01:23] <silentcoder> shminux: well then you’re faking it with a simple script in cron.hourly
[01:23] <silentcoder> will work
[01:23] <silentcoder> but won’t be a device file
[01:23] <silentcoder> ease-of-implementation wins out if you ask me
[01:24] <shminux> it’s the result that counts
[01:24] <cmantito> actually the FUSE implementation could work
[01:24] <silentcoder> wget -o – $LOLURL | aalibconversionproggie
[01:24] <cmantito> I’ve been fussing with FUSE quite a bit lately
[01:24] <silentcoder> cmantito: how do you get FUSE to give you a device file ?
[01:24] <silentcoder> FUSE is good for mounting something that ISN’T a device
[01:25] <cmantito> that’s not as easy, but it is possible
[01:25] <silentcoder> and getting filesystems from daemons and stuff,
[01:25] <silentcoder> what you tell me now is new to me
[01:25] <cmantito> yeah, I’ve been using it for tinyurlfs
[01:25] <silentcoder> advantage of the cron job version of course is
[01:25] <silentcoder> it will work on ANY unix
[01:25] <cmantito> well, theoretically is you can fake a device that’s mountable with fuse, and when /dev/lol is mounted it would trigger the fuse to mount
[01:25] <cmantito> the problem is, you’d be mounting /dev/lol, which means it should have contents of some sort
[01:26] <cmantito> which isn’t really waht you’re going for.
[01:26] <silentcoder> nope
[01:26] <silentcoder> short of a kernel module, or a seriously intense UDEV hack
[01:26] <silentcoder> (which is again, linux specific)
[01:26] <cmantito> mm
[01:26] <silentcoder> I’d say you can’t get a real chardev/blockdev to do it
[01:27] <silentcoder> but a cronjob that saves to /dev/lol will fake it well enough for most purposes
[01:27] <cmantito> you could make /dev/lol a fifo buffer and have the cronjob feeding it through it..
[01:27] <shminux> yeah, that was my thought
[01:27] <shminux> but then there is no point
[01:27] <silentcoder> that is better yeah
[01:28] <cmantito> yeah
[01:28] <cmantito> and you’d only be able to read it once, ideally.
[01:28] <shminux> why?
[01:28] <silentcoder> couldn’t you make /dev/lol just a named pipe from your script ?
[01:28] <cmantito> you could
[01:28] <– mostlyharmless has left this server (Quit: They got some kind of freaky EMP down there! Getting clipped just saved your ass marine!).
[01:28] <cmantito> why not have lolcats served over a unix socket?
[01:28] <shminux> well, next task: implement it, make a screenshot, then submit to ICHC
[01:29] <cmantito> make /dev/lol a UNIX socket, and an ichcd
[01:29] <Myke> that’s what I was thinking
[01:29] <Myke> and you can even use the RSS feed
[01:30] <Myke> then you don’t need to parse the latest HTML
[01:30] <cmantito> hell, this would take all of 5 minutes in Perl.
[01:30] <Myke> get crackin’!
[01:30] <cmantito> but I’m busy with tinyurlfs!
[01:30] <cmantito> oh fine, I can take a break.
[01:31] <silentcoder> in ichc they credit the photographer usually
[01:31] <silentcoder> …do I get that credit ?
[01:31] <cmantito> I think the channel gets the credit ;)
[01:31] <silentcoder> but I was the first to suggest: cat /dev/lol
[01:31] <cmantito> but I’m implementing
[01:31] <silentcoder> let’s just call it open source
[01:32] <Myke> silentcoder gets 10% of all profits
[01:32] <silentcoder> and stick everyone’s names in AUTHORS
[01:32] <cmantito> sounds good.
[01:32] <Myke> the rest goes to the community (#SPORKS)
[01:33] <silentcoder> what caption for the screenshot ? Just a blow-up of the command ? cat /dev/lol
[01:33] <silentcoder> (and probably include the URL for the program somewhere)
[01:36] * shminux wonders if the whole brainstorming lolsession gets qdb’d
[01:36] <Myke> shouldn’t.
[01:36] <Myke> but silentcoder will inevitably ‘blog it
[01:37] * cmantito resumes Perling
[01:37] <silentcoder> Myke: I could do that
[01:37] <cmantito> also, I’m implementing this Perl style, which means I’m making a module for ICHC
[01:37] <shminux> apparently there is something like /usr/lolcat
[01:39] <cmantito> don’t care, busy with this ;)
[01:39] <shminux> will be the top download from CPAN? :)

I hate accounting

 Uncategorized  3 Responses »
Apr 152008
 

So, wanna guess what has occupied the majority of my time lately ? Yep, reconciling the company’s books with the bank statements to make sure everything adds up right and all the numbers fit so that I can hand over to the auditor to do my tax filing.

I hate accounting. I mean, a few bits are complex at first- but it doesn’t even have challenge to keep it interesting. It is just a continuous repeat of the exact same steps… yet requiring utmost concentration every single time. Basically it seems to be almost exactly designed to stress the human brain to the ultimate extent.

Sure software engineers have been trying to write easier and easier accounting packages in recent years, but the reality is that accountants are clearly not engineers. We’ve had more than 4000 years o accounting history, during which it was frequently refined – not the least of which would be Pacioli’s revolutionary treatise on double-entry accounting – now the standard method for all but the most trivial of businesses.
But at no point, and this is radically clear, was the process of accounting ever engineered. From ‘writing down where the money went’ – which seems to date back at least as far as the Egyptians (and there is evidence the Sumerians were doing it even earlier than that) it was just always refined. One revolution in 4000 years – which was designed to make errors findable. Double entry accounting makes it easier to audit the books (you can pick up when the balances don’t zero out if every transaction has both a debit and a credit) – but it does not make it easier to DO the books.
In fact, as business has become ever more complex, accounting seems to have become a classic example of freeping creaturism. Today an accountant has to keep track of thousands of types of transactions, each with their own quirks and tricks, always subtly modified by local laws. Computers may make it a bit easier to enter -but frankly just from my books I now doubt very much that even the best accountants in the world could possibly keep track of any large corporation’s books. So it all gets fed into the computer and blindly trusted because any kind of understanding of whats in there is completely unfeasible. The auditors then check for accuracy to the best they can (assuming there is nothing Enron-esque behind the scenes) – and finally a bunch of financial statements are produced which bare about as much resemblance to the books they are a summary off as a hallmark card does to the KJV Bible.
No wonder we have massive corporate corruption – it’s practically impossible to actually do accounting that makes sense – and what could be easier than to cheat with numbers nobody understands anyway.

Personally I would be in favor of a radical grounds-up reengineering of the entire principle of accounting – with no accountants involved. Imagine if a group of really good programmers, with some very good businessmen teamed up – what they are tasked with is ‘design a way for a business or individual to keep track of all financial information, from the 5c thrown into the gumball machine to the total bank- balance at any moment. The process should require as little human intervention as possible and yet allow data from the highest to the lowest level to be referenced instantaneously and in real time – including by authorized outside parties (e.g. the taxman). It should be design to capture and correct errors as far as possible and use whatever technological means it can to ensure the capture of the data and the reporting there-on is as efficient, logical and easy as possible.

Then let them… ENGINEER a way to do accounting. Not just 4000 years of adding on, one major breakthrough and another 800 years of just more and more and more added to try and keep up with ever greater demand. When a piece of code reaches excessive clutter and complexity, we rewrite it from scratch, sometimes we redo an entire project from nothing, using only what we LEARNED from the past, none of what we actually DID – to DESIGN it better.
From my day to do day experiences doing the books of my company, as compared to my day to day experiences as a software engineer* – one thing is clear to me, accounting needs to be redesigned, or at least have the worlds largest ever code-cleanup done.
True there are complexities like getting every law system out there aligned to a new accounting system – since they all demand classic double-entry with strict rules about how it should be stored and presented, but those rules are not entirely inflexible (after all we have more than one accounting program GUI even now) and laws can change – especially if the result is to achieve the very reason they were made much better. I see more likely opposition from current billionaires, every single one of them had at least a little help from ‘creative accounting’ (a term that means – ‘we know nobody can read the books so we can write anything we want in them’).

So politics aside, and getting past all the accountants out there going: EEEK our beautiful paychecks ! I still think it’s a good idea. Who is with me ? And here comes the next revolution: imagine adding the development power of open-source and the ethical enforcement of free software to the single most corrupt profession there is ? (Yes, accountants are more corrupt than politicians – politicians cannot use accountants to be corrupt with sure some accountants are honest, some lawyers too – it’s just that they are few and far between – and it’s virtually impossible to tell the difference.) ?

Yep, I think we should re-engineer accounting using social development. WikiGPLify our money !
Now that is a revolution that may actually change the world more than the internet did (though it would inherently depend on the internet of course)… or maybe I just really hated the last few weeks and I need a laydown and a beer ?

*I have my viewpoint on those who believe programmers are not engineers, and the debate is very long with much that must be considered in fairness. I have no desire to get into it now – I merely use the term here to explain the difference between ‘applying scientific knowledge to the solution of a practical problem’ as opposed to ‘trying to do the best we can with the system we inherited’.

Mar 142008
 

So on #sporks today, we discussed Aargh! I compared it to assembler for chess players, and EvilTerran suggested the idea of an esoteric computer language using chess rules/moves.
I subsequently (with the help of #sporks) designed one. Yes it is possible, it is Turing complete and I believe it can be implemented. A particular thank you to Maximinus who contributed a number of useful ideas.

Starting principles:
Your program is represented by the pieces on a chess board and the board itself. There is a two-byte stack providing state.
Pawns are value pieces, all other pieces are operations. White pawns represent 1, Black pawns represent 0. White blocks on the board are 1 black blocks are 0.
When a pawn is taken, the block it is on represents a bit, the pawn itself another, the piece taking it represents an operation performed on those bits. The result goes in the stack.
When there are 8 bits in the stack, the ascii value represented by the byte they make up is placed on the 2-byte stack.
When operational pieces are taken – the operation they represent cannot be used again in the current game.
If a pawn takes a pawn, nothing goes in the stack, but the pawn is no longer available for arithmetic.

A program consists of a series of games. Each game is started by feeding in a set of starting positions for pieces. All pieces move as in normal chess rules.
Once all the pawns are taken (unless pawns take pawns this means 2 bytes have been placed into the stack – but using pawn-take-pawn you could split stack over several games), the ‘game’ ends and you
feed in values for the next game.

Since you have a theoretically infinite amount of games, the language will be Turing complete if all required operations are supported.

The operations pieces (white) are:
Rook: AND
Bishop: OR
Knight: XOR
Queen: ADD
King: SUB

The black operations pieces represent the NOT’s of their white counterparts:
Rook: NAND
Bishop: NOR
Knight: NXOR
Queen: SUB
King: ADD

A game is begun with a call to start and a set of values representing the initial layout of the board for this game.
The values are given as chess coordinates for all pieces.
The first 8 values represent the white operations pieces’ locations.
The next 8 values represent the black operations pieces’ locations.

Basic example:
start A1 A2 A3…H6 H7 H8
(whatever layout you need) However you can NOT place any pieces on the two center-rows.

Then you need to place the pawns, which are used as input. There are 2 ways to do this.
You can call:
const_pawns
const_pawns takes 16 parameters each a chess coordinate, the first 8 places the white pawns the next 8 places the black pawns. You can place them on
any unused space on the board.
Alternatively you can call:
stack_pawns
Stack_pawns works by itself without any parameters, and places 16 pawns representing the two bytes in the stack.
In this case you may not have a normal chess setup of 8 white and 8 black pawns. The Center rows hold the two stacks as input, it is up to you move the pawns so the values they stand on
represent what you want (initially this is simply a matter of which bit in the byte you have)
The first byte in the stack is placed on the row D1-D8 the second on row E1-E8.
Calling stack_pawns without the stack being full results in an error.

Operating on the stack:
From here on, you write down a set of valid chess moves. Those moves that take a pawn are done as operations and the result added to the output stack.
For example: C7 B4
Means: Piece moves from C7 to B4 (only a knight could do this move btw. But we don’t need to specify the pieces as it’s the interpreter’s job to remember the current location of each piece).
Each operation is written on a new line below the last.
Please note that while you can place any piece ANYWHERE during the start call, you can ONLY make moves for each piece that is allowed under chess rules for during a game.
Once all pawns are removed, you must call start again with a starting position that will allow you to do your next operation. White moves first just like in real chess and moves then take turns.
Some have suggested a variant where games cannot end by merely removing the pawns but require a state of checkmate or a draw to occur – this is still being debated.

Displaying output:
The print command prints out the ascii character represented by a byte from the stack. It takes one argument, either a 0 or a 1.
If it is 0 it prints the first byte in the stack. If it is 1 it prints the second byte in the stack.

Example: print 1

Loops and branches:
The if statement
The program can branch by using the if statement.
If works by performing a boolean test on the two bytes in the stack in the following form:
if OPERATOR then
actions
else
actions.
fi

OPERATOR can be any valid boolean comparison: AND, OR etc. if the result is 00000000 then the if is false, otherwise it is true. It is up to the programmer to place values in the stack that evaluate as he wants it.
Additionally you can also do a boolean operation using the value (0 or 1) of a specific piece (regardless of the type of piece, merely the color determines this).
To do so:
if A5
Where A5 can be any valid chess coordinate. It returns true if the piece on A5 is white, false if it is black or the block is empty.

Actions represent blocks where the programmer can write any valid chesscode commands including nested loops and branches, output or games (which changes the stack).

Calling if without two full bytes in the stack causes an error.

The while loop
Chesscode supports while loops. Like if statements while loops do a boolean operation on the bytes in the stack.
They take the following structure:

while OPERATION
actions
elihw

The actions once more is any valid chesscode commands including games. In fact failing to put games in the loop which will change the stack (and use input from it) to something that ultimately returns false will cause an endless loop.
Like an if statement, calling while on an incomplete stack causes an error.
You can also use a query by coordinates for a while loop e.g.
while C7
In this case, if the piece there is white the loop starts, moving it out or taking it with a black piece leads to a false and ends the loop.

Getting user input.
Like the print command can write a value from the stack to the screen, the read command can read a value from the keyboard to the stack.
It takes a single parameter, which indicates a byte in the stack.
For example: read 1
The user hits a key on the keyboard, the binary representation of the ascii value of this key/letter is then stored in the second byte in the stack.
If you use read 0 instead, then it will go in the first byte of the stack (replacing any value already there).

Ending the program:
Using these structures, you can write all the code to do whatever you need your program to do. When you are finished, call
end
To tell the interpreter/compiler that your program is finished.

Final notes:

Note that all indentation is done for clarity and completely optional. Also note that the EOL character is used as an end of command marker throughout (as opposed to ; for example) so all commands must be placed on a single line.

You are welcome to hate me until the end of time.

Comments are very much desired, and if somebody is up for trying to create a working implementation I would love to know and maybe help.

Mar 122008
 

After a hiatus of several months in which I spend a lot of time planning and thinking about what I wanted to achieve with the comic, I am happy to announce that ScarToonz is back. I have some very interesting plans now, and some new ideas. A lot of the old traditions will be changing but the things that made ScarToonz work in the first place will remain.

Doing a webcomic is hard work at the best of times, but it is also a lot of fun. The trouble was, it stopped being fun at one point because of the sheer pressure to keep coming up with good jokes and finding time for it all. I think my new ideas will reduce a lot of the pressure and let me focus on why I did the comic in the first place: I like to make people laugh.

So here’s hoping that you will enjoy the all new, all groovy ScarToonz comics.

Mar 082008
 

Before we actually HAD a cyberspace… otherwise it may have gone like this:

It takes a lot of practice to make your avatar move through the Metaverse like a real person. When your avatar has just lost its legs, all that skill goes out the window.
“ROFLMAO – you sux0r !” Hiro says. “Die bitch!” He whips his blade sideways, cutting off both of the businessman’s forearms, causing the sword to clatter onto the floor.
“I will Pwnz0r you !” Hiro continues, whipping the sword around sideways, cutting the businessman’s body in half just above the navel. Then he leans down so he’s looking right into the businessman’s face. “OMFG,” he says, losing the dialect, “N00B!”

And that would have been …tragic.