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

2023-06-30 Thread Raymond Rogers

Thanks! :)   I tried it with something that was coming up for me.

Ray:"How do I do 2d plots of polygons using complex numbers as coordinates"

It worked with explanations!
Unfortunately the code didn't work.  Almost though,  so we (wolfia.com) 
worked on it for a couple of rounds.
We gave up, but I am really impressed.  It did self-correct a couple of 
things but they weren't the core problem.
No complaints about the  performance though; I have a tendency to 
uncover bugs LOL
I would appreciate if somebody on the group would try the query and 
answer, and if a sagemath/sage  bug is found, tell me how to file it.

I would have copied the  transcript, but it's disappeared!
Or get it to work:)  I am working up a problem on a social media site 
and want to illustrate a polygon formula for constructing edge midpoint 
polygons from polygons; and reverse midpoint polygons to "full polygons.


In case you think I am lazy; I am.
Let me tell you, some of the manual sections are over 10,000 pages :)

System
Ubuntu mate-local build-python 3.10.6-Sagemat 10.0
No known problems
Both "sage" and "/opt/sage-10.0/sage --notebook  jupyterlab"
Had the same error.





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




--
You received this message because you are subscribed to the Google Groups 
"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/08c45d46-5d35-0e57-a44b-f51eb8e29e1b%40gmail.com.


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

2022-11-19 Thread Raymond Rogers
BTW: I have used the Mathematica package on a Raspberry Pi3+ over vnc, 
and the setup works quite well.  It's not a brain dead version; it knows 
things about Generalized Hypergeometric functions; and gives answers in 
a reasonable time.  It's nice to know that I can send off a problem and 
have "somebody else" (the Raspberry) work on it while I do something 
else :)   I presume that this is legal?

I didn't do stress tests though; I normally use SageMath.

rrogers


On 11/19/22 14:58, William Stein wrote:

xcept when this use is for further development. For end-user


--
You received this message because you are subscribed to the Google Groups 
"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/f6242c64-a09c-7cb7-5f56-fb9b6820f7a6%40gmail.com.


[sage-support] Re: Documentation error https://doc.sagemath.org/html/en/tutorial/programming.html? attach

2021-12-24 Thread Raymond Rogers
Ah well, some text got dropped.  The last entry "attach" errors out in 
Jupyter; even through "attach?" says it takes "*.sage", as does the 
documentation referenced.
Error
UsageError: Invalid GUI request 'sage', valid ones are:dict_keys(['inline', 
'nbagg', 'notebook', 'ipympl', 'widget', None, 'qt4', 'qt', 'qt5', 'wx', 
'tk', 'gtk', 'gtk3', 'osx', 'asyncio'])

On Friday, December 24, 2021 at 10:16:25 AM UTC-5 Raymond Rogers wrote:

> Internal title:  Sage Tutorial v9.4 » Programming
> Loading and Attaching Sage files
> The instruction below fails with the last line "attach" in Jupyter.  
>  Should I report this or just accept that the sage information in 
> doc.sagemath.org doesn't include Jupyter?
> --
>
> <https://doc.sagemath.org/html/en/tutorial/programming.html#loading-and-attaching-sage-files>
>
> "
> Next we illustrate how to load programs written in a separate file into 
> Sage. Create a file called example.sage with the following content:
> print("Hello World") print(2^3) 
>
> You can read in and execute example.sage file using the load command.
> sage: load("example.sage") Hello World 8 
>
> You can also attach a Sage file to a running session using 
> the attach command:
> sage: attach("example.sage") Hello World 8 
> "
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"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/7098ba0c-1f9f-4576-8f41-a23defb3f9d7n%40googlegroups.com.


[sage-support] Documentation error https://doc.sagemath.org/html/en/tutorial/programming.html? attach

2021-12-24 Thread Raymond Rogers
Internal title:  Sage Tutorial v9.4 » Programming
Loading and Attaching Sage files
The instruction below fails with the last line "attach" in Jupyter.  
 Should I report this or just accept that the sage information in 
doc.sagemath.org doesn't include Jupyter?
--


"
Next we illustrate how to load programs written in a separate file into 
Sage. Create a file called example.sage with the following content:
print("Hello World") print(2^3) 

You can read in and execute example.sage file using the load command.
sage: load("example.sage") Hello World 8 

You can also attach a Sage file to a running session using 
the attach command:
sage: attach("example.sage") Hello World 8 
"


-- 
You received this message because you are subscribed to the Google Groups 
"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/619ca3d2-502a-4a51-98ef-68847b565878n%40googlegroups.com.


[sage-support] laplace_transform hypergeometric?

2018-04-13 Thread Raymond Rogers
Is the Laplace transform of hypergeometric functions implemented?  If 
not can I have a pointer to how to implement it?

Here is an example under notebook(); jupyter throws the same error.
"TypeError: 'Integer' object is not iterable" , I tried various 
alterations of the parameters; to no avail.
Since the error seems irrelevant, should I try to look at the source 
(since it seems to try)?


Ray

from sympy import *
from sage.calculus import *
from sympy.integrals import laplace_transform
from sympy.abc import t, s
#from sympy.holonomic.holonomic import *
#from sympy.holonomic import DifferentialOperators,  from_meijerg, 
from_hyper

#from sympy.abc import x
from sympy import ZZ
#R, D = DifferentialOperators(ZZ.old_poly_ring(x), 'D')
#HolonomicFunction(D**2 + 1, x, 0, [0, 1])
#HolonomicFunction((1) + (1)*D**2, x, 0, [0, 1])

x, y,b,a= symbols('x y b a  ')

k, m, n = symbols('k m n', integer=True)
f, g, h = symbols('f g h', cls=Function)
init_printing(use_unicode=True)

--- code
eq= hypergeometric([1,2-a], [2], t)
print(eq)
print("")
eq3l=laplace_transform(eq,t,s)
print("")
eq3l

---
response from sagemath
---
hypergeometric((1, -a + 2), (2,), t)
Traceback (most recent call last):
  File "", line 1, in 
  File "_sage_input_23.py", line 10, in 
    exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 
-*-\\n" + 
_support_.preparse_worksheet_cell(base64.b64decode("ZXFhPSBoeXBlcmdlb21ldHJpYyhbMSwyLWFdLCBbMl0sIHQpCnByaW50KGVxYSkKZXEzbD1sYXBsYWNlX3RyYW5zZm9ybShlcWEsdCxzLHBsYW5lPU5vbmUpCmVxM2w="),globals())+"\\n"); 
execfile(os.path.abspath("___code___.py"))

  File "", line 1, in 

  File "/tmp/tmpO9ZqR1/___code___.py", line 5, in 
    eq3l=laplace_transform(eqa,t,s,plane=None)
  File 
"/media/rrogers/Data/opt/SageMath/local/lib/python2.7/site-packages/sympy/integrals/transforms.py", 
line 1122, in laplace_transform

    return LaplaceTransform(f, t, s).doit(**hints)
  File 
"/media/rrogers/Data/opt/SageMath/local/lib/python2.7/site-packages/sympy/core/cache.py", 
line 95, in wrapper

    retval = func(*args, **kwargs)
  File 
"/media/rrogers/Data/opt/SageMath/local/lib/python2.7/site-packages/sympy/core/function.py", 
line 427, in __new__

    result = super(Function, cls).__new__(cls, *args, **options)
  File 
"/media/rrogers/Data/opt/SageMath/local/lib/python2.7/site-packages/sympy/core/cache.py", 
line 95, in wrapper

    retval = func(*args, **kwargs)
  File 
"/media/rrogers/Data/opt/SageMath/local/lib/python2.7/site-packages/sympy/core/function.py", 
line 240, in __new__

    args = list(map(sympify, args))
  File 
"/media/rrogers/Data/opt/SageMath/local/lib/python2.7/site-packages/sympy/core/sympify.py", 
line 291, in sympify

    return a._sympy_()
  File "sage/symbolic/expression.pyx", line 1445, in 
sage.symbolic.expression.Expression._sympy_ 
(build/cythonized/sage/symbolic/expression.cpp:11968)
  File 
"/media/rrogers/Data/opt/SageMath/local/lib/python2.7/site-packages/sage/symbolic/expression_conversions.py", 
line 226, in __call__

    return self.composition(ex, operator)
  File 
