From: Greg Menke
Subject: Seibel/define-binary-class & binary-types-0.xx
Date: 
Message-ID: <86abnupxwn.fsf@apshai.pienet>
I have a somewhat complex array of binary packet types to parse into
lisp structures, which then get processed in various ways.  I started
with binary-types, which wasn't quite up to efficiently handling the
variety of structure in the packets.

It looks like Peter Seibel's example in PCL will work but I've been
unable to find finished examples of its implementation, which then could
give an example of how the whole thing looks in its final form.

Does such an example exist?  I've browsed around a bit and have only run
across discussions and the text of the book which doesn't seem to
provide anything more than snippets of source in intermediate form.  I
found one usenet posting apparently containing the source of the
define-binary-class macro, but it needs a macro-utilities package which
is even more obscure.  Am I missing something?

Thanks,

Greg

From: Edi Weitz
Subject: Re: Seibel/define-binary-class & binary-types-0.xx
Date: 
Message-ID: <uwsqylnmx.fsf@agharta.de>
On Fri, 28 Dec 2007 11:49:28 -0500, Greg Menke <·······@comcast.net> wrote:

> It looks like Peter Seibel's example in PCL will work but I've been
> unable to find finished examples of its implementation, which then
> could give an example of how the whole thing looks in its final
> form.

Huh?  I'm pretty sure that in some later chapter he uses it himself
for an ID3 parser.  That doesn't count as an example?

> I found one usenet posting apparently containing the source of the
> define-binary-class macro, but it needs a macro-utilities package
> which is even more obscure.

The whole source code needed for Peter's book is available from his
website.

> Am I missing something?

A closer look, maybe?

Edi.

-- 

European Common Lisp Meeting, Amsterdam, April 19/20, 2008

  http://weitz.de/eclm2008/

Real email: (replace (subseq ·········@agharta.de" 5) "edi")
From: Greg Menke
Subject: Re: Seibel/define-binary-class & binary-types-0.xx
Date: 
Message-ID: <86lk7eh5py.fsf@apshai.pienet>
Edi Weitz <········@agharta.de> writes:
> On Fri, 28 Dec 2007 11:49:28 -0500, Greg Menke <·······@comcast.net> wrote:
>
>> It looks like Peter Seibel's example in PCL will work but I've been
>> unable to find finished examples of its implementation, which then
>> could give an example of how the whole thing looks in its final
>> form.
>
> Huh?  I'm pretty sure that in some later chapter he uses it himself
> for an ID3 parser.  That doesn't count as an example?

In an incremental tutorial sort of way- I was looking for a tar.gz w/
README, some kind of example invocation, etc.


>> I found one usenet posting apparently containing the source of the
>> define-binary-class macro, but it needs a macro-utilities package
>> which is even more obscure.
>
> The whole source code needed for Peter's book is available from his
> website.

I eventually found the source via google, never came across a link to it
on his site.

Thanks,

Gregm
From: Edi Weitz
Subject: Re: Seibel/define-binary-class & binary-types-0.xx
Date: 
Message-ID: <uy7bea2fs.fsf@agharta.de>
On Fri, 28 Dec 2007 16:25:29 -0500, Greg Menke <·······@comcast.net> wrote:

> I eventually found the source via google, never came across a link
> to it on his site.

The book's website is here:

  http://gigamonkeys.com/book/

Search for "Download source code".  Wasn't too hard, was it?

Edi.

-- 

European Common Lisp Meeting, Amsterdam, April 19/20, 2008

  http://weitz.de/eclm2008/

Real email: (replace (subseq ·········@agharta.de" 5) "edi")
From: Greg Menke
Subject: Re: Seibel/define-binary-class & binary-types-0.xx
Date: 
Message-ID: <86ejd6thh3.fsf@apshai.pienet>
Edi Weitz <········@agharta.de> writes:
> On Fri, 28 Dec 2007 16:25:29 -0500, Greg Menke <·······@comcast.net> wrote:
>
>> I eventually found the source via google, never came across a link
>> to it on his site.
>
> The book's website is here:
>
>   http://gigamonkeys.com/book/
>
> Search for "Download source code".  Wasn't too hard, was it?
>
> Edi.

Well whattdya know, there it is.  I saw a big orange box talking about
selling of books and immediately dismissed the entire thing as
advertising...

Thanks,

Greg
From: Joost Diepenmaat
Subject: Re: Seibel/define-binary-class & binary-types-0.xx
Date: 
Message-ID: <87k5mynv14.fsf@zeekat.nl>
Greg Menke <·······@comcast.net> writes:

> Edi Weitz <········@agharta.de> writes:
>> On Fri, 28 Dec 2007 16:25:29 -0500, Greg Menke <·······@comcast.net> wrote:
>>
>>> I eventually found the source via google, never came across a link
>>> to it on his site.
>>
>> The book's website is here:
>>
>>   http://gigamonkeys.com/book/
>>
>> Search for "Download source code".  Wasn't too hard, was it?
>>
>> Edi.
>
> Well whattdya know, there it is.  I saw a big orange box talking about
> selling of books and immediately dismissed the entire thing as
> advertising...

And even better, the whole /text/ of the book is there too :-)

Joost.
From: Jack Unrue
Subject: Re: Seibel/define-binary-class & binary-types-0.xx
Date: 
Message-ID: <4775ca23$0$14455$88260bb3@free.teranews.com>
On Fri, 28 Dec 2007 11:49:28 -0500, Greg Menke wrote:

> I have a somewhat complex array of binary packet types to parse into
> lisp structures, which then get processed in various ways.  I started
> with binary-types, which wasn't quite up to efficiently handling the
> variety of structure in the packets.
> 
> It looks like Peter Seibel's example in PCL will work but I've been
> unable to find finished examples of its implementation, which then could
> give an example of how the whole thing looks in its final form.

In case it's helpful to see another example, I used binary-types to
parse files in the Win32 bmp and ico formats. See the definitions here:

http://common-lisp.net/websvn/filedetails.php?repname=graphic-forms&path=%
2Ftrunk%2Fsrc%2Fuitoolkit%2Fgraphics%2Fplugins%2Fdefault%2Fdefault-data-
plugin.lisp&rev=0&sc=0

and file I/O using those definitions:

http://common-lisp.net/websvn/filedetails.php?repname=graphic-forms&path=%
2Ftrunk%2Fsrc%2Fuitoolkit%2Fgraphics%2Fplugins%2Fdefault%2Fdefault-data-
plugin.lisp&rev=0&sc=0

Look for the load-bmp-data and load-icon-data functions in the latter
source file.

-- 
Jack Unrue


-- 
Posted via a free Usenet account from http://www.teranews.com