jhn_stdlib (γ)
A few thought experiments solidified as code: CBOR, HPACK, JSON, MessagePack, syslog, URI, IP addresses, Timestamp, UUID, TypeID, mocking, cacerts
- Introduction
- Behaviours
- Features/Modules
- Deprecated Features/Modules
- Build
- Install
- Contribute - Read if you’re planning to submit patches
Introduction
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.
Behaviours
jhn_server– A generic serverjhn_fsm– A FSM with the ability to defer acting on events until a later state
Features/Modules
-
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_cborrfc8949, rfc9542 -
HPACK – encoding/decoding –
jhn_hpackrfc7541 -
JSON – encoding/decoding –
jhn_jsonrfc8259 -
JSON Pointer – encoding/decoding/evaluation –
jhn_jsonrfc6901 -
JSON Patch – evaluation –
jhn_jsonrfc6902 -
JSON Merge Patch – evaluation –
jhn_jsonrfc7396 -
MessagePack – encoding/decoding –
jhn_msgpackMessagePack/Erlang -
Syslog – encoding/decoding –
jhn_syslogrfc5424, rfc5427, rfc6012
-
Bencoding – encoding/decoding –
-
Standards
-
IP Addresses – encoding/decoding –
jhn_ip_addrrfc4291, rfc5952, rfc4632 -
Timestamps – generating/encoding/decoding –
jhn_timestamprfc3339, rfc7231 -
TypeID – generating/encoding/decoding –
jhn_typeidTypeID -
URI – encoding/decoding –
jhn_urirfc3986 -
UUID – generating/encoding/decoding –
jhn_uuidrfc9562rfc8141
-
IP Addresses – encoding/decoding –
- Clients
-
Pull oriented data source abstraction
-
lazy –
jhn_lazyabstracts different data sources as uniform lazy data
-
lazy –
-
Data structures
-
Bloom filters –
jhn_bloomBloom Filters -
Property lists –
jhn_plist -
Prefix trees –
jhn_p_treePrefix Tree -
Binary(UTF-8) Prefix trees –
jhn_pb_treePrefix Tree, UTF-8 -
Range trees –
jhn_r_treeRange Tree -
T-trees –
jhn_t_treeT-tree
-
Bloom filters –
-
Algorithms
-
Levenshtein distance –
jhn_math:levenshtein/2Levenshtein - Check digit
- Checksums
-
Consistent Hashing –
jhn_chash:jump/2J. Lamping, Eric Veach
-
Levenshtein distance –
-
Utility
-
Mocking –
jhn_shadow -
CA-Certs –
jhn_cacerts
-
Mocking –
Deprecated Features/Modules
Build
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:
makeTo make sure jhn_stdlib works on your platform, run the tests:
make testInstall
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.
Contribute
Should you find yourself using jhn_stdlib and have issues, comments or feedback please create an issue here on GitHub.
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.