[1388] in Coldmud discussion meeting

root meeting help first first in chain previous in chain previous next last

Re: [COLD] MOO to Cold Converter

daemon@ATHENA.MIT.EDU (Thu Dec 4 13:14:04 1997 )

Date: Thu, 4 Dec 1997 11:04:24 -0700 (MST)
From: Brandon Gillespie <brandon@roguetrader.com>
To: "Edward L. Haletky" <elh@secretariat.astroarch.com>
cc: coldstuff@cold.org
In-Reply-To: <199712041448.IAA16622@secretariat.astroarch.com>

On Thu, 4 Dec 1997, Edward L. Haletky wrote:

> Is there a MOO to COLD converter anywhere?

A while back I wrote a program that converted moo objects to coldc
objects--generally.  Then I started to rewrite it to make it better, and
ended up leaving it in a broken state.  It generally converts code to
ColdC, but you still need to go and do touching up.

The problem is that MOO and ColdC while similar have a few drastically
different concepts--primarily dealing with properties.  Furthermore, one
or two operations are not similar, and require a totally different way of
doing things.

For instance, in MOO:

    list[2] = value

In ColdC:

    list = replace(list, 2, value)

So its a bit harder to write a convertor.

Not to mention that ColdC has more power than MOO, and while you can
convert moo code to run in ColdC you can likely optimize it quite well by
taking advantage of some of the greater data structures and types.

> I really do not wish to reprogram everything.

I can understand :)

If you want to take a whack at fixing it, the conversion program is in
Perl, and is on the ftp archives under contrib/