Giter VIP home page Giter VIP logo

ron's People

Contributors

cab404 avatar cblp avatar dkellner avatar dpwiz avatar iupii avatar mputz86 avatar nexmean avatar willbasky avatar wiz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ron's Issues

Generate lensish API

-- now
note_status_assignIfDiffer newStatus = do
    curStatus <- note_status_read
    when (curStatus /= newStatus) $
        note_status_assign newStatus

-- should be
assignIfDiffer new = do
    cur <- read
    when (cur /= new) $
        assign new
- note_status_assignIfDiffer
+ note_status &~ assignIfDiffer

Read schema from EDN

Example from ff:

    (ron_schema_edn [1 0]

        (opaque Status)
        (opaque NoteStatus)

        (struct_lww Tracked
            (provider    String)
            (source      String)
            (externalId  String)
            (url         String))

        (struct_lww Contact
            (status  Status)
            (name    RgaString)
            #Haskell {field_prefix "contact_"})

        (struct_lww Note
            (status  NoteStatus)
            (text    RgaString)
            (start   Day)
            (end     (Option Day))
            (tracked (Option Tracked))
            #Haskell {field_prefix "note_"})
    )
  1. Decode EDN -> Schema
  2. Macro to write EDN-schema inside Haskell file
  3. Macro to write EDN-schema in external file

Speed up parsers

  • find bottlenecks in Attoparsec implementation
  • try FSM parser
  • increase limits in tests

Word-based RGA

Problem:

     +--> Arne --+
     |           |
     |           v
Bjorne           Annie
     |           ^
     |           |
     +-> Bonnie -+

Automatic character-base RGA merge may give words semantically misleading, contradicting human-written versions.

Proposed solution: generate ops using words.

     +--> Arne --+
     |           |
     |           v
Bjorne           ArneBonnie
     |           ^
     |           |
     +-> Bonnie -+

Unresolved questions:

  1. Is it still possible to make misleading words?
  2. What about misleading sentences made up from word-ops coming from different sources?

Configurable serializer

Configure:

  • spaces between fields, or tabs, or none
  • newlines between ops
  • skip keys
  • skip parts of keys
  • paren compression
  • reduced op's trailing comma
  • frame's trailing dot

Add modules and imports in Schema

; built-in, implicit
; (import Atom)
; (import RDT [RGA, ORSet, VersionVector])

; stdlib
(import Time Day)
(... use Day ...)

; user libraries?

Fix weeder on Travis

$ $STACK exec -- weeder
weeder: /home/travis/build/ff-notes/ron/ron-test/.stack-work/dist/x86_64-linux/Cabal-2.2.0.1: getDirectoryContents:openDirStream: does not exist (No such file or directory)
The command "$STACK exec -- weeder" exited with 1.

Implement struct via OR-Set

Problem: LWW doesn't guarantee correctness in case of concurrent key adding.

Solution: ORSet of pairs (key, UUID-ref to value object)

  • When multiple values, merge them according to their type
  • When types differ... use the last (lww)?

Use op chains

Useful for RGA

  1. Parenthesized chains
  2. String chains

UUID.mkName cuts names

λ> mkName "VeryLongName" >>= getName 
Just ("VeryLongNa","")

λ> mkName "ABitLongerName" >>= getName 
Nothing

Clock is not advanced to the last op in the database

Problem

A fresh timestamp may clash with existing.

Proposed solution

  1. Ensure version id is (⩾) than all ops inside a version.
  2. Make document versions readable as timestamps. (???)
  3. On database open, advance time to all versions.

Implement ORSet.removeBy

So far, it's only a stub:

removeBy :: ([Atom] -> Bool) -> StateT (Object (ORSet a)) m ()
removeBy = undefined

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.