Skip to content

JanHenryNystrom/jhn_stdlib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jhn_stdlib (γ)

A few thought experiments solidified as code.

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
  • Standards
    • Encoding/decoding URI/Erlang -- uri rfc3986
    • Encoding/decoding IP addresses/Erlang -- ip_addr rfc4291, rfc5952, rfc4632
    • Generating/encoding/decoding Timestamps Posix/Erlang -- timestamp rfc3339
  • 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
    • CRC32-C checksum -- jhn_hash rfc9260
    • xxHash-32 checksum -- jhn_hash xxHash
  • json -- use jhn_json instead, with the exception of validation
  • jstream -- use jhn_json instead

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

Two things might seem alarming when running the tests:

  1. Warnings emitted by cover
  2. 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.