Re: [sage-support] Compile Sage 8.9 on Opensuse Tumbleweed:Error building gfortran-7.4.0

2019-12-26 Thread 'Shing Hing Man' via sage-support
Hi,
   You are correct that  in my config.log,  there is message saying "gcc- 
... will not be installed" :

matmsh@euler:~/installed/sages/sage-8.9> grep gcc config.log  | grep install
configure:7665: === checking whether to install the gcc SPKG ===
configure:19813: result: gcc-7.4.0 will not be installed (configure 
check)
matmsh@euler:~/installed/sages/sage-8.9> 


I have done a rebuilt: 
> make distclean && ./configure 
> make

After the rebuilt,  the config.log still contains

matmsh@euler:~/installed/sages/sage-8.9> grep gfortran config.log  | grep 
install
configure:13595: === checking whether to install the gfortran SPKG ===
configure:19813: result: gfortran-7.4.0 will not be installed 
(configure check)
matmsh@euler:~/installed/sages/sage-8.9> grep gcc config.log  | grep install
configure:7665: === checking whether to install the gcc SPKG ===
configure:19813: result: gcc-7.4.0 will not be installed (configure 
check)


Below are intalled Fortran related rpm packages. 
matmsh@euler:~/installed/sages/sage-8.9> rpm -qa | grep fortran
libgfortran4-7.5.0+r278197-1.1.x86_64
gcc9-fortran-32bit-9.2.1+r275327-1.3.x86_64
libgfortran5-9.2.1+r275327-1.3.x86_64
gcc-fortran-32bit-9-1.6.x86_64
libgfortran5-32bit-9.2.1+r275327-1.3.x86_64
gcc9-fortran-9.2.1+r275327-1.3.x86_64
gcc-fortran-9-1.6.x86_64
matmsh@euler:~/installed/sages/sage-8.9> 



As Sage is working on my PC, I will leave it as it. 
Thanks for your comments !

Shing



On Wednesday, December 25, 2019 at 5:25:03 PM UTC, Dima Pasechnik wrote:
>
> On Wed, Dec 25, 2019 at 10:13 PM 'Shing Hing Man' via sage-support 
> > wrote: 
> > 
> > 
> > Hi, 
> >   Below is a grep near a "neighbourbood" gfortran in my config.log. 
> > 
> Thanks. So one sees 
>
> configure:19813: result: gfortran-7.4.0 will not be installed 
> (configure check) 
>
> which means that Sage will not attempt to build its own gfortran. 
> I presume you also see 
>
> ... result:   gcc-...   will not be installed (configure check) 
>
> Are you saying that despite this, an attempt is made to do so? 
> The only case this could happen is, I think, that you started a build 
> without gfortran installed, then 
> installed it, didn't 
>
> make distclean && ./configure 
>
> Dima 
> > 
> > 
> > matmsh@euler:~/installed/sage/logs/pkgs> grep -A 2 -B 2 gfortran 
>  config.log 
> > configure:5920: checking dependency style of g++ 
> > configure:6031: result: none 
> > configure:6099: checking for gfortran 
> > configure:6115: found /usr/bin/gfortran 
> > configure:6126: result: gfortran 
> > configure:6152: checking for Fortran compiler version 
> > configure:6161: gfortran --version >&5 
> > GNU Fortran (SUSE Linux) 9.2.1 20190903 [gcc-9-branch revision 275330] 
> > Copyright (C) 2019 Free Software Foundation, Inc. 
> > -- 
> > 
> > configure:6172: $? = 0 
> > configure:6161: gfortran -v >&5 
> > Using built-in specs. 
> > COLLECT_GCC=gfortran 
> > COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/9/lto-wrapper 
> > OFFLOAD_TARGET_NAMES=hsa:nvptx-none 
> > -- 
> > gcc version 9.2.1 20190903 [gcc-9-branch revision 275330] (SUSE Linux) 
> > configure:6172: $? = 0 
> > configure:6161: gfortran -V >&5 
> > gfortran: error: unrecognized command line option '-V' 
> > gfortran: fatal error: no input files 
> > compilation terminated. 
> > configure:6172: $? = 1 
> > configure:6161: gfortran -qversion >&5 
> > gfortran: error: unrecognized command line option '-qversion'; did you 
> mean '--version'? 
> > gfortran: fatal error: no input files 
> > compilation terminated. 
> > configure:6172: $? = 1 
> > configure:6181: checking whether we are using the GNU Fortran compiler 
> > configure:6194: gfortran -c   conftest.F >&5 
> > configure:6194: $? = 0 
> > configure:6203: result: yes 
> > configure:6209: checking whether gfortran accepts -g 
> > configure:6220: gfortran -c -g  conftest.f >&5 
> > configure:6220: $? = 0 
> > configure:6228: result: yes 
> > -- 
> > configure:13454: result: no 
> > configure:13538: checking for Fortran flag needed to accept free-form 
> source 
> > configure:13557: gfortran -c -g -O2  conftest.f >&5 
> > conftest.f:2:3: 
> > 
> > -- 
> > |   'world.' 
> > |end 
> > configure:13557: gfortran -c -g -O2 -ffree-form  conftest.f >&5 
> > configure:13557: $? = 0 
> > configure:13566: result: -ffree-form 
> > configure:13595: === checking whether

Re: [sage-support] Compile Sage 8.9 on Opensuse Tumbleweed:Error building gfortran-7.4.0

2019-12-25 Thread 'Shing Hing Man' via sage-support

Hi,
  Below is a grep near a "neighbourbood" gfortran in my config.log.



matmsh@euler:~/installed/sage/logs/pkgs> grep -A 2 -B 2 gfortran  
config.log   
configure:5920: checking dependency style of g++
configure:6031: result: none
configure:6099: checking for gfortran
configure:6115: found /usr/bin/gfortran
configure:6126: result: gfortran
configure:6152: checking for Fortran compiler version
configure:6161: gfortran --version >&5
GNU Fortran (SUSE Linux) 9.2.1 20190903 [gcc-9-branch revision 275330]
Copyright (C) 2019 Free Software Foundation, Inc.
--

