[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#852780: [sage-packaging] Cantor sage backend



Ximin Luo:
> Antonio Rojas:
>> El lunes, 22 de mayo de 2017 23:59:00 (CEST) Ximin Luo escribió:
>>  
>>> Thanks for the info. I had a play around, unfortunately --simple-prompt won't be sufficient.
>>>>
>>> REPLs generally support multiline input (e.g. Python itself) so unless the GSoC student specifically wants Cantor+Sage to work, we'll have to try to figure out how to push ipython to fix their simple-prompt...
>>>
>>
>> Thanks, I've added this info to the upstream report https://bugs.kde.org/show_bug.cgi?id=375467
>>
> 
> I think I've managed to fix it in IPython with this patch (2 commits):
> 
> https://github.com/ipython/ipython/pull/10606
> 
> Can you confirm? You also need to patch sage/repl/configuration.py as I mentioned earlier, as well as patch cantor_sagebackend.so if its version is < 16.12.
> 

On my end, it works only half-reliably, but I think the remaining issues are problems with Cantor and the fact it might be trying to use old Sage APIs; not problems with our patched Sage/IPython.

>>> integrate(1/(1-x^2), x)
- works fine

>>> plot(sin(x), (x, 0,2*pi))
- works fine

>>> plot(x^3, (x, 0, 5))
- sometimes works fine
- sometimes generates an incorrect plot, looks like a scatter plot with random points instead of a cubic curve
- sometimes gives "AttributeError: must give both plot endpoints"

>>> x = PolynomialRing(RationalField(), 'x').gen()
    f = (x^3 - 1)^2-(x^2-1)^2
    f.factor()
- works fine

>>> R = PolynomialRing(GF(97),'x')
    x = R.gen()
    S = R.quotient(x^3 + 7, 'a')
    a = S.gen()
    S
- outputs a bunch of unformatted raw latex, even though other examples such as the integrate one above work. in the console where cantor is running, one sees:
[..]
running:  "/usr/bin/dvips" -E -o "/tmp/cantor_tex-V26836.eps" "/tmp/cantor_tex-V26836.dvi"
This is dvips(k) 5.996 Copyright 2016 Radical Eye Software (www.radicaleye.com)
/usr/bin/dvips: DVI file can't be opened: /tmp/cantor_tex-V26836.dvi: No such file or directory
rendered file  "/tmp/cantor_tex-V26836.eps"
rendered a result to  "/tmp/cantor_tex-V26836.eps"
settting result to a type  1  result
update Entry
update result
error rendering latex:  "something is wrong"
[..]

X

-- 
GPG: ed25519/56034877E1F87C35
GPG: rsa4096/1318EFAC5FBBDBCE
https://github.com/infinity0/pubkeys.git


Reply to: