From: ludo@gnu.org (Ludovic Courtès)
To: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: [PATCH]: Rewrite CRAN importer.
Date: Fri, 11 Dec 2015 10:47:35 +0100 [thread overview]
Message-ID: <87a8ph9v0o.fsf@gnu.org> (raw)
In-Reply-To: <idjh9jq8hhm.fsf@bimsb-sys02.mdc-berlin.net> (Ricardo Wurmus's message of "Thu, 10 Dec 2015 16:12:53 +0100")
Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis:
> Ludovic Courtès <ludo@gnu.org> writes:
>
>>> +(define (safe-car maybe-pair)
>>
>> Does it have airbags?
>
> Rounded corners, no explosive combustion engine, and wrapped in an extra
> thick layer of fluff!
:-)
> From 7f90add2b33707178964364c86f8a4440e6bf554 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
> Date: Thu, 3 Dec 2015 16:12:09 +0100
> Subject: [PATCH] import: cran: Parse DESCRIPTION instead of HTML.
>
> * guix/import/cran.scm (description->alist, listify,
> beautify-description, description->package): New procedures.
> (table-datum, downloads->url, nodes->text, cran-sxml->sexp): Remove
> proceduces.
> (latest-release): Use parsed DESCRIPTION instead of SXML.
> * tests/cran.scm: Rewrite to match importer.
[...]
> + (let ((url (string-append %cran-url name "/DESCRIPTION")))
> + ((compose description->alist read-string) (http-fetch url))))
I think this is best written as:
(description->alist (read-list (http-fetch url)))
or:
(define cran-fetch
(compose description->alist read-string http-fetch
(cut string-append %cran-url <> "/DESCRIPTION")))
but not something in between. :-)
Otherwise LGTM.
Thank you!
Ludo’.
prev parent reply other threads:[~2015-12-11 9:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-03 15:28 [PATCH]: Rewrite CRAN importer Ricardo Wurmus
2015-12-04 14:23 ` Ludovic Courtès
2015-12-10 15:12 ` Ricardo Wurmus
2015-12-11 9:47 ` Ludovic Courtès [this message]
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=87a8ph9v0o.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guix-devel@gnu.org \
--cc=ricardo.wurmus@mdc-berlin.de \
/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.