[sage-support] Re: install sage on Windows 10 using new ubuntu bash shell?

2016-09-29 Thread leif
Drew Johnson wrote:
> A feature of the Windows 10 Anniversary Edition is that you can now use
> a Ubuntu bash that can access your Windows file system.
> 
> http://www.omgubuntu.co.uk/2016/08/enable-bash-windows-10-anniversary-update
> 
> Can I use this to install sage on windows without using a virtual
> machine or anything? That would be sweet...
> 
> I though I'd ask before trying it.

There's been some related discussion on sage-devel in July [1].

Partially deviating from the topic, but perhaps still interesting.


-leif

[1] http://groups.google.com/group/sage-devel/t/307c83e6d7323b96


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


[sage-support] Re: sage crash report

2016-09-27 Thread leif
Eric Gourgoulhon wrote:
> Le vendredi 16 septembre 2016 10:37:22 UTC+2, Ralf Stephan a écrit :
> 
> Looks like C++ ABI mismatch. While gcc-4.8.4 should work
> you maybe want to install a newer version. What Sage version
> is this?
> 
> 
> I guess this is SageMath 7.3 from the AIMS PPA, installed on Ubuntu
> 16.04. See
> https://groups.google.com/d/msg/sage-devel/z1XQDRt-OFs/hnYuxcleBgAJ
> for an update on this.

FWIW, I replied to the exact same crash report of September 11th.


Orthogonal to the C++ ABI issues, we really need to patch / modify
IPython (and Python) to get *meaningful* crash reports (and /correct/
output for the system Sage was built on and the one it is actually
running on).

As is, the "crash reports" (I wouldn't say an import error is a crash
anyway) are mainly useless spam, at least when the reporters in addition
only rarely answer questions from replies, of which a couple weren't
necessary with proper generated system information either.


-leif


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


[sage-support] Re: Cosine function erro

2016-09-12 Thread leif
Shaun Ault wrote:
> Dear sage-support,
> 
> I'm getting the following unexpected results:
> 
> sage: cos(2*pi*4/7).n()
> 0.900968867902419
> sage: cos((2*pi*4/7).n())
> -0.900968867902419
> 
> What is going on here?  Clearly the result should be negative both times.

Which version?  (Works for me in 7.3.)


-leif


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


[sage-support] Re: Interface to lie broken in sage 7.3?

2016-09-12 Thread leif
Christian Bär wrote:
> In my install
> 
> $ sage -sh -c "which lie"
> gives
> /home/baer/Sage/sage-7.3/local/bin/lie
> 
> and
> 
> $ sage -sh -c lie
> gives
> /home/baer/Sage/sage-7.3/local/bin/lie: Zeile 4:
> /home/baer/Sage/sage-7.3/local/var/tmp/sage/build/lie-2.2.2/src/Lie.exe:
> Datei oder Verzeichnis nicht gefunden
> 
> In SageMathCloud
> 
> $ sage -sh -c "which lie"
> gives
> /projects/sage/sage-7.3/local/bin/lie
> 
> and
> 
> $ sage -sh -c lie
> gives
> /projects/sage/sage-7.3/local/bin/lie: 4: exec:
> /projects/sage/sage-7.3/local/var/tmp/sage/build/lie-2.2.2/src/Lie.exe:
> not found
> 
> In constrast, in my old sage 7.2 install the command
> $ sage -sh -c lie
> does start lie.


Recent fix from John Palmieri (merged into 7.4.beta4 I think):


diff --git a/build/pkgs/lie/spkg-install b/build/pkgs/lie/spkg-install
index 3668c4c..282a127 100755
--- a/build/pkgs/lie/spkg-install
+++ b/build/pkgs/lie/spkg-install
@@ -27,7 +27,7 @@ $MAKE CC="$CC" || die "Error building LiE. Did you
install bison?"
 # "install" the LiE package by moving over the complete build
 # directory to $SAGE_LOCAL/lib/lie
 cd ..
-sed -e "s'$PWD/LiE'$SAGE_LOCAL/lib/LiE'" src/lie > src/lie~
+sed -e "s'$PWD/src'$SAGE_LOCAL/lib/LiE'" src/lie > src/lie~
 mv src/lie~ src/lie
 chmod +x src/lie
 rm -rf "$SAGE_LOCAL"/lib/lie # clean up old versions


Someone^TM borked it in May, apparently.


Presumably simpler to just edit the broken script in
$SAGE_ROOT/local/bin than to patch and reinstall LiE...

(The real executable apparently is somewhere below
$SAGE_ROOT/local/lib/LiE/.)


-leif


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


[sage-support] Re: Computation has been running for a very long time...

2016-09-12 Thread leif
saad khalid wrote:
> Hello everyone:
> 
> I ran a computation on SMC that i figured would take some time. I'm
> generating 8000 groups, I believe, which is a slow process. Generating
> one group can take a few seconds, so I would expect generating 8000
> groups to take 10-ish hours. However, this computation has been running
> for over 70 hours now, I believe. I keep the page from stopping by
> running some simple arithmetic on the side, so that the page stays
> active. It still says it is running but I can't tell if it actually is.
> The RAM usage on the page used to be going up but now it has stopped at
> 1198mb. Is there any way for me to know if the computation is still
> active, or how far it has gotten, without interrupting it?

Get the PID and look at the process (e.g. "ps x | grep -w N" in a
shell, where N is the PID).

I guess

sage: macaulay2.pid()

gives you the PID.


There are certainly smarter ways on SMC.


-leif

> 
> Here is the code I ran:
> 
> |
> reset()
> macaulay2.eval("""
> K = toField(QQ[zet]/(zet^8 - zet^6 + zet^4 - zet^2 + 1))
> needsPackage "InvariantRing"
> A = []
> B = []
> C = []
> for a1 from 1 to 20 do (for a2 from 1 to 20 do (for a3 from 1 to 20 do A
> = A|[matrix{{zet^(a1),0,0},{0,zet^(a2),0},{0,0,zet^(a3)}}] ) )
> for i from 0 to (#A-1) do B = B|[generateGroup({A#i},K)]
> for j from 0 to (#A-1) do C = C|[toString molienSeries B#j]
> """)
> |


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


[sage-support] Re: Sage Crash Report

2016-09-11 Thread leif
leif wrote:
> Fabio Di Cosmo wrote:
>> IPython post-mortem report
>>
>> {'commit_hash': u'b630b41',
>>   'commit_source': 'installation',
>>   'default_encoding': 'UTF-8',
>>   'ipython_path':
>> '/usr/lib/sagemath/local/lib/python2.7/site-packages/IPython',
>>   'ipython_version': '4.2.1',
>>   'os_name': 'posix',
>>   'platform': 'Linux-4.4.0-36-generic-x86_64-with-debian-stretch-sid',
>> 'sys_executable': '/usr/lib/sagemath/local/bin/python',
>>   'sys_platform': 'linux2',
>>   'sys_version': '2.7.10 (default, Aug  6 2016, 15:34:26) \n[GCC 4.8.4]'}
>>
>> ***
>>
>> 
>>
>>  107 # This must come before Calculus -- it initializes the Pynac
>> library.
>> --> 108 import sage.symbolic.pynac
>>  global sage.symbolic.pynac = undefined
>>
>> ImportError:
>> /usr/lib/sagemath/local/lib/python2.7/site-packages/sage/symbolic/pynac.so:
>>
>> undefined symbol:
>> _ZN5GiNaC8constantC1ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPFNS_2exEjP7_objectERKS6_j
>>
>> ***
> 
> GiNaC::constant::constant(std::__cxx11::basic_string<char,
> std::char_traits, std::allocator >, GiNaC::ex (*)(unsigned
> int, _object*), std::__cxx11::basic_string<char, std::char_traits,
> std::allocator > const&, unsigned int)
> 
> 
> Looks like you downloaded the wrong binary for your distro; your
> standard C++ library apparently doesn't have a dual ABI.

... or the latter rather the other way around:

It seems your Sage was originally built with / for an older Debian
version (presumably Wheezy / 7.x, with GCC 4.8), while (parts of) the
Sage library now got rebuilt with a newer compiler version, GCC 5.x or
6.x, which by default use a different C++ ABI than earlier versions,
such that some of the rebuilt parts are now incompatible to those built
with the older compiler.

So you'd either have to download the appropriate binary distribution of
Sage for your system/distro, or rebuild Sage with the native compiler.

It *might* be sufficient to just run

./sage -f pynac && make

but you may run into further similar errors later as well.


-leif


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


[sage-support] Re: Sage Crash Report

2016-09-11 Thread leif
Fabio Di Cosmo wrote:
> IPython post-mortem report
> 
> {'commit_hash': u'b630b41',
>   'commit_source': 'installation',
>   'default_encoding': 'UTF-8',
>   'ipython_path':
> '/usr/lib/sagemath/local/lib/python2.7/site-packages/IPython',
>   'ipython_version': '4.2.1',
>   'os_name': 'posix',
>   'platform': 'Linux-4.4.0-36-generic-x86_64-with-debian-stretch-sid',
> 'sys_executable': '/usr/lib/sagemath/local/bin/python',
>   'sys_platform': 'linux2',
>   'sys_version': '2.7.10 (default, Aug  6 2016, 15:34:26) \n[GCC 4.8.4]'}
> 
> ***
> 
> 
> 
>  107 # This must come before Calculus -- it initializes the Pynac
> library.
> --> 108 import sage.symbolic.pynac
>  global sage.symbolic.pynac = undefined
> 
> ImportError:
> /usr/lib/sagemath/local/lib/python2.7/site-packages/sage/symbolic/pynac.so:
> 
> undefined symbol:
> _ZN5GiNaC8constantC1ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPFNS_2exEjP7_objectERKS6_j
> 
> ***

GiNaC::constant::constant(std::__cxx11::basic_string<char,
std::char_traits, std::allocator >, GiNaC::ex (*)(unsigned
int, _object*), std::__cxx11::basic_string<char, std::char_traits,
std::allocator > const&, unsigned int)


Looks like you downloaded the wrong binary for your distro; your
standard C++ library apparently doesn't have a dual ABI.


-leif


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


[sage-support] Re: adding all gap packages

2016-09-10 Thread leif
Dima Pasechnik wrote:
> # WARNING -- if you add a package here, also add it to
> # the gap_reset_workspace() command in
> #/src/sage/interfaces/gap.py
> 
> but AFAICS not all of the GAP packages from the current optional
> gap_packages package are actually listed / treated there, no idea why.
> 
> 
> Otherwise it *may* perhaps help to delete all old GAP workspaces (by
> default in $HOME/.sage/gap/) *before* (re)starting Sage, then calling
> gap_reset_workspace() again.
> 
> If I'm not mistaken, you could afterwards load the GAP packages you
> want, before calling gap_reset_workspace() once again, in order to make
> them part of your saved workspace.
> 
> 
> there are GAP packages that break libGAP (see my other message in this
> thread), so you cannot allow a GAP workspace with them to be used by libGAP.

Well, both seem to have separate workspaces (workspace-XXX vs.
libgap-workspace-XXX, not always "in sync", i.e., not always both
present), so it should be possible to exclude "critical" GAP packages
from libGAP's.

With some effort, it would IMHO also be possible to even automatically
blacklist packages (completely, or just for use with libGAP).


-leif

> This probably can be fixed, or libGAP can be made compatible with them
> (although the latter is perpetuating what is basically a GAP fork).
> 
> Dima  


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


[sage-support] Re: Easy way to combine fractions in Sage?

2016-09-10 Thread leif
saad khalid wrote:
> In mathematica, there is the function "together" which combines
> fractions by giving them a common denominator and then cancels out the
> factors. It is shown here:
> https://reference.wolfram.com/language/ref/Together.html
> 
> In Sage, I would like to do something similar. I just want to do
> |
> A,B =var("A,B")
> A/3+B/2
> |
> 
> I want the output to be (2A + 3B)/6, but instead it's just outputing
> what I input. Does Sage have any function that works like "together"
> does in mathematica? Thanks!

Well, not sure what you want to do with the result, but there's for example

sage: (A/3 + B/2).numerator_denominator()
(2*A + 3*B, 6)

If you just want to *see* the common "denominator" and factors, simply
taking the reciprocal 1/(A/3 + B/2) (aka ~(...) in Sage) might be
convenient as well... :-)

But I bet others will have better suggestions.


-leif


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


[sage-support] Re: adding all gap packages

2016-09-10 Thread leif
multiscalar wrote:
> Thanks, this is definitely simpler and it worked, but only about half of
> the packages I use are included. How would I add the other ones?

Well, if you're a bit familiar with Sage / Python and the shell, take a
look at

build/pkgs/gap_packages/spkg-install (a shell script)

and

src/sage/interfaces/gap.py (especially gap_reset_workspace(), line
1486 ff.)


The wiki page you mentioned is probably outdated, as it was last updated
in 2013.


The first file above starts with

# WARNING -- if you add a package here, also add it to
# the gap_reset_workspace() command in
#/src/sage/interfaces/gap.py

but AFAICS not all of the GAP packages from the current optional
gap_packages package are actually listed / treated there, no idea why.


Otherwise it *may* perhaps help to delete all old GAP workspaces (by
default in $HOME/.sage/gap/) *before* (re)starting Sage, then calling
gap_reset_workspace() again.

If I'm not mistaken, you could afterwards load the GAP packages you
want, before calling gap_reset_workspace() once again, in order to make
them part of your saved workspace.


HTH,

-leif


> I think these days diskspace isn't much of an issue, it would be nice if
> there are similar commands to install all accepted packages.
> 
> On Saturday, September 10, 2016 at 11:46:33 AM UTC-7, John Cremona wrote:
> 
> I just do "sage -i gap_packages" (and "sage -i database_gap") which
> sounds a lot simpler if it includes the packages you need.
> 
> On 10 September 2016 at 18:36, multiscalar <multi...@gmail.com
> > wrote:
> 
> I just built sage-7.3 under Centos7. Everything seems to have
> worked well :
> sage comes up fine and a few simple calculations work. The gap
> part on its won
> also comes up and works with simple tests, but there are no
> packages included.
> 
> I'm now trying to add all the gap packages to the gap component.
> I tried to
> follow the steps in :
> 
>  https://wiki.sagemath.org/InstallingGapPackages
> <https://wiki.sagemath.org/InstallingGapPackages>
> 
> The gap version in sage-7.3 is 4r8p3 which is one version older
> than the latest gap.
> To play it safe I downloaded the version that matches sage and
> expanded it in a temporary
> directory. I then started sage shell :
> 
>  sage -sh
> 
> and copied the contents of the "pkg" subdirectory from the
> temporary area to the sage
> area (sage/local/gap/latest/pkg/). I built a couple of the
> packages and that worked
> fine. I then exited the sage shell.
> 
> Following the instructions I then called sage and typed :
> 
> gap_reset_workspace() 
> 
> I got a "WARNING : this should never happen" and it seems that
> sage got stuck somewhere.
> Also calling the gap on its own shows that the package
> installation didn't work.
> 
> I think this shouldn't be too hard to fix, but I'm out of ideas.
> 
> Thanks for your help.


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


[sage-support] Re: Sage always crashes

2016-09-07 Thread leif
Harald Schilly wrote:
> so, this might work, but how to update it later on? would a git pull
> with your edits properly overwrite the files served on the master
> mirror? Most of them are also autogenerated, at least partially, so
> that's another aspect to think about, too.

Isn't it sufficient to just have all *scripts* and templates on GitHub,
rather than the generated content (and the actual files themselves that
get mirrored)?


-leif


> On Wed, Sep 7, 2016 at 4:47 PM, Dima Pasechnik <dimp...@gmail.com> wrote:
>> I'd try the following:
>>
>> * get a copy of the website locally
>>
>> * make all the symlinks relative (is it OK?)
>>
>> * check in all the non-binaries and symlinks
>>
>> Are there any symlinks to binaries?
>>
>>
>> On Wed, Sep 7, 2016 at 3:32 PM, Harald Schilly <harald.schi...@gmail.com> 
>> wrote:
>>> Hi, I started https://github.com/sagemath/files and already added a
>>> bit on the server, but stumbled over general idiocies. So, I don't
>>> want to spend more time on this. E.g. there are symlinks, but git
>>> doesn't like them, and there is something odd going on with an already
>>> existing ssh key vs. github. Maybe with a little bit more nerves I am
>>> able to do this. (unless I really need to bind-mount directories as
>>> root, that might then be impossible for me)
>>>
>>> -- h
>>>
>>>
>>> On Sun, Sep 4, 2016 at 12:28 PM, Dima Pasechnik <dimp...@gmail.com> wrote:
>>>> Well, I already complained to Harald about another README there that  is
>>>> hopelessly old too.
>>>> I'd like to propose putting all these files there on
>>>> github.com/sagemath/mirrorfiles or something like that
>>>> and maintain them there.
>>>>
>>>>
>>>>
>>>> On Saturday, September 3, 2016 at 12:55:36 PM UTC, leif wrote:
>>>>>
>>>>> leif wrote:
>>>>>> John Cremona wrote:
>>>>>>> On 2 September 2016 at 16:36, leif <not.r...@online.de
>>>>>>> <mailto:not.r...@online.de>> wrote:
>>>>>>>
>>>>>>> John Cremona wrote:
>>>>>>> > Since I had never tried downloading and running a binary, I
>>>>>>> thought I
>>>>>>> > would.  For a laptop running ubuntu 14.04 I looked at the UK
>>>>>>> mirror and
>>>>>>> > found no 7.3 binary so I downloaded the 7.2 one (there was 7.3
>>>>>>> for
>>>>>>> > ubuntu 12.04 but not 14.04 or later).
>>>>>>>
>>>>>>> 32-bit?!?  (For Sage 7.3, there are 64-bit binaries for 12.04,
>>>>>>> 14.04, 15.10 and 16.04.)
>>>>>>>
>>>>>>>
>>>>>>> Well yes (uname -m returns i686).  For some reason I did this
>>>>>>> experiment
>>>>>>> on a small and slow Toshiba netbook.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> As reported on sage-release, 32-bit (native) Ubuntu builds
>>>>>>> currently
>>>>>>> don't work for any Ubuntu version > 12.04 because of issues with
>>>>>>> -fstack-protector (which Ubuntu's GCCs by default enable).  Nobody
>>>>>>> has
>>>>>>> yet tracked this further down.  (I planned to revive a 32-bit
>>>>>>> machine
>>>>>>> for debugging/testing, but haven't yet had the time, but there
>>>>>>> doesn't
>>>>>>> seem to be much demand either.)
>>>>>>>
>>>>>>>
>>>>>>> I had not realised this was such a can of worms.  I used to regularly
>>>>>>> build Sage on this machine (slowly, but then I do sleep) and last did
>>>>>>> so
>>>>>>> with 7.0.   I can do so again if there is call for it (and this
>>>>>>> conversation is better suited to sage-devel).
>>>>>>
>>>>>> Well, give for example Sage 7.3 a try.  In case that works for you
>>>>>> (without setting SAGE_INSTALL_GCC=yes), you can create a bdist yourself
>>>>>> (see link below).
>>>>>>
>>>>>> I guess my Pentium4 (though with just 2GB, and USB-2.0-attached external
>>>>>> disk 

[sage-support] Re: Support for digraph6 format?

2016-09-06 Thread leif
Dima Pasechnik wrote:
> On Tuesday, September 6, 2016 at 9:29:33 AM UTC, Jihoon Seo wrote:
> I generated some directed graphs using `geng` and `directg`, the
> utilities included in Nauty <http://pallini.di.uniroma1.it/>.
> 
> ./geng 5 | ./directg
> 
> 
> The generated graphs look like:
> 
> ?
> 
> ??G?
> ???
> ??C?
> ???K?
> ?G?
> ??K?
> ?K?
> ??
> 
> 
> And here is the description of `digraph6` format (from Nauty user's
> guide <http://pallini.di.uniroma1.it/nug26.pdf>)
> --
> 
> Data type:
> simple directed graphs (allowing loops) of order 0 to 68719476735.
> Optional Header:
> >>digraph6<< (without end of line!)
> File name extension:
> .d6
> One graph:
> Suppose G has n vertices. Write the adjacency matrix of G
> as a bit vector x of length n^2, row by row.
> Then the graph is represented as '&' N(n) R(x).
> The character '&' (decimal 38) appears as the first character.
> 
> 
> so & needs to be skipped.
>  
> 
> Example:
> Suppose n=5 and G has edges 0->2, 0->4, 3->1 and 3->4.
> x = 00101 0 0 01001 0
> Then N(n) = 68 and
> R(x) = R(00101 0 0 01001 0) = 73 63 65 79 63.
> So, the graph is 38 68 73 63 65 79 63.
> 
> 
> But when I run this line in Sage:
> 
> G1 = Graph('?')
> 
> 
> try skipping &, and also you are making directed graphs (DiGraph in Sage)

Looks like we missed some format changes when upgrading nauty; the code
in Sage partially dates back to 2007 (with only minor changes around
2014, and early 2015).

If skipping the ampersand is really enough (we still may want to change
*outputting* dig6 strings as well, probably with an optional parameter
for backwards compatibility), the patch is trivial:


--- a/src/sage/graphs/graph_input.py
+++ b/src/sage/graphs/graph_input.py
@@ -138,7 +140,7 @@ def from_dig6(G, dig6_string):
 if n == -1:
 n = len(dig6_string)
 ss = dig6_string[:n]
-n, s = length_and_string_from_graph6(ss)
+n, s = length_and_string_from_graph6(ss[1:] if ss[0]=='&' else ss)
 m = binary_string_from_dig6(s, n)
 expected = n**2
 if len(m) > expected:


-leif

> 
> G1 = DiGraph('D?')
> 
> this seems to work.
>  
> 
> 
> Sage returns error:
> 
> RuntimeError: The string seems corrupt: valid characters are 
> ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
> 
> 
> How can I generate a directed graph object with `digraph6` format
> string, or some other format?
> 
> e.g. directg -T : use a simple text output format (nv ne edges)
> instead of digraph6
> 
> ./geng 5 | ./directg -T
> 
> 5 0
> 5 1 0 4
> 5 2 0 4 4 0
> 5 2 0 4 1 4
> 5 2 0 4 4 1
> 5 2 4 0 4 1
> 5 3 0 4 4 0 1 4
> 5 3 0 4 4 0 4 1
> 5 4 0 4 4 0 1 4 4 1
> 5 3 0 4 1 4 2 4
> 
> 
> e.g. directg -G : like -T but includes group size as third item (if
> less than 10^10)
> The group size does not include exchange of isolated vertices.
> 
> ./geng 5 | ./directg -G
> 5 0 1
> 5 1 1 0 4
> 5 2 2 0 4 4 0
> 5 2 2 0 4 1 4
> 5 2 1 0 4 4 1
> 5 2 2 4 0 4 1
> 5 3 1 0 4 4 0 1 4
> 5 3 1 0 4 4 0 4 1
> 5 4 2 0 4 4 0 1 4 4 1
> 5 3 6 0 4 1 4 2 4


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


[sage-support] Re: Sage always crashes

2016-09-03 Thread leif
leif wrote:
> John Cremona wrote:
>> On 2 September 2016 at 16:36, leif <not.rea...@online.de
>> <mailto:not.rea...@online.de>> wrote:
>>
>> John Cremona wrote:
>> > Since I had never tried downloading and running a binary, I thought I
>> > would.  For a laptop running ubuntu 14.04 I looked at the UK mirror and
>> > found no 7.3 binary so I downloaded the 7.2 one (there was 7.3 for
>> > ubuntu 12.04 but not 14.04 or later).
>>
>> 32-bit?!?  (For Sage 7.3, there are 64-bit binaries for 12.04,
>> 14.04, 15.10 and 16.04.)
>>
>>
>> Well yes (uname -m returns i686).  For some reason I did this experiment
>> on a small and slow Toshiba netbook.
>>  
>>
>>
>> As reported on sage-release, 32-bit (native) Ubuntu builds currently
>> don't work for any Ubuntu version > 12.04 because of issues with
>> -fstack-protector (which Ubuntu's GCCs by default enable).  Nobody has
>> yet tracked this further down.  (I planned to revive a 32-bit machine
>> for debugging/testing, but haven't yet had the time, but there doesn't
>> seem to be much demand either.)
>>
>>
>> I had not realised this was such a can of worms.  I used to regularly
>> build Sage on this machine (slowly, but then I do sleep) and last did so
>> with 7.0.   I can do so again if there is call for it (and this
>> conversation is better suited to sage-devel).
> 
> Well, give for example Sage 7.3 a try.  In case that works for you
> (without setting SAGE_INSTALL_GCC=yes), you can create a bdist yourself
> (see link below).
> 
> I guess my Pentium4 (though with just 2GB, and USB-2.0-attached external
> disk only) would be a bit faster, but I'd have to repair the SFF power
> supply, or rather replace its fan once again; it also at the moment has
> Lucid and Precise only...)
> 
> 
>> > Using the command-line I unpacked
>> > the tarball (tar jxf ...tar.bz2) which created a SageMath directory, so
>> > I cd'd into there and typed ./sage.  As the original poster reported,
>> > this resulted in a lot of "patching..." messages appearing, followed by
>> > the 7.2 banner and a sage: prompt.  Subsequent runs also worked without
>> > the patching stuff.
>> >
>> > This does not help much, though I wonder how many of the posted 
>> binaries
>> > are tested?  And why is it neccessary to patch all those files?
>>
>> Because unfortunately people decided to break "relocating" Sage, which
>> still worked a while ago (modulo very few and minor issues perhaps).
>>
>> So bdists are now made with some separate script / program from Volker,
>> such that they "patch" themselves upon installation / first attempt to
>> run 'sage'.  Loads of (absolute) paths in scripts but also binaries and
>> libraries thereby get (again) hardcoded to the actual installation
>> folder.
>>
>> I thought that would be the reason;  so it's Volker's script which could
>> be made less frightening to the novice user.
> 
> https://github.com/sagemath/binary-pkg
> 
> You can create an issue or a pull request... ;-)

P.S.:  There's a horribly outdated README.txt (with still uppercase
SAGE, and among other flaws, telling one could move the Sage tree
anywhere):  http://files.sagemath.org/linux/32bit/README.txt

I guess the ones in the other bdist subfolders aren't much better.

On the other hand, the web page itself (i.e., index.html) gives recent
info on uncompressing the various(?) formats offered.  There we could
also add some short info on how to proceed after downloading.


More worms escaping the can...  (I'd say Pandora's box though.)


-leif


P.P.S.:  Just noticed in the mentioned description of compression
formats, there's "everything" but what we currently solely offer (namely
.tar.bz2, for whatever reason)... 8-)

