#Metaprogramming

Open-source projects categorized as Metaprogramming

Top 23 Metaprogramming Open-Source Projects

  • GitHub repo Nim

    Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).

    Project mention: How lisp interpreter/compiler looks like ? | reddit.com/r/lisp | 2021-05-06

    To answer your question: there is no main Lisp compiler/interpreter, like there is with languages like Nim for example. There are many Lisp compilers: a lot of them for Common Lisp, many others for Scheme, some for their own Lisp-like languages etc.

  • GitHub repo Insanity

    Meta-programming for Swift, stop writing boilerplate code.

  • GitHub repo groovy

    Apache Groovy: A powerful multi-faceted programming language for the JVM platform

    Project mention: The Kotlin Foundation – By Jetbrains and Google | news.ycombinator.com | 2021-02-13

    You and the PC probably would be happy with Groovy, specially with them adding a SQL DSL now: https://github.com/apache/groovy/blob/master/subprojects/gro...

    Groovy DSLs are much better than Kotlin's.

  • GitHub repo hy

    A dialect of Lisp that's embedded in Python

    Project mention: Hy: A dialect of Lisp that's embedded in Python | reddit.com/r/patient_hackernews | 2021-05-05
  • GitHub repo Magic Enum C++

    Static reflection for enums (to string, from string, iteration) for modern C++, work with any enum type without any macro or boilerplate code

    Project mention: Magic Enum : la révolution des énumérations en C++ | dev.to | 2021-04-29
  • GitHub repo Rubberduck

    Every programmer needs a rubberduck. COM add-in for the VBA & VB6 IDE (VBE).

    Project mention: Advancing Excel as a Programming Language (Microsoft Research Podcast) | news.ycombinator.com | 2021-05-05

    An actual code explorer that supports module folders / hierarchy is added to the VBA IDE by this: https://rubberduckvba.com/.

  • GitHub repo hana

    Your standard library for metaprogramming

    Project mention: Simple `struct` static reflection system I use that tracks names, attributes (in my own code I also keep `constexpr` hashes of names) -- example gets fully inlined into `main()` | reddit.com/r/cpp | 2021-04-24

    And then there's also the longstanding issue with default member initializers -- https://github.com/boostorg/hana/issues/409 -- which was a deal-breaker.The PROP system avoids this issue precisely by having the macro be as local as possible: the default member initializer is outside the macro. It does this while still letting you attach additional PropAttribs metadata (I'm not sure what additional metadata attachment looks like in Hana? haven't really tried). Default values and additional attributes are by and large quite more important to me in my use cases for reflection (component types in game ECS) than range syntax (everything I've needed and can think of needing is covered by for-each loop).

  • GitHub repo Spoon

    Spoon is a metaprogramming library to analyze and transform Java source code (up to Java 15). :spoon: is made with :heart:, :beers: and :sparkles:. It parses source files to build a well-designed AST with powerful analysis and transformation API.

  • GitHub repo Nameof C++

    Nameof operator for modern C++, simply obtain the name of a variable, type, function, macro, and enum

    Project mention: Getting an Unmangled Type Name at Compile Time | reddit.com/r/cpp | 2021-03-10
  • GitHub repo manifold

    Manifold is a Java compiler plugin, its features include Metaprogramming, Properties, Extension Methods, Operator Overloading, Templates, a Preprocessor, and more.

    Project mention: We got the [Java] generics we have | news.ycombinator.com | 2021-04-01
  • GitHub repo scala.meta

    Library to read, analyze, transform and generate Scala programs

  • GitHub repo Experimental Boost.DI

    DI: C++14 Dependency Injection Library

    Project mention: Top five C/C++ things/tips/tricks you wish you had known earlier and are now used very often | reddit.com/r/cpp | 2021-02-19

    Funny you mention dependency injection, proposed Boost.DI shall be up for Boost peer review probably in March. https://boost-ext.github.io/di/

  • GitHub repo Scalafix

    Refactoring and linting tool for Scala

    Project mention: Teaching exercises with custom error messages | reddit.com/r/scala | 2021-03-02

    Probably linting rules defined in Scalafix. See https://github.com/scalacenter/scalafix/blob/master/scalafix-rules/src/main/scala/scalafix/internal/rule/DisableSyntax.scala#L11 for an example.

  • GitHub repo sml

    SML: C++14 State Machine Library

    Project mention: Which design patterns do you think are very useful for embedded programming? | reddit.com/r/embedded | 2021-04-10

    Switch Case is the most basic way and for simple system it works. But at some complexity level it gets tough to maintain. depending on your language you have different ways to implement them . E.g. a function table based matrix array. Or active object pattern . If you use cpp you can base it on classes or use some nice header only implementation https://github.com/boost-ext/sml .

  • GitHub repo Weaver

    Dependency Injection framework for Swift (iOS/macOS/Linux)

  • GitHub repo nelua-lang

    Minimal, efficient, statically-typed and meta-programmable systems programming language heavily inspired by Lua, which compiles to C and native code.

    Project mention: Nelua: A Systems Programming Language with Lua Syntax | news.ycombinator.com | 2020-12-30
  • GitHub repo .NEXT

    Next generation API for .NET

  • GitHub repo Arrow Meta

    Functional companion to Kotlin's Compiler

    Project mention: If I wanted to modify the Kotlin grammar, how would I go about doing that? | reddit.com/r/Kotlin | 2021-05-01

    As of right now, Arrow Meta is the only library I am aware of with which you can productively write compiler plugins.

  • GitHub repo metalang99

    Full-blown preprocessor metaprogramming

    Project mention: Interesting ways to use C? | reddit.com/r/C_Programming | 2021-04-14

    Most recently, there's this https://github.com/Hirrolot/metalang99, pretty much macros on steroid.

  • GitHub repo te

    TE: C++17 Run-time polymorphism (type erasure) library (by boost-ext)

    Project mention: Type Erasure in C++ Explained | news.ycombinator.com | 2021-04-15

    And if it were in the standard there wouldn't be at least five well known libraries implementing it (including from Adobe and from Facebook): https://github.com/boost-ext/te#similar-libraries

    As far as I know (I don't really follow the committee work) the latest attempt to introduce run-time duck-typing in the standard was https://github.com/andyprowl/virtual-concepts, which seems dead.

  • GitHub repo Squid

    Squid – type-safe metaprogramming and compilation framework for Scala (by epfldata)

    Project mention: Haskell doesn't have macros | reddit.com/r/haskell | 2020-12-29

    In the video, the presenter says he doesn't know any other system with "type-aware hygienic macros". You may want to have a quick look at Scala 3, which also has such a system. See, for instance, this paper and also the precursor work by myself for Scala 2: https://github.com/epfldata/squid#publications

  • GitHub repo constexpr-sql

    A light weight single header alternative to DBMS

    Project mention: Constexpr SQL – C++ compile time SQL queries | news.ycombinator.com | 2021-03-19
  • GitHub repo hissp

    It's Python with a Lissp.

    Project mention: Hy: A dialect of Lisp that's embedded in Python | news.ycombinator.com | 2021-05-04
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-06.

Index

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

Project Stars
1 Nim 11,179
2 Insanity 5,981
3 groovy 4,115
4 hy 3,808
5 Magic Enum C++ 1,805
6 Rubberduck 1,332
7 hana 1,221
8 Spoon 1,117
9 Nameof C++ 1,058
10 manifold 1,036
11 scala.meta 887
12 Experimental Boost.DI 790
13 Scalafix 613
14 sml 561
15 Weaver 555
16 nelua-lang 494
17 .NEXT 417
18 Arrow Meta 252
19 metalang99 210
20 te 193
21 Squid 176
22 constexpr-sql 113
23 hissp 112