guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] emacs: Rewrite scheme side in a functional manner.


From: Ludovic Courtès
Subject: Re: [PATCH] emacs: Rewrite scheme side in a functional manner.
Date: Wed, 24 Sep 2014 09:48:21 +0200
User-agent: Gnus/5.130011 (Ma Gnus v0.11) Emacs/24.3 (gnu/linux)

Alex Kost <address@hidden> skribis:

> Ludovic Courtès (2014-09-21 23:27 +0400) wrote:
>
>> Alex Kost <address@hidden> skribis:
>>
>>> Ludovic Courtès (2014-09-20 18:11 +0400) wrote:

[...]

>> I was thinking about things generic enough to be in (guix profiles),
>> things that ‘guix package’ or guix-web could use.
>>
>> That said, it’s also fine do to things incrementally: write things
>> specifically for guix.el’s need, and generalize them later when we have
>> a clearer understanding of the situation.  I just thought it’s worth
>> 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’s pretty much the same for me.

[...]

>>> To get information about packages/outputs, different “search-types” are
>>> used (like ‘name’, ‘all-available’, ‘installed’).  These “search-types +
>>> search-vals” are transformed into a list of package/output patterns.
>>>
>>> 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
>> “matches”, “search results”, “descriptors”, or “specifications”,
>> perhaps.  WDYT?
>>
>> (Maybe this is just bikeshedding, so your call.)
>
> I leave a “pattern” 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 “pattern->entries” functions created by
>>> ‘package-pattern-transformer’ and ‘output-pattern-transformer’.
>>
>> 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 “sexp” 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’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]