Undo buffers with infinite history recall
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
BUILD
README.md
WORKSPACE
main.cc
undobuffer.cc
undobuffer.h

README.md

Undo Buffers with Infinite History Recall

  • Small design exercise implementing undo buffers with infinite history recall.
  • See the accompanying blog post for a nicer walkthrough of the code in this repository.

Dependencies

You need Bazel and C++14 to run this code.

$ bazel run :main
INFO: Build options have changed, discarding analysis cache.
INFO: Analysed target //:main (0 packages loaded).
INFO: Found 1 target...
Target //:main up-to-date:
  bazel-bin/main
INFO: Elapsed time: 1.018s, Critical Path: 0.80s
INFO: 4 processes: 4 darwin-sandbox.
INFO: Build completed successfully, 7 total actions
INFO: Build completed successfully, 7 total actions
INITIAL STATE: I have a blue SUV that fits 4.
CURRENT STATE: I have a blue SUV that fits 4.
CURRENT STATE: I have a blue SUV that fits 
CURRENT STATE: I have a blue SUV that fits 10!
CURRENT STATE: I have a blue
CURRENT STATE: I have a 
CURRENT STATE: I have a red car.
CURRENT STATE: I have a 
CURRENT STATE: I have a blue
FINAL STATE  :