[sage-devel] Java3D usable in any form?

2007-12-03 Thread Nils Bruin
Concerning interactive 3d vis tools: Is there currently *any* way of getting Java3D to work reliably together with sage on, say Mac G5 systems running OSX and on i386/ amd64 with linux? It doesn't necessarily have to be from the notebook, although that would be preferable. Are instructions for th

[sage-devel] Re: Java3D usable in any form?

2007-12-03 Thread Nils Bruin
On Dec 3, 4:51 pm, "William Stein" <[EMAIL PROTECTED]> wrote: > > I think Java3d already works fine on Macs and Linux from , so long as > > you have java installed. I use it "all the time" when I want to do > > 3d visualization. This was something Robert Bradshaw implemented > > last summer (it

[sage-devel] Re: Java3D usable in any form?

2007-12-03 Thread Nils Bruin
I've looked into Java3D a bit and it seems to need all kinds of scary fiddling and installing to get working - especially in a browser. Instructions I found referred to "jre1.2" and "java2". Given that "jre1.6" seems to be current, I think those instructions might be outdated. Some people here se

[sage-devel] Re: Java3D usable in any form?

2007-12-03 Thread Nils Bruin
OK, I finally found some instructions that looked halfway trustworthy. https://java3d.dev.java.net/binary-builds.html has a readme for 1.5.1 that had relatively easy to follow instructions. These actually worked! I've been able to view the little "capeman" in a "java applet window" (I guess it d

[sage-devel] Re: Java3D usable in any form?

2007-12-03 Thread Nils Bruin
On Dec 3, 9:55 pm, Robert Bradshaw <[EMAIL PROTECTED]> wrote: [...] > In principle it should be able to download the necessary jars without > the user having to install anything (beyond Java itself). This is why > the initial download is so large. Obviously there are robustness > issues. Also, it

[sage-devel] Re: Java3D usable in any form?

2007-12-04 Thread Nils Bruin
On Dec 3, 10:33 pm, Robert Bradshaw <[EMAIL PROTECTED]> wrote: > Actually, that is the point of gluegen-rt.jar--it lets one ship > native code (so/dll/dylib) libraries within the jars themselves, and > why there has to be singed code involved. Does the 4x4 applet still > work for you if you unins

[sage-devel] Re: Java3D usable in any form?

2007-12-04 Thread Nils Bruin
On with the bug reports: - When I run the applet, I get a scary number of requests for "trust", including some "identification required" dialogue boxes (on fedora 7) that supply no information whatsoever. It feels like signing a blank cheque. These are the kinds of dialogues that students should

[sage-devel] Re: Scientific calculator in the notebook

2007-12-07 Thread Nils Bruin
Scientific calculator programs already abound. As a gentle introduction to sage, you might want to consider including a side- window where the sage commands that effect the same computation scroll by. That way, one could use it as a "scientific calculator-to-sage" translator and people might be ab

[sage-devel] Re: Scientific calculator in the notebook

2007-12-07 Thread Nils Bruin
On Dec 7, 2:23 pm, "Ted Kosan" <[EMAIL PROTECTED]> wrote: > 1) Not only can the applet inject javascript code into the browser, > but it can also inject SAGE code into a worksheet. When a given > applet launches, it can automatically inject code into the SAGE > environment on the server which ca

[sage-devel] Re: Auto-login under VMware

2007-12-11 Thread Nils Bruin
> On Dec 11, 2007 3:08 PM, John Voight <[EMAIL PROTECTED]> wrote: > > Hi, > > > Is it possible to automatically login the VMware appliance as "sage"? You may have other reasons for wanting to have someone logged in automatically and I don't use the VMs mysef, so perhaps I am suggesting something

[sage-devel] Re: Auto-login under VMware

2007-12-12 Thread Nils Bruin
You would have to run "chkconfig" to make sure that the service actually gets added to the /etc/rc.[0.6] directories, which control which services get started at what run level. You'd also have to make sure that the service is configured to run at the appropriate runlevel (in the script above it's

[sage-devel] xgcd problem

2007-12-12 Thread Nils Bruin
At present xgcd(12,2) == (2,1,-5), whereas most people would expect the answer (2,0,1) [being the smallest linear combination]. Ticket: http://sagetrac.org/sage_trac/ticket/1482 Since xgcd is central to so many algorithms and is very speed- sensitive, I hesitate to put in a simple-minded fix. Ho

[sage-devel] Re: Fwd: [sage-newbie] Integer points on Elliptic Curves

