jhn_stdlib (γ)
A few thought experiments solidified as code.
- Introduction
- Features/Modules
- Build
- Install
- Contribute - Read if you're planning to submit patches
This library consists mainly of code that arose out of my curiosity, either about Erlang and coding in general or concerning a pericular protocol or technique. So there is little of cohesion in purposes between the different library modules. But having published these I will continue to support these since the road to enlightenment is one without terminus.
- String Processing Functions for binary encoded strings
- blist -- drop in replacement for the lists module in stdlib
- bstring -- drop in replacement for the string module in stdlib
- mustache -- Mustache template rendering
- Protocols
- Encoding/decoding JSON/Erlang -- json rfc4627, rfc7159
- Encoding/decoding stream JSON/Erlang -- jstream rfc7159
- Encoding/decoding/evaluation JSON Pointer/Erlang -- json rfc6901
- Validation JSON schema -- json draft-zyp-json-schema-04, draft-fge-json-schema-validation-00
- MessagePack -- msgpack MessagePack/Erlang
- Bencoding -- bencoding
- Encoding/decoding Syslog/Erlang -- syslog rfc5424, rfc5427, rfc6012
- Consistent Hashing -- jhn_chash J. Lamping, Eric Veach
- Standards
- Clients
- Pull oriented data source abstraction
- lazy -- abstracts different data sources as uniform lazy data
- Data structures
- Bloom filters -- bloom
- Property lists -- plist
- Prefix trees -- p_tree
- Binary(UTF-8) Prefix trees -- pb_tree
- Range trees -- r_tree
- T-trees -- t_tree
- Algorithms
- Levenshtein distance -- levenshtein
jhn_stdlib requires rebar to build, but provides make support to download and install rebar. To build jhn_stdlib, go to the jhn_stdlib directory and type:
make
To make sure jhn_stdlib works on your platform, run the tests:
make test
Two things might seem alarming when running the tests:
- Warnings emitted by cover
- En exception printed by SASL
Both are expected due to the way Erlang currently prints errors. The
important line you should look for is All XX tests passed
, if that
appears all is correct.
If you want to install your own built version of jhn_stdlib add the ebin
directory to your Erlang code path or move the jhn_stdlib folder into your
release folder and make sure that folder is in your ERL_LIBS
environment variable.
Should you find yourself using jhn_stdlib and have issues, comments or feedback please [create an issue here on GitHub.] 2
Patches are greatly appreciated, but since these libraries reflect my learning process and I have rather peculiar notions of code hygiene I may do extensive rewrites that does not in any way diminish the appreciation I feel or indeed [express.] 3
For a much nicer history, please write good commit messages. I know I really should.