From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] emacs: Rewrite scheme side in a functional manner. Date: Wed, 24 Sep 2014 09:48:21 +0200 Message-ID: <87y4t94fy2.fsf@gnu.org> References: <87a96e7bu3.fsf@gmail.com> <87egvq1nj2.fsf@gnu.org> <87y4ty5jl9.fsf@gmail.com> <8738c5vmuv.fsf@gnu.org> <87lhpw66kq.fsf@gmail.com> <87y4twek0u.fsf@taylan.uni.cx> <87bnqssbc0.fsf_-_@gnu.org> <87sijodrl2.fsf@gmail.com> <87oaua5qle.fsf_-_@gnu.org> <87ha01dz6h.fsf@gmail.com> <87ha00yds6.fsf@gnu.org> <878uladrhk.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56217) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWhJU-00026L-0p for guix-devel@gnu.org; Wed, 24 Sep 2014 03:48:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XWhJK-0003Gc-Ug for guix-devel@gnu.org; Wed, 24 Sep 2014 03:48:35 -0400 Received: from hera.aquilenet.fr ([2a01:474::1]:55347) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWhJK-0003Ed-Jh for guix-devel@gnu.org; Wed, 24 Sep 2014 03:48:26 -0400 In-Reply-To: <878uladrhk.fsf@gmail.com> (Alex Kost's message of "Wed, 24 Sep 2014 00:14:15 +0400") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Alex Kost Cc: guix-devel@gnu.org Alex Kost skribis: > Ludovic Court=C3=A8s (2014-09-21 23:27 +0400) wrote: > >> Alex Kost skribis: >> >>> Ludovic Court=C3=A8s (2014-09-20 18:11 +0400) wrote: [...] >> I was thinking about things generic enough to be in (guix profiles), >> things that =E2=80=98guix package=E2=80=99 or guix-web could use. >> >> That said, it=E2=80=99s also fine do to things incrementally: write thin= gs >> specifically for guix.el=E2=80=99s need, and generalize them later when = we have >> a clearer understanding of the situation. I just thought it=E2=80=99s w= orth >> keeping in mind. > > Thanks, I keep it in mind. Such incremental approach is the only way I > can write code. I'm not able to construct a proper thing from the very > beginning: I always make big changes when something new is added and I > notice that a new wave of generalization is required. Understandably, that=E2=80=99s pretty much the same for me. [...] >>> To get information about packages/outputs, different =E2=80=9Csearch-ty= pes=E2=80=9D are >>> used (like =E2=80=98name=E2=80=99, =E2=80=98all-available=E2=80=99, =E2= =80=98installed=E2=80=99). These =E2=80=9Csearch-types + >>> search-vals=E2=80=9D are transformed into a list of package/output patt= erns. >>> >>> Package patterns are: >>> >>> - package record; >>> - list of name, version; >>> - list of name, version, manifest entries; >>> - list of name, version, manifest entries, packages. >> >> Oh, OK. Do remove any ambiguity, an option would be to call them >> =E2=80=9Cmatches=E2=80=9D, =E2=80=9Csearch results=E2=80=9D, =E2=80=9Cde= scriptors=E2=80=9D, or =E2=80=9Cspecifications=E2=80=9D, >> perhaps. WDYT? >> >> (Maybe this is just bikeshedding, so your call.) > > I leave a =E2=80=9Cpattern=E2=80=9D name for now. OK. >>> Output patterns are: >>> >>> - package record; >>> - list of package record, output; >>> - manifest entry record; >>> - list of manifest entry record, packages; >>> - list of name, version, output. >>> >>> Then these patterns are transformed into entries (alists with >>> parameters/values) using =E2=80=9Cpattern->entries=E2=80=9D functions c= reated by >>> =E2=80=98package-pattern-transformer=E2=80=99 and =E2=80=98output-patte= rn-transformer=E2=80=99. >> >> What about s/entries/sexps/? That would make it clearer that the intent >> is to serialize things, not to manipulate them internally. > > Yes, it is better, thanks. I settled to =E2=80=9Csexp=E2=80=9D for this = thing. OK. > Thanks for all your recommendations, I tried to follow them. > I'm attaching the improved patch. Is it good enough now? Yes, please push. Thanks for taking the time! Ludo=E2=80=99.