guix-devel
[Top][All Lists]
Advanced

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

Re: Outreachy - Guix Data Service: implementing basic json output for de


From: Christopher Baines
Subject: Re: Outreachy - Guix Data Service: implementing basic json output for derivation comparison page
Date: Sat, 17 Apr 2021 14:11:37 +0100
User-agent: mu4e 1.4.15; emacs 27.1

Luciana Lima Brito <lubrito@posteo.net> writes:

> On Sat, 17 Apr 2021 09:40:22 +0100
> Christopher Baines <mail@cbaines.net> wrote:
>
>> I think you're getting there, but it looks like you're close to what
>> you want with matched-outputs say, and then later you pick bits out
>> of that alist, generate vectors from the lists, and then rebuild the
>> alist. I think you can remove all that complexity by just tweaking
>> what you're doing up when you generate matched-outputs. I think this
>> is true for matched-outputs, matched-inputs and matched-sources.
>
> It's beautiful!
> Now I could understand better the alist, and things make much more
> sense to me. I simplified this part of getting properly the values from
> matched-outputs, matched-inputs and matched-sources.

I think that's better, but you're still taking the matched-outputs,
matched-inputs and matched-sources alists, then later making the values
vectors rather than lists. The code would be even simpler if you
converted to a vector just after the map that produces the relevant
lists.

I haven't looked to closely at the rest, but it looks like the
environment-variables binding is unnecessary, given how simple the bit
of code used is, it can just be inlined in the one place where the
binding is used.

Attachment: signature.asc
Description: PGP signature


reply via email to

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