From ... Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!129.240.148.23!uio.no!nntp.uio.no!ifi.uio.no!not-for-mail From: Erik Naggum Newsgroups: comp.lang.lisp Subject: Re: Pretty printing IP addresses Date: 23 Sep 2002 20:22:06 +0000 Organization: Naggum Software, Oslo, Norway Lines: 26 Message-ID: <3241801326332982@naggum.no> References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: maud.ifi.uio.no 1032812527 7093 129.240.65.5 (23 Sep 2002 20:22:07 GMT) X-Complaints-To: abuse@ifi.uio.no NNTP-Posting-Date: 23 Sep 2002 20:22:07 GMT Mail-Copies-To: never User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.lisp:41715 * Matthew X. Economou | I'm writing some code that manipulates IP addresses. A class wrapper around a one-element vector specialized to contain 32-bit integers seems like a good choice. Provide readers and setters that return and accept (respectively) a string, an integer, and four bytes. | I would like to give the IP address object a pretty-printable and readable | representation. Simple and easy with a class wrapper. | Currently, I'm using a DEFTYPE declaration of (SIMPLE-BIT-VECTOR 32) Why on earth? The overhead of constructing and deconstructing it bit by bit must be enormous. | Is there a better way? See `print-object´. Specialize methods on it for your wrapper class. -- Erik Naggum, Oslo, Norway Act from reason, and failure makes you rethink and study harder. Act from faith, and failure makes you blame someone and push harder.