Metaprogramming

Open-source projects categorized as Metaprogramming

Top 23 Metaprogramming Open-Source Projects

  • 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: 3 years of fulltime Rust game development, and why we're leaving Rust behind | news.ycombinator.com | 2024-04-26
  • Insanity

    Meta-programming for Swift, stop writing boilerplate code.

  • Project mention: Insanity VS SpeziTemplateApplication - a user suggested alternative | libhunt.com/r/Sourcery | 2023-11-18
  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • groovy

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

  • Project mention: Groovy 🎷 Cheat Sheet - 01 Say "Hello" from Groovy | dev.to | 2024-03-07

    This time, I visited Groovy. Given my biased first impression about Java and the JVM, I wasn't too exited! But I couldn't have been more wrong! 😁

  • hy

    A dialect of Lisp that's embedded in Python

  • Project mention: A dialect of Lisp that's embedded in Python | news.ycombinator.com | 2024-04-09
  • 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: What C++ library do you wish existed but hasn’t been created yet? | /r/cpp | 2023-07-08

    I'm not sure this is quite what you're asking for, but this library has been super helpful to me in the past : https://github.com/Neargye/magic_enum

  • example-code-2e

    Example code for Fluent Python, 2nd edition (O'Reilly 2022)

  • Project mention: Ask HN: How can I get better at writing production-level Python? | news.ycombinator.com | 2023-07-18

    Yeah, reading the Fluent Python book[1] and / or following along with their support files[2] would a good way to start

    [1] https://amzn.to/3J48u2J

    [2] https://github.com/fluentpython/example-code-2e

  • manifold

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

  • Project mention: Show HN: Ditch your ORM with type-safe native SQL | news.ycombinator.com | 2024-04-09
  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • Nameof C++

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

  • Rubberduck

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

  • Project mention: Rubberduck – A free and open-source VBIDE add-in | news.ycombinator.com | 2024-01-25
  • 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: Statically typed language with a Lua flavor | news.ycombinator.com | 2024-04-22
  • Spoon

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

  • Project mention: I introduced Rust at work | /r/rust | 2023-06-29

    Spoon

  • hana

    Your standard library for metaprogramming

  • dotNext

    Next generation API for .NET

  • Chimney

    Scala library for boilerplate-free, type-safe data transformations

  • Project mention: Chimney 0.8.0 (stable) released | /r/scala | 2023-10-13
  • Experimental Boost.DI

    C++14 Dependency Injection Library

  • scala.meta

    Library to read, analyze, transform and generate Scala programs

  • sml

    C++14 State Machine library

  • Project mention: Sharing Saturday #496 | /r/roguelikedev | 2023-12-08

    Anyway the need is not complicated, I need both entry and exit functions from every state, optionally allowing these functions to be coroutines (that's special sauce but for later), and an explicit state transition table which also have a way to say that a state can be accessed at any point. Also allow states to be state machines, optional FSM hierarchies. If you ignore the coroutine stuff it's pretty standard features these days, except that - Boost.MSM is quite archaic now (it was so novel when it was first released...) although it allows most of the features I talked about, I just think it will complicate my code unneecessarilly; - Boost-Ext.SML (not Boost) is almost perfect except it doesnt have entry/exit functions on states for some reason. Also last time we (as in in livestream) tried it in prototypes it didnt compile on msvc XD - Boost-Ext.SML2 is even better but still doesnt have entry/exit functions although it's in the plans.

  • proxy

    Proxy: Next Generation Polymorphism in C++ (by microsoft)

  • refl-cpp

    Static reflection for C++17 (compile-time enumeration, attributes, proxies, overloads, template functions, metaprogramming).

  • Project mention: Out of bounds memory access in V8 in Google Chrome prior to 120.0.6099.224 | news.ycombinator.com | 2024-01-25

    You'd be surprised how much friction you'd have for C++ reflection. First, since it's a custom build step, you can do a mix of custom code gen and C++ constexpr/consteval for static reflection. Here's a header-only implementation for adding compile time reflection purely within the language [1]. And v8 already does dynamic code gen as part of its build process (to generate the snapshot to speedup instantiation of the isolate). Dynamic reflection is a must since JS is a dynamic language with reflection support.

    Now of course, I don't know the specific details of reflection needed for the abstractions you reference and clearly V8 is still doing some amount of manual IR generation, so it's possible it would be a substantial investment to actually retrofit those techniques into v8. One would have to do a careful analysis of historical security exploits & specific techniques and their ability to prevent to figure out if it's worth adding those abstractions (especially since there is a potential performance tradeoff as you mention). As I said, I think there's insufficient research in this area to establish a compelling body of best practices (not to take away from the contributions of the GraalJS team to this space).

    [1] https://github.com/veselink1/refl-cpp

  • decorator

    decorator (by micheles)

  • Scalafix

    Refactoring and linting tool for Scala

  • datatype99

    Algebraic data types for C99

  • metalang99

    Full-blown preprocessor metaprogramming

  • Project mention: How to convert an enum to string in C++ | news.ycombinator.com | 2023-09-30

    There are also other approaches. Macro variants making use of `__VA_ARGS__` would be probably the best trade-off. If you want a slightly more ergonomic syntax, something like Metalang99 [1] will help (and the author even wrote a post about this exact subject [2]). Codegen is another option which may work better than other options depending on the situation and exact implementation strategy. And there is always the Reflection TS [3], which may or may not be incorporated to C++26...

    [1] https://github.com/Hirrolot/metalang99

    [2] https://hirrolot.github.io/posts/pretty-printable-enumeratio...

    [3] https://en.cppreference.com/w/cpp/experimental/reflect

  • SaaSHub

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

    SaaSHub logo
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).

Metaprogramming related posts

Index

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

Project Stars
1 Nim 16,060
2 Insanity 7,521
3 groovy 5,089
4 hy 4,775
5 Magic Enum C++ 4,403
6 example-code-2e 2,916
7 manifold 2,218
8 Nameof C++ 1,942
9 Rubberduck 1,852
10 nelua-lang 1,852
11 Spoon 1,669
12 hana 1,635
13 dotNext 1,527
14 Chimney 1,106
15 Experimental Boost.DI 1,103
16 scala.meta 1,087
17 sml 1,072
18 proxy 1,113
19 refl-cpp 986
20 decorator 811
21 Scalafix 802
22 datatype99 794
23 metalang99 765

Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com