Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eiri/horrible-hash
Hash (dictionary) as an erlang process
https://github.com/eiri/horrible-hash
Last synced: 28 days ago
JSON representation
Hash (dictionary) as an erlang process
- Host: GitHub
- URL: https://github.com/eiri/horrible-hash
- Owner: eiri
- License: mit
- Created: 2016-03-17T01:36:14.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-11-04T01:05:35.000Z (about 4 years ago)
- Last Synced: 2023-03-25T21:58:02.893Z (over 1 year ago)
- Language: Erlang
- Homepage: https://eiri.github.io/horrible-hash/
- Size: 447 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hash as an erlang process
##### Should Not Be Used Without Adult Supervision[![Build Status](https://github.com/eiri/horrible-hash/workflows/build/badge.svg)](https://github.com/eiri/horrible-hash/actions)
[![No Maintenance Intended](http://unmaintained.tech/badge.svg)](http://unmaintained.tech/)## What is it
This is an erlang module that makes a mutable hash (in Perl's meaning) with a little help of process dictionary.## Motivation
Mischief, mostly.## Build
```bash
git clone https://github.com/eiri/horrible-hash.git
cd horrible-hash
make
make shell
``````erlang
Erlang/OTP 18 [erts-7.2.1] [source] [64-bit] [smp:4:4] [async-threads:0] [hipe] [kernel-poll:false] [dtrace]Eshell V7.2.1 (abort with ^G)
1> horrible_hash:new('$hash').
true
2> horrible_hash:set('$hash', key, value).
true
3> horrible_hash:exists('$hash', key).
true
4> horrible_hash:get('$hash', key).
value
5> horrible_hash:delete('$hash', key).
true
6> horrible_hash:exists('$hash', key).
false
7> horrible_hash:delete('$hash').
true
8>
```## Include in your project
Please don't.
Well, ok, if you insist.
```erlang
{deps, [
{horrible_hash, {git, "https://github.com/eiri/horrible-hash.git"}, {tag, "0.1.0"}}
]}
```## Usage
http://eiri.ca/horrible-hash/
## Random QA
* _Should I use it in production?_
No.* _Yeah, but why not to use it?_
Because it destroys referencial transparency, makes debugging difficult and in general gives nothing ETS doesn't give.## Licence
[MIT](https://github.com/eiri/horrible-hash/blob/master/LICENSE)