Decorator JITs: Python as a DSL

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
coderabbit.ai
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  1. pypy

    PyPy is a very fast and compliant implementation of the Python language.

  2. CodeRabbit

    CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.

    CodeRabbit logo
  3. svd_util

    python utulity funcs, classes, small languages, frameworks, scripts. i tend to use most optz, attr, struct, py3, eutf

    i needed to make the "tracing" part - which i called "explain" - without jits, in 2007-8.. using combination of operator-overloading, variables-"declaring", and bytecode hacks [0]. Applied over set of (constrained) functions. Result was well-formed trace of which var got what value because of what expression.

    So can these ~hacks be avoided now - or not really?

    [0] https://github.com/svilendobrev/svd_util/blob/master/tracer....

  4. transit-python3

    Fork of transit-python2

    it was very good. But there was a win only if one can avoid the overhead of function-calls, which is slowest thing in python - magnitude+ more than anything else (well, apart of exception throwing which is even slower, but.. rare). In my case, the speedup in calculations was lost in slowdown because of funccals.. so i ended up grouping and jamming most calculations in one-big-func(TM).. and then that was psyco-assembly-zed.

    btw funccalls are still slowest thing. somedict.get(x) is almost 2x slower than (x in somedict and somedict[x]). In my last-year attempt to optimizing transit-protocol lib [0], bundling / copying few one-line calls in one 5-line func was the biggest win - and of course, not-doing some things at all.

    [0] https://github.com/svilendobrev/transit-python3/blob/master/...

  5. attention-gym

    Helpful tools and examples for working with flex-attention

    Basically this style of code - https://github.com/pytorch-labs/attention-gym/pull/84/files - has issues like this - https://github.com/pytorch/pytorch/pull/137452 https://github.com/pytorch/pytorch/issues/144511 https://github.com/pytorch/pytorch/issues/145869

    For some higher level context, see https://pytorch.org/blog/flexattention/

  6. Pytorch

    Tensors and Dynamic neural networks in Python with strong GPU acceleration

    Basically this style of code - https://github.com/pytorch-labs/attention-gym/pull/84/files - has issues like this - https://github.com/pytorch/pytorch/pull/137452 https://github.com/pytorch/pytorch/issues/144511 https://github.com/pytorch/pytorch/issues/145869

    For some higher level context, see https://pytorch.org/blog/flexattention/

  7. python-dsls

    Materials for the talk "Python already has a frontend for your compiler" at PiterPy 2023

    It's funny how close it is to the title of my talk "Python already has a frontend for your compiler": https://github.com/true-grue/python-dsls

  8. art-deco

    Here's another blog post on this theme! https://github.com/kach/art-deco/blob/main/art-deco.ipynb

  9. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  10. paip-python

    Peter Norvig's Paradigms of AI Programming implemented in Python

    Peter Norvig himself has come around to embracing Python as an alternative to Lisp:

    https://norvig.com/python-lisp.html

    https://news.ycombinator.com/item?id=1803815

    and there is indeed a Python implementation for the PAIP programs.

    https://github.com/dhconnelly/paip-python

  11. csp

    csp is a high performance reactive stream processing library, written in C++ and Python

    CSP (https://github.com/Point72/csp) has a healthy amount of AST parsing for their DSL. Looks like they have debug breakpoints working by augmenting the line numbers in the AST generation

  12. lightning-thunder

    Make PyTorch models up to 40% faster! Thunder is a source to source compiler for PyTorch. It enables using different hardware executors at once; across one or thousands of GPUs.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • [D] Keras 3.0 Announcement: Keras for TensorFlow, JAX, and PyTorch

    3 projects | /r/MachineLearning | 11 Jul 2023
  • PyTorch 2.0 Release

    4 projects | news.ycombinator.com | 15 Mar 2023
  • Nope, idk.

    2 projects | /r/ProgrammerHumor | 25 Feb 2023
  • AUDIO CLASSIFICATION USING DEEP LEARNING

    3 projects | dev.to | 20 May 2022
  • Discrete Algebraic Ricatti Equation Solver

    4 projects | /r/ControlTheory | 10 May 2022

Did you know that Python is
the 2nd most popular programming language
based on number of references?