Nearly the same for the linux/64bit/ folder, including README.txt (while
there's also some left-over beta rpm, and also an obsolete
sage-x.y.z-sage.math.washington.edu-x86_64-Linux.txt).

CC'ing Harald, as I'm not going to open an issue on GitHub.  Maybe we
should also forward this to sage-devel, but with a more appropriate title.


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


[sage-support] Re: Sage always crashes

2016-09-02 Thread leif
John Cremona wrote:
> Since I had never tried downloading and running a binary, I thought I
> would.  For a laptop running ubuntu 14.04 I looked at the UK mirror and
> found no 7.3 binary so I downloaded the 7.2 one (there was 7.3 for
> ubuntu 12.04 but not 14.04 or later).

32-bit?!?  (For Sage 7.3, there are 64-bit binaries for 12.04,
14.04, 15.10 and 16.04.)

As reported on sage-release, 32-bit (native) Ubuntu builds currently
don't work for any Ubuntu version > 12.04 because of issues with
-fstack-protector (which Ubuntu's GCCs by default enable).  Nobody has
yet tracked this further down.  (I planned to revive a 32-bit machine
for debugging/testing, but haven't yet had the time, but there doesn't
seem to be much demand either.)


> Using the command-line I unpacked
> the tarball (tar jxf ...tar.bz2) which created a SageMath directory, so
> I cd'd into there and typed ./sage.  As the original poster reported,
> this resulted in a lot of "patching..." messages appearing, followed by
> the 7.2 banner and a sage: prompt.  Subsequent runs also worked without
> the patching stuff.
> 
> This does not help much, though I wonder how many of the posted binaries
> are tested?  And why is it neccessary to patch all those files?

Because unfortunately people decided to break "relocating" Sage, which
still worked a while ago (modulo very few and minor issues perhaps).

So bdists are now made with some separate script / program from Volker,
such that they "patch" themselves upon installation / first attempt to
run 'sage'.  Loads of (absolute) paths in scripts but also binaries and
libraries thereby get (again) hardcoded to the actual installation folder.


-leif

> If it
> really is necessary (and it might well be) then it would be more
> user-friendly for the function which is causing all that patching to be
> done to display a more user-friendly message, something like "I see that
> this is the first time you are running this copy of SageMath.  Please
> wait while some one-time configuration is carried out" with the
> actual pacthing messages going to /dev/null or a log file.
> 
> John


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


[sage-support] Re: Sage always crashes

2016-09-01 Thread leif
Pierre-Yves Bienvenu wrote:
> Hi, I'm trying to use Sage 7.3 on Ubuntu. I've downloaded the archive,
> used archive manager to extract it and got a directory SageMath. Inside
> I double click the  sage executable. The terminal opens and after a lot
> of lines starting with "patching" it says "SageMath version 7.3, release
> date..." etc but immediately after "Ooops sage crashed". No way to find
> the allegedly created report so I don't know exactly what's wrong. Any
> help would be greatly appreciated (I'm an ignorant I must say).


They (by default) end up in a subfolder of the "hidden" Sage directory
(".sage/") in your home folder, i.e., in

$HOME/.sage/crash_logs/

or

$HOME/.sage/ipython*/

(There may be a couple of IPython folders, for different IPython
versions, but for Sage 7.3 it should be "ipython-4.2.1/"; probably
there's also "ipython_genutils-0.1.0/".)


But to be honest, I have no idea whether that's also immediately true
for the binary distributions during installation.  Just look for
".sage/" in your home folder; you may have to enable "show hidden files"
or something like that when using the GUI.


-leif


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


[sage-support] Re: Sage Crash Report

2016-08-31 Thread leif
Harald Andres Helfgott wrote:
>  'platform': 'Linux-3.19.0-66-generic-x86_64-with-debian-jessie-sid',
> ...
> ImportError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version 
> `GLIBCXX_3.4.21' not found (required by 
> /home/helfgott/Desktop/SageMath/local/lib/libntl.so.25)

Smells like you downloaded the wrong Sage binary, in other words, your
distro is too old for the one you had chosen.

The version tag 3.4.21 is from GCC 5.x, your GCC is presumably 4.8 or
4.9 (from Debian 7 or 8, respectively, I think).


HTH,

-leif


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


[sage-support] Re: huge virtual memory size when launching 7.3

2016-08-30 Thread leif
leif wrote:
> William Stein wrote:
>> On Tue, Aug 30, 2016 at 9:56 AM, Thierry Dumont
>> <tdum...@math.univ-lyon1.fr> wrote:
>>> I have two computers, and sage installed on both:
>>>
>>> 1) Ubuntu 12.04 , sage-7.3 on an nfs mount,y
>>>
>>> 2) Ubuntu 16.04,  sage-7.3 on a local system, on a ssd.
>>>
>>> With the first one, sage starts slowly (as could be expected!), and I
>>> have time to look at sage starting with "top". And during the starting
>>> phase, before the prompt, sage uses more than 16 GB of virtual memory
>>> (VIRT: 16.380g); the same quantity is used when stopping sage (in the
>>> console interface).
>>> It seems quite large, no ?
>>>
>>> With the second machine, it's more difficult to see what happens with
>>> top, but it does not seems to use more than 7gb.
>>>
>>> Why such a large amount of memory ? (ok, it's  virtual, but it's large,
>>> no ?).
> 
> IMHO horrible (as *each* Sage subprocess is claiming that amount of
> memory, here usually ~28 to 50+ GB IIRC, as it depends on the physical
> memory installed) and dangerous, as this makes the usage of 'ulimit -v'
> nearly impossible and in practice requires to allow vm-overcommit.  With
> the latter, it's presumably quite easy to effectively crash many (if not
> most) machines, be it by just some bug in Sage, but also by a malicious
> user of course.  (I.e., at least the VM a Sage server / installation may
> run in.)
> 
> It also makes it more complicated to see how much memory a Sage process
> actually *uses*.
> 
> 
>> I think this is a hack that is used by PARI/GP, due to their
>> "interesting" primitive (but fast!) memory design.
> 
> And GAP / libgap.  In this recent case I guess the latter is (once
> again) to blame.

Nope, GAP / libgap by default "only" contribute about 10% to the (at
least!) 48 GB claimed by *every* Sage process here, while indeed the
PARI library in Sage takes /one fourth/ of

sage.misc.memory_info.MemoryInfo().virtual_memory_limit()

which is *total* (not free!) physical RAM + total (not free) swap space,
in bytes.

That's IMHO a regression, but dates back quite a couple of (beta)
releases AFAIK.  (The last *commit* regarding that is from January this
year, don't know when it got merged.)


-leif

P.S.:  The change regarding the PARI library was made in #19883;
according to the ticket's /milestone/ (which doesn't say much) it
presumably got merged into Sage 7.1.


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


[sage-support] Re: huge virtual memory size when launching 7.3

2016-08-30 Thread leif
William Stein wrote:
> On Tue, Aug 30, 2016 at 9:56 AM, Thierry Dumont
> <tdum...@math.univ-lyon1.fr> wrote:
>> I have two computers, and sage installed on both:
>>
>> 1) Ubuntu 12.04 , sage-7.3 on an nfs mount,y
>>
>> 2) Ubuntu 16.04,  sage-7.3 on a local system, on a ssd.
>>
>> With the first one, sage starts slowly (as could be expected!), and I
>> have time to look at sage starting with "top". And during the starting
>> phase, before the prompt, sage uses more than 16 GB of virtual memory
>> (VIRT: 16.380g); the same quantity is used when stopping sage (in the
>> console interface).
>> It seems quite large, no ?
>>
>> With the second machine, it's more difficult to see what happens with
>> top, but it does not seems to use more than 7gb.
>>
>> Why such a large amount of memory ? (ok, it's  virtual, but it's large,
>> no ?).

IMHO horrible (as *each* Sage subprocess is claiming that amount of
memory, here usually ~28 to 50+ GB IIRC, as it depends on the physical
memory installed) and dangerous, as this makes the usage of 'ulimit -v'
nearly impossible and in practice requires to allow vm-overcommit.  With
the latter, it's presumably quite easy to effectively crash many (if not
most) machines, be it by just some bug in Sage, but also by a malicious
user of course.  (I.e., at least the VM a Sage server / installation may
run in.)

It also makes it more complicated to see how much memory a Sage process
actually *uses*.


> I think this is a hack that is used by PARI/GP, due to their
> "interesting" primitive (but fast!) memory design.

And GAP / libgap.  In this recent case I guess the latter is (once
again) to blame.


I was quite surprised apparently nobody complained, but perhaps not many
at all noticed.


-leif


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


[sage-support] Re: Problem compiling 7.3 from source

2016-08-25 Thread leif
Luis Finotti wrote:
> On Wednesday, August 24, 2016 at 5:41:37 PM UTC-4, leif wrote:
> 
> Luis Finotti wrote:
> > I can't compile 7.3 using Debian Unstable.
> 
> Do you intentionally (try to) build Sage's GCC?  (I have to admit I
> haven't tried to build 4.9.3 with 6.x, but building older GCCs with
> newer versions of it in my experience is likely to fail.)
> 
> If not, take a look at config.log, which should tell you /why/ Sage
> attempts to build and use its own GCC.
> 
> Presumably your system lacks g++ and/or gfortran; if you install these
> from your distro, Sage won't have to build them.
> 
> 
> -leif
> 
> 
> I wasn't trying to compile gcc.  Indeed I was missing gfortran, which is
> funny since I've built sage many times in this machine.

Well, a "version mismatch" (e.g. gcc-6.1 but gfortran-5.4) would also
cause Sage to install its GCC package, so probably gfortran hadn't been
upgraded.


FWIW, setting SAGE_INSTALL_GCC=no (before running 'configure') prevents
from Sage building its own GCC; in your case 'configure' would then have
exited with an error (if gfortran wasn't installed at all), or a warning
(upon a "version mismatch").


-leif


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


[sage-support] Re: Using sage for student quizzes

2016-08-25 Thread leif
Andrew wrote:
> Thanks everyone for the replies. I'd have to do this on a local server.
> Ironically, there is a somewhat draconian Australian law that is a
> consequence of the Australian-US trade agreements that probably make it
> illegal for me to keep data on foreign servers, but no doubt my
> university would not like it either. I'll have a look and see if it is
> manageable. The real issue is writing the content from scratch.

Perhaps also ask on sage-education; there doesn't seem to be much
traffic, but one never knows...

(There in addition is a French sage-education list.)


-leif


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


[sage-support] Re: Problem compiling 7.3 from source

2016-08-25 Thread leif
leif wrote:
> Dima Pasechnik wrote:
>> Do we support gcc 6.1.1 now?
> 
> Sure.  (Modulo building Sage's GCC 4.9.3 with it... ;-) )

The only thing we missed in Sage 7.3 is Givaro's testsuite, which
currently only builds when manually passing '-std=c++98' in CXXFLAGS.


-leif


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


[sage-support] Re: Problem compiling 7.3 from source

2016-08-25 Thread leif
Dima Pasechnik wrote:
> Do we support gcc 6.1.1 now?

Sure.  (Modulo building Sage's GCC 4.9.3 with it... ;-) )

(6.2 has just been released, but that's a bugfix release in the 6.x series.)


-leif

> This is what is used during the build.


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


[sage-support] Re: Problem compiling 7.3 from source

2016-08-24 Thread leif
Luis Finotti wrote:
> I can't compile 7.3 using Debian Unstable.

Do you intentionally (try to) build Sage's GCC?  (I have to admit I
haven't tried to build 4.9.3 with 6.x, but building older GCCs with
newer versions of it in my experience is likely to fail.)

If not, take a look at config.log, which should tell you /why/ Sage
attempts to build and use its own GCC.

Presumably your system lacks g++ and/or gfortran; if you install these
from your distro, Sage won't have to build them.


-leif


> Here is some info on the system:
> 
> |
> System:   Host:finottim83 Kernel:4.7.0-1.slh.1-aptosid-amd64 x86_64
> (64bit gcc:6.1.1)
>Desktop:KDE Plasma5.6.5Distro:aptosid
> 2013-01Ἑσπερίδες-kde-full -(201305050307)
> Machine:  System:LENOVO product:10ANS0BH00v:ThinkCentreM83
>Mobo:LENOVO model:SHARKBAY v:SDK0E50510 WIN Bios:LENOVO
> v:FBKTA1AUS date:10/22/2014
> CPU:  Quadcore IntelCorei7-4790(-HT-MCP-)cache:8192KB
>flags:(lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx)bmips:28731
>clock
> speeds:max:4000MHz1:3864MHz2:3600MHz3:3599MHz4:3600MHz5:3601MHz6:3600MHz
>7:3600MHz8:3600MHz
> Graphics: 
> Card:IntelXeonE3-1200v3/4thGenCoreProcessorIntegratedGraphicsControllerbus-ID:00:02.0
>DisplayServer:X.Org1.18.4driver:intel
> Resolution:1920x1200@59.95hz,1280x1024@60.02hz
>GLX Renderer:MesaDRI IntelHaswellDesktopGLX
> Version:3.0Mesa11.2.2DirectRendering:Yes
> Network:  Card:IntelEthernetConnectionI217-LM driver:e1000e v:3.2.6-k
> port:f080 bus-ID:00:19.0
>IF:eth0 state:up speed:100Mbpsduplex:full mac:44:39:c4:8f:0a:41
> Drives:   HDD TotalSize:2012.4GB(22.4%used)ID-1:model:WDC_WD5000AAKX
>ID-2:model:Crucial_CT512M55ID-3:model:ATAPI
> Info: Processes:322Uptime:7days Memory:7600.0/31977.4MBInit:systemd
> runlevel:5Gccsys:6.1.1
>Client:Shell(bash 4.3.461)inxi:2.3.0
> 
> |
> 
> Here are the last lines of the compilation:
> 
> |
> [gcc-4.9.3.p1]Infile included from../../src/gcc/cp/except.c:1013:0:
> [gcc-4.9.3.p1]cfns.gperf:Infunction'const char* libc_name_p(const char*,
> unsigned int)':
> [gcc-4.9.3.p1]cfns.gperf:101:1:error:'const char* libc_name_p(const
> char*, unsigned int)'redeclared inlinewith'gnu_inline'att
> ribute
> [gcc-4.9.3.p1]cfns.gperf:26:14:note:'const char* libc_name_p(const
> char*, unsigned int)'previously declared here
> [gcc-4.9.3.p1]cfns.gperf:Atglobalscope:
> [gcc-4.9.3.p1]cfns.gperf:26:14:warning:inlinefunction'const char*
> libc_name_p(const char*, unsigned int)'used but never define
> d
> [gcc-4.9.3.p1]Makefile:1058:recipe fortarget 'cp/except.o'failed
> [gcc-4.9.3.p1]make[6]:***[cp/except.o]Error1
> [gcc-4.9.3.p1]make[6]:***Waitingforunfinished jobs
> [gcc-4.9.3.p1]rm gcc.pod
> [gcc-4.9.3.p1]make[6]:Leavingdirectory
> '/usr/local/sage-7.3/local/var/tmp/sage/build/gcc-4.9.3.p1/gcc-build/gcc'
> [gcc-4.9.3.p1]Makefile:4222:recipe fortarget 'all-stage1-gcc'failed
> [gcc-4.9.3.p1]make[5]:***[all-stage1-gcc]Error2
> [gcc-4.9.3.p1]make[5]:Leavingdirectory
> '/usr/local/sage-7.3/local/var/tmp/sage/build/gcc-4.9.3.p1/gcc-build'
> [gcc-4.9.3.p1]Makefile:18866:recipe fortarget 'stage1-bubble'failed
> [gcc-4.9.3.p1]make[4]:***[stage1-bubble]Error2
> [gcc-4.9.3.p1]make[4]:Leavingdirectory
> '/usr/local/sage-7.3/local/var/tmp/sage/build/gcc-4.9.3.p1/gcc-build'
> [gcc-4.9.3.p1]Makefile:889:recipe fortarget 'all'failed
> [gcc-4.9.3.p1]make[3]:***[all]Error2
> [gcc-4.9.3.p1]make[3]:Leavingdirectory
> '/usr/local/sage-7.3/local/var/tmp/sage/build/gcc-4.9.3.p1/gcc-build'
> [gcc-4.9.3.p1]
> [gcc-4.9.3.p1]real 1m15.222s 
> [gcc-4.9.3.p1]user 3m58.571s 
> [gcc-4.9.3.p1]sys  0m20.283s 
> [gcc-4.9.3.p1]
> [gcc-4.9.3.p1]Errorinstalling packagegcc-4.9.3.p1
> [gcc-4.9.3.p1]
> [gcc-4.9.3.p1]Pleaseemail sage-devel
> (http://groups.google.com/group/sage-devel)
> [gcc-4.9.3.p1]explaining the problem andincluding the relevant part of
> the log file
> [gcc-4.9.3.p1]  /usr/local/sage-7.3/logs/pkgs/gcc-4.9.3.p1.log
> [gcc-4.9.3.p1]Describeyour computer,operating system,etc.
> [gcc-4.9.3.p1]Ifyou want to tryto fix the problem yourself,*don't* just
> cd to
> [gcc-4.9.3.p1] /usr/local/sage-7.3/local/var/tmp/sage/build/gcc-4.9.3.p1
> and type 'make' or whatever is appropriate.
> [gcc-4.9.3.p1] Instead, the following commands setup all environment
> variables
> [gcc-4.9.3.p1] correctly and load a subshell for you to debug the error:
> [gcc-4.9.3.p1]   (cd
> '/usr/local/sage-7.3/local/var/tmp/sage/build/gcc-4.9.3.p1' &&
> '/usr/local/sage-7.3/sage' --sh)
> [gcc-4.9.3.p1] When

[sage-support] Re: The server of Sage 7.3 for Mac OS 10.11.6 (the app version) will not start!

2016-08-24 Thread leif
ahauskne...@umassd.edu wrote:
> The server of Sage 7.3 for Mac OS 10.11.6  (the app version) will not
> start! 

Smells like some system python3 is called instead of Sage's python2
(hence the SyntaxError).

There are at least two similar issues on ask.sagemath.org, one of them
[1] suggesting to manually change your PATH environment variable before
calling 'sage'.  (On the other hand, I can hardly imagine such an old
bug would still exist...)

The other one [2] suggests that your OS (or probably that of the
buildbot creating the binary distribution) is not up-to-date.  This
*may* include your version of Xcode, but I don't really know.


-leif


[1] http://ask.sagemath.org/question/8531/install-problem-app-on-mac-os-x/

[2] http://ask.sagemath.org/question/34548/sage-on-macbookair/


> Here is the  error report from the Terminal:
> 
> 
> 
> Last login: Wed Aug 24 12:07:55 on console
> DT-319195-MTH:~ amarzullo$
> '/Applications/SageMath-7.3.app/Contents/Resources/sage/sage'
> --notebook=sagenb Fatal Python error: Py_Initialize: unable to load the
> file system codec
> 
> File
> "/Applications/SageMath-7.3.app/Contents/Resources/sage/local/lib/python/encodings/__init__.py",
> line 123 raise CodecRegistryError,\
> 
> ^ SyntaxError: invalid syntax
> 
> Current thread 0x7fff7a084000 (most recent call first):
> /Applications/SageMath-7.3.app/Contents/Resources/sage/sage: line 130:
> 1300 Abort trap: 6 Traceback (most recent call last):
> 
> "$SAGE_ROOT/relocate-once.py"
> 
> File
> "/Applications/SageMath-7.3.app/Contents/Resources/sage/src/bin/sage-notebook",
> line 7, in  import argparse
> 
> File
> "/Applications/SageMath-7.3.app/Contents/Resources/sage/local/lib/python/argparse.py",
> line 85, in  import collections as _collections
> 
> File
> "/Applications/SageMath-7.3.app/Contents/Resources/sage/local/lib/python/collections.py",
> line 9, in  from operator import itemgetter as _itemgetter, eq
> as _eq
> 
> ImportError:
> dlopen(/Applications/SageMath-7.3.app/Contents/Resources/sage/local/lib/python2.7/lib-dynload/operator.so,
> 2): Symbol not found: __PyUnicodeUCS4 _AsDefaultEncodedString
> 
> Referenced from:
> /Applications/SageMath-7.3.app/Contents/Resources/sage/local/lib/python2.7/lib-dynload/operator.so
> 
> 
> Expected in: flat namespace
> in
> /Applications/SageMath-7.3.app/Contents/Resources/sage/local/lib/python2.7/lib-dynload/operator.so
> 
> 
> DT-319195-MTH:~ amarzullo$
> .app/Contents/Resources/sage/local/lib/python2.7/lib-dynload/operator.so
> -bash:
> .app/Contents/Resources/sage/local/lib/python2.7/lib-dynload/operator.so: No
> such file or directory
> 
> 
> 
> Note: I had to download the app DMG  version of Sage 7.3 several times
> before it would copy without giving error messages about the file being
> corrupted!
> 
> 
> I am using a Mid 2012 iMac i5, 20 GB of ram with Mac OS 10.11.6.
> 
> Any ideas?
> 
> Regards,
> 
> Adam Hausknecht


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


[sage-support] Re: Using sage for student quizzes

2016-08-24 Thread leif
Dima Pasechnik wrote:
> Hi Simon,
> the question is delicate; I know that in UK there is a number of universities 
> using SMC for teaching purposes.
> As well as in some other countries (William can give details on this, I 
> suppose); as well, some MOOCs probably use SMC. And, finally, Andrew, the 
> original poster, is in Sydney, Australia.
> 
> IMHO your university is unclear in its position; first of all, one has to 
> define what "personal information" means.

Two lawyers, (at least) three opinions.  Especially in such cases.

I guess they -- understandably -- also want to avoid any chance of
getting sued, but I'd personally agree with them here (putting
restrictions on any kind of data which *might* look like personal records).


> They might be right in saying that an official exam, and its records, cannot 
> be held on 
> overseas computer systems.

Again guessing, but I bet their statement includes "cloud" services in
general, a fuzzy (marketing) term at least meanwhile implying
anti-transparency (w.r.t. where data is transferred to, stored, and
processed), and vulnerability.


> How about GCE servers located in EU?
> Is it legal? This way data does not leave the EU (probably, I don't know for 
> sure).

Again a grey area, as AFAIK in the past the U.S. government at least
tried to force U.S. (parent) companies to hand out data physically
located elsewhere, such that they tend to get into the dilemma of
violating either U.S. or European (or other national) law, not to
mention alleged practice of some agencies.


> In UK surely students can be asked to do coursework (we do not have any 
> official continuous assessments, so I guess quizzes would be just fine, too) 
> on SMC, nobody will blink at it.

For less critical data (such as ordinary exercises), it would IMHO be
sufficient / safe enough to let the students sign an agreement (or some
privacy declaration), provided they still have the option to e.g. submit
their work / results by other means [without getting discriminated in
some way in case they do].

But it's probably already too difficult to in legal sense correctly
formulate such documents -- especially when it comes to "cloud"
services... ;-)

(How proper "anonymization" would perhaps in addition have to happen is
just another controversial aspect I'd say.)


-leif

> On the other hand, I cannot copy their academic records and other things like 
> their home addresses, anywhere outside the University, and even so only under 
> a number of conditions. 
> 
> Dima


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


[sage-support] Re: Using sage for student quizzes

2016-08-24 Thread leif
Simon King wrote:
> Hi Dima,
> 
> On 2016-08-24, Dima Pasechnik <dimp...@gmail.com> wrote:
>> On Wednesday, August 24, 2016 at 3:50:32 AM UTC+1, Andrew wrote:
>>>
>>> Does anyone have experience in using sage for on-line quizzes that count 
>>> towards student assessment. Of course, in addition to writing the code and 
>>> the content. there are various security issues that need to be taken care 
>>> of to do this. ...
>>  
>> SMC (i.e. cloud.sagemath.com) does have a lot of functionality for 
>> supporting courses.
>> With just a free SMC account its functionality  might be a bit too limited 
>> (e.g. it might not be fast enough for large classes) - but you can 
>> certainly try it, and have a functioning course setup. 
> 
> Is that an option, if security concerns are relevant? My university
> wouldn't allow to store the student's personal information on servers in
> the USA.

OT, but if I'm not mistaken, that's actually current law in the EU.
(Which doesn't imply everybody cares...)


-leif


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


[sage-support] Re: Problem with git and trac server

2016-08-21 Thread leif
'Paul Mercat' via sage-support wrote:
> Hi !
> Yesterday or the day before, the trac server was not accessible (or
> really really slow).

Yesterday Dima installed updates and afterwards rebooted
trac.sagemath.org (aka git.sagemath.org).


> And when I tried to save my work on the sage code source,
> using the command "git push trac HEAD:u/mercatp/b-adic",
> it failed. And after that, git tells me that everything is up-to-date,
> but in fact the two commits that I tried to push when the trac server
> was not responsive doesn't appear to be on the trac server.
> How can I correct this problem ?

See the following thread on sage-devel:

http://permalink.gmane.org/gmane.comp.mathematics.sage.devel/88529


So I think you can simply retry pushing your changes.


-leif


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


[sage-support] Re: Sage crash report

2016-08-15 Thread leif
Volker Braun wrote:
> Missing dependency on gsl on arch?

Don't think so, as libgsl.so must have been there during link of the
extension module.

Either ldconfig has messed up the links, or probably some RUN_PATH issue.

(Or he really took some [incomplete] binary built elsewhere.)


-leif

> 
> ImportError: libgsl.so.19: cannot open shared object file: No such file
> or directory
> 


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


[sage-support] Re: Sage crash report

2016-08-15 Thread leif
Dima Pasechnik wrote:
> it is also ipython 5.0, which, as we know, is problematic.

But -- perhaps surprisingly, the error /here/ is unrelated to IPython.

I guess it's Sage 7.4.beta0 though.


-leif


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


[sage-support] Re: Sage crash report

2016-08-14 Thread leif
 global squarefree_part = undefined
> global symbolic_sum = undefined
> global sum = undefined
> global transpose = undefined
> global zero = undefined
>  88 base_ring,
>  89 base_field,
>  90 basis,
>  91 category,
>  92 charpoly,
>  93 characteristic_polynomial,
>  94 coerce,
>  95 cyclotomic_polynomial,
>  96 decomposition,
>  97 denominator,
>  98 det,
>  99 dimension,
> 100 dim,
> 101 discriminant,
> 102 disc,
> 
> /usr/lib/python2.7/site-packages/sage/misc/functional.py in ()
>  16 #   Copyright (C) 2004 William Stein <wst...@gmail.com>
>  17 #
>  18 # This program is free software: you can redistribute it and/or
> modify
>  19 # it under the terms of the GNU General Public License as
> published by
>  20 # the Free Software Foundation, either version 2 of the License, or
>  21 # (at your option) any later version.
>  22 #  http://www.gnu.org/licenses/
>  23
> #*
>  24 from __future__ import absolute_import
>  25 
>  26 import sage.misc.latex
>  27 import sage.interfaces.expect
>  28 import sage.interfaces.mathematica
>  29 
>  30 
> ---> 31 from sage.rings.complex_double import CDF
> global sage.rings.complex_double = undefined
> global CDF = undefined
>  32 from sage.rings.real_double import RDF, RealDoubleElement
>  33 
>  34 import sage.rings.real_mpfr
>  35 import sage.rings.complex_field
>  36 import sage.rings.integer
>  37 
>  38 from six.moves import builtins
>  39 
>  40 LOG_TEN_TWO_PLUS_EPSILON = 3.321928094887363 # a small
> overestimate of log(10,2)
>  41 
>  42
> ##
>  43 # There are many functions on elements of a ring, which
> mathematicians
>  44 # usually write f(x), e.g., it is weird to write x.log() and natural
>  45 # to write log(x).  The functions below allow for the more
> familiar syntax.
>  46
> ##
> 
> ImportError: libgsl.so.19: cannot open shared object file: No such file
> or directory
> 
> ***

Well, that's Arch Linux, don't know what they do to Sage.

So where is it located?

Normally, it's in $SAGE_LOCAL/lib/, and a symlink to libgsl.so.19.0.0
(in the same folder).


-leif


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


[sage-support] Re: Lambda functions vs. defining functions

2016-08-11 Thread leif
William Stein wrote:
> On Wednesday, August 10, 2016, Todd Zimmerman
> <todd.zimmerman@gmail.com <mailto:todd.zimmerman@gmail.com>> wrote:
> 
> I assumed that SageMath converts the functions into symbolic
> expressions.
> If I enter the following it will work:
> 
> 
> f=lambda x: x*sin(x)
> diff(f(x),x)
> 
> 
> f is a python function 
> 
> f(x) is a symbolic expression - the result of calling f with input x.

And that only works "out of the box" because x (in the global
environment) is already (pre-)defined to be a symbolic variable, hence
from Python's point of view has a value assigned such that f(x) can be
evaluated before calling diff().

I.e.,

diff(g(y),y)

won't work unless you also define y to be a symbolic variable (no matter
what formal parameter name you use in the Python function g).


-leif


> def g(x):
> return x*sin(x)
> 
> diff(g(x),x)
> 
> On Wednesday, August 10, 2016 at 4:01:09 PM UTC-5, Harald Schilly wrote:
> 
> On Wed, Aug 10, 2016 at 10:46 PM, Todd Zimmerman
> <todd.zimm...@gmail.com> wrote:
> >  You can integrate and differentiate both types of functions
> in SageMath as
> > well as use them for solving differential equations.
> 
> So, can you copy/paste us an example? It does work, if that small
> python-function is evaluated and returns a symbolic expression.
> That
> will work, I don't doubt that, but the python-function in itself is
> then no longer part of this. Key for understanding this is, that
> nested functions are evaluated from the inside out and there is no
> direct concept of lazyness in Python. In some situations, it might
> look like that, so I fully understand that this is confusing.
> 
> -- h


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


[sage-support] Re: Installing the optional python3 package seems to break Sage

2016-08-11 Thread leif
Jori Mäntysalo wrote:
> On Wed, 10 Aug 2016, William Stein wrote:
> 
>> I was really surprised when I started Sage that people would often try
>> to **install all optional packages**, then report anything that went
>> wrong.I bet people still try to do this...

Well, it's good if people test they're still working, and not rottening.

The dependencies of (also optional) "new-style" packages at least are
handled automatically now.  (And cleaning up / converting old-style
packages is just happening once again.)


> Isn't it supposed to work... And on the servers I would like to have
> good coverage of features. This is not sage-specific: I can guess that
> some users here will use R and some might use Octave, so why not install
> both of them? (Well, nowadays I can just forward them to our Sage-server.)
> 
> Of course I will not install all packages for, say, Ubuntu Linux, but
> Sage has not that many available.

As mentioned on the ticket Dima created, the python3 package should
still have type "experimental" at this point.


-leif


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


[sage-support] Re: Installing the optional python3 package seems to break Sage

2016-08-10 Thread leif
Dima Pasechnik wrote:
> On Wednesday, August 10, 2016 at 10:39:44 AM UTC+1, leif wrote:
> 
> Dima Pasechnik wrote:
> > this is now https://trac.sagemath.org/ticket/21199
> <https://trac.sagemath.org/ticket/21199>
> 
> Is it at all supposed to be used that way?  (I don't think so.  IMHO
> it's an optional package to use *instead* just like GMP vs. MPIR at
> Sage
> *configure* time, not to be installed afterwards.)
> 
> 
> I cannot see how this can be an optional package this way; in this way
> it would require all the tests passing!
> (i.e. full python3 support for  Sage :-))

And that's the reason we don't have a 'configure' option
'--with-python=...' yet (just the env var SAGE_PYTHON3 which is looked
at when configuring Sage). ;-)

But we don't have a package type 'alternative' either (which would make
sense for Python2/Python3, MPIR/GMP), just 'standard' and 'optional' in
this case.  Hence these packages are explicitly treated specifically in
the build system ('configure' and Makefiles); in fact, the choice made
at *configure* time gets hardcoded into the generated Makefile.


-leif

> Still, as is it's presumably confusing and dangerous.
> 
> 
> -leif


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


[sage-support] Re: Installing the optional python3 package seems to break Sage

2016-08-10 Thread leif
Dima Pasechnik wrote:
> this is now https://trac.sagemath.org/ticket/21199

Is it at all supposed to be used that way?  (I don't think so.  IMHO
it's an optional package to use *instead* just like GMP vs. MPIR at Sage
*configure* time, not to be installed afterwards.)

Still, as is it's presumably confusing and dangerous.


-leif

> On Wednesday, August 10, 2016 at 9:34:59 AM UTC+1, Dima Pasechnik wrote:
> 
> 
> 
> On Wednesday, August 10, 2016 at 9:22:46 AM UTC+1, Dima Pasechnik wrote:
> 
> 
> 
> On Wednesday, August 10, 2016 at 9:13:14 AM UTC+1, The Geeko wrote:
> 
> I just encountered this problem sage -i py3 ( to install
> python3)... broke my whole system... Is there a single
> "undo" operation so that I can return to my working copy?
> 
> 
> do you mean 
> 
> sage -i python3 
> 
> 
> this breaks sage, as it makes the symbolic link 'python' to point to
> 'python3' in SAGE_LOCAL/bin.
> To fix, it suffices to make it point to python2 instead:
> 
> cd SAGE_ROOT # where your Sage is installed
> cd local/bin
> ln -sf python2 python
> 
> Then everything works as before
> (and you may also use python3 script from 'sage -sh')
> 
> Perhaps a proper fix would be to leave python symbolic link as it is.
> 
> Dima
> 
> 
> IMHO Sage does not have a package named py3
>  
>  
> 
> 
> On Wednesday, October 21, 2015 at 6:30:31 AM UTC-5, Emmanuel
> Charpentier wrote:
> 
> This is probably related to Trac#18521
> <http://trac.sagemath.org/ticket/18521>, but on Linux
> (Debian testing) : Installing the optional python3
> package breaks my Sage installation. After installing
> it, I get :
> 
> charpent@SAP5057241:~$ sage
> /usr/local/sage/src/bin/sage-env : ligne 423 :  3485
> Abandon "$SAGE_ROOT/local/bin/python" -c
> 'import pkg_resources;
> pkg_resources.get_distribution("matplotlib").version' 2>
> /dev/null
> 
> ┌┐
> │ SageMath Version 6.9, Release Date:
> 2015-10-10 │
> │ Type "notebook()" for the browser-based notebook
> interface.│
> │ Type "help()" for
> help.│
> 
> └┘
> Fatal Python error: Py_Initialize: Unable to get the
> locale encoding
>   File
> "/usr/local/sage/local/lib/python/encodings/__init__.py", line
> 123
> raise CodecRegistryError,\
> ^
> SyntaxError: invalid syntax
> /usr/local/sage/src/bin/sage : ligne 388 :  3493
> Abandon sage-location
> 
> After this, my Sage installation is broken real good : I
> can't even make...
> 
> Shouldn't we displace python3 in "experimental" packages ?
> 
> HTH,
> 
> --
> Emmanuel Charpentier


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


[sage-support] Re: Installation problems under Mac OS X El Capitan v10.11.6

2016-08-09 Thread leif
Dima Pasechnik wrote:
> well, 7.3 has been just released. Hopefully the binary builds will be
> available shortly, and for the right version, i.e. for  OSX 10.11.6.

>From sage-release:

> Volker Braun wrote:
>> binaries are now on the way to the mirrors...
>> 
>> On Thursday, August 4, 2016 at 9:22:33 PM UTC+2, Volker Braun wrote:
>> 
>> The "master" git branch has been updated to Sage-7.3. As always, you
>> can get the latest beta version from the "develop" git branch.
>> Alternatively, the self-contained source tarball is at
>> http://www.sagemath.org/download-latest.html
>> <http://www.sagemath.org/download-latest.html>
>> 
>> There was no change compared to 7.3.rc0
>> 
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "sage-release" group.
>> To unsubscribe from this group and stop receiving emails from it, send
>> an email to sage-release+unsubscr...@googlegroups.com
>> <mailto:sage-release+unsubscr...@googlegroups.com>.
>> To post to this group, send email to sage-rele...@googlegroups.com
>> <mailto:sage-rele...@googlegroups.com>.
>> Visit this group at https://groups.google.com/group/sage-release.
>> For more options, visit https://groups.google.com/d/optout.


-leif


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


[sage-support] Re: "Could not import extension sage_autodoc"

2016-08-09 Thread leif
Joseph Hundley wrote:
> sage --docbuild  html
> produces many errors that look like this 
> 
> *[tensor   ]**Extension error:*
> 
> *[tensor   ]* Could not import extension sage_autodoc (exception: cannot
> import name sage_formatargspec)
> 
> Build finished.  The built documents can be found in
> SAGEROOT/local/share/doc/sage/html/en/reference/tensor
> 
> (the only thing I see varying from one to the next is what is the
> instances of "tensor" in this example. 
> No actual documentation is built. That is
> SAGEROOT/local/share/doc/sage/html/en/reference/tensor is empty.
> 
> Any idea what's going on?

You've presumably downgraded your Sage version by checking out some
older, pre-#20545 one.

You have to run 'make' after doing so (or in this case, './sage -b'
might be sufficient, but running 'make' is safer).


-leif



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


[sage-support] Re: Installation problems under Mac OS X El Capitan v10.11.6

2016-08-05 Thread leif
Roger wrote:
> Thanks for the info re the new 7.3 release.  How long does it typically
> take after a new release for binaries to become available?  Before a
> formal release, are beta binaries available for testing, and if so
> where, or how can one volunteer with the developers as a beta tester?  I
> know that's a lot of questions, but thanks in advance for any guidance
> on these points.

We do not build binary distributions of betas or release candidates.
(Well, the buildbots do test builds all the time, but these are neither
"bdists" nor do they get published, just the reports.)

But you can obtain the sources of all beta/rc/final releases and build
yourself from source:

http://www.sagemath.org/download-latest.html

(The sources for 7.3 *final* will appear on [1] soon.)

On MacOS X, you'd need Xcode and/or the Command Line Tools [2], in
general the latest version available for your OS version.

(The binaries we publish can be produced from such a build, with some
restrictions on build options, but that's a further step.)


See [3] for instructions on how to build from source.


-leif


[1] http://www.sagemath.org/download-source.html

[2]
http://doc.sagemath.org/html/en/installation/source.html#mac-os-x-prerequisite-installation

[3] http://doc.sagemath.org/html/en/installation/source.html

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


[sage-support] Re: Seaborn in sage

2016-07-27 Thread leif
Laurent Decreusefond wrote:
> Thanks to your remarks, I realized that I had an old beta-version of
> Xcode (7.1) which was in conflict with the actual version (7.3.1). I
> relaunched the install with the correct version of Xcode and everything
> went smoothly. Thanks for your answers.

Oh, interesting.  (I thought you were running MacOS X 10.9.)

Which version actually is it?  Yosemite (10.10) or already El Capitan
(10.11)?


-leif

> Le mercredi 27 juillet 2016 20:46:40 UTC+2, Laurent Decreusefond a écrit :
> 
> I will try this one since I'm already working on a fresh, compiled
> from source, version of Sage.
> 
> 
> 
> Le mercredi 27 juillet 2016 19:45:55 UTC+2, leif a écrit :
> 
> Dima Pasechnik wrote:
> > errors like you get:
> >
> >
> >
> 
> /var/folders/md/71gv03bs6mx4qxg933r_k_x4gn/T//ccSLsnmg.s:984:suffix
> or operands invalid for `movq'
> >
> >
> > indicate that your Sage's compiler toolchain is broken in some
> way,
> > probably incompatible with your hardware.
> > A way to fix this would be to build Sage from source.
> 
> Nope, it's Apple's dead old version of the GNU assembler.
> 
> (Newer Xcode versions by default use the one from LLVM, but require
> newer versions of MacOS X as well.)
> 
> If one passes '-q' to the assembler, clang's/LLVM's will get used
> instead, so you could try adding '-Wa,-q' to CFLAGS and CXXFLAGS in
> order to let GCC pass '-q' to the assembler, by doing for example
> 
> $ env CFLAGS="-Wa,-q" CXXFLAGS="-Wa,-q" ./sage -i 
> 
> 
> Another way is to create a wrapper script $SAGE_LOCAL/bin/as
> which calls
> the assembler with '-q' added to the options; see the following
> trac
> tickets for more details:
> 
> https://trac.sagemath.org/ticket/20779
> <https://trac.sagemath.org/ticket/20779>
> 
> https://trac.sagemath.org/ticket/20563
> <https://trac.sagemath.org/ticket/20563>  (same issue, i.e. with
> movq)
> 
> (Both a bit stalled at the moment, but give more info on the
> general
> problem with Xcode versions < 7.0.)
> 
> 
> -leif


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


[sage-support] Re: Seaborn in sage

2016-07-27 Thread leif
Laurent Decreusefond wrote:
> I will try this one since I'm already working on a fresh, compiled from
> source, version of Sage.

If you have Sage's GCC built on *your* system, the issue with movq will
disappear (since GCC checks exactly that feature of the assembler at its
*build* time).

But you /may/ run into similar problems ("No such instruction: ...")
when for example building NTL, since Apple's old GAS doesn't support
AVX, BMI etc.  Then you can try what I suggested, or see #20779 (and
#21064 especially for NTL).


-leif


> Le mercredi 27 juillet 2016 19:45:55 UTC+2, leif a écrit :
> 
> Dima Pasechnik wrote:
> > errors like you get:
> >
> >
> >
> /var/folders/md/71gv03bs6mx4qxg933r_k_x4gn/T//ccSLsnmg.s:984:suffix
> or operands invalid for `movq'
> >
> >
> > indicate that your Sage's compiler toolchain is broken in some way,
> > probably incompatible with your hardware.
> > A way to fix this would be to build Sage from source.
> 
> Nope, it's Apple's dead old version of the GNU assembler.
> 
> (Newer Xcode versions by default use the one from LLVM, but require
> newer versions of MacOS X as well.)
> 
> If one passes '-q' to the assembler, clang's/LLVM's will get used
> instead, so you could try adding '-Wa,-q' to CFLAGS and CXXFLAGS in
> order to let GCC pass '-q' to the assembler, by doing for example
> 
> $ env CFLAGS="-Wa,-q" CXXFLAGS="-Wa,-q" ./sage -i 
> 
> 
> Another way is to create a wrapper script $SAGE_LOCAL/bin/as which
> calls
> the assembler with '-q' added to the options; see the following trac
> tickets for more details:
> 
> https://trac.sagemath.org/ticket/20779
> <https://trac.sagemath.org/ticket/20779>
> 
> https://trac.sagemath.org/ticket/20563
> <https://trac.sagemath.org/ticket/20563>  (same issue, i.e. with movq)
> 
> (Both a bit stalled at the moment, but give more info on the general
> problem with Xcode versions < 7.0.)
> 
> 
> -leif
> 
> > On Wednesday, July 27, 2016 at 8:57:37 AM UTC+1, Laurent
> Decreusefond wrote:
> >
> > Thanks. I tried to do it in the command line on a fresh
> install of
> > Sage 7.2 and I got this error message (the full log is
> attached) :
> >
> > [snip]
> >
> > In file included from
> >
> 
> /Users/Laurent/Downloads/sage-7.2/local/lib/python2.7/site-packages/numpy-1.11.0-py2.7-macosx-10.9-x86_64.egg/numpy/core/include/numpy/ndarraytypes.h:1777:0,
> 
> >
> >  from
> >
> 
> /Users/Laurent/Downloads/sage-7.2/local/lib/python2.7/site-packages/numpy-1.11.0-py2.7-macosx-10.9-x86_64.egg/numpy/core/include/numpy/ndarrayobject.h:18,
> 
> >
> >  from
> >
> 
> /Users/Laurent/Downloads/sage-7.2/local/lib/python2.7/site-packages/numpy-1.11.0-py2.7-macosx-10.9-x86_64.egg/numpy/core/include/numpy/arrayobject.h:4,
> 
> >
> >  from pandas/src/datetime/np_datetime.c:18:
> >
> >
> >
> 
> /Users/Laurent/Downloads/sage-7.2/local/lib/python2.7/site-packages/numpy-1.11.0-py2.7-macosx-10.9-x86_64.egg/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2:
> 
> > warning: #warning "Using deprecated NumPy API, disable it by "
> > "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
> >
> >  #warning "Using deprecated NumPy API, disable it by " \
> >
> >   ^
> >
> >
> >
> /var/folders/md/71gv03bs6mx4qxg933r_k_x4gn/T//ccSLsnmg.s:984:suffix
> > or operands invalid for `movq'
> >
> >
> >
> /var/folders/md/71gv03bs6mx4qxg933r_k_x4gn/T//ccSLsnmg.s:2605:suffix
> 
> > or operands invalid for `movq'
> >
> >
> >
> /var/folders/md/71gv03bs6mx4qxg933r_k_x4gn/T//ccSLsnmg.s:4735:suffix
> 
> > or operands invalid for `movq'
> >
> > error: command 'gcc' failed with exit status 1
> >
> >
> > Le dimanche 24 juillet 2016 19:31:06 UTC+2, Andrey Novoseltsev
> a écrit :
> >
> > While it is not included, you can install it yourself via pip
> > (SageMathCell does it):
> >
> > sage -pip install seaborn
> >
> 

[sage-support] Re: Seaborn in sage

2016-07-27 Thread leif
Nathan Dunfield wrote:
> On Wednesday, July 27, 2016 at 3:30:47 AM UTC-5, Dima Pasechnik wrote:
> 
> errors like you get:
> 
> 
> /var/folders/md/71gv03bs6mx4qxg933r_k_x4gn/T//ccSLsnmg.s:984:suffix 
> or operands invalid for `movq'
> 
> 
> indicate that your Sage's compiler toolchain is broken in some way,
> probably incompatible with your hardware.
> A way to fix this would be to build Sage from source.
> 
> 
> I believe this issue is likely the same as:
> 
> https://trac.sagemath.org/ticket/20563
> 
> As Dima says, building all of Sage from source will fix this.

Ok, I didn't get he was using a binary distribution of Sage.

Building from source (or perhaps just reinstalling the GCC package by
typing 'make gcc') should work /in this case/, but doing so only fixes
the problem with movd vs. movq.

(The suggestion in my other reply should still work as well, I think.)


> A quicker solution might be to make sure you installed the version of Sage
> from 
> 
> http://mirrors.mit.edu/sage/osx/intel/index.html
> 
> whose label matches your version of OS X.

Yep, there meanwhile is one specifically for MacOS X 10.9.


-leif


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


[sage-support] Re: Seaborn in sage

2016-07-27 Thread leif
Dima Pasechnik wrote:
> errors like you get:
> 
> 
> /var/folders/md/71gv03bs6mx4qxg933r_k_x4gn/T//ccSLsnmg.s:984:suffix or 
> operands invalid for `movq'
> 
> 
> indicate that your Sage's compiler toolchain is broken in some way,
> probably incompatible with your hardware.
> A way to fix this would be to build Sage from source.

Nope, it's Apple's dead old version of the GNU assembler.

(Newer Xcode versions by default use the one from LLVM, but require
newer versions of MacOS X as well.)

If one passes '-q' to the assembler, clang's/LLVM's will get used
instead, so you could try adding '-Wa,-q' to CFLAGS and CXXFLAGS in
order to let GCC pass '-q' to the assembler, by doing for example

$ env CFLAGS="-Wa,-q" CXXFLAGS="-Wa,-q" ./sage -i 


Another way is to create a wrapper script $SAGE_LOCAL/bin/as which calls
the assembler with '-q' added to the options; see the following trac
tickets for more details:

https://trac.sagemath.org/ticket/20779

https://trac.sagemath.org/ticket/20563  (same issue, i.e. with movq)

(Both a bit stalled at the moment, but give more info on the general
problem with Xcode versions < 7.0.)


-leif

> On Wednesday, July 27, 2016 at 8:57:37 AM UTC+1, Laurent Decreusefond wrote:
> 
> Thanks. I tried to do it in the command line on a fresh install of
> Sage 7.2 and I got this error message (the full log is attached) :
> 
> [snip]
> 
> In file included from
> 
> /Users/Laurent/Downloads/sage-7.2/local/lib/python2.7/site-packages/numpy-1.11.0-py2.7-macosx-10.9-x86_64.egg/numpy/core/include/numpy/ndarraytypes.h:1777:0,
> 
>  from
> 
> /Users/Laurent/Downloads/sage-7.2/local/lib/python2.7/site-packages/numpy-1.11.0-py2.7-macosx-10.9-x86_64.egg/numpy/core/include/numpy/ndarrayobject.h:18,
> 
>  from
> 
> /Users/Laurent/Downloads/sage-7.2/local/lib/python2.7/site-packages/numpy-1.11.0-py2.7-macosx-10.9-x86_64.egg/numpy/core/include/numpy/arrayobject.h:4,
> 
>  from pandas/src/datetime/np_datetime.c:18:
> 
>
> 
> /Users/Laurent/Downloads/sage-7.2/local/lib/python2.7/site-packages/numpy-1.11.0-py2.7-macosx-10.9-x86_64.egg/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2:
> warning: #warning "Using deprecated NumPy API, disable it by "
> "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
> 
>  #warning "Using deprecated NumPy API, disable it by " \
> 
>   ^
> 
>
> /var/folders/md/71gv03bs6mx4qxg933r_k_x4gn/T//ccSLsnmg.s:984:suffix
> or operands invalid for `movq'
> 
>
> /var/folders/md/71gv03bs6mx4qxg933r_k_x4gn/T//ccSLsnmg.s:2605:suffix
> or operands invalid for `movq'
> 
>
> /var/folders/md/71gv03bs6mx4qxg933r_k_x4gn/T//ccSLsnmg.s:4735:suffix
> or operands invalid for `movq'
> 
> error: command 'gcc' failed with exit status 1
> 
> 
> Le dimanche 24 juillet 2016 19:31:06 UTC+2, Andrey Novoseltsev a écrit :
> 
> While it is not included, you can install it yourself via pip
> (SageMathCell does it):
> 
> sage -pip install seaborn
> 
> 
> On Saturday, 23 July 2016 13:17:26 UTC-6, Laurent Decreusefond
> wrote:
> 
> I recently discovered Seaborn, which is a visualization
> library on top
> of matplotlib. It doesn't seem to be included in sage 7.2.
> Is there any
> projet to do so ? or is there something equivalent ?
> 
> Best,


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


[sage-support] Re: trac mails are back on

2016-07-03 Thread leif
leif wrote:
> Huh, we do no longer get notifications when a ticket gets closed?!
> 
> (I mean for the post on the ticket closing it, not other posts afterwards.)

Hmmm, after trying to "change" my preferences (notifications explicitly
to the allegedly default ones), I'm getting the following:

---
Oops…
Trac detected an internal error:

ProgrammingError: operator does not exist: integer = boolean
LINE 2: WHERE sid='leif' AND authenticated=true
  ^
HINT:  No operator matches the given name and argument type(s). You
might need to add explicit type casts.

This is probably a local installation issue.
---


-leif


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


[sage-support] Re: trac mails are back on

2016-07-03 Thread leif
Dima Pasechnik wrote:
> Trac emails should work now (going via sendgrid.net). Please shout if
> something is not working.

Huh, we do no longer get notifications when a ticket gets closed?!

(I mean for the post on the ticket closing it, not other posts afterwards.)


-leif


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


[sage-support] Re: trac mails are back on

2016-06-22 Thread leif
Dima Pasechnik wrote:
> Trac emails should work now 

Yes, thanks.

> (going via sendgrid.net). 

Why that?  I'm getting ugly HTML mails with obfuscated links (and of
course phishing attempt alerts).

> Please shout if
> something is not working.

I won't click on them... B)


-leif

> 
> Cheers,
> Dima



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


[sage-support] Re: Fwd: help regarding sage instalation

2014-06-20 Thread leif

leif wrote:

William Stein wrote:

-- Forwarded message --
From: Pramod Shukla pkshu...@to.infn.it mailto:pkshu...@to.infn.it
Date: Jun 19, 2014 7:25 AM
Subject: help regarding sage instalation

While installing sage in my computer I came across some problem which
unfortunately I an unable to fix. I would be very thankful if you could
kindly assist me in this regard. The problem mentioned in the technical
error message at the end of the running of make is exactly same what I
found you wrote quite back in the blog
http://osdir.com/ml/sage-devel/2014-05/msg00126.html.

To mention it again, towards the end it reads as
[...]
OSError: [Errno 12] Cannot allocate memory


Which part of this error message is unclear?

Errno 12 = ENOMEM aka Out of memory.

You'd have to close some other applications, install more RAM, or setup
[more] swap space.  (Or try building the documentation with less
threads, in case you were using more than one.)


[Solved off-list; using 'env SAGE_NUM_THREADS=1 make' was sufficient.]


-leif

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: Segmentation fault in singular multi-polynomial factor() function

2014-06-19 Thread leif

Dominique Laurain wrote:

I usually factor small polynomials...but this time I got a
Segmentation fault for a bigger one...is it ok to get that error (no
control of enough memory or processor task force to get the result) ?

Maybe I want t much :-) ... over the quota.?

Dominique

Project-id:   6429970e-5a78-4aee-a6b1-af1e80542481

Location:f71dab5b-f40c-48db-a3d2-eefe6ec55f01
hostname : compute2dc2


Run in SAGE python cell:

# Segmentation fault in singular factorization
u,v,w = var('u,v,w')
f(u,v,w) = 16*u^4*v^6*w^2 + 144*u^4*v^5*w^3 + 80*u^3*v^6*w^3 +
416*u^4*v^4*w^4 + 560*u^3*v^5*w^4 + 96*u^2*v^6*w^4 + 560*u^4*v^3*w^5 +
1296*u^3*v^4*w^5 + 368*u^2*v^5*w^5 + 16*u*v^6*w^5 + 384*u^4*v^2*w^6 +
1328*u^3*v^3*w^6 + 528*u^2*v^4*w^6 + 48*u*v^5*w^6 + 128*u^4*v*w^7 +
608*u^3*v^2*w^7 + 336*u^2*v^3*w^7 + 48*u*v^4*w^7 + 16*u^4*w^8 +
96*u^3*v*w^8 + 80*u^2*v^2*w^8 + 16*u*v^3*w^8 - 112*u^4*v^5*w^2 -
64*u^3*v^6*w^2 - 752*u^4*v^4*w^3 - 960*u^3*v^5*w^3 - 176*u^2*v^6*w^3 -
1648*u^4*v^3*w^4 - 3744*u^3*v^4*w^4 - 1344*u^2*v^5*w^4 - 64*u*v^6*w^4 -
1600*u^4*v^2*w^5 - 5744*u^3*v^3*w^5 - 3104*u^2*v^4*w^5 - 304*u*v^5*w^5 -
704*u^4*v*w^6 - 3840*u^3*v^2*w^6 - 3056*u^2*v^3*w^6 - 480*u*v^4*w^6 -
112*u^4*w^7 - 1008*u^3*v*w^7 - 1296*u^2*v^2*w^7 - 304*u*v^3*w^7 -
64*u^3*w^8 - 176*u^2*v*w^8 - 64*u*v^2*w^8 + 312*u^4*v^4*w^2 +
400*u^3*v^5*w^2 + 76*u^2*v^6*w^2 + 1540*u^4*v^3*w^3 + 3436*u^3*v^4*w^3 +
1360*u^2*v^5*w^3 + 72*u*v^6*w^3 + 2412*u^4*v^2*w^4 + 8788*u^3*v^3*w^4 +
5572*u^2*v^4*w^4 + 616*u*v^5*w^4 + 1500*u^4*v*w^5 + 8836*u^3*v^2*w^5 +
8524*u^2*v^3*w^5 + 1540*u*v^4*w^5 + 316*u^4*w^6 + 3484*u^3*v*w^6 +
5512*u^2*v^2*w^6 + 1548*u*v^3*w^6 + 400*u^3*w^7 + 1348*u^2*v*w^7 +
628*u*v^2*w^7 + 72*u^2*w^8 + 76*u*v*w^8 - 448*u^4*v^3*w^2 -
1004*u^3*v^4*w^2 - 420*u^2*v^5*w^2 - 24*u*v^6*w^2 - 1548*u^4*v^2*w^3 -
5672*u^3*v^3*w^3 - 3920*u^2*v^4*w^3 - 476*u*v^5*w^3 - 1544*u^4*v*w^4 -
9500*u^3*v^2*w^4 - 10280*u^2*v^3*w^4 - 2076*u*v^4*w^4 - 460*u^4*w^5 -
5696*u^3*v*w^5 - 10244*u^2*v^2*w^5 - 3280*u*v^3*w^5 - 1008*u^3*w^6 -
3884*u^2*v*w^6 - 2108*u*v^2*w^6 - 404*u^2*w^7 - 492*u*v*w^7 - 24*u*w^8 +
352*u^4*v^2*w^2 + 1304*u^3*v^3*w^2 + 952*u^2*v^4*w^2 + 124*u*v^5*w^2 +
764*u^4*v*w^3 + 4824*u^3*v^2*w^3 + 5604*u^2*v^3*w^3 + 1228*u*v^4*w^3 +
364*u^4*w^4 + 4836*u^3*v*w^4 + 9468*u^2*v^2*w^4 + 3332*u*v^3*w^4 +
1316*u^3*w^5 + 5568*u^2*v*w^5 + 3356*u*v^2*w^5 + 928*u^2*w^6 +
1252*u*v*w^6 + 124*u*w^7 - 144*u^4*v*w^2 - 928*u^3*v^2*w^2 -
1132*u^2*v^3*w^2 - 264*u*v^4*w^2 - 148*u^4*w^3 - 2056*u^3*v*w^3 -
4264*u^2*v^2*w^3 - 1608*u*v^3*w^3 - 940*u^3*w^4 - 4252*u^2*v*w^4 -
2764*u*v^2*w^4 - 1116*u^2*w^5 - 1624*u*v*w^5 - 264*u*w^6 + 24*u^4*w^2 +
344*u^3*v*w^2 + 744*u^2*v^2*w^2 + 296*u*v^3*w^2 + 348*u^3*w^3 +
1652*u^2*v*w^3 + 1136*u*v^2*w^3 + 740*u^2*w^4 + 1140*u*v*w^4 + 296*u*w^5
- 52*u^3*w^2 - 256*u^2*v*w^2 - 184*u*v^2*w^2 - 256*u^2*w^3 - 412*u*v*w^3
- 184*u*w^4 + 36*u^2*w^2 + 60*u*v*w^2 + 60*u*w^3 - 8*u*w^2
print Factor f : ,f.factor()



This is now fixed in Sage 6.3.beta4, released today.


-leif

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: tutoriatutorial() tries to start wine under gnome-3.12

2014-06-19 Thread leif

Dima Pasechnik wrote:

On 2014-06-19, juer...@gmail.com juer...@gmail.com wrote:



On Wednesday, June 18, 2014 5:51:02 PM UTC+2, jue...@gmail.com wrote:


Hi,

if I enter tutorial() at the sage prompt a short time a wine window is
opened and only warnings or errors are shown in the terminal window:

sage: help()
Welcome to Sage 6.2!

To view the Sagsage: help()
Welcome to Sage 6.2!

To view the Sage tutorial in your web browser, type tutorial(), and
...

sage: tutorial()
sage: fixme:iphlpapi:NotifyAddrChange (Handle 0xd9e2c8, overlapped
0xd9e2e0): stub
fixme:iphlpapi:NotifyAddrChange (Handle 0xdbe880, overlapped 0xdbe88c):
stub
wine: configuration in '/home/rose/.wine' has been updated.
fixme:exec:SHELL_execute flags ignored: 0x0100
fixme:exec:SHELL_execute flags ignored: 0x0100




After removing /home/rose/.sage the start of wine disappeard. But I still
get endless:

fixme:exec:SHELL_execute flags ignored: 0x0100


Even if I kill sage, the terminal continues to show this message.
I get it under xfce4-4.11.0 and gnome-3.12.  Under gnome this issue seems
to lock after some time the whole desktop. Several existing terminal
windows
do no more respond and it is impossible to start new application with the
application menu.


tutorial() merely opens up the default browser, and a local copy of
the tutorial HTML docs in it.

By the way, what is your default browser?

I never saw this reported as causing problems.

Could you try doing notebook() rather than tutorial() ?
(notebook() will also pop up your default browser, and then open Sage
notebooks in it).


By the way, you can set Sage's default browser by exporting 
SAGE_BROWSER=... in the shell before running 'sage'...



-leif

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: Fwd: help regarding sage instalation

2014-06-19 Thread leif

William Stein wrote:

-- Forwarded message --
From: Pramod Shukla pkshu...@to.infn.it mailto:pkshu...@to.infn.it
Date: Jun 19, 2014 7:25 AM
Subject: help regarding sage instalation

While installing sage in my computer I came across some problem which
unfortunately I an unable to fix. I would be very thankful if you could
kindly assist me in this regard. The problem mentioned in the technical
error message at the end of the running of make is exactly same what I
found you wrote quite back in the blog
http://osdir.com/ml/sage-devel/2014-05/msg00126.html.

To mention it again, towards the end it reads as
[...]
OSError: [Errno 12] Cannot allocate memory


Which part of this error message is unclear?

Errno 12 = ENOMEM aka Out of memory.

You'd have to close some other applications, install more RAM, or setup 
[more] swap space.  (Or try building the documentation with less 
threads, in case you were using more than one.)



-leif

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: Error Building sage-6.2: Error installing package mpir-2.6.0.p4

2014-06-17 Thread leif

Yun Peng Lin wrote:

I'm trying to build Sage 6.2 (latest version from
http://www.sagemath.org/) from the source distribution.

After running make, it built for an hour before failing when trying to
build
package: mpir-2.6.0.p4.

A section of the mpir-2.6.0.p4 log file containing the error is below.
I'm trying to make sage in redhat version 5.7 Tikanga. The system is
64Bit, CPU is an Intel Xeon processor.
Any help would be greatly appreciated. Many thanks!


Hmmm, could you perhaps upload the full MPIR build log 
(logs/pkgs/mpir-2.6.0.p4.log) somewhere?



-leif

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: Options for the Sage expand function

2014-06-14 Thread leif

jeanbigbo...@gmail.com wrote:

Excuse the top-posting, the google groups UI is not as convenient for
excerpting as emacs and a good Usenet server...


A couple of Sage groups (including this) are available on/through 
gmane.org as well (gmane.comp.mathematics.sage.*).



-leif

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: Sage not finding Gambit's command line tools

2014-06-11 Thread leif

James Campbell wrote:

Hi,

I'm trying to get Gambit http://gambit.sourceforge.net/ working as an
external package.
I followed through the steps about packaging third party
http://www.sagemath.org/doc/developer/packaging.html code and I'm now
at the stage where running ``import gambit`` within sage does not raise
any errors.
I have access to to the majority of the functionality within gambit,
however, Gambit has some function which rely on a corresponding command
line tool http://gambit.sourceforge.net/gambit13/pyapi.html.
I can see that these have appeared in 'SAGE_ROOT/local/bin` but when I
try to use them within sage I get the error `'module' object has no
attribute 'nash'` for example.

Is there something I've forgotten to do?


Well, hard to tell without looking at your package.

Is it available somewhere?  Trac ticket?


-leif

P.S.:  This seems to be more suited to discuss on sage-devel.

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: How to inspect the existence and install a python package in the cloud

2014-06-11 Thread leif

Hansen Chen wrote:

I have found the answers to questions 2) and 3) in cloud.sagemath FAQ
https://github.com/sagemath/cloud/wiki/FAQ#own-ipython regarding
downloading from PyPi. Sorry for not checking FAQ more thoroughly before
posting. I am new to SAGE. Question 1) still remains as to how to check
whether a certain package is already in cloud.sagemath.


