Re: [sage-devel] Re: Sage iPhone app

2012-01-18 Thread Ivan Andrus
On Jan 18, 2012, at 12:56 AM, Jason Grout wrote:
> On 1/17/12 5:33 PM, kcrisman wrote:
>> 
> Of course any bug reports or suggestions are very welcome.  In particular 
> checking my initial examples would be helpful.  Some screen shots are 
> available athttp://boxen.math.washington.edu/home/iandrus/
>>> 
 Nice!
>>> 
 As a question from someone who does not own an iDevice... how is this
 working?  Single-cell server, or some other mechanism?  Do objects
 persist, or is it more of a calculator option?  (I assume you aren't
 compiling all of Sage on an iPhone...)
>>> 
>>> It uses the Single-cell server to do the calculation, but persists the 
>>> objects.  Compiling all of Sage would be lots of work and wouldn't make it 
>>> past Apple's review process.
>> 
>> Hmm.  Jason said that the point of the single-cell was that objects
>> don't persist.  How do you do that?  (On the phone, I assume?)
> 
> Well, static output persists (in that you can ask for the session output for 
> any session and it is still in the database).  At least, right now we don't 
> purge the database periodically.  But you're right that the session doesn't 
> stay active.

I misspoke.  We don't persists objects per se, but rather save the input and 
output for future perusal.

-Ivan

-- 
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


Re: [sage-devel] the ARM port - numerical noise

2012-01-18 Thread Dima Pasechnik
OK, I've opened #12320 : make cephes installable on ARMs.

-- 
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


Re: [sage-devel] the ARM port - numerical noise

2012-01-18 Thread Dima Pasechnik


On Monday, 16 January 2012 22:48:01 UTC+8, Snark wrote:
>
> Le 16/01/2012 15:42, Burcin Erocal a �crit :
> > On Mon, 16 Jan 2012 04:21:37 -0800 (PST)
> > Dima Pasechnik  wrote:
> >
> >> Once again, let me bring up the numerical noise issue on ARM.
> >> The problem is that while we pretty much narrowed it down to a
> >> particular function computing the log of the gamma-function,
> >> lgammal, in elibc, an implementation of libc used on Ubuntu 11.10 (on
> >> ARM, at least), the chances that the upstream fixes it seem to be
> >> rarher slim. Fixing it myself does not look trivial � this C code is
> >> not at all pretty, uses a lot of hardwired largish
> >> constants, etc etc (and we cannot just patch a system library easily
> >> anyway, so it needs to get into the upstream, etc etc...)
> >>
> >> I can produce doctest patches that will to the appropriate rounding,
> >> but this potentially would make the corresponding doctests less
> >> reliable (we talking about things like 120.0 vs 199.9997 for
> >> gamma(float(6)), something like this).
> >>
> >> As far as I know, doctests cannot be OS-dependent.
> >> Any way out of this Catch-22?
> >
> > I guess this is the same problem as #9162.
> >
> > We should call a more reliable lgamma() function on these platforms.
> > IIRC, the cephes package was included in Sage for this purpose. We
> > could call the lgam() from cephes in sage/symbolic/pynac_cc.h to fix
> > this.
>
> Is the answer really bad or is it just that it doesn't print the same on 
> all platforms?
>
there is a loss of precision on ARM and Cygwin, compared to the rest of 
platforms.
(and the precision is worse than advertised by the lgammal implementation, 
IMHO)
So weakening the test does not seem to the the right thing to do.
 
Dima

 

> I mean if that float type has just that many significant digits, the 
> problem may not be with the computation -- but more with the test which 
> insists on a pure equality where that doesn't make sense.
>
> Snark on #sagemath
>
>

-- 
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


Re: [sage-devel] Re: add a graph for US states?

2012-01-18 Thread Nicolas M. Thiery
On Tue, Jan 17, 2012 at 01:46:27AM -0800, Nathann Cohen wrote:
>graphs.maps.WorldMap(world = "US")
>Ahem. No, rather 
>graphs.maps.WorldMap()
>graphs.maps.USMap()

Or just, from the user perspective:

graphs.WorldMap("World countries")
graphs.WorldMap("USA states")
graphs.WorldMap("Continental USA states")
graphs.WorldMap("Europe countries")
graphs.WorldMap("French departments")
graphs.WorldMap("French regions")
graphs.WorldMap("German länders")
graphs.WorldMap("Paris Arrondissements")

If we are ready to afford a change of name, than WorldMap could
possibly become Atlas.

Cheers,
Nicolas
--
Nicolas M. Thiéry "Isil" 
http://Nicolas.Thiery.name/

-- 
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


Re: [sage-combinat-devel] Re: [sage-devel] Re: add a graph for US states?

2012-01-18 Thread Nathann Cohen
> Or just, from the user perspective:

Hmmm By the way we really should have some generic search engine
for such things O_o

Nathann

-- 
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


Re: [sage-devel] Re: add a graph for US states?

2012-01-18 Thread Jeroen Demeyer
On 2012-01-18 11:22, Nicolas M. Thiery wrote:
> On Tue, Jan 17, 2012 at 01:46:27AM -0800, Nathann Cohen wrote:
>>graphs.maps.WorldMap(world = "US")
>>Ahem. No, rather 
>>graphs.maps.WorldMap()
>>graphs.maps.USMap()
> 
> Or just, from the user perspective:
> 
>   graphs.WorldMap("World countries")
>   graphs.WorldMap("USA states")
>   graphs.WorldMap("Continental USA states")
>   graphs.WorldMap("Europe countries")
>   graphs.WorldMap("French departments")
>   graphs.WorldMap("French regions")
>   graphs.WorldMap("German länders")
>   graphs.WorldMap("Paris Arrondissements")
No strings please.  Use something which is TAB-completion-friendly.

-- 
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


Re: [sage-devel] Re: add a graph for US states?

2012-01-18 Thread Julien Puydt

Le 18/01/2012 11:36, Jeroen Demeyer a écrit :

On 2012-01-18 11:22, Nicolas M. Thiery wrote:

On Tue, Jan 17, 2012 at 01:46:27AM -0800, Nathann Cohen wrote:

graphs.maps.WorldMap(world = "US")
Ahem. No, rather
graphs.maps.WorldMap()
graphs.maps.USMap()


Or just, from the user perspective:

graphs.WorldMap("World countries")
graphs.WorldMap("USA states")
graphs.WorldMap("Continental USA states")
graphs.WorldMap("Europe countries")
graphs.WorldMap("French departments")
graphs.WorldMap("French regions")
graphs.WorldMap("German länders")
graphs.WorldMap("Paris Arrondissements")

No strings please.  Use something which is TAB-completion-friendly.



+100 !

Snark on #sagemath

--
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


Re: [sage-devel] Re: add a graph for US states?

2012-01-18 Thread Nathann Cohen

>
> No strings please.  Use something which is TAB-completion-friendly.
>

HMmm... In this case it would make sense, but for #11880 the database is 
really huge O_o

I'd like to find a smooth trick for that one :-/

Nathann 

-- 
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


Re: [sage-devel] Re: add a graph for US states?

2012-01-18 Thread Julien Puydt

Le 18/01/2012 12:35, Nathann Cohen a écrit :

No strings please. Use something which is TAB-completion-friendly.


HMmm... In this case it would make sense, but for #11880 the database is
really huge O_o

I'd like to find a smooth trick for that one :-/


What about a tree instead of a whole list : a country would be found as 
Continent.Name ; like America.Mexico or Europa.Germany?


Snark on #sagemath

--
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 strong should weak references be?

2012-01-18 Thread Simon King
Hi Robert,

Hooray!