2007-12-21 Thread Nils Bruin
On Dec 18, 3:35 am, "John Cremona" <[EMAIL PROTECTED]> wrote: > The only implementations I know of are in > SiMath (now defunct) and Magma, but it has been suggested as a good > project for a Masters student to reimplement it in Sage, and someone > might be doing that. KANT/KASH (http://www.math.

[sage-devel] Re: #1482: xgcd suboptimal output

2007-12-24 Thread Nils Bruin
I don't think anybody should care about the signs. Given the close connection between continued fractions and Euclid's algorithm (which does guarantee minimality), I guess you could try and see what signs would be given back by a continued fractions approach. It actually looks like they had a ver

[sage-devel] Education: Tying SAGE into an online course management system

2008-01-08 Thread Nils Bruin
For people who are seriously interested into developing SAGE into a tool that can easily be used for teaching and/or student assignments, I warmly recommend that they look into LON-CAPA. It has the advantage that it is already based on open source technology. Maxima is already packaged with it for

[sage-devel] Notebook revision info leakage

2008-01-10 Thread Nils Bruin
I posted http://sagetrac.org/sage_trac/ticket/1751 In general, the incredible persistence of the notebook is great. However, it makes "deleting" things a rather opaque procedure and it is not entirely clear to me what to do to make sure that notebook information has been properly deleted. --~--~--

[sage-devel] Mark your calendars

2008-01-25 Thread Nils Bruin
*** Preliminary Announcement * Sage days 9: Mathematical graphics and visualization workshop Vancouver, Canada August 9 - 16, 2008 This instructional workshop is primarily aimed at graduate students in mathematics and related areas. It will concentrate o

[sage-devel] forall and exists cannot be used as predicate

2008-01-30 Thread Nils Bruin
Presently, because forall and exists return tuples rather than booleans, their return value is always True, so they cannot be used as a predicate, which is very unintuitive given their names. Proposed solution: optional parameter witness (default: False) that determines return value type. Ticket

[sage-devel] Re: forall and exists cannot be used as predicate

2008-01-30 Thread Nils Bruin
bling along with forall and exists when there is a much nicer option. (I got a tab completion hit on "forall" and "exists" and assumed those were the right functions to use. They are often not). That teaches me to *not* write patches :-) > On Jan 30, 2008 2:45 PM, Nils Bruin

[sage-devel] Re: forall and exists cannot be used as predicate

2008-01-31 Thread Nils Bruin
OK, I changed the patch on http://trac.sagemath.org/sage_trac/ticket/1987 so that "forall" and "exists" do not change functionality, but have a pointer to "all" and "any" in their docstrings. Incidentally, it is *crucial* to *not* use square brackets inside any and all. If you do, you destroy any

[sage-devel] Re: forall and exists cannot be used as predicate

2008-01-31 Thread Nils Bruin
On Jan 31, 6:50 pm, "William Stein" <[EMAIL PROTECTED]> wrote: [...] > Also, in your posted patch you emphasize that forall and exists > are *NOT* suitable for use in an if, etc. I would have written that > to use them thus you have to use the ugly forall(...)[0], and it is > much nicer to use a

[sage-devel] Re: forall and exists cannot be used as predicate

2008-01-31 Thread Nils Bruin
I forgot one case. This is weird. Exists seems *faster* than any. That should never be happening! sage: L=[1..10^6] sage: L[10^6-3]=-1 sage: %timeit any(a<0 for a in L) 10 loops, best of 3: 2.47 s per loop sage: %timeit exists(L, lambda a: a<0) 10 loops, best of 3: 2.83 s per loop sage: g=lambda

[sage-devel] Re: forall and exists cannot be used as predicate

2008-02-01 Thread Nils Bruin
The timing differences between "any" and "exists" still bother me a bit, so I tried plain sage -ipython: sage: def exists(S, P): ...: for x in S: ...: if P(x): return True, x ...: ...: return False, None sage: L=range(10^6) sage: L[10^6-3]=-1 sage: g=lambda a: a<0 sage

[sage-devel] Re: Sage 2.10.1 released

2008-02-03 Thread Nils Bruin
I tried a "sage --upgrade" from a clean, relocated install of sage 2.10. The install seems to succeed, but running sage leads to: -- | SAGE Version 2.10.1, Release Date: 2008-02-02 | | Type notebook() for the

[sage-devel] minor issue with notebook "...?startup_token=..." URLs

2008-02-08 Thread Nils Bruin
It's really convenient that starting up a local notebook actually also pops up a browser with admin already logged in. There's a slight issue, though. When one does (AJAX?) operations on the page that has the decorated URL, the notebook seems to get confused: http://trac.sagemath.org/sage_trac/ti

[sage-devel] Re: mpoly factoring woes