sage: is_package_installed(foo)
False

Note that (e.g.) optional_packages() (from the Sage prompt) is currently 
broken, but you can use 'sage --optional' in the shell.


But probably you're not that interested in /Sage/ packages, but plain 
Python packages.


In that case, you could use pkg_resources, e.g.

import pkg_resources

pkg_resources.get_distribution(foo) # may raise DistributionNotFound

pkg_resources.get_distribution(foo).version

or simply try to 'import foo'... ;-)


-leif



On Wednesday, June 11, 2014 12:41:52 PM UTC-4, Hansen Chen wrote:

I would like to do the following.

1) Inspect the python packages that are already in the cloud.sagemath.

2) Install new python packages that are not in cloud.sagemath.

4) I tried in the command terminal the following python command to
install a package called gensim.
$ easy_install -U gensim
and
$ pip install --upgrade gensim
such as what is shown in http://radimrehurek.com/gensim/install.html
http://radimrehurek.com/gensim/install.html.
It seems I do not have the permission to do this. I then tried
$ sudo easy_install -U gensim
I then typed in my cloud.sagemath password. It does not acknowledge
it. I suppose the super user is the website administration not me.

What should I do to install a new package in the cloud? Is the only
option to install it locally on my own machine and add search path
to the local package?


--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: Segmentation fault in singular multi-polynomial factor() function