On 18 Jan., 00:20, Robert Bradshaw 
wrote:
> Both, but primarily the latter. It's a microbenchmark, but loop like
>
> a = Integer(10)
> b = QQ(20)
> s = RDF(30)
> for x in range(10**n):
>     s += a*b*x
>
> should give us an upper bound on how expensive any changes could be.

I did the following on my laptop:
  sage: def test(n):
  : a = Integer(10)
  : b = QQ(20)
  : s = RDF(30)
  : for x in xrange(10**n):
  : s += a*b*x

And then, sage-5.0.prealpha0+#11780 yields
  sage: %time test(6)
  CPU times: user 7.25 s, sys: 0.04 s, total: 7.29 s
  Wall time: 7.31 s
whereas adding #715 yields
  sage: %time test(6)
  CPU times: user 7.29 s, sys: 0.01 s, total: 7.31 s
  Wall time: 7.31 s

So, no difference whatsoever!

> (And yes, people write code like this...) Maybe a similar test with a
> tower of small finite fields.

I don't understand what that would look like.

I'll update the trac ticket with your example.

Thank you,
Simon

-- 
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


Re: [sage-devel] Changes in supported platforms

2012-01-18 Thread David Kirkby
On 17 January 2012 14:03, Jeroen Demeyer  wrote:

> I have edited the supported platforms page to reflect the following, see
> http://wiki.sagemath.org/SupportedPlatforms
>
>
> * Sage on Solaris SPARC moved to untested.  In practice it's actually
> broken on the Skynet machine "mark".  I have personally never managed to
> build Sage on mark (in the time of Mitesh Patel, it supposedly did work).
>

William will switch t2.math back on soon.

I don't know why it wont build on mark and mark2 - it used to build fine.

>
> * Sage on Solaris x86 moved to untested since we no longer have fulvia.
>

I can probably offer Solaris 11 on x86 soon. I have a Sun x4200 which does
a very good impression of the engines of an Airbus A380 at full power. I
don't want to leave that on full-time due to noise and power costs, but
since it should have the ability to remotely administer it, I can probably
give you access to remotely power up the machine.


> * Removed "A port can be expected in 2011" everywhere.
>

Yes, we have been optimistic about what's practical to port to.64-bit
Solaris is stuck due to a pynac bug, which I can't sort out.

I thought Cygwin was needed for Sage 5, but it looks like that has gone out
the window.

 Dave

-- 
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


Re: [sage-devel] AISC 2012

2012-01-18 Thread Jacques Carette

On 17/01/2012 10:05 PM, William Stein wrote:

   (2) The copyright rule for papers is: "Each contribution must be
accompanied by a Springer copyright form, a so-called 'Consent to
Publish' form. Modified forms are not acceptable. Authors will be
asked to transfer the copyright of the paper to the Springer.".


True, but for the last 2 years, CICM (the umbrella conference) has 
gotten an exception from Springer for this copyright rule.  For example, 
the full CICM proceedings (with Springer's permission) are on the arXiv.


Jacques

--
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: Sage iPhone app

2012-01-18 Thread kcrisman

> > Of course any bug reports or suggestions are very welcome.  In 
> > particular checking my initial examples would be helpful.  Some screen 
> > shots are available athttp://boxen.math.washington.edu/home/iandrus/
>
>  Nice!
>
>  As a question from someone who does not own an iDevice... how is this
>  working?  Single-cell server, or some other mechanism?  Do objects
>  persist, or is it more of a calculator option?  (I assume you aren't
>  compiling all of Sage on an iPhone...)
>
> >>> It uses the Single-cell server to do the calculation, but persists the 
> >>> objects.  Compiling all of Sage would be lots of work and wouldn't make 
> >>> it past Apple's review process.
>
> >> Hmm.  Jason said that the point of the single-cell was that objects
> >> don't persist.  How do you do that?  (On the phone, I assume?)
>
> > Well, static output persists (in that you can ask for the session output 
> > for any session and it is still in the database).  At least, right now we 
> > don't purge the database periodically.  But you're right that the session 
> > doesn't stay active.
>
> I misspoke.  We don't persists objects per se, but rather save the input and 
> output for future perusal.

So, to hijack this thread, let me get complete clarity about what the
single-cell server does.

1) You send it a computation.  To make it relevant to this discussion,
let's say

A = 2+2; A

2) It returns the output of the computation, in this case

4

3) Ivan's app has saved both of these, but the single-cell has
"forgotten" about the input.

4) Someone else uses the single-cell for something in the meanwhile,
computing perhaps

A = 3+3; A

which changes the value of A in the single-cell (or maybe there is no
"current" value for A, it needs to be redefined?).

5) The first person, using Ivan's app, now wants

A+1

and the single-cell does *not* look in some database for A, nor does
it use the changed value A=6 (if that even is what happens).  Instead,
the app magically knows to resubmit the whole

A = 2+2; A
A+1

returning

5

OR does it take the return value for A, which is 4, and then
substitute that in somehow?  (Which, given the "criticism" some have
lodged that you can't always take print values for Sage objects and
put them back in computations, could fail for things like matrices.)

Or is something else what happens?

+++

The reason I ask is that I had multiple requests about the single-cell
at the Joint Meetings table, and in particular this issue of
persistence came up for one gentleman (Jason, I think you spoke with
him too).   I strongly suspect that some of the other users of the
single-cell wouldn't mind this, either, though their uses are more
amenable to the once-off computations.  But if we had some really
clear documentation for how to "simulate" persistence in the way Ivan
is, that could be very useful - for instance, Volker's Android app
could probably use it (?).

Thanks,
- kcrisman

-- 
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


Re: [sage-devel] Re: Checking all but Python self-tests

2012-01-18 Thread Dan Drake
On Tue, 17 Jan 2012 at 10:19AM -0800, Volker Braun wrote:
> I consider it a bug that Python's testsuite fails on many systems even 
> though the resulting python install is perfectly usable for our purposes. 
> The Python spkg-check should be changed to not call the whole python 
> testsuite blindly if it is this finicky.

Fortunately, upon digging in the makefile, I see that it's easy to avoid
the few tests that we know won't work: in spkg-check, just change

make test

to

make EXTRATESTOPTS="-x test_tcl -x test_dbm -x test_gdbm -x test_bsddb" test

Now we just need to know which tests to exclude. On Linux, is it always
those four that fail? On OS X and Solaris, which tests always fail?

Dan

--
---  Dan Drake
-  http://mathsci.kaist.ac.kr/~drake
---


signature.asc
Description: Digital signature


Re: [sage-devel] Sage pay electric for build slaves

2012-01-18 Thread Serge A. Salamanka
In EGI grid ( egi.eu ) there are lots of x86_64 cores available under 
ScientifiLinux (RedHat) v.4 - v.6
Is it an option to utilize this infrastructure for build tasks?

#Serge

-- 
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: Checking all but Python self-tests

2012-01-18 Thread daveloeffler


On Jan 18, 2:17 pm, Dan Drake  wrote:
> On Tue, 17 Jan 2012 at 10:19AM -0800, Volker Braun wrote:
> > I consider it a bug that Python's testsuite fails on many systems even
> > though the resulting python install is perfectly usable for our purposes.
> > The Python spkg-check should be changed to not call the whole python
> > testsuite blindly if it is this finicky.
>
> Fortunately, upon digging in the makefile, I see that it's easy to avoid
> the few tests that we know won't work: in spkg-check, just change
>
> make test
>
> to
>
> make EXTRATESTOPTS="-x test_tcl -x test_dbm -x test_gdbm -x test_bsddb" test
>
> Now we just need to know which tests to exclude. On Linux, is it always
> those four that fail? On OS X and Solaris, which tests always fail?
>
> Dan

I've had consistent failures in "test_distutils" (in all versions of
Sage I've ever tried this with).

