[sage-support] Fwd: Ask about the SageMath codebase using ChatGPT

2023-06-30 Thread 'William Stein' via sage-support
This is about a more "grounded" version of ChatGPT + Sage that is now at

https://wolfia.com/?projectId=ed005166-99f2-4e5e-8778-2dc49d4bf930

-- Forwarded message -----
From: William Stein 
Date: Fri, Jun 30, 2023 at 11:41 AM
Subject: Ask about the SageMath codebase using ChatGPT
To: sage-devel 
Cc: 


Hi,

Summary: Try asking anything about the SageMath codebase at

https://wolfia.com/?projectId=ed005166-99f2-4e5e-8778-2dc49d4bf930

Details:

There's a project called "Wolfia" that does the following with a codebase:

"Wolfia Codex works by indexing an entire codebase. This is done by
first chunking each file into smaller code snippets. Those snippets
and other metadata are then persisted using vector embeddings.

When you ask a question about a codebase, that question is also
converted into a vector embedding. This is compared to all of the
available code and metadata to find the most relevant code.

The relevant code is then inlined as context to various prompts
(general questions, debugging errors, or documentation generation) and
sent to a Large Language Model to generate an answer to your question
based on the provided code."

I asked them to index the sagemath codebase and they did. You can try it here

https://wolfia.com/?projectId=ed005166-99f2-4e5e-8778-2dc49d4bf930

The point is that instead of using GPT's vague memory of what it might
have seen, this instead uses the actual Sage source code, and mainly
uses GPT to make sense of it.


-- Forwarded message -
From: Naren Manoharan 
Date: Fri, Jun 30, 2023 at 10:53 AM
Subject: Thank you for signing up and Welcome Wolfia!
To: 


Hey William,

Thanks for signing up and requesting us to index -
https://github.com/sagemath/sage

This is now available here -
https://wolfia.com/?projectId=ed005166-99f2-4e5e-8778-2dc49d4bf930

Feel free to grab time here if you have any questions or feedback -
https://calendly.com/naren-mano/wolfia

I would love to hear any feedback or thoughts that you have! I'm a big
fan of open core projects. Let me know if I can help in any way.

Best,
Naren
Co-Founder & CTO at Wolfia (YC S22)
(314) 562-8039 | LinkedIn | Twitter


--

Best Regards,
William Stein

CEO, SageMath, Inc.
https://cocalc.com


-- 

Best Regards,
William Stein

CEO, SageMath, Inc.
https://cocalc.com

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CA%2BjwZMiJFT%2BPrq6%3D4yoFH1u-tMs-h9MW2j3RDXZXvZnds2jGrQ%40mail.gmail.com.


Re: [sage-support] public notebooks: where'd they go

2023-06-26 Thread William Stein
On Mon, Jun 26, 2023 at 10:24 AM Linden Disney  wrote:

> Hi,
>
> This answer no longer seems to work, I would guess because once again the
> old notebooks have been moved. Is there still a way to get access to them?
> I am looking for http://www.sagenb.org/home/pub/2756 specifically.
>
> Many thanks in advance for any help!
>

Please start here:
https://cocalc.com/share/public_paths/9ba3432cea2b7afaa75e400a2bf7815f8c6e64ee

In particular on page 2:

https://cocalc.com/share/public_paths/9ba3432cea2b7afaa75e400a2bf7815f8c6e64ee/2701-2801%2F2756.sagews

I also don't have sagenb.org anymore.


