Open-source projects categorized as pattern-matching | Edit details

Top 23 pattern-matching Open-Source Projects

  • GitHub repo pampy

    Pampy: The Pattern Matching for Python you always dreamed of.

    Project mention: why is scala considered hard? | reddit.com/r/scala | 2020-12-24

    What about some Python's alternative then? https://github.com/santinic/pampy https://pythonawesome.com/pampy-the-pattern-matching-for-python-you-always-dreamed-of/

  • GitHub repo C++ Actor Framework

    An Open Source Implementation of the Actor Model in C++

  • GitHub repo stumpy

    STUMPY is a powerful and scalable Python library for computing a Matrix Profile, which can be used for a variety of time series data mining tasks

    Project mention: [D][R] Clustering techniques for time series - MSc thesis | reddit.com/r/MachineLearning | 2021-02-09

    Haven't used it before, but I've seen a few powerpoints on https://github.com/TDAmeritrade/stumpy.

  • GitHub repo ts-pattern

    🎨 An exhaustive Pattern Matching library for TypeScript, with smart type inference.

    Project mention: How to practically use unions to prevent invalid states? | reddit.com/r/typescript | 2021-05-04

    And then use nested switches to determine the new state when toggling one of the options. I've come to prefer dumb code. See this playground. You could also use a library like ts-pattern if you don't like nested switches.

  • GitHub repo egison

    The Egison Programming Language

    Project mention: The Egison Programming Language | news.ycombinator.com | 2021-03-08
  • GitHub repo meander

    Tools for transparent data transformation

    Project mention: What are some great Clojure libraries, as of 2021? | reddit.com/r/Clojure | 2021-03-30

    I would mention meander for pattern matching and term rewriting https://github.com/noprompt/meander

  • GitHub repo MLStyle.jl

    Julia functional programming infrastructures and metaprogramming facilities

    Project mention: Pattern Matching Accepted for Python | news.ycombinator.com | 2021-02-09

    > and we're stuck with an inferior Lisp/ML, especially in the scientific sector.

    You will love Julia.

    Here is some links:


    Julia: Dynamism and Performance Reconciled by Design (https://dl.acm.org/doi/pdf/10.1145/3276490)


    And when you start finding things that you miss, Julia and the community got you with excellent Metaprogramming support.




  • GitHub repo patty

    A pattern matching library for Nim

    Project mention: Patten Matching in Nim | news.ycombinator.com | 2021-03-11

    ...except that macros don't change the syntax of the language! They just offer convenience on top of it, most common example is the `=>` lambda operator from the `sugar` module. I do agree, that the pattern matching macro presented in the article is a bit hard to get used to, but you don't have to, if you don't like pattern matching. And of course there are plenty of alternatives available as well, the simplest one imo is https://github.com/andreaferretti/patty

  • GitHub repo trivia

    Pattern Matcher Compatible with Optima

    Project mention: Pattern Matching Accepted for Python | news.ycombinator.com | 2021-02-09

    > After much deliberation, the Python Steering Council is happy to announce that we have chosen to accept PEP 634, and its companion PEPs 635 and 636, collectively known as the Pattern Matching PEPs

    This is why I'm still enamored with Lisp. One doesn't wait around for the high priests to descent from their lofty towers of much deep pontification and debate with shiny, gold tablets inscribed with how the PEPs may be, on behalf of the plebes. One just adds new language feature themselves, eg. pattern matching[1] and software transactional memory[2].

    1. https://github.com/guicho271828/trivia

    2. https://github.com/cosmos72/stmx

  • GitHub repo zeallot

    Variable assignment with zeal! (or multiple, unpacking, and destructuring assignment in R)

    Project mention: How do I access the multiple return values in a function? | reddit.com/r/rstats | 2021-01-16

    The zeallot package can do this. It allows you to assign multiple values from an output. You use a new assignment operator, %

  • GitHub repo fpGo

    Monad, Functional Programming features for Golang

  • GitHub repo Index

    ⚡ Pattern Matching in Typescript

    Project mention: Pattern-matching-ts: Pattern Matching in TypeScript | news.ycombinator.com | 2021-02-15
  • GitHub repo Zeronode

    Zeronode - minimal building block for NodeJS microservices

  • GitHub repo awesome-pattern-matching

    Pattern Matching for Python 3.7+ in a simple, yet powerful, extensible manner.

    Project mention: scravy/awesome-pattern-matching Awesome Pattern Matching (apm) for Python | reddit.com/r/Python | 2021-01-04
  • GitHub repo pattern-match

    Pattern matchings for Go.

  • GitHub repo matchete

    Simple pattern-matching library for Clojure(Script)

    Project mention: clojure/core.unify | reddit.com/r/Clojure | 2021-01-16

    here's a cool example using something like this in a pattern matching alg https://github.com/xapix-io/matchete/blob/master/dev/example/poker_hand.cljc

  • GitHub repo gomatch

    Library created for testing JSON against patterns.

  • GitHub repo byteseek

    A Java library for byte pattern matching and searching

    Project mention: Knuth-Morris-Pratt string-searching algorithm: DFA-less version | news.ycombinator.com | 2021-01-22

    That was a fun read, I liked the use of cmbc to validate the algorithm.

    For those who are interested, there's a good tool to specifically test string matching algorithms here:


    There are so many string matching algorithms now, with different best and worst cases. Some work better on low alphabets (eg DNA), so are better for text or high entropy data, some take advantage of CPU instructions, some are generic. The real challenge is picking the right algorithm.

    I've implemented a few of them in java here, and extended them to support multi byte matching at any position:


  • GitHub repo mini-egison

    Template Haskell Implementation of Egison Pattern Matching

  • GitHub repo matchbook-ts

    pattern matching in javascript & typescript made easy

  • GitHub repo sweet-egison

    Implementation of non-linear pattern matching with extensible and polymorphic patterns at a practical level of efficiency

  • GitHub repo Funk

    Functional programming library for C#

    Project mention: Funk -> Functional programming library for C# | reddit.com/r/csharp | 2021-02-06
  • GitHub repo lodash-patterns

    Small pattern matching tool using lodash

    Project mention: Pattern matching with Lodash - Minimal and typed | reddit.com/r/typescript | 2021-02-27
NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2021-05-04.


What are some of the best open-source pattern-matching projects? This list will help you:

Project Stars
1 pampy 3,370
2 C++ Actor Framework 2,491
3 stumpy 1,775
4 ts-pattern 1,016
5 egison 803
6 meander 657
7 MLStyle.jl 238
8 patty 219
9 trivia 212
10 zeallot 211
11 fpGo 171
12 Index 122
13 Zeronode 118
14 awesome-pattern-matching 84
15 pattern-match 77
16 matchete 62
17 gomatch 39
18 byteseek 31
19 mini-egison 30
20 matchbook-ts 17
21 sweet-egison 14
22 Funk 6
23 lodash-patterns 0