chouzar / chip Goto Github PK
View Code? Open in Web Editor NEWRegistry library for gleam
Registry library for gleam
// Retrieves all tags on the registry.
///
/// ## Example
///
/// ```gleam
/// let assert Ok(registry) = chip.start()
///
/// let assert [_tag, ..tags] = chip.tags(registry)
/// ```
pub fn tags(registry: Registry(msg, tag, group)) -> List(tag) {
// TODO: May be obtained from ETS directly
todo
}
/// Retrieves all groups on the registry.
///
/// ## Example
///
/// ```gleam
/// let assert Ok(registry) = chip.start()
///
/// let assert [_group, ..groups] = chip.groups(registry)
/// ```
pub fn groups(registry: Registry(msg, tag, group)) -> List(group) {
// TODO: May be obtained from ETS directly
todo
}
/// Returns registry datapoints like a list of tags, groups, number of registered subjects.
/// Maybe some insight into the consumed memory (state + selectors)
/// Information on the different tables and records in them.
pub fn info(registry: Registry(msg, tag, group)) {
todo
}
A Default
type might be useful instead of an Option
type when creating new "chips". This is because if we don't specify a tag or a group it has to remain as a variable in its definition:
pub type PubSub(msg, tag, group) =
chip.Registry(msg, tag, group)
Currently we can only store subjects of a single type. If we had an encoder/decoder API we might be able to store subjects from different topics and return them accordingly.
let subject: process.Subject(String) = process.new_subject()
chip.register(registry, subject, to_event, from_event)
Dispatching to subjects in the registry should be done in independent tasks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.