2014-06-09 Thread leif

leif wrote:

Volker Braun wrote:

Reported at http://www.singular.uni-kl.de:8002/trac/ticket/621


Fix committed upstream:

https://github.com/Singular/Sources/commit/28f4fe9464722511718050dfab7cd61d29898968


If somebody^TM opens a ticket (or has already done so), please cc me or
post the ticket # here.

I'll otherwise probably do so, and check whether the patch applies clean
to our version (and is sufficient for it).


/Of course/^TM the patch from the pull request isn't sufficient (as it 
isn't based on Singular 3.1.6); working on a larger patch right now... 
[i.e., currently testing it]



-leif

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: Segmentation fault in singular multi-polynomial factor() function

2014-06-09 Thread leif

leif wrote:

leif wrote:

If somebody^TM opens a ticket (or has already done so), please cc me or
post the ticket # here.

I'll otherwise probably do so, and check whether the patch applies clean
to our version (and is sufficient for it).


/Of course/^TM the patch from the pull request isn't sufficient (as it
isn't based on Singular 3.1.6); working on a larger patch right now...
[i.e., currently testing it]



http://trac.sagemath.org/ticket/16462

Needs review.


-leif

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: Sage posts PowmInsecureWarning: Not using mpz_powm_sec. when launched

2014-06-08 Thread leif

