ninefx / bs-precis Goto Github PK
View Code? Open in Web Editor NEWBucklescript Implementation for Precis; WIP NPM package for Precis string-prep
License: MIT License
Bucklescript Implementation for Precis; WIP NPM package for Precis string-prep
License: MIT License
Add all tests from RFC8264, 65, 66.
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.
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.
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
We should begin writing documentation for the library, including precis-gen/
.
Once #3 is solved, we would like to package this as an NPM package.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.