* Peter da Silva <pe...@taronga.com> [2006-04-03 14:15]:
> On Apr 3, 2006, at 5:49 AM, A. Pagaltzis wrote:
> >Even after I tell you that I planned to have the filter be
> >written in Perl? :-)
> 
> Then it'll have the same problem as procmail and sieve.

Namely? (Dunno what you’re referring to.)

> >I’m just very tired of little languages.
> 
> Filter rules shouldn't be a general purpose language except as
> an exception. They should be something you can put in a
> relational database without running any of them as code except
> in extreme cases.

That’s why I want a DSL; I want to write my rules largely
declaratively and let the library worry about the details.

> Perl *is* "another arbitrarily limited crappy mini-language".

It’s a proper programming language with fully orthogonal,
composable constructs.

> >>Any match in a [mailbox] section goes to that mailbox.
> 
> >Mmm, I was thinking about something along similar lines, only
> >with a Real Syntax by virtue of it being a DSL.
> 
> Real Syntax is a limitation. Once you have hundreds of rules
> keeping them straight becomes a nightmare.

Obviously we have very different scale requirements.

> How do you say
> 
> SELECT UNIQUE r.mailbox,m.match FROM rules r,matches m
>   WHERE r.rule_set = m.rule_set AND m.header='From' AND 
> m.match_type=EXACT;
> 
> when your rules are in Perl?

I don’t need to. But if I did I’d cast this in something like
Prolog where you can do that sort of stuff and more besides.

> Then you can perform fast relational lookups on the match
> table, and you only need scripts for exceptions.

That sort of performance is just not necessary for me. The
situation I want to address is a procmailrc of a few hundred
lines with extremely formulaic rules (denser syntax please!)
and a few bits of funny trickery thrown in around some corners
(painful, can’t somebody throw me a real language?!).

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

Reply via email to