Volker Braun wrote:

Neat, but the flask openid shouldn't and doesn't implement SSL using
pycrytpo. Looking at the source, what triggers the warning is

from Crypto.Util.number import long_to_bytes, bytes_to_long

which is used by flask-openid to serialize data to disk.


Still, should we somehow silence the warning (probably by patching our 
pycrypto package further)?


The easiest solution is of course to simply report this upstream... ;-)

(MPIR 2.7.0.alpha4 still lacks mpz_powm_sec().)


-leif


On Sunday, June 8, 2014 11:21:20 AM UTC+1, Martin Albrecht wrote:

On Saturday 07 Jun 2014 13:34:18 Volker Braun wrote:
  Afaik its only used in the openid module. And exploiting a timing
attack
  over network is most likely not possible.

they are practical at least over LAN:
https://crypto.stanford.edu/~dabo/papers/ssl-timing.pdf
https://crypto.stanford.edu/~dabo/papers/ssl-timing.pdf

  On Saturday, June 7, 2014 8:40:54 PM UTC+1, em2slyn wrote:
   Hi All:
  
   I am hosting a Sage server for our department and ever since
upgrading to
   6.X the following message displays every time Sage is launched.
  
   Executing twistd  --pidfile=sage_notebook.sagenb/sagenb.pid -ny
   sage_notebook.sagenb/twistedconf.tac
  
/home/sageserver/sage-6.2/local/lib/python2.7/site-packages/Crypto/Util/nu

   mber.py:57: PowmInsecureWarning: Not using mpz_powm_sec.  You
should
   rebuild using libgmp = 5 to avoid timing attack vulnerability.
  
 _warn(Not using mpz_powm_sec.  You should rebuild using
libgmp = 5 to
  
   avoid timing attack vulnerability., PowmInsecureWarning)
   .
   .
   .
  
   I've been tracking this down and noticed there are a number of
posts on
   the web related to this warning although not specifically
addressing Sage.
   Unfortunately, some sites have provided various workarounds but
I cannot
   seem to find a resolution.
  
   I am currently hosting Sage 6.2 on Ubuntu Server 12.04 and
tried an
   experimental build using Ubuntu 14.04. Initially, I installed
GMP 6.0.0a
   from gmplib.org http://gmplib.org and rebuilding Python using
the command *sage -f python*
   along with *SAGE_UPDATING=yes make*. The warning persisted.
Then I did a
   complete build from source adding libgmp-dev to the standard
pool of
   prerequisite packages. Still no luck.
  
   First of all, is this a problem with Sage or the OS I've
selected to use?
   Is there a package that is missing that should be included in
the build?
   Any input would be welcome. Thank you!
  
   Have a GREAT DAY!!
  
   Shaun

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



--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: Sage posts PowmInsecureWarning: Not using mpz_powm_sec. when launched

2014-06-08 Thread leif

Volker Braun wrote:

IMHO we should just change flask-openid to not import these utility
functions from pycrypto. I would have patched it myself if there were an
easy way, but its a tarball inside the sagenb tarball...


Hmmm, so this should get fixed upstream sagenb?

While one could simply copy-paste those two functions and use them from 
elsewhere (patching Flask-OpenID), it's unclear to me why pycrypto 
issues the warning when importing /that/ module; the functions there 
seem pretty unrelated, so patching pycrypto (and/or reporting it 
upstream there) could still be an option.


(MPIR is not going to implement special functions safe w.r.t. 
side-channel attacks.)



-leif


On Sunday, June 8, 2014 5:16:47 PM UTC+1, leif wrote:

Volker Braun wrote:
  Neat, but the flask openid shouldn't and doesn't implement SSL using
  pycrytpo. Looking at the source, what triggers the warning is
 
  from Crypto.Util.number import long_to_bytes, bytes_to_long
 
  which is used by flask-openid to serialize data to disk.

Still, should we somehow silence the warning (probably by patching our
pycrypto package further)?

The easiest solution is of course to simply report this upstream... ;-)

(MPIR 2.7.0.alpha4 still lacks mpz_powm_sec().)


--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: Segmentation fault in singular multi-polynomial factor() function

2014-06-06 Thread leif

Volker Braun wrote:

Reported at http://www.singular.uni-kl.de:8002/trac/ticket/621


Fix committed upstream:

https://github.com/Singular/Sources/commit/28f4fe9464722511718050dfab7cd61d29898968

If somebody^TM opens a ticket (or has already done so), please cc me or 
post the ticket # here.


I'll otherwise probably do so, and check whether the patch applies clean 
to our version (and is sufficient for it).



-leif

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: Segmentation fault in singular multi-polynomial factor() function

2014-06-05 Thread leif

leif wrote:

leif wrote:

Dominique Laurain wrote:

I usually factor small polynomials...but this time I got a
Segmentation fault for a bigger one...is it ok to get that error (no
control of enough memory or processor task force to get the result) ?

Maybe I want t much :-) ... over the quota.?


Certainly not a (out of) memory error; I can reproduce it with Sage
6.3.beta2, FWIW.

The answer is instantaneous with Sage 5.7 and 5.8: :-)

Factor f :  4*(v + w - 1)^3*(4*u^3*v^3 + 24*u^3*v^2*w + 20*u^3*v*w^2 +
4*u^3*w^3 + 20*u^2*v^3*w + 80*u^2*v^2*w^2 + 24*u^2*v*w^3 + 24*u*v^3*w^2
+ 20*u*v^2*w^3 + 4*v^3*w^3 - 16*u^3*v^2 - 44*u^3*v*w - 16*u^3*w^2 -
16*u^2*v^3 - 132*u^2*v^2*w - 132*u^2*v*w^2 - 16*u^2*w^3 - 44*u*v^3*w -
132*u*v^2*w^2 - 44*u*v*w^3 - 16*v^3*w^2 - 16*v^2*w^3 + 18*u^3*v +
19*u^3*w + 52*u^2*v^2 + 151*u^2*v*w + 52*u^2*w^2 + 19*u*v^3 +
151*u*v^2*w + 151*u*v*w^2 + 18*u*w^3 + 18*v^3*w + 52*v^2*w^2 + 19*v*w^3
- 6*u^3 - 47*u^2*v - 48*u^2*w - 48*u*v^2 - 137*u*v*w - 47*u*w^2 + 13*u^2
- 6*v^3 - 47*v^2*w - 48*v*w^2 + 37*u*w + 13*v^2 - 6*w^3 + 37*u*v +
37*v*w + 13*w^2 - 9*u - 9*v - 9*w + 2)*u*w^2


P.S.:  Works with Sage 6.1.1 as well:

Factor f :  4*(4*u^3*v^3 + 24*u^3*v^2*w + 20*u^2*v^3*w + 20*u^3*v*w^2 +
80*u^2*v^2*w^2 + 24*u*v^3*w^2 + 4*u^3*w^3 + 24*u^2*v*w^3 + 20*u*v^2*w^3
+ 4*v^3*w^3 - 16*u^3*v^2 - 16*u^2*v^3 - 44*u^3*v*w - 132*u^2*v^2*w -
44*u*v^3*w - 16*u^3*w^2 - 132*u^2*v*w^2 - 132*u*v^2*w^2 - 16*v^3*w^2 -
16*u^2*w^3 - 44*u*v*w^3 - 16*v^2*w^3 + 18*u^3*v + 52*u^2*v^2 + 19*u*v^3
+ 19*u^3*w + 151*u^2*v*w + 151*u*v^2*w + 18*v^3*w + 52*u^2*w^2 +
151*u*v*w^2 + 52*v^2*w^2 + 18*u*w^3 + 19*v*w^3 - 6*u^3 - 47*u^2*v -
48*u*v^2 - 6*v^3 - 48*u^2*w - 137*u*v*w - 47*v^2*w - 47*u*w^2 - 48*v*w^2
- 6*w^3 + 13*u^2 + 37*u*v + 13*v^2 + 37*u*w + 37*v*w + 13*w^2 - 9*u -
9*v - 9*w + 2)*u*(v + w - 1)^3*w^2


FWIW, Singular has been upgraded from 3.1.5 (in Sage 6.1.1) to 3.1.6 
(6.2 and later), so this might be an upstream regression.


The .factor() function in the Sage library hasn't changed at all AFAICS, 
but other changes in Sage may have borked it as well, although the 
function which apparently causes the segfault, p_Copy(), is a Singular 
function.


The Sage-Singular experts should investigate...


-leif

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: Segmentation fault in singular multi-polynomial factor() function

2014-06-05 Thread leif

Dominique Laurain wrote:

Thanks leif for your help..
Since some weeks, I have a strange (final destination) feeling falling
too much into deep software traps at office or at home...


Work-around:  Works in Sage 6.2 if you define f (i.e., u, v and w) the 
right way:


sage: R.u,v,w=QQ[]
sage: f = 16*u^4*v^6*w^2 + 144*u^4*v^5*w^3 + 80*u^3*v^6*w^3 + 
416*u^4*v^4*w^4 + 560*u^3*v^5*w^4 + 96*u^2*v^6*w^4 + 560*u^4*v^3*w^5 + 
1296*u^3*v^4*w^5 + 368*u^2*v^5*w^5 + 16*u*v^6*w^5 + 384*u^4*v^2*w^6 + 
1328*u^3*v^3*w^6 + 528*u^2*v^4*w^6 + 48*u*v^5*w^6 + 128*u^4*v*w^7 + 
608*u^3*v^2*w^7 + 336*u^2*v^3*w^7 + 48*u*v^4*w^7 + 16*u^4*w^8 + 
96*u^3*v*w^8 + 80*u^2*v^2*w^8 + 16*u*v^3*w^8 - 112*u^4*v^5*w^2 - 
64*u^3*v^6*w^2 - 752*u^4*v^4*w^3 - 960*u^3*v^5*w^3 - 176*u^2*v^6*w^3 - 
1648*u^4*v^3*w^4 - 3744*u^3*v^4*w^4 - 1344*u^2*v^5*w^4 - 64*u*v^6*w^4 - 
1600*u^4*v^2*w^5 - 5744*u^3*v^3*w^5 - 3104*u^2*v^4*w^5 - 304*u*v^5*w^5 - 
704*u^4*v*w^6 - 3840*u^3*v^2*w^6 - 3056*u^2*v^3*w^6 - 480*u*v^4*w^6 - 
112*u^4*w^7 - 1008*u^3*v*w^7 - 1296*u^2*v^2*w^7 - 304*u*v^3*w^7 - 
64*u^3*w^8 - 176*u^2*v*w^8 - 64*u*v^2*w^8 + 312*u^4*v^4*w^2 + 
400*u^3*v^5*w^2 + 76*u^2*v^6*w^2 + 1540*u^4*v^3*w^3 + 3436*u^3*v^4*w^3 + 
1360*u^2*v^5*w^3 + 72*u*v^6*w^3 + 2412*u^4*v^2*w^4 + 8788*u^3*v^3*w^4 + 
5572*u^2*v^4*w^4 + 616*u*v^5*w^4 + 1500*u^4*v*w^5 + 8836*u^3*v^2*w^5 + 
8524*u^2*v^3*w^5 + 1540*u*v^4*w^5 + 316*u^4*w^6 + 3484*u^3*v*w^6 + 
5512*u^2*v^2*w^6 + 1548*u*v^3*w^6 + 400*u^3*w^7 + 1348*u^2*v*w^7 + 
628*u*v^2*w^7 + 72*u^2*w^8 + 76*u*v*w^8 - 448*u^4*v^3*w^2 - 
1004*u^3*v^4*w^2 - 420*u^2*v^5*w^2 - 24*u*v^6*w^2 - 1548*u^4*v^2*w^3 - 
5672*u^3*v^3*w^3 - 3920*u^2*v^4*w^3 - 476*u*v^5*w^3 - 1544*u^4*v*w^4 - 
9500*u^3*v^2*w^4 - 10280*u^2*v^3*w^4 - 2076*u*v^4*w^4 - 460*u^4*w^5 - 
5696*u^3*v*w^5 - 10244*u^2*v^2*w^5 - 3280*u*v^3*w^5 - 1008*u^3*w^6 - 
3884*u^2*v*w^6 - 2108*u*v^2*w^6 - 404*u^2*w^7 - 492*u*v*w^7 - 24*u*w^8 + 
352*u^4*v^2*w^2 + 1304*u^3*v^3*w^2 + 952*u^2*v^4*w^2 + 124*u*v^5*w^2 + 
764*u^4*v*w^3 + 4824*u^3*v^2*w^3 + 5604*u^2*v^3*w^3 + 1228*u*v^4*w^3 + 
364*u^4*w^4 + 4836*u^3*v*w^4 + 9468*u^2*v^2*w^4 + 3332*u*v^3*w^4 + 
1316*u^3*w^5 + 5568*u^2*v*w^5 + 3356*u*v^2*w^5 + 928*u^2*w^6 + 
1252*u*v*w^6 + 124*u*w^7 - 144*u^4*v*w^2 - 928*u^3*v^2*w^2 - 
1132*u^2*v^3*w^2 - 264*u*v^4*w^2 - 148*u^4*w^3 - 2056*u^3*v*w^3 - 
4264*u^2*v^2*w^3 - 1608*u*v^3*w^3 - 940*u^3*w^4 - 4252*u^2*v*w^4 - 
2764*u*v^2*w^4 - 1116*u^2*w^5 - 1624*u*v*w^5 - 264*u*w^6 + 24*u^4*w^2 + 
344*u^3*v*w^2 + 744*u^2*v^2*w^2 + 296*u*v^3*w^2 + 348*u^3*w^3 + 
1652*u^2*v*w^3 + 1136*u*v^2*w^3 + 740*u^2*w^4 + 1140*u*v*w^4 + 296*u*w^5 
- 52*u^3*w^2 - 256*u^2*v*w^2 - 184*u*v^2*w^2 - 256*u^2*w^3 - 412*u*v*w^3 
- 184*u*w^4 + 36*u^2*w^2 + 60*u*v*w^2 + 60*u*w^3 - 8*u*w^2

