[sage-devel] Proposal: Stop providing binary distributions
Comments/review please in https://trac.sagemath.org/ticket/33131 -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/b22bfd03-bb75-452f-967d-c0e663b9ead2n%40googlegroups.com.
[sage-devel] GitPod
Thanks to work by Tobias Diez, we now have a fully functional GitPod (https://www.gitpod.io/) development environment for Sage in the cloud. GitPod runs Visual Studio Code (VS Code) in the web browser; but you can also connect it to VS Code running on the desktop. To try out, see https://trac.sagemath.org/ticket/33103 (needs review). -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/797d2978-0128-45cb-876f-3dddf66fdd18n%40googlegroups.com.
[sage-devel] Re: Proposal: Stop providing binary distributions
Mixed feelings... See my comments on the ticket. Le samedi 8 janvier 2022 à 20:10:15 UTC+1, Matthias Koeppe a écrit : > Comments/review please in https://trac.sagemath.org/ticket/33131 > > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/6db55a7d-dc21-4be6-8476-66b0457a91adn%40googlegroups.com.
[sage-devel] Python-level error messages don't give the source file name
I've noticed that some (many) Python-level error messages (e.g., syntax errors) from Sage 9.5.beta8 fail to give the name of the source file in which the error occured. For example, a few minutes ago I got this error message from a Sage code I'm working on: > Traceback (most recent call last): > > File > "/usr/local/sage/sage-9.5.beta8/local/var/lib/sage/venv-python3.7/lib/python3.7/site-packages/IPython/core/interactiveshell.py", > line 3441, in run_code > exec(code_obj, self.user_global_ns, self.user_ns) > > File "", line 1, in > load('setup.sage') > > File "sage/misc/persist.pyx", line 173, in sage.misc.persist.load > (build/cythonized/sage/misc/persist.c:2578) > sage.repl.load.load(filename, globals()) > > File > "/usr/local/sage/sage-9.5.beta8/local/var/lib/sage/venv-python3.7/lib/python3.7/site-packages/sage/repl/load.py", > line 272, in load > exec(preparse_file(f.read()) + "\n", globals) > > File "", line 8, in > > File "sage/misc/persist.pyx", line 173, in sage.misc.persist.load > (build/cythonized/sage/misc/persist.c:2578) > sage.repl.load.load(filename, globals()) > > File > "/usr/local/sage/sage-9.5.beta8/local/var/lib/sage/venv-python3.7/lib/python3.7/site-packages/sage/repl/load.py", > line 272, in load > exec(preparse_file(f.read()) + "\n", globals) > > File "", line 66 > P_xx[a,b] = simplify_expression( >^ > IndentationError: expected an indented block > > sage: Notice that the traceback entries mentioning Sage internal files all include the file name and line number, but the traceback errors for my own code just say 'File ""', with no useful information about which of my source-code files the error occured in. I'm not sure how much of this is Python's fault and how much is Sage's, but the user experience is not good. To reproduce this problem, create the following 2 files: % head error* ==> error1.sage <== load('error2.sage') print bad_function(2, 3) ==> error2.sage <== def bad_function(x,y) """ Note the missing ':' at the end of the first line of this file. This will produce a Sage/python syntax error when this file is loaded. """ return x+y % and type load('error1.sage') at the sage command prompt. stay safe and COVID-free, -- -- "Jonathan Thornburg [remove color- to reply]" on the west coast of Canada, eh? "There was of course no way of knowing whether you were being watched at any given moment. How often, or on what system, the Thought Police plugged in on any individual wire was guesswork. It was even conceivable that they watched everybody all the time." -- George Orwell, "1984" -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/YdpOjoVjfSJAO5qq%40gold.bkis-orchard.net.
Re: [sage-devel] Python-level error messages don't give the source file name
On 2022-01-08 18:56:21, Jonathan Thornburg wrote: > I've noticed that some (many) Python-level error messages (e.g., syntax > errors) from Sage 9.5.beta8 fail to give the name of the source file > in which the error occured. For example, a few minutes ago I got this > error message from a Sage code I'm working on: > I think the load() method has been superseded by whatever magic ipython offers. I'm not an expert, but I think sage: %run will give you a better error message. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/YdpVV0csgQu0mvvD%40stitch.
Re: [sage-devel] Python-level error messages don't give the source file name
I wrote: > I've noticed that some (many) Python-level error messages (e.g., syntax > errors) from Sage 9.5.beta8 fail to give the name of the source file > in which the error occured. [[...]] On Sat, Jan 08, 2022 at 10:24:07PM -0500, Michael Orlitzky replied: > I think the load() method has been superseded by whatever magic ipython > offers. I'm not an expert, but I think > > sage: %run > > will give you a better error message. Thanks for the suggestion. A bit of poking around shows that the sage input sage: run 'file-name' will work nicely. (There's no initial '%' sign -- the sage preparser adds that back on.) Alas, this is ONLY valid at the top-level ipython/sage REPL. Inside a 'run-ed' file, the run command doesn't work (it's a syntax error regardless of whether it's spelled 'run' or '%run'). More generally, suppose I have a bunch of Sage assignments-to-globals and function definitions in several files, say foo.sage bar.sage baz.sage what's the idiomatic way for some other piece of Sage source code to execute the contents of all of those files? What I've been doing is to create another file (say 'setup.sage') which contains the lines load('foo.sage') load('bar.sage') load('baz.sage') so that load('setup.sage') (either at the interactive Sage prompt or in another source file) loads all the individual files. This works fine apart from the un-helpful error messages when (not if, *when*) I have bugs in my code. Is there a more idiomatic way? -- -- "Jonathan Thornburg [remove color- to reply]" on the west coast of Canada, eh? "There was of course no way of knowing whether you were being watched at any given moment. How often, or on what system, the Thought Police plugged in on any individual wire was guesswork. It was even conceivable that they watched everybody all the time." -- George Orwell, "1984" -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/YdqOcqD%2B85Lcc4Rn%40gold.bkis-orchard.net.
[sage-devel] ECL out of memory error
A Sage program of mine recently aborted with an error traceback (given in full below) ending with > TypeError: ECL says: Memory limit reached. Please jump to an outer pointer, > quit > program and enlarge the > memory limits before executing the program again. How is the ECL memory limit configured? (From looking around with 'ps' and 'top' while Sage is running, I don't think I'm hitting any OS-level process-size limit.) --- begin full error traceback --- RuntimeError Traceback (most recent call last) /usr/local/sage/sage-9.5.beta8/local/var/lib/sage/venv-python3.7/lib/python3.7/site-packages/sage/interfaces/interface.py in __init__(self, parent, value, is_name, name) 731 try: --> 732 self._name = parent._create(value, name=name) 733 except (TypeError, RuntimeError, ValueError) as x: /usr/local/sage/sage-9.5.beta8/local/var/lib/sage/venv-python3.7/lib/python3.7/site-packages/sage/interfaces/maxima_lib.py in _create(self, value, name) 607 else: --> 608 self.set(name, value) 609 except RuntimeError as error: /usr/local/sage/sage-9.5.beta8/local/var/lib/sage/venv-python3.7/lib/python3.7/site-packages/sage/interfaces/maxima_lib.py in set(self, var, value) 515 cmd = '%s : %s$'%(var, value.rstrip(';')) --> 516 self.eval(cmd) 517 /usr/local/sage/sage-9.5.beta8/local/var/lib/sage/venv-python3.7/lib/python3.7/site-packages/sage/interfaces/maxima_lib.py in _eval_line(self, line, locals, reformat, **kwds) 461 if statement: --> 462 maxima_eval("#$%s$" % statement) 463 if not reformat: /usr/local/sage/sage-9.5.beta8/local/var/lib/sage/venv-python3.7/lib/python3.7/site-packages/sage/libs/ecl.pyx in sage.libs.ecl.EclObject.__call__ (build/cythonized/sage/libs/ecl.c:8438)() 837 lispargs = EclObject(list(args)) --> 838 return ecl_wrap(ecl_safe_apply(self.obj,(lispargs).obj)) 839 /usr/local/sage/sage-9.5.beta8/local/var/lib/sage/venv-python3.7/lib/python3.7/site-packages/sage/libs/ecl.pyx in sage.libs.ecl.ecl_safe_apply (build/cythonized/sage/libs/ecl.c:5980)() 358 else: --> 359 raise RuntimeError("ECL says: {}".format(message)) 360 else: RuntimeError: ECL says: Memory limit reached. Please jump to an outer pointer, quit program and enlarge the memory limits before executing the program again. During handling of the above exception, another exception occurred: TypeError Traceback (most recent call last) in 1 do_Einstein(ell=ell, emm=emm, parity='generic', 2 eqn_numbers_to_solve=(), > 3 result_name_prefix='generic_') in do_Einstein(ell, emm, parity, rescale_G_dd_factors, rescale_G_dd_name_prefixes, eqn_numbers_to_solve, result_name_prefix) in separate_Lorenz_gauge_eqns(ell, emm, G_dd) in simplify_expression(expr) /usr/local/sage/sage-9.5.beta8/local/var/lib/sage/venv-python3.7/lib/python3.7/site-packages/sage/symbolic/expression.pyx in sage.symbolic.expression.Expression.simplify_full (build/cythonized/sage/symbolic/expression.cpp:81694)() 10664 x = self 10665 x = x.simplify_factorial() > 10666 x = x.simplify_rectform() 10667 x = x.simplify_trig() 10668 x = x.simplify_rational() /usr/local/sage/sage-9.5.beta8/local/var/lib/sage/venv-python3.7/lib/python3.7/site-packages/sage/symbolic/expression.pyx in sage.symbolic.expression.Expression.simplify_rectform (build/cythonized/sage/symbolic/expression.cpp:83162)() 10815 10816 """ > 10817 simplified_expr = self.rectform() 10818 10819 if complexity_measure is None: /usr/local/sage/sage-9.5.beta8/local/var/lib/sage/venv-python3.7/lib/python3.7/site-packages/sage/symbolic/expression.pyx in sage.symbolic.expression.Expression.rectform (build/cythonized/sage/symbolic/expression.cpp:81206)() 10496 0.0 10497 """ > 10498 return self.maxima_methods().rectform() 10499 10500 def unhold(self, exclude=None): /usr/local/sage/sage-9.5.beta8/local/var/lib/sage/venv-python3.7/lib/python3.7/site-packages/sage/symbolic/maxima_wrapper.py in __call__(self, *args, **kwds) 30 """ 31 return super(MaximaFunctionElementWrapper, self).__call__(*args, ---> 32 **kwds).sage() 33 34 class MaximaWrapper(SageObject): /usr/local/sage/sage-9.5.beta8/local/var/lib/sage/venv-python3.7/lib/python3.7/site-packages/sage/interfaces/interface.py in __call__(self, *args, **kwds) 691 692 def __call__(self, *args, **kwds): --> 693 return self._obj.parent().function_call(self._name, [self._obj] + list(args), kwds) 694 695 def help(self): /usr/local/sage/sage-9.5.beta8/local/var/lib/sage/venv-python3.7/lib/python3.7/site-packages/sage/interfaces/interface