Archive

Posts Tagged ‘Computing’

IronMeta 1.2 Released

May 31st, 2009 Gordon Comments off

I have released a new version of IronMeta. It makes the syntax closer to the usual OMeta syntax.

I also fixed a bug that caused some redundant evaluation to be done. Performance is still pretty bad, though.

I will be focusing on

You can download the new version at SourceForge, or via Subversion at https://ironmeta.svn.sourceforge.net/svnroot/ironmeta/tags/1.2/.

IronMeta provides a programming language and application for generating pattern matchers on arbitrary streams of objects. It is an implementation of Alessandro Warth’s OMeta system for C# on .NET.

Categories: Computing Tags: ,

IronMeta, a parser generator for C#

May 16th, 2009 Gordon Comments off

In between the new job and the new baby I have still managed to finish up the project I’ve been working on for myself.

It’s a C# implementation of Alessandro Warth’s OMeta pattern matching meta-language.

The IronMeta system builds parsers that can operate not only on streams of characters, but streams of objects of arbitrary types. The matchers can operate using the semantics of Parsing Expression Grammars or as fully backtracking recursive descent parsers.

IronMeta uses Warth, Douglass and Millstein’s algorithm for handling both direct and indirect left-recursion.

Grammar rules in IronMeta can take parameters, and in fact can match parameters against a pattern, allowing for different rule patterns depending on the number, type and value of parameters passed to them.

IronMeta also allows for higher-order rules, i.e. rules that can take other rules as parameters.

Categories: Computing Tags: , ,

Why Linux (oh, and Open Source too!) is a Big Fat Pile of Steaming Excrement

March 11th, 2009 Gordon Comments off

So at work I get a new computer and have to install Linux on it. I am quickly reminded why I gave up on Linux in disgust lo these many years ago. I’m installing a distro with a cutesy African name (that English-speakers universally mispronounce, making me cringe every time) that is universally received as the ultimate in desktop-friendliness (as much as that means anything in Linux-land).

Now one of the criticisms leveled at, say, Windows, is that there’s often no way to diagnose a problem, and trouble-shooting simply consists of reinstalling pieces until things sort of work again.

So I install from the very latest ISO on the website, and things seem to work OK. However, there’s some update program yammering for my attention, so I check it, and there’s evidently 280 pieces that need updating. That’s quality control for ya. So I run the update, which automagically chooses the slowest possible mirror to use — 30 kilobytes per second, for crying out loud.

Now that the updates are done, the window manager crashes and burns. Luckily, since Linux is so much better than Windows, I can tell exactly what’s causing it to crash. Well, it can’t seem to find a function ISNGBdiugjnooruwojhdwIgHDUWHGUdh in a shared library. Now I actually happen to know what this means. I also happen to know that I can do exactly squat about it, because the vaunted package manager that is supposed to keep all those picky dependencies straight can’t actually be arsed to do its job.

A quick Google finds that lots of other people have encountered this problem, and that the recommended solution starts like this:

apt-get --reinstall ...

Remind me how much better than Windows this is?

And to top it off, when I do run this recommended command, the computer has conveniently forgotten that it ever had a network card, so my download speed is now, let’s see, nothing times nothing, carry the nothing…

This is why I’d far rather run an operating system whose development includes at least some pretense to a QA process, and which I can use to get something resembling work done in less than a week of setup, rather than Linux, which is “Open Source”, meaning a random pile of poorly-coordinated contributions by people working on little bits of things that they happened to feel interested in during their off hours, and thus resembles nothing less than a terrain feature you’ll often find behind a farmer’s barn.

I weep for the thousands of hours I wasted on Linux in my youth before I discovered OpenBSD.

Parsing Expression Grammars and Left Recursion

July 25th, 2008 Gordon 5 comments

Parsing Expression Grammars are a form of context-free grammars with ordered choice. This reduces ambiguity in the grammar and makes writing simple recursive-descent parsers (and parser generators) quite easy. With memoization, you can parse in linear time. The resulting parser is called a Packrat Parser.

The only problem is handling left-recursion. If you have grammar rules like this:

Expression = Expression "+" Term
           | Term

your recursive-descent parser will recurse until it runs out of stack.

I just noticed a paper on detecting and handling left-recursion: Packrat Parsers can Handle Left Recursion. It’s a nifty technique, but it somewhat reduces the simplicity of the resulting program.

For a finger exercise a while ago I wrote a pretty basic packrat parser generator and used it to implement a C preprocessor. Source is here. When my supply of circular tuits increases I’ll have to look at implementing the stuff from the paper.

Periapsis

June 10th, 2008 Gordon Comments off

It occurs to me that I never posted about putting my spaceflight simulator project up on SourceForge. I’ve been much too busy lately to work on it, so it’s up there for anyone to play with.

screenshot

There’s a list of tasks needed to get it to an alpha state in the tracker.

In the Wild

May 27th, 2008 Gordon 1 comment

It’s a little wierd now that I’ve been working on actual published software for a few years, as opposed to research, to see actual products I’ve worked on in the wild, and to read reviewers’ comments where I know exactly what the software in question does, because I wrote it.

Andrea & I have just put our place on the market, and are looking for a new place, and we’ve been getting lots of real estate listings from our agent.

What makes this relevant is that a couple of years ago, during a lacuna in employment between computational linguistics research and game development, I worked for a company whose software is used by half the realtors in North America. And indeed it turns out that the printouts we’ve been getting were made by that software.

Now I’d like to say that I know exactly what the software that made those printouts does, but the software in question is a vast and terrible jungle of recursive and self-modifying spaghetti code without end. I must confess I quit that job partly out of fear of ever being asked to work with it.

I much prefer physics and artificial intelligence.

Categories: Computing, Journal Tags:

Making a note here: HUGE SUCCESS

May 12th, 2008 Gordon 2 comments

OK, I finally played through Portal yesterday. All I can say is the hype is well-deserved.

A perfect gem of a game. And I’ve got “Still Alive” on repeat on my iTunes.

But the cake is a lie!

Categories: Computing, Journal Tags: , ,