"Exploring Emacs rx Macro": symbolic/parser-like regular expressions reddit / emacs ---------------------------------------------------------------------- gwern · 2022-03-28 01:20 ---------------------------------------------------------------------- lebensterben · 2022-03-28 01:29 the rx syntax is very similar to parser combinator syntax ---------------------------------------------------------------------- gwern · 2022-03-28 02:11 Isn't it? There's a similar thing in [CL- PPCRE](https://edicl.github.io/cl-ppcre/#create-scanner2) too, but doesn't look like anyone has made the comparison there either. ---------------------------------------------------------------------- [deleted] · 2022-03-28 07:19 > (require 's) ;; All we need is =s-matches-p= In that case you don't need that library at all, as `string-match-p` already exists. ---------------------------------------------------------------------- XCapitan_1 · 2022-03-28 07:44 rx is amazing. I'd use it in every programming language if I could ---------------------------------------------------------------------- phundrak · 2022-03-28 14:09 `s`, `f`, and `dash` are way too often used for stuff simple vanilla Elisp already does anyways. ---------------------------------------------------------------------- [deleted] · 2022-03-28 16:16 Which is especially annoying if you want to quickly try out a package or snippet but you don't have these leftpad-esque dependencies installed. I honestly regard these libraries as a kind of code-smell (dash perhaps less than the others), that might correlate that the developer took a *Rosetta stone*-approach of just translating whatever logic they are familiar with from other languages, instead of engaging with what constitutes an idiomatic style of Elisp. ---------------------------------------------------------------------- [deleted] · 2022-03-28 16:22 I sketched up a cheap [knockoff](https://wwwcip.cs.fau.de/%7E%6F%6A%31 %34%6F%7A%75%6E/src+etc/re.h) for C a while back.