>
> Kind regards,
>
> Linden
>
> On Wednesday, October 10, 2018 at 1:56:33 AM UTC+1 Kenneth Ribet wrote:
>
>> Thanks!
>>
>> Ken
>> On Tue, Oct 9, 2018 at 5:30 PM William Stein  wrote:
>> >
>> > On Tue, Oct 9, 2018 at 5:22 PM Ken Ribet  wrote:
>> > >
>> > > Hi All,
>> > >
>> > > Long ago I posted a public Sage notebook in connection with a course
>> I was teaching -- http://sagenb.org/home/pub/3914/ . The link no longer
>> works (no surprise!). My colleague who is teaching the course this year
>> would like to see the notebook. Is there some way to retrieve it? (I doubt
>> that I have a copy anywhere.) Thanks in advance!
>> > >
>> >
>> > Here it is:
>> >
>> >
>> https://share.cocalc.com/share/19575ea0-317e-402b-be57-368d04c113db/pub/3901-4001/3914.sagews?viewer=share
>> >
>> > All old public sage notebooks are here:
>> >
>> >
>> https://share.cocalc.com/share/19575ea0-317e-402b-be57-368d04c113db/pub/?viewer=share
>> > > Ken
>> > >
>> > > --
>> > > 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...@googlegroups.com.
>> > > To post to this group, send email to sage-s...@googlegroups.com.
>> > > Visit this group at https://groups.google.com/group/sage-support.
>> > > For more options, visit https://groups.google.com/d/optout.
>> >
>> >
>> >
>> > --
>> > William (http://wstein.org)
>> >
>> > --
>> > You received this message because you are subscribed to a topic in the
>> Google Groups "sage-support" group.
>> > To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/sage-support/GVLYOIf32cc/unsubscribe.
>> > To unsubscribe from this group and all its topics, send an email to
>> sage-support...@googlegroups.com.
>> > To post to this group, send email to sage-s...@googlegroups.com.
>> > Visit this group at https://groups.google.com/group/sage-support.
>> > For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-support/c9ef3f86-7568-4837-9f74-a47dde5e2541n%40googlegroups.com
> <https://groups.google.com/d/msgid/sage-support/c9ef3f86-7568-4837-9f74-a47dde5e2541n%40googlegroups.com?utm_medium=email_source=footer>
> .
>


-- 
William (http://wstein.org)

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CACLE5GBavJTW4adDZGu%3D0hWSPCvMk5bkW%3DKdhfwY376N9y2bLA%40mail.gmail.com.


Re: [sage-support] Sage Docker images are outdated: still on Sage 9.7

2023-06-19 Thread William Stein
On Mon, Jun 19, 2023 at 1:19 PM William Stein  wrote:
>
> On Mon, Jun 19, 2023 at 11:58 AM Beth Claire <318...@gmail.com> wrote:
> >
> > The docker image available here:
> > https://hub.docker.com/r/sagemath/sagemath
> > Has not been updated since Sagemath 9.7.  Is that image supported by the 
> > sage team?  Is there another image I should use?
>
> I also build Docker images for x86_64 and aarch64 (apple silicon) for
> cocalc-docker.  These are more up to date and
> instructions here:   https://github.com/sagemathinc/cocalc-docker

I just checked and actually only sage-9.8 is in that image.  I'm
building a new sage-10.0 image today.

William

>
> These are much bigger than the sagemath images since they include
> julia, latex, and many other things, so they may or may
> not be of interest to you.
>
> https://hub.docker.com/r/sagemathinc/cocalc/tags



-- 
William (http://wstein.org)

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CACLE5GBi3oisi8aMhj0oV2DN8L79KdH0ys7irH0udsVwJc30aw%40mail.gmail.com.


Re: [sage-support] Sage Docker images are outdated: still on Sage 9.7

2023-06-19 Thread William Stein
On Mon, Jun 19, 2023 at 11:58 AM Beth Claire <318...@gmail.com> wrote:
>
> The docker image available here:
> https://hub.docker.com/r/sagemath/sagemath
> Has not been updated since Sagemath 9.7.  Is that image supported by the sage 
> team?  Is there another image I should use?

I also build Docker images for x86_64 and aarch64 (apple silicon) for
cocalc-docker.  These are more up to date and
instructions here:   https://github.com/sagemathinc/cocalc-docker

These are much bigger than the sagemath images since they include
julia, latex, and many other things, so they may or may
not be of interest to you.

https://hub.docker.com/r/sagemathinc/cocalc/tags

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CACLE5GC1uZME7awN72qSb82WjjGCo49Pa-Yk-LJiQYaa55VDYA%40mail.gmail.com.


Re: [sage-support] Sqrt of a matrix over Fp

2023-06-08 Thread William Stein
Hi,

You will probably have to implement a function to find a sqrt (if it
exists) in terms of other higher level primitives.

See https://en.wikipedia.org/wiki/Square_root_of_a_matrix and
https://chat.openai.com/share/114817d2-908a-4776-b14a-5bc6e04b226b

William

On Thu, Jun 8, 2023 at 9:05 AM Habeeb Syed 
wrote:

> Hi,
> I need to compute square roots of matrices defined over finite fields.
> It seems sage has no such function. I am getting this error.
>
> AttributeError:
> 'sage.matrix.matrix_modn_dense_float.Matrix_modn_dense_float' object has no
> attribute 'sqrt'
>
> Any help on this will be very useful to me.
>
> Regards,
> HS
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-support/CAL0kVBJJ1EtEZWzf5tr%2BWwt0TYjLE1PiS31zR25cCOSHSzMp%2Bw%40mail.gmail.com
> 
> .
>


-- 
William (http://wstein.org)

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CACLE5GApSjYYKq4GScRuqX6TfNNn8rOfut8SPeC-gzUjyVrtPg%40mail.gmail.com.


Re: [sage-support] this one is strange ?

2023-05-25 Thread William Stein
https://cocalc.com/wstein/support/girard2

On Thu, May 25, 2023 at 12:36 AM Henri Girard 
wrote:

> thanks to the man in the list I called  f3d, I could make a graphic about
> a calculation I had done
>
> included : f3d.ipynb and pyramid
>
> Enjoy !
>
> Henri
> Le 25/05/2023 à 00:32, William Stein a écrit :
>
> Thanks for sharing that!
>
> Right now on https://www.phind.com/  if you click on "Use Best Model
> (slow)" and include "using sagemath" in your question,
> it will combine the sagemath docs, web searches, and GPT-4 to answer your
> question.  This might result in better answers
> in some cases than just using chatgpt.   I don't know how long
> https://www.phind.com will be free or if it is globally available
> or what, but it is fun to play with right now.
>
>  -- William
>
>
>
> On Wed, May 24, 2023 at 2:45 PM Henri Girard 
> wrote:
>
>> I was trying chatgpt and noticed I was able things I couldn't do myself
>> alone, I think it can help in learning sage because it's a good tool (i am
>> making advert for it lol)
>>
>> I needed some times to obtain what I wanted and as it gives python
>> sometimes there are mistakes with sage, in graphic I prefer sage libs
>> because I know them better than matplotlib with numpy
>>
>> from sage.all import *
>>
>> vertices = [(0, 0), (0, 1), (1, 1), (1, 0)]
>> p = polygon(vertices, fill=False)
>>
>> def rotate_point(point, angle):
>> rot = matrix([[cos(angle), sin(angle)],
>>   [-sin(angle), cos(angle)]])
>> return rot * vector(point)
>>
>> theta1 = pi / 4
>> theta2 = pi / 2
>>
>> rotated_vertices1 = [rotate_point(vertex, theta1) for vertex in vertices]
>> rotated_vertices2 = [rotate_point(vertex, theta2) for vertex in vertices]
>>
>> # Carré en bas à droite
>> square_bottom_right = [rotate_point((x + 1, y), theta2) + vector([1, 1])
>> for x, y in vertices]
>>
>> # Carré en haut à droite
>> square_top_right = [rotate_point((x + 1, y + 1), theta2) + vector([0, 2])
>> for x, y in vertices]
>>
>> # Centrer le losange
>> center = vector([0.05, 0.05])
>> offset = vector([0.245, -0.05])  # Ajuster l'offset selon les besoins
>> rotated_vertices_centered = [vertex + center + offset for vertex in
>> rotated_vertices1]
>>
>> show(p + polygon(rotated_vertices_centered, fill=False, color='red') +
>>  polygon(rotated_vertices2, fill=False, color='blue') +
>>  polygon(square_bottom_right, fill=False, color='green') +
>>  polygon(square_top_right, fill=False, color='purple'),
>>  gridlines="major", axes=False, figsize=5)
>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/sage-support/eccafd8a-9c02-2c65-1275-73f5531cd106%40gmail.com
>> <https://groups.google.com/d/msgid/sage-support/eccafd8a-9c02-2c65-1275-73f5531cd106%40gmail.com?utm_medium=email_source=footer>
>> .
>>
>
>
> --
> William (http://wstein.org)
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-support/CACLE5GBRFXDSBtzDpZoN7Ai7%2BvaNojpHS2O1pHXrCyg%3DEhydhg%40mail.gmail.com
> <https://groups.google.com/d/msgid/sage-support/CACLE5GBRFXDSBtzDpZoN7Ai7%2BvaNojpHS2O1pHXrCyg%3DEhydhg%40mail.gmail.com?utm_medium=email_source=footer>
> .
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-support/ff2ec91d-5f55-9e0a-6899-cde174068ea0%40gmail.com
> <https://groups.google.com/d/msgid/sage-support/ff2ec91d-5f55-9e0a-6899-cde174068ea0%40gmail.com?utm_medium=email_source=footer>
> .
>


-- 
William (http://wstein.org)

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CACLE5GAB-g%3DfrFwZhybf%3DmaY6Z1j7zLSMVx-PfipzeHog_90cw%40mail.gmail.com.


Re: [sage-support] for those who can appreciate

2023-05-24 Thread William Stein
Thanks for sharing that!

Right now on https://www.phind.com/  if you click on "Use Best Model
(slow)" and include "using sagemath" in your question,
it will combine the sagemath docs, web searches, and GPT-4 to answer your
question.  This might result in better answers
in some cases than just using chatgpt.   I don't know how long
https://www.phind.com will be free or if it is globally available
or what, but it is fun to play with right now.

 -- William



On Wed, May 24, 2023 at 2:45 PM Henri Girard  wrote:

> I was trying chatgpt and noticed I was able things I couldn't do myself
> alone, I think it can help in learning sage because it's a good tool (i am
> making advert for it lol)
>
> I needed some times to obtain what I wanted and as it gives python
> sometimes there are mistakes with sage, in graphic I prefer sage libs
> because I know them better than matplotlib with numpy
>
> from sage.all import *
>
> vertices = [(0, 0), (0, 1), (1, 1), (1, 0)]
> p = polygon(vertices, fill=False)
>
> def rotate_point(point, angle):
> rot = matrix([[cos(angle), sin(angle)],
>   [-sin(angle), cos(angle)]])
> return rot * vector(point)
>
> theta1 = pi / 4
> theta2 = pi / 2
>
> rotated_vertices1 = [rotate_point(vertex, theta1) for vertex in vertices]
> rotated_vertices2 = [rotate_point(vertex, theta2) for vertex in vertices]
>
> # Carré en bas à droite
> square_bottom_right = [rotate_point((x + 1, y), theta2) + vector([1, 1])
> for x, y in vertices]
>
> # Carré en haut à droite
> square_top_right = [rotate_point((x + 1, y + 1), theta2) + vector([0, 2])
> for x, y in vertices]
>
> # Centrer le losange
> center = vector([0.05, 0.05])
> offset = vector([0.245, -0.05])  # Ajuster l'offset selon les besoins
> rotated_vertices_centered = [vertex + center + offset for vertex in
> rotated_vertices1]
>
> show(p + polygon(rotated_vertices_centered, fill=False, color='red') +
>  polygon(rotated_vertices2, fill=False, color='blue') +
>  polygon(square_bottom_right, fill=False, color='green') +
>  polygon(square_top_right, fill=False, color='purple'),
>  gridlines="major", axes=False, figsize=5)
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-support/eccafd8a-9c02-2c65-1275-73f5531cd106%40gmail.com
> 
> .
>


-- 
William (http://wstein.org)

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CACLE5GBRFXDSBtzDpZoN7Ai7%2BvaNojpHS2O1pHXrCyg%3DEhydhg%40mail.gmail.com.


Re: [sage-support] what am I missing?

2023-04-13 Thread William Stein
Hi,

I think I randomly ran into this same thing with sage-9.8 this week too.
My guess is that there is some sort of overflow bug in the computation of
the y-axis labels.  It's probably one of the most severe bugs in sage ever,
since it is so likely to be randomly misleading...

On Thu, Apr 13, 2023 at 1:15 PM Fernando Gouvea  wrote:

> I must be missing something here...
>
> sage: g(x)=x^10/(1-x)^11
> sage: plot(g(x),(0,0.9))
>
> sage: g(0.7)
> 15945.8104850773
>
> What's wrong?
>
> Fernando
>
> --
> =
> Fernando Q. Gouvea http://www.colby.edu/~fqgouvea
> Carter Professor of Mathematics
> Dept. of Mathematics
> Colby College
> 5836 Mayflower Hill
> Waterville, ME 04901
>
> Further Pronunciation Advice
>
> That math whiz Euler (Leonhard)
> Had a great mind, but a peon heart.
> His life was spare and frugal,
> His sex life strictly conjugal.
>
>   -- John Derbyshire
>
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-support/57352ea7-2214-50af-9944-1eed986c9442%40colby.edu
> 
> .
>


-- 
William (http://wstein.org)

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CACLE5GAxv0ZTFs6_NHpwV5BQL6%3Diw%3DRZz3dGER1i3R_nLZF9Bw%40mail.gmail.com.


Re: [sage-support] Re: How to convert complex_root_of to QQbar (algebraic number)

2023-04-01 Thread William Stein
Thanks Vincent!What version of Sage are you using?  With sage-9.8 I get:

---

from sympy import sympify
exp = sympify("CRootOf(x**5 + x + 1, 0)")
sage_poly = QQ['x'](list(map(QQ, reversed(exp.poly.rep.rep
sage_approx = RIF(exp.n()) + RIF(-1e-30, 1e-30)
QQbar.polynomial_root(sage_poly, sage_approx)

Outputs:

ValueError: Refining interval that does not bound unique root!





On Sat, Apr 1, 2023 at 12:02 PM vdelecroix <20100.delecr...@gmail.com> wrote:
>
> Dear Marcel,
>
> It is a pity that this does not work more directly. Here is a work around to 
> achieve what you want to do
>
> sage: exp = sympify("CRootOf(x**5 + x + 1, 0)")
> sage: sage_poly = QQ['x'](list(map(QQ, reversed(exp.poly.rep.rep
> sage: sage_approx = RIF(exp.n()) + RIF(-1e-30, 1e-30)
> sage: QQbar.polynomial_root(sage_poly, sage_approx)
> -0.7548776662466928?
>
> This will be fixed in https://github.com/sagemath/sage/pull/35414 and 
> hopefully included in the next sage version.
>
> Vincent
> Le vendredi 31 mars 2023 à 15:00:34 UTC+2, Marcel Moosbrugger a écrit :
>>
>> I am trying to convert "complex_root_of" expressions to algebraic numbers 
>> (elements in the field QQbar).  However, I get a "ValueError" with the 
>> message "to many values to unpack".
>>
>> A minimal example would be:
>>
>> from sage.all import *
>> from sympy import sympify
>>
>> exp1 = sympify("CRootOf(x**2 + 1, 0)")._sage_()
>> exp2 = sympify("CRootOf(x**2 + 1, 1)")._sage_()
>> print(exp1)
>> print(exp2)
>> exp1 = QQbar(exp1)
>> exp2 = QQbar(exp2)
>> print(exp1)
>> print(exp2)
>>
>> The context I am working in is: I have a tool that is currently written in 
>> python and sympy. I am trying to use the output of that tool to do some 
>> further computation using sage, and the output of the first tool may contain 
>> CRootOf expressions.
>>
>>
> --
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-support/c4602f36-3cec-44e2-81a5-67dc38a50230n%40googlegroups.com.



-- 
William (http://wstein.org)

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CACLE5GC1HFN_H6%3DoWeOSVa1c6UHzHh5k8GtiUvQB9h2mS8%2BeuQ%40mail.gmail.com.


Re: [sage-support] How to convert complex_root_of to QQbar (algebraic number)

2023-04-01 Thread William Stein
On Sat, Apr 1, 2023 at 6:34 AM Emmanuel Charpentier <
emanuel.charpent...@gmail.com> wrote:

> Le vendredi 31 mars 2023 à 15:19:51 UTC+2, William Stein a écrit :
>
> [ Snip… ]
>
> Meta comment -- I added this "Help me fix this..." feature to cocalc
> jupyter notebooks a week ago, and it's been extremely
> popular with 1000+ uses a day.  It's exactly the sort of thing that
> ChatGPT can be very helpful with, given that Sage typical
> outputs a massive scary stacktrace when anything goes wrong, and it's just
> a lot of mental effort to untangle it, especially given
> the preparser.  ChatGPT is far from perfect, but it doesn't mind
> expending a lot of effort. People also often get stuck and
> very frustrated with Sage due to silly little things, e.g., accidentally
> capitalizing a function name, and chatgpt instantly points
> out such things.
>
> You can reproduce the above exactly also at https://chat.openai.com/chat
> by using the prompt:
>
> "I ran the following SageMath 9.8 code:
>
> (put the code)
>
> and it produced the following error message:
>
> (put the error)
>
> Help me fix my code."
>
> However, I think people find seeing and error and just clicking once then
> seeing the result right in their notebook to be easier and less
> disruptive of flow than a bunch of copy/paste.
>
> Very nice ! With the usual reservation to take chatGPT’s answers with a
> grain of salt (sometomes iceberg-sized) : chatGPT conjured out of …err..,
> thin air, a matrix log function in Sage, and a matrix log function in Sympy
> ; the latter is only partially false, since Sympy’s Matrixes *do* have
> *methods* exp and log, the former is just plain wrong.
>
Joke: maybe ChatGPT is robot from the future, and those functions will
exist in a few years :-)


> Do you think such a feature could be added to the Jupyter/Jupyterlab
> versions included in Sage ?
>


> Or possibly to Jupyter/Juyterlab (i. e. upstream) ?
>

Yes, for sure; check out https://github.com/jupyterlab/jupyter-ai


> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-support/54ebf451-4b23-4f53-a29c-6b3ab1e2a790n%40googlegroups.com
> <https://groups.google.com/d/msgid/sage-support/54ebf451-4b23-4f53-a29c-6b3ab1e2a790n%40googlegroups.com?utm_medium=email_source=footer>
> .
>


-- 
William (http://wstein.org)

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CACLE5GBpE%3DnbuBOm2FYrSWQ09RQUcLEVE-oVMSOeHSHE0%3DD5KQ%40mail.gmail.com.


Re: [sage-support] Current advice for generic SageMath install advice

2023-03-27 Thread William Stein
On Mon, Mar 27, 2023 at 5:34 PM Nils Bruin  wrote:

> What would the current (Spring 2023) easiest instructions be for people to
> install sage? I'm asking in support of an install-fest for students, so the
> objective is to have easy solutions for giving students access on whatever
> platform they have available.
> I know about cloud-based solutions, so I'll definitely point them to
> those. I'm asking for "the next step up".
>


I can send you a bunch of vouchers for free cocalc licenses if you want to
also give those out…


> In the install advice I see:
> for OSX:
>  - binary build of SageMath
> <https://github.com/3-manifolds/Sage_macOS/releases> (looks like an
> excellent solution)
> - https://anaconda.org/conda-forge/sage (would be a great place to point
> students to, because it's a rich environment for computational software).
> However: https://anaconda.org/conda-forge/sage seems to indicate that
> various architecture-specific builds are woefully outdated: "noarch" seems
> to be on point, but the architecture-specific ones seem stuck on 9.2. Am I
> reading the info wrong? Obviously I don't want to point people to 9.2
> installs.
>
> for windows:
>  - OK WSL; that's great. However, it looks like Ubuntu would be the
> easiest linux distribution to get and as far as I can see, Ubuntu has 9.5
> packaged at most? That's not great either.
>  - conda: see above
>
> for linux:
>  - same thing.
>  - conda: see above.
>
> So is building from source the only way nowadays? That's sad. I'm fine
> doing that for myself, but for an installfest, that's really not feasible.
> Probably some machines will go in thermal meltdown as a result! Or should I
> just send them to 9.2 and 9.5 etc.
>
> Also: if students want to use packages like normaliz, can they install
> those on binary installs? When I do it on source-built versions, it
> triggers extensive recompilation.
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-support/d1717bce-b359-4f83-902d-68edc2399d2dn%40googlegroups.com
> <https://groups.google.com/d/msgid/sage-support/d1717bce-b359-4f83-902d-68edc2399d2dn%40googlegroups.com?utm_medium=email_source=footer>
> .
>
-- 
-- William Stein

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CACLE5GB11D8DQ%3DDW4YWXgiRB2vgRhp56oeCFb4QcvUqWkAuQaQ%40mail.gmail.com.


Re: [sage-support] computig all possible determinants of submatrices of a given matrix

2023-03-20 Thread William Stein
This is

https://ask.sagemath.org/question/41136/how-to-find-all-the-sub-square-matrices-of-an-4x4-matrix-and-all-their-determinants/

 -- William

PS: For fun, I also asked a robot from the future and it said to use the
following code, but unfortunately "submatrix_iterator" doesn't exist yet:

F = FiniteField(17)
A = matrix(F, 4, [1,2,3,4, 5,6,7,8, 9,10,11,12, 13,14,15,16]) # replace the
elements of the matrix with your desired matrix

dets = []
for i in range(1,5):
for submatrix in A.submatrix_iterator(i):
if submatrix.is_square():
dets.append(submatrix.det())

print(dets)


On Mon, Mar 20, 2023 at 2:36 PM GUSTAVO TERRA BASTOS 
wrote:

> Hi all.
>
> Is there any specific comand to compute the determinants of all square
> submatrices of a given 4x4 - matrix over finite fields?
>
> best regards
>
> Gustavo
>
>
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-support/97ff54ff-8569-497a-9100-05ff2ae2cf9an%40googlegroups.com
> 
> .
>


-- 
William (http://wstein.org)

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CACLE5GAC4y5X1oGatMqwgRKDKddSTAq14_jEPMxLOxsNy5hzFw%40mail.gmail.com.


Re: [sage-support] Cannot factor 71281426948143699070565 with ecm.factor()

2023-01-30 Thread William Stein
I think everybody understands what's going on regarding ECM now,
thanks to Dima's quick answer.
Paul Zimmerman who wrote this code (and reads sage-support via a daily
digest), sent me this
note to pass on as well:

" Hi William,

please can you forward my answer below?
Thanks,
Paul

##

The default B1 value of ecm.factor() is too large. Using B1=2 works:

sage: ecm.factor(71281426948143699070565,B1=2)
[5, 53, 337, 1873, 2833, 7507, 20037791]"

On Sun, Jan 29, 2023 at 11:54 AM G. M.-S.  wrote:
>
>
> Thanks Dima, you taught me something new today.
>
> Guillermo
>
> On Sun, 29 Jan 2023 at 20:50, Dima Pasechnik  wrote:
>>
>> On Sun, Jan 29, 2023 at 3:04 PM G. M.-S.  wrote:
>> >
>> > For me, with SageMath version 9.8.beta7
>> > sage: ecm.factor(71281426948143699070565)
>> > does not return quickly either.
>> > Indeed, running
>> > sage: ecm.interact()
>> > seems to show a strange behaviour for 71281426948143699070565 when 
>> > factoring the factors found.
>> > As this is probabilistic and the output changes every time, I do not copy 
>> > it here.
>>
>> Basically, the default B1 value is too large in this case.
>>
>> sage: ecm.factor(71281426948143699070565,B1=200) # almost instant
>> [5, 53, 337, 1873, 2833, 7507, 20037791]
>> sage: ecm.factor(71281426948143699070565,B1=2000) # takes looong time
>>
>> the docs say:
>>
>>* "B1" -- initial lower bound, defaults to 2000 (15 digit factors).
>>  Used if "factor_digits" is not specified.
>>
>> > Guillermo
>> >
>> > On Sun, 29 Jan 2023 at 15:41, Bill Witzke  wrote:
>> >>
>> >> Hi,
>> >>
>> >> I have a hard time factoring the number 71281426948143699070565 using 
>> >> ecm.factor().  No result is given after a few minutes runtime.  Though, 
>> >> plain factor() happily factors the number.  Factoring smaller or larger 
>> >> numbers  work fine with ecm.factor(), too.  Just the single given number 
>> >> seems to be problematic.
>> >>
>> >> Am I doing something wrong?  Can someone confirm?
>> >>
>> >> system:
>> >> Ubuntu 22.04
>> >> sagemath 9.5-4 (via apt)
>> >> Intel Pentium N5000
>> >> (SageMath and Python beginner)
>> >>
>> >> example code factoring numbers in the range [71281426948143699070565  - 
>> >> L, 71281426948143699070565 + L]:
>> >>
>> >> # Odd number.
>> >> n = 71281426948143699070565
>> >> # Limit.
>> >> L = 2
>> >> # Iterate over interval [-L, L].
>> >> for i in range(-L, L + 1):
>> >> m = n + i
>> >> print("%d  =>  %s" % (m, ecm.factor(m)))
>
>
>
> --
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-support/CANnG18_HSRJZKhmC8%3DQ476x-FY9s%2BQZToXOKtk0NV1QBquUxtA%40mail.gmail.com.



-- 
William (http://wstein.org)

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CACLE5GA34GN7_7pV2ePS33warYT6By7rMiFR7iRB9dr2zhyHZA%40mail.gmail.com.


Re: [sage-support] Re: Sagecell : is it possible to install the Wolfram engine ?

2022-12-02 Thread William Stein
On Fri, Dec 2, 2022 at 11:34 AM Emmanuel Charpentier
 wrote:
> Do you think that the same loophole would be applicable to Sagecelll 
> (different structure...) wrt to international law, wrt american law, and with 
> wrt to european law ?
>

I'm not sure it's relevant, since you can't install something like
Wolfram Engine into sagecell server as an end user.



>>
>> -- William
>>
>> >
>> > Dima
>> >
>> > > This is a
>> > > license aimed at increasing the number of reasons people will buy
>> > > Mathematica, by being nice to developers who are building products
>> > > that use Mathematica.
>> > >
>> > > The discussions like this
>> > >
>> > > https://mathematica.stackexchange.com/questions/274333/wolfram-engine-jupyter-stackrel-mathematica
>> > >
>> > > (and the corresponding reddit thread) seem to me to be wildly
>> > > optimistic in their interpretation.
>> > >
>> > > Anyway, I'm not a lawyer, though I applaud Wolfram, Inc. for posting
>> > > that very clearly worded plain language FAQ instead of just some
>> > > massive wall of legalese.
>> > >
>> > > William
>> > >
>> > > > On Saturday, November 19, 2022 at 2:24:15 PM UTC-5 kcrisman wrote:
>> > > >>>
>> > > >>> The same could also apply to Cocalc ... except that Cocalc is also a 
>> > > >>> commercial product, therefore excluded from Wolfram terms for the 
>> > > >>> *gratis* Wolfram engine...
>> > > >>
>> > > >>
>> > > >> Technically if someone ran a Cocalc instance (say, from a Docker 
>> > > >> image) that was not commercial, maybe that would be okay? (IANAL as 
>> > > >> usual.)
>> > > >
>> > > > --
>> > > > 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...@googlegroups.com.
>> > > > To view this discussion on the web visit 
>> > > > https://groups.google.com/d/msgid/sage-support/58eebc97-408e-4511-bbc8-c1a61d19249en%40googlegroups.com.
>> > >
>> > >
>> > >
>> > > --
>> > > William (http://wstein.org)
>> > >
>> > > --
>> > > 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...@googlegroups.com.
>> > > To view this discussion on the web visit 
>> > > https://groups.google.com/d/msgid/sage-support/CACLE5GBGVdaisv4SN0g2ZPZXw%3DksWWv1ZXhX8JhaCq3F02xo7w%40mail.gmail.com.
>> >
>> > --
>> > 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...@googlegroups.com.
>> > To view this discussion on the web visit 
>> > https://groups.google.com/d/msgid/sage-support/CAAWYfq02EOCja16ceAxgMxx-EycXGybPjz9j_HMd%2B%2BKo%3DBUm0g%40mail.gmail.com.
>>
>>
>>
>> --
>> William (http://wstein.org)
>
> --
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-support/b2c2cf16-e3ce-4172-b1c5-31e349a3ec4fn%40googlegroups.com.



-- 
William (http://wstein.org)

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CACLE5GAW%2Bzn%3DNtWsjB9FGbLz8DJgwDcKkb60f9B2dCHKMkFZww%40mail.gmail.com.


Re: [sage-support] Re: Sagecell : is it possible to install the Wolfram engine ?

2022-11-30 Thread William Stein
On Wed, Nov 30, 2022 at 1:26 AM Dima Pasechnik  wrote:
>
> On Sat, Nov 19, 2022 at 7:59 PM William Stein  wrote:
> >
> > On Sat, Nov 19, 2022 at 11:25 AM kcrisman  wrote:
> > >
> > > Though see this: 
> > > https://www.wolfram.com/engine/faq/#can-i-use-the-free-engine-in-an-open-source-project
> >
> > That says " However, the Free Engine license does not permit end-user
> > use, except when this use is for further development. For end-user
> > uses, users must have a separate license for the Wolfram Engine."
> > which seems to me to make it crystal clear that it would not be legal
> > to install cocalc-docker (or even Jupyter notebook) and along with
> > Wolfram Engine and use it for any purpose except for development of
> > cocalc or Jupyter itself (i.e., to make sure the UI works).
> > Everything in that FAQ is about "developing a product".
>
> I'm not a lawyer, but in Wolfram's mindset a scientific paper is a
> product, too, no ?
> (Especially assuming it has enough self-promotion hype  in it - not
> sure, if this is a joke :-))
>
> Would putting Wolfram Engine on cocalc with a warning saying "read
> their terms of use" be
> too dangerous, risking more than just being slapped with a "cease and
> desist" letter?

Dima,

I suspect something fairly close to what you suggest would be legal.  Namely,
you can create your own CoCalc project, then you download Wolfram
Engine (or any other software) to your computer, then upload it into CoCalc.
Then use it.  Our terms of service don't prevent you from uploading your
own binaries and using them.   It's not different to you creating
a VM on DigitalOcean or something, and installing Wolfram Engine or any other
software there.   People have in the past done exactly the above with
Magma, Maple and the
actual full Mathematica.

 -- William

>
> Dima
>
> >  This is a
> > license aimed at increasing the number of reasons people will buy
> > Mathematica, by being nice to developers who are building products
> > that use Mathematica.
> >
> > The discussions like this
> >
> > https://mathematica.stackexchange.com/questions/274333/wolfram-engine-jupyter-stackrel-mathematica
> >
> > (and the corresponding reddit thread) seem to me to be wildly
> > optimistic in their interpretation.
> >
> > Anyway, I'm not a lawyer, though I applaud Wolfram, Inc. for posting
> > that very clearly worded plain language FAQ instead of just some
> > massive wall of legalese.
> >
> > William
> >
> > > On Saturday, November 19, 2022 at 2:24:15 PM UTC-5 kcrisman wrote:
> > >>>
> > >>> The same could also apply to Cocalc ... except that Cocalc is also a 
> > >>> commercial product, therefore excluded from Wolfram terms for the 
> > >>> *gratis* Wolfram engine...
> > >>
> > >>
> > >> Technically if someone ran a Cocalc instance (say, from a Docker image) 
> > >> that was not commercial, maybe that would be okay?  (IANAL as usual.)
> > >
> > > --
> > > 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 view this discussion on the web visit 
> > > https://groups.google.com/d/msgid/sage-support/58eebc97-408e-4511-bbc8-c1a61d19249en%40googlegroups.com.
> >
> >
> >
> > --
> > William (http://wstein.org)
> >
> > --
> > 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 view this discussion on the web visit 
> > https://groups.google.com/d/msgid/sage-support/CACLE5GBGVdaisv4SN0g2ZPZXw%3DksWWv1ZXhX8JhaCq3F02xo7w%40mail.gmail.com.
>
> --
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-support/CAAWYfq02EOCja16ceAxgMxx-EycXGybPjz9j_HMd%2B%2BKo%3DBUm0g%40mail.gmail.com.



-- 
William (http://wstein.org)

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CACLE5GCS7ne%3DBpLcvcJTLVz55b-u7jYoCwueSsha8x_hsAPrPg%40mail.gmail.com.


Re: [sage-support] Re: Sagecell : is it possible to install the Wolfram engine ?

2022-11-19 Thread William Stein
On Sat, Nov 19, 2022 at 11:25 AM kcrisman  wrote:
>
> Though see this: 
> https://www.wolfram.com/engine/faq/#can-i-use-the-free-engine-in-an-open-source-project

That says " However, the Free Engine license does not permit end-user
use, except when this use is for further development. For end-user
uses, users must have a separate license for the Wolfram Engine."
which seems to me to make it crystal clear that it would not be legal
to install cocalc-docker (or even Jupyter notebook) and along with
Wolfram Engine and use it for any purpose except for development of
cocalc or Jupyter itself (i.e., to make sure the UI works).
Everything in that FAQ is about "developing a product".  This is a
license aimed at increasing the number of reasons people will buy
Mathematica, by being nice to developers who are building products
that use Mathematica.

The discussions like this

https://mathematica.stackexchange.com/questions/274333/wolfram-engine-jupyter-stackrel-mathematica

(and the corresponding reddit thread) seem to me to be wildly
optimistic in their interpretation.

Anyway, I'm not a lawyer, though I applaud Wolfram, Inc. for posting
that very clearly worded plain language FAQ instead of just some
massive wall of legalese.

William

> On Saturday, November 19, 2022 at 2:24:15 PM UTC-5 kcrisman wrote:
>>>
>>> The same could also apply to Cocalc ... except that Cocalc is also a 
>>> commercial product, therefore excluded from Wolfram terms for the *gratis* 
>>> Wolfram engine...
>>
>>
>> Technically if someone ran a Cocalc instance (say, from a Docker image) that 
>> was not commercial, maybe that would be okay?  (IANAL as usual.)
>
> --
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-support/58eebc97-408e-4511-bbc8-c1a61d19249en%40googlegroups.com.



-- 
William (http://wstein.org)

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CACLE5GBGVdaisv4SN0g2ZPZXw%3DksWWv1ZXhX8JhaCq3F02xo7w%40mail.gmail.com.


Re: [sage-support] Sagecell : is it possible to install the Wolfram engine ?

2022-11-19 Thread William Stein
Hi,

I just read through the links you provide.  I hope I'm wrong, but it
seems pretty clear to me that
you absolutely cannot legally use Wolfram engine as part of
https://sagecell.sagemath.org
or https://cocalc.com without purchasing a license.   They do sell a
license that would make
it possible to  use Wolfram engine in these sites, and the cost would
be a function of "number
of virtual machines" (and maybe cpu's).

There seems to be no information on their pages about how much any of
their Wolfram engine
licenses cost for cloud computing use.  They do say the cost to
distribute Wolfram engine
with installed software is "typically $5–$100 per Wolfram Engine,
depending on volume
and application", so... **Pure speculation:** my guess is that they do
cloud licensing
on a similar case-by-case basis,  e.g., you have to record exactly
how/when it is getting
used, and probably pay Wolfram $5 per active user per month or
something like that.

 -- William

On Sat, Nov 19, 2022 at 8:36 AM Emmanuel Charpentier
 wrote:
>
> Dear list
>
> Now that the *gratis* (but by no means free) [Wofram 
> engine](https://www.wolfram.com/engine/) can be used for "pre-production" 
> projects, it seems to me that it *could* be installed on 
> `sagegell.sagemath.org`, this allowing access to the 
> `algorithm="mathematica"` options and, more generally, using Mathematica 
> algorithms for comparison with Sage ones... This is sometimes more than 
> useful...
>
> Technically, installing it on a Debian machine, and on a WSL installation of 
> Sage under Windows was a breeze. It should be possible to install it on 
> whatever runs the Sagecell server
>
> Legally, perusing the [FAQ](https://www.wolfram.com/engine/faq/) makes me 
> think that this use *could* be alowed unfer Wolfram's terms, but I am by no 
> means any kind of lawyer...
>
> The same could also apply to Cocalc ... except that Cocalc is also a 
> commercial product, therefore excluded from Wolfram terms for the *gratis* 
> Wolfram engine...
>
> Reactions ? Advices ?
>
> --
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-support/2b1592d2-85ab-4d55-886e-8da460abf604n%40googlegroups.com.



-- 
William (http://wstein.org)

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CACLE5GCdaAaHZwjcgcGXERO9vs2LS8nPJ0y1HrHwfQJ8f%3DBNdA%40mail.gmail.com.


Re: [sage-support] init.sage

2022-09-07 Thread William Stein
This seems relevant:

https://stackoverflow.com/questions/45818538/where-can-i-put-a-startup-script-in-jupyter

On Wed, Sep 7, 2022 at 3:15 PM Rogerio  wrote:
>
> I have some frequently used small codes in the init.sage file. However, the 
> file is not loaded when I start a session with jupyter or jupyterlab. To do 
> it I have to use  `load(sage.env.SAGE_STARTUP_FILE)`.
>
> How can I get init.sage automatically loaded when I start a session with 
> jupyterlab?
>
> OS: Linux/Debian 11
>
> Thanks
>
> Rogerio
>
> --
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-support/6989eeb7-36d4-4c15-951f-018d3c248792n%40googlegroups.com.



-- 
William (http://wstein.org)

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CACLE5GABf6H8C2AWwQn70fmJpjoQ%2BHXgjqTGsaC-E-NSQ5_E7w%40mail.gmail.com.


Re: [sage-support] Re: Where do I report that 1-1=2 :)

2022-06-06 Thread William Stein
On Mon, Jun 6, 2022 at 3:58 AM Kwankyu  wrote:
>
> It seems the bug is in jupyter. Try putting the following
>
> $\verb|-_-|$
>
> in a markdown cell.

I did some tests, and it also seems to me that this is a bug in
Jupyter classic and JupyterLab.

Incidentally, it's not a bug in my reimplementation of Jupyter in
CoCalc.   I've reported this upstream:

https://github.com/jupyterlab/jupyterlab/issues/12657

William

>
> On Monday, June 6, 2022 at 12:51:00 AM UTC+9 egourg...@gmail.com wrote:
>>
>> Indeed, in Jupyter or Jupyterlab, the underscore is rendered as a minus sign 
>> in %display latex mode.
>> For instance,
>>
>> %display latex
>> type(ZZ)
>>
>> returns
>>
>> <회횕횊횜횜 '횜횊횐횎.횛횒횗횐횜.횒횗횝횎횐횎횛⎯횛횒횗횐.홸횗횝횎횐횎횛횁횒횗횐⎯회횕횊횜횜'>
>>
>> while
>>
>> print(type(ZZ))
>>
>> gives
>>
>> 
>>
>> I don't know where the replacement of underscores by minus signs comes 
>> from...
>> Le dimanche 5 juin 2022 à 15:50:41 UTC+2, raymond@gmail.com a écrit :
>>>
>>> show('1_1=',2)
>>> Works fine in console mode.
>>> In jupyter and jupyterlab:
>>>
>>> 1-1=2
>>>
>>> It seems to be auto-corrected; I see the correct output momentarily then
>>> it gets "corrected".
>>> Where should I report it?
>>>
>>> Sagemath 9.6
>>> Linux Mate
>>> Google chrome and Firefox
>>>
>>> rrogers
>>>
> --
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-support/e9f5d0d1-7097-46dd-83a0-64d0af35c699n%40googlegroups.com.



-- 
William (http://wstein.org)

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CACLE5GBPeKURX2nxfiP5y2QcadMehs9KmLoWB95H99rozJj98A%40mail.gmail.com.


Re: [sage-support] Re: Basic Stats deprecated?

2022-02-25 Thread William Stein
In fairness, "Mission: Creating a viable free open source alternative
to Magma, Maple, Mathematica and Matlab."

What do Maple and Mathematica do regarding having a median top level command?

Also, if you want to argue that users should explicitly import
everything... that's an interesting an valuable challenge to support
and your modularization
work Matthias is of course critical to that.  However, it doesn't at
all preclude the default "sage" environment still being a viable
alternative to Maple and Mathematica.

On Fri, Feb 25, 2022 at 12:51 PM Matthias Koeppe
 wrote:
>
> If you consider numpy an obscure library, it may be that your syllabus needs 
> updating
>
>
> On Friday, February 25, 2022 at 10:52:19 AM UTC-8 mat...@gmail.com wrote:
>>
>> Mean, median and mode are now deprecated. E.g.:
>>
>> >median([1,2,3])
>> 2 :1: DeprecationWarning: sage.stats.basic_stats.median is deprecated; use 
>> numpy.median or numpy.nanmedian instead See https://trac.sagemath.org/29662 
>> for details.
>>
>> But shouldn't these basic functions have some default functionality? Is the 
>> intention really to make Sage users call basic functions from libraries. 
>> Students (mostly) don't know what numpy is and makes using mean, median and 
>> mode weirdly obscure - like calling combinatorics functions in Mathematica. 
>> For me (using Sage for classroom teaching) one attraction of Sage is that 
>> most basic things that a student would use have names that might be in their 
>> textbooks...
>>
>> Will Calculus be deprecated too?
>
> --
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-support/c7ec42b4-a966-47b6-a538-7bb943a50437n%40googlegroups.com.



-- 
William (http://wstein.org)

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CACLE5GDesZtYHCtZcLO80QF8iKE20TSYJjQS3N20msAPat_DCQ%40mail.gmail.com.


Re: [sage-support] something seems wrong here

2022-01-01 Thread William Stein
More here:  
https://doc.sagemath.org/html/en/reference/structure/sage/structure/element.html#sage.structure.element.RingElement.is_prime

On Sat, Jan 1, 2022 at 4:27 PM William Stein  wrote:
>
> On Sat, Jan 1, 2022 at 4:01 PM Michael Beeson  wrote:
> >
> > sage: d = 6
> >
> > sage: p = d/2
> >
> > sage: p
> >
> > 3
> >
> > sage: is_prime(p)
> >
> > False  #  Huh?!!
>
> The parent of p is QQ (the rational field).
> p is not a prime number of the **rational field**.
> You should coerce p to ZZ first.
>
> In retrospect, we probably should have just made is_prime throw an
> exception if the parent ring is a field, since the ring theory
> definition of prime number isn't very useful in a field.
>
> >
> > sage: is_prime(3)
> >
> > True
> >
> > sage: p==3
> >
> > True
> >
> > This happens in version 8.7  and also in the current version (installed 
> > yesterday)
> >
> >
> > --
> > 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 view this discussion on the web visit 
> > https://groups.google.com/d/msgid/sage-support/9cb13872-298c-4463-b27d-b77ea288bfedn%40googlegroups.com.
>
>
>
> --
> William (http://wstein.org)



-- 
William (http://wstein.org)

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CACLE5GDVrKCa8-SCn-2p22oXDyQgtnS6s26upXCA-z%2Bx9EZAuw%40mail.gmail.com.


Re: [sage-support] something seems wrong here

2022-01-01 Thread William Stein
On Sat, Jan 1, 2022 at 4:01 PM Michael Beeson  wrote:
>
> sage: d = 6
>
> sage: p = d/2
>
> sage: p
>
> 3
>
> sage: is_prime(p)
>
> False  #  Huh?!!

The parent of p is QQ (the rational field).
p is not a prime number of the **rational field**.
You should coerce p to ZZ first.

In retrospect, we probably should have just made is_prime throw an
exception if the parent ring is a field, since the ring theory
definition of prime number isn't very useful in a field.

>
> sage: is_prime(3)
>
> True
>
> sage: p==3
>
> True
>
> This happens in version 8.7  and also in the current version (installed 
> yesterday)
>
>
> --
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-support/9cb13872-298c-4463-b27d-b77ea288bfedn%40googlegroups.com.



-- 
William (http://wstein.org)

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CACLE5GDnGOFcb2OEO3OCczOuj-Yvzxa-k%3Dvx0xfoYog52Mogow%40mail.gmail.com.


Re: [sage-support] log4j

2021-12-14 Thread William Stein
On Tue, Dec 14, 2021 at 2:25 PM Adil Hasan  wrote:

> Hello folks,
>
> In case you are concerned that you may be impacted by the Java log4j bug,
> you can download this application which will check if a supplied url is
> vulnerable to the bug:
>
> https://github.com/fullhunt/log4j-scan
>

Thanks.  It seems the sagemath.org infrastructure is in good shape
regarding this:

Last login: Tue Dec 14 16:45:00 on ttys058

wstein@max ~ % python3 log4j-scan.py -u https://ask.sagemath.org

/Library/Frameworks/Python.framework/Versions/3.10/bin/python3: can't open
file '/Users/wstein/log4j-scan.py': [Errno 2] No such file or directory

wstein@max ~ % cd /tmp/log4j-scan

wstein@max log4j-scan % python3 log4j-scan.py -u https://ask.sagemath.org

[•] CVE-2021-44228 - Apache Log4j RCE Scanner

[•] Scanner provided by FullHunt.io - The Next-Gen Attack Surface
Management Platform.

[•] Secure your External Attack Surface with FullHunt.io.

[•] Initiating DNS callback server (interact.sh).

[%] Checking for Log4j RCE CVE-2021-44228.

[•] URL: https://ask.sagemath.org

[•] URL: https://ask.sagemath.org | PAYLOAD: ${jndi:ldap://
ask.sagemath.org.9187j80iik2n4oq9ud1re041i81939unm.interact.sh/tjtni2c}

[•] Payloads sent to all URLs. Waiting for DNS OOB callbacks.

[•] Waiting...

[•] Targets does not seem to be vulnerable.

wstein@max log4j-scan % python3 log4j-scan.py -u https://wiki.sagemath.org

[•] CVE-2021-44228 - Apache Log4j RCE Scanner

[•] Scanner provided by FullHunt.io - The Next-Gen Attack Surface
Management Platform.

[•] Secure your External Attack Surface with FullHunt.io.

[•] Initiating DNS callback server (interact.sh).

[%] Checking for Log4j RCE CVE-2021-44228.

[•] URL: https://wiki.sagemath.org

[•] URL: https://wiki.sagemath.org | PAYLOAD: ${jndi:ldap://
wiki.sagemath.org.5607rfj3i02047m4itt61pu684hsv539c.interact.sh/zpbgczb}

[•] Payloads sent to all URLs. Waiting for DNS OOB callbacks.

[•] Waiting...

[•] Targets does not seem to be vulnerable.

wstein@max log4j-scan % python3 log4j-scan.py -u https://trac.sagemath.org

[•] CVE-2021-44228 - Apache Log4j RCE Scanner

[•] Scanner provided by FullHunt.io - The Next-Gen Attack Surface
Management Platform.

[•] Secure your External Attack Surface with FullHunt.io.

[•] Initiating DNS callback server (interact.sh).

[%] Checking for Log4j RCE CVE-2021-44228.

[•] URL: https://trac.sagemath.org

[•] URL: https://trac.sagemath.org | PAYLOAD: ${jndi:ldap://
trac.sagemath.org.xgge21465p6t46hq87n64t350054fg25o.interact.sh/kjy8og1}

[•] Payloads sent to all URLs. Waiting for DNS OOB callbacks.

[•] Waiting...

[•] Targets does not seem to be vulnerable.

wstein@max log4j-scan % python3 log4j-scan.py -u https://www.sagemath.org

[•] CVE-2021-44228 - Apache Log4j RCE Scanner

[•] Scanner provided by FullHunt.io - The Next-Gen Attack Surface
Management Platform.

[•] Secure your External Attack Surface with FullHunt.io.

[•] Initiating DNS callback server (interact.sh).

[%] Checking for Log4j RCE CVE-2021-44228.

[•] URL: https://www.sagemath.org

[•] URL: https://www.sagemath.org | PAYLOAD: ${jndi:ldap://
www.sagemath.org.bx6i660og07o49v6qb2f9ou48r846433j.interact.sh/1qs7xvd}

[•] Payloads sent to all URLs. Waiting for DNS OOB callbacks.

[•] Waiting...

[•] Targets does not seem to be vulnerable.

wstein@max log4j-scan %



-- 
William (http://wstein.org)

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CACLE5GDuYX49_6yu%3DN67hw2n-c3Mqekrx0psECFT%3DDONp24g6g%40mail.gmail.com.


Re: [sage-support] log4j

2021-12-14 Thread William Stein
I think that Sage doesn’t make any use of the JVM or Java so Sage is not
vulnerable to the log4j exploit.

On Tue, Dec 14, 2021 at 6:47 AM Angela Hicks  wrote:

> Has anyone more knowledgeable than I (admittedly a low bar) about sage's
> internals (admittedly a low bar) thought about whether sage uses any
> libraries that make it vulnerable to the log4j vulnerability?
> -Angela
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-support/c944dbbe-d640-4a25-b9e8-9c0f0c13b437n%40googlegroups.com
> <https://groups.google.com/d/msgid/sage-support/c944dbbe-d640-4a25-b9e8-9c0f0c13b437n%40googlegroups.com?utm_medium=email_source=footer>
> .
>
-- 
-- William Stein

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CACLE5GCkiYVthOOH3kCc3u2wv8VtGQg7y-fiZjDj%3Dvo20qdq_Q%40mail.gmail.com.


Re: [sage-support] another "how to simplify" question

2021-12-08 Thread William Stein
On Wed, Dec 8, 2021 at 12:22 PM Fernando Q. Gouvea 
wrote:

> Thank you, that works. What is strange is that this does not:
>
> sage: right=integrate(integrate(sin(x^2),y,0,x),x,0,1)
> sage: wrong=integrate(integrate(sin(x^2),x,y,1),y,0,1)
> sage: real(wrong)==right
> -1/2*cos(1) + 1/2 == -1/2*cos(1) + 1/2
>
> Is Sage seeing a difference there that I don't?
>

> I think I don't understand the difference between real(wrong)==right and
> bool(real(wrong)==right).
>
In Sage "[symbol thing] == [symbolic thing]" is a constructor for a
symbolic equation.

sage: SR(2) == SR(2)
2 == 2
sage: parent(SR(2) == SR(2))
Symbolic Ring
sage: bool(SR(2) == SR(2))
True # only because Sage can *prove* they are equal -- it's false if it
can't prove they are equal, even if they are equal...


https://cocalc.com/wstein/support/gouvea-equals




> Fernando
> On 12/8/2021 1:23 PM, William Stein wrote:
>
> You can compare the real and imaginary parts directly.
>
> https://cocalc.com/wstein/support/2021-12-08-gouvea
>
> sage: bool(wrong.real() == right)
> True
> sage: wrong.imag()
> 0
>
> On Wed, Dec 8, 2021 at 10:07 AM Fernando Q. Gouvea 
> wrote:
>
>> I was showing my students a famous calculus example of an integral that
>> can be computed in one order of the variables but not in the other. Knowing
>> that SageMath can compute anything, the students suggested trying the
>> integral the "wrong" way.
>>
>> The "right" way is
>>
>> sage: integrate(integrate(sin(x^2),y,0,x),x,0,1)
>>
>> -1/2*cos(1) + 1/2
>>
>> The "wrong" way is
>>
>> sage: integrate(integrate(sin(x^2),x,y,1),y,0,1)
>>
>> -1/16*(-1)^(3/4)*((sqrt(2) + 4*(-1)^(1/4))*e^I - sqrt(-I)*((I +
>> 1)*sqrt(2)*(-1)^(1/4)*e^(2*I) - (I + 1)*sqrt(2)*(-1)^(1/4)*e^I) +
>> I*sqrt(2)*e^I - 2*(-1)^(1/4)*e^(2*I) - (I + 1)*sqrt(2) -
>> 2*(-1)^(1/4))*e^(-I)
>>
>> Is there any way to get Sage to check that these are equal?
>>
>> The obvious thing does not seem to work:
>>
>> sage: -1/16*(-1)^(3/4)*((sqrt(2) + 4*(-1)^(1/4))*e^I - sqrt(-I)*((I + 
>> 1)*sqrt(2)
>> : *(-1)^(1/4)*e^(2*I) - (I + 1)*sqrt(2)*(-1)^(1/4)*e^I) + I*sqrt(2)*e^I 
>> - 2*
>> : (-1)^(1/4)*e^(2*I) - (I + 1)*sqrt(2) - 2*(-1)^(1/4))*e^(-I) == 
>> -1/2*cos(1)
>> : +1/2
>>
>> -1/16*(-1)^(3/4)*((sqrt(2) + 4*(-1)^(1/4))*e^I - sqrt(-I)*((I + 
>> 1)*sqrt(2)*(-1)^(1/4)*e^(2*I)
>> - (I + 1)*sqrt(2)*(-1)^(1/4)*e^I) + I*sqrt(2)*e^I - 2*(-1)^(1/4)*e^(2*I) - 
>> (I + 1)*sqrt(2)
>> - 2*(-1)^(1/4))*e^(-I) == -1/2*cos(1) + 1/2
>>
>> Thanks,
>>
>> Fernando
>>
>> --
>> ==
>> Fernando Q. Gouvea
>> Carter Professor of Mathematics
>> Colby College
>> Mayflower Hill 5836
>> Waterville, ME 04901fqgou...@colby.edu  
>> http://www.colby.edu/~fqgouvea
>>
>> I have had a perfectly wonderful evening, but this wasn't it.
>>   --Groucho Marx
>>
>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/sage-support/9557c1a9-bd1c-69e1-358f-4ab02a058c3a%40colby.edu
>> <https://groups.google.com/d/msgid/sage-support/9557c1a9-bd1c-69e1-358f-4ab02a058c3a%40colby.edu?utm_medium=email_source=footer>
>> .
>>
>
>
> --
> William (http://wstein.org)
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-support/CACLE5GC6SNZuSsJ13iRFbO72Udn80Yy5OavR1SFwv03gjaQxvw%40mail.gmail.com
> <https://groups.google.com/d/msgid/sage-support/CACLE5GC6SNZuSsJ13iRFbO72Udn80Yy5OavR1SFwv03gjaQxvw%40mail.gmail.com?utm_medium=email_source=footer>
> .
>
> --
> ==
> Fernando Q. Gouvea
> Carter Professor of Mathematics
> Colby College
> Mayflower Hill 5836
> Waterville, ME 04901 fqgou...@colby.edu  
> http://www.colby.edu/~fqgouvea
>
> What is socialism?
>
> The painful transition from capitalism to capitalism.
>
>
> --
> You received this message because you are subscribed to the Google Gro

Re: [sage-support] another "how to simplify" question

2021-12-08 Thread William Stein
You can compare the real and imaginary parts directly.

https://cocalc.com/wstein/support/2021-12-08-gouvea

sage: bool(wrong.real() == right)
True
sage: wrong.imag()
0

On Wed, Dec 8, 2021 at 10:07 AM Fernando Q. Gouvea 
wrote:

> I was showing my students a famous calculus example of an integral that
> can be computed in one order of the variables but not in the other. Knowing
> that SageMath can compute anything, the students suggested trying the
> integral the "wrong" way.
>
> The "right" way is
>
> sage: integrate(integrate(sin(x^2),y,0,x),x,0,1)
>
> -1/2*cos(1) + 1/2
>
> The "wrong" way is
>
> sage: integrate(integrate(sin(x^2),x,y,1),y,0,1)
>
> -1/16*(-1)^(3/4)*((sqrt(2) + 4*(-1)^(1/4))*e^I - sqrt(-I)*((I +
> 1)*sqrt(2)*(-1)^(1/4)*e^(2*I) - (I + 1)*sqrt(2)*(-1)^(1/4)*e^I) +
> I*sqrt(2)*e^I - 2*(-1)^(1/4)*e^(2*I) - (I + 1)*sqrt(2) -
> 2*(-1)^(1/4))*e^(-I)
>
> Is there any way to get Sage to check that these are equal?
>
> The obvious thing does not seem to work:
>
> sage: -1/16*(-1)^(3/4)*((sqrt(2) + 4*(-1)^(1/4))*e^I - sqrt(-I)*((I + 
> 1)*sqrt(2)
> : *(-1)^(1/4)*e^(2*I) - (I + 1)*sqrt(2)*(-1)^(1/4)*e^I) + I*sqrt(2)*e^I - 
> 2*
> : (-1)^(1/4)*e^(2*I) - (I + 1)*sqrt(2) - 2*(-1)^(1/4))*e^(-I) == 
> -1/2*cos(1)
> : +1/2
>
> -1/16*(-1)^(3/4)*((sqrt(2) + 4*(-1)^(1/4))*e^I - sqrt(-I)*((I + 
> 1)*sqrt(2)*(-1)^(1/4)*e^(2*I)
> - (I + 1)*sqrt(2)*(-1)^(1/4)*e^I) + I*sqrt(2)*e^I - 2*(-1)^(1/4)*e^(2*I) - (I 
> + 1)*sqrt(2)
> - 2*(-1)^(1/4))*e^(-I) == -1/2*cos(1) + 1/2
>
> Thanks,
>
> Fernando
>
> --
> ==
> Fernando Q. Gouvea
> Carter Professor of Mathematics
> Colby College
> Mayflower Hill 5836
> Waterville, ME 04901 fqgou...@colby.edu  
> http://www.colby.edu/~fqgouvea
>
> I have had a perfectly wonderful evening, but this wasn't it.
>   --Groucho Marx
>
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-support/9557c1a9-bd1c-69e1-358f-4ab02a058c3a%40colby.edu
> 
> .
>


-- 
William (http://wstein.org)

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CACLE5GC6SNZuSsJ13iRFbO72Udn80Yy5OavR1SFwv03gjaQxvw%40mail.gmail.com.


Fwd: [sage-support] Sage 9.3 for Windows crashing

2021-09-22 Thread William Stein
-- Forwarded message -
From: Fernando Q. Gouvea 
Date: Wed, Sep 22, 2021 at 12:26 PM
Subject: Re: [sage-support] Sage 9.3 for Windows crashing
To: William Stein 


At this point, only plotting has caused the problem. For example:

sage: K=Qp(7)
sage: K
7-adic Field with capped relative precision 20
sage: a=K(8)
sage: a
1 + 7 + O(7^20)
sage: sqrt(a)
1 + 4*7 + 2*7^2 + 7^3 + 3*7^4 + 2*7^5 + 4*7^6 + 2*7^7 + 5*7^8 + 7^11 +
4*7^12 + 4*7^13 + 6*7^14 + 2*7^15 + 4*7^16 + 4*7^17 + 5*7^18 + O(7^20)
sage: log(a)
7 + 3*7^2 + 7^3 + 6*7^4 + 5*7^5 + 2*7^6 + 7^7 + 5*7^8 + 4*7^9 + 4*7^10 +
2*7^11 + 5*7^12 + 7^13 + 5*7^14 + 6*7^15 + 2*7^16 + 2*7^17 + 2*7^18 +
7^19 + O(7^20)

That all works fine.

Fernando

On 9/22/2021 2:46 PM, William Stein wrote:
> On Wed, Sep 22, 2021 at 11:36 AM Fernando Q. Gouvea  
> wrote:
>> I just had SageMath 9.2 crash, so I tried installing 9.3. Alas, I get the 
>> same problem. The offending command is pretty innocuous:
>>
>> sage: plot(ln(1+x),(-1,5))
>>
>> The Sage window then crashes. In the notebook I get a message that the 
>> kernel just died. Running it in the Sage Terminal, sage crashes and leaves 
>> this message behind:
>>
>> 
>> Unhandled SIGSEGV: A segmentation fault occurred.
>> This probably occurred because a *compiled* module has a bug
>> in it and is not properly wrapped with sig_on(), sig_off().
>> Python will now terminate.
>> 
>> /opt/sagemath-9.3/src/bin/sage-python: line 2:  1535 Segmentation fault  
>> (core dumped) sage -python "$@"
>>
>> Any ideas as to what is going on?
> Do lots of things you try cause problems like this or is it just plotting?
>
> E.g., what if you do some basic arithmetic with p-adic numbers, e.g.,
> some examples from here:
>
> https://doc.sagemath.org/html/en/reference/padics/sage/rings/padics/tutorial.html
>
> (Sorry, I can't help asking that given that I learned all about
> p-adics from your book decades ago...)
>
>> Fernando
>>
>>
>> --
>> ==
>> Fernando Q. Gouvea
>> Carter Professor of Mathematics
>> Colby College
>> Mayflower Hill 5836
>> Waterville, ME 04901
>> fqgou...@colby.edu   http://www.colby.edu/~fqgouvea
>>
>> Humility engenders learning because it beats back the arrogance
>> that puts blinders on. It leaves you open for truths to reveal
>> themselves. You don't stand in your own way.
>>-- Wynton Marsalis
>>
>> --
>> 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 view this discussion on the web visit 
>> https://groups.google.com/d/msgid/sage-support/e587c471-9ffa-4364-5fa2-fbf40d63e7d6%40colby.edu.
>
>
--
==
Fernando Q. Gouvea
Carter Professor of Mathematics
Colby College
Mayflower Hill 5836
Waterville, ME 04901
fqgou...@colby.edu http://www.colby.edu/~fqgouvea

What garlic is to food, insanity is to art.



-- 
William (http://wstein.org)

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CACLE5GBMwzpooJF4OfctdATv%3DXc_VGb1OpsDvdn4SVHdAcgYcQ%40mail.gmail.com.


Re: [sage-support] Sage 9.3 for Windows crashing

2021-09-22 Thread William Stein
On Wed, Sep 22, 2021 at 11:36 AM Fernando Q. Gouvea  wrote:
>
> I just had SageMath 9.2 crash, so I tried installing 9.3. Alas, I get the 
> same problem. The offending command is pretty innocuous:
>
> sage: plot(ln(1+x),(-1,5))
>
> The Sage window then crashes. In the notebook I get a message that the kernel 
> just died. Running it in the Sage Terminal, sage crashes and leaves this 
> message behind:
>
> 
> Unhandled SIGSEGV: A segmentation fault occurred.
> This probably occurred because a *compiled* module has a bug
> in it and is not properly wrapped with sig_on(), sig_off().
> Python will now terminate.
> 
> /opt/sagemath-9.3/src/bin/sage-python: line 2:  1535 Segmentation fault  
> (core dumped) sage -python "$@"
>
> Any ideas as to what is going on?

Do lots of things you try cause problems like this or is it just plotting?

E.g., what if you do some basic arithmetic with p-adic numbers, e.g.,
some examples from here:

https://doc.sagemath.org/html/en/reference/padics/sage/rings/padics/tutorial.html

(Sorry, I can't help asking that given that I learned all about
p-adics from your book decades ago...)

>
> Fernando
>
>
> --
> ==
> Fernando Q. Gouvea
> Carter Professor of Mathematics
> Colby College
> Mayflower Hill 5836
> Waterville, ME 04901
> fqgou...@colby.edu   http://www.colby.edu/~fqgouvea
>
> Humility engenders learning because it beats back the arrogance
> that puts blinders on. It leaves you open for truths to reveal
> themselves. You don't stand in your own way.
>   -- Wynton Marsalis
>
> --
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-support/e587c471-9ffa-4364-5fa2-fbf40d63e7d6%40colby.edu.



-- 
William (http://wstein.org)

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CACLE5GB%2BFjO6LWS92gU04k_R6yU6OoD%3D-Ge8kmisA_TferCmWg%40mail.gmail.com.


Re: [sage-support] Re: after upgrade to 9.3, SignalError: Illegal instruction

2021-08-25 Thread William Stein
Hi,

I release cocalc-docker ([1], [2]) a few days ago with sage-9.4, and had 
people reporting back "illegal instruction" issues.  Sage is built there 
with SAGE_FAT_BINARY="yes", using this script [3].  One person who reported 
a problem had a "Dell PowerEdge R710." and I built on an intel Dell 
PowerEdge R630, for what it is worth.  They got the error "An illegal 
instructor occurred" when computing "5+2" in Sage. 

My solution for now is to keep cocalc-docker at sage-9.3 for the time 
being, and suggest that people build sage from source on their own machine 
if necessary.   I'll let you know if I have any further information, but I 
just wanted to add this data point.

[1] https://github.com/sagemathinc/cocalc-docker
[2] https://hub.docker.com/r/sagemathinc/cocalc
[3] 
https://github.com/sagemathinc/cocalc-docker/blob/master/scripts/install_sage.sh

On Wednesday, August 25, 2021 at 8:57:44 AM UTC-7 Marco Streng wrote:

> In the end I build 9.4 from source and that worked perfectly. And it 
> turned out that the Ubuntu 18.04 binaries of 9.2 also work on this 
> particular machine (though we went for 9.4 in the end). Thanks again for 
> the help.
>
> Op dinsdag 24 augustus 2021 om 18:03:01 UTC+2 schreef slelievre:
>
>> 2021-08-24 05:48 UTC, Dima Pasechnik:
>> >
>> > These "illegal instruction" errors are an indication
>> > that the binary was built for a more advanced CPU
>> > than yours - which does not support certain CPU
>> > commands. It's a bug in "fat binary" build process
>> > we see for some time.
>> >
>> > Build Sage yourself, or use Conda.
>>
>> I opened a ticket at binary-pkg for that:
>> https://github.com/sagemath/binary-pkg/issues/31
>>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/b7d09d6d-c42f-49d4-8b75-2526b9f31020n%40googlegroups.com.


Re: [sage-support] Re: sage textbook goes GitHub; don't confuse it with the good one ;-)

2021-06-21 Thread William Stein
On Mon, Jun 21, 2021 at 10:08 AM john_perry_usm  wrote:

> Hello!
>
> > Is this also published on CoCalc?
>
> Not at the present time. I do mean to talk to someone about it.
>

Just make a PR to

https://github.com/sagemathinc/cocalc-examples

and we'll happily host a copy.  This makes it so with a click, people can
quickly get a copy of the document...


> > Why do you prefer the use of Sage Worksheets over Jupyter Notebook?
>
> I'm not entirely clear on when "Sage Worksheets" became Jupyter notebooks.
> I think, when we started 5 years ago, that we weren't aware of the switch;
> I certainly wasn't. I personally haven't looked enough into the details
> and/or differences to write intelligently about them.
>

Sage worksheets = a way of using Sage in Cocalc *ONLY* that involves a
single codemirror editor document, and a really powerful way to easily
define %mode's. It's very tightly integrated with Sage.   It's also written
in a pretty old style (using a lot of html and jquery), and I plan to
rewrite it soon, since it's one of the only things left in CoCalc that
isn't written in Typescript/React.  Sage worksheets are implemented
entirely separately from the Jupyter stack, not even using the Jupyter
kernel for Sage (instead, they have their own backend server process, which
uses fork each time  you make a new connection, for faster startup).  They
do have a way to easily create any number of connections to different
Jupyter kernels, and use them all in the same worksheet.   I wrote Sage
worksheets mainly 2012-2014, and have maintained them ever since, because
they are pretty popular on CoCalc, e.g., they just use a normal single
document editor interface, rather than a "weird" modal interface with many
little editors like Jupyter notebooks, and some people find the Sage
worksheet approach more natural.
One nuisance of Sage worksheets is that the exact version of Sage isn't
specified anywhere in the file format -- it just uses whatever "sage" is in
your path.  Jupyter is better in this regard.

Jupyter notebooks = of course we all know what they are.

I'm personally a huge fan of both, but they are very different.I hope I
can unify the two approaches sometime soon, so that there's a mode for
using any Jupyter notebook that looks like a Sage worksheet... and so the
custom Sage server mentioned above is just a different Jupyter kernel
(maybe called "cocalc-sage").


>
> john perry
>
> On Sunday, June 20, 2021 at 1:15:28 PM UTC-5 ingo...@gmail.com wrote:
>
>> That looks great and I am looking forward to reading it more in detail.
>> Just two quick questions to get started.
>> Is this also published on CoCalc?
>> Why do you prefer the use of Sage Worksheets over Jupyter Notebook?
>> Best wishes
>> Ingo
>> john_perry_usm schrieb am Sonntag, 20. Juni 2021 um 02:58:57 UTC+2:
>>
>>> Greetings
>>>
>>> Five years ago, a couple of colleagues and I began writing a Sage-based
>>> textbook to serve a class we teach at our institution. When we announced it
>>> to Sage users, we received an encouraging reception and excellent feedback.
>>> If that was meant to discourage us, it failed completely. ;-)
>>>
>>> We've updated it pretty regularly since then, correcting a lot of errors
>>> and adding a few new features, even updating to Python3. The sources have
>>> been available online for a while, but after half a decade it seems time to
>>> get a little less behind the times than we have been and move the entire
>>> project to GitHub. So, here you go:
>>>
>>>https://github.com/johnperry-math/mew_cats
>>>
>>> A new PDF version is included as a "Release", so you don't have to clone
>>> it, let alone build it. (Look for "Releases" on the right.) The license is
>>> CC-BY-SA, so feel free to clone it, fork it, commit it, push it, and any
>>> other unethical-sounding VCS operation that suits your fancy. You can even
>>> introduce errors that we haven't already included!
>>>
>>> To honor the occasion we changed the title. Two of the authors are very
>>> pleased with the acronym.
>>>
>>> We hope people find this useful for teaching, learning, and using Sage.
>>> People besides us, that is. :-)
>>>
>>> regards
>>> john perry
>>>
>> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-support/da1

Re: [sage-support] Conveniently running and building sage on Win10

2021-05-31 Thread William Stein
If I were you the first thing I would try is virtualbox with Ubuntu on the
exact same computer, and do the same benchmarks.

I also think there are some subtleties with WSL versus WSL2 - which were
you actually using?  They are dramatically different technologies…

On Mon, May 31, 2021 at 5:41 PM Nils Bruin  wrote:

> Asking for a friend ... or rather linux-challenged students:
> What's the most convenient and workable way of running sage on Win10 if
> you want to do a moderate amount of sage development as well (so, things
> like `sage -b` or `make build` should probably work, as should `git track
> push` etc.) ?
>
> I tried the WSL route and was for the most part pleasantly surprised with
> how well it worked:
>  - activating wsl worked as advertised; required a reboot, though.
>  - getting ubuntu in the "microsoft store" felt oxymoronic, but worked fine
>  - sudo apt update; sudo apt upgrade got me a functional system
>  (restarted for good measure)
>  - sudo apt install 
> worked fine
>  - git clone  got me the sage source tree
>  - make configured the mirrors and downloaded a bunch of required spkgs,
> and then complained about configure
>  - running ./configure worked well
>  - export MAKE="make -j8"; make took a long while, but produced a working
> sage
>
> However, it is rather slow! Starting up may be slow due to the underlying
> file system; however, I tested some CPU-bound computations as well and I
> found a factor 8 difference in performance!
>
> Win 10: Surface Pro 7; Intel Core i5-1035G4
> Linux: Dell XPS 13 Intel Core i5-8250U
>
> Given that the Surface Pro is newer, I'd assume these processors are
> comparable. So it would seem Win10 is doing something to significantly
> hobble the performance of the Linux virtual machine.
>
> It's nice that the WSL route is entirely based on "officially supported"
> solutions and that you end up running code in a genuine linux environment;
> the best supported environment for many of the sage components. However,
> the performance penalty makes me hesitate to recommend it to other people.
> Would Cygwin be better? Other solutions? I can offer my students remote
> access to a linux server to do their development on, but that requires the
> navigation of multiple hurdles too, so I'd imagine they'd be  happier and
> possibly more productive if they can do it all on their local machine.
>
> Best,
>
> Nils
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-support/c3687314-1fdb-4ba1-a311-49c6ca9bca0cn%40googlegroups.com
> <https://groups.google.com/d/msgid/sage-support/c3687314-1fdb-4ba1-a311-49c6ca9bca0cn%40googlegroups.com?utm_medium=email_source=footer>
> .
>
-- 
-- William Stein

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CACLE5GB69fSgwhu-vO4uRnpZsNdGU-EWqmkU83zc_iW1H%2BQkAg%40mail.gmail.com.


Re: [sage-support] http://aleph.sagemath.org/

2021-03-24 Thread William Stein
Minor point: it was very aggressive cryptocurrency miners, not spammers...

On Wed, Mar 24, 2021 at 3:45 AM Dima Pasechnik  wrote:

> On Wed, Mar 24, 2021 at 10:28 AM 'Martin R. Albrecht' via sage-support
>  wrote:
> >
> > Hi there,
> >
> > The trusted Sage Cell server stopped loading external resources, e.g. for
> >
> > load("https://bitbucket.org/malb/lwe-estimator/raw/HEAD/estimator.py;)
> > n, alpha, q = 256, 0.0009765625, 65537
> > set_verbose(1)
> > _ = estimate_lwe(n, alpha, q)
> >
> >
> http://aleph.sagemath.org/?z=eJxNjcEKwjAQBe-F_kPoqYXYjZWkKHgQFPyLkOhii6mJyWrx782hiO84MPOcN9e6GohC2gHYkezrckdqfbzBZJwFN-MKE42TIR8hmhnOp8MRfqgNn6opiwdnxoXBcPZke9ZJxZlohRDbXknVSbGMMyXlpi-LhKTfGK1PWK-zr7O1NFHnz_ov2HwBPwsyhw===sage
> >
> > I’m getting
> >
> > gaierror: [Errno -3] Temporary failure in name resolution
> >
> > During handling of the above exception, another exception occurred:
> >
> > Is that a bug or by design (i.e. tightened security)?
> >
> by design. They were hit by spammers and had to disable this.
> See https://groups.google.com/g/sage-cell/c/ETeONQMYbQM
>
>
> > Cheers,
> > Martin
> > --
> >
> > _pgp: https://keybase.io/martinralbrecht
> > _www: https://malb.io
> >
> > --
> > 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-support/87k0pwc0cs.fsf%40googlemail.com
> .
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-support/CAAWYfq2DPfVefnOf-3N1SsroXieiHJOwuXG_N3q%2BiqeisuhdAg%40mail.gmail.com
> .
>
-- 
-- William Stein

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CACLE5GA4cTzXa%2Bt1xXMFWxpogO%3D7QG2%3Db47e%3DknxgwmkLua76g%40mail.gmail.com.


[sage-support] Re: [sage-devel] Apple M1 chip

2020-12-18 Thread William Stein
On Fri, Dec 18, 2020 at 11:26 AM Dima Pasechnik  wrote:

> > It is of course impossible to build or install anything with this
> > binary.  Why do we not ship openssl as part of the binary (the license
> > issues got resolved a few years ago)?
> It's not resolved yet.

But openssl is licensed apache2.  Is the problem that only new
versions of openssl are so licensed, and they don't work well enough
yet?  Just curious...

> > Dima adds:
> > > You might try building the latest beta in Homebrew installed into the 
> > > Intel emulator. We are very curious to know how far one can go this way.
> >
> > I tried this and I can report that, for me at least, this was a
> > complete disaster.  Though I could install homebrew, I tried many
> > times in various ways, and couldn't really get *anything* in Sage to
> > successfully compile, though ./configure worked.
>
> a common catch with Homebrew is forgetting to run
>
> source .homebrew-build-env
>
> before ./configure

Thanks.  I did see that and it didn't help (and I just double
checked).  So I'm pretty stumped regarding this approach.

(Windows 10 aside:)

To add to my notes above, I mentioned that I also have a powerful new
Dell Windows 10 laptop with a 10th gen
Intel processor and Sage installed via Docker.  I just built sage
9.3.beta4 on that machine entirely under WSL2 (+Ubuntu), i.e.,
"Windows Subsystem for Linux 2".  The timings are much better than
with Docker desktop:

```
sage: %time d = random_matrix(QQ,1000)**2  # 516ms on WSL2
CPU times: user 544 ms, sys: 40 ms, total: 584 ms
sage: %time ModularSymbols(5077,sign=1).decomposition() # 11.3s on WSL2
CPU times: user 14.3 s, sys: 170 ms, total: 14.4 s
sage: %time sum(range(10^8)) # 953ms on WSL2
CPU times: user 1.85 s, sys: 0 ns, total: 1.85 s
```

Morever, WSL2 is very "integrated with Windows", with full filesystem
access, and super fast startup time. Also "./sage -notebook" just
worked with zero issues.  So WSL2 is really, really good.  It's
currently difficult to install on Windows 10, but I think it'll be
much easier sometime in the next year.  One nice thing is that it
works fine on "Windows 10 home" -- you don't know pro anymore...



--
William (http://wstein.org)

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CACLE5GDv09_0WQZ2e2HSa1xrspdPWDT%3DYif_RzWvdbUTZ_DMOQ%40mail.gmail.com.


Re: [sage-support] Effect of deleting zip file

2020-12-18 Thread William Stein
Yes.

On Fri, Dec 18, 2020 at 9:58 AM Karima Shahzad  wrote:
>
> Hi every one,
> I have the simplest question,
> I want to free up some space, Can I delete the Sage zip file 
> (sage-9.1.tar.bz2) after installation, if it has no effect?
>
> Thank you,
>
> Best
> Karim S
>
> --
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-support/CADp1E_p70pUX4%2BfWe6THrDCsZMO8GV7PKkTT%3DXkd3JxnnG9rhA%40mail.gmail.com.



-- 
William (http://wstein.org)

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CACLE5GAypMEYcM63m1CMW7YsOO1OAxz2DuOmuK363rzjfLOaCQ%40mail.gmail.com.


[sage-support] Apple M1 chip

2020-12-18 Thread William Stein
Hello,

There is a thread [1] on sage-support about using Sage on the new
Apple M1 ARM 64-bit based laptops.  I have one of these, so I decided
to investigate, since this M1 processor is very, very impressive
regarding the compute / watt ratio.

Tom Judson asked:
> I have a new MacBook Air with an Apple M1 chip. Does the Intel version of 
> Sage 9.2 work on this machine?

I assume by this question he really means "does the intel binary build
of Sage work"?  It's a weird question, since Tom can presumably just
download the binary and see whether the answer is yes or no, so
presumably he already tried that and it didn't obviously work, but he
doesn't say either way.

Dima responds:
> 9.2 is not known to work on macOS 11 (the one you have on M1), as far as I 
> know.

I think this means that nobody has tried it yet and reported back
either way to the mailing list.  So I downloaded
sage-9.2-OSX_10.15.7-x86_64.dmg from
http://files.sagemath.org/osx/intel/index.html, extracted it, and
tried it.

(1) I tried using the normal Terminal:
```
% cd /Applications/SageMath
% ./sage
...

/Applications/SageMath/src/bin/sage-python: line 2:  6235 Killed: 9
   sage -python "$@"
```

(2) I tried making a copy of Terminal that is run using Rosetta 2, as
explained in the Homebrew install directions.
```
% cd /Applications/SageMath
% ./sage
...
```

A message pops up: "“python3.8” cannot be opened because the developer
cannot be verified.  macOS cannot verify that this app is free from
malware."  So I disable Gatekeeper:

```
% sudo spctl --master-disable
```

Then go to the "Security & Privacy --> General" configuration dialog
and re-enable python.  Trying to run Sage again gives a dialog and the
option to run Python.  Say "Open".  Now sage does appear to start
(takes over a minute!), showing various warnings as things get
imported:

```
wstein@Williams-MBP SageMath % ./sage

┌┐

│ SageMath version 9.2, Release Date: 2020-10-24 │

│ Using Python 3.8.5. Type "help()" for help.│

└┘

/Applications/SageMath/local/lib/python3.8/site-packages/traitlets/config/loader.py:795:
SyntaxWarning: "is" with a literal. Did you mean "=="?

  if len(key) is 1:

/Applications/SageMath/local/lib/python3.8/site-packages/traitlets/config/loader.py:804:
SyntaxWarning: "is" with a literal. Did you mean "=="?

  if len(key) is 1:


/Applications/SageMath/local/lib/python3.8/site-packages/sage/calculus/functional.py:57:
DeprecationWarning: invalid escape sequence \d

  """
```

It works!  (And startup is very fast after the first slow startup.)
```
sage: 2+2
4
sage: integrate(sin(x^2),x)
/Applications/SageMath/local/lib/python3.8/site-packages/mpmath/ctx_mp_python.py:892:
SyntaxWarning: "is" with a literal. Did you mean "=="?

  if other is 0:

/Applications/SageMath/local/lib/python3.8/site-packages/mpmath/ctx_mp_python.py:986:
SyntaxWarning: "is" with a literal. Did you mean "=="?

  if other is 0:

1/16*sqrt(pi)*((I + 1)*sqrt(2)*erf((1/2*I + 1/2)*sqrt(2)*x) + (I -
1)*sqrt(2)*erf((1/2*I - 1/2)*sqrt(2)*x) - (I -
1)*sqrt(2)*erf(sqrt(-I)*x) + (I + 1)*sqrt(2)*erf((-1)^(1/4)*x))
sage: ModularSymbols(389,sign=1).decomposition()[-1]
Modular Symbols subspace of dimension 20 of Modular Symbols space of
dimension 33 for Gamma_0(389) of weight 2 with sign 1 over Rational
Field
```

Jupyter notebook fails though with

```
wstein@Williams-MBP SageMath % ./sage -notebook
ModuleNotFoundError: No module named '_ssl'
The Jupyter notebook requires ssl, even if you do not use
https. Install the openssl development packages in your system and
then rebuild Python (sage -f python3).
```

It is of course impossible to build or install anything with this
binary.  Why do we not ship openssl as part of the binary (the license
issues got resolved a few years ago)?  Do we really ship binaries for
OS X that can't even wrote Jupyter notebook... or maybe this is a side
effect of Rosetta2.

In any case, Sage works, but Jupyter notebook doesn't.   However, one
could certainly directly install Jupyter separate from Sage, then
create a kernel.  I'm sure that would (eventually) work, so the answer
to Tom's original question is basically **YES**, the Sage 9.2 x86
binary works on Apple's M1 chip.

What about Cython code?  Works fine (note -- I do have xcode and
homebrew installed):

```
wstein@Williams-MBP SageMath % vi a.spyx. # make a little program in cython...
sage: %load a.spyx
sage: f(10)
11
```

Dima adds:
> You might try building the latest beta in Homebrew installed into the Intel 
> emulator. We are very curious to know how far one can go this way.

I tried this and I can report that, for me at least, this was a
complete disaster.  Though I could install homebrew, I tried many
times in various ways, and couldn't really get *anything* in Sage to
successfully compile, though ./configure 

[sage-support] @interact

2019-04-26 Thread William Stein
Hi,

I decided to try just a single random example of @interact in Jupyter
with the sage kernel, since I guess Jereon (?) built
an implementation of interact on top of ipywidgets, and I was
surprised that it failed pretty badly.  If you give this as input,

@interact
def f(A = matrix([[1,1],[-1,1]])):
print(A)
print(type(A))

# the output is:
(1, 1)


So it thinks that matrix is a vector...

I don't think ipywidgets even has a matrix input control, so I'm
curious what the plan was here?  In any case, I guess @interact is
still maybe missing some things compared to what is in sagenb?  I
couldn't find anything in trac about this.

 -- William

https://trac.sagemath.org/search?q=%40interact+matrix+jupyter


-- 
William (http://wstein.org)

-- 
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.


Re: [sage-support] "Questions about Sage"

2019-02-26 Thread William Stein
Thanks!!

On Tue, Feb 26, 2019 at 6:06 AM Vincent Delecroix
<20100.delecr...@gmail.com> wrote:
>
> Dear William,
>
> That is a good idea and the list seems to be complete.
>
> * You use both Sage and SageMath. It is a bit confusing.
>
> * I would change the order to reflect where you
>should look at. i.e. put as very last the "report a bug".
>Perhaps also, Sage documentation would be better as
>"one before the last" since it is not that easy to
>browse if you are not used to it.
>
> BTW, what happen with the bug reports at [1]?
>
> [1] https://github.com/sagemathinc/cocalc/wiki/SageBug
>
> Best
> Vincent
>
> Le 26/02/2019 à 04:57, William Stein a écrit :
> > Hi,
> >
> > We put a list of resources for end users asking questions about Sage
> > for the cocalc docs here:
> >
> > https://doc.cocalc.com/howto/sage-question.html?highlight=ask%20sagemath%20org
> >
> > Are we missing anything important?  If so, let me know or click the
> > "Edit in Github" button...
> >
> > William
> >



-- 
William (http://wstein.org)

-- 
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] "Questions about Sage"

2019-02-25 Thread William Stein
Hi,

We put a list of resources for end users asking questions about Sage
for the cocalc docs here:

https://doc.cocalc.com/howto/sage-question.html?highlight=ask%20sagemath%20org

Are we missing anything important?  If so, let me know or click the
"Edit in Github" button...

William

-- 
William (http://wstein.org)

-- 
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.


Re: [sage-support] Re: dynamic variable names

2018-12-01 Thread William Stein
On Sat, Dec 1, 2018, 4:00 PM Nils Bruin  On Saturday, December 1, 2018 at 3:36:55 PM UTC-8, Tevian Dray wrote:
>>
>> How can I create variable names programmatically, then assign values to
>> them?
>>
>> Python doesn't make that particularly easy, and it also doesn't make
> accessing variables thus created particularly easy.
>

It actually does make both easy, via the globals() dict... :-)

I suspect the appropriate solution for you is to construct some container
> object and store the values in there, such as:
> D={}
> for i in [1..20]:
> D[3*i+1] = "value"
>
> for i in [1..20]:
> print(D[3*i+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.
>

-- 
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.


Re: [sage-support] dynamic variable names

2018-12-01 Thread William Stein
Use the globals() Python dictionary.

E.g.,

$ python
Python 2.7.15rc1 (default, Apr 15 2018, 21:51:34)
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> globals()['q' + str(5)] = 15
>>> q5
15


On Sat, Dec 1, 2018 at 3:36 PM Tevian Dray  wrote:
>
> How can I create variable names programmatically, then assign values to them?
>
> I've tried creating variables with something like
> var('q'+str(n))
> but my attempts to assign a value to such a variable have been unsuccessful.
> The underlying problem is that I do not know in advance how many variables 
> will
> be required, so I need some way to assign values to indexed variables in some 
> sort
> of loop based on the index.  But I can't figure out how to simultaneously 
> call the variable
> using a parameter, and assign a value to this parametrized variable.
>
> This may be a Python issue, rather than Sage...
>
> --
> 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.



-- 
William (http://wstein.org)

-- 
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.


Re: [sage-support] please explain this output

2018-11-10 Thread William Stein
On Sat, Nov 10, 2018 at 8:06 AM David Joyner  wrote:
>
>
>
> On Sat, Nov 10, 2018 at 10:59 AM Michael Beeson  wrote:
>>
>> def test():
>> for b in range(5,6):
>> for c in range(b+1,b+2):
>> print(b,c,n(c/b))
>> print(5,6,n(6/5))
>>
>> And the output
>>
>> sage: test()
>>
>> (5, 6, 1.00)
>>
>> (5, 6, 1.20)
>>
>> sage: version()
>>
>> 'SageMath version 8.0, Release Date: 2017-07-21'
>>
>>
>> And the question:  why are the two lines not identical?
>
>
> My guess is that python 2.7 interprets c/b to be 1, by the sage preparser
> interprets 6/5 to be an element of QQ. Just a guess.

Your guess is correct.  In Sage (with python2), we have

sage: type(list(range(5,6))[0])

sage: type(5)


> With Python 3, they
> should be the same.

Yep, though 6/5 in Python3 ints is a *double* and 6/5 in Sage is a
rational. However n(...) are the same.
This is Python3 Sage:

sage: a = int(6)/int(5); a
1.2
sage: type(a)

sage: n(a)
1.20
sage: n(6/5)
1.20

And the original loop using Python3 sage:

sage: def test():
: ^Ifor b in range(5,6):
: ^I^Ifor c in range(b+1,b+2):
: ^I^I^Iprint(b,c,n(c/b))
: ^Iprint(5,6,n(6/5))
:
sage: test()
5 6 1.20
5 6 1.20



>
>>
>>
>> --
>> 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.
>
> --
> 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.



-- 
William (http://wstein.org)

-- 
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.


Re: [sage-support] public notebooks: where'd they go

2018-10-09 Thread William Stein
On Tue, Oct 9, 2018 at 5:22 PM Ken Ribet  wrote:
>
> Hi All,
>
> Long ago I posted a public Sage notebook in connection with a course I was 
> teaching -- http://sagenb.org/home/pub/3914/ .  The link no longer works (no 
> surprise!).  My colleague who is teaching the course this year would like to 
> see the notebook.  Is there some way to retrieve it?  (I doubt that I have a 
> copy anywhere.)  Thanks in advance!
>

Here it is:

https://share.cocalc.com/share/19575ea0-317e-402b-be57-368d04c113db/pub/3901-4001/3914.sagews?viewer=share

All old public sage notebooks are here:

https://share.cocalc.com/share/19575ea0-317e-402b-be57-368d04c113db/pub/?viewer=share
> Ken
>
> --
> 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.



-- 
William (http://wstein.org)

-- 
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.


Re: [sage-support] Sage and Canvas LMS

2018-10-02 Thread William Stein
On Tue, Oct 2, 2018 at 12:56 AM Mathew Reed  wrote:
>
> I was wondering if Sage could be used for gradable assignments in an LMS, 
> such as Canvas?
> I'm using the LTI which works fine when inserted into an Assignment. 
> Typically, assignments are summative and count toward a students overall 
> grade and the results displayed in a gradebook.
> However, when testing from a students perspective, it seems that calculations 
> can be evaluated, but not 'submitted' for grading.
>
> Any info on this would be appreciated!
>

For what it is worth, we have not added any LTI integration yet to
https://CoCalc.com, but it is on our roadmap, and we've been thinking
about it recently.

 -- William

-- 
William (http://wstein.org)

-- 
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.


Re: [sage-support] Quaternions, how to speed up computation

2018-09-14 Thread William Stein
On Fri, Sep 14, 2018 at 9:00 AM, Peter Luschny  wrote:
> How can I speed up this computation?
>
> H. = QuaternionAlgebra(SR, -1, -1)

Do NOT use SR.  Instead use QQ(x).  Then it is 100x faster than Mathematica...

R. = QQ[]
K = R.fraction_field()
H. = QuaternionAlgebra(K, -1, -1)
def Q(a, b, c, d): return H(a + b*i + c*j + d*k)
def P(n): return Q(x+1,1,1,1)*P(n-1) if n > 0 else Q(1,0,0,0)
def p(n): return P(n)[0].numerator().list()
for n in (0..20): print [n], p(n)

This takes 0.05s walltime.  See

https://share.cocalc.com/share/4a5f0542-5873-4eed-a85c-a18c706e8bcd/support/2018-09-14-091151-quat.sagews?viewer=share

Also, if you want to actually push things further, note that your
function P depends on all smaller values of
P, so you could make this massively faster by making P use
@cached_function, like this:

R. = QQ[]
K = R.fraction_field()
H. = QuaternionAlgebra(K, -1, -1)
def Q(a, b, c, d): return H(a + b*i + c*j + d*k)
@cached_function
def P(n):
return Q(x+1,1,1,1)*P(n-1) if n > 0 else Q(1,0,0,0)
def p(n): return P(n)[0].numerator().list()
for n in (0..20): print [n], p(n)

This takes 0.01s walltime, and will work for 20 replaced by a much
larger number.
Read about this cached_function decorator:

http://doc.sagemath.org/html/en/reference/misc/sage/misc/cachefunc.html


> def Q(a, b, c, d): return H(a + b*i + c*j + d*k)
> def P(n): return Q(x+1,1,1,1)*P(n-1) if n > 0 else Q(1,0,0,0)
> def p(n): return P(n)[0].list()
> for n in (0..20): print [n], p(n)
>
> [0] [1]
> [1] [1, 1]
> [2] [-2, 2, 1]
> [3] [-8, -6, 3, 1]
> [4] [-8, -32, -12, 4, 1]
> [5] [16, -40, -80, -20, 5, 1]
> [6] [64, 96, -120, -160, -30, 6, 1]
> ...
>
> With Mathematica this takes 6 sec, with Sage it takes
> hours, (in fact I interrupted after n=15).
>
> Thanks, Peter
>
>
> --
> 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.



-- 
William (http://wstein.org)

-- 
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.


Re: [sage-support] Plotting question: use higher precision when evaluating the function?

2018-08-31 Thread William Stein
On Fri, Aug 31, 2018 at 11:15 AM, John H Palmieri
 wrote:
> The question
>
>
> https://ask.sagemath.org/question/43517/conflicting-sage-vs-wolfram-evaluation-of-a-limit/
>
> brought the following question to mind: can you specify the precision to
> which a function is evaluated when plotting it? The particular
> ask.sagemath.org question involves a function which has "inherent numerical
> instability", as kcrisman says in his answer. For example, evaluating V(20,
> 1).n() will result in "ValueError: power::eval(): division by zero", but
> V(20,1).n(300) gives an actual number. Is there a way to pass the numerical
> precision to the plot function?
>
> (I am not an expert in the plotting code in Sage, but when I look at the
> plot code, I see the function "generate_plot_points" which calls
> float(f(...)). That makes me think that the available precision is fixed.
> But maybe I'm wrong.)

I wrote a lot of the plot code and I think it only works with floats.
I don't think we implemented anything at all to automatically deal
with high precision.

As a workaround, if you have a function f you want to plot to high
precision, maybe do this:

R = RealField(500)
def wrap(x):
 # x is a floating point number
 return f(R(x))

plot(wrap, ...)

---

Alternatively, compute in any way you want (to very high precision) a
list v of pairs (x,y), then do "line(v)" to get a plot of that.


>
> --
> 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.



-- 
William (http://wstein.org)

-- 
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.


Re: [sage-support] Complete Graph on two vertices

2018-08-13 Thread William Stein
On Mon, Aug 13, 2018 at 3:37 PM, pong  wrote:
> On SAGE 8.2
>
> graphs.CompleteGraph(2).show()
>
> returns a diagram of two isolated points. Anyone can reproduce the same
> issue?

Yes, I see the same thing:

https://share.cocalc.com/share/4a5f0542-5873-4eed-a85c-a18c706e8bcd/support/2018-08-13-complete2.ipynb?viewer=share

It's definitely a bug in the plot function, since the D3 based
plotting Nathaan Cohen wrote doesn't have the problem (see link).

>
> Yet, graphs.CompleteGraph(2).edges() does return [(0, 1, None)]
>
> --
> 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.



-- 
William (http://wstein.org)

-- 
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.


Re: [sage-support] Re: solving equations with parameters

2018-08-13 Thread William Stein
On Mon, Aug 13, 2018 at 12:55 PM, Simon King  wrote:
> Hi Dominique,
>
> On 2018-08-13, Dominique Laurain  wrote:
>> PS : use asksagemath.org
>
> -1!
>
> There are people (I, for instance) who hate the guts of
> ask.sagemath.org.

Agreed... though for me it's mostly due to me getting banned half the time
I try to use it...

At this point, it would probably be a lot better to point people at
stackoverflow, and just suggest some tags they can use...

> Seriously, I find the whole system of badges and tags
> and colourful symbols and embedded editors both distracting and
> discouraging. I regularly have a look at sage-support, but haven't been
> on ask.sagemath.org in the last couple of years.
>
> While it is OK to keep ask.sagemath.org running, I find it very wrong to
> forward people to ask.sagemath.org when they ask a question on
> sage-support (which clearly is *a* port for those seeking help).
>
> Best regards,
> Simon
>
> --
> 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.



-- 
William (http://wstein.org)

-- 
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.


Re: [sage-support] Permision to provide a Sage software

2018-05-23 Thread William Stein
On Wed, May 23, 2018 at 6:23 AM, Francisco de Arriba
 wrote:
> We are trying to migrate to Jupiter, but while we can not solve some
> problems we want to keep a stable version of Sage on our server. This
> version will be available for downloading students and readers of our
> scientific articles. We know that Sage is a free open-source mathematics
> software system licensed under the GPL and we believe that we can provide
> our download link without any problems, but to be sure we wanted to consult
> it in this forum.
>
> The software provided would be the same that is available on the web page
> and its use would be exclusively for students and people who have read any
> of our articles and are interested in accessing this software. We need this
> to make sure that a version is always available and that it will not be
> accessible in the future.
>
> Is there a problem with the license that prevents doing this?

The license strongly **encourages** this.   Go for it!   I started
Sage 14 years ago so I could say YES to questions like this,
because with Magma I couldn't.

   -- William

>
> Thanks.
>
> --
> 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.



-- 
William (http://wstein.org)

-- 
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.


Re: [sage-support] Re: editor for sage commands

2018-05-19 Thread William Stein
Nteract is a very nice jupyter client as a local electron app, from which
you could use sage.  It's mainly developed by Kyle Kelly for Netflix.

- william

On Sat, May 19, 2018, 12:25 PM Dima Pasechnik  wrote:

> e.g. in Chrome you have full-screen mode.
> It takes the browser destruction out, and indeed you could think of a
> dedicated Jupyter console then.
>
> --
> 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.
>

-- 
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.


Re: [sage-support] Re: 500: Internal server error when I access the data files

2018-05-03 Thread William Stein
On Thu, May 3, 2018 at 6:24 PM, kcrisman  wrote:
>
>> The standard solution is Jupyterhub. That's a non-trivial undertaking to
>> set up, though. The processes for the users run in dedicated docker
>> containers. sagenb was a lot easier for this, but never properly secure. I
>> wouldn't dare asking a sysadmin to deploy a sagenb server. Jupyterhub is
>> quite well-engineered.
>
>
> That's as may be, but it worked, easily, and properly sandboxed it was never
> really that kind of security risk, from what I understand (assuming one
> didn't allow published worksheets, which as is known were much easier to
> cause trouble with).  I really wish that we could have held on to a little
> more developer interest for maintaining sagenb until Juypterhub was "stupid
> easy" to use.
>
> Would a local CoCalc Docker install for multiple users be any easier to set
> up than JH, or worse?  (I assume harder, but that's not a very informed
> thought.)

A local CoCalc docker is pretty easy (just paste 2-3 lines and it
works), but the current image is really old.  I wish I (or somebody)
had the time to update it (it's 100% open source).   I would, but I'm
just too busy with other things right now.   David Roe has run whole
Sage days with this image and it worked well, and many UW students use
some of our big servers in the basement via a (very old) local Docker
image of Cocalc running.

I can't believe there isn't also a similarly easy to use JupyterHub
docker image though, which is surely well maintained.  Has anybody
looked?

All that said, I'm pretty optimistic that I (or somebody) will find
time to make a new cocalc Docker image...

 -- William

>
> --
> 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.



-- 
William (http://wstein.org)

-- 
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] Fwd: Typo in Sage documentation

2018-02-28 Thread William Stein
-- Forwarded message --
From: Philip Turecek <philip.ture...@fau.de>
Date: Wed, Feb 28, 2018 at 1:47 PM
Subject: Typo in Sage documentation
To: wst...@sagemath.com


Dear Mr Stein,

I found a typo in the Sage documentation, at the function period():

http://doc.sagemath.org/html/en/reference/rings_standard/sage/rings/rational.html#sage.rings.rational.Rational.period

It should be
"In general if d=2^a5^bm where m is coprime to 10"
instead of
"In general if d=2^a3^bm where m is coprime to 10".

Best regards,

Philip Turecek


-- 

Best Regards,
William Stein

CEO, SageMath, Inc.

-- 
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.


Re: [sage-support] Sage and scipy

2018-02-14 Thread William Stein
On Wed, Feb 14, 2018 at 7:54 AM, Thomas Judson  wrote:
> What routines can be imported from the spicy.integrate module 
> (https://docs.scipy.org/doc/scipy/reference/integrate.html#module-scipy.integrate)
>  into Sage?
>

I think the answer to "What routines can be imported from [basically
any python2 library in existence] into Sage?" is "all of them".

> twj
>
>
> =
> Thomas W. Judson, Associate Professor
> Department of Mathematics and Statistics
> Stephen F. Austin State University
> P.O. Box 13040-3040 SFA Station
> Nacogdoches, TX  75962
>
> OFFICE: 316 Math
> TEL: (936) 468-1704
> EMAIL: judso...@sfasu.edu
>
>
>
>
> --
> 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.



-- 
William (http://wstein.org)

-- 
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.


Re: [sage-support] Fwd: GSoC 2018: Sage Mathematical Software System has been accepted as a mentor organization!

2018-02-12 Thread William Stein
Congrats!  And thanks to all the great mentor project ideas!

On Mon, Feb 12, 2018 at 11:24 AM, Dima Pasechnik  wrote:

> yes!
> -- Forwarded message --
> From: "Google Summer of Code" 
> Date: 12 Feb 2018 17:10
> Subject: GSoC 2018: Sage Mathematical Software System has been accepted as
> a mentor organization!
> To: 
> Cc:
>
> [image: Google Summer of Code]
>
> Congratulations! Sage Mathematical Software System has been selected as a
> Google Summer of Code 2018 mentor organization.
>
> You can now invite mentors and update your organization profile.
>
> Please click here to visit your dashboard: https://summerofcode.withgoogl
> e.com/dashboard/
>
> This email was sent to dimp...@gmail.com.
>
> You are receiving this email because of your participation in Google
> Summer of Code 2018.
> https://summerofcode.withgoogle.com
>
> To leave the program and stop receiving all emails, you can go to your
> profile  and
> request deletion of your program profile.
>
> For any questions, please contact gsoc-supp...@google.com. Replies to
> this message go to an unmonitored mailbox.
>
> © 2018 Google LLC, 1600 Amphitheatre Parkway, Mountain View, CA 94043, USA
> 
>
> --
> 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.
>



-- 
William (http://wstein.org)

-- 
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.


Re: [sage-support] Re: Setting up a sage notebook server for multiple accounts

2018-02-11 Thread William Stein
On Sun, Feb 11, 2018 at 5:07 PM, Kwankyu  wrote:
>
>
> On Monday, February 12, 2018 at 3:55:35 AM UTC+9, William wrote:
>>
>>
>> In CoCalc.com we use Calico to program the Linux routing table, which
>> makes it easy to restrict connections between parts of the system, not
>> allow outgoing connections by default, etc.
>
>
> Not to allow outgoing connections from a user's Jupyter notebook is the most
> desirable for me. But this seems impossible with Jupyter notebook because
> the account under which the Jupyter notebook runs and the account under
> which the sage kernel runs are the same. In the old sage nb, the two
> accounts are separate.
>
> Am I wrong? I hope so...

You hypothesis is right, but your conclusion is not.  What one
typically blocks is creation of new outgoing tcp connection.  The
jupyter notebook  server doesn't need to create new outgoing
connections; it just handles incoming connections.



William

>
> --
> 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.



-- 
William (http://wstein.org)

-- 
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.


Re: [sage-support] Re: Setting up a sage notebook server for multiple accounts

2018-02-11 Thread William Stein
On Sun, Feb 11, 2018 at 1:10 AM, Dima Pasechnik  wrote:
>
>
> On Sunday, February 11, 2018 at 1:20:59 AM UTC, Kwankyu wrote:
>>
>>
>>
>> On Sunday, February 11, 2018 at 8:00:46 AM UTC+9, kcrisman wrote:
>>>
>>> That is a great question.  Sagenb (what you have found) does not serve up
>>> Jupyter.  It would be really interesting to hear from someone who knows
>>> about Jupyterhub and whether that is a stable solution at this point.
>>
>>
>> I don't have an experience of deploying Jupyterhub, but for experiments
>> have installed a Jupyterhub server on a ubuntu machine.
>>
>> Jupyterhub is really just a hub for Jupyter notebooks. A user, after login
>> in the login webpage, have a Jupyter notebook runnng with his(her) own
>> account of the machine. So it is like the user login to a machine and run a
>> Jupyter notebook in the shell and use the notebook on a web browser.
>>
>> For me, a big concern of running Jupyterhub on my machine is security. If
>> you give an id and passwd to a user (say a student), then (s)he can whatever
>> you can do on a linux machine with internet connection.
>
>
> This is not really true. There are many ways to restrict what a user can do.
> E.g. cocalc does more or less the same thing: a cocalc project is associated
> with a unique linux user account (and yes, for non-paying users there is no
> full-blown internet access).

The CoCalc docker image I linked to automatically creates new accounts
for each user, all inside a single Docker image... so that's some
isolation from the rest of the system.

The main CoCalc.com website does NOT do that.  Instead all projects
appear to themselves to be running as the same Linux user, but each is
isolated inside its own separate Docker container, scheduled using
Kubernetes across a cluster of small VM's.There was a talk at the
last Kubecon about a way to run JupyterHub that similarly schedules
users on a cluster using Kubernetes  --

  https://www.youtube.com/watch?v=g5rl7T18n-s=youtu.be

This is the same thing that Volker mentioned.

> And you are right, if you restrict a user within a lightweight virtual
> machine it's more secure.
> E.g. FreeBSD has something called jails for such a purpose:
> https://www.freebsd.org/doc/handbook/jails.html
> Not sure what's Linux equivalent for this.

Containers.  Docker is by far the most mature at this point.  There's
also rkt, which is far less mature (according to my tests).  Volker
mentioned LXC, but it's also less mature than Docker.  Containers are
typically paired with use of cgroups (which initially Google pushed
into Linux, based on their internal needs) to isolate groups of
processes, and impose limits (e.g., on memory, cpu, processes, etc.).

In CoCalc.com we use Calico to program the Linux routing table, which
makes it easy to restrict connections between parts of the system, not
allow outgoing connections by default, etc.


Volker:

>  [...] whereas SageNB runs everyone under the same unix account.

More precisely, it used a rotating pool of pre-created unix accounts...

-- 
William (http://wstein.org)

-- 
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.


Re: [sage-support] Re: Setting up a sage notebook server for multiple accounts

2018-02-10 Thread William Stein
Another option is CoCalc Docker

https://github.com/sagemathinc/cocalc-docker

though the community is going to have to work on this to make it
really useful, for now.

On Sat, Feb 10, 2018 at 3:00 PM, kcrisman  wrote:
> That is a great question.  Sagenb (what you have found) does not serve up
> Jupyter.  It would be really interesting to hear from someone who knows
> about Jupyterhub and whether that is a stable solution at this point.
>
>
> On Friday, February 9, 2018 at 9:11:21 PM UTC-5, Andrew wrote:
>>
>> Is there an update to date description somewhere of how to set up a
>> (secure) sage notebook sever, with jupyter notebooks, that has multiple user
>> accounts. The best description that I have found is
>>
>> https://wiki.sagemath.org/SageServer
>>
>> Andrew
>>
>>
> --
> 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.



-- 
William (http://wstein.org)

-- 
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.


Re: [sage-support] Piecewise plot not smooth on Jupyter

2018-01-21 Thread William Stein
On Sun, Jan 21, 2018 at 9:01 AM Simon Willerton <s.willer...@sheffield.ac.uk>
wrote:

> Hi!
>
> There seems to be a bug in the plotting in the Jupyter notebook.  The
> following piecewise defined function should be smooth at r=1 but the plot
> is not; the first part of the plot seems to be lifted slightly.  I noticed
> this in a more complicated example but this is a reasonably minimal case.
>
> r = var('r')
> plot(2*r - r^2, r, 0, 1) + plot(1, r, 1, 2)
>
> This bug doesn't seem to occur in CoCalc .sagews notebook but does occur
> in SageMath Kernels 7.6, 8.0, 8.1 in a CoCalc Jupyter notebook and offline
> on my Mac OS X Sierra in a Jupyter notebook.
>

It could be an issue with svg versus png output.


>
> Cheers,
>
> Simon.
>
> --
> 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.
>
-- 
-- William Stein

-- 
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.


Re: [sage-support] Re: avoiding startup time cost with multiple invocations

2018-01-14 Thread William Stein
On Sun, Jan 14, 2018 at 1:26 PM, slelievre  wrote:
> Forking a Sage process might be a way to achieve your goal.
>
> Maybe someone more knowledgeable could say more about
> how to fork a Sage process and where it is documented.

Type

parallel?

and

fork?

in Sage...

>
> --
> 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.



-- 
William (http://wstein.org)

-- 
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.


Re: [sage-support] Test Site Applications

2017-12-09 Thread William Stein
This message from Rob was a (boring) accident, and was meant to be sent to
a different list.Please ignore.

On Sat, Dec 9, 2017 at 10:57 AM Rob Beezer <bee...@ups.edu> wrote:

> I need to [...] a mildly tedious affair.
>
-- 
-- William Stein

-- 
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.


Re: [sage-support] sage notebook /worksheet of

2017-11-18 Thread William Stein
And if you're actually using "sage worksheets" (i.e., .sagews files on
cocalc), you can use

https://github.com/sagemathinc/cocalc-docker

or click the "Jupyter" button in cocalc to convert them to jupyter,
then use Jupyter:

   sage -notebook

On Sat, Nov 18, 2017 at 11:26 AM, Dima Pasechnik  wrote:
> Certainly, without an internet connection and with Sage installed you can use 
> either Jupyter worksheets or (obsolete and not recommended) Sage notebooks 
> just fine.
>
> --
> 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.



-- 
William (http://wstein.org)

-- 
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.


Re: [sage-support] Re: How to send a sagetex file to someone who doesn't use sage?

2017-11-08 Thread William Stein
On Wed, Nov 8, 2017 at 2:46 PM, Emmanuel Charpentier
 wrote:
> I tried to anwer this question, hinting at makestatic.py (part of SageTeX).
> It turns out that this script is indeed unmaintained and currently not
> working. The bug(s) aren't obvious to me...
>
> I have edited my ask.sagemath.org answer but left it mostly unchanged as a
> hint for people seeking \LaTeX-related work ;-).
>
> Question : is this ticket-worthy ? I didn't find any mention of it in
> existing tickets.

YES.   And we really need somebody new to work on this, since Dan
Drake left academia.  (That's why I originally suggested sage-devel to
the OP.)

>
> --
> Emmanuel Charpentier
>
>
> Le mercredi 8 novembre 2017 18:31:28 UTC+1, kcrisman a écrit :
>>
>> Dear Deepak,
>>
>> Great question!  I'm forwarding it to sage-support where such questions
>> typically are answered.
>>
>> On Wednesday, November 8, 2017 at 12:10:31 PM UTC-5, DEEPAK SARMA wrote:
>>>
>>> I have written an article in Sagemathcloud using the sagetex package. Now
>>> If I send it to a journal for publication or to any of my friends (who don't
>>> use sage), how can they run it? In a youtube video, I learned that in
>>> addition to the .tex file, I have to send the .sout file generated in SMC. I
>>> tried this method, but It didn't work. May be I'm missing something.
>>
>>
>> In this case, it depends partly on what you are including.  So for
>> instance I create figured, so I probably need the whole directory
>> sage-plots-for-filename.tex .  Maybe the .aux file as well? And of course
>> they would still need access to the *style* file .sty in any case, even if
>> Sage doesn't have to run because you provide everything for them.
>>
>> Unfortunately I don't have a system to test this on without sagetex, but
>> hopefully someone else can answer if providing the (correct) style file
>> doesn't suffice.
>>
>> - kcrisman
>
> --
> 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.



-- 
William (http://wstein.org)

-- 
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.


Re: [sage-support] Error with simple integral, "CEXPT only defined for non-negative integral exponents."

2017-11-07 Thread William Stein
On Tue, Nov 7, 2017 at 9:06 AM, saad khalid  wrote:
> Hello everyone:
>
> I am currently trying to do this integral in Cocalc:
>
> integral(525.87*(x)^(-2.35),x,.1,1)
>
> It gives me the following error:
> "CEXPT only defined for non-negative integral exponents."
>
> What seems to be the issue here?

Maxima integration, which we still use by default, is very buggy. Use
sympy instead -- this works:

integral(525.87*(x)^(-2.35),x,.1,1, algorithm='sympy')

See

https://cocalc.com/projects/4a5f0542-5873-4eed-a85c-a18c706e8bcd/files/support/2017-11-07-091923-integral.ipynb



>
> --
> 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.



-- 
William (http://wstein.org)

-- 
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.


Re: [sage-support] 3d plotting in CoCalc with SageMath 8.0

2017-10-30 Thread William Stein
On Sun, Oct 29, 2017 at 9:31 AM Simon Willerton <s.willer...@sheffield.ac.uk>
wrote:

> I have the following code to help my students visualize surfaces
>
> t, theta = var('t, theta', domain='real')
> x(t) = cosh(t)
> z(t) = t
> formula = (x(t)*cos(theta), x(t)*sin(theta), z(t))
> parameters = ((t, -3, 3), (theta, -pi, pi))
> surface = ParametrizedSurface3D(formula, parameters)
> show(surface.plot(aspect_ratio=1, color='yellow'), viewer='threejs')
>
> This works fine in SageMathCell (running SageMath 8.0) see
>
> http://simonwillerton.staff.shef.ac.uk/teaching/MAS336/sage_cell_surfaces.html
> The reason I'm using threejs is so that many plots can been seen on a
> single page.  Without it (using jmol, I think) this wasn't possible.
>
> The code also works fine in a jupyter notebook running SageMath 8.0 on OS
> X in both firefox and chrome.
>
> However the code does not run in SageMath 8.0 on CoCalc.  In a sagews it
> actually gives an error,
>

Now fixed (https://github.com/sagemathinc/cocalc/issues/2450).

William


and in Jupyter (on firefox or chrome) the image just never appears.
> Changing the kernel to 7.6 on Jupyter on CoCalc allows the image to appear
> correctly.
>
> Should I not be using threejs or is the problem with CoCalc?
>
> Cheers,
>
> Simon
>
>
> --
> 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.
>
-- 
-- William Stein

-- 
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.


Re: [sage-support] 3d plotting in CoCalc with SageMath 8.0

2017-10-29 Thread William Stein
For sage worksheets, I've created

 https://github.com/sagemathinc/cocalc/issues/2450

On Sun, Oct 29, 2017 at 1:12 PM William Stein <wst...@gmail.com> wrote:

> On Sun, Oct 29, 2017 at 9:31 AM Simon Willerton <
> s.willer...@sheffield.ac.uk> wrote:
>
>> I have the following code to help my students visualize surfaces
>>
>> t, theta = var('t, theta', domain='real')
>> x(t) = cosh(t)
>> z(t) = t
>> formula = (x(t)*cos(theta), x(t)*sin(theta), z(t))
>> parameters = ((t, -3, 3), (theta, -pi, pi))
>> surface = ParametrizedSurface3D(formula, parameters)
>> show(surface.plot(aspect_ratio=1, color='yellow'), viewer='threejs')
>>
>> This works fine in SageMathCell (running SageMath 8.0) see
>>
>> http://simonwillerton.staff.shef.ac.uk/teaching/MAS336/sage_cell_surfaces.html
>> The reason I'm using threejs is so that many plots can been seen on a
>> single page.  Without it (using jmol, I think) this wasn't possible.
>>
>> The code also works fine in a jupyter notebook running SageMath 8.0 on OS
>> X in both firefox and chrome.
>>
>> However the code does not run in SageMath 8.0 on CoCalc.  In a sagews it
>> actually gives an error,
>>
>
> It works fine in CoCalc (and uses threejs) if you do not give the viewer=
> option.
>
> and in Jupyter (on firefox or chrome) the image just never appears.
>> Changing the kernel to 7.6 on Jupyter on CoCalc allows the image to appear
>> correctly.
>>
>> Should I not be using threejs or is the problem with CoCalc?
>>
>> Cheers,
>>
>> Simon
>>
>>
>> --
>> 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.
>>
> --
> -- William Stein
>
-- 
-- William Stein

-- 
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.


Re: [sage-support] 3d plotting in CoCalc with SageMath 8.0

2017-10-29 Thread William Stein
On Sun, Oct 29, 2017 at 9:31 AM Simon Willerton <s.willer...@sheffield.ac.uk>
wrote:

> I have the following code to help my students visualize surfaces
>
> t, theta = var('t, theta', domain='real')
> x(t) = cosh(t)
> z(t) = t
> formula = (x(t)*cos(theta), x(t)*sin(theta), z(t))
> parameters = ((t, -3, 3), (theta, -pi, pi))
> surface = ParametrizedSurface3D(formula, parameters)
> show(surface.plot(aspect_ratio=1, color='yellow'), viewer='threejs')
>
> This works fine in SageMathCell (running SageMath 8.0) see
>
> http://simonwillerton.staff.shef.ac.uk/teaching/MAS336/sage_cell_surfaces.html
> The reason I'm using threejs is so that many plots can been seen on a
> single page.  Without it (using jmol, I think) this wasn't possible.
>
> The code also works fine in a jupyter notebook running SageMath 8.0 on OS
> X in both firefox and chrome.
>
> However the code does not run in SageMath 8.0 on CoCalc.  In a sagews it
> actually gives an error,
>

It works fine in CoCalc (and uses threejs) if you do not give the viewer=
option.

and in Jupyter (on firefox or chrome) the image just never appears.
> Changing the kernel to 7.6 on Jupyter on CoCalc allows the image to appear
> correctly.
>
> Should I not be using threejs or is the problem with CoCalc?
>
> Cheers,
>
> Simon
>
>
> --
> 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.
>
-- 
-- William Stein

-- 
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.


Re: [sage-support] Re: linear transformations (by jason Grout)

2017-09-08 Thread William Stein
> I know that Andrey had pushed some changes so this works in Sage cell (and it 
> does on the site linked to) and it should still in sagenb - matrices and 
> vectors are shortcuts for a certain type of array interact.  So yes, the 
> argument should be interactive, but it is recognized as such.  Unsure why 
> that wouldn't work for you, perhaps Jupyter didn't have that widget ported or 
> something.


The interact implementation in Sage worksheets in CoCalc have nothing to do 
with the one in Jupyter/Sagenb/and Sage Cell. 


> On Sep 8, 2017, at 5:47 PM, kcrisman  wrote:
> 
> > I think the problem, at least in CoCalc, is that @interact expects every 
> > argument to the function to be an interactive device. That may well be the 
> > problem in sagemath 8.1 too.
>  
> I know that Andrey had pushed some changes so this works in Sage cell (and it 
> does on the site linked to) and it should still in sagenb - matrices and 
> vectors are shortcuts for a certain type of array interact.  So yes, the 
> argument should be interactive, but it is recognized as such.  Unsure why 
> that wouldn't work for you, perhaps Jupyter didn't have that widget ported or 
> something.
> -- 
> 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.

-- 
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.


Re: [sage-support] Using newer version of Jupyter 5.0 under SageMath 8.0

2017-08-31 Thread William Stein
On Thu, Aug 31, 2017 at 5:23 AM, Mauricio Calvao  wrote:
> Hi
>
> I have SageMath 8.0 installed under my Debian desktop and use it typically
> through Jupyter notebooks, particularly for SageManifolds calculations.
>
> I would like to select some cells from a given Jupyter notebook, and then
> copy and paste them to another different Jupyter notebook, in another tab of
> the same bowser window, in which I have them running. According to some
> googling, this might work under Jupyter 5.0. The fact is, however, that the
> default Jupyter notebook version coming with SageMath 8.0 is 4.4.1, not 5.0.
>
> Is it possible to install a newer version of Jupyter inside SageMath? If so,
> how do I do it?
>
> Another workaround would be if someone told me the exact steps to accomplish
> copy/pasting of several cells between distinct notebooks...
>

For what it is worth, on https://cocalc.com (a site some of us Sage
devs run), you can:

 1.  Open several Jupyter notebooks directly inside the project (you
can upload them), and then copy and paste ranges of cells between them
will just work.   Our Jupyter in CoCalc is a completely new
implementation of Jupyter, but it is file format compatible.  When
doing this implementation, I implemented copy/paste within a given
browser tab, which is enough, since you can open multiple notebooks in
the same tab.

 2. Use Sage 8 in Jupyter 5 by creating a project, then clicking the
"Plain Jupyter Server" link in project settings  -- you may have to
refresh once or twice though, since it takes a little time for the
server to startup, but the proxying to the server times out pretty
quickly.  You can also just switch to "Classical Jupyter" mode from 1.

3. Finally, open a terminal (+New --> Terminal) and look at
/ext/jupyter/kernels:

~$ ls /ext/jupyter/kernels/
anaconda3  calysto_prolog  ir   julia   pari_jupyter  python2
   python3   sage-8.0  sagemath  singular
bash   gap ir-sage  octave  postgres
python2-ubuntu  sage-7.6  sage-develop  scala211  vpython

This contains all of our working "recipes" for using various versions
of Sage, etc., with a system-wide install of Jupyter (rather than
whatever jupyter is in sage).

4. Install our Docker image on your own computer instead and do 1, 2, or 3:

https://github.com/sagemathinc/cocalc/blob/master/src/dev/docker/README.md

 -- William


> Thanks
>
> --
> 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.



-- 
William (http://wstein.org)

-- 
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.


Re: [sage-support] Re: Sage Crash Report

2017-08-15 Thread William Stein
On Tue, Aug 15, 2017 at 7:47 PM John H Palmieri <jhpalmier...@gmail.com>
wrote:

> One of the very last lines of the report says
>
>>
>> ImportError: libgfortran.so.3: cannot open shared object file: No such file 
>> or directory
>>
>>
> You need to install gfortran on your computer.
>

We should really build binaries that don't require fortran to be installed,
or put in an error before Python even starts importing.

I personally hit or saw the above crash report dozens of times recently,
due to installing Sage binaries in various fairly minimal Docker containers.

william

-- 
-- William Stein

-- 
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.


Re: [sage-support] Difference between sagemathcloud and sagemath

2017-07-22 Thread William Stein
On Sat, Jul 22, 2017 at 8:43 AM Gianni D. <hasd...@gmail.com> wrote:

> What are difference between sagemathcloud and sagemath?


Hi,

sagemathcloud no longer exists.   CoCalc, which used to be called
sagemathcloud, is
a web application.  SageMath, is a large Python-based math software
package.  It is
like comparing apples and oranges.

William
-- 
-- William Stein

-- 
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.


Re: [sage-support] csdp installed in 7.6?

2017-07-11 Thread William Stein
On Tue, Jul 11, 2017 at 11:11 AM c. e. larson <math...@gmail.com> wrote:

> i'm trying to to a large computation. the latest version of Sage on my
> university's cluster is 7.3. one of the functions (lovasz_number) requires
> the optional csdp package. i'm not allowed to install additional packages
> myself. so i can request it - or request that 7.3 be upgraded to 7.6 - if
> csdb is included with 7.6.
>
> since lovasz_number computes on Cocalc csdb is installed there - but does
> that mean csbp is *included* in (the console version of) Sage 7.6? (or,
> even better, how can i figure out these answers on my own?)
>

We install tons (100+?) of extra optional packages into every standard Sage
install on CoCalc.

William

> --
-- William Stein

-- 
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.


Re: [sage-support] Slides

2017-07-08 Thread William Stein
On Sat, Jul 8, 2017 at 8:36 PM Ingo Dahn <ingod...@gmail.com> wrote:

> What is the status of slide presentation support in CoCalc?
> In a Jupyter notebook within CoCalc I can define slides but I don't see
> the "Reveal live slide show" button to play the show.
> Is there a possibility to play a sage.ws as a slide show?
>

There is currently no support for integrated display of slideshows inside
CoCalc.  You’ll have to export the slideshow and run it somewhere else at
present, unfortunately.  Here’s the relevant ticket:

https://github.com/sagemathinc/cocalc/issues/2158

William

> --
-- William Stein

-- 
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.


Re: [sage-support] Difference in "layout = 'acyclic'" between local copy of sage and cocalc

2017-07-08 Thread William Stein
On Sat, Jul 8, 2017 at 12:16 PM Nikos Apostolakis <nikos...@gmail.com>
wrote:

> Sorry for replying to my own post, but I realized that my post is
> ambiguous.  I meant that the problem persists even after I installed 7.6.
> The layout I get locally is different than the layout I get from CoCalc.
>
> In my local sage, it seems that the vertices of the digraph are integers
> they are always laid from left to right according to their order as
> integers.
>

The layout is likely being impacted by an optional Sage package that is
installed on CoCalc’s sage, but not yours.
You’ll probably have to dive into the source code to get at
which/what/why...



> Nikos
>
>
> On Saturday, July 8, 2017 at 8:04:57 AM UTC-4, Nikos Apostolakis wrote:
>>
>> On Friday, July 7, 2017 at 12:57:08 PM UTC-4, Nikos Apostolakis wrote:
>>>
>>>
>>> On Friday, July 7, 2017 at 10:41:18 AM UTC-4, William wrote:
>>>>
>>>>
>>>> On Fri, Jul 7, 2017 at 4:33 AM Nikos Apostolakis <niko...@gmail.com>
>>>> wrote:
>>>>
>>>>> Dear group,
>>>>>
>>>>> The following:
>>>>>
>>>>>sage: foo = DiGraph([(1,4), (1,5), (2,4), (3,5)])
>>>>>sage: foo.show(layout = 'acyclic')
>>>>>
>>>>> produces different output in CoCalc and in my local copy of Sage (7.2)
>>>>> and , see the attached images.  The difference is much more pronounced in
>>>>> other examples.
>>>>>
>>>>> Can I get my local copy to produce the same result as in CoCalc?
>>>>>
>>>>
>>>> What happens if you install the latest stable release (7.6) of Sage
>>>> locally?  Sage v 7.2 is pretty old.
>>>>
>>>>
>>> Thanks for the reply.
>>>
>>> I'll upgrade and let you know if this solves the problem.
>>>
>>>
>> I installed 7.6 and the output is still the same.
>>
>> Nikos
>>
>>> --
> 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.
>
-- 
-- William Stein

-- 
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.


Re: [sage-support] Localisation

2017-07-08 Thread William Stein
On Fri, Jul 7, 2017 at 11:06 PM Ingo Dahn <ingod...@gmail.com> wrote:

> Is there a way to localise CoCalc to the language of the user's browser by
> editing a language file in the Git repo?
>

No, we have not implemented translations of the UI of CoCalc to any other
languages.

 – William
-- 
-- William Stein

-- 
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.


Re: [sage-support] Adding a ws file to a course as handout

2017-07-07 Thread William Stein
On Fri, Jul 7, 2017 at 3:31 AM Ingo Dahn <ingod...@gmail.com> wrote:

> I have a project on CoCalc and inside the project a course and a ws file
> aside of the course. I'd like to add the file to the course as handout but
> both search boxes in the handout tab don't show anything.
>

Please move the file to folder somewhere else.  Then you can add that
folder as a handout.

The assignment and handout features of CoCalc let you add arbitrary
*folders*, not files.

William
-- 
-- William Stein

-- 
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.


Re: [sage-support] Difference in "layout = 'acyclic'" between local copy of sage and cocalc

2017-07-07 Thread William Stein
On Fri, Jul 7, 2017 at 4:33 AM Nikos Apostolakis <nikos...@gmail.com> wrote:

> Dear group,
>
> The following:
>
>sage: foo = DiGraph([(1,4), (1,5), (2,4), (3,5)])
>sage: foo.show(layout = 'acyclic')
>
> produces different output in CoCalc and in my local copy of Sage (7.2) and
> , see the attached images.  The difference is much more pronounced in other
> examples.
>
> Can I get my local copy to produce the same result as in CoCalc?
>

What happens if you install the latest stable release (7.6) of Sage
locally?  Sage v 7.2 is pretty old.


> Thanks,
> Nikos
>
>
>
>
> --
> 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.
>
-- 
-- William Stein

-- 
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.


Re: [sage-support] Re: Error plotting 3D

2017-07-03 Thread William Stein
Hi,

If you want useful help, give the complete log of a minimal session reproducing 
the problem, from start to finish.

– William

> On Jul 3, 2017, at 6:14 AM, Fjordforsk A/S  wrote:
> 
> Changed to:
> 
> sage: plot3d(lambda 
> x,y:(exp(I*2000*(1.60217662*10**(-19))/((299792458*6.6260700
> : 
> *10**(-34)))-sqrt(I*(1.60217662*10**(-19))/(4*6.62607004*10**(-34)*2997924
> : 
> 58*2000-(((1.60217662*10**(-19))^2*2000**2)/(((6.62607004*10**(-34))**2)**
> : 
> 299792458**2)))(x**2+y**2)).real_part(),(x,-3*pi,3*pi),(y,0,2),adaptive=Tr
> : ue, color=cmsel)))
> 
> 
> Still get an error
> -- 
> 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.

-- 
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.


Re: [sage-support] Re: accumulating many defunct child processes

2017-06-05 Thread William Stein
On Mon, Jun 5, 2017 at 11:21 AM, Dima Pasechnik  wrote:
> I guess these zombie processes come from the function quitting Magma,
> something that does not destroy a Python child process used to communicate
> with it.
>
> Why won't you create a Magma instance just once, and do a cleanup after your
> function is done?
> (IIRC, Magma does not have a "reset" facility, but you can still "delete"
> variables.) (Well, this would be tedious,
> perhaps these deletes are called by Sage interface?)

Another hack/workaround *might* be to use Sage's @fork or @parallel
decorators...

>
> On the other hand, there is also stuff in sage.interfaces.quit.* you can
> probably use to clean up,
> as well as sage.interfaces.cleaner.* - which is even less documented, and
> it's hard to say exactly what to do
> with is. A documentation bug?
>
>
>
>
> On Monday, June 5, 2017 at 2:44:32 PM UTC+1, John Cremona wrote:
>>
>> On a linux (ubuntu 16.04) machine I am running one instance of Sage
>> version 7.6.  In a loop I am calling a function of my own which
>> interfaces to Magma; that function starts with
>>
>>  mag = Magma()
>>
>> then there are a whole lot of mag.eval() statements and af ew others
>> with which I collect the content of Magma variable back into Sage, and
>> the last line before the function returns is
>>
>>  mag.quit()
>>
>> Once this has been running for a while, I have --as expected-- exactly
>> one magma process running.  But there are many defunct python
>> processes (right now, 1375 lines like
>> jec  59385  0.0  0.0  0 0 pts/11   Z+   12:30   0:00
>> [python] 
>> in the output of ps -ux | grep python) whose times stamps show that
>> many per second were created.  These are all child processes of the
>> controlling Sage process.  They seem harmless since they are not using
>> any resources, but I had 5 such Sage sessions running overnight and
>> this morning could not log into the machine for a while and I suspect
>> (without proof) that some maximum number of processes was exceeded --
>> when I did log in, I saw that all 5 of the Sage processes had been
>> killed and showed an error message about not being able to fork().
>> The computer has 512g of RAM and 72 cores, and was not heavily loaded.
>>
>> Help please!
>>
>> I am attaching the function in question in case that helps.
>>
>> 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.



-- 
William (http://wstein.org)

-- 
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.


Re: [sage-support] graphs: moving vertices by mouse

2017-04-28 Thread William Stein
In SMC in a **Sage worksheet**, do

show(g)

for g a graph, and you'll get something.  For example:

https://cloud.sagemath.com/projects/4a5f0542-5873-4eed-a85c-a18c706e8bcd/files/support/2017-04-28-131029-graph-move.sagews

On Fri, Apr 28, 2017 at 1:07 PM, Daniel Krenn  wrote:
> Is there a way to click on a vertex of a SageMath-graph (in some
> notebook, Jupyter or SMC-notebook) and drag it around, thus manually
> positioning the vertices?
>
> (I think there was a graph_editor in the old Sage Notebook which could
> do this, but this does not seem to work in one of the new notebooks.)
>
> Best
>
> Daniel
>
> --
> 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.



-- 
William (http://wstein.org)

-- 
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.


Re: [sage-support] Re: trouble signing in

2017-03-17 Thread William Stein
Shannon,

You have a SageMathCloud account with the name Shannon Paaper and
email address nega0...@umn.edu.  Try to sign in (or reset your
password) using nega0...@umn.edu.

That is, of course, assuming you are asking about SageMathCloud!

William

On Fri, Mar 17, 2017 at 12:59 PM, Harald Schilly
 wrote:
>
>
> On Friday, March 17, 2017 at 8:57:50 PM UTC+1, Shannon Negaard wrote:
>>
>> I can't remember the last time I was asked to log in. I can't remember my
>> username
>
>
> You have to help us here. Do you work on your local machine or a remote
> service? What's the exact URL where you try to login?
>
> -- 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.



-- 
William (http://wstein.org)

-- 
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.


Re: [sage-support] Re: note exactly a question ! (sorry if it's not the place)

2017-03-08 Thread William Stein
Also, we have an easy to install Docker container version of SMC:

https://github.com/sagemathinc/smc/blob/master/src/dev/docker/README.md

On Wed, Mar 8, 2017 at 11:21 AM, Dominique Laurain
 wrote:
> +1 agree with William : I am living in very populated town in France (not
> Paris) and use daily SMC over the Internet ... and I have a very good speed
> (no laps)!!
>
> I must add that I am a paying member in SMC cloud, so... I am actually
> working with a web browser internet client of a not so much overloaded
> google virtual machine.
>
> And for "the next generation.."  : school organization and finance and
> (sometimes) constraint to use  "commercial" softwares and poor knowledge of
> comp tools by teachers,etc... have always been hindrance of widespread use
> of CAS tools in **french** classrooms (my POV because I have no actual
> information about comp usage by those classrooms at various levels)
>
> Dominique.
>
> --
> 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.



-- 
William (http://wstein.org)

-- 
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.


Re: [sage-support] note exactly a question ! (sorry if it's not the place)

2017-03-08 Thread William Stein
On Wed, Mar 8, 2017 at 12:18 AM HG  wrote:

> But I wanted to express myself on the subject :
>
>
> http://sagemath.blogspot.fr/2014/08/you-dont-really-think-that-sage-has.html
>
> Personnly I am not a mathematician, but I like it very much !
> I am french 72 this years and if I hadn't known sagemath I wouldn't have
> realized my hobby... And now with sagemanifolds included it's the
> excellence !
>
> SMC is not very usefull here in france, it's to slow and sometimes can't
> get it. I just hope and wish that sage will everlasting for next
> generations to come to maths another way that traditionnal scolar one.
>

You probably just have a slow internet connection in your house.


> Thanks all for your good job :)
>
> With jupyterlab now I can work on sage/julia/ruby/ in the same application
> its a wonderfull dream realized
>
> Best
> Henri
>
> --
> 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.
>
-- 
Sent from my massive iPhone 6 plus.

-- 
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.


Re: [sage-support] Re: Squaring the sine function

2017-02-19 Thread William Stein
On Sun, Feb 19, 2017 at 3:58 AM, Milan Somora  wrote:
> Hi,
>
> thanks, but this is not my problem. Please here:
> https://cloud.sagemath.com/projects/e671b1e4-ed43-4cdf-ba6e-190a2a8127c5/files/sin4.png

There is no difference between sin^4(x) and (sin(x))^4.  They are the
exact same thing.

What are you **really** trying to accomplish?

 -- William

>
>
>
> Dne čtvrtek 16. února 2017 21:47:08 UTC+1 Milan Somora napsal(a):
>>
>> Hi,
>>
>> please where is my mistake?
>>
>> I write to WolframAlpha sin(x)^ and and I get this (It is good for me):
>> https://www.wolframalpha.com/input/?i=sin(x)%5E4
>>
>>
>> I write the same to SageMathCloud and and I get this (It is wrong for me):
>>
>> https://cloud.sagemath.com/projects/e671b1e4-ed43-4cdf-ba6e-190a2a8127c5/files/sinus-exponent.sagews
>>
>> I need "sin^4(x)".
>>
>> What am I doing wrong?
>>
>> Thanks
>>
>>
>>
>>
>>
> --
> 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.



-- 
William (http://wstein.org)

-- 
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.


Re: [sage-support] Sage Crash Report

2017-02-17 Thread William Stein
On Thu, Feb 16, 2017 at 10:15 PM, asutosh hota  wrote:
> I am currently 6.7 docker version

That's ridiculous -- Sage is currently at version 7.5.

Volker, please delete or update this ancient repo you posted two years
ago:  https://github.com/sagemath/docker

It's what people find when they search sage/docker, and it's ancient.
Or at least add Erik Bray and I...

Erik's Docker images for sage are here and are somewhat more up to date:

  https://github.com/sagemath/docker-images

My Docker images for SageMathCloud really do include the latest Sage
(and latex, etc.) and are always very up to date:

   https://github.com/sagemathinc/smc/tree/master/src/dev/docker

> as the latest build is always crashing.
> Suggest ways so that I can have the latest build on my system.
>
> --
> 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.



-- 
William (http://wstein.org)

-- 
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.


Re: [sage-support] Re: Squaring the sine function

2017-02-16 Thread William Stein
Hi,

I'm an SMC site admin, so I added code to plot (and also do series
expansion) to your worksheet.

It's also useful to click the "Help" button in the upper right of SMC...

William

On Thu, Feb 16, 2017 at 1:11 PM, Dima Pasechnik  wrote:
> Do you mean to say that you'd like to see the graph of the function?
> Then do
>
> plot(sin(x)^4,[-2*pi,2*pi])
>
>
>
> On Thursday, February 16, 2017 at 8:47:08 PM UTC, Milan Somora wrote:
>>
>> Hi,
>>
>> please where is my mistake?
>>
>> I write to WolframAlpha sin(x)^ and and I get this (It is good for me):
>> https://www.wolframalpha.com/input/?i=sin(x)%5E4
>>
>>
>> I write the same to SageMathCloud and and I get this (It is wrong for me):
>>
>> https://cloud.sagemath.com/projects/e671b1e4-ed43-4cdf-ba6e-190a2a8127c5/files/sinus-exponent.sagews
>>
>> I need "sin^4(x)".
>>
>> What am I doing wrong?
>>
>> Thanks
>>
>>
>>
>>
>>
> --
> 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.



-- 
William (http://wstein.org)

-- 
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.


Re: [sage-support] Creating & editing HTML cells

2017-01-30 Thread William Stein
On Mon, Jan 30, 2017 at 2:58 PM, john_perry_usm  wrote:
> Hello
>
> This is about SageMathCloud. Sorry if this is now the wrong place for this.

The right place is

  https://groups.google.com/forum/#!forum/sage-cloud

>
> Not too long ago, to edit a Sage HTML cell you could just shift+click on the
> line above a cell. This opened up a kind of WYSIWYG editor with some helpful
> buttons & the like. I'm quite sure this used to work in SageMathCloud, too.
> If I wanted, I think I could also edit the HTML directly, but the default as
> I recall was HTML. The editor had a fancy name, but I can't put my finger on
> it at the moment.
>
> I was trying to show this to a class the other day, and it just wouldn't
> happen. Shift+click was no different from click. To create an HTML cell, you
> have to press a button or type %html, and while the helpful buttons come up
> as before, nothing I do seems to get WYSIWYG editing. And then pressing
> Shift+Enter gives you the nice HTML output but leaves the ugly HTML input
> above it. You have to click on a hidden triangle to make it disappear.
>
> Am I missing something? Did it really change? If so, is there a way to get
> it back?

TinyMCE is only in sagenb, and nowhere else.  It's not and never has
been in SMC.  I made:

https://github.com/sagemathinc/smc/issues/1618

>
> john perry
>
> --
> 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.



-- 
William (http://wstein.org)

-- 
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.


Re: [sage-support] Plotting of fair XY values in Sage

2017-01-30 Thread William Stein
On Mon, Jan 30, 2017 at 12:09 PM, Henri Girard  wrote:
>
> In the example you are using %octave magic
> kernel octave is a "ikernel" native jupyter notebook

Yes, totally true, but that kernel is running locally in the same
project so works fine with the free version of SMC.   You can also use
the Octave kernel in a jupyter noteboook.

SMC is a really good deal for people.   I'm losing more money each
month on it than ever before :-(.  Don't worry, the longterm future for
SMC as a business does look very, very good.

William

-- 
William (http://wstein.org)

-- 
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.


Re: [sage-support] Plotting of fair XY values in Sage

2017-01-30 Thread William Stein
On Mon, Jan 30, 2017 at 12:06 PM, Henri Girard  wrote:
> Yes it should if you have paid for SMC to be able to connect

Even better -- you can use all relevant functionality for Octave in
SMC for *free*.

We only charge if you want to connect from a program running in SMC to
external websites (e.g., ssh out from a terminal, download data from
the web).  Absolutely no other essential functionality is degraded for
the free version.

William


>
>
> Le 30/01/2017 à 18:55, Milan Somora a écrit :
>
> Work this also in SageMath Cloud?
>
> Dne sobota 28. ledna 2017 17:23:31 UTC+1 HG napsal(a):
>>
>> Install octave in a jupyter notebook and you get the same with matlab (
>> https://github.com/Calysto/octave_kernel) i think it works only with
>> python3, I am not sure.
>>
>>
>> Le 28/01/2017 à 15:33, Jorge Garcia a écrit :
>>
>> Omg, here's the Octave link again,
>> https://sagecell.sagemath.org/?z=eJyrULBViDZUMFIwVjBRMI215uWqBIsYKJgYKBgaGCgYGSgYg8ULcvJLNCp0KjUBEjYLTA===octave
>>
>> Enjoy,
>> AJG
>>
>> On Jan 28, 2017 9:31 AM, "Jorge Garcia"  wrote:
>>>
>>> Oops, the Octave link didn't work, sry. Here it is,
>>> https://sagecell.sagemath.org/?z=eJzj5apQsFWINlQwUjBWMFEwjbXm5aoEixgomBgoGBoYKBgZKBiDxQty8ks0KnQqNQEW8Qtj=
>>> Octave
>>>
>>> Good luck,
>>> AJG
>>>
>>> On Jan 28, 2017 9:28 AM, "Jorge Garcia"  wrote:

 I ran William's code in SageCell without a problem,
 https://sagecell.sagemath.org/?z=eJyrULBViDbUMdIx1jHRMY3l5aoECxjomBjoGBoY6BgZ6BiDhHMy81I1qjILNCp0KjU1AUVIDMM==sage

 HTH,
 AJG

 On Jan 28, 2017 9:25 AM, "Jorge Garcia"  wrote:
>
> I just tried your Matlab code on SageCell with Octave emulation
> selected,
> eJyrULBViDZUMFIwVjBRMI215uWqBIsYKJgYKBgaGCgYGSgYg8ULcvJLNCp0KjUBEjYLTA
>
> Clearly that's not what you wanted. I used to run Octave as a stand
> alone environment years ago. I think I got it working in a Sage NB when I
> had a Sage server installed locally on my PC.
> Regards,
> AJG
>
> On Jan 28, 2017 4:11 AM, "Milan Somora"  wrote:
>>
>> Thank you very much!
>>
>> Dne pátek 27. ledna 2017 23:31:39 UTC+1 William napsal(a):
>>>
>>> Do
>>>
>>> x = [1,2,3,4,5]
>>> y = [10,40,100,20,35]
>>> line(zip(x,y))
>>>
>>> Type line? for more details.
>>>
>>>
>>> https://cloud.sagemath.com/projects/4a5f0542-5873-4eed-a85c-a18c706e8bcd/files/support/2017-01-27-142848-plot.sagews
>>>
>>> On Fri, Jan 27, 2017 at 10:46 AM, Milan Somora 
>>> wrote:
>>> > Hi,
>>> >
>>> > please, i need to display these values:
>>> >
>>> > 1, 2, 3, 4, 5 for X axis
>>> > 10, 40, 100, 20, 35 for Y axis
>>> >
>>> > In Matlab I do it so:
>>> >
>>> > x = [1 2 3 4 5];
>>> > y = [10 40 100 20 35];
>>> > plot(x,y)
>>> >
>>> > I send my image (graph from Matlab). Thank you very much for help!
>>> > MS
>>> >
>>> > --
>>> > 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...@googlegroups.com.
>>> > To post to this group, send email to sage-s...@googlegroups.com.
>>> > Visit this group at https://groups.google.com/group/sage-support.
>>> > For more options, visit https://groups.google.com/d/optout.
>>>
>>>
>>>
>>> --
>>> William (http://wstein.org)
>>
>> --
>> 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...@googlegroups.com.
>> To post to this group, send email to sage-s...@googlegroups.com.
>> Visit this group at https://groups.google.com/group/sage-support.
>> For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> 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...@googlegroups.com.
>> To post to this group, send email to sage-s...@googlegroups.com.
>> Visit this group at https://groups.google.com/group/sage-support.
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
> --
> 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.
>
>
> --
> You received 

Re: [sage-support] Using SageCloud for the production of interactive materials

2017-01-28 Thread William Stein
On Sat, Jan 28, 2017 at 6:01 AM, Ingo Dahn  wrote:
> I am exploring the potential of SageCloud for the production of interactive
> Math websites and there are some features I'd like to see but couldn't
> realize: I know that it is possible to publish worksheets and that looks
> like a promising start, but
>
> Is it possible to leave some cells interactive such that the user can modify
> and evaluate their content without affecting other users (i.e. like
> embedding a SegeCell cell)?

No, a user would have to make an SMC account and use their own
worksheet (e.g., copy your worksheet over).  Maybe we'll offer such a
feature someday, but probably not this year.

> Is it possible to embed into the published workspace
>
> MathML

?

> Javascript affecting the page rendering

Yes.  use %javascript in a worksheet cell

> CSS

You can make a .css file and use %load, or just include it as an
external style file.

> iframes for third-party materials?

Yes, but it must be https.

> Is it possible to generate headings and a navigation tree following those
> headings?

Not at present.

> Workarounds or recommendations of alternative tools would be welcome as
> well.
>
> --
> 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.



-- 
William (http://wstein.org)

-- 
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.


Re: [sage-cell] Re: [sage-support] Sage Cell Server

2017-01-27 Thread William Stein
On Fri, Jan 27, 2017 at 4:21 PM, Andrey Novoseltsev  wrote:
> Hello!
>
> Note that we have a dedicated group sage-cell (cc-ed).
>
> At the moment we have GCE for Americas and Madrid for everyone else
> including Europe. There are occasional power problems in the building with
> the Madrid server which are supposed to go away after this last time, we
> will see if that is indeed the case. These servers are responding to
> sagecell.sagemath.org and have valid security certificates. While it is
> unfortunate that there are such interruptions in Madrid, an equivalent
> machine in GCE would cost about $2000/year, so overall I am very happy that
> this hardware is provided to us.
>
> Those who heavily rely on SageMathCell should indeed consider running their
> own servers to make sure there are no downtimes/slowdows at the worst
> possible moment and/or unexpected upgrades that may break some particular
> code. It is possible that SageMath Inc will provide such a service in the
> future.
>

Maybe say something about the service we (SageMath, Inc.) does provide
right now?

> aleph.sagemath.org should not be used or recommended at all.
>
> As for Android app, I can't test it and found it difficult in the past to
> get much feedback on it or figure out who is responsible for it. Personally
> I think it should be removed from the app store since having an unmaintained
> and broken app is bad for reputation.
>
> Thank you,
> Andrey
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-cell" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-cell+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-cell/56038a3f-2dd8-434e-8bc9-588a1dee0e54%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



-- 
William (http://wstein.org)

-- 
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.


Re: [sage-support] Plotting of fair XY values in Sage

2017-01-27 Thread William Stein
Do

x = [1,2,3,4,5]
y = [10,40,100,20,35]
line(zip(x,y))

Type line? for more details.

https://cloud.sagemath.com/projects/4a5f0542-5873-4eed-a85c-a18c706e8bcd/files/support/2017-01-27-142848-plot.sagews

On Fri, Jan 27, 2017 at 10:46 AM, Milan Somora  wrote:
> Hi,
>
> please, i need to display these values:
>
> 1, 2, 3, 4, 5 for X axis
> 10, 40, 100, 20, 35 for Y axis
>
> In Matlab I do it so:
>
> x = [1 2 3 4 5];
> y = [10 40 100 20 35];
> plot(x,y)
>
> I send my image (graph from Matlab). Thank you very much for help!
> MS
>
> --
> 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.



-- 
William (http://wstein.org)

-- 
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.


Re: [sage-support] This limit seems to be wrong

2017-01-22 Thread William Stein
I think Dima very very confusingly actually agreed that this is a bug in
maxima that is in the newest version.

I think your options are:
  - use the sympy option, or
  - fix the bug in maxima, or
  - change what sage uses by default, or
  - wait


On Sun, Jan 22, 2017 at 12:49 PM Peleg Michaeli  wrote:

> So... I couldn't really follow: should I open a new ticket, or should it
> be solved by integrating the new maxima?
>
>
> On Sunday, 22 January 2017 19:37:50 UTC+2, Dima Pasechnik wrote:
>
>
>
> On Sunday, January 22, 2017 at 4:13:53 PM UTC, William wrote:
>
> On Sun, Jan 22, 2017 at 7:14 AM, Peleg Michaeli  wrote:
>
>
> > Hi,
>
>
> >
>
>
> > sage: ((2^(2*x+1)+(2^x*x^100)^(3/2))/(4^x-100*2^x)).limit(x=infinity)
>
>
> > -Infinity
>
>
> >
>
>
> > This is a wrong answer. It should be 2.
>
>
> >
>
>
> > Replacing 3/2 in the power by 1, 2, or 3 (at least) gives correct answers
>
>
> > (2, inf, inf).  Replacing it by 5/2 given a wrong answer again.
>
>
> >
>
>
> > Is this related to a known bug?
>
>
>
>
>
> I don't know if it is known - - you can try searching
>
>
> https://trac.sagemath.org/, which lists all bugs we know of.
>
>
>
>
>
> This is actually a bug in **MAXIMA**, which Sage calls to do this
>
>
> limit: http://maxima.sourceforge.net/
>
>
>
> no, it's not in Maxima 5.39.0 (see https://trac.sagemath.org/ticket/18920
> and give it a positive review :-))
> called with its default settings.
>
> $ sage --maxima
> ;;; Loading #P"/home/dima/Sage/sage-dev/local/lib/ecl/sb-bsd-sockets.fas"
> ;;; Loading #P"/home/dima/Sage/sage-dev/local/lib/ecl/sockets.fas"
> ;;; Loading #P"/home/dima/Sage/sage-dev/local/lib/ecl/defsystem.fas"
> ;;; Loading #P"/home/dima/Sage/sage-dev/local/lib/ecl/cmp.fas"
> Maxima 5.39.0 http://maxima.sourceforge.net
> using Lisp ECL 16.1.2
> Distributed under the GNU Public License. See the file COPYING.
> Dedicated to the memory of William Schelter.
> The function bug_report() provides bug reporting information.
> (%i1) limit((2^(2*x+1)+(2^x*x^100)^(3/2))/(4^x-100*2^x),x,inf);
> (%o1)  2
>
> Although calling this version of Maxima as
> sage: ((2^(2*x+1)+(2^x*x^100)^(3/2))/(4^x-100*2^x)).limit(x=infinity)
>
> gives -Infinity, still, as it's not called with default settings, but with
> something
> that breaks it sometimes.
>
>
>
>
> If you call sympy instead it gets the right answer:
>
>
>
>
>
> sage: ((2^(2*x+1)+(2^x*x^100)^(3/2))/(4^x-100*2^x)).limit(x=infinity,
>
>
> algorithm="sympy")
>
>
> 2
>
>
>
>
>
> sage: ((2^(2*x+1)+(2^x*x^100)^(3/2))/(4^x-100*2^x)).limit(x=infinity,
>
>
> algorithm="maxima_taylor")
>
>
> -Infinity
>
>
>
>
>
> sage: ((2^(2*x+1)+(2^x*x^100)^(3/2))/(4^x-100*2^x)).limit(x=infinity,
>
>
> algorithm="maxima")
>
>
> -Infinity
>
>
>
>
>
>
>
>
>
>
>
> >
>
>
> >
>
>
> > Thanks,
>
>
> > Peleg.
>
>
> >
>
>
> > --
>
>
> > 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...@googlegroups.com.
>
>
> > To post to this group, send email to sage-s...@googlegroups.com.
>
>
> > Visit this group at https://groups.google.com/group/sage-support.
>
>
> > For more options, visit https://groups.google.com/d/optout.
>
>
>
>
>
>
>
>
>
>
>
> --
>
>
> William (http://wstein.org)
>
>
>
>
>
>
>
>
>
>
> --
>
>
> 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.
>
>
> --
Sent from my massive iPhone 6 plus.

-- 
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.


Re: [sage-support] This limit seems to be wrong

2017-01-22 Thread William Stein
On Sun, Jan 22, 2017 at 7:14 AM, Peleg Michaeli  wrote:
> Hi,
>
> sage: ((2^(2*x+1)+(2^x*x^100)^(3/2))/(4^x-100*2^x)).limit(x=infinity)
> -Infinity
>
> This is a wrong answer. It should be 2.
>
> Replacing 3/2 in the power by 1, 2, or 3 (at least) gives correct answers
> (2, inf, inf).  Replacing it by 5/2 given a wrong answer again.
>
> Is this related to a known bug?

I don't know if it is known - - you can try searching
https://trac.sagemath.org/, which lists all bugs we know of.

This is actually a bug in **MAXIMA**, which Sage calls to do this
limit: http://maxima.sourceforge.net/

If you call sympy instead it gets the right answer:

sage: ((2^(2*x+1)+(2^x*x^100)^(3/2))/(4^x-100*2^x)).limit(x=infinity,
algorithm="sympy")
2

sage: ((2^(2*x+1)+(2^x*x^100)^(3/2))/(4^x-100*2^x)).limit(x=infinity,
algorithm="maxima_taylor")
-Infinity

sage: ((2^(2*x+1)+(2^x*x^100)^(3/2))/(4^x-100*2^x)).limit(x=infinity,
algorithm="maxima")
-Infinity



>
>
> Thanks,
> Peleg.
>
> --
> 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.



-- 
William (http://wstein.org)

-- 
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.


Re: [sage-support] Re: visualizing Sato-Tate for sums of twelve squares

2017-01-19 Thread William Stein
On Thu, Jan 19, 2017 at 6:19 AM, kcrisman  wrote:
> Necro-post ... Since those servers are gone, anyone else searching may find

In reference to: sage.math.washington.edu/sato-tate/

It's at http://wstein.org/sato-tate/ now.

I also resurrected sage.math.washington.edu's files so that some
people could migrate content to sagemath.org; they're here:

   https://cloud.sagemath.com/35072214-1854-4df4-9634-ee783c3a5e14/raw/home

(If anybody were to want to download a *lot* from here, please email me first!!)

> this useful.  Based on William's original interact and modified to have the
> Sage-wrapped mpl histograms.  Still amazing :)
>
>
> def sqrt2():
> PI = float(pi)
> return plot(lambda x: (2/PI)*math.sqrt(1-x^2), -1,1, plot_points=200,
>   rgbcolor=(0.3,0.1,0.1), thickness=2)
>
> delta = delta_qexp(10^5)
>
> @interact
> def delta_dist(bins=(20,[10..150]), number = [500,1000,..,delta.prec()]):
> D = delta[:number]
> w = [float(D[p])/(2*float(p)^(5.5)) for p in prime_range(number + 1)]
> show(histogram(w, bins=bins, normed=True) + sqrt2(), frame=True,
> gridlines=True)
>
> --
> 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.



-- 
William (http://wstein.org)

-- 
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.


Re: [sage-support] Plotting Cube Root

2017-01-17 Thread William Stein
On Tue, Jan 17, 2017 at 7:26 AM, Tom Clark  wrote:
> My students had trouble with plotting cos(x^(1/3)) as a homework problem.
> What's happening is that x^(1/3) generates a primitive complex root so I
> explained that to them, then I found this work around:
>
> def oddroot(x,n):
>   sgn(x)*(abs(x))^(1/n)

Slight typo:

def oddroot(x,n):
  return sgn(x)*(abs(x))^(1/n)

For example:

https://cloud.sagemath.com/projects/4a5f0542-5873-4eed-a85c-a18c706e8bcd/files/support/2017-01-17-075640-odd-root.sagews

Thanks,

William

>
> This is work for any odd number n and will plot nicely over all of R.  I see
> others have had this question on the forum so I thought I'd share.
>
> I don't know if the devs want to implement something like this into SAGE
> more generally, probably not, but at least this is a work around for simple
> graphing etc.
>
> --
> 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.



-- 
William (http://wstein.org)

-- 
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.


Re: [sage-support] Displaying graphics from a Sage script

2017-01-13 Thread William Stein
On Fri, Jan 13, 2017 at 5:23 PM, John H Palmieri  wrote:
[...]
>>
>> I fixed this by adding "sleep(1)" at the end of the file.
>
>
> Also, I should add that %load doesn't work for me. I don't know what it's
> supposed to do. I used %attach instead.

That's strange and annoying.  It used to be that "%load" was just
"load", and that attach was identical to load, except it would watch
the filesystem for changes and reload when the file changed.  People
re-implemented load and/or attach using IPython, so things
changed/diverged.

If %load doesn't work when %attach does in a situation like this, then
there is definitely some sort of bug.

William

>
>>
>>>
>>>
>>>   John
>>>
>>>


 >
 > --
 > 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...@googlegroups.com.
 > To post to this group, send email to sage-s...@googlegroups.com.
 > Visit this group at https://groups.google.com/group/sage-support.
 > For more options, visit https://groups.google.com/d/optout.



 --
 William (http://wstein.org)
>
> --
> 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.



-- 
William (http://wstein.org)

-- 
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.


Re: [sage-support] Displaying graphics from a Sage script

2017-01-13 Thread William Stein
On Fri, Jan 13, 2017 at 3:50 PM, John H Palmieri  wrote:
> This question comes from
> http://stackoverflow.com/questions/41638257/graphics-in-sage-script: if I
> have a file "foo.sage" and I want to run "sage foo.sage" and have it pop up
> a window displaying a plot, how do I do this?
>
> For example, if foo.sage contains
>
> P = plot(sin(x))
> P.show()
>
> then it prints "Graphics object consisting of 1 graphics primitive" rather
> than displaying the plot. I know I can save the plot instead, but is there
> an easy way to display it directly?

I suspect

  echo "%load 'a.sage'" | sage

would have to work...

>
> --
> 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.



-- 
William (http://wstein.org)

-- 
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.


Re: [sage-support] Re: How to resume working in SAGE after 10 years?

2017-01-13 Thread William Stein
On Fri, Jan 13, 2017 at 10:27 AM, John Cremona  wrote:
> Go to https://cloud.sagemath.com/ and make yourself a free account.
> You can upload .sws files, but yours are very old so may not convert
> cleanly.  SageMathCloud has its own mailing list.
>
> People may have been put off by the date 2005 since I think Sage was
> only created around then.  Version 4.8 is certainly old (7.5 has just
> been released)!

Feb 2005 was the first release of Sage as "sage".

The very first sagenb launch was in 2006, so indeed nearly 10 years ago.

William

>
> John Cremona
>
> On 13 January 2017 at 15:17, Charles Pique  wrote:
>> The online site where I worked with SAGE (sagenb.org) was taken down because
>> of spammers according to
>> https://ask.sagemath.org/question/36274/what-happened-to-my-user-name-10-years-ago/.
>> I had noticed some restrictions and comments about it back then.  I went my
>> way for some years and now a number of my bookmarks get an error.  I erased
>> them yesterday but they all contain "sagenb.org".  I have seen websites
>> disappear before so I copied all my files to my hard drive.  They had the
>> extension .sws.  I also got a large file with the name SAGE-4.8.ova which
>> might be a software package. I still have my old user name and password but
>> nowhere to try them.  I think I have a new password with same old name at
>> https://ask.sagemath.org/account/signin/?next=/  but that gets a blog.  I
>> don't know how to get the interactive web page that does all the nice things
>> that I used to play with. I never could find instructions for basic things.
>> I never heard of the Sage store before.
>> Today I have a need to solve cubic equations as part of a root locus plot in
>> electronic circuit analysis.
>>
>> On Friday, January 13, 2017 at 4:30:15 AM UTC-5, Charles Pique wrote:
>>>
>>> I used Sage sometime around 2005 +/-5 and had a user name and password.
>>> Now my login doesn't work and I can't even register.
>>> I had a bunch of work saved on the site and I downloaded it too in case
>>> the site lost it.   Years ago the stuff could have been uploaded and
>>> restored.  I don't know if the format is the same after all this time.  Back
>>> then I could not find basic help that I needed.   It appears to be better
>>> today.   Is there a registration page?
>>
>> --
>> 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.
>
> --
> 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.



-- 
William (http://wstein.org)

-- 
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.


Re: [sage-support] integral points on ellipitc curves

2016-12-15 Thread William Stein
On Thu, Dec 15, 2016 at 4:51 AM, Dima Pasechnik  wrote:
>
>
> On Thursday, December 15, 2016 at 12:23:15 PM UTC, John Cremona wrote:
>>
>> I just confirmed that if I change RealField(100) to RealField(200) in
>> one place (line 6975 of ell_rational_field.py) then both the points
>> Costas missed are found, so I was right that this is a stupid problem
>> of precision rather than something more complicated.
>>
>> I can easily make a patch to make this change, but if I do there will
>> be two objections (at least): first, that I have done no analysis to
>> see whether 200 bits will always work (clearly not) so this is just
>> kicking a problem down the road; and secondly that I will nopt have
>> fixed other known problems, as I explained earlier.
>>
>> I tried all the examples in Zagier's paper (Tables 1-3 except the
>> non-standard examples in Table 3) using 1000 bits (which is not
>> noticeably slower than 100 -- note that first the algorithm finds a
>> Mordell-Weil basis which often dominates).  All work fine and very
>> quickly.
>
>
> I am just wondering whether some kind of interval or ball arithmetic
> ought to be used there (we do have Arb package in Sage nowadays),
> instead of blindly increasing precision?

Without looking, the computation is "Otherwise it is very very much
faster to first compute the linear combinations over RR, and only
compute them as
rational points if they are approximately integral."  This does seem
like a perfect situation in which to apply standard interval
arithmetic over RR.
We're just applying algebraic operations to points purely to speed up
an algorithm, then checking at the end if the resulting coordinates
could possibly be integers...

 - William


>
>
>>
>>
>> John
>>
>> On 15 December 2016 at 09:17, John Cremona  wrote:
>> > On 14 December 2016 at 21:34,   wrote:
>> >> Thank you both for the answers,
>> >>
>> >> I found another problematic example
>> >>
>> >> sage:E1=EllipticCurve([0,0,0,37,18]);E1;S=E1.integral_points();S;
>> >> Elliptic Curve defined by y^2 = x^3 + 37*x + 18
>> >> over Rational Field
>> >> [(2 : 10 : 1), (126 : 1416 : 1)]
>> >>
>> >>
>> >>
>> >> and
>> >>
>> >> R = E1(64039202,512470496030);M=E1(2,10 );3*M==R
>> >> True
>> >>
>> >> Both examples are from the paper
>> >> of Don Zagier: Large integral points on Elliptic curves
>> >>
>> >> Also, I tried the previous examples in the online calculator of magma
>> >> and
>> >> seems that magma works fine.
>> >>
>> >>  magma: E := EllipticCurve([0,0,0,37,18]);
>> >>  IntegralPoints(E);
>> >> [ (2 : 10 : 1), (126 : 1416 : 1), (64039202 : 512470496030 : 1) ]
>> >> [ <(2 : 10 : 1), 1>, <(126 : 1416 : 1), 1>,
>> >> <(64039202 : 512470496030 : 1), 1> ]
>> >>
>> >>
>> >>
>> >> I use this function a lot and
>> >> I think many people (heavily) use this function
>> >> for their research. I was not aware of the problems of this function :(
>> >>
>> >> I am wondering if this bug affects other functions concerning
>> >> elliptic curves?
>> >
>> > The only other functions I can think of are
>> > EllipticCurves_with_good_reduction_outside_S() which uses the more
>> > general S-integral points code, which potentially suffers from similar
>> > problems and more (it uses p-adic elliptic logs for example, and
>> > p-adic precision matters).  But that does not use the function I
>> > mentioned for which real precision seems to be a problem.
>> >
>> > Nils: of course I know you were not jibing at me!
>> >
>> > Costas: thanks for pointing this out, and the extra exmaples.  I know
>> > Zagier's paper well, and we should certainly include the examples from
>> > that paper as doctests where possible.
>> >
>> > Regarding Magma comparison:  the Sage code was written in 2008 by two
>> > masters' students under my supervision, though it has had some
>> > attention since then.  At that time I was systematically testing
>> > against Magma, and in the process we found many cases where our
>> > developing code missed points and many more where Magma missed points.
>> > All of these were duly reported to Steve Donelly (of Magma).  As a
>> > result, Sage ended up with a not-too-bad implementation, and Magma's
>> > was vastly improved: Steve essentially completely rewrote Magma's
>> > original code using many new ideas, which he has sadly not written up
>> > and so are not available to the rest of the world.
>> >
>> > To give a small idea of the problems I have been trying to address
>> > (see https://trac.sagemath.org/ticket/10973).  The Sage implementation
>> > for integral points over Q (but not S-integral points) follwed closely
>> > the account in Henri COhen's book, which in turn follwed Smart's book.
>> > But there are errors in those, arising from Smart's incorrect use of
>> > formulas from a paper of Sinnou David (literally he and David have
>> > opposite conventions for the periods of an elliptic curve, one has
>> > w1/w2 in the fundmental region and the other has 

Re: [sage-support] Re: Something like Mathematica's `Interact`?

2016-12-06 Thread William Stein
On Tue, Dec 6, 2016 at 5:49 PM, Joshua Marshall Moore
 wrote:
> I've downloaded sagemath specifically so I could play with interact.
> Unfortunately, none of the example seem to work in SageMath 7.4,

I wrote Sage's interact somewhat inspired by Mathematica's Manipulate
and Enthought traits at Sage Days 8 (see [1]) in 2008, prodded by
Jason Grout explaining that lack of Manipulate was a key obstruction
to people switching from Mathematica to Sage.People decided to
switch Sage's default notebook environment from sagenb to Jupyter
before completely and properly fully re-implementing interact for
Jupyter, so interact doesn't work in Jupyter (though Jason wrote
something called "widgets" for Jupyter).In the meantime, you can
(probably?) use interact by using the older sagenb interface (type
"sage -h" to figure out how; it should still be in sage...), or by
using SageMathCloud sage worksheets [2].   You can also track progress
on porting interact to Jupyter at [3], though it looks like nobody has
touched that in several months.

[1] https://wiki.sagemath.org/days8
[2] https://cloud.sagemath.com
[3] https://trac.sagemath.org/ticket/21267

> code. Anyone willing to walk me through SageMath's source on the example of
> interact?



>
>
> On Friday, November 20, 2009 at 11:41:41 PM UTC-8, ram.r...@gmail.com wrote:
>>
>> Is there something in Sage like Mathematica's `Interact`? For example,
>> I want to have a graph, and a slider, and when I move the slider, it
>> makes some change to the graph in real-time.
>>
>> Possible?
>
> --
> 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.



-- 
William (http://wstein.org)

-- 
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.


Re: [sage-support] Development process

2016-12-06 Thread William Stein
On Tue, Dec 6, 2016 at 1:02 PM, Justin C. Walker  wrote:

> Hi, all,
>
> I have not done any real Sage development for a while (the last time, I
> think, there were wolves in Wales).
>

Same... and equally interested in the answer :-)


>
> I want to work on an existing Trac ticket, and I'm not clear on how to
> start this work.
>
> The ticket page gives me a branch (u/blah/branch-name).
>
> I am starting in a new, empty directory, and 'git' seems to want a
> repository specified.
>
> I have a "global" .gitconfig file set up.
>
> A couple of questions:
>
> Should I check out the 'develop' branch first, and then incorporate (how?)
> the branch on top,
> or should I check out the branch first, and then updated it (how?) to the
> develop branch?
>
> I have read the TentativeConventions page on the wiki, but it seems to be
> slightly outdated.
>
> Pointers, advice, etc. are more than welcome.
>
> Thanks in advance,
>
> Justin
>
> --
> Justin C. Walker, Curmudgeon at Large
> Director
> Institute for the Enhancement of the Director's Income
> ---
> Nobody knows the trouble I've been
> ---
>
>
>
> --
> 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.
>



-- 
William (http://wstein.org)

-- 
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.


  1   2   3   4   5   6   7   8   9   10   >