Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hamiltop/structurez
A playground for data structures in Elixir
https://github.com/hamiltop/structurez
Last synced: about 2 months ago
JSON representation
A playground for data structures in Elixir
- Host: GitHub
- URL: https://github.com/hamiltop/structurez
- Owner: hamiltop
- License: mit
- Created: 2014-08-13T00:25:58.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-09-09T05:52:31.000Z (over 9 years ago)
- Last Synced: 2024-10-01T19:49:07.094Z (2 months ago)
- Language: Elixir
- Size: 152 KB
- Stars: 14
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- freaking_awesome_elixir - Elixir - A playground for data structures in Elixir. (Algorithms and Data structures)
- fucking-awesome-elixir - structurez - A playground for data structures in Elixir. (Algorithms and Data structures)
- awesome-elixir - structurez - A playground for data structures in Elixir. (Algorithms and Data structures)
README
Structurez
==========A playground for data structures
### `Treeset`
An ordered set wrapping `:gb_sets`### `AgentDict`
A dict backed by an Agent. WARNING: This should make you cringe. It's essentially a mutable Dict. Only use this when you need concurrent access. There are a lot of other terrible ways to use it.### `TCPClient.stream/1`
`Streamz.Net.TCPClient.stream/1` accepts a keyword list with `:host` and `:port` set. It will connect the the host and port and supports Enumerable and Collectable. This enables a bunch of cool things.#### Connecting:
```elixir
n = TCPClient.stream([host: "localhost", port: 4444])
```#### Reading data:
```elixir
n |> Enum.each &IO.inspect(&1)
```#### Writing data:
```elixir
["Hello", "World"] |> Enum.into(n)
```#### Echo Client (writes any data it receives back to the server):
```elixir
n |> Enum.into(n)
```## Up Next
There are tons of possibilities. Here's what is on the current radar.- `TCPServer/1` - A server version of `TCPClient`
- `UDPClient/1` - A UDP version of `TCPClient`
- `UDPServer/1` - A server version of `UDPClient`
- `WebSockets.stream/1` - Bidirection stream for a websocket connection.