2008-02-18 Thread Nils Bruin
Mark uses LLL to solve the knapsack problem that arises from solving how the local factors should be bundled together to reconstruct the global factors. It's only used to tame the combinatorial explosion that you get if there are many local factors, but only very few global ones. This is completel

[sage-devel] Re: interact versus manipulate

2008-03-08 Thread Nils Bruin
Is there a standard/precedent for function decorations being verbs, adverbs or adjectives? I could see the verb from the implementor's point of view (you are wrapping/changing the given function), but the python syntax puts the identifying in a clearly declarative place. That indicates that it sho

[sage-devel] Can maxima do more than sage?

2008-03-27 Thread Nils Bruin
I tried the first example below in sage. It failed , complaining that maxima wanted to know whether x was positive, negative or 0. Hence, I tried maxima via "sage -maxima". To my surprise, maxima computed the limit without asking for extra information. Is the maxima that gets called from sage put

[sage-devel] Re: notebook features discussion

2008-04-20 Thread Nils Bruin
Just a thought: if for some reason, the click event gets registered twice instead of once, one would go around a cycle of length 3 "the wrong way around". Perhaps change the cycle length and see how that affects the bug? --~--~-~--~~~---~--~~ To post to this group,

[sage-devel] Re: Change the default base_ring for matrices from ZZ to QQ

2008-05-15 Thread Nils Bruin
-1. While I agree that defaulting to matrices over QQ rather than over ZZ would lead to more expected behaviour for most users, I don't see how the rule for changing the base ring can be made both consistent and cheap. Imagine R1 = QQ[x,y]/(x^2+y^2-1). Then FieldOfFractions(R1) is well- defined,

[sage-devel] Imrpove X3D format export

2008-07-21 Thread Nils Bruin
In anticipation of SD9, I tried out viewing sage generated X3D files using a big projection screen, using LCD shutter 3d glasses. The results were quite encouraging: The basic infrastructure works. However, there are lots of small things that could be improved to make it really useful. I've put a

[sage-devel] Re: sagemath.org issues

2008-08-21 Thread Nils Bruin
Would it be possible to have the "download source" file referred to on the linux download page as well? Right now, one has to go to "other systems" first, which felt rather counterintuitive. --~--~-~--~~~---~--~~ To post to this group, send email to sage-devel@goog

[sage-devel] Re: Things I miss from Maple in Sage

2008-08-22 Thread Nils Bruin
On Aug 22, 6:33 pm, David Philp <[EMAIL PROTECTED]> wrote: > map(lambda x: x>0 and x or 0, data) > > [0, 2, 3] > > Can someone translate that "lambda x: x>0 and x or 0" into William's > "the words in your head" please? I suspect this is coming from someone who learned python before it acqui

[sage-devel] Re: Things I miss from Maple in Sage

2008-08-23 Thread Nils Bruin
On Aug 22, 10:43 am, Harald Schilly <[EMAIL PROTECTED]> wrote: > >>> data = [-1,2,3] > >>> gt0 = lambda x: x>0 and x or 0 > >>> map(gt0, data) > > [0, 2, 3] > > in python - or more geeky > > >>> map(lambda x: x>0 and x or 0, data) I'm sorry for derailing the thread a little bit, but this is actua

[sage-devel] Comparing complex numbers

2008-08-23 Thread Nils Bruin
I understand that Python really likes things to be comparable with "<", but from a mathematical point of view the following makes me cringe: sage: C.=ComplexField() sage: 1+i > 1-i True sage: 1+i < 1-i False Imagine being shown this by a student after you have explained your complex variables cl

[sage-devel] Re: Comparing complex numbers

2008-08-23 Thread Nils Bruin
On Aug 23, 1:00 pm, "Fredrik Johansson" <[EMAIL PROTECTED]> wrote: > Hardly, considering that this is what Python itself does: > > >>> 1+1j > 1-1j > > Traceback (most recent call last): > File "", line 1, in > TypeError: no ordering relation is defined for complex numbers Ah, well, if python

[sage-devel] adding custom canonical coercions

2008-08-23 Thread Nils Bruin
With the advent of the new coercion model, did we get the incredibly cool possibility of adding canonical coercions locally, as promissed at SD7? I'd love to be able to type something like: K.=Numberfield(x^2-2) E=EllipticCurve([0,0,r2,0,0] for m in K.real_embeddings(): with CanonicalEmbeddin

[sage-devel] Re: Comparing complex numbers

2008-08-23 Thread Nils Bruin
On Aug 23, 1:27 pm, "William Stein" <[EMAIL PROTECTED]> wrote: > Did you read through the article Alfredo Portes posted, which > also explains some of the gotchas and subtleties of disallowing > comparisons? I'm curious what you thought of it. At the very least, "<" should be transitive wherev