sage: f.factor()
(4) * u * w^2 * (v + w - 1)^3 * (4*u^3*v^3 + 24*u^3*v^2*w + 20*u^2*v^3*w 
+ 20*u^3*v*w^2 + 80*u^2*v^2*w^2 + 24*u*v^3*w^2 + 4*u^3*w^3 + 
24*u^2*v*w^3 + 20*u*v^2*w^3 + 4*v^3*w^3 - 16*u^3*v^2 - 16*u^2*v^3 - 
44*u^3*v*w - 132*u^2*v^2*w - 44*u*v^3*w - 16*u^3*w^2 - 132*u^2*v*w^2 - 
132*u*v^2*w^2 - 16*v^3*w^2 - 16*u^2*w^3 - 44*u*v*w^3 - 16*v^2*w^3 + 
18*u^3*v + 52*u^2*v^2 + 19*u*v^3 + 19*u^3*w + 151*u^2*v*w + 151*u*v^2*w 
+ 18*v^3*w + 52*u^2*w^2 + 151*u*v*w^2 + 52*v^2*w^2 + 18*u*w^3 + 19*v*w^3 
- 6*u^3 - 47*u^2*v - 48*u*v^2 - 6*v^3 - 48*u^2*w - 137*u*v*w - 47*v^2*w 
- 47*u*w^2 - 48*v*w^2 - 6*w^3 + 13*u^2 + 37*u*v + 13*v^2 + 37*u*w + 
37*v*w + 13*w^2 - 9*u - 9*v - 9*w + 2)



(In your definition, f(u,v,w)=..., f is just a symbolic expression in 
the first place.  It's still of course a bug that your way currently 
does no longer work.)



-leif

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: Segmentation fault in singular multi-polynomial factor() function

2014-06-05 Thread leif

leif wrote:

Dominique Laurain wrote:

Thanks leif for your help..
Since some weeks, I have a strange (final destination) feeling falling
too much into deep software traps at office or at home...


Work-around:  Works in Sage 6.2 if you define f (i.e., u, v and w) the
right way:


Sorry, my bad, forget that...  (I confused the windows and only 
*thought* I was using 6.2).


Not very surprisingly, my version behaves exactly the same in Sage 6.2. 
:-/  (as it just shortcuts f.polynomial(QQ).factor() to f.factor())



-leif


sage: R.u,v,w=QQ[]
sage: f = 16*u^4*v^6*w^2 + 144*u^4*v^5*w^3 + 80*u^3*v^6*w^3 +
416*u^4*v^4*w^4 + 560*u^3*v^5*w^4 + 96*u^2*v^6*w^4 + 560*u^4*v^3*w^5 +
1296*u^3*v^4*w^5 + 368*u^2*v^5*w^5 + 16*u*v^6*w^5 + 384*u^4*v^2*w^6 +
1328*u^3*v^3*w^6 + 528*u^2*v^4*w^6 + 48*u*v^5*w^6 + 128*u^4*v*w^7 +
608*u^3*v^2*w^7 + 336*u^2*v^3*w^7 + 48*u*v^4*w^7 + 16*u^4*w^8 +
96*u^3*v*w^8 + 80*u^2*v^2*w^8 + 16*u*v^3*w^8 - 112*u^4*v^5*w^2 -
64*u^3*v^6*w^2 - 752*u^4*v^4*w^3 - 960*u^3*v^5*w^3 - 176*u^2*v^6*w^3 -
1648*u^4*v^3*w^4 - 3744*u^3*v^4*w^4 - 1344*u^2*v^5*w^4 - 64*u*v^6*w^4 -
1600*u^4*v^2*w^5 - 5744*u^3*v^3*w^5 - 3104*u^2*v^4*w^5 - 304*u*v^5*w^5 -
704*u^4*v*w^6 - 3840*u^3*v^2*w^6 - 3056*u^2*v^3*w^6 - 480*u*v^4*w^6 -
112*u^4*w^7 - 1008*u^3*v*w^7 - 1296*u^2*v^2*w^7 - 304*u*v^3*w^7 -
64*u^3*w^8 - 176*u^2*v*w^8 - 64*u*v^2*w^8 + 312*u^4*v^4*w^2 +
400*u^3*v^5*w^2 + 76*u^2*v^6*w^2 + 1540*u^4*v^3*w^3 + 3436*u^3*v^4*w^3 +
1360*u^2*v^5*w^3 + 72*u*v^6*w^3 + 2412*u^4*v^2*w^4 + 8788*u^3*v^3*w^4 +
5572*u^2*v^4*w^4 + 616*u*v^5*w^4 + 1500*u^4*v*w^5 + 8836*u^3*v^2*w^5 +
8524*u^2*v^3*w^5 + 1540*u*v^4*w^5 + 316*u^4*w^6 + 3484*u^3*v*w^6 +
5512*u^2*v^2*w^6 + 1548*u*v^3*w^6 + 400*u^3*w^7 + 1348*u^2*v*w^7 +
628*u*v^2*w^7 + 72*u^2*w^8 + 76*u*v*w^8 - 448*u^4*v^3*w^2 -
1004*u^3*v^4*w^2 - 420*u^2*v^5*w^2 - 24*u*v^6*w^2 - 1548*u^4*v^2*w^3 -
5672*u^3*v^3*w^3 - 3920*u^2*v^4*w^3 - 476*u*v^5*w^3 - 1544*u^4*v*w^4 -
9500*u^3*v^2*w^4 - 10280*u^2*v^3*w^4 - 2076*u*v^4*w^4 - 460*u^4*w^5 -
5696*u^3*v*w^5 - 10244*u^2*v^2*w^5 - 3280*u*v^3*w^5 - 1008*u^3*w^6 -
3884*u^2*v*w^6 - 2108*u*v^2*w^6 - 404*u^2*w^7 - 492*u*v*w^7 - 24*u*w^8 +
352*u^4*v^2*w^2 + 1304*u^3*v^3*w^2 + 952*u^2*v^4*w^2 + 124*u*v^5*w^2 +
764*u^4*v*w^3 + 4824*u^3*v^2*w^3 + 5604*u^2*v^3*w^3 + 1228*u*v^4*w^3 +
364*u^4*w^4 + 4836*u^3*v*w^4 + 9468*u^2*v^2*w^4 + 3332*u*v^3*w^4 +
1316*u^3*w^5 + 5568*u^2*v*w^5 + 3356*u*v^2*w^5 + 928*u^2*w^6 +
1252*u*v*w^6 + 124*u*w^7 - 144*u^4*v*w^2 - 928*u^3*v^2*w^2 -
1132*u^2*v^3*w^2 - 264*u*v^4*w^2 - 148*u^4*w^3 - 2056*u^3*v*w^3 -
4264*u^2*v^2*w^3 - 1608*u*v^3*w^3 - 940*u^3*w^4 - 4252*u^2*v*w^4 -
2764*u*v^2*w^4 - 1116*u^2*w^5 - 1624*u*v*w^5 - 264*u*w^6 + 24*u^4*w^2 +
344*u^3*v*w^2 + 744*u^2*v^2*w^2 + 296*u*v^3*w^2 + 348*u^3*w^3 +
1652*u^2*v*w^3 + 1136*u*v^2*w^3 + 740*u^2*w^4 + 1140*u*v*w^4 + 296*u*w^5
- 52*u^3*w^2 - 256*u^2*v*w^2 - 184*u*v^2*w^2 - 256*u^2*w^3 - 412*u*v*w^3
- 184*u*w^4 + 36*u^2*w^2 + 60*u*v*w^2 + 60*u*w^3 - 8*u*w^2
sage: f.factor()
(4) * u * w^2 * (v + w - 1)^3 * (4*u^3*v^3 + 24*u^3*v^2*w + 20*u^2*v^3*w
+ 20*u^3*v*w^2 + 80*u^2*v^2*w^2 + 24*u*v^3*w^2 + 4*u^3*w^3 +
24*u^2*v*w^3 + 20*u*v^2*w^3 + 4*v^3*w^3 - 16*u^3*v^2 - 16*u^2*v^3 -
44*u^3*v*w - 132*u^2*v^2*w - 44*u*v^3*w - 16*u^3*w^2 - 132*u^2*v*w^2 -
132*u*v^2*w^2 - 16*v^3*w^2 - 16*u^2*w^3 - 44*u*v*w^3 - 16*v^2*w^3 +
18*u^3*v + 52*u^2*v^2 + 19*u*v^3 + 19*u^3*w + 151*u^2*v*w + 151*u*v^2*w
+ 18*v^3*w + 52*u^2*w^2 + 151*u*v*w^2 + 52*v^2*w^2 + 18*u*w^3 + 19*v*w^3
- 6*u^3 - 47*u^2*v - 48*u*v^2 - 6*v^3 - 48*u^2*w - 137*u*v*w - 47*v^2*w
- 47*u*w^2 - 48*v*w^2 - 6*w^3 + 13*u^2 + 37*u*v + 13*v^2 + 37*u*w +
37*v*w + 13*w^2 - 9*u - 9*v - 9*w + 2)


(In your definition, f(u,v,w)=..., f is just a symbolic expression in
the first place.  It's still of course a bug that your way currently
does no longer work.)


-leif


--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: Segmentation fault in singular multi-polynomial factor() function

2014-06-04 Thread leif

leif wrote:

Dominique Laurain wrote:

I usually factor small polynomials...but this time I got a
Segmentation fault for a bigger one...is it ok to get that error (no
control of enough memory or processor task force to get the result) ?

Maybe I want t much :-) ... over the quota.?


Certainly not a (out of) memory error; I can reproduce it with Sage
6.3.beta2, FWIW.

The answer is instantaneous with Sage 5.7 and 5.8: :-)

Factor f :  4*(v + w - 1)^3*(4*u^3*v^3 + 24*u^3*v^2*w + 20*u^3*v*w^2 +
4*u^3*w^3 + 20*u^2*v^3*w + 80*u^2*v^2*w^2 + 24*u^2*v*w^3 + 24*u*v^3*w^2
+ 20*u*v^2*w^3 + 4*v^3*w^3 - 16*u^3*v^2 - 44*u^3*v*w - 16*u^3*w^2 -
16*u^2*v^3 - 132*u^2*v^2*w - 132*u^2*v*w^2 - 16*u^2*w^3 - 44*u*v^3*w -
132*u*v^2*w^2 - 44*u*v*w^3 - 16*v^3*w^2 - 16*v^2*w^3 + 18*u^3*v +
19*u^3*w + 52*u^2*v^2 + 151*u^2*v*w + 52*u^2*w^2 + 19*u*v^3 +
151*u*v^2*w + 151*u*v*w^2 + 18*u*w^3 + 18*v^3*w + 52*v^2*w^2 + 19*v*w^3
- 6*u^3 - 47*u^2*v - 48*u^2*w - 48*u*v^2 - 137*u*v*w - 47*u*w^2 + 13*u^2
- 6*v^3 - 47*v^2*w - 48*v*w^2 + 37*u*w + 13*v^2 - 6*w^3 + 37*u*v +
37*v*w + 13*w^2 - 9*u - 9*v - 9*w + 2)*u*w^2


P.S.:  Works with Sage 6.1.1 as well:

Factor f :  4*(4*u^3*v^3 + 24*u^3*v^2*w + 20*u^2*v^3*w + 20*u^3*v*w^2 + 
80*u^2*v^2*w^2 + 24*u*v^3*w^2 + 4*u^3*w^3 + 24*u^2*v*w^3 + 20*u*v^2*w^3 
+ 4*v^3*w^3 - 16*u^3*v^2 - 16*u^2*v^3 - 44*u^3*v*w - 132*u^2*v^2*w - 
44*u*v^3*w - 16*u^3*w^2 - 132*u^2*v*w^2 - 132*u*v^2*w^2 - 16*v^3*w^2 - 
16*u^2*w^3 - 44*u*v*w^3 - 16*v^2*w^3 + 18*u^3*v + 52*u^2*v^2 + 19*u*v^3 
+ 19*u^3*w + 151*u^2*v*w + 151*u*v^2*w + 18*v^3*w + 52*u^2*w^2 + 
151*u*v*w^2 + 52*v^2*w^2 + 18*u*w^3 + 19*v*w^3 - 6*u^3 - 47*u^2*v - 
48*u*v^2 - 6*v^3 - 48*u^2*w - 137*u*v*w - 47*v^2*w - 47*u*w^2 - 48*v*w^2 
- 6*w^3 + 13*u^2 + 37*u*v + 13*v^2 + 37*u*w + 37*v*w + 13*w^2 - 9*u - 
9*v - 9*w + 2)*u*(v + w - 1)^3*w^2



-leif

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: In Sage Notebook how to run a process in the background

2014-06-02 Thread leif

Fred Gruber wrote:

I actually would like to continue working in the same worksheet  while
the computation happens in the background. I remember trying somethign
similar in Ipython where I could use certain parallel libraries to do
exactly that. Every once in a while I could check the status of the run.


Well, if I'm not mistaken, you can do all kinds of weird (or less weird) 
stuff in a (Python) notebook cell as you can do in Python, such as


os.system(my_command /path/to/logfile )  # returns immediately

and continually (try to) read the logfile from another cell.

Using Python's multiprocessing should also work.

