• Stars
    star
    393
  • Rank 106,012 (Top 3 %)
  • Language
    Julia
  • License
    MIT License
  • Created almost 6 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Julia functional programming infrastructures and metaprogramming facilities

MLStyle.jl

CI codecov License Docs Join the chat at https://gitter.im/MLStyle-jl/community

Providing intuitive, fast, consistent and extensible functional programming infrastructures, and metaprogramming facilities.

Check everything in the documentation website.

Preview

using MLStyle

@data Shape begin # Define an algebraic data type Shape
    Rock
    Paper
    Scissors
end

# Determine who wins a game of rock paper scissors with pattern matching
play(a::Shape, b::Shape) = @match (a, b) begin
    (Paper,    Rock)      => "Paper Wins!";
    (Rock,     Scissors)  => "Rock Wins!";
    (Scissors, Paper)     => "Scissors Wins!";
    (a, b)                => a == b ? "Tie!" : play(b, a)
end

P.S: When preferring Base.@enum than MLStyle.@data, you need this to pattern match on Julia Base.@enum.

Benchmarks

Arrays

matrix-benchmark/bench-array.jl

Tuples

matrix-benchmark/bench-tuple.jl

Data Types

matrix-benchmark/bench-datatype.jl

Extracting Struct Definitions

matrix-benchmark/bench-structfields.jl

Misc

matrix-benchmark/bench-misc.jl

An Example from Match.jl Documentation

matrix-benchmark/bench-versus-match.jl

Acknowledgements

Thanks to all individuals referred in Acknowledgements!

More Repositories

1

diojit

Fully compatible CPython jit compiler. Optimising Dynamic, Interpreted, and Object-oriented(DIO) programs.
Python
116
star
2

moshmosh

An amazing syntax extension system in pure Python, the way to coding efficiency.
Python
109
star
3

restrain-jit

