Re: [Bro-Dev] set and vector operators

2018-04-25 Thread Vern Paxson
Hmmm thinking about it, we can get away with '&' with minimal keyword conflict because there's such an easy (and natural-to-presume) fix - namely, rather than "x" you use "x & attrkeyword". Now there's no problem, since the lexer only recognizes "" as a unit, with no whitespace allowed. Given

Re: [Bro-Dev] set and vector operators

2018-04-25 Thread Vern Paxson
> On Wed, Apr 25, 2018 at 10:40 -0700, you wrote: > > > s1 + s2 Set union (for sets of the same type, of course) > > s1 || s2Set union > > (What's the difference between the two? Or do you mean either one or > the other?) No difference. It just seems to me that we need

Re: [Bro-Dev] set and vector operators

2018-04-25 Thread Robin Sommer
On Wed, Apr 25, 2018 at 10:40 -0700, you wrote: > s1 + s2 Set union (for sets of the same type, of course) > s1 || s2Set union (What's the difference between the two? Or do you mean either one or the other?) Like Justin, I was also thinking "|" and "&" might be

Re: [Bro-Dev] set and vector operators

2018-04-25 Thread Azoff, Justin S
> On Apr 25, 2018, at 1:40 PM, Vern Paxson wrote: > > I'm working on some scripts that use sets and vectors, sometimes together, > and am finding it clunky that Bro doesn't offer much in the way of operators > for this. To that end, I'm thinking of implementing some along the

Re: [Bro-Dev] set and vector operators

2018-04-25 Thread Vern Paxson
> That's very similar to what python does, except they use & and | instead of > && and ||. > I think they do that because 'set or' is closer to 'bitwise or' than 'logical > or' Yeah, I thought of that, but Bro currently doesn't have any '&' or '|' operators, which makes me reluctant to add them

[Bro-Dev] set and vector operators

2018-04-25 Thread Vern Paxson
I'm working on some scripts that use sets and vectors, sometimes together, and am finding it clunky that Bro doesn't offer much in the way of operators for this. To that end, I'm thinking of implementing some along the following lines, where values starting with 's' are sets, 'v' are vectors, and