lkml.org 
[lkml]   [2010]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] scripts: improve checkstack
Stephen Hemminger wrote:
> Turn on strict checking, and get rid of annoying use of prototype.
> Fix syntax error in declaration
>
> Use efficient sort algorithm by using schwartzian transform.
> http://en.wikipedia.org/wiki/Schwartzian_transform


Yeah, the idea is good, this can also make it more perlish. ;)

But...


> -print sort bysize @stack;
> +# Use Schwartzian transform to sort by last field (size)
> +print map { $_->[0] }
> + sort { $b->[1] <=> $a->[1] }
> + map { [$_, /:\t*(\d+)$/] } @stack;

This regex here is not strictly the same as before.

Can we just keep the original regex? If not, what's wrong?

Thanks.


\
 
 \ /
  Last update: 2010-02-20 08:35    [W:0.076 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site