Saturday, November 30, 2013

Its all in the interpretation!

A big problem with having a web service that is designed to be highly user centric is allowing them to customize their experience of the site safely.
You can allow them to modify things like themes under your own control. But what about actual content? What CONTENT can you allow them to manipulate? This is a big risk in terms of security and privacy over all. Most web services because of this limit it to highly predefined things like some text.

So how am I looking to do it? First off there is two portions to a system that I am suggesting.

  • Front end, where the actual editing goes on.
  • Back end, verification and manipulation of site content.

Tuesday, November 26, 2013

Web services and OpenGL oh my!

Interesting title you might say of this post. Given that OpenGL is far more related to desktop applications then servers. What I'm actually referring to is two different sets of projects. For OpenGL I am referring to DOOGLE my little GUI toolkit written in D. With regards to the web service, I can't say too much at this point about the purpose however I can for some of its elements.

Saturday, March 16, 2013

Java, past and future

In the past two years a lot has changed and happened. We in (Christchurch New Zealand) have had our lives turned up side down by earthquakes and bureaucracy. The 'skynet' law came into being and all the debarkle about SOPA, PIPA and all the related proposed bills in the United States.
But none of this is what I am here talking about; Java. I am talking about Java and how it has changed.

Wednesday, February 20, 2013

Allegro the static beast

Recently I wrote an article on compiling Allegro. Please note this was only for a dynamically linked library.
Now for a statically built library!

Friday, February 15, 2013

Sub repositories and Mercurial

So today I had finished up my game ready for release (Theseus and the Minotaur). Which can be found here.
One of the things I came across is how do I have sub repositories for both git and mercurial under mercurial?
I had a lot of trouble with it so here is what I've learnt.

Monday, February 11, 2013

Allegro compilation

So yesturday I started work on making a game.
This was all well and good except it would help to have a game engine.
I choose Allegro for it being c based so much more easier to interface to D. (Bindings already exist).

My primary platform is Windows 7 64bit.
This was primarily because dmd (D's compiler) uses Microsofts toolchain for linking. This is rather nice thing for COFF support as it's linker (optilink) only support OMF and thats for 32bit only.

Saturday, January 19, 2013

D dynamic runtime function calling

Recently I did some work towards making a dynamic function caller in D. Note this is a very unsafe operation in such a language.
The premise is simple take any argument and then call a function without a return type.

The answer didn't appear as simple though.
I manually pushed to the stack the arguments then called using a pointer which has been casted to void the function.
Great it works! But umm how do we push arguments to the stack? That is the hard part.
Primitives have to be dealt with individually. Structs have no super type and Objects aka classes have the Object super type so very easy. Arrays are also a type so they are easy to do when registering a type. Last associative arrays a type that requires two other types to make it; not so easy.

I got Objects, primitives, arrays and any other type you manually register. Why the registering? Because I used the Variant type and this is where it all falls apart.
The Variant type is great for storing and retrieving values out off, IF you know the type at compile time for when you retrieve it.
So using templates I created a registration system that created a function that was designed specifically for a type you register.

Most of the time it was a non issue with calling the get!type function on Variant and then just exiting the function created but some which types use a more complex pointer values in registers had to be modified to be allowed for.

Also the float type was stored in different registers different from other types its size. I implemented the registration system to allow for system level types and user types. The system types have the override for said type that was manually implemented.

How could this have been done simpler?
In short a container type that allowed for pushing the value directly on to the stack without knowing its type. Because the type and hence its size was known directly at creation I don't need to know it when pushing; it should have been retrieved and stored then (value.sizeof).
This would have void'd the need for the registration system completely.

To see this check out link.

I hope this gives you all some ideas; but remember this is not safe,even if I called it that. D is simply not the right type of language to do any sort of reflection type activity like this.

Concurrency design with D

During my development with CivBot (an IRC bot written in D) I have come across some things which make me go wow; One of these is threading.
This may seem like well just use mutexs but how can you really use it efficiently is what I am trying to come to grips with.
I'm looking at two types of concurrency in D, mutexs and message passing.