guix-devel
[Top][All Lists]
Advanced

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

Re: Outreachy - Guix Data Service: questions about improving the data fo


From: Luciana Lima Brito
Subject: Re: Outreachy - Guix Data Service: questions about improving the data for derivation comparisons.
Date: Tue, 27 Apr 2021 13:10:01 +0000

On Mon, 26 Apr 2021 22:21:50 +0100
Christopher Baines <mail@cbaines.net> wrote:

> 
> Rather than writing:
> 
>   (match-lambda
>     ((alist ...)
> 
> I'd just use
> 
>   (lambda (alist)
> 
> as I think that's equivalent right?

Right, I did this.

> >> I'd consider these options first probably:
> >>
> >>  - Could the data coming from derivation-differences-data have
> >> vectors where appropriate already? The HTML code would probably
> >> need to be adjusted, but I think that's fine.  
> >
> > I tried this for days but with no success. Maybe the only way would
> > be to tweak group-to-alist, but it touches many places, and I
> > didn't want to mess with it.  
> 
> Maybe add another procedure that combines group-to-alist but generates
> an alist with vectors as the values? (group-to-alist/vector maybe).

> I think using let is OK, but I think just unpacking data-groups as
> you've called it directly in to the alist is fine (so ,@data-groups),
> rather than picking out the elements. JSON objects are unordered, so
> the ordering isn't something that really matters.
> 
> If you do go down this route though, I'd probably add a comment saying
> what things are being added to the outer most alist, just to make the
> code quicker to read.

Well, I went down the second route, now I'm calling the ,@data-groups
and I added a comment explaining its use.
The main point here is, the code is working and it looks nice, but to
get the data with the vectors seems to be right too. I'm sending the
new patch for your review and I'll wait for your call, if you think I
should try the first route or not.

-- 
Best Regards,

Luciana Lima Brito
MSc. in Computer Science

Attachment: 0001-Change-handling-of-queried-data-for-derivations-comp.patch
Description: Text Data


reply via email to

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