metalang99
Frontpage
metalang99 | Frontpage | |
---|---|---|
42 | 455 | |
768 | 48 | |
- | - | |
3.7 | 4.3 | |
26 days ago | 5 months ago | |
C | PHP | |
MIT License | GNU General Public License v3.0 only |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
metalang99
-
How to convert an enum to string in C++
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
-
Few lesser known tricks, quirks and features of C
I went down the rabbit hole with C99 metaprogramming after reading through the list. For reference: https://metalang99.readthedocs.io/en/latest/, https://github.com/Hirrolot/metalang99
-
Boost:Unordered_flat_map
Honestly I have to disagree. There is nothing particularly special about what Super Template Tetris(STT) is doing.
At its core, template metaprogramming is just functional programming at compile time. STT is just a template and a runtime function which do the following:
1, take an input via compile time flag (the `-D DIRECTION`)
2. take a type input from an included header file containing the current state (`#include "current_game.h"`)
3. via functional programming, compute the results of a single step of the game.
4. specialise a single function using the results of step 3. this function prints the computed result to the screen and the computed game state to a file (`./current_game.h`).
5. gcc/clang exits. compilation is complete.
6. call the compiled binary.
7. the binary runs the specialised function and prints the outputs.
Sure it's fucky and you shouldn't do that in production but what sane individual is writing a piece of code that at runtime (after compiling) seeks out one of its own source files and modifies that file?
To prevent this from being possible you'd have to remove runtime file IO from the language. The other potential solutions wouldn't work:
1. Remove templates entirely: Still would be possible using https://github.com/Hirrolot/metalang99 which solely uses the preprocessor. Given that the pre-processor is literally just term substitution(a glorified copy/paste engine), if you removed that as well, you'd have to accept no form of metaprogramming at all.
2. Remove the ability to #include other files: Could still be done by doing everything inline. `#include` is just copy-paste anyways so it's more an abstraction than anything else to the compiler and preprocessor, it's basically the same as if all the code was pasted into the same file.
That leaves you with removing file IO. Without IO a programming language is basically useless, particularly as a systems programming language.
- What does the ??!??! operator do in C?
- Metalang99: Full-blown preprocessor metaprogramming for C/C++
-
Learning HTML was too hard so I made a compiler instead
P.S. I wrote Metalang99 BTW.
-
How did you choose the name for your programming language?
Metalang99, a metalanguage for C99. Simple :)
-
Rust is hard, or: The misery of mainstream programming
Just wait until you see some other things by the same author, like https://github.com/Hirrolot/metalang99
-
Conditional preprocessor macro, anyone?
I did get a few great responses there as well, though. One was a link to this impressive piece of work: https://github.com/Hirrolot/metalang99/blob/master/examples/lambda_calculus.c
-
What are the minimal changes required to turn C into a functional programming language?
Some preprocessor nonsense: https://github.com/Hirrolot/metalang99/blob/master/examples/lambda_calculus.c
Frontpage
-
Open source at Fastly is getting opener
Through the Fast Forward program, we give free services and support to open source projects and the nonprofits that support them. We support many of the world’s top programming languages (like Python, Rust, Ruby, and the wonderful Scratch), foundational technologies (cURL, the Linux kernel, Kubernetes, OpenStreetMap), and projects that make the internet better and more fun for everyone (Inkscape, Mastodon, Electronic Frontier Foundation, Terms of Service; Didn’t Read).
-
Dear writers: Delete your Findaway Voices account NOW
Terms of service are generally pretty shitty, yes. But this is egregiously shitty.
https://tosdr.org/ is a good site to compare. Any service over Grade E (Spotify, Facebook, the usual suspects) is (very likely to be) less bad. DeviantArt for example is a D, and doesn't include waiving your moral rights among some of the other overreach.
Some service terms are actually quite good (DuckDuckGo, Mullvad, off the top of my head). Though these aren't content sharing platforms so it's not really as fair of a comparison.
- Meta’s new AI image generator was trained on 1.1 billion Instagram and Facebook photos
-
what is something humans were never meant to see?
This is super useful https://tosdr.org/
- I created a free tool that explains privacy policies to users.
-
State of Online Privacy Reaches 'Creepy' Level
> Meaningful consent is becoming increasingly difficult for consumers; for instance ...
https://tosdr.org is good for that, why don't Mozilla just contribute to an existing project
-
[READ BODY TEXT BEFORE VOTING] Thoughts regarding online tracking?
I can't give you a complete guide here, but I recommend you go to privacy subreddits or watch relevant Youtube videos for more info. I also recommend sites like privacytools.io and privacyguides.org They contain lists of alternatives and tools. Also check out tosdr.org which contains summaries of the TOS of a ton of sites. Also try email aliases like simplelogin or anonaddy. Use burner emails for throwaways if possible emailnator.com or tempail.com . Try to use as many open-source applications as possible. You can even self-host certain things.
-
Unity Silently Deletes GitHub Repo That Tracks Terms of Service Changes
I think what you're looking for is TOSDR (Terms of Service, Didn't Read): https://tosdr.org
It's been going for several years and has very thorough analysis of various ToS, done by volunteers who are often legal professionals.
- Ask HN: Why did Microsoft, Meta, and PayPal update their ToS today?
- Ask HN: What is behind the recent wave of Terms of Service changes?
What are some alternatives?
Windows11DragAndDropToTaskbarFix - "Windows 11 Drag & Drop to the Taskbar (Fix)" fixes the missing "Drag & Drop to the Taskbar" support in Windows 11. It works with the new Windows 11 taskbar and does not require nasty changes like UndockingDisabled or restoration of the classic taskbar.
privacyguides.org - Protect your data against global mass surveillance programs.
monkeytype - The most customizable typing website with a minimalistic design and a ton of features. Test yourself in various modes, track your progress and improve your speed.
map-macro - A recursive C preprocessor macro which performs an operation on each element of a list
duckduckgo-locales - Translation files for <a href="https://duckduckgo.com"> </a>
porth
Hacker-Typer - Hacker Typer is a fun joke for every person who wants to look like a cool hacker!
libexpat - :herb: Fast streaming XML parser written in C99 with >90% test coverage; moved from SourceForge to GitHub
savepagenow - A simple Python wrapper and command-line interface for archive.org’s "Save Page Now" capturing service
eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee - eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
TermuxBlack - Termux repository for hacking tools and packages