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: Luciana Lima Brito
Subject: Re: Outreachy - Guix Data Service: implementing basic json output for derivation comparison page
Date: Mon, 19 Apr 2021 14:04:24 +0000

On Mon, 19 Apr 2021 09:26:13 +0100
Christopher Baines <mail@cbaines.net> wrote:

> As an example, if you have this structure.
> 
>   '((foo . 1)
>     (bar . 2))
> 
> and you want the numbers to be strings, you can do something like:
> 
>   (map (match-lambda
>         ((name . number)
>          (cons name (number->string number))))
>        data)
> 
> and I think a similar approach for the transformation you're trying to
> perform to the arguments will more cleanly represent what you're
> trying to do.

It helped a lot!

> One different thing I noticed:
> 
>   ,@(if (not (string? hash-alg))
>         '()
>         `((hash-algorithm . ,hash-alg)))
> 
> I'd suggest simplifying this by flipping the different parts of the
> if, and removing the not.

Done.

-- 
Best Regards,

Luciana Lima Brito
MSc. in Computer Science

Attachment: 0001-Implement-basic-json-output-for-the-derivation-compa.patch
Description: Text Data


reply via email to

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