jhn_stdlib (γ)
A few thought experiments solidified as code: CBOR, JSON, MessagePack, syslog, URI, IP addresses, Timestamp, UUID, TypeID
- Introduction
- Behaviours
- Features/Modules
- Deprecated 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 perticular 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.
jhn_server
-- A generic serverjhn_fsm
-- A FSM with the ability to defer acting on events until a later state
- String Processing Functions for binary encoded strings
jhn_blist
-- drop in replacement for the lists module in stdlibjhn_bstring
-- drop in replacement for the string module in stdlibjhn_mustache
-- Mustache (template system)
- Protocols
- Bencoding -- encoding/decoding --
jhn_bencoding
- CBOR -- encoding/decoding --
jhn_cbor
rfc8949, rfc9542 - JSON -- encoding/decoding --
jhn_json
rfc8259 - JSON Pointer -- encoding/decoding/evaluation --
jhn_json
rfc6901 - JSON Patch -- evaluation --
jhn_json
rfc6902 - JSON Merge Patch -- evaluation --
jhn_json
rfc7396 - MessagePack -- encoding/decoding --
jhn_msgpack
MessagePack/Erlang - Syslog -- encoding/decoding --
jhn_syslog
rfc5424, rfc5427, rfc6012
- Bencoding -- encoding/decoding --
- Standards
- IP Addresses -- encoding/decoding --
jhn_ip_addr
rfc4291, rfc5952, rfc4632 - Timestamps -- generating/encoding/decoding --
jhn_timestamp
rfc3339, rfc7231 - TypeID -- generating/encoding/decoding --
jhn_typeid
TypeID - URI -- encoding/decoding --
jhn_uri
rfc3986 - UUID -- generating/encoding/decoding --
jhn_uuid
rfc9562rfc8141
- IP Addresses -- encoding/decoding --
- Clients
- Pull oriented data source abstraction
- lazy --
jhn_lazy
abstracts different data sources as uniform lazy data
- lazy --
- Data structures
- Bloom filters --
jhn_bloom
Bloom Filters - Property lists --
jhn_plist
- Prefix trees --
jhn_p_tree
Prefix Tree - Binary(UTF-8) Prefix trees --
jhn_pb_tree
Prefix Tree, UTF-8 - Range trees --
jhn_r_tree
Range Tree - T-trees --
jhn_t_tree
T-tree
- Bloom filters --
- Algorithms
- Levenshtein distance --
jhn_math:levenshtein/2
Levenshtein - Check digit
- Checksums
- Consistent Hashing --
jhn_chash:jump/2
J. Lamping, Eric Veach
- Levenshtein distance --
jhn_stdlib requires rebar3 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
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
For a much nicer history, please write good commit messages. I know I really should.