David

-- 
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


Re: [sage-devel] Re: Checking all but Python self-tests

2012-01-18 Thread Dan Drake
On Wed, 18 Jan 2012 at 11:17PM +0900, Dan Drake wrote:
> Fortunately, upon digging in the makefile, I see that it's easy to avoid
> the few tests that we know won't work: in spkg-check, just change
> 
> make test
> 
> to
> 
> make EXTRATESTOPTS="-x test_tcl -x test_dbm -x test_gdbm -x test_bsddb" test
> 
> Now we just need to know which tests to exclude. On Linux, is it always
> those four that fail? On OS X and Solaris, which tests always fail?

Adding such exclusions to the Python spkg is now
http://trac.sagemath.org/sage_trac/ticket/12321.

I see already that making the list of exclusions might be hard. On
Ubuntu 11.10, the test suite skips a bunch of tests, and says "someone
teach regrtest what tests are expected to be skipped on linux3". So we
need to treat 3.0 Linux kernels differently from 2.6 ones.

(The four tests quoted above are those that fail on
sagenb.kaist.ac.kr -- Ubuntu 10.04.)

Dan

--
---  Dan Drake
-  http://mathsci.kaist.ac.kr/~drake
---


signature.asc
Description: Digital signature


[sage-devel] Re: How strong should weak references be?

2012-01-18 Thread Jean-Pierre Flori
By the way, the "small" regression in my timings you posted above is
actually non-existent.
Those are the first one I ran (and posted on #715).
Afterward, I ran other "make ptestlong" and the the variance was big
enough for the above difference to be meaningless.
I mean I sometimes got more than the initial test with vanilla+715 in
a subsequent test with vanilla only and less than the initial test
with vanilla only with vanilla+715.

The test proposed by Robert and your implementation confirms that.

As I just posted on #715, I guess that we indeed delete some actions
that could get reused during the test suite, but we also access
dictionnaries quickly so there is no regression.

On 18 jan, 12:56, Simon King  wrote:
> Hi Robert,
>
> Hooray!
>
> On 18 Jan., 00:20, Robert Bradshaw 
> wrote:
>
> > Both, but primarily the latter. It's a microbenchmark, but loop like
>
> > a = Integer(10)
> > b = QQ(20)
> > s = RDF(30)
> > for x in range(10**n):
> >     s += a*b*x
>
> > should give us an upper bound on how expensive any changes could be.
>
> I did the following on my laptop:
>   sage: def test(n):
>   :     a = Integer(10)
>   :     b = QQ(20)
>   :     s = RDF(30)
>   :     for x in xrange(10**n):
>   :         s += a*b*x
>
> And then, sage-5.0.prealpha0+#11780 yields
>   sage: %time test(6)
>   CPU times: user 7.25 s, sys: 0.04 s, total: 7.29 s
>   Wall time: 7.31 s
> whereas adding #715 yields
>   sage: %time test(6)
>   CPU times: user 7.29 s, sys: 0.01 s, total: 7.31 s
>   Wall time: 7.31 s
>
> So, no difference whatsoever!
>
> > (And yes, people write code like this...) Maybe a similar test with a
> > tower of small finite fields.
>
> I don't understand what that would look like.
>
> I'll update the trac ticket with your example.
>
> Thank you,
> Simon

-- 
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


Re: [sage-devel] Re: Sage iPhone app

2012-01-18 Thread Ivan Andrus
On Jan 18, 2012, at 3:07 PM, kcrisman wrote:

>>> Of course any bug reports or suggestions are very welcome.  In 
>>> particular checking my initial examples would be helpful.  Some screen 
>>> shots are available athttp://boxen.math.washington.edu/home/iandrus/
>> 
>> Nice!
>> 
>> As a question from someone who does not own an iDevice... how is this
>> working?  Single-cell server, or some other mechanism?  Do objects
>> persist, or is it more of a calculator option?  (I assume you aren't
>> compiling all of Sage on an iPhone...)
>> 
> It uses the Single-cell server to do the calculation, but persists the 
> objects.  Compiling all of Sage would be lots of work and wouldn't make 
> it past Apple's review process.
>> 
 Hmm.  Jason said that the point of the single-cell was that objects
 don't persist.  How do you do that?  (On the phone, I assume?)
>> 
>>> Well, static output persists (in that you can ask for the session output 
>>> for any session and it is still in the database).  At least, right now we 
>>> don't purge the database periodically.  But you're right that the session 
>>> doesn't stay active.
>> 
>> I misspoke.  We don't persists objects per se, but rather save the input and 
>> output for future perusal.
> 
> So, to hijack this thread, let me get complete clarity about what the
> single-cell server does.
> 
> 1) You send it a computation.  To make it relevant to this discussion,
> let's say
> 
> A = 2+2; A
> 
> 2) It returns the output of the computation, in this case
> 
> 4
> 
> 3) Ivan's app has saved both of these, but the single-cell has
> "forgotten" about the input.
> 
> 4) Someone else uses the single-cell for something in the meanwhile,
> computing perhaps
> 
> A = 3+3; A
> 
> which changes the value of A in the single-cell (or maybe there is no
> "current" value for A, it needs to be redefined?).
> 
> 5) The first person, using Ivan's app, now wants
> 
> A+1
> 
> and the single-cell does *not* look in some database for A, nor does
> it use the changed value A=6 (if that even is what happens).  Instead,
> the app magically knows to resubmit the whole
> 
> A = 2+2; A
> A+1
> 
> returning
> 
> 5
> 
> OR does it take the return value for A, which is 4, and then
> substitute that in somehow?  (Which, given the "criticism" some have
> lodged that you can't always take print values for Sage objects and
> put them back in computations, could fail for things like matrices.)
> 
> Or is something else what happens?
> 
> +++
> 
> The reason I ask is that I had multiple requests about the single-cell
> at the Joint Meetings table, and in particular this issue of
> persistence came up for one gentleman (Jason, I think you spoke with
> him too).   I strongly suspect that some of the other users of the
> single-cell wouldn't mind this, either, though their uses are more
> amenable to the once-off computations.  But if we had some really
> clear documentation for how to "simulate" persistence in the way Ivan
> is, that could be very useful - for instance, Volker's Android app
> could probably use it (?).

The only thing the iPhone app (currently) does is save the text input and 
output (as well as images).  So if you want A+1, you copy the cell and add A+1 
to the end (or you edit the cell and add A+1 to then end) and then run the 
whole computation over.  

It's not ideal in many ways, but it makes it very easy for quick computations 
and if you want to do more complicated things you should probably be using a 
notebook IMHO.  I guess you could say that I save notebooks which have a limit 
of one cell.  It would certainly be possible to add multiple cells, but if I do 
that then I think we should just use the notebook (making whatever improvements 
are necessary for use on mobile devices).  

I realize it's easy to start with a simple calculation and then want more, so I 
want to add a "Convert to Notebook" button, but I want to get version 1 out 
there before I tackle that (although it's probably very easy).

But of course we'll do what is useful for people.

-Ivan

-- 
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] Timing doctests

2012-01-18 Thread Michael Orlitzky
Is there an existing way to doctest for performance regressions? I have
in mind:

  http://trac.sagemath.org/sage_trac/ticket/12292

If I create a big enough matrix, I can make charpoly() take, say, N
seconds. The second call should take around 0 seconds. I would like to
test that 0http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] AISC 2012

