-
Ge0rG
edhelas: block multi line messages from strangers. Also pastebin links
-
edhelas
how ?
-
Zash
Bother ejabberd devs about porting mod_firewall?
-
Ge0rG
edhelas: migrate to prosody! 🤣
-
edhelas
eheh
-
Holger
> Code expressions are powerful, and allow unconstrained access to Prosody's internal environment. This part will be non-trivial to port :-)
-
Zash
Just include all of Prosody
-
Holger
And I'm not sure I'd go for Lua patterns rather than regular expressions. So I guess real-world rule sets wouldn't work unmodified.
-
Holger
That said, I'm thinking about porting this as well.
-
Holger
Zash: :-)
-
Zash
Lua patterns are roughly a subset of regular expressions
-
Zash
And probably is, in the language theory sense
-
Zash
People tend to think of PCRE and similar when they hear "regular expressions"
-
Holger
Well you can't pipe them as-is into regex functions.
-
Holger
Zash: So do I :-)
-
Zash
A bunch would work if you s/%/\\/
-
Zash
Notable exceptions are - which is like *? and %bxy which is ... not regular IIRC
-
Holger
Yes I know them, I did quite a bit of Lua actually (before Prosody even existed) :-)
-
Holger
They're just fine, I'm just unsure implementing them (or loading 'luerl' just for this purpose) would be worth it.
-
Zash
PCRE is supposedly huge compared to the Lua pattern implementation
-
Holger
Absolutely, but it's loaded anyway.
-
Holger
Apart from that the syntax is probably more familiar to most admins.
-
Holger
Then again, my only goal in implementing this would be loading Georg's rules, so what do I care about admins.
-
sam
I feel like doing PCRE in a network firewall type situation is a bad idea; you're just going to end up with administrators writing rules that will trigger infinite recursion when people send malicious packets
-
sam
You probably want actually-regular regular expressions that can run in linear time (there's probably a word for that)
-
Zash
And how much of mod_firewall you wanna be compatible with
-
Zash
sam: That might actually be "regular expressions"
-
sam
Zash: "real regular expressions"?
-
Zash
But I haven't studied this, so what do I know
-
sam
Huh, I wonder why my name is "sam" all of a sudden.
-
Zash
Who are you?
-
Zash
???
-
sam
An imposter
-
Zash
!!
-
sam
my mcabber config has not changed; maybe the wrong value is stored int he bookmark or something.
-
sam
Oh, it thinks my nickname is already in use… that's odd, my phone is not using it, so I have no idea what I left logged in.
-
SamWhited
Test
-
SamWhited
That's better.
-
Zash
https://en.wikipedia.org/wiki/File:Chomsky-hierarchy.svg
-
Zash
That stuff
-
Zash
https://en.wikipedia.org/wiki/Regular_language#Formal_definition
-
SamWhited
Maybe I'll start calling them "regular regular expressions", since the first regular is ignored by Perl et al. and apparently is meaningless
-
Ge0rG
SamWhited: just call them cat expressions, because they look like typed by a cat running over the keyboard
-
SamWhited
Ge0rG: this is true, but that doesn't distinguish them from PCRE style regular expressions, or anything written in Erlang.
-
Zash
catjabberd
-
Ge0rG
JabberCat
-
Zash
That sounds familiar
-
SamWhited
https://github.com/jabbercat/jabbercat