configure:6172: $? = 0
configure:6161: gfortran -v >&5
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/9/lto-wrapper
OFFLOAD_TARGET_NAMES=hsa:nvptx-none
--
gcc version 9.2.1 20190903 [gcc-9-branch revision 275330] (SUSE Linux) 
configure:6172: $? = 0
configure:6161: gfortran -V >&5
gfortran: error: unrecognized command line option '-V'
gfortran: fatal error: no input files
compilation terminated.
configure:6172: $? = 1
configure:6161: gfortran -qversion >&5
gfortran: error: unrecognized command line option '-qversion'; did you mean 
'--version'?
gfortran: fatal error: no input files
compilation terminated.
configure:6172: $? = 1
configure:6181: checking whether we are using the GNU Fortran compiler
configure:6194: gfortran -c   conftest.F >&5
configure:6194: $? = 0
configure:6203: result: yes
configure:6209: checking whether gfortran accepts -g
configure:6220: gfortran -c -g  conftest.f >&5
configure:6220: $? = 0
configure:6228: result: yes
--
configure:13454: result: no
configure:13538: checking for Fortran flag needed to accept free-form source
configure:13557: gfortran -c -g -O2  conftest.f >&5
conftest.f:2:3:

--
|   'world.'
|end
configure:13557: gfortran -c -g -O2 -ffree-form  conftest.f >&5
configure:13557: $? = 0
configure:13566: result: -ffree-form
configure:13595: === checking whether to install the gfortran SPKG ===
configure:13682: === checking whether to install the git SPKG ===
configure:13726: checking for git
--
configure:19809: result: gf2x-1.2.p0
configure:19809: result: gfan-0.6.2.p1
configure:19813: result: gfortran-7.4.0 will not be installed 
(configure check)
configure:19809: result: giac-1.5.0.63.p0
configure:19809: result: giacpy_sage-0.6.7
--
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_ac_ct_CXX=g++
ac_cv_prog_ac_ct_FC=gfortran
ac_cv_prog_ac_ct_OBJC=gcc
ac_cv_prog_ac_ct_OBJCXX=g++
--
gfan \
gfan \
gfortran \
gfortran \
giac \
giac \
--
EGREP='/usr/bin/grep -E'
EXEEXT=''
FC='gfortran'
FCFLAGS='-g -O2 -ffree-form'
FREETYPE_CFLAGS=''
--
ac_ct_CC='gcc'
ac_ct_CXX='g++'
ac_ct_FC='gfortran'
ac_ct_OBJC='gcc'
ac_ct_OBJCXX='g++'
--
deps_appnope = $(PYTHON) | pip
deps_arb = $(MP_LIBRARY) mpfr flint
deps_atlas = gfortran | $(PYTHON)
deps_autotools = ncurses git xz
deps_awali = $(PYTHON) cmake cython nbconvert ncurses
--
deps_gf2x = 
deps_gfan = $(MP_LIBRARY) cddlib
deps_gfortran = | $(MP_LIBRARY) mpfr mpc zlib xz
deps_giac = readline libpng $(MP_LIBRARY) mpfr mpfi ntl gsl pari
deps_giacpy_sage = $(PYTHON) cython giac cysignals | $(SAGERUNTIME) pip 
sympy maxima
--
deps_notedown = $(PYTHON) setuptools | pip nbformat nbconvert six 
pandoc_attributes
deps_ntl = $(MP_LIBRARY) gf2x
deps_numpy = $(PYTHON) $(BLAS) gfortran | setuptools pip pkgconfig cython
deps_openblas = gfortran | $(PYTHON)
deps_openssl = 
deps_ore_algebra = $(PYTHON) | setuptools pip
--
deps_qepcad = readline saclib
deps_qhull = | cmake
deps_r = $(BLAS) gfortran iconv readline bzip2 xz pcre curl | pkgconf
deps_r_jupyter =  | $(STANDARD_PACKAGES)
deps_ratpoints = $(MP_LIBRARY)
--
deps_scandir = $(PYTHON) | setuptools pip six
deps_scipoptsuite = $(MP_LIBRARY) bliss readline | cmake
deps_scipy = $(PYTHON) $(BLAS) gfortran numpy | pip
deps_scons = $(PYTHON)
deps_send2trash = $(PYTHON) | pip
--
vers_gf2x = 1.2.p0
vers_gfan = 0.6.2.p1
vers_gfortran = 7.4.0
vers_giac = 1.5.0.63.p0
vers_giacpy_sage = 0.6.7
matmsh@euler:~/installed/sage/logs/pkgs> 

Shing

On Saturday, December 21, 2019 at 1:59:12 PM UTC, Dima Pasechnik wrote:
>
> On Sat, Dec 21, 2019 at 7:59 PM 'Shing Hing Man' via sage-support 
> > wrote: 
> > 
> > My CPU is AMD Ryzen 2700X, so it is 64bit. 
> > 
> > I already have gcc-fortran-9-1.6.x86_64 
> >   installed when I did the build earlier. 
> > 
> > After I install gcc-fortran-32bit-9-1.6.x86_64,  and then do a make (on 
> a new sage-8.9 folder) , the error on gfortran disappeared and  sage has 
> built. 
>
> but why do you need a 32-bit gfortran? Is something getting misconfigured? 
>
> Could you post the output of Sage's config.log if you use the "normal" 
> gfor

Re: [sage-support] Compile Sage 8.9 on Opensuse Tumbleweed:Error building gfortran-7.4.0

2019-12-21 Thread 'Shing Hing Man' via sage-support
My CPU is AMD Ryzen 2700X, so it is 64bit.

I already have gcc-fortran-9-1.6.x86_64
  installed when I did the build earlier. 

After I install gcc-fortran-32bit-9-1.6.x86_64,  and then do a make (on a 
new sage-8.9 folder) , the error on gfortran disappeared and  sage has 
built. 