"/media/rrogers/Data/opt/SageMath/local/lib/python2.7/site-packages/sage/symbolic/expression_conversions.py", 
line 794, in composition

    return f_sympy(*sympy.sympify(g, evaluate=False))
  File 
"/media/rrogers/Data/opt/SageMath/local/lib/python2.7/site-packages/sympy/functions/special/hyper.py", 
line 182, in __new__

    return Function.__new__(cls, _prep_tuple(ap), _prep_tuple(bq), z)
  File 
"/media/rrogers/Data/opt/SageMath/local/lib/python2.7/site-packages/sympy/functions/special/hyper.py", 
line 44, in _prep_tuple

    return TupleArg(*[unpolarify(x) for x in v])
TypeError: 'Integer' object is not iterable

--
You received this message because you are subscribed to the Google Groups 
"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: simple?--from_meijer in jupyter

2018-04-13 Thread Raymond Rogers

Sigh:   Yes...

Thanks!

Ray


On 04/13/2018 08:01 AM, Eric Gourgoulhon wrote:

Hi,

There is a typo in your code: it should be "from_meijerg" instead of 
"from_meijer":


|
sage:fromsympy.holonomic.holonomic importfrom_meijerg
sage:from_meijerg?
Signature:from_meijerg(func,x0=0,evalf=False,initcond=True,domain=QQ)
Docstring:
Convertsa MeijerG-functionto Holonomic."func"isthe G-Function
and"x0"isthe point at which initial conditions are required.

>>>fromsympy.holonomic.holonomic importfrom_meijerg,DifferentialOperators
>>>fromsympy importsymbols,meijerg,S
>>>x =symbols('x')
>>>from_meijerg(meijerg(([],[]),([S(1)/2],[0]),x**2/4))
HolonomicFunction((1)+(1)*Dx**2,x,0,[0,1/sqrt(pi)])
Initdocstring:x.__init__(...)initializes x;see help(type(x))forsignature
File:~/sage/8.1/local/lib/python2.7/site-packages/sympy/holonomic/holonomic.py
Type:function
|

Best wishes,

Eric.

Le vendredi 13 avril 2018 00:06:17 UTC+2, Raymond Rogers a écrit :

The sympy documentation
http://docs.sympy.org/latest/modules/holonomic/convert.html
<http://docs.sympy.org/latest/modules/holonomic/convert.html>
 has the function from_meiljer and I do
from sympy import *
from sympy.holonomic.holonomic import from_hyper, from_meijer,
DifferentialOperators
(I think redundant)
I get: "ImportError: cannot import name from_meijer"
Is this a versioning error or what?

--
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/1I8ZThs_WGA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to 
sage-support+unsubscr...@googlegroups.com 
<mailto:sage-support+unsubscr...@googlegroups.com>.
To post to this group, send email to sage-support@googlegroups.com 
<mailto:sage-support@googlegroups.com>.

Visit this group at 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] simple?--from_meijer in jupyter

2018-04-13 Thread Raymond Rogers

Yes I had that; I thought the whole thing was too redundant.

Here is a complete entry and response:
from sympy import *
from sympy.holonomic.holonomic import from_hyper, from_meijer, 
DifferentialOperators

from sympy.holonomic.holonomic import *
from sympy.integrals import laplace_transform
from sympy.abc import z, t,s,a
from sympy.holonomic.holonomic import *

x, y= symbols('x y   ')
k, m, n = symbols('k m n', integer=True)
f, g, h = symbols('f g h', cls=Function)
init_printing(use_unicode=True)
--
--Response

ImportError   Traceback (most recent call last)
 in ()
  1 from sympy import *
> 2 from sympy.holonomic.holonomic import from_hyper, from_meijer, 
DifferentialOperators

  3 from sympy.holonomic.holonomic import *
  4 from sympy.integrals import laplace_transform
  5 from sympy.abc import z, t,s,a

ImportError: cannot import name from_meijer
--
And the suggestion in your following message works; or at least doesn't 
error out.

But the attempt to:

from sympy.holonomic import DifferentialOperators,  from_meijer, from_hyper

continues to fail irrespective of the ordering of from_meijer and 
from_hyper.
I will check and see if that statement can be removed; perhaps it's not 
needed?


Ray


On 04/13/2018 03:25 AM, Henri Girard wrote:


