[sage-devel] Re: About exceptions

2016-10-12 Thread Simon King
On 2016-10-12, Jori =?ISO-8859-1?Q?M=E4ntysalo?= wrote: > So we have now a common view that 'type' in TypeError should (mostly?) > refer to types in wrong class, wrong category etc; and so for functions > having no input it should (almost?) never happen. What about

Re: [sage-devel] Giving Sage AI-based step-by-step equation solving abilities

2016-10-12 Thread Ted Kosan
William wrote: > The term "AI", especially in the 1990s, has a bad reputation among > some people, due to having massively over-promised and > under-delivered. It got hyped like crazy by both academics and > companies at certain points in the past.The term can -- in some > cases -- cause

Re: [sage-devel] Giving Sage AI-based step-by-step equation solving abilities

2016-10-12 Thread Ted Kosan
Richard wrote: > Nilsson's book was published in 1980. I suspect that, even at that > time, it was considered as having a fairly limited perspective. In 2014 Marvin Minsky stated that current AI researchers were years behind the AI research that was being done in the 1970s. In my opinion, he

[sage-devel] About exceptions

2016-10-12 Thread Jori Mäntysalo
After #21687 there are 341 lines in 172 files with except Exception: What can happen in, say has_vertex() in generic graphs, when it has the code try: hash(vertex) except Exception: return False return self._backend.has_vertex(vertex) ? I.e. what if hash() runs

[sage-devel] Re: a 7(!) year old (Singular) overflow issue still holds

2016-10-12 Thread 'Bill Hart' via sage-devel
On Tuesday, 11 October 2016 09:33:57 UTC+2, Jean-Pierre Flori wrote: > > Yes it is a feature of the Singular 4 update that Singular and Sage work > by default with 16 bit exponents on 32 and 64 bit platform by default. > If only all of of you had read carefully the 543 comments of the update >

Re: [sage-devel] Re: trouble compiling latest sage development version

2016-10-12 Thread Dima Pasechnik
I see, thanks. I should have been cc'ng myself on #21567 long ago. Anyway, is it the time we open a meta-ticket on enabling full build of Sage with clang(++) ? (and creating a gfortran package to deal with fortran) It seems to be within reach nowadays. On Tuesday, October 11, 2016 at 9:35:20

Re: [sage-devel] About exceptions

2016-10-12 Thread Jeroen Demeyer
On 2016-10-12 12:47, Jori Mäntysalo wrote: After #21687 there are 341 lines in 172 files with except Exception: What can happen in, say has_vertex() in generic graphs, when it has the code try: hash(vertex) except Exception: return False return

Re: [sage-devel] About exceptions

2016-10-12 Thread Jori Mäntysalo
More about this: In posets.py there is try: elements = D.topological_sort() except Exception: raise ValueError("Hasse diagram contains cycles.") and that should be "except TypeError", as that is what .topological_sort() raises from DiGraph that is not acyclic. But

Re: [sage-devel] Giving Sage AI-based step-by-step equation solving abilities

2016-10-12 Thread Thierry
Hi, such a tool could be interesting. However, we are lacking concrete examples on PRESS abilities. It would be nice if you could provide some examples (and perhaps benchmarks), especially for things that Sage's solve command is not able deal with correctely (they are tons, just have a look on

Re: [sage-devel] Build issues with patchbots hades, poseidon and fermat

2016-10-12 Thread Jeroen Demeyer
On 2016-10-11 09:38, Eric Gourgoulhon wrote: Hi, Since Sage 7.4.rc0, the patchbots hades and poseidon fail with the message: [openblas-0.2.19] ./openblas_utest: error while loading shared libraries: libgfortran.so.3: cannot open shared object file: No such file or directory This is

Re: [sage-devel] trouble compiling latest sage development version

2016-10-12 Thread Francois Bissey
You mean like https://trac.sagemath.org/ticket/12426 ? François > On 12/10/2016, at 22:48, Dima Pasechnik wrote: > > I see, thanks. I should have been cc'ng myself on #21567 long ago. > > Anyway, is it the time we open a meta-ticket on enabling full build of Sage > with

Re: [sage-devel] About exceptions

