Data Model #1

Open
opened 2026-07-17 17:01:07 +00:00 by bemmesr · 1 comment
Owner

The main object in the data model is the ‘state’ object, which keeps track of all the relevant state of the Vi editor at a given moment. This includes:

  • Buffers
  • Registers
  • Mode
  • Cursor
  • Command line
  • any other relevant state

In particular there needs to be a method to check if two state objects are equivalent, with emphasis on doing this as quickly as possible (since while exploring the state tree we will need to check if we have repeated an already explored state, so that we can discard the search path).

Of course, the state object needs initialization and destructor functions, but maybe the object should be represented by just a struct, as opposed to a pointer to a struct, to make it possible to conduct operations on an array of states without the need to jump around in memory too much.

For now, little emphasis will be made to mutating state. Perhaps some mutations will be needed for testing purposes but these should be kept to a minimum. Other issues will be made to ask for state mutation.

The main object in the data model is the ‘state’ object, which keeps track of all the relevant state of the Vi editor at a given moment. This includes: * Buffers * Registers * Mode * Cursor * Command line * any other relevant state In particular there needs to be a method to check if two state objects are equivalent, with emphasis on doing this as quickly as possible (since while exploring the state tree we will need to check if we have repeated an already explored state, so that we can discard the search path). Of course, the state object needs initialization and destructor functions, but maybe the object should be represented by just a struct, as opposed to a pointer to a struct, to make it possible to conduct operations on an array of states without the need to jump around in memory too much. For now, little emphasis will be made to mutating state. Perhaps some mutations will be needed for testing purposes but these should be kept to a minimum. Other issues will be made to ask for state mutation.
bemmesr added reference 1-data_model 2026-07-18 14:57:27 +00:00
Author
Owner

Ideally the size of the state object would be a multiple of 64 bytes or vice versa.

Ideally the size of the state object would be a multiple of 64 bytes or vice versa.
bemmesr self-assigned this 2026-07-18 16:25:10 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
bemmesr/previ#1
No description provided.