On Sun, Apr 27, 2014 at 3:06 PM, Volker Braun <[email protected]> wrote:
> I guess that #16187 broke it (the beautification of "sage -optional").
>
> By the way, optional_packages() parses the output of "sage -optional" (!).

It is not unusual to parse the output  of a UNIX command.   It is
possibly worrisome for a UNIX command to switch to being "human
readable" by default, which is what #16187 does.  This would be kind
of like changing the "du" command (say) to suddenly by default have
the "-h" option.    It's too bad we never switched the command line
parsing system for Sage to use subcommands, so then we could have
things like "sage optional -h" or "sage packages -h --list-optional"
or something...

> And it isn't doctested. The only surprise should be that it took this long
> to break.

Indeed.   That said, people do use the command, and this long = 9 years...

> Finally, it is fundamentally unsound to modify shared libraries while your
> program is executing. install_package() should at most tell you how to exit
> sage and install stuff using sage -i.

(You would have to advise to exit all running Sage's, and also those
of all users on your system. )

There are many optional packages that can be safely installed while
Sage is running with no danger.  I would guess 90% of them have this
property, at least (assuming they aren't installed already).   In
fact, of the ones I install for SMC (which are I think all of the ones
that aren't broken or disruptive(=valgrind)), I think not a single one
of them involves modifying shared libraries that Sage would already
have accessed.  Most involve copying over static data files for
databases and third party programs (e.g., kash), etc.    So I'm  -1 to
removing the install_package command.

 -- William

>
>
>
> On Sunday, April 27, 2014 10:42:36 PM UTC+1, William wrote:
>>
>> Hi,
>>
>> I installed the sage-6.2.rc0 [1] that Volker posted a few days ago.
>> However, the in-Sage commands install_package, optional_packages,
>> etc., are now broken.  Any ideas what is going on?
>>
>> More precisely:
>>
>>    sage: v = optional_packages()
>>    ...
>>
>>    Type 'sage -i package_name' to download and install a package.
>>    Optional package list (shown above) appears to be currently not
>> available or corrupted (network error?).
>>    sage: v
>>    ([], [])
>>
>> PROBLEMS:
>>
>> 1. Note that v is wrong -- it should have the installed/uninstalled
>> packages.  This is probably because of the "network error?" error.
>>
>> 2. Why does a command *inside of Sage, run from the Sage prompt* tell
>> the user to "Type 'sage -i package_name' to download and install a
>> package."?   Instead, it should suggest using the install_package(...)
>> command in Sage.
>>
>> 3. As mentioned above, the install_package command is also broken now.
>>
>>
>> NOTE: Using "sage -i" from the command line does still work, so that's
>> what I'll do.
>>
>> [1]
>> http://boxen.math.washington.edu/home/release/sage-6.2.rc0/sage-6.2.rc0.tar.gz
>>
>> --
>> William Stein
>> Professor of Mathematics
>> University of Washington
>> http://wstein.org
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.



-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to