2012-01-18 Thread William Stein
On Jan 18, 2012 5:05 AM, "Jacques Carette" 
wrote:
>
> On 17/01/2012 10:05 PM, William Stein wrote:
>>
>>   (2) The copyright rule for papers is: "Each contribution must be
>> accompanied by a Springer copyright form, a so-called 'Consent to
>> Publish' form. Modified forms are not acceptable. Authors will be
>> asked to transfer the copyright of the paper to the Springer.".
>
>
> True, but for the last 2 years, CICM (the umbrella conference) has gotten
an exception from Springer for this copyright rule.  For example, the full
CICM proceedings (with Springer's permission) are on the arXiv.
>

That's fantastic!

> Jacques

-- 
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: Sage iPhone app

2012-01-18 Thread kcrisman

> > Or is something else what happens?
>
> > +++
>
> > The reason I ask is that I had multiple requests about the single-cell
> > at the Joint Meetings table, and in particular this issue of
> > persistence came up for one gentleman (Jason, I think you spoke with
> > him too).   I strongly suspect that some of the other users of the
> > single-cell wouldn't mind this, either, though their uses are more
> > amenable to the once-off computations.  But if we had some really
> > clear documentation for how to "simulate" persistence in the way Ivan
> > is, that could be very useful - for instance, Volker's Android app
> > could probably use it (?).
>
> The only thing the iPhone app (currently) does is save the text input and 
> output (as well as images).  So if you want A+1, you copy the cell and add 
> A+1 to the end (or you edit the cell and add A+1 to then end) and then run 
> the whole computation over.

Oh, this makes a lot more sense.

> It's not ideal in many ways, but it makes it very easy for quick computations 
> and if you want to do more complicated things you should probably be using a 
> notebook IMHO.  I guess you could say that I save notebooks which have a 
> limit of one cell.  It would certainly be possible to add multiple cells, but 
> if I do that then I think we should just use the notebook (making whatever 
> improvements are necessary for use on mobile devices).

Which is a different project, of course. Thanks for the clarification!

-- 
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


Re: [sage-devel] Re: WIKI connection problem

2012-01-18 Thread Florent Hivert
On Tue, Jan 17, 2012 at 08:37:00PM -0500, Michael Orlitzky wrote:
> On 01/17/2012 05:37 PM, Florent Hivert wrote:
> >
> >Unfortunately, that's not the problem. As I already said, I tried from 6
> >different computers using windows and linux OSes, Firefox, IE, Opera,
> >Konqueror as browser... All show the same behavior. So I really think this is
> >on the server side. That's why I'm asking for help.
> >
> 
> I'm sure you've thought of this, but were all of these computers
> using the same network connection? A common firewall, proxy, or
> other device could be messing with your traffic.

Yep ! I tried from home, student lab machine, work...

Florent

-- 
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] Graphics3dGroup addition side effect

2012-01-18 Thread Sébastien Labbé
Hi,

On sage-4.7.2, the third line of the following shows two cubes + one
sphere in jmol :

sage: a = cube((1,0,0), color='red') + cube((0,0,3), color='green')
sage: b = a + sphere((0,0,0), color='yellow')
sage: a

I was expecting only two cubes, but the addition changed a. Is this a
normal behavior (I guess no copy has to be made that way) or is this a
bug?

Sébastien, Montréal

-- 
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] Using "set -e" in scripts

2012-01-18 Thread Jeroen Demeyer
The command "set -e" in a bash script makes it such that any error quits
the shell.

So if you do:

set -e
cd mydir
rm -rf *

and "mydir" doesn't exist, the script will stop after "cd mydir".

I seem to remember an opinion within Sage that using "set -e" is bad but
never heard an argument for this.  I think "set -e" is a very useful
option.  I use it in most of my shell scripts, including the merger
scripts and the buildbot scripts.

-- 
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] Two articles of interest to Sage in latest Notices

2012-01-18 Thread kcrisman
The Feb. 2012 Notices of the American Mathematical Society have two
articles which, while not directly about Sage, are certainly of
interest.

Publishing Computational Mathematics, by Tim Daly (of Axiom, a
frequent contributor on sage-devel)
http://www.ams.org/notices/201202/rtx120200320p.pdf

MathJax: A Platform for Mathematics on the Web, by Davide Cervone (our
notebook uses jsmath, the precursor to MathJax)
http://www.ams.org/notices/201202/rtx120200312p.pdf

Enjoy!
- kcrisman

-- 
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: Using "set -e" in scripts

2012-01-18 Thread Volker Braun
The only reason against set -e is if you want to capture the error and then 
print a human-readable error message. But all command sequences that don't 
check the status should be in set -e brackets.

-- 
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: Graphics3dGroup addition side effect

2012-01-18 Thread kcrisman


On Jan 18, 2:42 pm, Sébastien Labbé  wrote:
> Hi,
>
> On sage-4.7.2, the third line of the following shows two cubes + one
> sphere in jmol :
>
> sage: a = cube((1,0,0), color='red') + cube((0,0,3), color='green')
> sage: b = a + sphere((0,0,0), color='yellow')
> sage: a
>
> I was expecting only two cubes, but the addition changed a. Is this a
> normal behavior (I guess no copy has to be made that way) or is this a
> bug?

Even in Sage 4.4.4 we get this.

sage: len(a.all)
3
sage: len(b.all)
3

I'm sorry I don't have time to look into this now :( as I am
interested in tracking it down.

-- 
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: Sage iPhone app

2012-01-18 Thread Jason Grout

On 1/18/12 8:07 AM, kcrisman wrote:



Of course any bug reports or suggestions are very welcome.  In particular 
checking my initial examples would be helpful.  Some screen shots are available 
athttp://boxen.math.washington.edu/home/iandrus/



Nice!



As a question from someone who does not own an iDevice... how is this
working?  Single-cell server, or some other mechanism?  Do objects
persist, or is it more of a calculator option?  (I assume you aren't
compiling all of Sage on an iPhone...)



It uses the Single-cell server to do the calculation, but persists the objects. 
 Compiling all of Sage would be lots of work and wouldn't make it past Apple's 
review process.



Hmm.  Jason said that the point of the single-cell was that objects
don't persist.  How do you do that?  (On the phone, I assume?)



Well, static output persists (in that you can ask for the session output for 
any session and it is still in the database).  At least, right now we don't 
purge the database periodically.  But you're right that the session doesn't 
stay active.


I misspoke.  We don't persists objects per se, but rather save the input and 
output for future perusal.


So, to hijack this thread, let me get complete clarity about what the
single-cell server does.

1) You send it a computation.  To make it relevant to this discussion,
let's say

A = 2+2; A


The the singlecell puts that input into the database, starts up a new 
sage session, computes that input, and returns the result to the 
database, and almost immediately, the sage session is exited.  The web 
interface then pulls the output from the database for that computation 
and displays it, which gives your step 2:




2) It returns the output of the computation, in this case

4




The single-cell server (right now) doesn't delete the input and output 
for the session (even though the actual running sage session which 
produced the output is long gone).




3) Ivan's app has saved both of these, but the single-cell has
"forgotten" about the input.

4) Someone else uses the single-cell for something in the meanwhile,
computing perhaps

A = 3+3; A

which changes the value of A in the single-cell (or maybe there is no
"current" value for A, it needs to be redefined?).


The singlecell then starts up a new sage session for this computation, 
computes it, and stores both the input and output in the database so the 
user's web browser can retrieve it.



I don't know how Ivan has worked things with his app, but hopefully that 
clears up the singlecell usage.  Ivan could, if he had the session id 
number, later on, request the output from the database.  That wouldn't 
start up a new Sage session, but would just return what was returned before.


Thanks,

Jason

--
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: Graphics3dGroup addition side effect

2012-01-18 Thread Jason Grout

On 1/18/12 1:42 PM, Sébastien Labbé wrote:

Hi,

On sage-4.7.2, the third line of the following shows two cubes + one
sphere in jmol :

sage: a = cube((1,0,0), color='red') + cube((0,0,3), color='green')
sage: b = a + sphere((0,0,0), color='yellow')
sage: a

