Copy on write data structures?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Copy on write data structures?

David Given
Has anyone done a generic, robust, copy on write table proxy?

Someone's asked for undo support for WordGrinder. Unfortunately I didn't
bake support for changelists into the design right at the very
beginning, and retrofitting the data model to support them would be way
too much work.

OTOH if I can efficiently snapshot the entire document state without
having to deep copy it, then I can keep the existing model and not have
to change the bulk of my code.

The document is stored as a deeply nested set of tables, using both
array and hash parts; it's just plain data with no metatable stuff involved.

(Incidentally, did I announce here that I recently released WordGrinder
0.4.1? Now with a proper Windows port and OpenDocument import/export.
And it's all MIT licensed, with lots of useful stuff to pull out and
steal: http://wordgrinder.sourceforge.net/)

--
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────

│ 𝕻𝖍'𝖓𝖌𝖑𝖚𝖎 𝖒𝖌𝖑𝖜'𝖓𝖆𝖋𝖍 𝕮𝖙𝖍𝖚𝖑𝖍𝖚 𝕽'𝖑𝖞𝖊𝖍
𝖜𝖌𝖆𝖍'𝖓𝖆𝖌𝖑 𝖋𝖍𝖙𝖆𝖌𝖓.



signature.asc (271 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Copy on write data structures?

Dirk Laurie-2
2013/4/30 David Given <[hidden email]>:


> (Incidentally, did I announce here that I recently released WordGrinder
> 0.4.1? Now with a proper Windows port and OpenDocument import/export.
> And it's all MIT licensed, with lots of useful stuff to pull out and
> steal: http://wordgrinder.sourceforge.net/)

The build fails on Ubuntu 12.04, typical message

src/c/minizip/zip.c:160:5: error: unknown type name ‘z_crc_t’

If I comment out the minizip build, everything else compiles,
but of course the link stage throws up unresolved references.

Reply | Threaded
Open this post in threaded view
|

Re: Copy on write data structures?

David Given
Dirk Laurie wrote:
[...]
> The build fails on Ubuntu 12.04, typical message
>
> src/c/minizip/zip.c:160:5: error: unknown type name ‘z_crc_t’
>
> If I comment out the minizip build, everything else compiles,
> but of course the link stage throws up unresolved references.

Very interesting --- could you tell me the output of:

  dpkg -l zlib1g-dev

...please? (It builds cleanly on Debian, so I suspect that I'm relying
on a newer version of zlib than you have.)

--
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────

│ 𝕻𝖍'𝖓𝖌𝖑𝖚𝖎 𝖒𝖌𝖑𝖜'𝖓𝖆𝖋𝖍 𝕮𝖙𝖍𝖚𝖑𝖍𝖚 𝕽'𝖑𝖞𝖊𝖍
𝖜𝖌𝖆𝖍'𝖓𝖆𝖌𝖑 𝖋𝖍𝖙𝖆𝖌𝖓.



signature.asc (271 bytes) Download Attachment