Skip to content

guidosalva/editor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

editor

This project is a basic text editor that comes in five flavors. All versions except the last one use a gap buffer, a specialized data structure to store the textual data and allows for efficient insertion and deletion at the caret position.

  • imperative
    no signals or events, only imperative code, value changes are propagated via observables (Swing Reactors)

  • events
    REScala events (but no signals)
    event stream composition is a bit complex, but this reduces the number of places where the caret needs to be updated

  • signal0
    based on the imperative version but uses REScala events and signals to express dependencies (e.g. line count etc.)

  • signal1
    based on the events version but uses REScala signals

  • signal2
    based on the signals1 version
    this version does not use a mutable data structure (gap buffer) to represent the text, state is represented using signals and events only. There is just very little imperative code left that is needed to interact with certain library functions (like clipboard copy/paste)

About

A minimal text editor based on reactive programming

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages