chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] reinstall all eggs


From: Andre Kuehne
Subject: Re: [Chicken-users] reinstall all eggs
Date: Fri, 20 Apr 2007 22:48:49 +0200
User-agent: Thunderbird 1.5.0.10 (X11/20070221)

Mario Domenech Goulart wrote:
On Fri, 20 Apr 2007 22:59:56 +0900 "Alex Shinn" <address@hidden> wrote:

Ah, OK.  For this you could use the second command, and instead of
listing the uninstalled eggs (comm -1 -3 = set difference), list the
installed eggs (comm -1 -2 = set intersection):

$ chicken-setup -fetch-tree | grep '^[ (](' |\
    perl -ape 's/^[ (]\(([^ ]+)(?: .*)?$/\1/' | sort > pkg.txt

A chickenized version:

(use http-client)

(with-output-to-file "pkg.txt"
  (lambda ()
    (for-each print
              (sort
               (map (compose symbol->string car)
                    (with-input-from-string
                        (http:GET 
"http://www.call-with-current-continuation.org/eggs/repository";)
                      read))
               string<))))

Nice! Which makes me wonder why i even have to switch to my bash-shell to install this http egg. Wouldn't it be cool to see something like this?:

#0> (use http-client)
Error: (require) can not load extension: http-client
Do you want to install it? [y/n]: y
Query extension database...found http.egg
downloading http.egg from (www.call-with-current-continuation.org eggs 80)
...

For this to work, you would need the extension->egg-mapping
and a chicken-setup egg! ...ahh ignore me, i am just lazy...

Best Wishes
Andre Kuehne






reply via email to

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