From download at hpc.unm.edu Tue Oct 6 09:40:20 2009 From: download at hpc.unm.edu (Jim Prewett) Date: Tue, 6 Oct 2009 09:40:20 -0600 (MDT) Subject: [Abqlispscheme] 2nd Anniversary of ABQ Lisp/Scheme! Message-ID: Hi All, This month will be our 2nd Anniversary! I can't believe, we've been together for two years now and there's been hardly any nagging or squabbles ;) Should we do anything special for the Anniversary? Does anyone have anything they'd like to talk about? I believe our next meeting is scheduled for Sunday, Oct 18th. Jim James E. Prewett Jim at Prewett.org download at hpc.unm.edu Systems Team Leader LoGS: http://www.hpc.unm.edu/~download/LoGS/ Designated Security Officer OpenPGP key: pub 1024D/31816D93 HPC Systems Engineer III UNM HPC 505.277.8210 From download at hpc.unm.edu Tue Oct 6 09:45:10 2009 From: download at hpc.unm.edu (Jim Prewett) Date: Tue, 6 Oct 2009 09:45:10 -0600 (MDT) Subject: [Abqlispscheme] printed representation of consN cells? Message-ID: Hi All, I was rather intrigued by last months talk (Thanks Jeff! :) . I can definantly see uses for "cons" cells with more than 2 pointers: Immediately, it seems like a cons3 would be a great choice for implementing a doubly-linked list. :) I've also seen online things like CXRs ("cook-sirs") which had up to 512 of these pointers in a "cons cell". I believe you could call c1r, c2r, ... c512r in order to get at whatever the pointer points to. :) I'm cureous, how were these things /printed/ with CRISP? Is anyone aware of "modern" variations on the 2-pointer cons cell? Thanks, Jim James E. Prewett Jim at Prewett.org download at hpc.unm.edu Systems Team Leader LoGS: http://www.hpc.unm.edu/~download/LoGS/ Designated Security Officer OpenPGP key: pub 1024D/31816D93 HPC Systems Engineer III UNM HPC 505.277.8210 From jbbrus at comcast.net Tue Oct 6 10:31:21 2009 From: jbbrus at comcast.net (Bernice Barnett) Date: Tue, 06 Oct 2009 10:31:21 -0600 Subject: [Abqlispscheme] printed representation of consN cells? In-Reply-To: References: Message-ID: <4ACB70D9.3030407@comcast.net> Jim Prewett wrote: > Hi All, > > I was rather intrigued by last months talk (Thanks Jeff! :) . I can > definantly see uses for "cons" cells with more than 2 pointers: > Immediately, it seems like a cons3 would be a great choice for > implementing a doubly-linked list. :) > > I've also seen online things like CXRs ("cook-sirs") which had up to 512 > of these pointers in a "cons cell". I believe you could call c1r, c2r, > ... c512r in order to get at whatever the pointer points to. :) > > I'm cureous, how were these things /printed/ with CRISP? > > Is anyone aware of "modern" variations on the 2-pointer cons cell? > > Thanks, > Jim > All complex CRISP structures-arrays, cons cells (except cons2)-were printed in brackets (square if memory serves correctly) with the type as the first element: so [cons3 foo bar bah] for a cons3. Note that these extended cons nodes are easily implemented as arrays of type T. The reasons we "invented" the extended cons were no header so more storage efficient, no numerical indexes so code was (personnel opinion not well grounded) easier to read, and uniform sizes (vs. arrays) allowed spiffier GC algorithms to be used. (Note, cons3's where maintained in different spaces than cons4's, etc.) A semantic note: a list of n elements is quite different than a cons-n. The fact that a type predicate can distinguish them is very important. When you build a structure from cons2's, you make a fundamental decision whether the cdr is just the second data field or a list linker; Unless someone tells you what the structure type is, you can't always tell by analysis. On modern variations: A few internal implementation variations are cdr-coding and magic forwarding though I don't think these are the kind of variations you have in mind. -- Jeff Barnett From download at hpc.unm.edu Tue Oct 6 11:33:51 2009 From: download at hpc.unm.edu (Jim Prewett) Date: Tue, 6 Oct 2009 11:33:51 -0600 (MDT) Subject: [Abqlispscheme] printed representation of consN cells? In-Reply-To: <4ACB70D9.3030407@comcast.net> References: <4ACB70D9.3030407@comcast.net> Message-ID: Thanks Jeff!! Can I assume that the reader was aware of these things as well? Could one do (the moral equivalent of) (READ-FROM-STRING "[CONS3 A B C]") and have it produce [CONS3 A B C] ? Thanks! :) Jim James E. Prewett Jim at Prewett.org download at hpc.unm.edu Systems Team Leader LoGS: http://www.hpc.unm.edu/~download/LoGS/ Designated Security Officer OpenPGP key: pub 1024D/31816D93 HPC Systems Engineer III UNM HPC 505.277.8210 On Tue, 6 Oct 2009, Bernice Barnett wrote: > Jim Prewett wrote: > > Hi All, > > > > I was rather intrigued by last months talk (Thanks Jeff! :) . I can > > definantly see uses for "cons" cells with more than 2 pointers: Immediately, > > it seems like a cons3 would be a great choice for implementing a > > doubly-linked list. :) > > I've also seen online things like CXRs ("cook-sirs") which had up to 512 of > > these pointers in a "cons cell". I believe you could call c1r, c2r, ... > > c512r in order to get at whatever the pointer points to. :) > > > > I'm cureous, how were these things /printed/ with CRISP? > > > > Is anyone aware of "modern" variations on the 2-pointer cons cell? > > > > Thanks, > > Jim > > > All complex CRISP structures-arrays, cons cells (except cons2)-were printed in > brackets (square if memory serves correctly) with the type as the first > element: so [cons3 foo bar bah] for a cons3. Note that these extended cons > nodes are easily implemented as arrays of type T. The reasons we "invented" > the extended cons were no header so more storage efficient, no numerical > indexes so code was (personnel opinion not well grounded) easier to read, and > uniform sizes (vs. arrays) allowed spiffier GC algorithms to be used. (Note, > cons3's where maintained in different spaces than cons4's, etc.) A semantic > note: a list of n elements is quite different than a cons-n. The fact that a > type predicate can distinguish them is very important. When you build a > structure from cons2's, you make a fundamental decision whether the cdr is > just the second data field or a list linker; Unless someone tells you what the > structure type is, you can't always tell by analysis. > > On modern variations: A few internal implementation variations are cdr-coding > and magic forwarding though I don't think these are the kind of variations you > have in mind. > -- > Jeff Barnett > From jbbrus at comcast.net Tue Oct 6 12:51:59 2009 From: jbbrus at comcast.net (Bernice Barnett) Date: Tue, 06 Oct 2009 12:51:59 -0600 Subject: [Abqlispscheme] printed representation of consN cells? In-Reply-To: References: <4ACB70D9.3030407@comcast.net> Message-ID: <4ACB91CF.5090705@comcast.net> An HTML attachment was scrubbed... URL: http://mailer.hpc.unm.edu/pipermail/abqlispscheme/attachments/20091006/08a6d7f8/attachment.htm