HASIFF

*Please visit the newest example here

I’ve been noticing a lot more hits to my Fuse IDE component lately, and decided I better write a new one because that one is very lackluster. But thanks to everyone for checking it out.

So while starting on Fuse IDE 2.0, I had a cool idea: what if people could just type what they want out in plain ‘ol english and have it do what they want? Well, many people have probably thought of it before, but I knew I could put it into action.

I call the process hasi (pronounced hass-E) - “Human-ActionScript Interpreter”, and more specifically in this case, hasiff (pronounced hass-if) (For Fuse). And you know what? It works pretty damn good.

There are a few ways of going about it:

  1. Parse* through and create at once in order.

  2. Parse through and create according to array positions for each property. Ie. array[0] would always have to be a certain kind.

  3. Parse through in chunks and create like 1 & 2.

  4. Parse through and split via commas (like chunking), then loop through each chunk and check each word to match a property and crate it dynamically after the parse.

Okay, that may not make a bunch of sense to a lot of people, but basically it just does a lot of checks to words. etasiff uses method #4 since it allows for many sentence structures for more human sounding sentences. It seems like a pretty good method, and ended up being pretty clean and straight forward.

It’s pretty static in it’s checking, so eventually I’d like to have a file with a bunch of acronyms that it can compare to, instead of manually updating the class. Now THAT would be pretty slick.

I’ll release the class as soon as I finish the Fuse IDE, which this will be integrated into of course.

*When I say parse though, that’s taking the string and making it into a bunch of arrays and objects. Create is when I assemble it all and create the Fuse objects.


About this entry