[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Weechat-dev] [patch #8062] Better hash function for the nick colors
From: |
Antoine Pietri |
Subject: |
[Weechat-dev] [patch #8062] Better hash function for the nick colors |
Date: |
Thu, 30 May 2013 13:56:28 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:21.0) Gecko/20100101 Firefox/21.0 |
URL:
<http://savannah.nongnu.org/patch/?8062>
Summary: Better hash function for the nick colors
Project: WeeChat
Submitted by: seirl
Submitted on: Thu 30 May 2013 01:56:27 PM GMT
Category: irc plugin
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
IRC nick: seirl
_______________________________________________________
Details:
Currently the hash function used to color nicks in the IRC plugin is a simple
sum of every unicode character of the colored nick.
This causes some problems :
* Two nicks that are identical except some permutated letters (alice and
ailce) will display identically;
* Speaking more generally, similar nicks (alice and alidd), instead of being
visually distinguished by the colors, are more likely to appear identically
and being confused more easily.
Using a hash function with a better randomized repartition (in this case, the
djb2 algorithm) is a way of solving this problem.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Thu 30 May 2013 01:56:27 PM GMT Name: irc-nick.c.patch Size: 183B
By: seirl
Patch for src/plugins/irc/irc-nick.c
<http://savannah.nongnu.org/patch/download.php?file_id=28210>
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/patch/?8062>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [Weechat-dev] [patch #8062] Better hash function for the nick colors,
Antoine Pietri <=