Archive for September 2006

Accessing global variables.

Another week another task ticked off.

This time it is accessing global variables from inside functions. You have to use the keyword “global” sort of like this
Continue reading ‘Accessing global variables.’ »

Slaying The “Automatically Type Inferred Polymorphic Function” Dragon

Surprisingly enough the next phase of polymorphic functions was not that hard. In fact most of the work was done in one short hour long burst of programming. There was then a few more sessions creating tests and fixing a few bugs that they revealed.
Continue reading ‘Slaying The “Automatically Type Inferred Polymorphic Function” Dragon’ »

Mist Functions, Polymorphic Fun.

I am at a point where the polymorphic functions are working and have a reasonable number of tests to check they are actually working! I blogged about functions in mist on my old site but as that no longer exists I have the opportunity to discuss them again.

Continue reading ‘Mist Functions, Polymorphic Fun.’ »

Introduction to Mist

Well this should be a repost from my old site as mist has been in development for a couple of months. I decided to re-write the introduction post.

Mist is the name I have chosen for my latest compiler writing adventure. It needed as name writing my compiler project gets repetitive and sounds almost pompous. As mist was the first word that popped into my head, I decided to use it. Mist is only a working name and it will be change should mist get anywhere close to being a production ready compiler. The main reason for this is mist.com is taken so would probably take some serious money to get hold of.

Continue reading ‘Introduction to Mist’ »

Max-Min Algorithm (Tic Tac Toe In Python)

Repost from old site

Many classic games, such as chess or othello, lacking a random element can be represented as game trees. The basic idea is that at the start of a game there is a set of actions a player can do and the opponent can respond to these actions, without randomness all outcomes are predetermined. The game can be represented in the form of a tree where each set of children represents the set of possible moves in the game for a given turn.

Continue reading ‘Max-Min Algorithm (Tic Tac Toe In Python)’ »