> * Peter da Silva <[email protected]> [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.)

Procedural vs Declarative.

> > >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.

I want to write my rules entirely declaratively. I don't want scripts
cluttering up my rules.

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

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

So is every other "arbitrarily limited crappy mini-language".

> >>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.

If I didn't have hundreds of rules I wouldn't care. I'd just let a
bayesian filter do the work.

> > 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.

If you had my spam problem, you would.

> But if I did I'd cast this in something like
> Prolog where you can do that sort of stuff and more besides.

Prolog is a better mini-language for this than Perl, that's for sure.

> > 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.

I wish it wasn't for me.

Reply via email to