Algebird
frunk
Our great sponsors
Algebird | frunk | |
---|---|---|
2 | 7 | |
2,285 | 1,197 | |
0.4% | - | |
7.6 | 5.9 | |
19 days ago | 2 months ago | |
Scala | Rust | |
Apache License 2.0 | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Algebird
-
What do you use when you have to store high cardinality metrics?
https://github.com/twitter/algebird (production ready, used at Twitter, but for the JVM)
-
Symbolics.jl: A Modern Computer Algebra System for a Modern Language
Hey, I have... I'm a co-author of Algebird[0], which has many ideas that I'd pull over.
I'm hoping to introduce Clojure's "spec" or "schema" libraries so that the types at play can at least be inspectable inside the system. In a fully typed language, I'd implement the extensible generics as typeclasses.
I suspect it would make it quite a bit tougher (at least in the approach I'm imagining) for folks to write new generic functions, due to many type constructors...
On the other hand, the complexity is there, even if you don't write it down!
It would be a big project, and a worthy effort, to write down types for everything in SICM.
frunk
-
Apply generic function to every tuple element
So rust doesn't support variadics, but I have heard some murmurings around the topic. In the meantime, you can still do a lot with recursive tras. The frunk crate makes working with them a lot easier: In this case
-
Self Referencing structs with different generic types
I think the closest possible approach is the one used in frunk where those consecutive types are nested recursively (creating a linked list on type level basically) and special type is used as the end.
-
Is there a convenient way to convert a struct<T> (where all fields are of type T) into struct<U> where U: From<T>?
I suggest looking into frunk. You could convert the struct into an HList, map over the values to convert and convert into the target struct. README has some relevant examples.
-
Can we make useful streaming APIs that disallow deadlocks?
So a while back I got interested in how rust could provide parallel/concurrent APIs that prevent deadlocking shared state. I now created a Proof-of-Concept stream processing library that attempts to do that. The library makes prodigious use of heterogeneous lists from the frunk library. The basic idea is that you can build a graph by combining source streams as source nodes and mutexes for state, then you can add nodes which subscribe to subsets of the previous nodes using various combinators. You can either
-
constduck: compile-time duck typing and reflection powered by const generics
Hey, #[derive(LabelledGeneric)] from frunk does something like this, but without const generics, so it has odd representations for things like type-level strings (it's represented as a tuple of chars so (a, b, c) is the type-level representation of the string "abc")
-
Symbolics.jl: A Modern Computer Algebra System for a Modern Language
I don't understand why you call it "trickery or "fake". Church encoding of natural numbers is the same technique used in Agda, Coq and Idris to represent the Peano numbers. It's a completely valid encoding and isomorphic to any other representation.
You don't need to use a fixed-length array either - you can used a recursive linked list at the type-level for an unbounded encoding [1]. The Scala library is an example of that; the Github page even has an example of encoding arbitrary units like sheep and wheat.
-
Generic associated types encode higher-order functions on types
I wonder if frunk can (ab)use this kind of trick to make their crate even more powerful. IIRC they have a bunch of amazing and horrible workarounds to work with type-level lists.
What are some alternatives?
Breeze - Breeze is a numerical processing library for Scala.
tyrade - A pure functional language for type-level programming in Rust
Zeppelin - Web-based notebook that enables data-driven, interactive data analytics and collaborative documents with SQL, Scala and more.
stately-streams - combine mutable state and asynchronous streams without deadlocks
Spire - Powerful new number types and numeric abstractions for Scala.
sicmutils - Computer Algebra, Physics and Differential Geometry in Clojure.
Saddle
scroll - Scroll - making scrolling through buffers fun since 2016
ND4S - ND4S: N-Dimensional Arrays for Scala. Scientific Computing a la Numpy. Based on ND4J.
typic - Type-safe transmutations between layout-compatible types.
Apache Spark - Apache Spark - A unified analytics engine for large-scale data processing
prop-rs - duck typed objects for rust using const generics