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: Top Paying Programming Technologies 2024 | dev.to | 2024-03-06

    22. Nim - $80,000

  • 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.

  • 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.

  • 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: Buzz: A lightweight statically typed scripting language | news.ycombinator.com | 2023-12-26
  • 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

    Project mention: How Do Nested Static Generic Types Work When Their Outer Types Are Also Generic? | /r/csharp | 2023-04-25

    Your example runs as I'd expect. I'm using DotNext's TypeMap and am not understanding why underlying arrays (entries) are indexed differently for two instances of the same type am seeing what I expected. I obviously idioted.

  • 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

    Project mention: Future of high-level languages | /r/ProgrammingLanguages | 2023-04-24

    Sum types and pattern matching have already been hacked together in a preprocessor macro in C; see https://github.com/Hirrolot/datatype99.

  • 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

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 2024-04-09.

Metaprogramming related posts

Index

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

Project Stars
1 Nim 16,048
2 Insanity 7,504
3 groovy 5,083
4 hy 4,762
5 Magic Enum C++ 4,390
6 example-code-2e 2,900
7 manifold 2,205
8 Nameof C++ 1,933
9 Rubberduck 1,851
10 nelua-lang 1,825
11 Spoon 1,663
12 hana 1,631
13 dotNext 1,510
14 Chimney 1,101
15 Experimental Boost.DI 1,097
16 scala.meta 1,087
17 sml 1,067
18 proxy 1,014
19 refl-cpp 986
20 decorator 809
21 Scalafix 801
22 datatype99 787
23 metalang99 763
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com