Our great sponsors
-
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.
-
checkr
Custom static analysis rules for the lazy. Write project specific static analysis checks in a few lines of code.
-
ComposableRegex
Build out composable regular expressions from simple sub blocks in a BNF type syntax. Check http://composableregex.apphb.com/ for a demo
-
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.
I wish it were more common or accepted to use parser combinator libraries in place of Regex. Libraries like Parsec are basically this but integrate into the target language and can be used to atomize and combine parse expressions and therefore be written in a much more readable way.
It looks like the checkr extension could greatly benefit from something like this. Very nice work! Excited to try it out when I have some free time.
That is a huge, and generally invalid, assumption: in practice, regex do not compose well under concatenation. In fact, what you’ve done is the equivalent of C macros: mixing languages across multiple levels which are unaware of each others’ syntax rules. A long time ago I wrote a proper regex concatenation function for a library, and … it’s not trivial (the code is PHP but the logic would be similar in other languages).
Heh funny, I did something like this 6-7 years ago too https://github.com/devshorts/ComposableRegex