Thank you for your assistance ! 

Shing



On Saturday, December 21, 2019 at 10:28:44 AM UTC, Dima Pasechnik wrote:
>
> Do you have a 32-bit system?
>
> Anyway, if you could install system's gfortran package it would be a way 
> out of this.
> It seems your system should have gfortran version 7,  the package is 
> called gcc-fortran.
>
> HTH
> Dmitrii
>
> On Sat, 21 Dec 2019, 17:12 'Shing Hing Man' via sage-support, <
> sage-s...@googlegroups.com > wrote:
>
>> Hi,
>>   When I compile Sage 8.9 on Opensuse Tumbleweed, there is a problem 
>> building   gfortran-7.4.0 :
>> static library.  */"; echo "GROUP ( libgcc_s.so.1 -lgcc )" ) > 
>> ./libgcc_s.so
>> /usr/bin/ld: skipping incompatible /usr/lib/../lib/libc.so when searching 
>> for -lc
>> /usr/bin/ld: i386 architecture of input file `/usr/lib/../lib/crti.o' is 
>> incompatible with i386:x86-64 output
>> /usr/bin/ld: i386 architecture of input file `/usr/lib/../lib/crtn.o' is 
>> incompatible with i386:x86-64 output
>> collect2: error: ld returned 1 exit status
>> make[6]: *** [Makefile:982: libgcc_s.so] Error 1
>> make[6]: Leaving directory 
>> '/home/matmsh/installed/sages/sage-8.9/local/var/tmp/sage/build/gfortran-7.4.0/gcc-build/x86_64-pc-linux-gnu/libgcc'
>> make[5]: *** [Makefile:11907: all-target-libgcc] Error 2
>> make[5]: Leaving directory 
>> '/home/matmsh/installed/sages/sage-8.9/local/var/tmp/sage/build/gfortran-7.4.0/gcc-build'
>> make[4]: *** [Makefile:878: all] Error 2
>> make[4]: Leaving directory 
>> '/home/matmsh/installed/sages/sage-8.9/local/var/tmp/sage/build/gfortran-7.4.0/gcc-build'
>>
>> 
>> Error building gfortran-7.4.0
>>
>> 
>>
>> I ran 
>>   ./configure 
>>   MAKE='make -12' make
>>
>> Thanks in advance for any assistance ! 
>> Shing
>>
>> -- 
>> 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-s...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/sage-support/4f8bac3b-7301-449b-af36-8cdf22569b32%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/sage-support/4f8bac3b-7301-449b-af36-8cdf22569b32%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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/eefa66a3-e921-4c4b-9b75-5e790c48ac4d%40googlegroups.com.


[sage-support] Compile Sage 8.9 on Opensuse Tumbleweed:Error building gfortran-7.4.0

2019-12-21 Thread &#x27;Shing Hing Man' via sage-support
Hi,
  When I compile Sage 8.9 on Opensuse Tumbleweed, there is a problem 
building   gfortran-7.4.0 :
static library.  */"; echo "GROUP ( libgcc_s.so.1 -lgcc )" ) > ./libgcc_s.so
/usr/bin/ld: skipping incompatible /usr/lib/../lib/libc.so when searching 
for -lc
/usr/bin/ld: i386 architecture of input file `/usr/lib/../lib/crti.o' is 
incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `/usr/lib/../lib/crtn.o' is 
incompatible with i386:x86-64 output
collect2: error: ld returned 1 exit status
make[6]: *** [Makefile:982: libgcc_s.so] Error 1
make[6]: Leaving directory 
'/home/matmsh/installed/sages/sage-8.9/local/var/tmp/sage/build/gfortran-7.4.0/gcc-build/x86_64-pc-linux-gnu/libgcc'
make[5]: *** [Makefile:11907: all-target-libgcc] Error 2
make[5]: Leaving directory 
'/home/matmsh/installed/sages/sage-8.9/local/var/tmp/sage/build/gfortran-7.4.0/gcc-build'
make[4]: *** [Makefile:878: all] Error 2
make[4]: Leaving directory 
'/home/matmsh/installed/sages/sage-8.9/local/var/tmp/sage/build/gfortran-7.4.0/gcc-build'

Error building gfortran-7.4.0


I ran 
  ./configure 
  MAKE='make -12' make

Thanks in advance for any assistance ! 
Shing

-- 
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/4f8bac3b-7301-449b-af36-8cdf22569b32%40googlegroups.com.


[sage-support] Re: Using the simple server API

2010-07-24 Thread Shing Hing Man
Hi,
   Thanks for the patch to fix simple API !I have tested the patch
in sage 4.5.1.

Shing


On Jun 24, 1:29 pm, "David Poetzsch-Heffter"
 wrote:
> Hi!
>
> I know this thread is a little old but running theSimpleSage ServerAPI
> is also important for me.
>
> I fixed the bugs mentioned and opened a trac ticket for it:
>
> http://trac.sagemath.org/sage_trac/ticket/9327
>
> greetings,
> David Poetzsch-Heffter
>
> 
> fromhttp://www.mail-archive.com/sage-support@googlegroups.com/msg16537.html

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


[sage-support] Re: How to list (and remove) loaded objects in a sage session

2010-01-17 Thread Shing Hing Man
Thanks for all the reply!
show_identifiers() and reset() are what I am looking for.
But it is good to learn that Python does garbage collection in a way
similar to Java.

Shing

On Jan 17, 12:35 am, William Stein  wrote:
> 2010/1/16 Shing Hing Man :
>
> > Hi,
> >   In a Sage session (within notebook or command console) ,  how to
> > list all the loaded objects and how to remove them from the session ?
>
> Use show_identifiers and reset:
>
> sage: X = 10
> sage: show_identifiers()
> ['X', 'Out', 'variables', 'In', 'view_all']
> sage: reset()
> sage: show_identifiers()
> []
> sag
>
> > I would like to reuse a connection using the simple server API. From
> > time to time, I need to clear loaded objects  in the session.
>
> > Thanks in advance for any assistance!
>
> > Shing
>
> > --
> > To post to this group, send email to sage-support@googlegroups.com
> > To unsubscribe from this group, send email to 
> > sage-support+unsubscr...@googlegroups.com
> > For more options, visit this group 
> > athttp://groups.google.com/group/sage-support
> > URL:http://www.sagemath.org
>
> --
> William Stein
> Associate Professor of Mathematics
> University of Washingtonhttp://wstein.org
-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] How to list (and remove) loaded objects in a sage session

2010-01-16 Thread Shing Hing Man
Hi,
   In a Sage session (within notebook or command console) ,  how to
list all the loaded objects and how to remove them from the session ?
I would like to reuse a connection using the simple server API. From
time to time, I need to clear loaded objects  in the session.

Thanks in advance for any assistance!

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


[sage-support] Re: How to convert an element in a polynomial ring to sage expression

2010-01-10 Thread Shing Hing Man
Thanks for the solution!
Shing

On Jan 9, 9:24 pm, William Stein  wrote:
> On Sat, Jan 9, 2010 at 1:11 PM, Shing Hing Man  wrote:
>
> > Hi,
> >     First, I define the ring of polynomial over the rationals, S.
> > Then define a polynomial g in S.
> > Is there a simple way to convert g  to    type
> > 'sage.symbolic.expression.Expression' ?
>
> >   sage: S. = PolynomialRing(QQ);S
> > Univariate Polynomial Ring in x over Rational Field
> > sage: g =  x^3 - 11*x^2 + 40*x -48;type(g)
> >  > 'sage.rings.polynomial.polynomial_element_generic.Polynomial_rational_dense'>-
>
> > Thanks in advance for any assistance!
> > Shing
>
> Yes, type SR(g):
>
> sage: sage: S. = PolynomialRing(QQ);S
> Univariate Polynomial Ring in x over Rational Field
> sage: g =  x^3 - 11*x^2 + 40*x -48;type(g)
>  'sage.rings.polynomial.polynomial_element_generic.Polynomial_rational_dense'>
> sage: SR
> Symbolic Ring
> sage: SR(g)
> ((x - 11)*x + 40)*x - 48
> sage: type(SR(g))
> 
>
> In general, in Sage to convert an object obj to some structure X, do "X(obj)".
>
> William
-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] How to convert an element in a polynomial ring to sage expression

2010-01-09 Thread Shing Hing Man
Hi,
 First, I define the ring of polynomial over the rationals, S.
Then define a polynomial g in S.
Is there a simple way to convert g  totype
'sage.symbolic.expression.Expression' ?

   sage: S. = PolynomialRing(QQ);S
Univariate Polynomial Ring in x over Rational Field
sage: g =  x^3 - 11*x^2 + 40*x -48;type(g)
-

Thanks in advance for any assistance!
Shing


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


[sage-support] Re: How to produce png image with transparent background with latex.eval

2010-01-03 Thread Shing Hing Man
Hi Jason,
  Thanks for the reply! But I would like the png file of a latex
expression, not a plot,  to have transparent background.

Shing

On Jan 2, 9:46 pm, Jason Grout  wrote:
> Shing Hing Man wrote:
> > I am using Sage 4.0.2.   The myImage.png produced by the following
> > command has a white background.
>
> > latex.eval("$\\frac{1}{2}$", {}, filename="/home/foo/myImage.png")
>
> > Is it possible to have transparent background ?
>
> > Thanks in advance for any assistance!
>
> > Shing
>
> Try something like this:
>
> plot(x^2,(x,0,1),transparent=True)
>
> It's an option to "show".  Options to show are automatically passed from
> plot commands to the function that displays it.  
> Seehttp://sagemath.org/doc/reference/sage/plot/plot.html?highlight=show#...
>
> Thanks,
>
> Jason

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


[sage-support] How to produce png image with transparent background with latex.eval

2010-01-02 Thread Shing Hing Man
I am using Sage 4.0.2.   The myImage.png produced by the following
command has a white background.

latex.eval("$\\frac{1}{2}$", {}, filename="/home/foo/myImage.png")

Is it possible to have transparent background ?

Thanks in advance for any assistance!

Shing

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


[sage-support] Re: Using the simple server API

2009-12-20 Thread Shing Hing Man
I have just upgraded from Sage 4.0.2 to Sage 4.2.1 and have
encountered  the same error mentioned by Stefan.
Is there a way to  fix the problem ?

Thanks in advance of any assistance!
Shing

On Dec 18, 7:59 pm, William Stein  wrote:
> On Fri, Dec 18, 2009 at 11:58 AM, Stefan  wrote:
> > Hi Robert,
>
> > Thanks for getting back to me.  The error I'm getting is:
>
> > File "/sage/sage/local/lib/python2.6/site-packages/sagenb/simple/
> > twist.py", line 207, in render
> > U = notebook_twist.notebook.user(username)
> > exceptions.AttributeError: 'NoneType' object has no attribute 'user'
>
> This is probably somehow caused by the transition to the new notebook,
> which is separated completely out from Sage, and which has undergone
> many changes.
>
> William
>
>
>
> > On Dec 18, 2:17 pm, Robert Bradshaw 
> > wrote:
> >> On Dec 18, 2009, at 8:53 AM, Stefan wrote:
>
> >> > Hi all,
>
> >> > I surfed through the discussion board and through the documentation on
> >> > trying to figure out how to get the simple server API up and running.
> >> > I made sure to run 'import sage.server.simple.twist' in my sage
> >> > prompt.  Is there a way to easily test Sage to see if the API is
> >> > functioning such as entering the address into the address bar:
>
> >> Yes, you should be able to do that. (See the example at the top of the
> >> file.)
>
> >> >http://localhost:8000/simple/login?username=myusername&password=mypas...
>
> >> > I get the dreaded "Internal Server Error" message.
>
> >> What does the terminal window where you started the notebook server say?
>
> >> - Robert
>
> > --
> > To post to this group, send email to sage-support@googlegroups.com
> > To unsubscribe from this group, send email to 
> > sage-support+unsubscr...@googlegroups.com
> > For more options, visit this group 
> > athttp://groups.google.com/group/sage-support
> > URL:http://www.sagemath.org
>
> --
> William Stein
> Associate Professor of Mathematics
> University of Washingtonhttp://wstein.org

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


[sage-support] Re: question about using Sage with Pydev

2009-09-24 Thread Shing Hing Man

I have the same problem as Greg.
Namely,  when I  run the following in PyDev

from sage.rings.arith import factor

print factor(266)

I get  the following error.

ImportError: No module named rings.arith

I am using Eclipse 3.5 and Pydev 1.5.0, Sage 4.0.2.
In my Pydev Python project, I have
1) set python intereter to (SAGE_ROOT)/localbin/python
2) Set Properties -> External libraries to
(SAGE_ROOT)/devel/sage-main


It would be appreciated if someone could show me how to resolve the
above error.

Thanks!
Shing


On Sep 15, 2:35 pm, x x  wrote:
> > Does that provide all of the Sage functionality ?
>
> I am not an experienced user of sage but i can tell the following:
>
> The followingimportstatement is needed: from sage.allimport*,
> and one has to be careful with some notation: x^2 --> x **2 and
> 1/2 --> RealNumber(1)/2 (or something similar).
>
> The show() commands automatically starts the  external image viewer programs.
>
> The automatic completion functionality also works.
>
> Kind regards,
>
> Niels
>
> (P.S. Currently Pydev extensions is also opensource and it works quite
> well, except refactoring gives sometimes problems.)
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Polynomial over a finite field using integer coefficients

2009-09-22 Thread Shing Hing Man

Thanks for the  reply!
Just one more question.
In general, if k is a finite field, what is k(i), where i is an
integer, suppose to be ?

The following example suggests k(i) will be the elements in the base
field as i varies.

sage: k. = GF(9)
sage: for i in [0..8]:  print k(i)
:
0
1
2
0
1
2
0
1
2


Shing

On Sep 22, 4:13 pm, Simon King  wrote:
> Hi Shing!
>
> Two possibilities:
>
>   sage: k. = GF(9)
>   sage: t=a^2+1
>
> Now, you can learn about all possible methods for elements of k by
> doing
>   sage: t.
> (you type t, dot, and hit the tab key).
> This will show you a list of possible methods.
>
> One of the methods is called int_repr:
>   sage: t.int_repr()
>   '5'
> So, it gives you a string, that you can easily transform into an
> integer: ZZ(t.int_repr()) for a Sage integer, int(t.int_repr()) for a
> Python integer.
>
> There is also log_to_int:
>   sage: t.log_to_int()
>   5
> Probably this last method is easier.
>
> The inverse way is
>   sage: k.fetch_int(5)
>   a + 2
> which is indeed the same as t:
>   sage: t
>   a + 2
>
> Cheers,
> Simon
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Polynomial over a finite field using integer coefficients

2009-09-22 Thread Shing Hing Man

Conside the finite field F=GF(9),say,  and
the  polynomial ring F[x].

The elements of F are listed below.

sage: k. = GF(9)

sage: for x in k:print x
0
2*a
a + 1
a + 2
2
a
2*a + 2
2*a + 1
1
sage: R = PolynomialRing(k,'x')
sage:
sage: x = R.0


We can  think of elements of k as integers from 0 to 8 :
0 <->0
2*a <->6
a + 1  <-> 4
a + 2  <-> 5
etc...


Now, (a+1) + x^2 is an element of F[x].
In Sage, is it possible to write the coeffcients as integers 0 to 8?
ie. Instead of (a +1) + x^2, can I write
4 + x^2 ?

I have tried it  and it does not work.

sage: 4 + x^2
x^2 + 1
sage:


Thanks in advance for any assistance !
Shing


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



[sage-support] Re: Eigenvalues and vectors in radical format

2009-09-21 Thread Shing Hing Man

Thanks for all the reply !

The reason that I would prefer the answer to be in something like
  sqrt(47)/3
is that the answer would be converted to Latex.  To me, it just look
nicer
in Latex to have \sqrt(47)/3 than a number with many digits.

Thanks!

Shing

On Sep 21, 6:01 pm, Jason Grout  wrote:
> Shing Hing Man wrote:
> > In Sage, the eigenvalues and vectors (over a  Rational matrix) returns
> > the answer in numerical format.
>
> It's not really numerical format.  It's the same as the Root objects in
> Mathematica or Maple.  Recent versions of Mathematica even print out the
> numeric approximations of the roots; Sage just prints that out the
> numerical approximation by default.
>
> For example:
>
> sage: sageMatrix = matrix(QQ,[[1,4],[4,2]])
> sage: sageMatrix.eigenvalues()
> [-2.531128874149275?, 5.531128874149275?]
> sage: eig=sageMatrix.eigenvalues()
> sage: eig[0]
> -2.531128874149275?
> sage: a=eig[0]
>
> Now, "a" is *not* a numeric value, though it is approximately equal to
> the number displayed above.  It is an exact root of a polynomial:
>
> sage: a.minpoly()
> x^2 - 3*x - 14
> sage: a^2-3*a-14
> 0
>
> You see the advantages to displaying things this way once you get
> matrices that have eigenvalues which are roots of 3rd degree or higher
> polynomials.  Instead of the huge long "Root[]" displays that
> Mathematica does, Sage just displays the numeric approximation for the
> exact eigenvalue.
>
> There has been discussion of displaying a square root if the exact
> eigenvalue is actually a square root (or, more generally, in technical
> terms, if an element of QQbar has minpoly() or some easily-calculatable
> approximation of minpoly() showing that we have a root of a quadratic,
> then display the square root).  However, if you do that, then you still
> have the problem of not knowing approximately what the value is.  Which
> is easier to see and make sense of:
>
> sqrt(47)/3
>
> or
>
> 2.285218200133682?
>
> (we get that from:
>
> sage: QQbar(sqrt(47)/3)
> 2.285218200133682?
>
> )
>
> Note that the two are *exactly* equal---there are no numeric issues
> involved.
>
> Would you still like to see sqrt(47)/3 as an eigenvalue, rather than the
> exactly same thing, but printed out as a numerical approximation?
>
> Thanks,
>
> Jason
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Eigenvalues and vectors in radical format

2009-09-21 Thread Shing Hing Man

In Sage, the eigenvalues and vectors (over a  Rational matrix) returns
the answer in numerical format.
Is it possible to returns the answer in radical format ?
I am aware that I can use the Maxima eigenvectors function in Sage to
get the answer in radical format. It is better if I do need to depend
on Maxima. (Please see example below.)


 sage: sageMatrix = matrix(QQ,[[1,4],[4,2]])
sage: sageMatrix
[1 4]
[4 2]
sage: sageMatrix.eigenvalues()
[-2.531128874149275?, 5.531128874149275?]
sage: sageMatrix.eigenvectors_right()
[(-2.531128874149275?, [(1, -0.8827822185373187?)], 1),
(5.531128874149275?, [(1, 1.132782218537319?)], 1)]
sage: maximaMatrix=maxima('matrix[[1,4],[2,4]]')
sage: maximaMatrix
matrix[[1,4],[2,4]]
sage: maximaMatrix.eigenvectors()
[[[-(sqrt(41)-5)/2,(sqrt(41)+5)/2],[1,1]],[1,-(sqrt(41)-3)/8],[1,(sqrt
(41)+3)/8]]

Thanks in advance for any assistance!

Shing
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: How to test if an algebraic number is real

2009-01-05 Thread Shing Hing Man

Thanks for the reply!
I will upgrade.
Shing

On Jan 4, 8:46 pm, "John Cremona"  wrote:
> I tried this in 3.2.3.final and it works fine:
>
> sage: a,b = matrix(QQ,[[0,1],[-4,0]]).eigenvalues(); a,b
> (2*I, -2*I)
> sage: a in RR
> False
> sage: b in RR
> False
>
> so perhaps you should upgrade?
>
> John Cremona
>
> 2009/1/4 Shing Hing Man :
>
>
>
> > Hi,
> >  I would like to test if  an eigenvalue of a matrix over the
> > rationals is a real number.
> > (or The roots of the characteristic polynomial  are all real.)
> > I am using
> >             x in RR
>
> > Somehow, when x=2i, 'x in RR' produced the following error.
>
> > Thanks in advance for any assistance!
> > Shing
>
> > PS : I am using Sage 3.2.1.
>
> > {{{id=74|
> > E =  matrix(QQ,[[0,1],[-4,0]]);E
> > ///
>
> > [ 0  1]
> > [-4  0]
> > }}}
>
> > {{{id=72|
> > E.eigenvalues()
> > ///
>
> > [2*I, -2*I]
> > }}}
>
> > {{{id=76|
> > type(E.eigenvalues()[0])
> > ///
>
> > 
> > }}}
>
> > {{{id=73|
> > E.eigenvalues()[0]  in RR
> > ///
>
> > Traceback (most recent call last):
> >  File "", line 1, in 
> >  File "/home/matmsh/.sage/sage_notebook/worksheets/admin/128/code/
> > 211.py", line 7, in 
> >    exec compile(ur'E.eigenvalues()[_sage_const_0 ]  in RR' + '\n',
> > '', 'single')
> >  File "/usr/local/lib/sage-3.2.1/local/lib/python2.5/site-packages/
> > SQLAlchemy-0.4.6-py2.5.egg/", line 1, in 
>
> >  File "parent.pyx", line 324, in
> > sage.structure.parent.Parent.__contains__ (sage/structure/parent.c:
> > 3925)
> >  File "parent.pyx", line 284, in
> > sage.structure.parent.Parent.__call__ (sage/structure/parent.c:3709)
> >  File "coerce_maps.pyx", line 146, in
> > sage.structure.coerce_maps.NamedConvertMap._call_ (sage/structure/
> > coerce_maps.c:3589)
> >  File "/usr/local/lib/sage-3.2.1/local/lib/python2.5/site-packages/
> > sage/rings/qqbar.py", line 2725, in _mpfr_
> >    return AA(self)._mpfr_(field)
> >  File "/usr/local/lib/sage-3.2.1/local/lib/python2.5/site-packages/
> > sage/rings/qqbar.py", line 499, in __call__
> >    raise ValueError, "Cannot coerce algebraic number with non-zero
> > imaginary part to algebraic real"
> > ValueError: Cannot coerce algebraic number with non-zero imaginary
> > part to algebraic real
> > }}}
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] How to test if an algebraic number is real

2009-01-04 Thread Shing Hing Man

Hi,
  I would like to test if  an eigenvalue of a matrix over the
rationals is a real number.
(or The roots of the characteristic polynomial  are all real.)
I am using
 x in RR

Somehow, when x=2i, 'x in RR' produced the following error.

Thanks in advance for any assistance!
Shing

PS : I am using Sage 3.2.1.


{{{id=74|
E =  matrix(QQ,[[0,1],[-4,0]]);E
///

[ 0  1]
[-4  0]
}}}

{{{id=72|
E.eigenvalues()
///

[2*I, -2*I]
}}}

{{{id=76|
type(E.eigenvalues()[0])
///


}}}