I was expecting only two cubes, but the addition changed a. Is this a
normal behavior (I guess no copy has to be made that way) or is this a
bug?


This is a bug reported and a patch posted a long time ago:

http://trac.sagemath.org/sage_trac/ticket/9089

It looks like I promised a new patch about 16 months ago in response to 
a failed doctest, so I guess the ball is in my court.  I won't be able 
to attend to this right now, so if someone wants to fix the patch, 
please do so!


Thanks,

Jason

--
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: Sage iPhone app

2012-01-18 Thread kcrisman

> The single-cell server (right now) doesn't delete the input and output
> for the session (even though the actual running sage session which
> produced the output is long gone).

I see!  Thanks, that clarifies the distinction between what is saved
and what is not.   Sorry for the lack of comprehension.

-- 
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] aleph vs. singlecell and internal server error

2012-01-18 Thread Volker Braun
In the recent thread about running the singlecell server on port 80, 
William hinted that aleph is supposed to be that. But I can't get it do do 
anything but throw HTTP-500 internal server errors. Since I am once again 
at an institution that blocks ports != 80 on wifi it would be helpful if 
there were a way to connect to the single cell server. Do I need some magic 
sauce to connect to aleph or what is going on?

-- 
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


Re: [sage-devel] aleph vs. singlecell and internal server error

2012-01-18 Thread William Stein
On Wed, Jan 18, 2012 at 2:05 PM, Volker Braun  wrote:
> In the recent thread about running the singlecell server on port 80, William
> hinted that aleph is supposed to be that. But I can't get it do do anything
> but throw HTTP-500 internal server errors. Since I am once again at an
> institution that blocks ports != 80 on wifi it would be helpful if there
> were a way to connect to the single cell server. Do I need some magic sauce
> to connect to aleph or what is going on?

I hinted that *aleph* would be a good name to do that.  I'll drop what
I'm doing right now and try to configure it.

William

>
> --
> 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



-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

-- 
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: aleph vs. singlecell and internal server error

2012-01-18 Thread Jason Grout

On 1/18/12 4:05 PM, Volker Braun wrote:

In the recent thread about running the singlecell server on port 80,
William hinted that aleph is supposed to be that. But I can't get it do
do anything but throw HTTP-500 internal server errors. Since I am once
again at an institution that blocks ports != 80 on wifi it would be
helpful if there were a way to connect to the single cell server. Do I
need some magic sauce to connect to aleph or what is going on?


A long time ago, aleph was the pre-cursor to the singlecell, but it is 
no longer running, and William hasn't redirected it to the singlecell yet.


Thanks,

Jason



--
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


Re: [sage-devel] Re: aleph vs. singlecell and internal server error

2012-01-18 Thread William Stein
On Wed, Jan 18, 2012 at 2:20 PM, Jason Grout
 wrote:
> On 1/18/12 4:05 PM, Volker Braun wrote:
>>
>> In the recent thread about running the singlecell server on port 80,
>> William hinted that aleph is supposed to be that. But I can't get it do
>> do anything but throw HTTP-500 internal server errors. Since I am once
>> again at an institution that blocks ports != 80 on wifi it would be
>> helpful if there were a way to connect to the single cell server. Do I
>> need some magic sauce to connect to aleph or what is going on?
>
>
> A long time ago, aleph was the pre-cursor to the singlecell, but it is no
> longer running, and William hasn't redirected it to the singlecell yet.

I have now:

http://aleph.sagemath.org/

is now the same as sagemath.org:5467

 -- William

>
> Thanks,
>
> Jason
>
>
>
>
> --
> 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



-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

-- 
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


Re: [sage-devel] Two articles of interest to Sage in latest Notices

2012-01-18 Thread Burcin Erocal
On Wed, 18 Jan 2012 12:26:33 -0800 (PST)
kcrisman  wrote:
 
> Publishing Computational Mathematics, by Tim Daly (of Axiom, a
> frequent contributor on sage-devel)
> http://www.ams.org/notices/201202/rtx120200320p.pdf

Literate programming is not just adding comments to code, but here are
a few numbers nevertheless...

