[sage-devel] Re: 128 failed tests of Sage-5.4.1 on Debian Wheezy

2012-11-26 Thread Johan Grönqvist

2012-11-26 21:26, v...@ukr.net skrev:

   By the way, I downloaded the t1-cyrillic_4.16_all.deb package from
here: http://packages.debian.org/wheezy/t1-cyrillic
and unpacked it. It turned out that this archive contains the files
with commas in 'ItalicAngle' field. So it does not seem to be the
problem of my setup, am I right?



I agree, and a new search shows me that you reported it as a bug some 20 
minutes ago, if I am not mistaking timezones. As far as I can see, you 
have done the right thing.


Now you can try to edit your own afm files to remove the commas, or you 
can apply the matplotlib patch at 
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=691916#15, or you 
could try to use sage in an schroot that does not have the cyrillic font 
installed, and I am sure there are other ways to work around the problem.



/ Johan

--
You received this message because you are subscribed to the Google Groups 
sage-devel group.
To post to this group, send email to sage-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-devel+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.




[sage-devel] Re: 128 failed tests of Sage-5.4.1 on Debian Wheezy

2012-11-25 Thread Johan Grönqvist

2012-11-25 17:20, v_2e skrev:

   I'm not sure this is important, but I decided to report it just in
case. These are the failed tests of Sage-5.4.1 on Debian Wheezy.

--
The following tests failed:


 [...]




On my (amd64) debian wheezy, I ran make test on sage 5.4.1 and I see:

All tests passed!

Did you run some other command to test things?

At least some of the failing tests you mention (I haven't checked all) 
pass for me, so there is probably some difference between your wheezy 
and mine, or between your sage and mine...


(I wouldn't know where to start troubleshooting though, so I hope 
someone else asks the right questions for that.)


Regards

Johan

--
You received this message because you are subscribed to the Google Groups 
sage-devel group.
To post to this group, send email to sage-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-devel+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.




[sage-devel] Re: 128 failed tests of Sage-5.4.1 on Debian Wheezy

2012-11-25 Thread Johan Grönqvist

2012-11-25 21:41, v_2e skrev:

You may be missing a font Vladimir.


   Yes, I thought so too, but which one? How can I find it out?




Trying to help by random guessing:

If I was missing a font related to these kinds of things, I would first 
try to install the debian package texlive-fonts-recommended and see if 
that helped. (I have that package installed on the system where all 
tests pass.)


Regards

Johan

--
You received this message because you are subscribed to the Google Groups 
sage-devel group.
To post to this group, send email to sage-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-devel+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.




[sage-devel] Re: 128 failed tests of Sage-5.4.1 on Debian Wheezy

2012-11-25 Thread Johan Grönqvist

2012-11-25 21:41, v_2e skrev:

On Mon, 26 Nov 2012 09:24:38 +1300
François Bisseyfrancois.bis...@canterbury.ac.nz  wrote:


You may be missing a font Vladimir.


   Yes, I thought so too, but which one? How can I find it out?


Another idea, after some reading on the internet

In another message, you pasted the following output form sage when plotting:

Value error parsing header in AFM: ItalicAngle -10,5 

All my lines like that in AFM files seem to use a . as decimal 
separator. Perhaps you have a , somewhere?


(Of course, it could just be your system printing things using the ,,
rather than the actual AFM file containing a ,)

1)

What is the output of running

