mIRC Home    About    Download    Register    News    Help

Print Thread
#176016 01/05/07 08:06 PM
Joined: Dec 2003
Posts: 12
A
Pikka bird
OP Offline
Pikka bird
A
Joined: Dec 2003
Posts: 12
For some reason the kid is too lazy to suggest stuff himself so

(15:59:25) <@Vliedel> i'd love to see /filter be able to handle hash tables
(15:59:48) <@Vliedel> it just needs to add a switch for /filter to look to item or value
(16:00:37) <@Vliedel> and off course a switch to tell /filter that its supposed to treat in/outfile

Joined: May 2007
Posts: 27
V
Ameglian cow
Offline
Ameglian cow
V
Joined: May 2007
Posts: 27
I was just about to register smile
Anyway, the reason i like this is because it would be nice to combine the speed of /filter to sort or filter lots of data with the speed of hashtables to read 1 item.

Vliedel #176019 01/05/07 08:28 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
How are you suggesting the table would be sorted?

So that if you sorted this table:

$hget(table,1).item = c
$hget(table,2).item = a
$hget(table,3).item = b

It'd become:

$hget(table,1).item = a
$hget(table,2).item = b
$hget(table,3).item = c

Or something else?

hixxy #176020 01/05/07 08:31 PM
Joined: May 2007
Posts: 27
V
Ameglian cow
Offline
Ameglian cow
V
Joined: May 2007
Posts: 27
no so you can for example /filter hashtable @window matchtext

Vliedel #176021 01/05/07 08:36 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
I don't think it makes a lot of sense to support hashtables in /filter since /filter is for the most part a sorting command, not just something to move/dump data. Maybe a /hdump command or similar..

hixxy #176023 01/05/07 08:39 PM
Joined: May 2007
Posts: 27
V
Ameglian cow
Offline
Ameglian cow
V
Joined: May 2007
Posts: 27
uh /filter is to filter data isn't it? Sorting is another thing it can do. Anyway a hdump as i know them would only be able to dump all items to a custom window, where /filter can handle windows, dialogs and files. Plus it can sort in the same command if you wish..

Vliedel #176025 01/05/07 08:44 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
The way you're suggesting it seems to be that hashtables will only be accepted as input, not output, which would make it inconsistent with /filters other features.

hixxy #176026 01/05/07 08:58 PM
Joined: May 2007
Posts: 27
V
Ameglian cow
Offline
Ameglian cow
V
Joined: May 2007
Posts: 27
yeah output is a bit harder probably, as you need to provide items and value, which can only be provided if you can seperate them or so.

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Sorting hash tables can already by done with /filter, but not directly from the table. Save the table's items to a file, or put it in a custom window if you want to do it that way, and then filter it. If you add line numbers when filtering, you will be able to $hget the line numbers to find what the data is. This works great for top 10 lists and can be done very quickly (under 1 second) with very large tables.


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard