Some thoughts on duck typing

David Bovill david at vaudevillecourt.tv
Thu Jan 13 07:19:30 EST 2011


On 13 January 2011 01:29, Alejandro Tejada <capellan2000 at gmail.com> wrote:

>
> Recently, in other messages, you mentioned
> saving stacks as xml and using "git", the
> distributed revision control system.
> Now, this thread is about data type checking.
>
> Are you developing stacks as xml text files
> and using Livecode scripts to convert them
> in binary stacks?
>

Yes - well to be accurate revamping it. I've been storing scripts and staks
in CVS / SVN and now GIT for the last 10 years. Originaaly I used a full XML
based file structure, but did not need it, so for years I have been storing
only the full stacks and the scripts (so I can diff the scripts).

With recent changes to to engine so that you can set id properties of
objects full text based stack representations are possible. As there are now
a number of fairly large open source projects within the community with
compatible licenses (revignitor / MetaCard / glxApp framework and GLX script
editor), and I have a need to store the full behavior based widget
components in a robust way - I'm putting in a bunch of work to release this
for the conference.

We are starting to cover some of these topics on www.livecode.tv, and also
in ChatRev, and there is an open invitation for anyone interested in
developing community resources to take part, show work, and contribute code.
I'm putting the finishing touches to the file format now. It is not XML
based, it is array based with a default text and folder based export format.
There is an optional XML version of the format for projects that would want
an XML based version. The format is optimised for speed and for utility when
working with revision control systems.

I'm currently adding (optional) aliases to the format - these are presently
used internally in the stack format to store info about shared elements like
backgrounds only once. However I want to extend them for globally shared
elements, such as standardised view components from other stacks, and
standardised handlers from libraries. This will be optional, but allow you
to make it easier to maintain re-usable elements under version control that
many projects and stack use - that way you can create stub stacks or
handlers, and simply by the act of saving and reloading the stacks - they
will pull in all the recent widgets and handlers.

I hope to be previewing this the next LiveCode TV event - see you there!


NB - Alejandro, I want to show and share the code for interfacing with
WikiPedia some time. How did you get along with your offline WikiPedia
project - maybe we could work together on a presentation - even if it is
work-in-progress?



More information about the use-livecode mailing list