metalang99
libexpat
Our great sponsors
metalang99 | libexpat | |
---|---|---|
42 | 9 | |
763 | 969 | |
- | 2.6% | |
3.9 | 9.3 | |
2 months ago | 5 days ago | |
C | C | |
MIT License | MIT License |
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...
-
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?
-
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
-
Best C Marco Preprocessor Tutorial? (Book or Website)
There was a time that I wanted to write such a book but then realised that it's better to just create a third-party library and not to confuse users with abstruse macro techniques, but to encapsulate them and provide a nice interface. For example, you can workaround the preprocessor in such a way to implement recursion, but practically it's just too complicated to use directly. So I created Metalang99 -- a preprocessor metaprogramming library that allows writing fairly complicated macros. You can find a tutorial and references to prior art in the README.
- No cheating
-
I created a λ-calculus interpreter written entirely in C preprocessor macros
This is an implementation with some real depth to it :)
libexpat
-
22.7.8 is up
A belated happy patch day to everyone, This is a small maintenance and security update. You will notice that LibreSSL no longer works with FreeRADIUS software due to hiding library internals that are used by the software. Your current install will continue to work, but we would recommend switching to OpenSSL to receive FreeRADIUS updates as they become available. Also, the infamous log_error() message is being phased out in the development version to end the questions of "Why is this log message an error?" and so with log_msg() each log line receives a more appropriate log level between error, warning and notice. Here are the full patch notes: o system: add statistics tree view containing vmstat memory characteristics o system: explicitly reopen main log file in case another log file was used and closed o system: tweak log_msg() to prepare log level adjustments migration away from log_error() o system: enforce config reload to fetch group membership in authentication tester o system: separate interface type icon from name column in interface widget o system: change system log default to "Notice" o system: UX tweaks on activity page o system: revised backend daemon startup delay o system: drop empty plugins_run() result o interfaces: migrate main clearing of interface data to ifctl o interfaces: fix display of special HTML characters in packet capture o interfaces: retain existing PPP settings on saving interface settings o interfaces: delete the correct lock of PPP device o interfaces: fix variable use in interface_proxyarp_configure() o firewall: wrap user rule registration in new function filter_core_rules_user() o firewall: simplify rule lookup by using filter_core_rules_user() o firewall: allow external dynamic address in NPT o firewall: remove extended VIP expansion from NAT rules o firewall: fix live view hostname lookup may result in HTTP 431 error o ipsec: remove side effect host route removal from Phase 1 page o unbound: do not stop on potential errors in start script o plugins: os-freeradius is no longer available for LibreSSL to allow updates of FreeRADIUS software o plugins: os-nginx 1.31[1] o plugins: os-wireguard now skips invalid peers for dashboard widget (contributed by jkellerer) o ports: expat 2.5.0[2] o ports: krb5 1.20.1[3] o ports: nss 3.85[4] o ports: phalcon 5.1.1[5] o ports: sudo 1.9.12p1[6] Stay safe, Your OPNsense team -- [1] https://github.com/opnsense/plugins/blob/stable/22.7/www/nginx/pkg-descr [2] https://github.com/libexpat/libexpat/blob/R_2_5_0/expat/Changes [3] https://web.mit.edu/kerberos/krb5-1.20/ [4] https://firefox-source-docs.mozilla.org/security/nss/releases/nss_3_85.html [5] https://github.com/phalcon/cphalcon/releases/tag/v5.1.1 [6] https://www.sudo.ws/stable.html#1.9.12p1
-
Followed some instructions needed to build a github repo and now my desktop doesn't work anymore
sudo pacman -Sy --needed curl openssl libuv sudo pacman -Syu --needed boost openssl zeromq libpgm libsodium libunwind xz readline gtest python3 ccache qt5-tools hidapi libusb protobuf systemd wget https://github.com/libexpat/libexpat/releases/download/R_2_4_8/expat-2.4.8.tar.bz2 tar -xf expat-2.4.8.tar.bz2 rm expat-2.4.8.tar.bz2 cd expat-2.4.8 ./configure --enable-static --disable-shared make sudo make install cd ../ wget https://www.nlnetlabs.nl/downloads/unbound/unbound-1.16.1.tar.gz tar -xzf unbound-1.16.1.tar.gz rm unbound-1.16.1.tar.gz cd unbound-1.16.1 ./configure --disable-shared --enable-static --without-pyunbound --with-libevent=no --without-pythonmodule --disable-flto --with-pthreads --with-libunbound-only --with-pic make sudo make install cd ../
- OPNsense 22.1.1 released
-
KDE Connect for Windows can't find expat.dll
Doesn't work for me. I installed libexpat 2.3.0 and copied the dll over, but I get error 0xc000007b when I try to start KDE Connect.
Maybe u can download it from here: https://github.com/libexpat/libexpat
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.
pdfalto - PDF to XML ALTO file converter
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.
jvm - simple java virtual machine
i-use-arch-btw - "I use Arch btw" but it's a Turing-complete programming language.
map-macro - A recursive C preprocessor macro which performs an operation on each element of a list
porth
5d-diplomacy-with-multiverse-time-travel - 5D Diplomacy With Multiverse Time Travel
eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee - eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
wax - A tiny programming language that transpiles to C, C++, Java, TypeScript, Python, C#, Swift, Lua and WebAssembly 🚀
hexpat - A general purpose Haskell XML library using Expat to do its parsing
datatype99 - Algebraic data types for C99