Just got basic map loading from JSON files - Like a boss.
At the moment only player-spawn, walls, and lighting are loaded from the map files.  Cores, Fields, and power connections will shortly be added.
I’ve also forgotten to eat, so I’m having a pizza break!

Just got basic map loading from JSON files - Like a boss.

At the moment only player-spawn, walls, and lighting are loaded from the map files. Cores, Fields, and power connections will shortly be added.

I’ve also forgotten to eat, so I’m having a pizza break!

unwrap & wrapped?

The following are two simple procedures for ‘wrapped’ expressions:

(defn- wrapped? [_expression]
  " Detects if an expression is wrapped up in layers.
   'y is not wrapped
   '(x) is wrapped on 'x
   '((((x + y)))) is wrapped on '(x + y) "
  (and (coll? _expression) (= 1 (count _expression))))

(defn- unwrap [_expression]
  " Iteratively unwraps an expression until it is no-longer wrapped.
    'y --> 'y
    '((x)) --> 'x
    '(((((x * y))))) --> '(x * y) "
  (if (wrapped? _expression)
      (recur (first _expression))
      _expression))

I authored these to help with my dissertation’s “tokenised infix expression” parser. They are used to eliminate singly-nested expressions.

Dissertation Project is almost complete!

Latest improvements:

Sub-expressions are now matched and swapped out if a reduction is made.

Conditionals evaluate with bindings correctly.

Executor forms also evaluate with bindings correctly.

I have a few abstract ideas about ensuring termination, but nothing properly explored yet.

As well as cycle capturing for termination, I also have to build an infix expression parser. For which, I am thinking about implementing a modified version of the shunting-yard algorithm. We’ll see how that goes.

I have a meeting with my project supervisor at 11am today. I’m wondering what he’ll say if I tell him I started from scratch two days ago and have already completed the core functionality. :D

Nifty JavaScript Experiments

I’ve started a new project! I’ll be publishing some JavaScript experiments and pushing my implementations to GitHub: https://github.com/LiamGoodacre

Toffy.js – Version 2

Rewrote Toffy.js
Works in a completely different way and encompasses a wider range of actions.

Haven’t written the documentation yet though, but if anyone wants to try and understand it take a look at demo.html. It pretty much uses all aspects of the module.

Instead of operating on dom elements, it can now work on any data you pass it! If you want to modify collections of objects into a particular states, it allows for that. Custom element interpretation functions, custom property rules, etc…

Took about 4 or 5 hours to come up with the new ideas and to write.

Type.js on GitHub

After watching Chris Coyier (CSS-Tricks) give a screencast on the basics of Git and GitHub; I’ve finally joined and created my first repository!

It’s a tiny project I completed a few nights over the previous summer holidays.

GitHub url:
https://github.com/LiamGoodacre/Type.js

Documentation:
http://typejs.liamgoodacre.com

Link to screencast:
http://css-tricks.com/video-screencasts/101-lets-suck-at-github-together