From: Luciana Lima Brito <lubrito@posteo.net>
To: Christopher Baines <mail@cbaines.net>
Cc: guix-devel@gnu.org
Subject: Re: Outreachy - Guix Data Service: implementing basic json output for derivation comparison page
Date: Fri, 16 Apr 2021 15:07:40 +0000 [thread overview]
Message-ID: <20210416120740.05a819ca@lubrito> (raw)
In-Reply-To: <87o8efxhil.fsf@cbaines.net>
On Fri, 16 Apr 2021 00:19:46 +0100
Christopher Baines <mail@cbaines.net> wrote:
Hi,
> Ok, I looked at the overall diff, and it looks to me like these
> changes should probably be one commit.
I don't actually understand what you mean saying it should be one
commit. Do I have to make my seven commits become a single one? How do
I do that?
> On the get-derivation-data function, I wouldn't use the same function
> to process the inputs, outputs and sources. The data for each is
> different, so I would separate the code as well.
I understand that, but the logic to map the values for these three
bindings is the same, wouldn't it generate redundancies implementing
the same logic separately?
>
> To avoid having to call a procedure three times, on the base, target
> and common items, I'd consider following the same pattern in the HTML
> generating code, map over a list of the lists, so something like:
>
> (map (lambda (name data)
> (cons name
> (match data
> ((name path hash-alg hash recursive)
> ...))))
> '(base target common)
> (list (assq-ref outputs 'base)
> (assq-ref outputs 'target)
> (assq-ref outputs 'common)))
>
> Does that make sense?
Actually I did it in a similar way before, but it resulted in a list
with all the values for base, target and common together, in which
I had to have another way to separate them and render on json, for
example, I tried appending "base", "target" or "common" names to each
list (similar to your function?), but them I had to convert this list to
a vector. Calling the function for each separately gave me a cleaner
output. Also, I think that sometimes you might have more than one output
for base, target like it does for common, and I fail to see how your
example function addresses this. In short, I couldn't see the benefit
of this over calling the function three times. Is it for organizational
purpose or am I simply wrong? This time I'm just not understanding.
:)
--
Best Regards,
Luciana Lima Brito
MSc. in Computer Science
next prev parent reply other threads:[~2021-04-16 15:08 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-14 19:48 Outreachy - Guix Data Service: implementing basic json output for derivation comparison page Luciana Lima Brito
2021-04-15 8:46 ` Christopher Baines
2021-04-15 16:09 ` Luciana Lima Brito
2021-04-15 23:19 ` Christopher Baines
2021-04-16 15:07 ` Luciana Lima Brito [this message]
2021-04-16 15:47 ` Christopher Baines
2021-04-16 18:46 ` Luciana Lima Brito
2021-04-16 19:17 ` Christopher Baines
2021-04-16 22:47 ` Luciana Lima Brito
2021-04-17 8:40 ` Christopher Baines
2021-04-17 12:48 ` Luciana Lima Brito
2021-04-17 13:11 ` Christopher Baines
2021-04-17 14:08 ` Luciana Lima Brito
2021-04-17 17:45 ` Christopher Baines
2021-04-18 13:12 ` Luciana Lima Brito
2021-04-18 13:19 ` Luciana Lima Brito
2021-04-18 16:34 ` Christopher Baines
2021-04-18 19:12 ` Luciana Lima Brito
2021-04-19 8:26 ` Christopher Baines
2021-04-19 14:04 ` Luciana Lima Brito
2021-04-19 20:20 ` Christopher Baines
2021-04-19 20:56 ` Luciana Lima Brito
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210416120740.05a819ca@lubrito \
--to=lubrito@posteo.net \
--cc=guix-devel@gnu.org \
--cc=mail@cbaines.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.