The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning. Learn more →
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).
22. Nim - $80,000
-
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.
-
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! 😁
-
-
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-08I'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
-
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
-
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
-
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.
Spoon
-
-
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.
-
-
-
-
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.
-
-
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-25You'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).
-
-
-
Sum types and pattern matching have already been hacked together in a preprocessor macro in C; see https://github.com/Hirrolot/datatype99.
-
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...
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
Metaprogramming related posts
- A dialect of Lisp that's embedded in Python
- "14 Years of Go" by Rob Pike
- Rubberduck – A free and open-source VBIDE add-in
- Out of bounds memory access in V8 in Google Chrome prior to 120.0.6099.224
- Hylang, a Lisp dialect embedded in Python
- Hissp
- The nim website and the downloads are insecure
-
A note from our sponsor - WorkOS
workos.com | 18 Apr 2024
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 |