{{{id=73|
E.eigenvalues()[0]  in RR
///

Traceback (most recent call last):
  File "", line 1, in 
  File "/home/matmsh/.sage/sage_notebook/worksheets/admin/128/code/
211.py", line 7, in 
exec compile(ur'E.eigenvalues()[_sage_const_0 ]  in RR' + '\n',
'', 'single')
  File "/usr/local/lib/sage-3.2.1/local/lib/python2.5/site-packages/
SQLAlchemy-0.4.6-py2.5.egg/", line 1, in 

  File "parent.pyx", line 324, in
sage.structure.parent.Parent.__contains__ (sage/structure/parent.c:
3925)
  File "parent.pyx", line 284, in
sage.structure.parent.Parent.__call__ (sage/structure/parent.c:3709)
  File "coerce_maps.pyx", line 146, in
sage.structure.coerce_maps.NamedConvertMap._call_ (sage/structure/
coerce_maps.c:3589)
  File "/usr/local/lib/sage-3.2.1/local/lib/python2.5/site-packages/
sage/rings/qqbar.py", line 2725, in _mpfr_
return AA(self)._mpfr_(field)
  File "/usr/local/lib/sage-3.2.1/local/lib/python2.5/site-packages/
sage/rings/qqbar.py", line 499, in __call__
raise ValueError, "Cannot coerce algebraic number with non-zero
imaginary part to algebraic real"
ValueError: Cannot coerce algebraic number with non-zero imaginary
part to algebraic real
}}}
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Latex expression to png

2009-01-04 Thread Shing Hing Man

I am using Sage 3.2,1 and  it does not work with a complicated
filename.
I will try it in Sage 3.2.3.

Geogr: Thanks for the reply! I'll try latexmath2y after I find out how
to import a python class into Sage.

Thanks!
Shing

On Jan 3, 11:25 pm, "William Stein"  wrote:
> On Sat, Jan 3, 2009 at 2:08 PM, Shing Hing Man  wrote:
>
>
>
> > Is there a command in SAGE that converts a latex expression to png (or
> > gif) directly.
>
> > The following post in the archive has a workaround.
>
> > ttp://groups.google.com/group/sage-support/browse_thread/thread/570022e72a22d3bd/517d51a58abc67f8?lnk=gst&q=Latex+to+png#517d51a58abc67f8
>
> > I wonder if there is a quicker way of doing it.
>
> > Thanks in advance for any assistance!
>
> Do
>
> sage: L = sage.misc.latex.Latex()
> sage: L.eval('$x^2$',filename='a.png')
>
> NOTE: There was a bug Sage-3.2.2, I think, which I fixed in the
> soon-to-be released sage-3.2.3, where the above wouldn't work if you
> give a more complicated path to the file, e.g., :
>
> sage: L.eval('$x^2$', filename='/tmp/a.png')
>
> William
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Latex expression to png

2009-01-03 Thread Shing Hing Man

Is there a command in SAGE that converts a latex expression to png (or
gif) directly.

The following post in the archive has a workaround.

ttp://groups.google.com/group/sage-support/browse_thread/thread/570022e72a22d3bd/517d51a58abc67f8?lnk=gst&q=Latex+to+png#517d51a58abc67f8


I wonder if there is a quicker way of doing it.

Thanks in advance for any assistance!

Shing
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Latex of a product of polynomials with simplification

2008-08-23 Thread Shing Hing Man

Thanks for all the replies!

Shing

On Aug 23, 9:28 pm, "William Stein" <[EMAIL PROTECTED]> wrote:
> On Sat, Aug 23, 2008 at 12:50 PM, daveloeffler <[EMAIL PROTECTED]> wrote:
>
> >> How to get the Latex expression of fg without expanding the product ?
> >> ie (1 + t + 2 t^{2}) (1+t) .
>
> > Can't one use the Factorization class to do this? I tried
> >> fg = Factorization([(f,1), (g,1)])
>
> > and then you can print fg to latex. (I guess the point is that the
> > Factorization class doesn't enforce that the factors are irreducible.)
>
> Cool, that's a great idea!
>
> William
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Latex of a product of polynomials with simplification

2008-08-23 Thread Shing Hing Man

Hi,

 Consider polynomials
f = 1 +t + 2*t^2
 g=1+t

over R. = PolynomialRing(GF(7));

How to get the Latex expression of fg without expanding the product ?
ie (1 + t + 2 t^{2}) (1+t) .

latex( fg) returns

2 t^{3} + 3 t^{2} + 2 t + 1

Thanks in advance for any  assistance!
I am using Sage 3.0,6.

Shing



--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Why standalone Python/Sage scripts take longer to run ?

2008-07-21 Thread Shing Hing Man

Thanks for all the reply!
Shing

On Jul 21, 5:26 pm, Robert Bradshaw <[EMAIL PROTECTED]>
wrote:
> On Jul 20, 2008, at 1:24 PM, Shing Hing Man wrote:
>
>
>
>
>
> > If I submit a command that takes a long time to run,
>
> > eg
> > (1)  http://localhost:8000/simple/compute?session=(session)
> > &code=factor(2^1000
> > -1)
>
> > then the immediately returned JSON will have status equals computing.
>
> > I have modified my Java program, so that after (1) is submitted,
>
> > I keep querying SAGE with
> >    http://localhost:8000/simple/status?session=(session)&cell=
> > (cellId)
>
> > until the returned status is done.
>
> Yes, this is by design.
>
> > Is there a better way to wait for (or be notified of) the completion
> > of a command ?
>
> You can pass a timeout parameter, which will control how long it  
> waits for completion before returning a "computing" status. IIRC (but  
> check the code) -1 means wait until it's done.
>
> - Robert
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Why standalone Python/Sage scripts take longer to run ?

2008-07-20 Thread Shing Hing Man

If I submit a command that takes a long time to run,

eg
(1)   http://localhost:8000/simple/compute?session=(session)&code=factor(2^1000
-1)

then the immediately returned JSON will have status equals computing.

I have modified my Java program, so that after (1) is submitted,

I keep querying SAGE with
http://localhost:8000/simple/status?session=(session)&cell=(cellId)

until the returned status is done.

Is there a better way to wait for (or be notified of) the completion
of a command ?

Shing