grep ItalicAngle /usr/share/fonts/X11/Type1/*.afm | grep ,

on your system?

2)

What is the output of running

grep ItalicAngle `find . -name *.afm` | grep ,

in the sage directory?

On my system I get an empty output for both of them, but the description 
at debian bug 691916 makes it look like that is not the case on all systems.


/ johan

--
You received this message because you are subscribed to the Google Groups 
sage-devel group.
To post to this group, send email to sage-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-devel+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.




[sage-devel] Re: 128 failed tests of Sage-5.4.1 on Debian Wheezy

2012-11-25 Thread Johan Grönqvist

2012-11-26 04:52, Dima Pasechnik skrev:

On 2012-11-26, v_2e wrote:

   I removed the package 't1-cyrillic' which contained the files with
comma in 'ItalicAngle', and now the Sage tests pass fine.

I think that 't1-cyrillic' triggers a bug -
E.g. on a system without cygillic locale one e.g. has

/usr/share/fonts/X11/Type1/qbkbi.afm:ItalicAngle -10.3

I think what happens is that the filenames generated by the installer
(or fontconfig?) are locale-dependent -

I just tried installing t1-cyrillic on a non-cyrillic weezy system,
and I have not got any ',' in file names.




Vladimir,

Do you still get the , in the file(s) if you install the font package 
in a non-cyrillic locale, as with


LC_ALL=C apt-get install t1-cyrillic

?

/ johan

--
You received this message because you are subscribed to the Google Groups 
sage-devel group.
To post to this group, send email to sage-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-devel+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.




[sage-devel] Re: Sage can't find Python on ARM?

2012-10-14 Thread Johan Grönqvist

2012-10-14 07:50, Dima Pasechnik skrev:

On Sunday, 14 October 2012 05:25:24 UTC+8, Johan Grönqvist wrote:

2012-10-13 20:23, jaebond skrev:
  |/home/ubuntu/sage/spkg/bin/sage: line489:
/home/ubuntu/sage/local/bin/python: No such fileor directory
 

In that case the problem was that the file was compiled for the armel
architecture, but the ubuntu I had installed was an armhf
architecture.

I would not rule this out as an option. E.g. my LG Optimus 2X phone has
roughly the same
specs processor-wise and memory-wise as the Toshiba AC100 netbook the
ARM Sage was compiled on,


Just a remark: This is not primarily about the actual hardware specs, 
but about the assumptions that the OS makes on hardware specs, like the 
difference between x86 and the 64-bit version. If I install a 32 bit 
ubuntu, compile a program, and send it to someone else who tries to run 
it on a 64-bit installation, they would have similar problems, even if 
we had the same hardware.




Here's a link to a solution to one instance of the armel vs. armhf 
problem: https://wiki.linaro.org/Platform/DevPlatform/DS5#Known_Issues


I do not know what libraries might be needed for sage, but the linked 
page suggests using ldd to find out.


Regards

Johan

--
You received this message because you are subscribed to the Google Groups 
sage-devel group.
To post to this group, send email to sage-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-devel+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.




[sage-devel] Re: Sage can't find Python on ARM?

2012-10-14 Thread Johan Grönqvist

2012-10-15 01:36, jaebond skrev:

On Sunday, October 14, 2012 3:09:25 AM UTC-4, Johan Grönqvist wrote:

gcc -v can tell you what you have ; in my case the target is
arm-linux-gnueabihf.
I ran gcc -vand it came back with arm-linux-gnueabiwithout either hf or el.


The name gnueabi is armel, and gnueabihf is armhf, as can be seen in the 
table Architectures in Debian on 
https://wiki.debian.org/Multiarch/Tuples



Regards

Johan

--
You received this message because you are subscribed to the Google Groups 
sage-devel group.
To post to this group, send email to sage-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-devel+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.




[sage-devel] Re: Sage can't find Python on ARM?

2012-10-13 Thread Johan Grönqvist

2012-10-13 20:23, jaebond skrev:

|/home/ubuntu/sage/spkg/bin/sage:line489:
/home/ubuntu/sage/local/bin/python:No  such fileor  directory

However, I have looked in/home/ubuntu/sage/local/bin  and there is a filepython 
 which links topython2  which links topython2.7.  It was suggested that I try 
asking my question here.  Are there any thoughts or suggestions?  Thank you.


I saw a similar problem with a totally different program some weeks ago, 
when I tried running a binary file and saw a file-not-found kind of error.


In that case the problem was that the file was compiled for the armel 
architecture, but the ubuntu I had installed was an armhf architecture.


Unfortunately, I do not know how to find out what the OS and binary are.

Ubuntu for arm seems to have used armel until 11.10, and armhf from 
12.04 (I believe).


Could it be that the binary was compiled on an armel installation of 
ubuntu, and that you are trying it on an armhf installation?


If that is the case, I think a solution might be to install some 
multiarch-packages to allow your armhf ubuntu to run armel binaries.


Another solution might be to compile from source on your device, but for 
a phone, that might not be a reasonable option.


Regards

Johan

--
You received this message because you are subscribed to the Google Groups 
sage-devel group.
To post to this group, send email to sage-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-devel+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.




[sage-devel] Re: Changes to supported platforms

2012-05-04 Thread Johan Grönqvist

2012-05-02 21:44, Jeroen Demeyer skrev:

On 2012-05-02 21:40, Johan Grönqvist wrote:

2012-05-02 10:44, Jeroen Demeyer skrev:

I made some changes to http://wiki.sagemath.org/SupportedPlatforms


The only debian version mentioned for sage-5.0 is Debian 5.0 on x86
(Both 32-bit and 64-bit) which is unsupported since February.

Debian 6.0, the only released and supported version at this time, is not
mentioned.

Can you confirm that sage-5.0.rc0 builds and passes all tests on Debian
6.0?  If so, you can change the page to include Debian 6.0.



The mercurial test (cmdline.py) fails in my default locale, because the 
term Distributed is translated to the Swedish (Distribuerad). 
Perhaps the test should always run in locale C?


Debian 7 (amd64) (not yet released, but widely used) passes all tests.
Debian 6 (amd64) passes all tests, as Dima reported.
Debian 6 (i386) passes all tests.

Regards

Johan

--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Re: Changes to supported platforms

2012-05-02 Thread Johan Grönqvist

2012-05-02 10:44, Jeroen Demeyer skrev:

I made some changes to http://wiki.sagemath.org/SupportedPlatforms


The only debian version mentioned for sage-5.0 is Debian 5.0 on x86 
(Both 32-bit and 64-bit) which is unsupported since February.


Debian 6.0, the only released and supported version at this time, is not 
mentioned.


Is the re a reason for this, or is it a mistake?

Regards

Johan

--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Re: Can we develop a plan to get 100% doctest coverage?

2012-04-29 Thread Johan Grönqvist

2012-04-29 16:35, David Kirkby skrev:

The fact there are functions in Sage untested is worrying, and I think
its fair to say most people would like to see 100% doctest coverage,
but IMHO, we need a plan for this to happen, and the plan inforced,
otherwise this will not happen soon. So I'm suggesting we collect
ideas for a plan.




As a humble user, I would like to mention something that could increase 
the chance of me contributing something. Perhaps it would just increase 
the change from 0.5% to 5%, but if many users think like me, that might 
still be worthwhile.


My assumption is that it is relatively easy to write a doctest.

It may very well be a bad idea, as it may be a bad user experience for 
people expecting a professional-looking and polished math-suite. If so, 
feel free to ignore it.


I use a sage 5 beta, and if I would run some code and get a message like 
the following:


This function you just used lacks doctests. Contributing doctests would 
be a simple way for you to help improving the quality of sage. If you 
have an hour [I do not know what is reasonable for a first doctest 
submission] to spare, please have a look at the page [link here] and 
consider writing a test for this function.


I expect this might be a performance problem, as a lot of functions may 
have to be tested for the presence of doctests on every invocation.


Again, feel free to tell me why it is a bad idea, and then ignore it.

(My only, very small, contribution to sage, was prompted by a confusing 
(to me) part of the sage documentation, and I do believe that I would 
need to be pointed to simple problems in parts of sage that I use, and 
lack of doctests might be such a simple thing.)


Regards

Johan


--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Re: Math typesetting for inputs in the notebook

2012-03-18 Thread Johan Grönqvist

2012-03-18 07:46, Yukun skrev:

I played around with the Sage notebook, and I think it would be
convenient if math typesetting is available for input (like in
mathematica), as it'll make it much easier to input long and complicated
functions.


I will not take part in the GSOC discussion, so this message should in 
no way be read as an opinion on what might be a reasonable GSOC project 
scope. As a sage-user I can see the usefulness of mathematica-style 
input in three ways (from my perspective):


1) Color coded hints: Something along the lines of having function 
arguments in one color (or style), symbolic variables in a second color 
(or style), most things in a third color (or style) and finally 
undefined names in a fourth color/style (good for spotting typos).


2) Readability of large expressions involving, e.g., fractions and lots 
of parentheses.


3) Using tensor notation in a comfortable way. Tensor usage in 
Mathematica can be accomplished with both upper and lower indices and it 
is possible to use pattern-matching on upper and lower indices 
separately in replacement-rules.


A fourth input-help would be syntax highlighting of python (and possible 
other) code, but according to some mailing list, that was considered and 
discarded for performance reasons.


It sounds like you are primarily targeting number 2, is that a correct 
reading?


Regards

Johan

--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Re: How does sage work??

2011-12-16 Thread Johan Grönqvist

2011-12-16 19:13, John Foster skrev:

 It makes no sense to me why we can not use the already installed
mathematics apps that are available to us and fill their requirements as
'dependencies'. I dont mean that the current process is wrong. I just
don't get it  I want to understand.


I am not one of the developers, but only a user.

Sage is, as already answered, a bunch of libraries connected by and 
extended by a lot of custom code.


Those libraries need to have versions that work well together, and when 
changing the versions of libraries, this must be managed and tested.


The process you describe has been tested, but apparently it is _far_ to 
much work to be feasible for sage as a project to work that way. The 
issue is (I expect) that sage works on many different systems, and in 
this context two systems are different if they can be expected to have 
different versions installed of a library on which sage depends, so any 
two linux distributions are probably different, and different releases 
of the same linux distribution are also different. This means that using 
system-libraries everywhere would lead to a huge maintenance burden.


/ johan

--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Re: Complex numerical integration

2010-10-14 Thread Johan Grönqvist

2010-10-14 06:01, Oscar Gerardo Lazo Arjona skrev:

I've been trying to solve this integral:

sage: numerical_integral(sqrt(sec(x)-1),pi/2,pi)
(nan, nan)

But that failed also... So I tried with mathematica:

numerical integration should be fairly easy to extend to complex
numbers. Am I missing something?


A workaround seems to be to integrate the real and imaginary parts 
separately:


sage: numerical_integral(real(sqrt(sec(x)-1)),pi/2, pi)
(1.9175999157365625e-16, 5.0010185963949996e-17)
sage: numerical_integral(imag(sqrt(sec(x)-1)),pi/2, pi)
(3.1415926269162875, 2.3498999460392589e-06)

... giving the same result as Mathematica (although numerically).

It seems to me that the integration is performed by gsl, and the gsl 
integration routine seems only to take real-valued functions as 
arguments, but I have not looked at this previously, so I may be missing 
something as well.


Regards

Johan

--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Re: norm of a complex number

2010-04-29 Thread Johan Grönqvist

2010-04-27 11:37, Minh Nguyen skrev:

Would you upload a patch
to the trac server to improve that documentation? If so, please CC me
on the relevant ticket and I'd be more than happy to review your
patch.


I have opened ticket 8825 and attached a patch. It is a very small 
change, and by no means complete. It merely adds two more examples to 
the docstring and is intended to display the inconsistency in usage of 
the term norm in sage.


I tried following the guides, but it is my first attempt at using both 
mercurial and trac, so I may well have missed something. The patch is 
against sage-4.4.rc0.


Regards

Johan

--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Re: norm of a complex number

2010-04-27 Thread Johan Grönqvist

2010-04-26 21:26, John Cremona skrev:


In number theory it is very useful to have this norm-alisation, as
well as the square root one also called abs.  It's a special case of
the algebraic concept of norm(a) = product of conjugates of a.

If this was really a problem to non-number-theorists, we could
possibly  live with it (possibly by defining a new function for this).

Other opinions may differ...




[Note: I come from physics, and do not use sage very much, but I would 
like to replace my usage of mathematica/maple with sage.]



Short version:

I am surprised by

sage: norm(1+I)
2
sage: norm(vector([1+I]))
sqrt(2)

and I think sage should choose to change the definition of norm used on 
complex numbers, as it wants to grow a broader user base.


The definition of norm on vectors is consistent with definitions of norm 
according to wikipedia [0] and the springer encyclopedia of mathematics 
[1], and (I believe) any book I have ever used. Those did not even 
mention that there is an alternative definition of norm used in number 
theory.


The norm on complex numbers is not consistent with viewing the complex 
numbers as a two-dimensional real vector space, according to the 
definitions mentioned above.






Long version:

I am very surprised by the current terminology. I think that many users 
coming from physics and engineering would be surprised, and the mission 
statement of sage, Creating a viable free open source alternative to 
Magma, Maple, Mathematica and Matlab, certainly seems to aim at a much 
broader user community than number-theorists.


I would be very surprised if any of mathematica, maple and matlab used 
the same convention as sage does, and given the mission statement, I 
think that common terminology is a good thing.


The concept of a norm, as I have always encountered it, is well defined, 
as in e.g. wikipedia[0] and other mathematics encyclopedias [1], [2], as 
well as (I belive) any book I have used. This refers to vector spaces, 
and I expect that most people use norms on vector spaces.


One property a norm is required to have is that for any vector v and 
scalar a:


norm(a*v) == abs(a) * norm(v)

this holds for vectors

sage: norm( (1+I) * vector([1+I]) )
2
sage: abs(1+I) * norm( vector([1+I]) )
2

but not for complex numbers seen as 2-dimensional real vectors:

sage: norm( 2 *  (1+I) )
8
sage: abs(2) * norm(1+I)
4


Regardless of that part, I think many people would, like me, be 
surprised by the following results:


sage: norm(1+I)
2
sage: norm(vector([1+I]))
sqrt(2)

I find it very strange that the one element vector does not have the 
same norm as the element it contains.


My suggestion is to change the definition of norm on complex numbers.

If that is not changed, I think that the docstring should clearly state 
that sage deviates from the definitions of norm used by wikipedia, 
springer, mathematica, maple and matlab, as I expect most people from 
physics and engineering expect sage to follow the same definition as those.



Regards

Johan



[0]: http://en.wikipedia.org/wiki/Norm_%28mathematics%29#Definition
[1]: http://eom.springer.de/N/n067340.htm
[2]: 
http://www.mathacademy.com/pr/prime/browse.asp?LT=FPRE=normLEV=BTBM=YTAL=YTAN=YTBI=YTCA=YTCS=YTDI=YTEC=YTGE=YTGR=YTHI=YTFO=YTNT=YTPH=YTST=YTTO=YTTR=Y


--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Re: norm of a complex number

2010-04-27 Thread Johan Grönqvist

2010-04-27 11:37, Minh Nguyen skrev:

Hi Johan,

2010/4/27 Johan Grönqvistjohan.gronqv...@gmail.com:

The current documentation of norm() on complex numbers can be accessed
from the Sage website [1]. That documentation leaves much to be
desired, even though it makes the distinction between the complex norm
and the absolute value of a complex number.


That documentation is much better than what I looked at. That certainly 
satisfies my request for documentation.



Would you upload a patch
to the trac server to improve that documentation? If so, please CC me
on the relevant ticket and I'd be more than happy to review your
patch.



I would like to improve the following case.

--
sage: norm?
Type:   function
Base Class: type 'function'
String Form:function norm at 0x1787938
Namespace:  Interactive
File:	 
/home/johan/Debian/sage-4.4.rc0/local/lib/python2.6/site-packages/sage/misc/functional.py

Definition: norm(x)
Docstring:
   Returns the norm of x.

   EXAMPLES:

  sage: z = 1+2*I
  sage: norm(z)
  5
  sage: norm(CDF(z))
  5.0
  sage: norm(CC(z))
  5.00
---

In particular I would like it to remark that the norm of the one element 
vector is not the same as the norm of the element (for a complex number).


I hope to look at it later this week.

Thanks for your reply


Regards

Johan






[1] 
http://www.sagemath.org/doc/reference/sage/rings/complex_number.html#sage.rings.complex_number.ComplexNumber.norm




--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Re: norm of a complex number

2010-04-27 Thread Johan Grönqvist

2010-04-27 13:29, Gonzalo Tornaria skrev:

2010/4/27 Johan Grönqvistjohan.gronqv...@gmail.com:

Those did not even mention that
there is an alternative definition of norm used in number theory.


Here it is: http://en.wikipedia.org/wiki/Field_norm



Thanks. Now I learned something new.


The norm on complex numbers is not consistent with viewing the complex
numbers as a two-dimensional real vector space, according to the definitions
mentioned above.


One caveat: the norm of a two-dimensional real vector space is not
canonical. In contrast, the norm of a two-dimensional field extension
is uniquely defined.



True, but the argument was not about the particular choice of norm, but 
the property


norm(a*v) == abs(a) * norm(v)  [for any scalar a and any vector v]

required for any vector-space norm. That property does not seem to hold 
for the field norm.


Regards

Johan

--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org