Ticket #17 (closed new feature: implemented)

Opened 2 months ago

Last modified 5 weeks ago

new *attr() functions

Reported by: cary Owned by: Ashen-Shugar
Priority: low Milestone: 3.9.1 alpha 2
Component: rhostmush Version: 3.9.1 alpha
Severity: none Keywords: attributes input limit
Cc:

Description (last modified by Ashen-Shugar) (diff)

I find that I frequently want to know the max (typically lexically) attribute which matches a pattern on an object or cluster.

As long as the list is not too long, one can accomplish this with last(sort(lattr(...))), but if the list is too long, thus exceeding thing limit of what can be parsed, this does not give the expected result.

The only other option is to use the page number arg to lattr but as attributes are not sorted there is no way of knowing on which page the max will be be, so all must be checked, which is a pain.

Obviously with all but arbitrary numbers of attributes possible on a cluster this is even more problematic.

So! It would be VERY handy to have a function like lattr(), call it maxattr() which would return the 'last' attribute a la last(sort(lattr(...))) (so it needs to accept a pattern as well, not just an object).

Change History

Changed 2 months ago by Ashen-Shugar

  • priority changed from normal to low
  • description modified (diff)

This will be difficult as the 'last' attribute is stored differently in Rhost as it is in Penn.

Penn stores them alphanumerically, Rhost stores them by the last attribute added.

I'll think of a way to do this that isn't computationaly expensive.

Changed 2 months ago by Ashen-Shugar

  • status changed from new to accepted

Actually, I think I know a way to do this with a MAX and MIN value to existing lattr() functionality that should work for all the *lattr functions.

I'll pick this one up.

Changed 2 months ago by Ashen-Shugar

  • owner set to Ashen-Shugar
  • status changed from accepted to assigned

Changed 5 weeks ago by Ashen-Shugar

  • status changed from assigned to closed
  • resolution set to implemented

New *attr() key fields > and < added to show max/min attribute name.

This works for all *attr() functions.

Note: See TracTickets for help on using tickets.