Not sure whether Sage's @parallel decorators play well in the notebook 
(and the master process/computation won't return until the children have 
finished AFAIK, so it's not asynchronous to the evaluation of other cells).



-leif


On Monday, June 2, 2014 7:31:48 AM UTC-4, P Purkayastha wrote:
On Monday, June 2, 2014 8:39:32 AM UTC+8, William wrote:

On Sun, Jun 1, 2014 at 5:26 PM, Fred Gruber fgr...@gmail.com
wrote:
  Hello
  Is it possible to run a process in the background in a sage
notebook?
 
  I would like to run a process that takes a long time in the
background and
  just print the status in a log file. This way I could
continue working on
  the notebook  on other stuff and check the log file once in a
while.
 
  How to do this?

In SageMathCloud (https://cloud.sagemath.com) I figured out how
to do
this (due to somebody else's request) and implemented it. You put
%fork at the top of a cell, and it will start running as a separate
forked off process in the background:

%fork
sleep(5)
a = 10

When that cell terminates, any global variables it set will get
set in
your worksheet, as long as they are pickle-able.  In particular,
the
above will set a to 10, after 5 seconds.

This functionality is not available in sagenb.org
http://sagenb.org or the notebook that
comes with Sage, and very likely not with ipython.  It required
some
nontrivial special UI support, so wouldn't be trivial to port.



Why not? If I understand correctly, the OP wants to run a
computation without having to keep the browser open (or wants to
navigate away to a different worksheet).

  If you run the sagenb notebook as a server, then it will continue
running until one explicitly quits the worksheet or server. Each
worksheet has its own sage process. So, it is entirely possible to
let a worksheet continue running (and computing something), while we
close the browser or navigate away to a different worksheet.

For example, we can start the notebook in a screen session like this:
sage -n interface='' automatic_login=False

and then connect to localhost from the browser, start a worksheet
and a computation in the worksheet. Then we can simply close the tab
containing the worksheet. Later we can reconnect to the local server
and access the worksheet again.


--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: Error in warning directive when installing

2014-06-02 Thread leif

Jose Guzman wrote:

On 01/06/14 17:59, leif wrote:

Jose Guzman wrote:

When trying to install Sage 6.2 from sources I got the following error:


   File /home/jguzman/sage-6.2/src/doc/common/builder.py, line 1477,
in module
 getattr(get_builder(name), type)()
   File /home/jguzman/sage-6.2/src/doc/common/builder.py, line 276, in
_wrapper
 getattr(get_builder(document), 'inventory')(*args, **kwds)
   File /home/jguzman/sage-6.2/src/doc/common/builder.py, line 487, in
_wrapper
 x.get(9)
   File
/home/jguzman/sage-6.2/local/lib/python/multiprocessing/pool.py, line
554, in get
 raise self._value
OSError: [matrices ] docstring of sage.matrix.matrix1.Matrix:10: ERROR:
Error in warning directive:

make: *** [doc-html] Error 1

Is there anything I'm missing?


Probably depends on what exactly you did... ;-)

Does the error persist when you retry 'make doc' (or 'make doc-clean 
make doc' -- note that the latter currently requires a system-wide
version of git to be installed, cf. #16303)?

I've seen similar on an apparently /somehow/^TM broken installation
where I tried upgrading from a late 6.2.beta to an early 6.3.beta, but
only when running './sage --docbuild reference html' directly; with
'make doc' (or 'all' instead of just 'reference'), docbuilding simply
gets stuck, i.e., hangs indefinitely; cf. recent threads on sage-devel
(and probably better post there).

My impression is that docbuilding with Python's multiprocessing doesn't
work reliably, but so far failed to really track this down.


-leif



What I did is simply untar the sources and type make -j4.

I did as you suggested, and typed make doc-clean  make doc, and found
the following problem:

Error building the documentation.

Traceback (most recent call last):
   File /home/jguzman/sage-6.2/src/doc/common/builder.py, line 1477,
in module
 getattr(get_builder(name), type)()
   File /home/jguzman/sage-6.2/src/doc/common/builder.py, line 276, in
_wrapper
 getattr(get_builder(document), 'inventory')(*args, **kwds)
   File /home/jguzman/sage-6.2/src/doc/common/builder.py, line 487, in
_wrapper
 x.get(9)
   File
/home/jguzman/sage-6.2/local/lib/python/multiprocessing/pool.py, line
554, in get
 raise self._value
OSError: [combinat ]
/home/jguzman/sage-6.2/local/lib/python2.7/site-packages/sage/combinat/abstract_tree.py:docstring
of sage.combinat.abstract_tree:6: ERROR: Error in NOTE directive:

make: *** [doc-html] Error 1


I have git installed system wide

$ which git
$ /usr/bin/git

Any other suggestion?


May it be that your installation (especially, the source code) is 
somehow corrupted?  Or do you happen to use some flaky filesystem?


In the first error case, git should tell you ('git status'); in the 
second, you might have to touch the real source file (below src/) and 
rerun 'sage -b'.  (Then retry 'make doc'.)



-leif

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: Error in warning directive when installing

2014-06-01 Thread leif

Jose Guzman wrote:

When trying to install Sage 6.2 from sources I got the following error:


   File /home/jguzman/sage-6.2/src/doc/common/builder.py, line 1477,
in module
 getattr(get_builder(name), type)()
   File /home/jguzman/sage-6.2/src/doc/common/builder.py, line 276, in
_wrapper
 getattr(get_builder(document), 'inventory')(*args, **kwds)
   File /home/jguzman/sage-6.2/src/doc/common/builder.py, line 487, in
_wrapper
 x.get(9)
   File
/home/jguzman/sage-6.2/local/lib/python/multiprocessing/pool.py, line
554, in get
 raise self._value
OSError: [matrices ] docstring of sage.matrix.matrix1.Matrix:10: ERROR:
Error in warning directive:

make: *** [doc-html] Error 1

Is there anything I'm missing?


Probably depends on what exactly you did... ;-)

Does the error persist when you retry 'make doc' (or 'make doc-clean  
make doc' -- note that the latter currently requires a system-wide 
version of git to be installed, cf. #16303)?


I've seen similar on an apparently /somehow/^TM broken installation 
where I tried upgrading from a late 6.2.beta to an early 6.3.beta, but 
only when running './sage --docbuild reference html' directly; with 
'make doc' (or 'all' instead of just 'reference'), docbuilding simply 
gets stuck, i.e., hangs indefinitely; cf. recent threads on sage-devel 
(and probably better post there).


My impression is that docbuilding with Python's multiprocessing doesn't 
work reliably, but so far failed to really track this down.



-leif

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: In Sage Notebook R outputs only show up at the end of the processing

2014-06-01 Thread leif

William Stein wrote:

On Sun, Jun 1, 2014 at 6:06 PM, Fred Gruber fgru...@gmail.com wrote:

Thanks William
If I could just run an R command in the background and then just do sink 
[sync?] to


sink() is an R command.


-leif


redirect the outputs to a log file then I would be able to check the log
whenever I want and that would work too. But from your other post it seems
that this is algo [also?] difficult...


It seems like that should be easy.  I don't know R well enough to do
that, but in Python it would be trivial, so maybe it is easy in R?

  -- William


--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: How do you convert a string reprsentation of a polynomial back to a polynomial in a polynomial ring

2014-05-30 Thread leif

Kannappan Sampath wrote:

On Fri, May 30, 2014 at 12:17 AM, William Stein wst...@gmail.com
mailto:wst...@gmail.com wrote:

Simon  -- great answer -- like my second one but even better.  This
seems like the sort of thing our FAQ should have.  Believe it or not,
we have a Sage FAQ:

http://sagemath.org/doc/faq/

I doubt it has been touched in years, and I doubt anybody even knows
how to change it...


$ git log src/doc/en/faq/ | grep '^Date:' | head -20
Date:   Sat Feb 22 21:59:36 2014 +0100
Date:   Tue May 21 00:54:32 2013 +0300
Date:   Thu Apr 4 10:42:44 2013 -0700
Date:   Tue Feb 14 00:12:31 2012 +0100
Date:   Sat Jun 11 09:48:38 2011 +0200
Date:   Thu Sep 27 11:08:34 2012 -0700
Date:   Sun Aug 26 17:32:18 2012 +0200
Date:   Fri Sep 21 16:03:42 2012 +0200
Date:   Sun Oct 10 20:58:48 2010 +0200
Date:   Mon Jun 28 09:43:00 2010 -0700
Date:   Sun May 16 22:28:00 2010 -0700
Date:   Sun Apr 4 16:47:15 2010 +0200
Date:   Wed Mar 10 15:39:58 2010 -0800
Date:   Mon Mar 8 14:09:13 2010 -0800

So at least a few developers are aware of it.


-leif


And, this one still mentions Mercurial for the development among other
things!!! I have opened a ticket to change this (now, I will have to
figure how to do that but still...):

http://trac.sagemath.org/ticket/16412

-- Kannappan.


--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: Bivariate polynomial Euclid's division algorithm support

2014-05-30 Thread leif

John Cremona wrote:

On 30 May 2014 12:37, Simon King simon.k...@uni-jena.de wrote:

Hi!

On 2014-05-30, kundan kumar kundankumar2...@gmail.com wrote:

Does sage have an implementation of Bivariate polynomial Euclid's division
algorithm?


Yes, that's known as normal form computation in commutative algebra.


In particular, I want to divide f(x) = x^p - 1 by g(x,y) = (x-y)^2 - c.
Here, p is a large prime. The division occur in F[y] / (y^7 - 1) where F is
a finite field(Z mod p).That is while applying division I don't want to
allow the power of y to increse beyond 7.


First of all, let us define a polynomial ring. Note that it is a common
mistake for new users of Sage to try to define a polynomial *without*
creating a polynomial ring. For example, this should not be done when
you want to work with g as a polynomial:
   sage: g(x,y) = (x-y)^2-5
   sage: type(x)
   type 'sage.symbolic.expression.Expression'

The result, as you can see, is a symbolic expression. Its purpose is
very much different from what we need here.

So, let us properly define a multi-variate polynomial ring, and as you
say the coefficients are in some finite field (let us consider p=19):
   sage: P.x,y = GF(19)[]
   sage: g = (x-y)^2-5
   sage: g
   x^2 - 2*x*y + y^2 - 5
   sage: type(g)
   type 
'sage.rings.polynomial.multi_polynomial_libsingular.MPolynomial_libsingular'

But you actually want to do computations modulo y^7-1. So, let us define the
quotient ring. Note that we have variables x and y, so, we live in
F[x,y]/(y^7-1), not in F[y]/(y^7-1).

   sage: Q = P.quo(y^7-1)
   sage: Q
   Quotient of Multivariate Polynomial Ring in x, y over Finite Field of
   size 19 by the ideal (y^7 - 1)

We have defined g as an element of P---let's check:
   sage: g.parent() is P
   True

Hence, we should convert it to an element of the quotient ring:
   sage: gQ = Q(g)
   sage: gQ.parent() is Q
   True

Next, let us define f as an element of the quotient ring Q. We have two
possibilities: Either we rename x and y, so that they correspont to the
generators of Q, or we directly define f in terms of the generators of Q,
not of x,y. I assume that the two primes you are talking about are equal,
since you both denote them by p. So, stick with p=19:

   sage: f = Q.0^19-1
   sage: f
   xbar^19 - 1
As you can see, when defining the quotient, the variable names have been
automatically changed, to distinguish elements of P from elements of Q.

Back to your question: You want to divide f by gQ. If you naively do
the division f/gQ, you'll get an error. However, what we want is a
representative for the coset f+(gQ*Q). So, let us give a name to the
ideal gQ*Q:
   sage: I = gQ*Q
   sage: I
   Ideal (xbar^2 - 2*xbar*ybar + ybar^2 - 5) of Quotient of Multivariate
   Polynomial Ring in x, y over Finite Field of size 19 by the ideal (y^7
   - 1)

Polynomial ideals provide a method .reduce(), that reduces a given
element by the Gröbner basis of the ideal---that's exactly what we need.
Thus, the last step is
   sage: I.reduce(f)
   ybar^5 + xbar - ybar - 1

Actually, if you want, you could lift the result back to the
non-quotiented ring P:
   sage: I.reduce(f).lift()
   y^5 + x - y - 1

Best regards,
Simon


Simon, that is a fantastic mini-tutorial and should be kept somewhere
for posterity!  (assuming the the original questioner likes it too, of
course).


Yes, indeed (and it's just one of a couple). 
http://ask-simon.sagemath.org/ ?



-leif

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: How do you convert a string reprsentation of a polynomial back to a polynomial in a polynomial ring

2014-05-30 Thread leif

Stephen Kauffman wrote:

I'm trying to become cognizant of your caveats about conversion. What I've 
tried to write is a recursive function to convert polynomials (statements) in 
the Free BooleanPolynomialRing() to corresponding probability polynomials 
(statements) over QQ. I haven't convinced myself that it's correct, but it 
checks out with some examples and also for basic forms however what I've just 
discovered is that as in below

EX7.P,Q,R,S,V,W = BooleanPolynomialRing(6,order='lex')
Prob(P + Q + R + S).ring() #yields an error message -- it doesn't seem to know 
that it's parent ring should be ProbRing

Traceback (most recent call last):
   File 
/projects/5511fe15-8085-4d1d-bdc7-c6bf6c99e693/.sagemathcloud/sage_server.py, 
line 733, in execute
 exec compile(block+'\n', '', 'single') in namespace, locals
   File , line 1, in module
   File element.pyx, line 344, in sage.structure.element.Element.__getattr__ 
(sage/structure/element.c:4022)
   File misc.pyx, line 257, in sage.structure.misc.getattr_from_other_class 
(sage/structure/misc.c:1775)
AttributeError: 
'sage.rings.polynomial.multi_polynomial_libsingular.MPolynomial_libsingular' 
object has no attribute 'ring'

 [BIG SNIP]

You can use foo.parent() or parent(foo) instead.


-leif

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: How do you convert a string reprsentation of a polynomial back to a polynomial in a polynomial ring

2014-05-30 Thread leif

leif wrote:

Stephen Kauffman wrote:

I'm trying to become cognizant of your caveats about conversion. What
I've tried to write is a recursive function to convert polynomials
(statements) in the Free BooleanPolynomialRing() to corresponding
probability polynomials (statements) over QQ. I haven't convinced
myself that it's correct, but it checks out with some examples and
also for basic forms however what I've just discovered is that as in
below

EX7.P,Q,R,S,V,W = BooleanPolynomialRing(6,order='lex')
Prob(P + Q + R + S).ring() #yields an error message -- it doesn't seem
to know that it's parent ring should be ProbRing

Traceback (most recent call last):
   File
/projects/5511fe15-8085-4d1d-bdc7-c6bf6c99e693/.sagemathcloud/sage_server.py,
line 733, in execute
 exec compile(block+'\n', '', 'single') in namespace, locals
   File , line 1, in module
   File element.pyx, line 344, in
sage.structure.element.Element.__getattr__
(sage/structure/element.c:4022)
   File misc.pyx, line 257, in
sage.structure.misc.getattr_from_other_class (sage/structure/misc.c:1775)
AttributeError:
'sage.rings.polynomial.multi_polynomial_libsingular.MPolynomial_libsingular'
object has no attribute 'ring'

  [BIG SNIP]

You can use foo.parent() or parent(foo) instead.


P.S.:

sage: FOO.P,Q,R,S,V,W = BooleanPolynomialRing(6,order='lex')
sage: FOO.gens()
(P, Q, R, S, V, W)
sage: bar_gens_str = ','.join([ str(g).lower() for g in FOO.gens() ])
sage: BAR = PolynomialRing(QQ, bar_gens_str)
sage: BAR
Multivariate Polynomial Ring in p, q, r, s, v, w over Rational Field


sage: FOO('P + Q').parent() # of course works without quotes as well
Boolean PolynomialRing in P, Q, R, S, V, W

sage: BAR('p + q').parent()
Multivariate Polynomial Ring in p, q, r, s, v, w over Rational Field


-leif

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


Re: [sage-support] Re: What is /path/to/file.sage when stored in cloud folder under project? For load('file.sage') ?

2014-05-29 Thread leif

William Stein wrote:

On Thu, May 29, 2014 at 11:04 AM, Stephen Kauffman
strangerl...@gmail.com wrote:

Willian Stein responded saying it the question wasn't specific to
SageMathCloud anyway the answer was os.path.abspath('.')


Yes -- as people may have noticed, SageMathCloud is resulting in some
new Sage users.  When people ask questions (like the above) which
actually aren't SMC specific, they still often mention they are using
Sage in the context of SMC.It's probably useful to interpret this
as in Ubuntu 14.04 with most optional packages pre-installed.


I don't get how this question wasn't SMC-specific.

In contrast, if he'd asked how do I get the current working directory 
we probably would have sent him to #python, stackoverflow, or whatever.



-leif



On Wednesday, May 28, 2014 9:17:23 AM UTC-4, Dima Pasechnik wrote:

On Wednesday, 28 May 2014 14:15:23 UTC+1, Dima Pasechnik wrote:


this is not the right group for the Sage Cloud related questions, IMHO.
Try the one I cc to.


should have mentioned it explicitly:  sage-...@googlegroups.com


On Wednesday, 28 May 2014 12:13:00 UTC+1, Stephen Kauffman wrote:


What is /path/to/file.sage when stored in cloud folder under project?
For load('file.sage') ? This is for sagemathcloud worksheet and project.
Thanks


--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: caret interpreted as bitwise operator not power

2014-05-26 Thread leif

robin hankin wrote:

Hi, debian linux, Sage-6.2.

  It took me some time to track down a problem in my code that boiled
down to the interpretation of a caret (^) in a file which was read
using load() in a sage session.

Specifically, I have a file called f.py which contains a single line,
o = 10^6.  I load() this file, expecting o to be 100, but instead
it takes the value 12.  This is , I think, the result of a bitwise xor
operation.  But it is not what I wanted.


sage: !cat f.py
o = 10^6
sage: load(f.py)
sage: o
12
sage:


Note that in interactive mode, the caret is interpreted as expected:

sage: o = 10^6
sage: o
100
sage:



Is this a bug?


No.  '^' means bitwise exclusive-or in Python, where exponentiation is 
(just) '**'.




Can anyone advise?  I am very very very reluctant to
adopt the ghastly ** notation.


If you want your file to get preparsed (such that the Sage preparser 
replaces '^' by '**' internally when you load or run the file with 
'sage'), simply rename your file to f.sage.


Similar holds for '.pyx' vs. '.spyx'; the latter first gets preparsed.


-leif

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: caret interpreted as bitwise operator not power

2014-05-26 Thread leif

robin wrote:


  Can anyone advise?  I am very very very reluctant to
  adopt the ghastly ** notation.

If you want your file to get preparsed (such that the Sage preparser
replaces '^' by '**' internally when you load or run the file with
'sage'), simply rename your file to f.sage.

Similar holds for '.pyx' vs. '.spyx'; the latter first gets preparsed.



thanks for this Leif.  Where do I look for documentation of this issue?
The help page for load() discusses file extensions but does not mention
preparsing.


See for example

http://sagemath.org/doc/tutorial/programming.html#loading-and-attaching-sage-files

or type 'preparse?RETURN' at the 'sage:' prompt.

The documentation for 'load' (type 'load?') also refers to 'attach', 
whose documentation is more explicit regarding filename extensions.



-leif

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: Memory Leak in mutipolynomial evaluation

2014-05-25 Thread leif

Simon King wrote:

Hi Gabriel,

On 2014-05-25, Gabriel Furstenheim Milerud furstenh...@gmail.com wrote:

There is a memory leak in the evaluation of multivariable polynomials:

-C.x,y,z=GF(2)[]
-f=x^4+x*y^3+z^6

-get_memory_usage()
.1014.47265625
- for i in xrange(100):
 a=f(1,0,0)
-get_memory_usage()
.1052.47265625


Note that you first request the memory usage before assigning
a=f(1,0,0). But to some extend, I can confirm an increase of memory
usage (with Sage 6.2):

   sage: C.x,y,z = GF(2)[]
   sage: f = x^4+x*y^3+z^6
   sage: a = f(1,0,0)
   sage: get_memory_usage()
   176.08984375
   sage: for i in xrange(100):
   : a = f(1,0,0)
   :
   sage: get_memory_usage()
   198.08984375
   sage: for i in xrange(100):
   :a = f(1,0,0)
   :
   sage: get_memory_usage()
   222.08984375


We have an increase of 22-24 megabytes in 10^6 rounds, thus 23-25 byte per 
round.
Actually I wonder how such a tiny leak is even possible! In any case, it
should be fixed.


I'm getting more:

sage: import gc
sage: gc.collect()
182
sage: get_memory_usage()
292.03515625
sage: C.x,y,z=GF(2)[]
sage: f=x^4+x*y^3+z^6
sage: get_memory_usage()
292.19921875
sage: for i in xrange(100):
: a=f(1,0,0)
:
sage: get_memory_usage()
338.19921875
sage: gc.collect()
11
sage: get_memory_usage()
338.19921875

(Sage 6.2, MacOS X 10.6 x86_64)


-leif

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: Method to invert the birational map from degree 3 curve to its Weierstrass form?

2014-05-24 Thread leif

diophan wrote:

To get back to the question, did you find the inverse by hand or is
there something in Sage to help out? I have potentially a large number
of cubics I'd like to carry this out with and if there's a way to avoid
doing it by hand each time that'd be great.


Ahem, ever heard of tab completion?

sage: R.x,y,z = QQ[]
sage: f = 3*y^2*x-y^2*z-2*x*y*z+y*z^2+2*x^3-2*x^2*z
sage: e = EllipticCurve_from_cubic(f,[0,0,1])
sage: e
Scheme morphism:
  From: Closed subscheme of Projective Space of dimension 2 over 
Rational Field defined by:

  2*x^3 + 3*x*y^2 - 2*x^2*z - 2*x*y*z - y^2*z + y*z^2
  To:   Elliptic Curve defined by y^2 + 6*x*y + 256*y = x^3 - 73*x^2 
over Rational Field

  Defn: Defined on coordinates by sending (x : y : z) to
(1/8*x*y - 1/16*y^2 - 1/8*y*z : -x^2 + 1/8*x*y + 3/16*y^2 + x*z 
+ 3/8*y*z : -1/256*y^2)


sage: type(e)
class 
'sage.schemes.elliptic_curves.weierstrass_transform.WeierstrassTransformationWithInverse_class'


sage: e.inverse()
Scheme morphism:
  From: Elliptic Curve defined by y^2 + 6*x*y + 256*y = x^3 - 73*x^2 
over Rational Field
  To:   Closed subscheme of Projective Space of dimension 2 over 
Rational Field defined by:

  2*x^3 + 3*x*y^2 - 2*x^2*z - 2*x*y*z - y^2*z + y*z^2
  Defn: Defined on coordinates by sending (x : y : z) to
(-12*x*z - 4*y*z : 32*x*z : x^2 - 28*x*z - 4*y*z)

sage: e.inverse().defining_polynomials()
[-12*x*z - 4*y*z, 32*x*z, x^2 - 28*x*z - 4*y*z]


-leif



On Saturday, May 24, 2014 4:38:48 PM UTC-4, Nils Bruin wrote:

On Saturday, May 24, 2014 9:18:29 AM UTC-7, Volker Braun wrote:

Its a 4:1 map so you can't invert it...


I would find that surprising. For a general plane cubic, there are
good recipes for getting a 9:1 map to a Weierstrass model in general
and a 1:1 map when a rational point is specified. A 4:1 map is
rather unnatural to get in that situation. You'd expect that from a
y^2=quartic in x model.

Indeed, the map returned is invertible, the inverse being:

[   -12*x*z - 4*y*z,  32*x*z,  x^2 - 28*x*z - 4*y*z]


--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: I can't create a matrix in Sage Version 6.1.1, Release Date: 2014-02-04

2014-05-22 Thread leif

Yoo-hee Shin wrote:

In following the official tutorial, I ran a command A = matrix(4,4,
range(16)) to get the error below.  It looks like importing numpy
imports something in numpy to create a loop.  How can I create a matrix?


┌┐
│ Sage Version 6.1.1, Release Date: 2014-02-04   │
│ Type notebook() for the browser-based notebook interface.│
│ Type help() for help.│
└┘
sage: A = matrix(4,4, range(16))
sage: A
[ 0  1  2  3]
[ 4  5  6  7]
[ 8  9 10 11]
[12 13 14 15]
sage:

Looks like your installation was broken somehow^TM^.


-leif



---
AttributeErrorTraceback (most recent call last)
ipython-input-16-644ea671373e in module()
 1 A = matrix(Integer(4),Integer(4), range(Integer(16)))

/usr/local/sage-6.1.1-x86_64-Linux/local/lib/python2.7/site-packages/sage/matrix/constructor.pyc
in _matrix_constructor(*args, **kwds)
 558 # check to see if the number of rows is specified
 559 try:
-- 560 import numpy
 561 if isinstance(args[0], numpy.ndarray):
 562 raise TypeError

/usr/local/sage-6.1.1-x86_64-Linux/local/lib/python2.7/site-packages/numpy/__init__.py
in module()
 135 return loader(*packages, **options)
 136
-- 137 import add_newdocs
 138 __all__ = ['add_newdocs']
 139

/usr/local/sage-6.1.1-x86_64-Linux/local/lib/python2.7/site-packages/numpy/add_newdocs.py
in module()
   7 #   core/fromnumeric.py, core/defmatrix.py up-to-date.
   8
 9 from numpy.lib import add_newdoc
  10
  11
###

/usr/local/sage-6.1.1-x86_64-Linux/local/lib/python2.7/site-packages/numpy/lib/__init__.py
in module()
  11
  12 import scimath as emath
--- 13 from polynomial import *
  14 #import convertcode
  15 from utils import *

/usr/local/sage-6.1.1-x86_64-Linux/local/lib/python2.7/site-packages/numpy/lib/polynomial.py
in module()
   9 import re
  10 import warnings
--- 11 import numpy.core.numeric as NX
  12
  13 from numpy.core import isscalar, abs, finfo, atleast_1d,
hstack, dot

AttributeError: 'module' object has no attribute 'core'
sage:


--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: sage 6.2

2014-05-19 Thread leif

nt.a.am1...@gmail.com wrote:
 Hi

Is this software version 6.2 for Windows exist?


Yes, and it's brand new!

http://boxen.math.washington.edu/home/sagemath/sage-mirror/win/sage-6.2.ova


If you don't know yet how to use / install the virtual machine image, see

http://sagemath.org/doc/installation/binary.html#microsoft-windows

which further indirectly points you to

http://wiki.sagemath.org/SageAppliance

(and

http://www.sagemath.org/download-windows.html

but the mirrors haven't synced yet, so wait a while or take the fresh 
6.2 ova pointed to at the top of this message).




-leif

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: error message

2014-05-18 Thread leif

Subhankar Roy wrote:

Error building Sage.

The following package(s) may have failed to build:

The build directory may contain configuration files and other potentially
helpful information. WARNING: if you now run 'make' again, the build
directory will, by default, be deleted. Set the environment variable
SAGE_KEEP_BUILT_SPKGS to 'yes' to prevent this.

make: *** [build] Error 1

What to do at this stage? Kindly advise.


Check logs/install.log, i.e., go upwards from its end, and see whether 
you can figure out what failed.


Probably building the Sage library, or ATLAS.

(In the folder local/var/lib/sage/installed/, you can see which packages 
*have been* successfully installed so far.)


You can also just issue 'make' again, and see whether the build error 
persists; if so, at some point what's causing it will pop up near the 
end of the output... ;-)



-leif

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: splitting_field

2014-05-18 Thread leif

nt.a.am1...@gmail.com wrote:

I've downloaded and installed the sage 6.1.1. But the program does not
recognize splitting_field . For example


sage:R.x  =  PolynomialRing(QQ)
sage:K.a  =  NumberField(x^3  +  2)
sage:S.t  =  PolynomialRing(K)
sage:L.b  =  (t^2  -  a).splitting_field()
sage:L


ImportError: No module named splitting_field

Where is the problem?


No idea.  Works for me.



Do I need to install a package?


No.


-leif

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: splitting_field

2014-05-18 Thread leif

John Cremona wrote:

You need 6.2.  The splitting field functionality was only added since 6.1.1:

sage: R.x = PolynomialRing(QQ)
sage: sage: K.a = NumberField(x^3 + 2)
sage: sage: S.t = PolynomialRing(K)
sage: sage: L.b = (t^2 - a).splitting_field()
sage: L
Number Field in b with defining polynomial t^6 + 2


?

sage: sage: R.x = PolynomialRing(QQ)
sage: sage: K.a = NumberField(x^3 + 2)
sage: sage: S.t = PolynomialRing(K)
sage: sage: L.b = (t^2 - a).splitting_field()
sage: sage: L
Number Field in b with defining polynomial t^6 + 2
sage: version()
'Sage Version 6.1.1, Release Date: 2014-02-04'
sage:

Or did I just mess it up somehow?


-leif

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: splitting_field

2014-05-18 Thread leif

leif wrote:

John Cremona wrote:

You need 6.2.  The splitting field functionality was only added since
6.1.1:

?

sage: sage: R.x = PolynomialRing(QQ)
sage: sage: K.a = NumberField(x^3 + 2)
sage: sage: S.t = PolynomialRing(K)
sage: sage: L.b = (t^2 - a).splitting_field()
sage: sage: L
Number Field in b with defining polynomial t^6 + 2
sage: version()
'Sage Version 6.1.1, Release Date: 2014-02-04'
sage:

Or did I just mess it up somehow?


P.S.:  Doesn't look like I did:

sage: version()
'Sage Version 6.1.1, Release Date: 2014-02-04'
sage: !git branch -vv
* master 8be52e6 [origin/master] Updated Sage version to 6.1.1
sage: !git status
# On branch master
nothing to commit, working directory clean
sage:


-leif

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: Fwd: KASH Sage Package with Windows

2014-05-16 Thread leif

William Stein wrote:

I'm forwarding this to the sage-support mailing list. I will also
point out that kash is pre-installed into the online version of Sage
at https://cloud.sagemath.com.

-- Forwarded message --
From: Sarah Anderson sar...@g.clemson.edu
Date: Fri, May 16, 2014 at 9:28 AM
Subject: KASH Sage Package with Windows
To: wst...@gmail.com


Dr. Stein,

I'm looking to use the KASH Sage package with Windows. The help page
says it is only currently for Linux and OSX, but it also says to
contact you for Windows support, so I was wondering if there was
anyway for me to do this.


KASH is only available in binary form (i.e., it's closed source).

There's indeed a *very old* native Windows version available [1], which 
you could probably use stand-alone.  But if you want to use KASH through 
Sage on Windows, the best option is probably to run Sage inside a Linux 
virtual machine, see [2].



-leif

[1] http://page.math.tu-berlin.de/~kant/download.html

[2] http://sagemath.org/doc/installation/binary.html#microsoft-windows

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: Optional GAP packages in Sage 6.2

2014-05-09 Thread leif

Michael Hind wrote:

Hi,
I just built Sage 6.2 from source (ex .git) and it brings in GAP 4.7.4.

Now the sage --optional lists
...
database_gap-4.6.4 .. not installed
...
gap_packages-4.6.4.p1 ... not installed
...

I am not too happy about installing these

I already have GAP 4.7.4 installed on my system.  Is there a way to link
to this, or conversely get the later versions?


Sorry, the output of 'sage --optional' is currently still a bit 
misleading, as it doesn't show *available* new style spkgs.


Just do

sage -f gap_packages
sage -f database_gap

and you'll get the new style 4.7.4 versions.

(After that, 'sage --optional' will correctly report that they're 
installed.)



-leif

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: possible bug in DiscreteHiddenMarkovModel - NaN produced in output matrices

2014-05-09 Thread leif

Jesse Hersch wrote:

What is the usual way sage developers go about making changes in cython
code without rebuilding everything?


Edit the file(s), then run './sage -b' (which only rebuilds the 
necessary files of the Sage library).


'./sage -br' rebuilds the library and afterwards starts Sage, such that 
you can check the effects of your changes.


But before starting to modify the code, you should create a branch for 
your work such that you can always easily switch back to a clean 
version of Sage.  See [1].



-leif

P.S.:  Thanks for your very nice bug report!

[1] 
http://sagemath.org/doc/developer/walk_through.html#starting-without-a-ticket 
(as of now, still the documentation for Sage 6.1.1)


--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: Error installing package singular-3.1.5.p9

2014-05-04 Thread leif

Edidiong Attang wrote:

Good day,
I have tried installing the sage software the last 48 hours. It appears
the latest error is this


/Error installing package singular-3.1.5.p9/

I am using a MAC OSX 9.2 and an intel core i7


You probably ran into http://trac.sagemath.org/ticket/15937 .

Note that Sage 6.2.rc2 has been released today, so you might also try 
that [1], or wait hopefully at most a few days until 6.2 gets released.



-leif

[1] 
http://boxen.math.washington.edu/home/release/sage-6.2.rc2/sage-6.2.rc2.tar.gz


--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: Want all real solutions to a Simple trig equation

2014-05-03 Thread leif

Dr. David Kirkby wrote:

I
On 3 May 2014 16:54, Javier Marquez drquij...@gmail.com
mailto:drquij...@gmail.com wrote:
 
   solve(sin(x)==1/2,x) produces only one solution. Is here a way to
have sage produce all real solutions ? Thx

Is there not an infinite number of solutions? If so, it would be
difficult to get them all


Not difficult, but would take infinitely long to get them all...

Note that one could use assume() to get a finite subset.


-leif

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: Want all real solutions to a Simple trig equation

2014-05-03 Thread leif

Javier Marquez wrote:

  solve(sin(x)==1/2,x) produces only one solution. Is here a way to have sage 
produce all real solutions ? Thx



sage: solve(sin(x)==1/2,x,to_poly_solve='force')
[x == 5/6*pi + 2*pi*z50, x == 1/6*pi + 2*pi*z48]

is probably what you've been looking for.

('z50' and 'z48' indicate arbitrary integers.)

assume() doesn't seem to have an impact here, and passing further 
relations to solve() doesn't seem to give useful results either.



-leif

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: M.right_eigenvectors() brings old error

2014-05-02 Thread leif

Dima Pasechnik wrote:

On 2014-05-02, Michał Migacz migacz.mic...@gmail.com wrote:

Hello

It happens on sagenb.org


which runs Sage 5.11, for which
http://trac.sagemath.org/ticket/10346
is already closed.

Do you mean some other trac ticket?
Indeed, even on 6.2.rc1, one has this error:

sage: A = matrix(SR, [[1, 2], [2, 3]]); A
[1 2]
[2 3]
sage: A.right_eigenvectors()
---
TypeError Traceback (most recent call
last)
ipython-input-2-8f79930a10fd in module()
 1 A.right_eigenvectors()

/usr/local/src/sage/mav/sage/local/lib/python2.7/site-packages/sage/matrix/matrix2.so
in sage.matrix.matrix2.Matrix.eigenvectors_right
(sage/matrix/matrix2.c:31134)()

TypeError: eigenvectors_left() takes no keyword arguments


AFAICS we just have to replace it by

return self.transpose().eigenvectors_left(extend)


-leif



While eigenvectors_right() works perfectly good, right_eigenvectors() says:

Traceback (most recent call last):
   File , line 1, in module

   File /tmp/tmpHySbp1/___code___.py, line 24, in module
 exec compile(u'M.right_eigenvectors()
   File , line 1, in module

   File matrix2.pyx, line 5323, in 
sage.matrix.matrix2.Matrix.eigenvectors_right (sage/matrix/matrix2.c:30449)
TypeError: eigenvectors_left() takes no keyword arguments



This is old error described here:  
http://trac.sagemath.org/ticket/10346#comment:6

The code of function is:

  return self.transpose().eigenvectors_left(extend=extend)


--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: M.right_eigenvectors() brings old error

2014-05-02 Thread leif

leif wrote:

Dima Pasechnik wrote:

On 2014-05-02, leif not.rea...@online.de wrote:

Dima Pasechnik wrote:

On 2014-05-02, Michał Migacz migacz.mic...@gmail.com wrote:

Hello

It happens on sagenb.org


which runs Sage 5.11, for which
http://trac.sagemath.org/ticket/10346
is already closed.

Do you mean some other trac ticket?
Indeed, even on 6.2.rc1, one has this error:

sage: A = matrix(SR, [[1, 2], [2, 3]]); A
[1 2]
[2 3]
sage: A.right_eigenvectors()
---

TypeError Traceback (most recent call
last)
ipython-input-2-8f79930a10fd in module()
 1 A.right_eigenvectors()

/usr/local/src/sage/mav/sage/local/lib/python2.7/site-packages/sage/matrix/matrix2.so

in sage.matrix.matrix2.Matrix.eigenvectors_right
(sage/matrix/matrix2.c:31134)()

TypeError: eigenvectors_left() takes no keyword arguments


AFAICS we just have to replace it by

  return self.transpose().eigenvectors_left(extend)


On line 5520 of src/sage/matrix/matrix2.pyx that is.


-leif



Really?


Yes.



sage: A.transpose().eigenvectors_left(extend)
---

NameError Traceback (most recent call
last)
ipython-input-11-89af426b967f in module()
 1 A.transpose().eigenvectors_left(extend)

NameError: name 'extend' is not defined
sage:


 def eigenvectors_right(self, extend=True):

So 'extend' is defined where the call happens...


-leif



While eigenvectors_right() works perfectly good,
right_eigenvectors() says:

Traceback (most recent call last):
File , line 1, in module

File /tmp/tmpHySbp1/___code___.py, line 24, in module
  exec compile(u'M.right_eigenvectors()
File , line 1, in module

File matrix2.pyx, line 5323, in
sage.matrix.matrix2.Matrix.eigenvectors_right
(sage/matrix/matrix2.c:30449)
TypeError: eigenvectors_left() takes no keyword arguments



This is old error described here:
http://trac.sagemath.org/ticket/10346#comment:6

The code of function is:

   return self.transpose().eigenvectors_left(extend=extend)





--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: M.right_eigenvectors() brings old error

2014-05-02 Thread leif

Nils Bruin wrote:

On Friday, May 2, 2014 8:38:16 AM UTC-7, leif wrote:

return self.transpose().eigenvectors_left(extend)

  def eigenvectors_right(self, extend=True):

So 'extend' is defined where the call happens...

Stylistically it seems to be a keyword argument, so wouldn't  return

 self.transpose().eigenvectors_left(extend=extend)

be clearer and more future-proof (in case someone adds a keyword
normalized=True as well, and puts it in front of extend)?


? eigenvectors_left() takes no keyword arguments

That's the error this thread is about.  So you'd have to change 
eigenvectors_left() if you want it to take keyword arguments.



-leif

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: Solving Trigonometric Equations

2014-04-26 Thread leif

Dominique Laurain wrote:


Where to start :
http://www.sagemath.org/doc/reference/calculus/sage/symbolic/relation.html
read solve()

Read:
http://www.google.fr/url?sa=trct=jq=esrc=ssource=webcd=2ved=0CDIQFjABurl=http%3A%2F%2Fwww.csulb.edu%2F~woollett%2Fmbe4solve.pdfei=rlhbU6_-BMXgOvLlgcgPusg=AFQjCNHgkg8ryusZlGzg19QM7ogKmufo4Asig2=tYRBajv8jhJmWVbA9_6R0A


Read:  http://www.csulb.edu/~woollett/mbe4solve.pdf  ;-)


-leif


quote chapter 4.1.1:  Maxima's ability to solve equations is limited,
but progress is being made in this area.


I guess (because I don't know so much about Maxima symbolic) ... that
differential equations are handled better in symbolic computations (for
various maths reasons : solving quadratics, using Laplace
transform...)...and I have little hope that solve() can find discrete or
generic solutions like those in your system of two equations.

One better try would be to get one single equation f(A,d) = ( A*cos(d) -
c1 )^2 + ( A*sin(d)  - c2 )^2 ; solve(f(A,d) == 0,A,d)...but the point
is: you must understand that every problem must be set as math in the
simplest form.The best solver cannot try all the transformations and all
maths identifites  ( with sometimes abstract concepts as extending the
field of numeric solutions ).


--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail


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


[sage-support] Re: Installing Python module in Sage (Ubuntu)

2014-04-24 Thread leif

v...@ukr.net wrote:

 I usually install the additional python packages this way:

1. wget 'http://python_package.tar.gz'
2. tar xvf python_package.tar.gz
3. cd python_package
4. sage -python setup.py install

   Is this a correct method?


Steps 2 to 4 *used to be* equivalent to simply doing

$ sage -i /path/to/python_package.tar{,.gz,.bz2}


Don't know whether that still works.  (And IIRC, the name of the tarball 
had to match the top-level folder in it, but that's /usually/ the case. 
 If not, simply renaming the tarball should be sufficient.)



-leif

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: Computational geometry in the plane: in Sage?

2014-04-22 Thread leif

Volker Braun wrote:

On Tuesday, April 22, 2014 4:43:43 PM UTC+1, tdumont wrote:

I am in 6.1.1; as far as as know, I have built sage from source, using
the system Atlas blasand I have just upgraded from Ubuntu 13.10 to
14.04. Could the problem be here?


most likely, you switched out the system ATLAS library and now it
crashes in the ATLAS library.


Well, presumably, but not much of an issue.  Simply reinstalling the 
ATLAS spkg (with SAGE_ATLAS_LIB set appropriately) and rebuildung every 
package that depends on ATLAS /should/^TM be sufficient:


$ env SAGE_ATLAS_LIB=/path/to/system/atlas/libs ./sage -f atlas

$ env SAGE_UPGRADING=yes make build

(Note sure whether some Cython extension modules need to get 
rebuilt/relinked as well, and if so, whether the dependencies are 
complete in that the above would automatically rebuild them.)



-leif

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: Random Primitive

2014-04-19 Thread leif

Jan Medina wrote:

Hi everybody.

There is a procedure or library in SAGE that allows finding a random
primitive element on a finite field?


http://sagemath.org/doc/reference/finite_rings/sage/rings/finite_rings/finite_field_base.html?highlight=primitive_element#sage.rings.finite_rings.finite_field_base.FiniteField.multiplicative_generator


-leif

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: SAGE CPLEX

2014-04-18 Thread leif

On 11.02.2012 01:25, yannche wrote:

Hi Nathan,

Yes, I checked local/include and local/lib. CPLEX runs fine also as a
64 bit standalone.
I recompiled everything with ./sage -ba, and now
MixedIntegerLinearProgram(solver=CPLEX) triggers a new error
message 
I put the log below:
-

Traceback (most recent call last):
   File stdin, line 1, in module
   File _sage_input_3.py, line 10, in module
 exec compile(u'open(___code___.py,w).write(# -*- coding:
utf-8 -*-\\n +
_support_.preparse_worksheet_cell(base64.b64decode(bHAgPSBNaXhlZEludGVnZXJMaW5lYXJQcm9ncmFtKHNvbHZlcj0iQ1BMRVgiKQ==),globals())
+\\n); execfile(os.path.abspath(___code___.py))
   File , line 1, in module


   File /private/var/folders/4r/km32m_0s09d58glt8bk9bpcrgn/T/
tmp28dJQ6/___code___.py, line 2, in module
 exec compile(u'lp = MixedIntegerLinearProgram(solver=CPLEX)
   File , line 1, in module

   File mip.pyx, line 200, in
sage.numerical.mip.MixedIntegerLinearProgram.__init__ (sage/numerical/
mip.c:1360)
   File generic_backend.pyx, line 864, in
sage.numerical.backends.generic_backend.get_solver (sage/numerical/
backends/generic_backend.c:5952)
   File generic_backend.pyx, line 922, in
sage.numerical.backends.generic_backend.get_solver (sage/numerical/
backends/generic_backend.c:5768)
ImportError: dlopen(/Applications/Sage-4.8-OSX-64bit-10.6.app/Contents/
Resources/sage/local/lib/python2.6/site-packages/sage/numerical/
backends/cplex_backend.so, 2): Symbol not found: _kIOMasterPortDefault
   Referenced from: /Applications/Sage-4.8-OSX-64bit-10.6.app/Contents/
Resources/sage/local/lib/python2.6/site-packages/sage/numerical/
backends/cplex_backend.so
   Expected in: flat namespace
  in /Applications/Sage-4.8-OSX-64bit-10.6.app/Contents/Resources/sage/
local/lib/python2.6/site-packages/sage/numerical/backends/
cplex_backend.so


From 
https://www.ibm.com/developerworks/community/forums/html/topic?id=----14540277 
:


You need to link the frameworks CoreFoundation and IOKit for the 
academic version of the product since the license enforcement tools 
depend on them. The relevant linker command line arguments are 
-framework CoreFoundation -framework IOKit.



-leif

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: Zero power zero

2014-04-16 Thread leif

Jori Mantysalo wrote:

print 0^0
var('n')
simplify(0^n)

prints

1
0

Is this a bug or feature?


To start with, e.g. take a look at

http://trac.sagemath.org/ticket/10772

(and probably one of its follow-ups, 
http://trac.sagemath.org/ticket/13786 ).


(There are plenty of related tickets, and IIRC we also had endless 
discussions a couple of times on sage-devel.)



Tertium tamen datur,

-leif

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: find Nth prime with Sage

2014-04-16 Thread leif

Andrew Ohana wrote:

Actually you should only need the RH to prove that this method is reasonably 
fast. I don't think sage has Li^{-1} implemented, which is really what you need 
in order to implement this (Li ~ pi, so Li^{-1} ~ pi^{-1} = nth_prime function).

There has been some effort to include the open source libraries primesieve and 
primecount in Sage which would provide a much faster Primes iterator, 
prime_range, prime_pi, and nth_prime, however so far these haven't made it in.


And I just noticed that http://trac.sagemath.org/ticket/11475 is still 
bit-rottening...


-leif


However, both of these libraries do have a command line interface, and 
depending on the platform you are using there might be a precompiled binary. 
See primesieve.org and github.com/kimwalisch/primecount. The primecount library 
is much newer (about a year old), and a lot of performance improvements are 
still being made to it, but currently its nth_prime functionality takes around 
half a second for input around 10^10.


--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: Heartbleed bug / Sage's OpenSSL spkgs

2014-04-15 Thread leif

Jori Mantysalo wrote:

On Mon, 14 Apr 2014, William Stein wrote:


That said, even if we plan to update it, for now I think we should
delete the openssl spkg asap anyways, since it contains the
vulnerability. - - it is now gone.


So what should one do to existing installations? After removing several
*ssl* files and directories

./sage -f pyopenssl

seems to still ba able to find and compile local openssl, not system-wide.


   Affected users should upgrade to OpenSSL 1.0.1g. Users unable to 
immediately
   upgrade can alternatively recompile OpenSSL with 
-DOPENSSL_NO_HEARTBEATS.


(See https://www.openssl.org/news/secadv_20140407.txt )


Hence you could do

  env CFLAGS=... -DOPENSSL_NO_HEARTBEATS ./sage -f openssl

and

  ./sage -f pyopenssl

or

  env SAGE_UPGRADING=yes make build

afterwards.

But looking at the 1.0.1a spkg (all later ones apparently vanished), the 
first step might not work out of the box, i.e., you'd have to slightly 
modify its spkg-install file (bash script), changing


  make  # in 1.0.1c and later, this line is $MAKE

to

  $MAKE CFLAGS=$CFLAGS

or, while we're at it, directly and once for all

  $MAKE CFLAGS=$CFLAGS -DOPENSSL_NO_HEARTBEATS

since otherwise OpenSSL's Makefile will presumably override the settings 
from your environment.  (I'm not sure what changed in the 1.0.1f.p0 spkg 
version; probably you wouldn't have to modify that.)



Or you could try -- no guarantees that this works at all (with the 
current pyOpenSSL spkg, say) -- using


  ./sage -f http://sagemath.org/packages/archive/openssl-1.0.0.p0.spkg

(and reinstalling pyopenssl etc. as above); versions prior to and 
including 1.0.0 didn't have the heartbeat TLS extension.



In any case, don't forget to restart any running services using that 
OpenSSL library.



-leif

P.S.:  I'll probably provide a modified and / or updated OpenSSL spkg 
later; to use a system-wide OpenSSL library from your distro, say, after 
having built and used Sage's before, you'd have to delete some libraries 
in $SAGE_ROOT/local/lib/, and presumably have to afterwards 
rebuild/reinstall the Python spkg (not sure about that), and reinstall 
PyOpenSSL.


--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: How to install latest sage version on window 7 + Question following the online sage tutorial guide

2014-04-15 Thread leif

leif wrote:

leun...@gene.com wrote:

Q2: I tried to follow the online sage tutorial
(http://www.sagemath.org/doc/tutorial/tour_algebra.html).  The session
of using maxima to do laplace transform.  I copied the exact command

de1  =  maxima(2*diff(x(t),t, 2) + 6*x(t) - 2*y(t))
lde1  =  de1.laplace(t,s);  lde1


but it does not work in my 5.1.3 virtual box version. Why is that? See
the attach jpg for the error.  I cannot find where is my syntax error.
  I tried to define s and t as variable first but it does not help
either.  I do not know what syntax error I made

error message:
Traceback (most recent call last):
File stdin, line 1, in module
File _sage_input_7.py, line 10, in module
   exec compile(u'open(__code__.py,w),write(# -*- coding: utf-8
-*- ...I skip typing the rest
File , line 1, in module

File /tmp/tmpQapKht/__code__.py, line 3
   del = maxima(2*diff(x(t),t,2)+6*x(t)-2*y(t))
   ^
SyntaxError: invalid syntax


Well, 'del' is a Python keyword (delete), so renaming the variable to
something else will probably work.


P.S.:  In the example you copied, it's 'de1' (d--e--*one*), not 'del'.


-leif

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


[sage-support] Re: Too many primes dividing d!

2013-06-24 Thread leif

John Cremona wrote:

On 24 June 2013 14:21, John Cremona john.crem...@gmail.com wrote:

That message is coming from mwrank.  For curves with 2-torsion like
this is uses a 32-bit data structure to hold some information, which
can only handle curves with at most 31 bad primes.  Yours has 37.

When I wrote that code most machines were 32-bits so that was a
reasonable restriction.  A quick look at the code suggests to me that
on a 64-bit machine that bound could be doubled.  If so, mwrank could
handle your curve.  I will test that.  If it works easily then I will
report that here: you could patch your version of eclib (which is
built when Sage is built).  It would take longer for the patched
version of eclib to get into the official Sage distribution.


It turned out to be easy to make that patch in eclib.  For your curve,
the outcome is easy:

Curve 
[0,-13617805477079302032775490621796745415629849355261725336480836,0,46361156502774656420706049081873770250935676797216145262260945858412529896278403912857919022397470373971865899207535296000,0]
:selmer-rank = 2
upper bound on rank = 0

As I said above, you will have to wait until that patch is merged into
Sage's version of eclib, sorry.

Thanks for pointing this out.  The code now autodetects the nummber of
bits in an unsigned long, and that is the bound on the number of
primes factors which can be handled.


Couldn't you just use uint64_t instead?

Just asking...


-leif

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

--
You received this message because you are subscribed to the Google Groups 
sage-support group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-support] Re: problem compiling sage-5.10

2013-06-24 Thread leif

Luis Finotti wrote:

Dear all,

I am trying to compile sage-5.10 from source.  I am using aptosid
(basically Debian unstable).  Apparently the error occurs when compiling
singular.

The log file is here:
http://www.math.utk.edu/~finotti/misc/singular-3-1-5.p7.log


Same answer: ;-)

See #14737 [1], preliminary fixed spkg is here:

http://boxen.math.washington.edu/home/leif/Sage/spkgs/singular-3-1-5.p8.spkg

(Download and copy that into spkg/standard/, then resume the build by 
typing 'make' again.)



-leif


[1] http://trac.sagemath.org/sage_trac/ticket/14737

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

--
You received this message because you are subscribed to the Google Groups 
sage-support group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/groups/opt_out.




  1   2   >