Giter VIP home page Giter VIP logo

braid's Introduction

braid

cargo test status

Minimal rope implementation in rust.

Written as an exercise in the language, so do not expect any particular degree of correctness, functionality, stability, performance, sanity, etc.

braid's People

Contributors

omnikron13 avatar

Watchers

 avatar

braid's Issues

create 'ranged' trait

shifting the normalise_range() method onto a trait would allow it to more easily be applied to e.g. LeafNode, Index, etc.

add char->byte index check/calculate helper to Run?

it could be perhaps something like:

byte_index(char_index, offset = 0) -> byte_index | (char_index, offset)

the need for an enum to return could make it a little fiddly, though you could also just try each Run in sequence to get the eventual answer, as it can handle checking the char count against the char_index, calculating the final byte_index on a match, and decrement char_index and increment offset on a miss.

restructure the strand enum/structs/etc

the enum aspect could be shifted to cover just the (str|l + r) part, allowing for heavier nodes with e.g. indexes and shit.

at minimum the 'length' field should probably be pulled out, as there is no real need to duplicate it and defer through etc. etc...

with that said, length itself may possibly be superceded by something from the new index module.

create un-ranged splittable trait?

atm all Splittable are also ranged.

however, CharWidth & Newline (from index) are both able (and required) to be split(), but are unaware of their ending bounds.

could remove the Ranged parent from Splittable, and add in a new RangedSplittable (for example) which is essentially just Splittable with some assertions and such applied for error checking purposes?

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.