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 09:40:22 +0100
User-agent: mu4e 1.4.15; emacs 27.1

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

> On Fri, 16 Apr 2021 20:17:45 +0100
> Christopher Baines <mail@cbaines.net> wrote:
>
> Hi,
>
> I hope the patch is correct this time.
> I considered all you said, so I separated the
> functions to get outputs, inputs and sources. I also implemented
> everything inside the case of the json/application.

Yep, that's looking good, much neater.

>> While a flatter list is what you want when building an HTML table, I
>> think you were looking to get a JSON object separating the common,
>> base and target elements, right? If so, then map, rather than
>> append-map should be more useful to you here. Since above you're
>> passing in two lists of three things, if the procedure passed to map
>> returns a pair with a string in the first position, you'll end up
>> producing the scheme version of a JSON object (an alist).
>
> You were right about that, I'm using map now.
>
> Please, let me know if I missed something.
> Thanks in advance, I'm learning a great deal! :)

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.

Attachment: signature.asc
Description: PGP signature


reply via email to

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