[sage-devel] Re: "Edit a copy" does not work on published worksheet

2008-08-26 Thread Nils Bruin
I confirm this bug. This used to work. I assumed you didn't have a trac account so I filed a bug report for you. This is now http://trac.sagemath.org/sage_trac/ticket/3960 I'm sure the developers appreciate your report (I do, but I'm not really a developer) On Aug 26, 10:08 am, "Philippe Saade"

[sage-devel] Re: Hashing and equality of number field ideals

2008-09-03 Thread Nils Bruin
On Sep 3, 5:25 pm, Nick Alexander <[EMAIL PROTECTED]> wrote: > Hi sage-devel, > > So I'd like opinions on two things: > 1) changing the printing of number field ideals, and > 2) changing the hash key of a residue field K/I to not reference I > directly, but instead the map K -> K/I. I assume that

[sage-devel] Re: calling symbolic expressions, was: Why Sage needs var(...) commands unlike Mathematica?

2008-11-06 Thread Nils Bruin
If we change the name and nature of the objects a little bit, one can actually write down examples where Robert D's interpretation is not so outlandish. For instance: sage: var("D, x"); sage: f=D^2+D+1; sage: f(x^3) x^6 + x^3 + 1 In an article about differential operators, one would probably mea

[sage-devel] Possible undergraduate projects

2007-01-23 Thread Nils Bruin
I probably have funding available to let an undergraduate do some work on Sage for 4 months. I would welcome a list of programming tasks that need some attention. The tasks should be rather limited in scope, because an undergraduate should be able to dive in, work, and get some result within 4 mon

[sage-devel] Re: integer.valuation and polynomial.valuation

2007-01-26 Thread Nils Bruin
On Jan 26, 12:39 pm, "Joel B. Mohler" <[EMAIL PROTECTED]> wrote: > The integer object method "valuation" computes the p-Adic valuation, but the > polynomial object method "valuation" computes a different sort of valuation. > It seems to me that they could be more analogous, but maybe there's somet

[sage-devel] Re: doc browser

2007-01-28 Thread Nils Bruin
A wonderful interface and a very useful way of browsing the documentation. The help accessibility would really improve if from the prompt it would be possible to jump to the relevant reference page, for instance via: doc(IntegerRing) Usage script: 1. I am working in sage and need help on, sa

[sage-devel] Using ssh for port-forwarding

2007-02-06 Thread Nils Bruin
The following is easily found on the man page of ssh, but William pointed out to me that many users may not be aware of the possibility to use ssh to forward ports. In particular, if you want to run "sage - notebook" on computer A, but only want to let it listen to a local port out of security con

[sage-devel] problem upgrading linbox after tree relocation

2007-02-20 Thread Nils Bruin
when trying to upgrade to the new linbox-20070219, I get the following error: libtool: link: cannot find the library `/usr/local/sage/current/local/ sage/default/local/sage/sage-2.1.2/local/lib/libgmp.la' my sage-location is identical to the one William attached to an earlier message. Originall

[sage-devel] Re: problem upgrading linbox after tree relocation

2007-02-20 Thread Nils Bruin
Sorry about replying so quickly to myself. In my case, the problem is indeed solved by replacing line 35 in sage-location by i = z.rfind('local/') (A one letter patch!) I still get the following during the linbox build (on an x86_64 running redhat): WARNING WARNING using frickin' slo

[sage-devel] First remarks on new padics model

2007-03-07 Thread Nils Bruin
Congratulations on the new p-adic model. This really looks very promising and extensible. A few remarks: - It should be possible to create elements with a given precision, without the overhead of first creating the elements to the entire "cap": If you don't know the precision you'll need yet, yo

[sage-devel] Re: First remarks on new padics model

2007-03-08 Thread Nils Bruin
> > - Currently trying to create an element in a "lazy" ring leads to a > > Exception (click to the left for traceback): > > File "integer.pyx", line 669, in integer.Integer.__pow__ > > TypeError: exponent (=lazy) must be an integer > > Coerce your numbers to real or complex numbers first. > > (t

[sage-devel] Re: magma interface

2007-03-08 Thread Nils Bruin
I have tried your examples and I get expected resuts back (i.e., not the ones you are listing here) --~--~-~--~~~---~--~~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more opti

[sage-devel] Re: First remarks on new padics model

2007-03-08 Thread Nils Bruin
> Yeah. Precision there bears more thinking on. I was actually even > considering > having precisions and valuations normalized so that valuation(p) = 1, > and then only > integral precisions would be allowed. I'm not sure whether I like > this idea though... I'm sure I do not like that idea.

[sage-devel] Re: A menu for the notebook

2007-03-16 Thread Nils Bruin
If lots of options get added then menus are unavoidable, but currently I don't think the options presented in the notebook take up real estate that would otherwise get good use. Avoiding drop-down menus has the advantage that all options are immediately visible. Having to first drop down the menu

[sage-devel] Re: Coercion in multivariable polynomial rings

2007-03-30 Thread Nils Bruin
There are many cases where you would *WANT* to coerce between polynomial rings with different orderings, think: *Q1[x,y] with grevlex for heavy duty computations *Q2[x,y] wih elimination order for y to project on the x-line *Q3[x,y] with elimination order for x to project on the y-line (of cours

[sage-devel] Focus problem in 2.4 notebook

2007-04-05 Thread Nils Bruin
I appreciate the great work done on the notebook, but I noticed a few usability degradations in the 2.4 notebook, having to do with focus of input cells. I think these are due to the introduction of syntax highlighting in cells without focus. The highlighting is useful, but the following problems

[sage-devel] Notebook tab completion in magma mode

2007-04-17 Thread Nils Bruin
If the notebook has a worksheet open in "magma" mode, then tab completion almost works: One does get relevant completions back, but all of them are prefixed by "magma." Selecting one of the completions naturally leads to an error, because "magma.RationalField()" is not valid magma. Would it be po

[sage-devel] Failure to install 2.6 documentation via -upgrade?

2007-06-06 Thread Nils Bruin
When I did a sage -upgrade, it ran into the following problem for the installation of the documentation: Extracting package /usr/local/sage/default/spkg/standard/ doc-2.6.spkg ... -rw-r--r-- 1 nbruin nbruin 3121152 Jun 5 16:25 /usr/local/sage/ default/spkg/standard/doc-2.6.spkg doc-2.6/ doc-2.6/

[sage-devel] Make "attach" easier to use from the notebook

2007-06-07 Thread Nils Bruin
I just posted http://www.sagemath.org:9002/sage_trac/ticket/386 Currently, once a user outgrows the stage where their "def"s fit comfortably in cells in the worksheet, there is a rather abrupt change where they have to learn how to edit and maintain separate files and, what's more, put them in a

[sage-devel] Problem with linear algebra over Integers(D)

2007-06-21 Thread Nils Bruin
The bug below is actually a blocker for certain linear algebra problems over Z/dZ. From what I can see, apparently, elements of Integers(D) can be of one of IntegerMod_int, IntegerMod_int64 or IntegerMod_gmp and apparently they get mixed in the same parent. Coercion problems ensue. Unfortunately,

[sage-devel] Re: SAGE notebook 2

2007-06-22 Thread Nils Bruin
Looks great! I assume that the login and account stuff will all be configurable in the end. Can that be linked into unix authentication and kerberos tickets? I guess not . The browser probably doesn't have access to these things. It would be nice if I don't have to log in to sage to use it on my o

[sage-devel] Re: SAGE notebook 2

2007-06-27 Thread Nils Bruin
On Jun 27, 1:57 pm, "William Stein" <[EMAIL PROTECTED]> wrote: > I'm a little worried about creating new accounts for each user, just because > that means the Notebook server has to have the ability to create new accounts, > which is probably a pretty serious ability to have. But I suppose sudo

[sage-devel] Quitting ignored worksheet vs. long computations

2007-08-09 Thread Nils Bruin
I understand the necessity to quit ignored worksheets in many cases, to save resources. However, it does kill a highly desirable behaviour that existed before: 1) start very long computation at work 2) kill browser, log out (process still running) 3) from home, connect to worksheet to check par

[sage-devel] Re: Quitting ignored worksheet vs. long computations

2007-08-10 Thread Nils Bruin
> [...] Would the following work for you? [...] >[Save] [Save & Close] [ Close & Leave Running ] [Discard Changes] Since you ask explicitly, yes that would work. The magical behaviour before was really surprisingly friendly, but rather unpredictable in resource usage. Keep in mind that it i

[sage-devel] Error in determinant (serious!)

2007-08-27 Thread Nils Bruin
Probably something for upstream. Serious error in determinant of an integer matrix. Sometimes, 0 is returned for a full rank matrix. This is accompanied by some printed error warning, but no exception is raised. A bug has been filed: http://sagetrac.org/sage_trac/ticket/498 but given that this act

[sage-devel] Re: Algebraic number theory timings: Part I

2007-09-05 Thread Nils Bruin
Congratulations on your result. This is a very useful project and I am sure that nearly all computational number theorists will be very interested in the outcomes. If you do it properly, you could even considering submitting it to ANTS (it's not really mathematics, because the objects of study are

[sage-devel] Possible SAGE days themes

2007-09-05 Thread Nils Bruin
thanks to its open architecture, SAGE would be by far the most suited. Anyway, if you have any ideas, either on a vis/coll theme or on some alternative theme, I would be happy to hear from you, either on this list or via off-list via email if more appropriate. Kind regards,

[sage-devel] Re: Algebraic Number Theory Timings : Part 1 - Take 2

2007-09-06 Thread Nils Bruin
I would be very disappointed if this approach would be taken. Sure, it has to be straightforward and convenient to choose the level of rigour desired in class group computations, but by default results should be unconditional. It would be a real shame if SAGE, which tries to up the level of trustw

[sage-devel] let sage call the editor for you

2007-10-03 Thread Nils Bruin
A small enhancement that may be useful for people: since sage known about source file and line number of nearly any piece of code in sage, why not let sage open an editor window for you? Currently only works from the command line: http://sagetrac.org/sage_trac/ticket/768 Please try it out and i

[sage-devel] Re: multivariate polynomial coefficients

2007-10-12 Thread Nils Bruin
Both the poly.coefficients({x:1,y:2}) and poly.coefficients(x=1,y=2) seem confusing to me (the latter one downright scary. Exponents and variable names have no business being on opposite sides of an equality sign). In mathematical terms, what you want to do is view the polynomial ring k[x,y,z] as

[sage-devel] Re: multivariate polynomial coefficients

2007-10-12 Thread Nils Bruin
On Oct 12, 1:25 pm, "Joel B. Mohler" <[EMAIL PROTECTED]> wrote: [...] > Suppose I had a poly ring with 19 variables and one of them was named "y". > How would I get the coefficient for y^0 in your syntax? (That is, the > constant term in k[y][...].) This is the sticking point in what is curren

[sage-devel] Re: sage -upgrade and file corruption

2007-10-22 Thread Nils Bruin
I think you can easily make tar-archives that contain a checksum, if you agree on some extremely mild file naming convention for such a checksum (i.e., the archive is not allowed to contain a filename that clashes with the file that stores the checksum). Of course, the key is that when you add som

[sage-devel] edit_module patch updated

2007-10-22 Thread Nils Bruin
See: http://sagetrac.org/sage_trac/ticket/768 I have updated the attached patch to be clean against 2.8.8.1. When I checked the edit() command in sage 2.8.8.1, I realized it was really broken -- It doesn't work if EDITOR is unset in the environment. The patch attached to the trac ticket is suppo

[sage-devel] Re: edit_module patch updated

2007-10-24 Thread Nils Bruin
ditor templates": emacs-fg and emacs-bg. On Oct 23, 11:03 pm, "William Stein" <[EMAIL PROTECTED]> wrote: > On 10/22/07, Nils Bruin <[EMAIL PROTECTED]> wrote: > > > See: > > >http://sagetrac.org/sage_trac/ticket/768 > > > I have updated the att

[sage-devel] Re: edit_module patch updated

2007-10-24 Thread Nils Bruin
o do. However, as you describe, it seems too difficult to do so, so I'm happy putting it back. On Oct 24, 9:50 am, "William Stein" <[EMAIL PROTECTED]> wrote: > On 10/24/07, Nils Bruin <[EMAIL PROTECTED]> wrote: > > > I understand that the "bg=" hack

[sage-devel] Re: Specifying variable names

2006-10-29 Thread Nils Bruin
> One possibility, which I haven't quite thought through, is to allow the > user to get away with: > > R=PolynomialRing(ZZ) > In principle, the only reason why one *has* to give the indeterminates a name, is to make sure that polynomials can print in a sensible way. However, in the absence of vari

[sage-devel] Possibility for a PIMS Sage days

2006-12-01 Thread Nils Bruin
Since both SFU and UW are PIMS participants, there is a very good case to be made for a PIMS funded Sage Days at SFU. We should write a 1 page proposal: - Emphasize UW/SFU link (collaboration between different PIMS sites!) - Come up with other sources of funding. That way PIMS can match rather

[sage-devel] ECL as a library

2009-08-20 Thread Nils Bruin
A little experiment to see if ECL can be used as a library from python, and after browsing through ECL's API, it looks like it should be fairly straightforward to wrap the API with cython. The data format that ECL uses for its objects should also be easy to interface with, and since many of the at

[sage-devel] Re: ECL as a library

2009-08-20 Thread Nils Bruin
On Aug 20, 2:09 pm, Juanjo wrote: > >  - If one keeps pointers to ECL objects outside of ECL's management > > (i.e., a cl_object pointer in a cython object), one needs to tell > > ECL's garbage collector about it. I don't know how. > > extern ECL_API void ecl_register_root(cl_object *p); > > But

[sage-devel] Re: ECL as a library

2009-08-21 Thread Nils Bruin
On Aug 21, 2:27 am, Juanjo wrote: > [...] ecl_register_root is only scarcely > used, and only for static variables. If you keep references to objects > in the C stack, this will not be needed (as far as the garbage > collector knows your thread) Thank you very much. Keeping an array of pointers

[sage-devel] Re: ECL as a library

2009-08-21 Thread Nils Bruin
Maxima can indeed be coerced into behaving like a library in ECL. The changes required are relatively small and it would be easy to incorporate them into the current spkg. I haven't bothered, since other people are already working on a new maxima. Details posted on: http://trac.sagemath.org/sage_

[sage-devel] Re: ECL as a library

2009-08-22 Thread Nils Bruin
On Aug 22, 2:23 am, Juanjo wrote: > A C function can be used to deactivate trapping of signals Thanks! that is probably a more elegant way. I found the POSIX "sigaction" which allows signal handlers to be read and set. Bracing cl_boot between an appropriate amount of those seems to do the trick

[sage-devel] Re: ECL as a library

2009-08-23 Thread Nils Bruin
On Aug 22, 2:16 pm, William Stein wrote: > Nils -- why don't you build everything in your (presumed) account on > sage.math.washington.edu?  Then you can easily given Juanjo access to that, > since he also has an account on sage.math.washington.edu. Done. The following is now available on sage.

[sage-devel] Using MPIR or GMP with multiple memory managers

2009-08-23 Thread Nils Bruin
The following problem came up while trying to use ecl as a library inside sage: Both sage and ecl use GMP for their multi-precision arithmetic, and both call mp_set_memory_functions to register their memory managers. This obviously doesn't work, since GMP only keeps track of one set of memory man

[sage-devel] Re: ECL as a library

2009-08-23 Thread Nils Bruin
On Aug 23, 3:43 am, Juanjo wrote: > > Concerning signals: > ECL does not need to be notified of signals. The important thing is > that Sage's code does not interrupt ECL's code at arbitrary places and > then transfers control out of them. > > For instance, interrupts during memory allocation are

[sage-devel] Re: Using MPIR or GMP with multiple memory managers

2009-08-23 Thread Nils Bruin
On Aug 23, 4:08 pm, Martin Albrecht wrote: > > > Both sage and ecl use GMP for their multi-precision arithmetic, and > > > both call mp_set_memory_functions to register their memory managers. > > > This obviously doesn't work, since GMP only keeps track of one set of > > > memory management routi

[sage-devel] Re: Using MPIR or GMP with multiple memory managers

2009-08-23 Thread Nils Bruin
On Aug 23, 1:58 pm, William Stein wrote: > To whet our appetite though, might you do some benchmarks that compare > the speed of adding 2+2 via the library and via pexpect? OK, here's a little experiment. I thought adding 2 and 2 would be too hard for now, so I stuck with 1+2. Good news is that

[sage-devel] Re: Using MPIR or GMP with multiple memory managers

2009-08-23 Thread Nils Bruin
On Aug 23, 8:15 pm, William Stein wrote: > On sage.math (Linux) I get the same timing as you: That's good, because that's where I did it. A sage with the ecl library interface is available in "/scratch/nbruin/ sage-4.1.1-ecl-x86_64-Linux" so if you want to do timings for yourself, you can. Th

[sage-devel] Re: Using MPIR or GMP with multiple memory managers

2009-08-24 Thread Nils Bruin
On Aug 24, 7:55 am, Robert Dodier wrote: > The #$ macro constructs a string input stream and eventually > calls ADD-LINEINFO so it suffers from the bug I mentioned in > a previous message. The $NOLABELS variable seems to live in local scope somewhere, and hence setting it does not affect the det

[sage-devel] Re: spkg trouble

2009-08-24 Thread Nils Bruin
On Aug 24, 1:21 pm, "Dr. David Kirkby" wrote: > I can see from the processes being created that something is calling > 'top -b -n' thousands of times. Had Sage been distributed as a big > tar.bz2  file, I could extract that, and then use a recursive grep to > find 'top -b -n'. Why don't you tak

[sage-devel] Re: Using MPIR or GMP with multiple memory managers

2009-08-24 Thread Nils Bruin
On Aug 24, 2:44 pm, Bill Hart wrote: > void > mp_set_memory_functions (void *(*alloc_func) (size_t), >                          void *(*realloc_func) (void *, size_t, size_t), >                          void (*free_func) (void *, size_t)) > { >   if (alloc_func == 0) >     alloc_func = __gmp_def

[sage-devel] Re: Using MPIR or GMP with multiple memory managers

2009-08-24 Thread Nils Bruin
On Aug 24, 4:51 pm, Jason Moxham wrote: > To me 1) sounds like the best option, if ecl links with it own static version > of gmp , then as long as we aren't leaking any symbols everything should just > work . We are leaking some symbols though , some by accident , and some on > purpose for testi

[sage-devel] Re: Using MPIR or GMP with multiple memory managers

2009-08-24 Thread Nils Bruin
On Aug 24, 5:02 pm, Jason Moxham wrote: > nlimbs(a+b)<=max(nlimbs(a),nlimbs(b))+1 > nlimbs(a*b)<=nlimbs(a)+nlimbs(b) > > but this is for the answer only , it doesn't include any temp space needed to > perform the calculation eg we multiply by FFT and need approx 6x the space > above. The temp sp

[sage-devel] Re: Using MPIR or GMP with multiple memory managers

2009-08-24 Thread Nils Bruin
On Aug 24, 9:02 pm, Robert Bradshaw wrote: > I think you can do > > -Wl,-Bstatic  -lgmp > > at the end. Wonderful, yes that makes the linker look for libgmp.a rather than ligmp.so. However, the libgmp.a that mpir builds yields the "recompile with -fPIC" complaint in this situation. I guess for

[sage-devel] Re: Using MPIR or GMP with multiple memory managers

2009-08-25 Thread Nils Bruin
On Aug 24, 11:41 pm, Robert Bradshaw wrote: > I think you can still get an -fPIC libgmp.a directly from the same .o   > files that the libgmp.so uses. Have you tried just adding that flag   > to mpir's make file? yes. You should look at their makefile. The following commands get executed when I

[sage-devel] Re: Using MPIR or GMP with multiple memory managers

2009-08-25 Thread Nils Bruin
On Aug 25, 12:21 am, Nils Bruin wrote: > On Aug 24, 11:41 pm, Robert Bradshaw > wrote: > > > I think you can still get an -fPIC libgmp.a directly from the same .o   > > files that the libgmp.so uses. Have you tried just adding that flag   > > to mpir's make file?

[sage-devel] Re: Using MPIR or GMP with multiple memory managers

2009-08-25 Thread Nils Bruin
On Aug 25, 8:15 am, Bill Hart wrote: > I think by "this capability" I mean the capability GMP/MPIR has of > allowing user code to supply a memory manager. > > I mean, if that is global, doesn't it imply that user code can spy on > the memory of other user code, say when it comes up for realloc? >

[sage-devel] Re: Using MPIR or GMP with multiple memory managers

2009-08-25 Thread Nils Bruin
On Aug 25, 3:41 am, Jason Moxham wrote: > can you post me a list , there may be also mpn_* mpf_* __gmp_*  etc , I think > we will have to find ALL of them . The experiment I did indicates that the libecl.so I created did *not* have the property that I wanted: 1) sage is using gmp.so and is lin

[sage-devel] Re: Using MPIR or GMP with multiple memory managers

2009-08-25 Thread Nils Bruin
On Aug 25, 10:33 am, Martin Albrecht wrote: > Excuse my ignorance, I am sure this was answered a long time ago but I can't > find it right now: why don't you just steal the memory manager back from GMP, > i.e. why does ECL require the GMP memory manager to use its garbage collected > memory? Yes

[sage-devel] Re: Using MPIR or GMP with multiple memory managers

2009-08-25 Thread Nils Bruin
On Aug 25, 12:59 pm, Jason Moxham wrote: > GMP will still need to allocate memory for internal needs using its > allocator,   > but it is freed again . If the destination operand has enough memory for the > largest possible output +1 then this should be enough , although I dont know > if we can

[sage-devel] Re: Applying a patch to a clone

2009-08-26 Thread Nils Bruin
On Aug 26, 2:53 pm, John Cremona wrote: > Interesting -- can you supply more details (and or a reference)? > > I have used hg_sage.apply() many times;  how does import_patch() differ? > I can. And so can you :-) sage: hg_sage.apply? Type: instancemethod Base Class: String Form:

[sage-devel] Re: Using MPIR or GMP with multiple memory managers

2009-08-26 Thread Nils Bruin
On Aug 26, 5:19 pm, Jason Moxham wrote: > I think you mean you allready know the size that is big enough to hold the > answer , which is not the same as what GMP needs to allocate to calculate the > answer. For example to multiply two ints of 2000 limbs and 3000limbs , the > result may fit in 499

  1   2   3   4   5   6   7   8   9   10   >