Giter Site home page Giter Site logo

ninefx / bs-precis Goto Github PK

View Code? Open in Web Editor NEW
1.0 4.0 1.0 2.06 MB

Bucklescript Implementation for Precis; WIP NPM package for Precis string-prep

License: MIT License

Python 1.81% Shell 0.03% Reason 97.16% Go 1.00%
precis i18n rfc8264 rfc8265 rfc8266 bucklescript reasonml npm

bs-precis's People

Contributors

varnerac avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

isabella232

bs-precis's Issues

More Tests

It would be nice to generate more tests, to hit more code coverage, and more edge cases. Currently, only the profiles are extensively tested. We would also like to add profile exceptions to be matched correctly, for more thorough testing.

Optimization of Long Switch Statements

The implementation of some of the core unicode functions are generated by the python scripts in ./precis_gen/. They are also either long switch statements, or an optimized b-tree implementation. When trying to use lookup tables, we ran into memory issues. And straight switch statements gave us incredibly long run times. This is the solution I have at the moment, and am open to hearing others.

Examples of B-Tree Optimization

  • src/PrecisCodePoints.re
    • fromCodePoint: codePoint => precisType
  • src/PrecisCodePoints.re
    • lowerCaseMap: codePoint => codePoint

All switch statements over a certain size should be optimized this way.

Errors in Precis Implementation

Currently we generate tests off of @byllyfish/precis_i18n including their original golden.json. The additional 40,000 tests were added to golden.json. We are missing around 2.5% of the comparisons. At the very least, it would be very helpful to know why, if not patch those issues.

Test Suites: 2 failed, 2 passed, 4 total
Tests:       1025 failed, 42276 passed, 43301 total
Snapshots:   0 total
Time:        101.394s

Documentation

We should begin writing documentation for the library, including precis-gen/.

NPM Package

Once #3 is solved, we would like to package this as an NPM package.

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.