Monday, January 9, 2012

Bugfixes and Platform Builds

A host of long overdue bug fixes has been my most recent work in Shiro.  I'm re-building the language test suite that used to belong to Merlin (Shiro's predecessor), translating it to use the new syntax and libraries.  It's slow going, but by exercising really bizarre fringe scenarios I'm getting at areas which haven't been tested enough.  It's slow and sometimes aggravating work, but it's quite doable as long as you have an intimate-enough understanding of how the parser flows.  It's also helping me identify areas that need refactoring -- like the ParseName and ParseRootName conundrum that I resolved a week or so ago.  The devil with refactoring is, of course, that it's hard to trust it without unit tests; thus my renewed work on the language tests.

The pre-built binaries for ShiroChan are also not working -- or at least they're x64 only.  The shcl and interpreter-only package both work but there's a configuration variable that the version of C# express I'm using doesn't seem to expose that will let me build solid x86 and x64 versions.  As soon as I get that ironed out I'll be fleshing out the download page a bit and generally sprucing up the site.

I'm also working on a reference-count garbage collection routine for anonymous functions -- I think I've just about got it figured out in my head, so that'll be a fun little side project for one of these evenings.  The symbol table keeps remarkably clean (I've had so many problems with scope early-on with the python scoping syntax in Merlin that it's been pruned and trimmed and worked at for years now), but the function table not so much.  The ParseName-ParseRootName merger has also introduced a lingering bug or two.  I think they need a new parse-route for handling each tier of a given object chain (Like O.O2.O3.F() or something obtuse like that).  Not too hard, and will make both symbol information and handling problems like the implicit-this and cleanup much easier.

I've also started work on "Let's Build an Interpreter", my puny attempt to write something like the wonderful "Let's Build a Compiler" series that got me started.  One of my main purposes in developing Shiro was that it be structured in such a way as to lend itself to such a series.  One day I hope someone will find my tutorial by accident like how I stumbled on Dr. Crenshaw's and it will spark in them was LBaC sparked in me.

The New Year seems to have come with a burst of energy; lots of fun stuff going on.  I hope that the upcoming site update and some new content will help communicate some of the massive, stabilizing changes going on under the hood in Shiro.

No comments:

Post a Comment