On Jul 20, 12:17 pm, Shing <[EMAIL PROTECTED]> wrote:
> Thanks for the sample code! I have managed to convert it to  Java and
> successfully
> execute  factor(2006) in sage from Java.
>
> Shing
>
> public class SageSession {
>
>         public String getSession(String hostname, String port, String
> password) {
>
>                 String session = null;
>                 String httpStr = "http://"; + hostname + ":" + port
>                                 + "/simple/login?username=admin&password=" + 
> password;
>                 try {
>
>                         URL url = new URL(httpStr);
>                         HttpURLConnection connection = (HttpURLConnection) url
>                                         .openConnection();
>                         InputStream is = connection.getInputStream();
>                         BufferedReader br = new BufferedReader(new 
> InputStreamReader(is));
>                         String line;
>                         while ((line = br.readLine()) != null) {
>                                 //System.out.println("OUT> " + line);
>                                 if (line.indexOf("session") > 0) {
>                                         StringTokenizer tokenizer = new 
> StringTokenizer(line,
>                                                         "\": ");
>                                         tokenizer.nextElement();
>                                         session = (String) 
> tokenizer.nextElement();
>                                         break;
>                                 }
>                         }
>                         br.close();
>                         is.close();
>                         connection.disconnect();
>                 }
>
>                 catch (MalformedURLException e) {
>                         e.printStackTrace();
>                 } catch (IOException e) {
>                         e.printStackTrace();
>                 }
>
>                 return session;
>         }
>
>         /**
>          * Execute expression in sage and return the result as a String.
>          */
>         public String sage(String hostname, String port, String session,
> String expression) {
>
>                 StringBuffer result = new StringBuffer();
>                 try {
>                         String httpStr = "http://"; + hostname + ":" + port + 
> "/simple/
> compute?session="
>             + session + "&code=" +
> URLEncoder.encode(expression,"UTF-8");
>                         URL url = new URL(httpStr);
>                         HttpURLConnection connection = (HttpURLConnection) url
>                                         .openConnection();
>                         InputStream is = connection.getInputStream();
>                         BufferedReader br = new BufferedReader(new 
> InputStreamReader(is));
>                         String line;
>                         while ((line = br.readLine()) != null) {
>                                 //System.out.println("OUT> " + line);
>                             result.append(line +"\n");
>
>                         }
>                         br.close();
>                         is.close();
>                         connection.disconnect();
>                 }
>
>                 catch (MalformedURLException e) {
>                          e.printStackTrace( );
>                 } catch (IOException e) {
>                         e.printStackTrace();
>                 }
>
>                 return result.toString();
>         }
>
>         public static void main(String[] str) throws Exception {
>                 String host = "localhost";
>                 String port = "8000";
>                 String password = "xxx";
>
>                 SageSession connection = new SageSession();
>                 String session = connection.getSession(host, port, password);
>                 System.out.println("session =" + session);
>                 String expression ="factor(2^12 -1)";
>                 String result = connection.sage(host, port, session, 
> expression);
>                 System.out.println("expression =" + result );
>
>         }
>
> }
>
> On Jul 19, 8:34 pm, "Mike Hansen" <[EMAIL PROTECTED]> wrote:
>
> > Hi Shing,
>
> > You can actually make HTTP calls to the Sage notebook using Robert
> > Bradshaw's simple API.  For example, the following is a (condensed)
> > Python script which authenticates with a running Sage notebook.
>
> > import urllib, re
> > def get_url(url)

[sage-support] Re: Running a sage script from command line caused a run away pocess

2008-05-31 Thread Shing Hing Man

Every time I run 'sage derivative.sage' at a command prompt, a new run away 
process is created, and the previous created run away processes are still alive.
Since this might be fixed in the recent versions of SAGE, the best course of 
action is   to upgrade my linux distribution and try  SAGE 3.0.2.
Thanks!

Shing







Home page : http://www.lombok.demon.co.uk/



--- On Sat, 31/5/08, William Stein <[EMAIL PROTECTED]> wrote:

> From: William Stein <[EMAIL PROTECTED]>
> Subject: [sage-support] Re: Running a sage script from command line caused a 
> run away pocess
> To: sage-support@googlegroups.com
> Date: Saturday, 31 May, 2008, 10:03 PM
> On Sat, May 31, 2008 at 6:56 AM, Shing Hing Man
> <[EMAIL PROTECTED]> wrote:
> >
> > Thanks for the suggestion!
> > Last week, I downloaded 3.0.2 and the build failed
> probably because
> > the gcc on my PC is version 3.3.5.
> > I need to upgrade my Linux distribution before I can
> retry installing
> > sage 3.0.2.
> 
> 1. Sage cannot be built with gcc <= 3.4.x.
> 
> 2. There is a SUSE 64-bit binary here, but it's
> unlikely to run on such
> an old linux install:
>http://sagemath.org/SAGEbin/linux/64bit/
> 
> 3. If you restart sage after running derivate.sage, then
> check top,
> does the clisp.run process continue running or not?
> It's probably a bad idea for us to try to debug this
> though, since
> I think I already did long ago and the fix is in newer
> versions
> of Sage.
> 
> William
> 
> 

  __
Sent from Yahoo! Mail.
A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Running a sage script from command line caused a run away pocess

2008-05-31 Thread Shing Hing Man

Thanks for the suggestion! 
Last week, I downloaded 3.0.2 and the build failed probably because 
the gcc on my PC is version 3.3.5. 
I need to upgrade my Linux distribution before I can retry installing 
sage 3.0.2.

Shing





Home page : http://www.lombok.demon.co.uk/



--- On Sat, 31/5/08, William Stein <[EMAIL PROTECTED]> wrote:

> From: William Stein <[EMAIL PROTECTED]>
> Subject: [sage-support] Re: Running a sage script from command line caused a 
> run away pocess
> To: sage-support@googlegroups.com
> Date: Saturday, 31 May, 2008, 9:41 PM
> On Sat, May 31, 2008 at 6:20 AM, Shing
> <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > I am running SAGE 2.5.3 on  Suse 9.3 .
> 
> You may want to upgrade, since the current version of Sage
> is sage-3.0.2, which
> has significantly improved since Sage 2.5.3.
> 
> William
> 
> 

  __
Sent from Yahoo! Mail.
A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---