From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 28 00:59:00 2007 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 868C316A418 for ; Fri, 28 Dec 2007 00:59:00 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (cl-162.ewr-01.us.sixxs.net [IPv6:2001:4830:1200:a1::2]) by mx1.freebsd.org (Postfix) with ESMTP id 27E7213C458 for ; Fri, 28 Dec 2007 00:58:59 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.1/8.13.8) with ESMTP id lBS0wxu5049882; Thu, 27 Dec 2007 18:58:59 -0600 (CST) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.1/8.13.8/Submit) id lBS0wwW8049881; Thu, 27 Dec 2007 18:58:58 -0600 (CST) (envelope-from brooks) Date: Thu, 27 Dec 2007 18:58:58 -0600 From: Brooks Davis To: Garrett Cooper Message-ID: <20071228005858.GC48997@lor.one-eyed-alien.net> References: <5950EE0C-383D-4D6B-9991-A0DEABD2ADE4@u.washington.edu> <20071228003716.GB48997@lor.one-eyed-alien.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="JgQwtEuHJzHdouWu" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.16 (2007-06-09) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (lor.one-eyed-alien.net [127.0.0.1]); Thu, 27 Dec 2007 18:58:59 -0600 (CST) Cc: hackers@freebsd.org Subject: Re: BSD license compatible hash algorithm? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Dec 2007 00:59:00 -0000 --JgQwtEuHJzHdouWu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 27, 2007 at 04:47:26PM -0800, Garrett Cooper wrote: >=20 > On Dec 27, 2007, at 4:37 PM, Brooks Davis wrote: >=20 >> On Thu, Dec 27, 2007 at 04:30:40PM -0800, Garrett Cooper wrote: >>> Hi all, >>> Just wondering if anyone knew of a good BSD license compatible key-bas= ed >>> hash placement / retrieval algorithm that was available anywhere. >>> I'm looking for a reliable way to lookup objects to see if a given=20 >>> action >>> would be performed in my revised pkg_install(1), to thus efficiently >>> pre-plan out the installation dependencies and fully utilize >>> multiprocessing capabilities of contemporary machines / eliminate=20 >>> duplicate >>> dependency install requirements. >>> I know I can use tree structures or hash(3), but I want to avoid trees >>> (inefficient with large data sets of course) and I was looking for a >>> non-BDB based solution (for right now, with this given structure as I= =20 >>> don't >>> want to write everything to disk). Later on it might be a good idea to >>> cache the results using BDB on disk, but for now I was just wondering if >>> there were any non-BDB based hashing solutions that anyone knew of. >>=20 >> We imported hash(9) from Open/NetBSD recently. It may do what you want. >>=20 >> -- Brooks >=20 > Brooks, > Looks promising, but how difficult would it be to port the code to other= =20 > platforms (Win32 for instance?). If possible (and this is lower prio=20 > because FreeBSD has a lot more apps available as pkgs / ports compared to= =20 > Win32), I'm looking for a solution that would be easily portable, as I'm= =20 > trying to effectively kill two birds with one stone by programming an=20 > equivalent generalized app / infrastructure for my current job (large sca= le=20 > Windows administration and staying on top of software updates is a pain= =20 > with and without M$ products), and maybe for open market as well. Why not try compiling it there? If you're looking from a hash algorithm for pkg_install(1) you'll need a good technical reason why you can't use sys/hash.h and need to import something else. -- Brooks --JgQwtEuHJzHdouWu Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFHdEpSXY6L6fI4GtQRAmUKAKCfiBw453p/1mVYlUBybJIoypZlFwCfTGvr geTmyTGW63bv1WW8A47p/48= =v8w6 -----END PGP SIGNATURE----- --JgQwtEuHJzHdouWu--