FriCAS (I couldn't find Axiom on ohloh.net):
https://www.ohloh.net/p/fricas
   # of lines of code: 1218007
   # of comment lines:  205615

Singular:
https://www.ohloh.net/p/Singular
   # of lines of code:  456764
   # of comment lines:   73429

Sage:
https://www.ohloh.net/p/sage
   # of lines of code:  474866
   # of comment lines:  551813

Gap wasn't available for comment at the time of publication:
https://www.ohloh.net/p/gap-system


This is also a good occasion to paste "sage -coverageall" output from
5.0.prealpha0:

Overall weighted coverage score:  86.3%
Total number of functions:  28917
We need 1056 more function to get to 90% coverage.
We need 2502 more function to get to 95% coverage.
We need 3658 more function to get to 99% coverage.


Cheers,
Burcin

-- 
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


Re: [sage-devel] Re: aleph vs. singlecell and internal server error

2012-01-18 Thread Volker Braun
Thanks, works!

-- 
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: Two articles of interest to Sage in latest Notices

2012-01-18 Thread Jason Grout

On 1/18/12 4:45 PM, Burcin Erocal wrote:

On Wed, 18 Jan 2012 12:26:33 -0800 (PST)
kcrisman  wrote:


Publishing Computational Mathematics, by Tim Daly (of Axiom, a
frequent contributor on sage-devel)
http://www.ams.org/notices/201202/rtx120200320p.pdf


Literate programming is not just adding comments to code, but here are
a few numbers nevertheless...

FriCAS (I couldn't find Axiom on ohloh.net):
https://www.ohloh.net/p/fricas
# of lines of code: 1218007
# of comment lines:  205615

Singular:
https://www.ohloh.net/p/Singular
# of lines of code:  456764
# of comment lines:   73429

Sage:
https://www.ohloh.net/p/sage
# of lines of code:  474866
# of comment lines:  551813

Gap wasn't available for comment at the time of publication:
https://www.ohloh.net/p/gap-system


This is also a good occasion to paste "sage -coverageall" output from
5.0.prealpha0:

Overall weighted coverage score:  86.3%
Total number of functions:  28917
We need 1056 more function to get to 90% coverage.
We need 2502 more function to get to 95% coverage.
We need 3658 more function to get to 99% coverage.


Deleting sage/server (the old old notebook that can go away in 5.0, 
IIRC) gives us this:


Overall weighted coverage score:  88.1%
Total number of functions:  27936
We need  516 more function to get to 90% coverage.
We need 1913 more function to get to 95% coverage.
We need 3031 more function to get to 99% coverage.

Thanks,

Jason




--
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


Re: [sage-devel] Re: aleph vs. singlecell and internal server error

2012-01-18 Thread Ivan Andrus
On Jan 18, 2012, at 11:23 PM, William Stein wrote:
> On Wed, Jan 18, 2012 at 2:20 PM, Jason Grout
>  wrote:
>> On 1/18/12 4:05 PM, Volker Braun wrote:
>>> 
>>> In the recent thread about running the singlecell server on port 80,
>>> William hinted that aleph is supposed to be that. But I can't get it do
>>> do anything but throw HTTP-500 internal server errors. Since I am once
>>> again at an institution that blocks ports != 80 on wifi it would be
>>> helpful if there were a way to connect to the single cell server. Do I
>>> need some magic sauce to connect to aleph or what is going on?
>> 
>> 
>> A long time ago, aleph was the pre-cursor to the singlecell, but it is no
>> longer running, and William hasn't redirected it to the singlecell yet.
> 
> I have now:
> 
>http://aleph.sagemath.org/
> 
> is now the same as sagemath.org:5467


Unless we're not planning to keep it around, I'm going to use 
http://aleph.sagemath.org/ for the iPhone app since I've had problems with the 
firewall on campus.

-Ivan

-- 
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


Re: [sage-devel] Re: aleph vs. singlecell and internal server error

2012-01-18 Thread William Stein
On Wed, Jan 18, 2012 at 3:40 PM, Ivan Andrus  wrote:
> On Jan 18, 2012, at 11:23 PM, William Stein wrote:
>> On Wed, Jan 18, 2012 at 2:20 PM, Jason Grout
>>  wrote:
>>> On 1/18/12 4:05 PM, Volker Braun wrote:

 In the recent thread about running the singlecell server on port 80,
 William hinted that aleph is supposed to be that. But I can't get it do
 do anything but throw HTTP-500 internal server errors. Since I am once
 again at an institution that blocks ports != 80 on wifi it would be
 helpful if there were a way to connect to the single cell server. Do I
 need some magic sauce to connect to aleph or what is going on?
>>>
>>>
>>> A long time ago, aleph was the pre-cursor to the singlecell, but it is no
>>> longer running, and William hasn't redirected it to the singlecell yet.
>>
>> I have now:
>>
>>    http://aleph.sagemath.org/
>>
>> is now the same as sagemath.org:5467
>
>
> Unless we're not planning to keep it around, I'm going to use 
> http://aleph.sagemath.org/ for the iPhone app since I've had problems with 
> the firewall on campus.
>

I'm happy to keep aleph.sagemath.org pointed at the single cell server
indefinitely.

 -- William

-- 
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


Re: [sage-devel] Re: aleph vs. singlecell and internal server error

2012-01-18 Thread William Stein
On Wed, Jan 18, 2012 at 6:38 PM, William Stein  wrote:
> On Wed, Jan 18, 2012 at 3:40 PM, Ivan Andrus  wrote:
>> On Jan 18, 2012, at 11:23 PM, William Stein wrote:
>>> On Wed, Jan 18, 2012 at 2:20 PM, Jason Grout
>>>  wrote:
 On 1/18/12 4:05 PM, Volker Braun wrote:
>
> In the recent thread about running the singlecell server on port 80,
> William hinted that aleph is supposed to be that. But I can't get it do
> do anything but throw HTTP-500 internal server errors. Since I am once
> again at an institution that blocks ports != 80 on wifi it would be
> helpful if there were a way to connect to the single cell server. Do I
> need some magic sauce to connect to aleph or what is going on?


 A long time ago, aleph was the pre-cursor to the singlecell, but it is no
 longer running, and William hasn't redirected it to the singlecell yet.
>>>
>>> I have now:
>>>
>>>    http://aleph.sagemath.org/
>>>
>>> is now the same as sagemath.org:5467
>>
>>
>> Unless we're not planning to keep it around, I'm going to use 
>> http://aleph.sagemath.org/ for the iPhone app since I've had problems with 
>> the firewall on campus.
>>
>
> I'm happy to keep aleph.sagemath.org pointed at the single cell server
> indefinitely.

I just did a little test of http://aleph.sagemath.org.  I made this
interact in aleph and also in sagenb.org:

@interact
def f(n=(1..10)):
print n*n


With aleph, I can easily count to 4 from when I let go of the slider
until the number updates.  With sagenb.org, I can't even count to 1.
I.e., sagenb.org is *dramatically* faster at interacts than
aleph.sagenb.org, at least in this one test.I've never though of
interacts on sagenb.org as "fast" before.

Jason, care to comment? Do other people see the same behavior?

William

-- 
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


Re: [sage-devel] Re: aleph vs. singlecell and internal server error

2012-01-18 Thread Keshav Kini
They seem about equally fast to me, both around a count of 1. Connecting 
from Singapore.

-Keshav


Join us in #sagemath on irc.freenode.net !

-- 
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: aleph vs. singlecell and internal server error

2012-01-18 Thread Jason Grout

On 1/18/12 8:42 PM, William Stein wrote:

On Wed, Jan 18, 2012 at 6:38 PM, William Stein  wrote:

On Wed, Jan 18, 2012 at 3:40 PM, Ivan Andrus  wrote:

On Jan 18, 2012, at 11:23 PM, William Stein wrote:

On Wed, Jan 18, 2012 at 2:20 PM, Jason Grout
  wrote:

On 1/18/12 4:05 PM, Volker Braun wrote:


In the recent thread about running the singlecell server on port 80,
William hinted that aleph is supposed to be that. But I can't get it do
do anything but throw HTTP-500 internal server errors. Since I am once
again at an institution that blocks ports != 80 on wifi it would be
helpful if there were a way to connect to the single cell server. Do I
need some magic sauce to connect to aleph or what is going on?



A long time ago, aleph was the pre-cursor to the singlecell, but it is no
longer running, and William hasn't redirected it to the singlecell yet.


I have now:

http://aleph.sagemath.org/

is now the same as sagemath.org:5467



Unless we're not planning to keep it around, I'm going to use 
http://aleph.sagemath.org/ for the iPhone app since I've had problems with the 
firewall on campus.



I'm happy to keep aleph.sagemath.org pointed at the single cell server
indefinitely.


I just did a little test of http://aleph.sagemath.org.  I made this
interact in aleph and also in sagenb.org:

@interact
def f(n=(1..10)):
 print n*n


With aleph, I can easily count to 4 from when I let go of the slider
until the number updates.  With sagenb.org, I can't even count to 1.
I.e., sagenb.org is *dramatically* faster at interacts than
aleph.sagenb.org, at least in this one test.I've never though of
interacts on sagenb.org as "fast" before.

Jason, care to comment? Do other people see the same behavior?


We could adjust the polling intervals.  There are several polls going on 
which are introducing delays:


1. The worker manager polling the database for new input (.1 seconds)

2. The worker manager polling the worker for output (.1 seconds; 
actually, this is batched with (1) above).


3. The web browser polling the database for output (.4 seconds, I believe).

Ideally, we'd have one seamless client<---(websocket/zmq)>worker 
connection with no polling.  That's how things are done in the ipython 
notebook.  We put the database and polling in the middle for scalability.


Thanks,

Jason

--
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: aleph vs. singlecell and internal server error

2012-01-18 Thread John Travis
FYI, just converted all my WebWork problems that call the single-cell
and all is well.  Response times appear to be very good except for an
occasional hiccup (which could be anything.)

-- 
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


Re: [sage-devel] Re: aleph vs. singlecell and internal server error

2012-01-18 Thread William Stein
On Wed, Jan 18, 2012 at 7:34 PM, Jason Grout
 wrote:
> On 1/18/12 8:42 PM, William Stein wrote:
>>
>> On Wed, Jan 18, 2012 at 6:38 PM, William Stein  wrote:
>>>
>>> On Wed, Jan 18, 2012 at 3:40 PM, Ivan Andrus
>>>  wrote:

 On Jan 18, 2012, at 11:23 PM, William Stein wrote:
>
> On Wed, Jan 18, 2012 at 2:20 PM, Jason Grout
>   wrote:
>>
>> On 1/18/12 4:05 PM, Volker Braun wrote:
>>>
>>>
>>> In the recent thread about running the singlecell server on port 80,
>>> William hinted that aleph is supposed to be that. But I can't get it
>>> do
>>> do anything but throw HTTP-500 internal server errors. Since I am
>>> once
>>> again at an institution that blocks ports != 80 on wifi it would be
>>> helpful if there were a way to connect to the single cell server. Do
>>> I
>>> need some magic sauce to connect to aleph or what is going on?
>>
>>
>>
>> A long time ago, aleph was the pre-cursor to the singlecell, but it is
>> no
>> longer running, and William hasn't redirected it to the singlecell
>> yet.
>
>
> I have now:
>
>    http://aleph.sagemath.org/
>
> is now the same as sagemath.org:5467



 Unless we're not planning to keep it around, I'm going to use
 http://aleph.sagemath.org/ for the iPhone app since I've had problems with
 the firewall on campus.

>>>
>>> I'm happy to keep aleph.sagemath.org pointed at the single cell server
>>> indefinitely.
>>
>>
>> I just did a little test of http://aleph.sagemath.org.  I made this
>> interact in aleph and also in sagenb.org:
>>
>> @interact
>> def f(n=(1..10)):
>>     print n*n
>>
>>
>> With aleph, I can easily count to 4 from when I let go of the slider
>> until the number updates.  With sagenb.org, I can't even count to 1.
>> I.e., sagenb.org is *dramatically* faster at interacts than
>> aleph.sagenb.org, at least in this one test.    I've never though of
>> interacts on sagenb.org as "fast" before.
>>
>> Jason, care to comment? Do other people see the same behavior?
>
>
> We could adjust the polling intervals.  There are several polls going on
> which are introducing delays:
>
> 1. The worker manager polling the database for new input (.1 seconds)
>
> 2. The worker manager polling the worker for output (.1 seconds; actually,
> this is batched with (1) above).
>
> 3. The web browser polling the database for output (.4 seconds, I believe).
>
> Ideally, we'd have one seamless client<---(websocket/zmq)>worker
> connection with no polling.  That's how things are done in the ipython
> notebook.  We put the database and polling in the middle for scalability.
>
> Thanks,

But the Sage notebook is doing all kinds of stupid polling and still
seems way, way faster to me than the single cell server.  Maybe the .4
second browser pulling is to blame, though I'm seeing more than .8
seconds total.   I'm looking forward to hearing back from somebody
else closer than Singapore about the comparison in times.


When I tried the above and hit "shift-enter" with the cursor not at
the very end, the shift-enter went through and mangled the text, but
the evaluation still happens.  I.e., if I put the cursor after "f", I
end up with:

def f
(n=(1..10)):
print n*n

I think you have to call some codemirror2 api function to undo the
last thing (or something), but you're forgetting to do that.

 -- William

-- 
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


Re: [sage-devel] aleph vs. singlecell and internal server error

2012-01-18 Thread Dan Drake
On Wed, 18 Jan 2012 at 02:05PM -0800, Volker Braun wrote:
> Since I am once again at an institution that blocks ports != 80 on
> wifi it would be helpful if there were a way to connect to the single
> cell server.

Do they block port 22? If not, I'd use an ssh tunnel. Otherwise, I would
use tor, which is slow but would allow you to connect to anything. I
think it's quite likely you can somehow get tor running through port 80.

Dan

--
---  Dan Drake
-  http://mathsci.kaist.ac.kr/~drake
---


signature.asc
Description: Digital signature


[sage-devel] Re: aleph vs. singlecell and internal server error

2012-01-18 Thread Jason Grout

On 1/18/12 9:55 PM, William Stein wrote:

On Wed, Jan 18, 2012 at 7:34 PM, Jason Grout
  wrote:

On 1/18/12 8:42 PM, William Stein wrote:


On Wed, Jan 18, 2012 at 6:38 PM, William Steinwrote:


On Wed, Jan 18, 2012 at 3:40 PM, Ivan Andrus
  wrote:


On Jan 18, 2012, at 11:23 PM, William Stein wrote:


On Wed, Jan 18, 2012 at 2:20 PM, Jason Grout
wrote:


On 1/18/12 4:05 PM, Volker Braun wrote:



In the recent thread about running the singlecell server on port 80,
William hinted that aleph is supposed to be that. But I can't get it
do
do anything but throw HTTP-500 internal server errors. Since I am
once
again at an institution that blocks ports != 80 on wifi it would be
helpful if there were a way to connect to the single cell server. Do
I
need some magic sauce to connect to aleph or what is going on?




A long time ago, aleph was the pre-cursor to the singlecell, but it is
no
longer running, and William hasn't redirected it to the singlecell
yet.



I have now:

http://aleph.sagemath.org/

is now the same as sagemath.org:5467




Unless we're not planning to keep it around, I'm going to use
http://aleph.sagemath.org/ for the iPhone app since I've had problems with
the firewall on campus.



I'm happy to keep aleph.sagemath.org pointed at the single cell server
indefinitely.



I just did a little test of http://aleph.sagemath.org.  I made this
interact in aleph and also in sagenb.org:

@interact
def f(n=(1..10)):
 print n*n


With aleph, I can easily count to 4 from when I let go of the slider
until the number updates.  With sagenb.org, I can't even count to 1.
I.e., sagenb.org is *dramatically* faster at interacts than
aleph.sagenb.org, at least in this one test.I've never though of
interacts on sagenb.org as "fast" before.

Jason, care to comment? Do other people see the same behavior?



We could adjust the polling intervals.  There are several polls going on
which are introducing delays:

1. The worker manager polling the database for new input (.1 seconds)

2. The worker manager polling the worker for output (.1 seconds; actually,
this is batched with (1) above).

3. The web browser polling the database for output (.4 seconds, I believe).

Ideally, we'd have one seamless client<---(websocket/zmq)>worker
connection with no polling.  That's how things are done in the ipython
notebook.  We put the database and polling in the middle for scalability.

Thanks,


But the Sage notebook is doing all kinds of stupid polling and still
seems way, way faster to me than the single cell server.  Maybe the .4
second browser pulling is to blame, though I'm seeing more than .8
seconds total.   I'm looking forward to hearing back from somebody
else closer than Singapore about the comparison in times.


When I tried the above and hit "shift-enter" with the cursor not at
the very end, the shift-enter went through and mangled the text, but
the evaluation still happens.  I.e., if I put the cursor after "f", I
end up with:

def f
(n=(1..10)):
 print n*n

I think you have to call some codemirror2 api function to undo the
last thing (or something), but you're forgetting to do that.


Yes, I've noticed that too.  I think we're not canceling the enter.

In fact, the new codemirror just introduced a new way of dealing with 
keybindings.  We haven't integrated the new codemirror into the 
singlecell yet.


Thanks,

Jason



--
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


Re: [sage-devel] Re: aleph vs. singlecell and internal server error

2012-01-18 Thread Dan Drake
On Wed, 18 Jan 2012 at 06:42PM -0800, William Stein wrote:
> I just did a little test of http://aleph.sagemath.org.  I made this
> interact in aleph and also in sagenb.org:
> 
> @interact
> def f(n=(1..10)):
> print n*n
> 
> 
> With aleph, I can easily count to 4 from when I let go of the slider
> until the number updates.  With sagenb.org, I can't even count to 1.
> I.e., sagenb.org is *dramatically* faster at interacts than
> aleph.sagenb.org, at least in this one test.I've never though of
> interacts on sagenb.org as "fast" before.

I'm seeing the same thing. The singlecell server is almost always
slower, and has a high variance -- it's fast-ish sometimes, and
sometimes really really slow. After a little while it just stops
working.

Connecting from Korea; about 135 ms ping time to sage.math, with huge
bandwidth; I just averaged 4.96 MB/s downloading a source tarball.

Dan

--
---  Dan Drake
-  http://mathsci.kaist.ac.kr/~drake
---


signature.asc
Description: Digital signature


[sage-devel] Re: aleph vs. singlecell and internal server error

2012-01-18 Thread Volker Braun
My Java client for the single cell server that is at the core of the 
Android app pretty consistently gets a reply in about 1s. And I have ping 
times of about 150ms. Here is the log for a sample session for "1+1":

<< (32ms) Request to execute
>> (871ms) Python output
SageOutput
{
   "content":{
  "data":{
 "text/plain":"2"
  }
   },
   "parent_header":{
  "session":"830f6e8c-a8d2-4a23-8272-337f4b65215c",
  "msg_id":"f0a12965-c348-4af6-a834-bb72e0866396"
   },
   "sequence":0,
   "msg_type":"pyout",
   "output_block":null,
   "header":{
  "msg_id":"5630638020700690449"
   }
}


>> (872ms) Execute reply status = ok
SageAdditionalOutput
{
   "content":{
  "status":"ok"
   },
   "parent_header":{
  "session":"830f6e8c-a8d2-4a23-8272-337f4b65215c",
  "msg_id":"f0a12965-c348-4af6-a834-bb72e0866396"
   },
   "sequence":1,
   "msg_type":"execute_reply",
   "output_block":null,
   "header":{
  "msg_id":"3473988519569014394"
   }
}


>> (872ms) End of Sage session marker
SageFinished
{
   "content":{
  "msg_type":"session_end"
   },
   "parent_header":{
  "session":"830f6e8c-a8d2-4a23-8272-337f4b65215c",
  "msg_id":"f0a12965-c348-4af6-a834-bb72e0866396"
   },
   "sequence":2,
   "msg_type":"extension",
   "header":{
  "msg_id":"0108e9aa-4df8-4397-be57-d3f25fe67d18"
   }
}


-- 
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


Re: [sage-devel] Re: aleph vs. singlecell and internal server error

2012-01-18 Thread William Stein
On Wed, Jan 18, 2012 at 8:51 PM, Volker Braun  wrote:
> My Java client for the single cell server that is at the core of the Android
> app pretty consistently gets a reply in about 1s. And I have ping times of
> about 150ms. Here is the log for a sample session for "1+1":

Very interesting!  So the key thing is that I'm using @interact; in
particular, this is my test:

@interact
def f(n=(1..10)):
print n*n

When I actually "interact" with the @interact, it is very slow.  In
fact, just doing 1+1 feels pretty fast to me.  So I'm reporting a bug
which is that interacts are slow. Other things aren't necessarily.

William


>
> << (32ms) Request to execute
>>> (871ms) Python output
> SageOutput
> {
>    "content":{
>       "data":{
>          "text/plain":"2"
>       }
>    },
>    "parent_header":{
>       "session":"830f6e8c-a8d2-4a23-8272-337f4b65215c",
>       "msg_id":"f0a12965-c348-4af6-a834-bb72e0866396"
>    },
>    "sequence":0,
>    "msg_type":"pyout",
>    "output_block":null,
>    "header":{
>       "msg_id":"5630638020700690449"
>    }
> }
>
>
>>> (872ms) Execute reply status = ok
> SageAdditionalOutput
> {
>    "content":{
>       "status":"ok"
>    },
>    "parent_header":{
>       "session":"830f6e8c-a8d2-4a23-8272-337f4b65215c",
>       "msg_id":"f0a12965-c348-4af6-a834-bb72e0866396"
>    },
>    "sequence":1,
>    "msg_type":"execute_reply",
>    "output_block":null,
>    "header":{
>       "msg_id":"3473988519569014394"
>    }
> }
>
>
>>> (872ms) End of Sage session marker
> SageFinished
> {
>    "content":{
>       "msg_type":"session_end"
>    },
>    "parent_header":{
>       "session":"830f6e8c-a8d2-4a23-8272-337f4b65215c",
>       "msg_id":"f0a12965-c348-4af6-a834-bb72e0866396"
>    },
>    "sequence":2,
>    "msg_type":"extension",
>    "header":{
>       "msg_id":"0108e9aa-4df8-4397-be57-d3f25fe67d18"
>    }
> }
>
>
> --
> 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



-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

-- 
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: aleph vs. singlecell and internal server error

2012-01-18 Thread Jason Grout

On 1/18/12 10:54 PM, William Stein wrote:

So I'm reporting a bug
which is that interacts are slow.



Tracked here: 
https://github.com/jasongrout/simple-python-db-compute/issues/227


Thanks,

Jason


--
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: aleph vs. singlecell and internal server error

2012-01-18 Thread Volker Braun
I don't see anything special with interacts in the Java client. It takes a 
little bit over 1s to get the interact prepare, and getting the update 
after changing the value (here to n=7) again takes about 1s. But when I use 
the web interface the interacts feel slower (I'd say about 3s to update 
after the slider is changed).


<< (105ms) Request to execute
>> (1182ms) Prepare interact id=2564993036234168734
SageInteract
{
   "content":{
  "content":{
 "update":{
"n":[
   "n"
]
 },
 "controls":{
"n":{
   "raw":true,
   "control_type":"slider",
   "display_value":true,
   "values":[
  "1",
  "2",
  "3",
  "4",
  "5",
  "6",
  "7",
  "8",
  "9",
  "10"
   ],
   "default":0,
   "range":[
  0,
  9
   ],
   "subtype":"discrete",
   "label":null,
   "step":1
}
 },
 "interact_id":"2564993036234168734",
 "layout":{
"top_center":[
   "n"
]
 }
  },
  "msg_type":"interact_prepare"
   },
   "parent_header":{
  "session":"0ec32ff5-51ba-4728-9ab1-d1396009dac8",
  "msg_id":"8344531d-92c7-460a-b925-0fc880eaf236"
   },
   "sequence":0,
   "msg_type":"extension",
   "output_block":null,
   "header":{
  "msg_id":"4181681696853414445"
   }
}


>> (1183ms) Stream output
SageOutput
{
   "content":{
  "name":"stdout",
  "data":"1\n"
   },
   "parent_header":{
  "session":"0ec32ff5-51ba-4728-9ab1-d1396009dac8",
  "msg_id":"8344531d-92c7-460a-b925-0fc880eaf236"
   },
   "sequence":1,
   "msg_type":"stream",
   "output_block":"2564993036234168734",
   "header":{
  "msg_id":"3390922363263553954"
   }
}


>> (1186ms) Execute reply status = ok
<< (1188ms) Request to execute
>> (1761ms) Stream output
SageOutput
{
   "content":{
  "name":"stdout",
  "data":"64\n"
   },
   "parent_header":{
  "session":"0ec32ff5-51ba-4728-9ab1-d1396009dac8",
  "msg_id":"7f549c4e-1a01-4b20-8d7b-0785b9f79cac"
   },
   "sequence":3,
   "msg_type":"stream",
   "output_block":"2564993036234168734",
   "header":{
  "msg_id":"2790306674611809938"
   }
}


>> (1761ms) Execute reply status = ok
SageOutput
{
   "content":{
  "status":"ok"
   },
   "parent_header":{
  "session":"0ec32ff5-51ba-4728-9ab1-d1396009dac8",
  "msg_id":"7f549c4e-1a01-4b20-8d7b-0785b9f79cac"
   },
   "sequence":4,
   "msg_type":"execute_reply",
   "output_block":null,
   "header":{
  "msg_id":"4799113128681351654"
   }
}

-- 
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


Re: [sage-devel] Timing doctests

2012-01-18 Thread Robert Bradshaw
In general we would like to avoid writing doctests that are large only
to take a measurable amount of time, but you could look into using
cputime() with the first invocation and then making sure the second
call is < 0.0x * (first call time).

On Wed, Jan 18, 2012 at 8:05 AM, Michael Orlitzky  wrote:
> Is there an existing way to doctest for performance regressions? I have
> in mind:
>
>  http://trac.sagemath.org/sage_trac/ticket/12292
>
> If I create a big enough matrix, I can make charpoly() take, say, N
> seconds. The second call should take around 0 seconds. I would like to
> test that 0
> --
> 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

-- 
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