Giter Club home page Giter Club logo

transducers.jl's Introduction

Transducers.jl: Efficient transducers for Julia

Stable documentation Latest documentation Travis Status codecov.io Coverage Status Aqua QA

Transducers.jl provides composable algorithms on "sequence" of inputs. They are called transducers, first introduced in Clojure language by Rich Hickey.

Using transducers is quite straightforward, especially if you already know similar concepts in iterator libraries:

using Transducers
1:40 |> Partition(7) |> Filter(x -> prod(x) % 11 == 0) |> Cat() |> Scan(+) |> sum

However, the protocol used for the transducers is quite different from iterators and results in a better performance for complex compositions. Furthermore, some transducers support parallel execution. If a transducer is composed of such transducers, it can be automatically re-used both in sequential (foldl etc.) and parallel (reduce etc.) contexts.

See more in the documentation.

If you are interested in parallel programming in general, see also: A quick introduction to data parallelism in Julia

Installation

using Pkg
Pkg.add("Transducers")

Related packages

Following packages are supported by Transducers.jl. In particular, they rely on the Transducers.jl protocol to support multi-threading, multi-processing, and GPU-based parallelism.

  • Folds.jl implements parallelized Base-like API based on Transducers.jl. This package can be used without knowing anything about transducers.
  • FLoops.jl provides for-loop syntax for using the loop executed by the Transducers.jl protocol.
  • BangBang.jl implements mutate-or-widen API. This is the foundation of typocalypse-free map/collect-like functions. Functions such as append!!, merge!!, mergewith!!, union!!, etc. are useful as a reducing function.
  • InitialValues.jl provides a framework for initial/identity element of folds.
  • MicroCollections.jl provides empty and singleton collections (arrays, dicts and sets). They are useful when writing transducers and reducing functions that construct a data collection.

transducers.jl's People

Contributors

tkf avatar masonprotter avatar mergify[bot] avatar github-actions[bot] avatar tkf-bot avatar jw3126 avatar cscherrer avatar harryscholes avatar jonalm avatar juliatagbot avatar kristofferc avatar nsajko avatar lebedevri avatar atthom avatar xiaodaigh avatar maartenvd avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.