Sorry if I spam :

I did this is it of any help as it works in sage-8.1

from sympy import *
from sympy.holonomic.holonomic import *
from sympy.holonomic import DifferentialOperators
from sympy.abc import x
from sympy import ZZ
R, D = DifferentialOperators(ZZ.old_poly_ring(x), 'D')
HolonomicFunction(D**2 + 1, x, 0, [0, 1])
HolonomicFunction((1) + (1)*D**2, x, 0, [0, 1])



Le 13/04/2018 à 00:06, Raymond Rogers a écrit :

The sympy documentation
http://docs.sympy.org/latest/modules/holonomic/convert.html
 has the function from_meiljer and I do
from sympy import *
from sympy.holonomic.holonomic import from_hyper, from_meijer, 
DifferentialOperators

(I think redundant)
I get: "ImportError: cannot import name from_meijer"
Is this a versioning error or what?
As a side issue: I am trying to go from generalized hypergeometric 
<-> meijerg

Is there a better way than through holomorphic?
--
You received this message because you are subscribed to the Google 
Groups "sage-support" group.
To unsubscribe from this group and stop receiving emails from it, 
send an email to sage-support+unsubscr...@googlegroups.com 
<mailto:sage-support+unsubscr...@googlegroups.com>.
To post to this group, send email to sage-support@googlegroups.com 
<mailto:sage-support@googlegroups.com>.

Visit this group at 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 a topic in the 
Google Groups "sage-support" group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/sage-support/1I8ZThs_WGA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to 
sage-support+unsubscr...@googlegroups.com 
<mailto:sage-support+unsubscr...@googlegroups.com>.
To post to this group, send email to sage-support@googlegroups.com 
<mailto:sage-support@googlegroups.com>.

Visit this group at 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.


[sage-support] simple?--from_meijer in jupyter

2018-04-12 Thread Raymond Rogers
The sympy documentation
http://docs.sympy.org/latest/modules/holonomic/convert.html
 has the function from_meiljer and I do 
from sympy import *
from sympy.holonomic.holonomic import from_hyper, from_meijer, 
DifferentialOperators
(I think redundant)
I get: "ImportError: cannot import name from_meijer" 
Is this a versioning error or what?

As a side issue: I am trying to go from generalized hypergeometric <-> 
meijerg 
Is there a better way than through holomorphic?


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


[sage-support] Re: sage mesh doesn't work in ipynb

2016-11-30 Thread Raymond Rogers
Actually, I just wanted mesh=True and 3d interaction in jupyter; but colors 
would nice also.  It's a little disappointing when an "improvement" 
disables things.  

On Thursday, May 5, 2016 at 2:53:54 AM UTC-4, HG wrote:
>
> Hi,
> Is there a way to get a nice rainbow mesh on sagemath jupyter notebook ?
> Mesh doesn't work on jnb, the following works on sagenb but not in jnb
>
> Best regards,
> Henri
>
> x, y = var('x y') 
> plot3d(sin(pi*(x^2+y^2))/sqrt(x^2+y^2),
>(x,-1.5,1.5),(y,-1.5,1.5),
>mesh=True,color='yellow')
>

-- 
You received this message because you are subscribed to the Google Groups 
"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: Why solve(5^( x -1) == (0.04)^(2*x), x) returns empty set?

2014-11-24 Thread Raymond Rogers


On 11/23/2014 09:01 PM, Chris Seberino wrote:



On Wednesday, November 19, 2014 8:48:07 AM UTC-6, Jakob Kroeker wrote:


Even if it is expectable that in some cases (which?) solve may not
return all solutions, it should be explicitly pointed out;
Especially it should be stated that an empty list does not
necessarily imply there are no solutions.

Yes!  Actually adding something like the following would be an 
improvement


if (answer == []) and not_sure_there_are_no_solutions:
print question
else:
print answer

I heard Emmanuel's warning that the not_sure_there_are_no_solutions 
boolean may be hard to calculate in some cases.


In my opinion, not_sure_there_are_no_solutions should default to True 
unless it is a case where

we can with certaintly set not_sure_there_are_no_solutions = False.



Other opinions? If everybody agrees, I will open a ticket.


Please do!  Thanks!


In general people don't like double negatives :)  How about
solution(s) not found

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