The first and yet the only CPython compatible Python JIT, over the world.(julia backend: https://github.com/thautwarm/RestrainJIT.jl)
Python
106
star
4

flowpython

tasty feature extensions for python3(NO MAINTENANCE!).
C
65
star
5

EBNFParser

Convenient parser generator for Python(check out https://github.com/thautwarm/RBNF for an advanced version).
Python
63
star
6

Typed-BNF

Statically typed BNF with semantic actions; safe parser generator applicable to every programming language.
TypeScript
59
star
7

CanonicalTraits.jl

Full-featured traits in Julia. Without full features how dare I say this?
Julia
59
star
8

Traffy.UnityPython

An efficient Python implementation in C#, running on every platform via Unity IL2CPP.
C#
44
star
9

FSTan

Higher abstraction infrastructures in F#(ad-hoc polymorphism, subtypeclassing, monad, hkt...), exactly what we've dreamed about for so long
F#
43
star
10

RBNF.jl

A DSL for modern parsing
Julia
40
star
11

RBNF

This project's lifetime has ended. The successor is https://github.com/thautwarm/frontend-for-free which is WIP. You can check lark-parser project which is a good alt.
Python
39
star
12

frontend-for-free

end the parsing problem
Python
39
star
13

Virtual.jl

Julia
38
star
14

graphviz-artist

A chance to focus on graph drawing itself, forget APIs and other stuffs.
Python
37
star
15

idris-python

Successor project: https://github.com/thautwarm/Quick-Backend
Python
25
star
16

idris-cam

Sucessor: https://github.com/thautwarm/Quick-Backend
Idris
24
star
17

Rem

(Deprecated)Rem Programming Language: a playful dynamic language with all modern syntax sugars.
Python
24
star
18

DIO.jl

Julia implementation for Python Restrain JIT
Julia
22
star
19

LLAST

A high level LLVM IR AST provider for GraphEngine JIT.
F#
22
star
20

Quick-Backend

Idris, make back end, in 15 minutes, reusable, concise: https://bitbucket.org/thautwarm/ppl2020-idris-codegen-backend/src/master
TeX
22
star
21

gkdhighlight

syntax highligher for GkdTeX
TeX
21
star
22

PrettyPrint.jl

pretty print that makes sense
Julia
20
star
23

DevOnly.jl

Using runtime-free macro packages as dev-only dependencies.
Julia
20
star
24

MLStyle-Playground

Examples for MLStyle.jl
Julia
19
star
25

RSolve

Ask for solutions.
Haskell
19
star
26

DianaScript-JIT

C#
19
star
27

MLFS.jl

MLFS type system: raising ML to the power of system F in a Simplest way
Python
19
star
28

JuliaPythonAdaptor.jl

Relocatable Julia-Python bidirectional bridging solution.
Python
17
star
29

simple-pl-example

Implementing a programming language within 20 minutes, also a tutorial for syntax driven parsing with frontend-for-free.
Python
16
star
30

PySExpr

S-expressions in Python. Python cross-version compiler. Clean and efficient LISP back end.
Python
16
star
31

MatchCore.jl

non-extensible/hardcoded pattern matching, core of MLStyle
Julia
16
star
32

Fable.Sedlex

get you an ultimate lexer generator using Fable; port OCaml sedlex to FSharp, Python and more!
JavaScript
15
star
33

cross-editor-syntax-highlighter

cross-editor syntax highlighter for Lua, showing some merit of Typed BNF: https://github.com/thautwarm/typed-bnf
Python
14
star
34

Sequent.jl

formally and easily, describe the semantics.
Julia
13
star
35

UPL

A compiler for higher rank ML with type classes
F#
13
star
36

goto.py

modern implementation of real goto/label statements in python 3.5+.
Python
12
star
37

do-you-like-wan-you-si

脑洞,让自己的生活更美好。
Python
11
star
38

Incantation

Say incantations to enjoy web designing.
Python
11
star
39

vscode-diana

a VSCode plugin to provide basic language support for DianaScript
ANTLR
11
star
40

DianaVM

Diana... 🥳🥳🥳Diana, suki🤤🤤🤤
C#
11
star
41

Redy

thautwarm utilities.
Python
11
star
42

plfp

my slides for sharing in our Lab, integrated as the series Programming Languages for Fun and Practice
OCaml
10
star
43

autojmp

autojump implementation that is applicable to any shell and any OS
Python
10
star
44

reley

haskell-like compiled language based on Python VM
Python
10
star
45

original-posting

Original posting, a.k.a. OP, is an ALL-IN-ONE markup language for cyber wizards to create documentations and blog pages.
Python
10
star
46

HigherKindedPolymorphisms.jl

A refined implementation of Lightweighted Higher Kinded Types in Julia(via typeclasses/traits)
Julia
9
star
47

ParameterisedModule.jl

Full featured parameterised ML-modules in Julia
Julia
9
star
48

Site-32

thautwarm's blog page.
HTML
8
star
49

rmalt

the malt language implemented by rbnf. https://github.com/malt-project/cmalt
Python
8
star
50

Metagen

Dependently type-safe code generator .
Haskell
8
star
51

ml-to-scheme

Allow using ML to teach courses that're usually given in LISPs
Python
8
star
52

RBNF.hs

Cross-language context-sensitive parsing with type inference, left recursion resolutions and decision tree optimizations.
Haskell
8
star
53

Site-33

https://thautwarm.github.io/Site-33/
Python
8
star
54

MLBI

ML with Best Instantiations, for arbitrary-rank types.
F#
8
star
55

gkd

build confidence with LaTeX. appreciations to @iExploder as we together figure out a valid and much better way to call python in LaTex.
Python
8
star
56

FastParse.fs

fast, easy, typed, minimal
F#
8
star
57

The-Algorithms-in-Numerical-Analysis-with-Python-Implementation

教学轮-数学运算库
Python
7
star
58

simplenote

a programming language to encode numbered musical notations. I run this in the virtual conference of PPL 2022..
Python
7
star
59

JML.jl

A ML dialect based on Julia, for MLStyle examples.
Julia
7
star
60

paper-implementation

I.have(a_cat).then( _.cat.play_with)
Python
6
star
61

LanguageCollections

programming languages invented/implemented by myself.
6
star
62

Ruiko.fs

context sensitive grammar + parser combinator + .NET
F#
6
star
63

SequentExamples.jl

Julia
6
star
64

PrettyDoc.jl

An easy-to-use and lightweight text layout combinator library, serving high-quality pretty printing, text code generation, etc.
Julia
6
star
65

rbnf-rts

Fastest python pgen with rich features. Runtime support for generated parsers of RBNF.hs and a bootstrap with menhir-like syntax sugars.
Python
5
star
66

lua-parser.cs

An out-of-box Lua parser, by antlr4, in csharp.
C#
5
star
67

Sedlex.jl

Julia runtime support Fable Sedlex
Julia
4
star
68

schema-provider.py

Python
4
star
69

typed-jsonrpc

Python
4
star
70

NumScala

fOr data analysis with Scala.
Scala
4
star
71

typed-bnf-csharp-demo

A json parser implemented by typed-bnf and generated to Antlr4-CSharp.
C#
4
star
72

dot-parser-example

Implementing a parser for the dot language in Julia, using our new parser generator.
Julia
4
star
73

panpanneed

Your local cloud drive implemented in one-liner code.
Python
4
star
74

rbnfrbnf

Deprecated. See https://github.com/thautwarm/rbnf-rts
Python
4
star
75

NLPWorks

I offered quite a lot with coding and algorithms to some private project, and I share the public parts here to log my life.
Python
4
star
76

rsolve.py

For constraint satisfaction problems in Python
Python
4
star
77

Benchmarkplotting.jl

Benchmark intuitively!
Julia
3
star
78

DianaScript

check https://github.com/thautwarm/DianaScript-JIT
C#
3
star
79

scripts

Jupyter Notebook
3
star
80

AOP

reliable and efficient python meta-programming for building productivity tools
Python
3
star
81

SquirrelLanguage

此坑已久,代码很丑。以记过往,不宜奉读。
Python
3
star
82

gkdtex

A programmable, TeX-compatible and 2-stage typesetting language.
Python
3
star
83

FrontendForFreeParsing.jl

A wrapper of https://github.com/thautwarm/frontend-for-free
Julia
3
star
84

alva

The Mu programming language
3
star
85

Recognition

开心~
Python
3
star
86

formulapy

external tools to type math formulas in Python files.
Python
3
star
87

AbstractPattern

optimize pattern matching compilation and separate front-end syntatic constructs from semantics
Julia
3
star
88

gkdbnf

convert bnf files, to LaTex notations, supporting multiple LaTex BNF packages as back ends
Python
3
star
89

latmap

Ideas of convenient editor development.
Python
3
star
90

voicecontrol

thorough voice-control for emacs-like editors
Python
2
star
91

HMRowUnification.jl

Providing HM unification with row polymorphism support
Julia
2
star
92

pykg

A generic dependency solver; designed as a proposal Fable-Python package manager.
PowerShell
2
star
93

Dealing-with-Features

在数据挖掘实战中锻炼处理实际数据特征的能力
Python
2
star
94

scoping-resolver

Resolve python's scopes for compiler usage
Python
2
star
95

thautwarm

2
star
96

inline-cache-impl

Implementation of inline cache in Python.
Python
2
star
97

lua-parser-lark

Python
2
star
98

pretty-doc

composable text objects.
Python
2
star
99

merlin

The programming language to indicate an elegant way to use python vm. It's a static strongly typed language which is readable and trait-oriented with simple dependent types.
Python
2
star
100

voice-typing-editor

voice-typing-editor via existing input methods
Python
2
star