2016-10-12 Thread Jori Mäntysalo
On Wed, 12 Oct 2016, Jeroen Demeyer wrote: What you expect. A MemoryError will be raised, which is caught by the "except Exception". OK. What are exceptions that "except Exception:" does not catch, but "except:" will catch? So I agree that code like the above is bad (but not nearly as bad

Re: [sage-devel] About exceptions

2016-10-12 Thread Travis Scrimshaw
On Wednesday, October 12, 2016 at 9:01:51 AM UTC-5, Daniel Krenn wrote: > > On 2016-10-12 13:39, Jori Mäntysalo wrote: > > More about this: In posets.py there is > > > > try: > > elements = D.topological_sort() > > except Exception: > > raise ValueError("Hasse

Re: [sage-devel] About exceptions

2016-10-12 Thread Daniel Krenn
On 2016-10-12 16:29, Travis Scrimshaw wrote: > > > On Wednesday, October 12, 2016 at 9:01:51 AM UTC-5, Daniel Krenn wrote: > > On 2016-10-12 13:39, Jori Mäntysalo wrote: > > More about this: In posets.py there is > > > > try: > > elements = D.topological_sort() >

Re: [sage-devel] About exceptions

2016-10-12 Thread Daniel Krenn
On 2016-10-12 13:39, Jori Mäntysalo wrote: > More about this: In posets.py there is > > try: > elements = D.topological_sort() > except Exception: > raise ValueError("Hasse diagram contains cycles.") > > and that should be "except TypeError", as that is what >

[sage-devel] Re: a 7(!) year old (Singular) overflow issue still holds

2016-10-12 Thread 'Bill Hart' via sage-devel
> > > >> >>> >>> This should create the polynomial x, then try to raise it to the power >>> of 2^30, which is about a billion I think. >>> >>> Along the way it will use the FFT, which is a bit of a memory hog. >>> >>> One day we ought to fix the powering code to handle monomials >>>

Re: [sage-devel] About exceptions

2016-10-12 Thread 'Martin R' via sage-devel
wouldn't it make sense to catch "everything reasonable"? I could imagine that for some reason at some point it is decided that the method you call raises a slightly different error. Would that be bad? Martin -- You received this message because you are subscribed to the Google Groups

[sage-devel] Re: a 7(!) year old (Singular) overflow issue still holds

2016-10-12 Thread 'Bill Hart' via sage-devel
On Tuesday, 11 October 2016 15:18:26 UTC+2, Dima Pasechnik wrote: > > > > On Tuesday, October 11, 2016 at 4:47:23 AM UTC, Bill Hart wrote: >> >> >> >> On Monday, 10 October 2016 12:31:25 UTC+2, Dima Pasechnik wrote: >>> >>> >>> >>> On Sunday, October 9, 2016 at 4:48:31 PM UTC, Bill Hart wrote:

Re: [sage-devel] About exceptions

2016-10-12 Thread Volker Braun
On Wednesday, October 12, 2016 at 4:01:51 PM UTC+2, Daniel Krenn wrote: > > There could be a ContainsCycleError which has RuntimeError as a base... > +1 -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop

Re: [sage-devel] Re: About exceptions

2016-10-12 Thread Jori Mäntysalo
On Wed, 12 Oct 2016, Simon King wrote: So we have now a common view that 'type' in TypeError should (mostly?) refer to types in wrong class, wrong category etc; and so for functions having no input it should (almost?) never happen. What about ValueError? After all, in that case, we have a

[sage-devel] Re: Giving Sage AI-based step-by-step equation solving abilities

2016-10-12 Thread Simon King
Hi Ted, On 2016-10-12, Ted Kosan wrote: > However, PRESS was not specifically designed for use in education, so > I don't think it would be very useful to include in Sage. IMHO, most of SageMath isn't about education. So, why do you think its inclusion wouldn't be useful?

[sage-devel] Re: Make OpenBLAS Error

2016-10-12 Thread Eric Gourgoulhon
Hi, Just to complete Steven's answer: with Ubuntu 16.04, if you install the Ubuntu package gfortran-5, your Sage build will use the system gfortran, which works fine (no missing libgfortran.so.3). In this case, you do not need the fix introduced in https://trac.sagemath.org/ticket/21689 Best

Re: [sage-devel] Giving Sage AI-based step-by-step equation solving abilities

2016-10-12 Thread rjf
Bundy's bibliography does not include this paper, which includes my critique of PRESS http://dl.acm.org/citation.cfm?id=43879 and which has Bundy as a co-author. I think that you would find (unless PRESS has been substantially changed) that PRESS has significantly fewer capabilities, returns

Re: [sage-devel] Giving Sage AI-based step-by-step equation solving abilities

2016-10-12 Thread Ted Kosan
Here is where the paper Richard mentions is located on the University of Edinburgh website: http://www.dai.ed.ac.uk/pub/daidb/papers/rp357.pdf Ted On Wed, Oct 12, 2016 at 7:35 PM, rjf wrote: > Bundy's bibliography does not include this paper, which includes my critique > of

[sage-devel] Re: Testing new graph algorithms

2016-10-12 Thread David Coudert
Le mardi 11 octobre 2016 16:03:44 UTC+2, Travis Scrimshaw a écrit : > > > >>> Even if it does turn out that this technique performs worse than Sage on >>> some graphs, is it worth trying to integrate it as an option for users? >>> >> >> Are these algorithms published? (sorry, "Mark Bell" isn't

[sage-devel] Re: Make OpenBLAS Error

2016-10-12 Thread Steven Trogdon
It looks like you are missing libgfortran3 libraries or at least they could not be found. Perhaps apt-get install libgfortran3 but there could be something else that's the problem. On Wednesday, October 12, 2016 at 11:43:20 AM UTC-5, Ethan Petersen wrote: > > Hello all, > > I'm building sage

Re: [sage-devel] Re: Giving Sage AI-based step-by-step equation solving abilities

2016-10-12 Thread Ted Kosan
Simon wrote: > IMHO, most of SageMath isn't about education. So, why do you think its > inclusion wouldn't be useful? The main reason PRESS was created was so it could be used as a tool to study a heuristic search technique called meta-level inference. The primary goal was not to build a CAS

Re: [sage-devel] Giving Sage AI-based step-by-step equation solving abilities

2016-10-12 Thread Ted Kosan
Thierry wrote: > such a tool could be interesting. However, we are lacking concrete > examples on PRESS abilities. It would be nice if you could provide some > examples (and perhaps benchmarks), especially for things that Sage's solve > command is not able deal with correctely (they are tons,

[sage-devel] Re: Make OpenBLAS Error

2016-10-12 Thread Steven Trogdon
Sorry, I'm slow. See https://trac.sagemath.org/ticket/21689 On Wednesday, October 12, 2016 at 12:40:57 PM UTC-5, Steven Trogdon wrote: > > It looks like you are missing libgfortran3 libraries or at least they > could not be found. Perhaps > > apt-get install libgfortran3 > > but there could be

Re: [sage-devel] About exceptions

2016-10-12 Thread Jori Mäntysalo
First, to answer my own question: at least for Python 3 see https://docs.python.org/3/library/exceptions.html Only exceptions not catch by "except Exception:" are SystemExit, KeyboardInterrupt and GeneratorExit. Hence only real difference between "except Exception:" and "except:" is that