mIRC Home    About    Download    Register    News    Help

Print Thread
Another Vliedel #176016 01/05/07 08:06 PM
Joined: Dec 2003
Posts: 12
A
aca20031 Offline OP
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

Re: Another Vliedel [Re: aca20031] #176018 01/05/07 08:15 PM
Joined: May 2007
Posts: 27
V
Vliedel Offline
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.

Re: Another Vliedel [Re: Vliedel] #176019 01/05/07 08:28 PM
Joined: Sep 2005
Posts: 2,878
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,878
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?

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

Re: Another Vliedel [Re: Vliedel] #176021 01/05/07 08:36 PM
Joined: Sep 2005
Posts: 2,878
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,878
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..

Re: Another Vliedel [Re: hixxy] #176023 01/05/07 08:39 PM
Joined: May 2007
Posts: 27
V
Vliedel Offline
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..

Re: Another Vliedel [Re: Vliedel] #176025 01/05/07 08:44 PM
Joined: Sep 2005
Posts: 2,878
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,878
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.

Re: Another Vliedel [Re: hixxy] #176026 01/05/07 08:58 PM
Joined: May 2007
Posts: 27
V
Vliedel Offline
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.

Re: Another Vliedel [Re: aca20031] #176033 01/05/07 10:57 PM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
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