From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rivka Miller Newsgroups: gmane.emacs.help Subject: Re: lisp style question Date: Mon, 5 Nov 2012 15:33:50 -0800 (PST) Message-ID: <40294da8-3515-4f5a-97c6-2d434092cb15@g8g2000yqp.googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1352158517 18327 80.91.229.3 (5 Nov 2012 23:35:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 5 Nov 2012 23:35:17 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Nov 06 00:35:27 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TVWCQ-0000gy-Eo for geh-help-gnu-emacs@m.gmane.org; Tue, 06 Nov 2012 00:35:22 +0100 Original-Received: from localhost ([::1]:59720 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TVWCH-0005hl-HW for geh-help-gnu-emacs@m.gmane.org; Mon, 05 Nov 2012 18:35:13 -0500 Original-Received: by 10.224.111.140 with SMTP id s12mr6806255qap.5.1352158430969; Mon, 05 Nov 2012 15:33:50 -0800 (PST) Original-Received: by 10.236.127.133 with SMTP id d5mt3492240yhi.1.1352158430917; Mon, 05 Nov 2012 15:33:50 -0800 (PST) Original-Path: usenet.stanford.edu!c7no7706027qap.0!news-out.google.com!gf5ni18188417qab.0!nntp.google.com!c7no7970963qap.0!postnews.google.com!g8g2000yqp.googlegroups.com!not-for-mail Original-Newsgroups: comp.lang.lisp, comp.lang.scheme, comp.lang.functional, gnu.emacs.help Original-Followup-To: comp.lang.lisp Complaints-To: groups-abuse@google.com Injection-Info: g8g2000yqp.googlegroups.com; posting-host=99.122.156.32; posting-account=V5Tx-QoAAACNTDxOswIwdOklJAUE-vym Original-NNTP-Posting-Host: 99.122.156.32 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 5.1; rv:12.0) Gecko/20100101 Firefox/12.0,gzip(gfe) Injection-Date: Mon, 05 Nov 2012 23:33:50 +0000 Original-Xref: usenet.stanford.edu comp.lang.lisp:311738 comp.lang.scheme:89202 comp.lang.functional:69681 gnu.emacs.help:195214 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:87542 Archived-At: On Dec 2 2010, 5:11 pm, Katalin Sinkov wrote: > On Dec 2, 12:50 am, "Frode V. Fjeld" wrote: > > > Katalin Sinkov writes: > > > In the {} world I would return a small table like > > > > width 1 > > > height 2 > > > weight 3 > > > Typically in Lisp you'd return either a property or association list. > > > I.e: (WIDTH 1 HEIGHT 2 WEIGHT 3) with accessor GETF, > > > or ((WIDTH . 1) (HEIGHT . 2) (WEIGHT . 3)) with accessor ASSOC. > > > -- > > Frode V. Fjeld > > Of all the four or five replies, I found yours most helpful although > brief. This is perhaps due to me being a beginner, although the > replies seem very promising and I am desirous of understanding them. I > have just read the paper by McCarthy and the micro manual. > assoc. and pair. are the most elementary of the functions, although > not primitive and used in evaluator for working the symbol table. > but beyond this, i could not understand your post. > what is an "assoc list" and "a property list" and their difference ? > what is "setf" and how to write it in terms of the elementary > functions, car/cdr/cons/quote/cond/atom/eq ? I have a few questions about this post from the past that I stumbled. http://groups.google.com/group/comp.lang.lisp/browse_thread/thread/fe797358c6550f1d/ Are these "car/cdr/cons/quote/cond/atom?/eq?" the only seven primitives needed to describe a minimal lisp? What about the values NIL or can it be described as () and is implicit in cons - and how? In addition, are not the concepts, lambda, and label needed as primitives to define the auxiliary functions assoc. and pair. to access and construct the environment? If that the primitive lambda is an abstraction specifier (for free variable binding specification), then it cannot be used as a function identifier or an operation name. > how to conveniently costruct the list that goes with getf ? > Presently I use the emacs IDE only and restricted to elisp, though i > can (require 'cl) so what are > the correponding operation in elisp ? > > what are the corresponding functions to defclass/defstruct in elisp ? > I assume people are assuming CL. > > Could you comment a little on the post of Captain Obvious and Pascal > Bourguignon ? > > The former has "values" and the latter has "make-volume" and colons. > How did the constructor "make-volume" come to be ? > > Is it a feature in elisp ? > > Thanks for your help. > > Katalin Thanks. Rivka