 
 dmp = new diff_match_patch()
 
-class DSync
+class DSync0
     constructor: (opts) ->
         opts = defaults opts,
             id   : undefined

    # Create a list of new edits, then send all edits not yet
    # processed to the other end of the connection.
    push_edits: (cb) =>
        edits = {edits:@_compute_edits(@shadow, @live)}

        if edits.edits.length > 0
            edits.shadow_version = @shadow_version
            edits.shadow_checksum = @_checksum(@shadow)
            # console.log("#{@id} -- push_edits -- #{misc.to_json(edits)}")
            @edit_stack.push(edits)
            console.log("#{@id} -- shadow changes: '#{@shadow}' --> '#{@live}'  (version #{@shadow_version+1})")
            @shadow = @_copy(@live)
            @shadow_version += 1
        else
            # console.log("#{@id} -- push_edits -- (nothing new)")

        console.log(misc.to_json(server.status()))
        console.log("------------------------")

    go = () ->
        client.push_edits( (err) =>
            if not err
                server.push_edits())

    go()
    client.live += "\nmore stuff"
    go()

    client.live = 'bar1\n' + client.live
    server.live = 'bar2\n'
    status()
    while client.live != server.live
        try
            status()
            go()
        catch e
            status()
            break
