[sage-devel] Re: GSoC 2013 : Sage Android app

2013-05-01 Thread Ajay
Here is my proposal for Android app in Sage. Please look over it and tell 
me if I have to improve it.

https://docs.google.com/document/d/1Mwi0sj6o24dg70S-MIURkkSz7cT47W83TQmySBxs2y0/

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-devel] Re: can't escape sage after error in attached file (IPython experts?)

2013-05-01 Thread Nils Bruin
On May 1, 9:45 am, Marco Streng  wrote:
> And how to fix this? I have three ideas that all have a downside:
> * Catching the error will destroy a valuable traceback (which I removed
> above). Or is there a way to preserve that traceback and have it printed
> somehow?

Apparently the traceback is there. One should be able to retrieve the
most recent one:

exc_type, exc_value, exc_traceback = sys.exc_info()

(just google for it -- there's some info in stack exchange about it)

So we could do something along the lines:

try:
reload_modified_attached_files()
except:
INFO = sys.exc_info()
print "Warning. An exception occurred during reloading of ..."
print_traceback(INFO)
print "continuing with command you entered. Funny things can
happen"
execute_command()

The problem with this is that usually the right thing to do IS to
abort if an error occurs on reloading an attached file. People will
probably get used to just entering an empty command to trigger reload
after they've edited though, so the extraneous execution of an empty
command will probably not affect much.

> * How about attempting to reload only once (move the line "attached[fpath]
> = os.path.getmtime(fpath)" to just before "execfile" in
> sage.misc.preparser.load)? This may hide the problem: there will be only
> one error message when attach fails, which the user may mistake for an
> error related to the last input, and then think the latest version of the
> file is safely attached, while actually an old version is still being used.

If that is accompanied by an explicit message
"detaching file ... due to exception.
Execute 'attach()' to reattach."
I think that's the cleanest (and we actually do detach the file)

The other option is indeed
"suspending reloading file ... due to exception
Reload will be reattempted if file modification is detected"

(and then just update the reference timestamp as you suggest)

> * Is it possible to separate the reloading from the evaluation of the input
> line? This may be the best option. Any idea how to implement that? Looks
> like this is handled in IPython/core/interactiveshell.py , so it would mean
> patching IPython?

I think the option above, catch exception but print the traceback
anyway, would accomplish this in essence. Of course now we have to
answer questions such as: should we catch exceptions for each reloaded
file separately? Do we just print all tracebacks if multiple fail? Or
do we abort after first reload?

For reference, Magma does:

> Attach("a.m");
> Attach("b.m");
> intrinsic_defined_in_a();
True
[invalidate a.m and b.m]
> 1;
[PC]
[PC] User error: syntax error at end of input
[PC]
[PC] User error: syntax error at end of input
> intrinsic_defined_in_a();
User error: Identifier 'intrinsic_defined_in_a' has not been declared
or assigned

So:
 - it reloads all attachments separately
 - it still executes the command
 - definitions in a failed reload really disappear
 - reloads are only reattempted when another change is detected.

Due to python semantics, we cannot let previous attachments really
disappear, but we can do the rest.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [sage-devel] Sage

2013-05-01 Thread William Stein
On Wed, May 1, 2013 at 11:26 AM, jibran liaquat  wrote:
> Hi,
>
> I have installed Sage in Oracle Virtual Box (on Windows 8), Now, I want to 
> install Healpy in Sage but I am hell stuck! Can any one help me please step 
> by step procedure.. I have seen online resources as well but of no use!
>

Try typing

   os.system("easy_install healpy")

into Sage, and wait 10-15 minutes (there's evidently some amount of
code that has to be built from source).

I do not know if this will work on the Sage VBox image, but it does
work with the standard sage-4.8 install on Ubuntu Linux (and the Sage
VBox image isn't far from being that).   Actually, what I tested was
typing "sage -sh" on the command line, then "easy_install healpy".

Hope this is of some help.

> Jibran
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-devel?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



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

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-devel] Sage

2013-05-01 Thread jibran liaquat
Hi,

I have installed Sage in Oracle Virtual Box (on Windows 8), Now, I want to 
install Healpy in Sage but I am hell stuck! Can any one help me please step by 
step procedure.. I have seen online resources as well but of no use!

Jibran

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-devel] can't escape sage after error in attached file (IPython experts?)

2013-05-01 Thread Marco Streng
Dear sage-devel,

Here's a minimal version of something that happened to me a few times
recently:

{{{
17:57:03:~$ touch myfile.sage
17:57:05:~$ sage
--
| Sage Version 5.8, Release Date: 2013-03-15 |
| Type "notebook()" for the browser-based notebook interface.|
| Type "help()" for help.|
--
sage: %attach myfile.sage
sage: file('myfile.sage', 'w').write('1/0')
sage: 1+1
...
ZeroDivisionError: Rational division by zero
sage: exit
...
ZeroDivisionError: Rational division by zero
sage: detach('myfile.sage')
...
ZeroDivisionError: Rational division by zero
}}}

It seems like the only way to continue using this Sage session is to fix
the error first. But suppose you have some reason not to (e.g. are in a
hurry, and the error is hard to fix). I think it would be much better if
Sage was to evaluate "1+1" and especially "exit" and "detach" even when
unable to reload one of the attached files. Shall I open a ticket for this?

And how to fix this? I have three ideas that all have a downside:
* Catching the error will destroy a valuable traceback (which I removed
above). Or is there a way to preserve that traceback and have it printed
somehow?
* How about attempting to reload only once (move the line "attached[fpath]
= os.path.getmtime(fpath)" to just before "execfile" in
sage.misc.preparser.load)? This may hide the problem: there will be only
one error message when attach fails, which the user may mistake for an
error related to the last input, and then think the latest version of the
file is safely attached, while actually an old version is still being used.
* Is it possible to separate the reloading from the evaluation of the input
line? This may be the best option. Any idea how to implement that? Looks
like this is handled in IPython/core/interactiveshell.py , so it would mean
patching IPython?
* Any other ideas?

Marco

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-devel] Women in Sage 4 - Application Deadline May 20

2013-05-01 Thread Alyson Deines
The application for the fourth annual Sage Days for Women is now up:
http://wiki.sagemath.org/days50.

This Sage Days will be held July 10 - 15, 2013 in Seattle, Washington.
 Participants will stay at the beautiful Shuey
House.
 The first two days will be a series of introductory level Sage talks on
UW's campus and the rest of the workshop will be coding sprints at the
Shuey House.

All funding and lodging is going to women, but men are welcome to
participate.  Also, please feel free to forward this to people who might be
interested!

Our project leaders are Kristin Lauter, Michelle Manes, Adriana Salerno,
and Ursula Whitcher.

In Adriana and Ursula's project, we will develop techniques and code for
counting points on hypersurfaces in toric varieties over finite fields,
with an eye toward arithmetic mirror symmetry.

Kristin has proposed several projects including methods for generating
record abc triples, relating to elliptic curves and abelian varieties
 (e.g. getting involved in the abc Olympics and writing code for relevant
functions) and investigating degrees of isogenies between elliptic curves
and higher dimensional abelian varieties.



-- 
*Jennifer Balakrishnan*
Alyson Deines

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.