在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):haskell/critbit开源软件地址(OpenSource Url):https://github.com/haskell/critbit开源编程语言(OpenSource Language):Haskell 100.0%开源软件介绍(OpenSource Introduction):Crit-bit trees for HaskellThis is the first purely functional implementation of crit-bit trees that I'm aware of. A crit-bit tree is a key/value container that allows efficient lookups and ordered traversal for data that can be represented as a string of bits. This package exists in part with education in mind:
Education aside, crit-bit trees offer some interesting features compared to other key/value container types in Haskell.
Of course crit-bit trees have some downsides, too. For example, building a tree from randomly ordered inputs is somewhat slow, and of course the set of usable key types is small (only types that can be interpreted as bitstrings "for free"). Compared to the most easily findable crit-bit tree code you'll come across that's written in C, the core of this library has a lot less accidental complexity, and so may be easier to understand. It also handles arbitrary binary data that will cause the C library to go wrong. How to contributeI've purposely published this package in an incomplete state, and I'd like your help to round it out. In return, you get to learn a little Haskell, have your code reviewed by someone who wants to see you succeed, and contribute to a rather nifty library. Do you need any prior experience with Haskell to get started? No! All you need is curiosity and the ability to learn from context. Oh, and a github account. My aim with this library is drop-in API compatibility with the widely
used Haskell
Getting startedIf you want to contribute or play around, please use the most modern version of the Haskell Platform. Once you have the Platform installed, there are just a few more steps. Set up your local database of known open source Haskell packages.
Both the new Get the
Set up a sandbox. The first time through, you may need to download and install a ton of dependencies, so hang in there.
The To actually build:
Running the test suiteOnce you've built the code, you can run the entire test suite fairly quickly. This takes about 30 seconds on my oldish 8-core Mac laptop:
(The If you're feeling impatient, run a subset of the test suite:
And if you want to explore, the Running benchmarksIt is just as easy to benchmark stuff as to test it. First, you need a dictionary. If your system doesn't have a file named
If you've downloaded a dictionary, tell the benchmark
suite where to find it by setting the
You can then run benchmarks and generate a report. For instance, this
runs every benchmark that begins with
Open the As with What your code should look likeOkay, so you've bought into this idea, and would like to try writing a patch. How to begin? I've generally tried to write commits with a view to being readable, so there are examples you can follow. For instance, here's the commit where I added the
Naturally, you'll follow the prevailing coding and formatting style. If you forget, I'll be sad and offer you only a terse "fix your formatting" review, and then you'll be sad too. What your commits should look likePlease follow the guidelines below, as they make it easier to review your pull request and deal with your commits afterwards.
(If you can't follow the guidelines, there's a good chance I'll ask you to fix your commits and resubmit them.) |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论