Giter Club home page Giter Club logo

jak's Introduction

Simple frp text editor for testing and learning purposes.

Status

The text editor can currently edit and show text.

Planned features are (in order of importance):

  • Can edit text.
  • Has a viewport.
  • Supports line wrapping.
  • Can read and write files.

Long term goals:

  • Supports the Language Server Protocol (using haskell-lsp-client).
  • Has vim keybindings.
  • Has a browser frontend (this is the reason for the AGPL license).

Design decisions

Feel free to contact me (for example by opening an issue here) if you would like to have any other design decisions explained.

Yampa

I chose to use frpnow mainly because it promises an efficient implementation and it doesn't have many extraneous features which I probably won't need and will only get in the way of learning how to use it.

The main alternatives for me would be Yampa, but I didn't want to learn how to use the arrow interface. Or maybe reflex when I'm more comfortable with FRP.

UPDATE 2019-08-08:

I have now learned how to use the arrow interface, it is not too hard. I think that the new Yampa implementation is much nicer than the previous frpnow implementation.

Type safety

I am using explicit data types for each different type of integer. I hope this will prevent most mistakes that can happen.

The main disadvantage of this is that conversions between the types need to be explicitely specified by the programmer, but I personally really like it when all the types logically fit together.

Modularity

I have decided to split the viewport, cursor and content. This should improve the readability and modularity of the code. A disadvantage is that some internal information is lost so some functions may have worse performance, but it shouldn't influence the worst case time complexity.

When implementing this I really noticed that the code became much more readable.

jak's People

Contributors

noughtmare avatar juhp avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.