[sage-devel] Re: plotting cube root function
I jumped over from the sage-support group, where I had posted a question about graphing x^(1/3). Alex Ghitza's response to me made more sense when I read the background discussion here. I am experiencing the same inconsistency revealed in the latter part of this discussion. I am also running Sage locally on a MacOS X PPC G4 machine, and it graphs plot(x^(1/2)) just as I expected. I was stumped when I uploaded my worksheet to sagenb.org, and got the same error message for the square root function, which I thought was restricted in some way to cube roots. (I'm a novice.) Ditto on the inconsistency of plotting log(x) and math.sqrt(float(-1)) -- which produces nan on my machine, and an error message on sagenb.org. I thoroughly agree with kcrisman's reasoning that a implied real range is a feature, not a bug, for plotting. Andy On Feb 21, 7:03 am, kcrisman <[EMAIL PROTECTED]> wrote: > Sorry I never attached the graphic - it's on my desktop, but the > Google Groups help leads me to believe someone has turned off file > posting on this group (on sage-support it seems to still be available, > though, given recent posts). > > > > > OK, now I'm curious. I still get errors (with 2.10.1 and with > > 2.10.2.alpha0), as do a couple of people I asked to test this on IRC. > > > What OS/architecture are you using? > > Mac OSX.4, PowerPC G4 > > > Do you get different results than this: > > sage: import math > > sage: math.sqrt(float(-1)) > > --- > > Traceback (most recent call > > last) > > > /home/cwitty/sage/ in () > > > : math domain error > > Yes, I do! > > sage: import math > sage: math.sqrt(float(-1)) > nan > > My computer's native Python installation also provides: > > Python 2.3.5 (#1, Mar 20 2005, 20:38:20) > [GCC 3.3 20030304 (Apple Computer, Inc. build 1809)] on darwin > Type "help", "copyright", "credits" or "license" for more information.>>> > import math > >>> math.sqrt(float(-1)) > > nan > > So presumably plot is somehow using this. Personally, I think this is > a feature, not a bug - if one specifies an implied real range for a > function, non-real outputs should just be ignored, which should avoid > the messing up of internal calculations that having a "real" method or > something would imply. For instance, on the same computer, the > following plots something nice and without complex branches or > something weird like that: > > sage: show(plot(log(x),-5,5)) > > While looking into this I discovered: > > sage: log(0) > --- > > [lots of stuff] > : error evaluating "log(0)": > Error executing code in Maxima > CODE: > log(0); > Maxima ERROR: > log(0) has been generated. > > Presumably log(0) should provide a more helpful (and much shorter) > error message. And what does this phrase, "log(0) has been > generated," mean? > > - kcrisman --~--~-~--~~~---~--~~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-devel] Re: Polynomial Factoring Content Problem
By the way, last October I made a patch for NTL which makes NTL's factoring significantly faster than even MAGMA's in some cases. I think that the degree flags < 30 and > 300 for NTL's factoring (provided my patch went in) needs to be revisited anyway. On Oct 1, 8:37 am, Robert Bradshaw wrote: > On Sep 30, 2009, at 8:25 PM, William Stein wrote: > > > > > > > On Wed, Sep 30, 2009 at 7:13 PM, Marshall Hampton > > wrote: > > >> Wow, that's quite disturbing. Did you make a trac ticket for this? > > > I've made this: > > >http://trac.sagemath.org/sage_trac/ticket/7088 > > > and made it a 4.1.2 blocker, since it a serious bug. The problem is > > in the _factor_pari method in Sage. It's almost certainly a bug in > > Sage's wrapper of Pari for factoring in the non-monic case. The > > solution will be either to fix that (good) or use the ntl wrapper > > (wimpy). > > Wow, it looks like this bug has been around since the very first > checkin. I posted a patch. > > - Robert --~--~-~--~~~---~--~~ 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] Ideas about improving sage desktop app
Hello I'm interested in improving the sage desktop app, in general. I'm thinking about a creating front end that feels similar to Mathematica. This can be accomplished with a webkit based application. This approach can completely eliminate the need for a web server, and allow python direct access to the html DOM, and is cross platform, and yet looks and feels native on each platform, with little work. HTML 5 included some very useful elements such as the canvas tag, and I see it as the perfect way of generating interactive live documents. Basically, the all of the UI would be displayed with HTML / DOM, and each UI event would directly call python functions. Essentially, have a
[sage-devel] Re: Ideas about improving sage desktop app
The webserver backend is unquestionably useful: users can try sage without installing anything. I see a new new front end as just another module of a large system. Users can choose either a native app front end, or use a remote web server. I'm really not sure how long developing a native front end would take. I do have my own projects to work on (I'm a grad student in Physics / Cognitive Science joint PhD), so I have some time, but not a tremendous amount. Depending on which route I take (developing straight python bindings to DOM, or use a middle layer like Appcelerator), but all total, probably 6mos - 1yr. In any case, the code to do this would be WAY simpler then the webserver -> jscript/ html -> view -> events -> back to server code. In any case, my main reason for wanting to develop something like this, is I've been using Mathematica for over a decade, and I think it is almost perfect except for one fundamental issue: namely Mathematica is proprietary. So, I think the world needs an open source alternative to Mathematica, and Sage, combined with a native front end would be the trick. On Jan 8, 1:03 pm, Robert Bradshaw wrote: > On Jan 8, 2010, at 9:32 AM, Andy Somogyi wrote: > > > Hello > > > I'm interested in improving the sage desktop app, in general. > > > I'm thinking about a creating front end that feels similar to > > Mathematica. This can be accomplished with a webkit based > > application. This approach can completely eliminate the need for a > > web server, and allow python direct access to the html DOM, and is > > cross platform, and yet looks and feels native on each platform, > > with little work. > > I actually think having a web server is an advantage, because then one > doesn't have to have a local installation to use it. (Sage ships with > its own web server, so it doesn't require one beforehand.) > > > > > > > HTML 5 included some very useful elements such as the canvas tag, > > and I see it as the perfect way of generating interactive live > > documents. Basically, the all of the UI would be displayed with > > HTML / DOM, and each UI event would directly call python functions. > > Essentially, have a
Re: [sage-devel] Re: Ideas about improving sage desktop app
Thats sort of what I was originally thinking for a first go, but I'm not sure how useful it would be in the long term. What would be pretty quick is to create an app, main view would be a text editor, say use the editor component from smultron, and extend it so you could have mplotlib widgets (mplotlib, with a pdf backend) in the editor. This approach would be a lot quicker than adding a python empowered DOM to webkit, but would not give anywhere near the functionality, and much of the code would be Mac specific (no problem for me, but not everyone is a Mac user). 3D plots could be handled with google's O3D. Even though O3D is intended as a WebKit plugin, the way it creates language bindings is a bit different (and a lot cleaner) then webkit: O3D has set of idl files that are processed by a set of python scripts to generate language bindings. These scripts are very different then the perl scripts for webkit, and a lot easier to hack. So, its possible to create a python enabled O3D component, and also host this in the editor view. With either route, all the graph drawing code would be python, and would not matter much if the O3D canvas is hosted in WebKit, or an editor view. On Jan 8, 2010, at 2:56 PM, kcrisman wrote: > >>> to Mathematica, and Sage, combined with a native front end would be >>> the trick. >> >> I think you should try. If you can do it, and it works well, and is >> maintainable, then we all win. If the project doesn't work out, >> what's the worst than can happen? You will learn a lot anyways, and >> somebody else can pick up your code later.So go for it! >> > > An interesting more tractable (not for me, sadly) first step would be > to use Interface Builder (on Mac) to embed the Terminal and notebook > more "natively", and/or create a native front end beyond the current > app bundle. This has been done for other programs, for instance there > is (was?) one for Macaulay 2. Though of course it wouldn't > necessarily lead to any usable code for the larger project - just a > thought. > > - 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 -- 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: Ideas about improving sage desktop app
for 2-D plots and graphs, but we lack a >> viewer for 3-D plots, because QtWebKit does not support Java applets, >> so JMol is not embeddable. > > I've had pretty good luck with Mayavi2. It gets tricky sometimes > because not everything works with PyQt yet. Enthought is headed > towards Qt but some things are really still Wx. Then there's the > whole PyQt going away in favor of PySide one of these days so much of > the Qt-Python world is unsettled and not as much progress is made as > folks watch and see. > > OTOH, having VTK integrated more closely with Sage would be great for > many things. VTK is truly amazing code but kinda intense to deal > with. The Mayavi TvTk wrappers make it much more manageable but is in > various stages of completeness. It relies heavily on Traits which I'm > not fully up to speed on yet. > >> >> And of course, any help is needed :) We could build a good replacement >> for propietary mathematical programs > > Exactly. I'll take a look at your code. > >> >> On 9 ene, 08:48, ghtdak wrote: >> >> >> >>> On Jan 8, 1:01 pm, Andy Somogyi wrote: >> >>>> Thats sort of what I was originally thinking for a first go, but I'm not >>>> sure how >>>> useful it would be in the long term. What would be pretty quick is to >>>> create an app, main view >>>> would be a text editor, say use the editor component from smultron, and >>>> extend it so you could have >>>> mplotlib widgets (mplotlib, with a pdf backend) in the editor. >> >>>> This approach would be a lot quicker than adding a python empowered DOM to >>>> webkit, but would not give >>>> anywhere near the functionality, and much of the code would be Mac >>>> specific (no problem for me, but >>>> not everyone is a Mac user). >> >>>> 3D plots could be handled with google's O3D. Even though O3D is intended >>>> as a WebKit plugin, the way it >>>> creates language bindings is a bit different (and a lot cleaner) then >>>> webkit: O3D has set of idl files >>>> that are processed by a set of python scripts to generate language >>>> bindings. These scripts are very >>>> different then the perl scripts for webkit, and a lot easier to hack. So, >>>> its possible to create a >>>> python enabled O3D component, and also host this in the editor view. >> >>>> With either route, all the graph drawing code would be python, and would >>>> not matter much if the >>>> O3D canvas is hosted in WebKit, or an editor view. >> >>> One approach to a desktop application which might be "relatively" >>> simple and cross-platform is to use the Qt stuff. In particular, >>> using QtWebKit as a component in a window will give you, pretty much, >>> a full browser which you can get at with C++ code. With the right >>> twiddling, you could use PyQt to grab matplotlib graphics for >>> display. QtWebKit should support JMol and for hard core 3D I would >>> just go full out and nail up Mayavi2. Having the notebook in a window >>> gives you the full notebook editing for free while you build up >>> whatever other editing might be better for a native app. >> >>> The tricky bit, as usual, is the event loop. Ideally, the application >>> would have access to all the data in a single process. It could >>> support the web stuff and whatever display code which works best >>> native. Building a 3D capability across the wire to replace JMol >>> would be work. I think Mayavi2 is a really significant capability >>> which works great with sage currently and might be a better approach >>> than O3D but I'm not really familiar with that capability. >> >>> What I currently do, and its a bit of a kludge, is run ipython with >>> the -q4thread event loop. I have C++ Qt windows for my custom gui >>> requirements (invoked through some Cython bridge code), matplotlib >>> through PyQt and Mayavi2. I don't currently use the notebook in those >>> processes because of my use case but twisted is already built into >>> ipython for their parallel computing capability. I've had trouble >>> figuring it out and its sort of a work in progress but the essential >>> capabilities are there. >> >>> Either way, Qt is a great base because of its web components and its >>> cross-platform architecture. While there are some tricky bits to >>&g
Re: [sage-devel] Re: Ideas about improving sage desktop app
(at least with KDE). >> >> So, in summary, what I'm thinking is a WebKit based application which >> provides incredibly powerful and interactive layout 2D and 3D drawing, and >> is 100% pure python, with a bit of DOM <-> Python glue. No need to bring in >> QT, GTK, Windows, Cocoa, or any other toolkit that is tied to a platform, >> because WebKit is native on all platforms. >> >> >> >> >> On Jan 9, 2010, at 10:50 PM, ghtdak wrote: >> >>> >>> >>> On Jan 9, 2:20 am, Alejandro Serrano wrote: >>>> Hi, >>>> I'm currently developing something very similar as the thing you are >>>> proposing. I sent it to the list about two months ago >>>> (http://groups.google.com/group/sage-devel/browse_thread/thread/53b3d6... >>>> ). It basically runs one Sage session per thread and uses QtWebKit to >>>> communicate with it. The part that emulates the worksheet is working >>>> very well. The project is currently in Sourceforge >>>> (http://sourceforge.net/project/screenshots.php?group_id=287015). >>>> It is coded using Python, and PyQt. t's architecture is based on plug- >>>> ins, so any person can add viewers (parts that tell how to show Sage >>>> objects). Now we have viewers for 2-D plots and graphs, but we lack a >>>> viewer for 3-D plots, because QtWebKit does not support Java applets, >>>> so JMol is not embeddable. >>> >>> I've had pretty good luck with Mayavi2. It gets tricky sometimes >>> because not everything works with PyQt yet. Enthought is headed >>> towards Qt but some things are really still Wx. Then there's the >>> whole PyQt going away in favor of PySide one of these days so much of >>> the Qt-Python world is unsettled and not as much progress is made as >>> folks watch and see. >>> >>> OTOH, having VTK integrated more closely with Sage would be great for >>> many things. VTK is truly amazing code but kinda intense to deal >>> with. The Mayavi TvTk wrappers make it much more manageable but is in >>> various stages of completeness. It relies heavily on Traits which I'm >>> not fully up to speed on yet. >>> >>>> >>>> And of course, any help is needed :) We could build a good replacement >>>> for propietary mathematical programs >>> >>> Exactly. I'll take a look at your code. >>> >>>> >>>> On 9 ene, 08:48, ghtdak wrote: >>>> >>>> >>>> >>>>> On Jan 8, 1:01 pm, Andy Somogyi wrote: >>>> >>>>>> Thats sort of what I was originally thinking for a first go, but I'm not >>>>>> sure how >>>>>> useful it would be in the long term. What would be pretty quick is to >>>>>> create an app, main view >>>>>> would be a text editor, say use the editor component from smultron, and >>>>>> extend it so you could have >>>>>> mplotlib widgets (mplotlib, with a pdf backend) in the editor. >>>> >>>>>> This approach would be a lot quicker than adding a python empowered DOM >>>>>> to webkit, but would not give >>>>>> anywhere near the functionality, and much of the code would be Mac >>>>>> specific (no problem for me, but >>>>>> not everyone is a Mac user). >>>> >>>>>> 3D plots could be handled with google's O3D. Even though O3D is intended >>>>>> as a WebKit plugin, the way it >>>>>> creates language bindings is a bit different (and a lot cleaner) then >>>>>> webkit: O3D has set of idl files >>>>>> that are processed by a set of python scripts to generate language >>>>>> bindings. These scripts are very >>>>>> different then the perl scripts for webkit, and a lot easier to hack. >>>>>> So, its possible to create a >>>>>> python enabled O3D component, and also host this in the editor view. >>>> >>>>>> With either route, all the graph drawing code would be python, and would >>>>>> not matter much if the >>>>>> O3D canvas is hosted in WebKit, or an editor view. >>>> >>>>> One approach to a desktop application which might be "relatively" >>>>> simple and cross-platform is to use the Qt stuff. In particular, >>
[sage-devel] Sage Web Service / UI
Hi All This was originally a discussion of how to make Sage a better desktop app. Well, my two big annoyances about how Sages works today, as a pure web page are: 1: Inconvenient: its really annoying to have to start the sage process, then have another browser windows pointed at it. 2: This is the big one: No Publication Quality Output - by this I mean that the sage web server process uses matplotlib to produce raster images which are then displayed in the html, and for publication, I need vector plots i.e. pdf. I suppose it would be a big duplication of effort to write a python UI, as none of the code could be shared with the pure web page version, plus it would be a lot of work (probably wasted) to create a python binding to webkit. So, I agree, its best to keep the UI as Javascript. I think I have a way to dramatically improve the current web UI, that will result in publication quality output, and most likely simplify things a lot. Create a Sage Web Service, and have all data passed back and forth be in the form of 'expressions' which would be encoded as xml. This is really really similar to how the Mathamatica notebook communicates with the Mathematica kernel, though the 'MathLink' API. Now, HTML 5 combined with the new 3D canvas that is in the nightly builds of WebKit (I think Firefox supports this 3D canvas also) can render perfectly everything that Sage needs to render. By expression, I mean that the client would call, something like "plot()", this would return probably an set of SVG data, and the client javascript would just add this draw this inline via DHTML. Similarly for 3D plot data, the server would return a set of 3D polygon vertices, and the client javascript would just add these to a 3D canvas tag. The really nice thing about drawing in the client via SVG is that the client can export / save it as PDF! This web service approach I think would be a LOT simpler then the previous approaches, and would be probably 99.9% identical code between the desktop and the web server versions. So, what needs to be done for something like this: 1: come up with the web service API, I say just model it after Mathematica's MathLink. Expressions would just be encoded in XML. 2: set up mplotlib to produce SVG instead of raster images. 3: do the same for the 3D code, to just return an xml encoded polygon data. 4: code the web service. 5: code the HTML / Javascript front end to call the web service. Improving the desktop app version then becomes almost trivial - create a set of simple apps that just host a WebKit widget, package up sage into a directory, along with the html / javascript files for the UI, the app would then just fork a process to start the sage webservice, and viola, or even connect to a remote sage web service. On Jan 15, 2010, at 12:48 PM, William Stein wrote: > On Fri, Jan 15, 2010 at 9:42 AM, Robert Bradshaw > wrote: >> >> On Jan 15, 2010, at 7:25 AM, Andy Somogyi wrote: >> >>> I think javascript is actually a pretty nice language. It has some really >>> nice functional features, is resembles Scheme in certain ways. The only >>> problem I have with javascript is that it is not the same language as sage >>> (python). If sage were written in Javascript, then of course it would be >>> natural to write the UI in Javascript. >>> >>> BTW, A patch was just submitted to WebKit that enables MathML rendering! >>> This means that a front end could have all the mathematical typesetting and >>> layout that Mathematica has! >>> >>> But back to the question, is it better to write the UI in Javascript which >>> implies that there needs to be a Python <-> Javascript glue layer (not too >>> big of deal, just develop some glue that does dynamic binding, or use remote >>> invocation), OR write the UI directly in Python which implies a bit of >>> WebKit <-> Python glue? The WebKit <-> Python glue is again not too big of a >>> deal, it already exists in Appcelerator Desktop (Again, Apache license), I'm >>> not sure how efficient it is as I've never used it. Or, have native bindings >>> to WebKit (generated via the WebKit idl files). >>> >>> Personally, I like the single language approach (all Python), makes things >>> SO MUCH simpler. >>> >>> Any thoughts? >> >> >> The advantage of the Python <-> Javascript glue layer is that you can share >> more code with the existing notebook. Otherwise, whenever you're >> implementing something the notebook already has, that's duplication of >> effort (and future maintenance), and when you're implementing something the >> notebook doesn't have, it won&
Re: [sage-devel] Sage Web Service / UI
> > Just a quick clarification. > > 1. Are you planning to do the above and you just want feedback, or > > 2. Do you want somebody else to do the above, and you're just > suggesting it as a possible project? > > William Mostly feedback, but if others think this is a good idea, then starting a possible project. I can implement all the above, but unfortunately while I do have some time, I do not have a huge amount to devote. -- 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 Web Service / UI
I'm putting together a quick and dirty app, that basically consists of a form which holds a WebKit widget, and the main process just forks, and initiates the Sage process, and hooks the WebKit view up to it. Should be ready this weekend. Its super simple, but its a start. Its tiny, a few 100K, and completely native. It literally took ONE SINGLE line of code to hook up the webkit view to the Sage server. I'm just cleaning up up the forking a bit which is a tad more complex, but will probably be around 10 - 20 lines or so. Then, the entire sage directory can just be copied into the .app directory, and will look and feel and run like a standard app. Also, there is NO ADDITIONAL DEPENDENCIES, WebKit is a library that is standard on OSX, and any Linux distro that has KDE. Safari is just a simple app that hosts the WebKit widget. FYI, how Mac applications are structured is each application is a special directory, which ends in .app. This directory contains the executable, icons, property lists, configuration, and whatever else the developer wants to shove in it (like the whole sage distribution). This way, the whole directory just looks like a single app to the end user. I don't do Windows (anymore), but I'm sure someone out there is a C# person who could whip up a Windows equivalent in a few hours, i.e. take the WebKit or Firefox ActiveX control, and drop it on a form, hook up the process bits, and package it up into a directory. The other HUGE thing that HTML5 gives is interactivity, so its fully capable of having the same kind of interactivity that Mathematica 6+ has with the 'Manipulate' function. On Jan 29, 2010, at 7:58 AM, Ivan Andrus wrote: > On Jan 29, 2010, at 12:21 AM, Jason Grout wrote: > >> Andy Somogyi wrote: >>> Hi All >>> This was originally a discussion of how to make Sage a better desktop app. >> >> I've wondered what the possibility was of making a Firefox extension that >> customized firefox to be an all-in-one Sage app. I think Firefox extensions >> can modify the "chrome" of the browser, at least if they are given the >> appropriate permissions to do so. > > It should be possible. Last time I looked at Prism (probably almost 2 years > ago) I couldn't even figure out how to build it, though to be honest I didn't > try very hard since I don't really like Firefox. With a little hacking on a > prebuilt version (replacing the binary with a script which called the > original binary) I was able to get something that sort of worked (i.e. it > started up the sage -notebook in the background). > > -Ivan > > http://prism.mozilla.com/ > > -- > 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
[sage-devel] Prototype Sage Desktop App
Hello All Here is a link to a prototype sage desktop app for the Mac. http://numerator.sourceforge.net/SageApp.dmg Its 100% native, Cocoa model / view application. On startup, it creates a background process with the sage notebook server, and users can open as many windows as they want to it. It also has a console where it dumps the output of the sage process. As it is a native app, the download is about 100K in size. Its universal binary, I've tested it on Snow Leopard - core 2 duo, and Leopard - G4. Will not work with Tiger. Each window is just hosts a WebKit widget. The first time it is run, it will ask the user for the location of the sage runtime, this will typically be: /Application/sage/sage, this needs to be the actual sage executable script, you can set this with a file chooser dialog. If you want to change it in the future, it is stored in the standard defaults file of USERNAME/Library/Preferences/org.sagemath.Sage.App.plist The sage process takes about 5 - 10 seconds to start, when it starts, the first window will be told to open the localhost:8000 url. This is a first prototype, it has little functionality currently, will probably crash, almost certainly has numerous memory leaks, and is FAR, FAR, FAR from complete, but it is a START. Note, I am very happy to maintain and update this for the long term. Eventually, I want to have something that behaves similarly to the Mathematica desktop, and I think this is certainly possible with a Javascript/HTML5 based UI hosted in a set of WebKit views, and wrapped in a nice Cocoa app. The backed end / server is 100% cross platform, the client fits in nicely with the native desktop. It would be fairly simple for Windows person to come up with a Windows type app like this, and same for Linux / GTK person. So, try it out, let me know what features you would like to see. Where would be a good place to store the source code to this? -- 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] Prototype Sage Desktop App
On Feb 2, 2010, at 2:31 PM, Ivan Andrus wrote: > On Jan 31, 2010, at 10:29 PM, Andy Somogyi wrote: > >> Hello All >> >> Here is a link to a prototype sage desktop app for the Mac. >> >> http://numerator.sourceforge.net/SageApp.dmg >> >> This is a first prototype, it has little functionality currently, will >> probably crash, almost certainly has numerous memory leaks, and is FAR, FAR, >> FAR from complete, but it is a START. >> >> Note, I am very happy to maintain and update this for the long term. > > Excellent. I wasn't willing to write something from scratch and maintain it > (I'm not interested in writing a web browser), which is why I tried to build > something off of Platypus and Fluidium instead. But if you are willing to > create a custom application it will almost certainly turn out better in the > long run. > >> Eventually, I want to have something that behaves similarly to the >> Mathematica desktop, and I think this is certainly possible with a >> Javascript/HTML5 based UI hosted in a set of WebKit views, and wrapped in a >> nice Cocoa app. The backed end / server is 100% cross platform, the client >> fits in nicely with the native desktop. It would be fairly simple for >> Windows person to come up with a Windows type app like this, and same for >> Linux / GTK person. >> >> So, try it out, let me know what features you would like to see. > > > To me I think one of the most important things is to have an application that > comes with the "batteries included" i.e. you just download the application, > move it wherever you want and launch it. This is not so much because I > personally want it that way, but I think we need to have as low a barrier to > playing with Sage as possible (that's why so much work is put into making it > "just build" on all supported platforms). As a mac user I am wary of long > installation instructions if I just want to try something out. Several times > I have downloaded an application, but never used it simply because it had an > installer. Getting this to work is well understood however and it should be > a cinch to switch your application for the one distributed with sage now and > just create a binary distribution. I could not agree more, if the install is complicated, people simply will not use the app. I would like app to be able to work with either a pre-existing install of sage (as it is now), and to package up cage into the .app directory, this is pretty simple, just need to a bit if initialization code to deal with the sage self configuration bits. > As for other features that I would like to see, well I could probably go on > and on: > > Tabs would be nice, as well as a location bar, so that I can surf to trac and > such. Tabs are nice to have multiple docs open, but not sure about going to outside locations. There is certainly no technical reason this can't be done, I just think it might seem a bit more app like if the app only dealt with the sage session windows, and script / functions and so forth. So, to go to trac, they would need to tab over to a browser window. But, no big deal either way. > Support for userscripts (a la greasekit) and custom css. No problem, just need to think of a nice API for custom homepage html to call back into. Its really trivial to make your code callable from an an embedded webkit html page. > Ability to reopen the console once I have closed it (and probably have it > closed by default--would need a splash screen though). Just a menu item, and I obviously need to work on the console to get scrolling / updates working correctly. > Shortcuts in the location bar so that "t problem" will search trac for > "problem" etc. Can do, just need inspect the loaded DOM and write some appropriate code. > Some method of telling you that there is an update to Sage and make updating > easy. Does not seem like a big deal, will look into it. > Opening sws and pdf files and "doing the right thing". I think it should work now if a page has swf/pdf content. I'm not sure if Safari does something above and beyond webkit to display pdf. > Editing cells and/or notebooks in an external editor. This is the next thing I'm working on. I boosted the text editor control from smultron (a great open source Cocoa text editor), so the app will be able to edit python / html code directly with full syntax and indentation. This will give the app editing capability on par with matlab, and obviously look WAY LESS UGLY than matlab. I'd like to have debugging also, but this might take a while. I need to get back to some other stuff for about a week, then I will upload the clea
[sage-devel] Development tasks
I've been using Sage on and off for a number of years, and am currently using it while re-learning the calculus I took 35+ years ago. I'm definitely the oldest in my class this time around! I'm running the current dev version under Ubuntu 17.04. I have to move to another laptop temporarily. The build on Ubuntu 17.10 is failing on openBlas. I'll make another post about that issue. I'm interested in helping out on Sage in some small way. I've had a look through the trac list for beginners, but didn't see anything that was an obvious fit for my skills. I'm a c++ developer in my day job. I have done some python development, and ran a buildbot setup for awhile. I don't have the mathematical ability to take on core issues. Something involving basic python, unit testing, documentation etc would be a good fit. I saw that there is work on supporting python 3. Is there more that needs doing on that? Maybe more doctests? Documentation? I'm looking for suggestions on where I can get started. Thanks, Andy -- 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 https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
[sage-devel] openBlas compile error
I'm running under Ubuntu 17.10, which is in a VM under under VirtualBox. OpenBlas is complaining that it can't work out the CPU type. /proc/cpuinfo shows it as: Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz I think that might have already been addressed with an update version of openBlas https://trac.sagemath.org/ticket/23272 If someone can help with git commands to pull that into to the dev branch I can give it a try. I tried installing openBlas 0.2.20 dev libs from the distribution, but it was not used in the build. Thanks, Andy -- 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 https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
Re: [sage-devel] Re: Development tasks
On 11/09/2017 05:38 PM, Kwankyu Lee wrote: > I saw that there is work on supporting python 3. Is there more that > needs doing on that? > > Desperately. Follow this: > > https://trac.sagemath.org/ticket/15530 Kyankyu Lee, Thanks. François created a trac account for me. I'm looking through the tickets and the development wiki. Andy -- 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 https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
Re: [sage-devel] Development tasks
Vincent, That sounds interesting too. Years ago I deployed a buildbot for our company, so I'm familiar with it. It has probably changed since then. I thought that buildbot could used to apply patches. Is the idea behind patchbot that it is simpler system dedicated to trying out patches at the request of developers? Thanks, Andy On 11/10/2017 02:25 AM, Vincent Delecroix wrote: > Dear Andy, > > You could also help improving the patchbot (written in pure Python) > > https://github.com/sagemath/sage-patchbot > > For example: > > * fixing some false positive > * better support for testing of optional packages > * logs should not go in SAGE_ROOT/logs/patchbot/ > > Would you be interested? > > Vincent > > On 09/11/2017 14:40, Andy Howell wrote: >> I've been using Sage on and off for a number of years, and am currently >> using it while re-learning the calculus I took 35+ years ago. I'm >> definitely the oldest in my class this time around! >> >> I'm running the current dev version under Ubuntu 17.04. I have to move to >> another laptop temporarily. The build on Ubuntu 17.10 is failing on >> openBlas. I'll make another post about that issue. >> >> I'm interested in helping out on Sage in some small way. I've had a look >> through the trac list for beginners, but didn't see anything that was an >> obvious fit for my skills. >> >> I'm a c++ developer in my day job. I have done some python >> development, and >> ran a buildbot setup for awhile. I don't have the mathematical ability to >> take on core issues. Something involving basic python, unit testing, >> documentation etc would be a good fit. >> >> I saw that there is work on supporting python 3. Is there more that needs >> doing on that? Maybe more doctests? Documentation? >> >> I'm looking for suggestions on where I can get started. >> >> Thanks, >> >> Andy > -- 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 https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
Re: [sage-devel] Re: openBlas compile error
David, I was able to build using git trac to pull in https://trac.sagemath.org/ticket/23272 That built against 81.rc0, using openBlas 0.2.20. Built fine. It was a good exercise to start figuring out git-trac and sage development. Thanks for your help, Andy On 11/15/2017 03:26 PM, David Lowry wrote: This has been a problem for a bit now. In another thread <https://groups.google.com/d/msg/sage-support/Tv68G0h8Keg/WB85DLVMBgAJ> from the summer, I noted that a common workaround is to set | exportOPENBLAS_CONFIGURE="TARGET=ATOM" | I don't quite know about how the updates to openBlas might affect this from now on, though. On Thursday, November 9, 2017 at 6:45:04 PM UTC, Andy Howell wrote: I'm running under Ubuntu 17.10, which is in a VM under under VirtualBox. OpenBlas is complaining that it can't work out the CPU type. /proc/cpuinfo shows it as: Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz I think that might have already been addressed with an update version of openBlas https://trac.sagemath.org/ticket/23272 <https://trac.sagemath.org/ticket/23272> If someone can help with git commands to pull that into to the dev branch I can give it a try. I tried installing openBlas 0.2.20 dev libs from the distribution, but it was not used in the build. Thanks, Andy -- 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 <mailto:sage-devel+unsubscr...@googlegroups.com>. To post to this group, send email to sage-devel@googlegroups.com <mailto:sage-devel@googlegroups.com>. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout. -- 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 https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
[sage-devel] color for plot3d axes
I talked about doing some development on sage a while back. There is a lot that needs doing, but I wanted some _very_ small to start off with. I was trying to plot a 3d object and was not sure which axes were which in the plot. I found plot3d axes, but that only takes one color. I modified it to take a a list or tuple of three strings. One for each axes. It also works with a single color for all three. from sage.plot.plot3d.plot3d import axes S = axes(6, 3, color=('red','blue','green')) sphinx_plot(S) Previously there was not a default for the color in the axes function. I set that to 'black'. Is that OK? Assuming this is a reasonable thing to do, it looks like the next step is to create a trac ticket for it, correct? Thanks, Andy -- 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 https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
Re: [sage-devel] Re: color for plot3d axes
Eric, I tried with threejs. I could not get the labels to show with either sage 8.0 or sage 8.2beta3. One interesting thing I did find through. I plotted a sphere, with the opacity=0.2. S = sphere(center=(0,0,0),size=2,opacity=0.2) show(S, viewer='threejs',axes=True, axes_labels=['a','b','c']) In the middle of the sphere there was a red, green and blue axis! No sign of the labels though. threejs is certainly faster than jmol. The shading is not as nice though. Lots of artifacts when rotating. There is some weird behavior if I use jmol and axes() together. I end up with two sets of axes! from sage.plot.plot3d.plot3d import axes S = sphere(center=(0,0,0),size=2,opacity=0.2) S+=axes(6, 3) show(S, axes=True, frame=True, axes_labels=['a','b','c']) The set that gets enabled with axes=True is offset. Its looks like there is much more going on that I don't understand yet. I'll take a closer look at the code. Thanks, Andy On 01/26/2018 11:50 AM, Eric Gourgoulhon wrote: > Hi, > > Le mardi 23 janvier 2018 21:58:35 UTC+1, Andy Howell a écrit : > > I was trying to plot a 3d object and was not sure which axes were > which > in the plot. > > > Just for this purpose (i.e. finding which axes are which), note that > you can use the threejs viewer, which automatically labels the axes: > > sage: from sage.plot.plot3d.plot3d import axes > sage: S = axes(6, 3) > sage: show(S, viewer='threejs') > > The default names are (x,y,z), but you can change this: > > sage: show(S, viewer='threejs', axes_labels=['a', 'b', 'c']) > > Anyway, it will be nice to have colored axes. > > Best wishes, > > Eric. > -- > 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 > <mailto:sage-devel+unsubscr...@googlegroups.com>. > To post to this group, send email to sage-devel@googlegroups.com > <mailto:sage-devel@googlegroups.com>. > Visit this group at https://groups.google.com/group/sage-devel. > For more options, visit https://groups.google.com/d/optout. -- 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 https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
Re: [sage-devel] Re: color for plot3d axes
Eric, Chromium Version 63.0.3239.132 (Official Build) Built on Ubuntu , running on Ubuntu 17.10 (64-bit) does not display the any labels or numbers on the bounding box. Firefox 58.0 works fine. I tried grabbing the latest three-min.js from threejs.org to see if that helped. No luck. I don't know javascript very well, so guess I'll use firefox for now. Thanks, Andy On 01/26/2018 03:10 PM, Eric Gourgoulhon wrote: > > > Le vendredi 26 janvier 2018 21:19:22 UTC+1, Andy Howell a écrit : > > Eric, > > I tried with threejs. I could not get the labels to show with > either sage 8.0 or sage 8.2beta3. > > > > The labels are here, but they are not placed along the blue arrows of > the S object: they are located on other sides of the bounding box (see > x=2.91, y=2.91 and z=2.91 in the attached figure) > > > One interesting thing I did find through. I plotted a sphere, with > the opacity=0.2. > > S = sphere(center=(0,0,0),size=2,opacity=0.2) > show(S, viewer='threejs',axes=True, axes_labels=['a','b','c']) > > In the middle of the sphere there was a red, green and blue axis! > > > Indeed! > > No sign of the labels though. > > > Again they are here, but not along the colored axes. > > > threejs is certainly faster than jmol. The shading is not as nice > though. Lots of artifacts when rotating. > > > That's true. > > > > There is some weird behavior if I use jmol and axes() together. I > end up with two sets of axes! > > from sage.plot.plot3d.plot3d import axes > S = sphere(center=(0,0,0),size=2,opacity=0.2) > S+=axes(6, 3) > show(S, axes=True, frame=True, axes_labels=['a','b','c']) > > The set that gets enabled with axes=True is offset. > > > There is not such issue with threejs. > > Best wishes, > > Eric. > > -- > 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 > <mailto:sage-devel+unsubscr...@googlegroups.com>. > To post to this group, send email to sage-devel@googlegroups.com > <mailto:sage-devel@googlegroups.com>. > Visit this group at https://groups.google.com/group/sage-devel. > For more options, visit https://groups.google.com/d/optout. -- 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 https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
Re: [sage-devel] SAGE 8.1 will not compile under Ubuntu 17.10: error installing giac-1.2.3.47.p0
Harald, I think you may have something else wrong with your system. I too upgraded from 17.04 to 17.10. I built 8.2beta 3 with no problems. I'm compiling beta 5 right now. I had problems under 17.04. I think I was missing the fortran compiler. After installing that, it built fine. Andy On 02/15/2018 04:16 PM, Harald Helfgott wrote: > > I typed > > export SAGE_INSTALL_GCC='yes' > > and then did "make", and got what looks like exactly the same error at > exactly the same place. Log file attached. > > Le jeudi 15 février 2018 17:01:22 UTC-5, Thierry > (sage-googlesucks@xxx) a écrit : > > Hi, > > On Fri, Feb 16, 2018 at 10:56:07AM +1300, François Bissey wrote: > > I’d say the compiler is in a broken state at the system level. > Exactly like > > what happens in sage after the mpfr upgrade. > > I think it would be best to build sage’s own gcc here. > > Which can be done by doing > > export SAGE_INSTALL_GCC='yes' > > before make. > > Ciao, > Thierry > > > > > > > On 16/02/2018, at 10:37, Harald Helfgott > wrote: > > > > > > First, here is the output of > /usr/lib/gcc/x86_64-linux-gnu/7.2.0$ ldd cc1 > > > > > > linux-vdso.so.1 => (0x7fff8af56000) > > > libisl.so.15 => /usr/lib/x86_64-linux-gnu/libisl.so.15 > (0x7fcb74113000) > > > libmpc.so.3 => /usr/lib/x86_64-linux-gnu/libmpc.so.3 > (0x7fcb73efb000) > > > libmpfr.so.4 => /usr/lib/x86_64-linux-gnu/libmpfr.so.4 > (0x7fcb73c96000) > > > libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10 > (0x7fcb73a15000) > > > libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 > (0x7fcb73811000) > > > libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 > (0x7fcb735f4000) > > > libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 > (0x7fcb7329e000) > > > libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 > (0x7fcb72ebe000) > > > /lib64/ld-linux-x86-64.so.2 (0x7fcb74499000) > > > libmpfr.so.6 => /usr/lib/x86_64-linux-gnu/libmpfr.so.6 > (0x7fcb72c3e000) > > > > > > Here is the output of the second command: > > > linux-vdso.so.1 => (0x7ffdd0f78000) > > > libisl.so.15 => /usr/lib/x86_64-linux-gnu/libisl.so.15 > (0x7f6d62321000) > > > libmpc.so.3 => /usr/lib/x86_64-linux-gnu/libmpc.so.3 > (0x7f6d62109000) > > > libmpfr.so.4 => /usr/lib/x86_64-linux-gnu/libmpfr.so.4 > (0x7f6d61ea4000) > > > libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10 > (0x7f6d61c23000) > > > libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 > (0x7f6d61a1f000) > > > libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 > (0x7f6d61802000) > > > libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 > (0x7f6d614ac000) > > > libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 > (0x7f6d610cc000) > > > /lib64/ld-linux-x86-64.so.2 (0x7f6d626a7000) > > > libmpfr.so.6 => /usr/lib/x86_64-linux-gnu/libmpfr.so.6 > (0x7f6d60e4c000) > > > > > > What to do? > > > > > > Best > > > Harald > > > > > > Le jeudi 15 février 2018 16:18:18 UTC-5, Jeroen Demeyer a écrit : > > > On 2018-02-15 21:34, Harald Helfgott wrote: > > > > What is the issue here? What can be done? > > > > > > Seems like a conflict between the mpfr/mpc libraries used by your > > > system's GCC and the libraries in Sage. > > > > > > Can you try to find the location of the "cc1" program used by > GCC. > > > Typically, this will be in a location like > > > /usr/libexec/gcc/x86_64-pc-linux-gnu/4.9.4/cc1 and then do > (adjusting > > > the paths) > > > > > > $ ldd /usr/libexec/gcc/x86_64-pc-linux-gnu/4.9.4/cc1 > > > > > > And from the Sage directory: > > > > > > $ ./sage --sh -c "ldd > /usr/libexec/gcc/x86_64-pc-linux-gnu/4.9.4/cc1" > > > > > > and post the output of both commands. > > > > > > -- > > > You received this message because you are subscribed to the &
Re: [sage-devel] SAGE 8.1 will not compile under Ubuntu 17.10: error installing giac-1.2.3.47.p0
On 02/16/2018 02:40 AM, Jeroen Demeyer wrote: > On 2018-02-15 23:59, Andy Howell wrote: >> I think you may have something else wrong with your system. I too >> upgraded from 17.04 to 17.10. I built 8.2beta 3 with no problems. I'm >> compiling beta 5 right now. > > It would be interesting to see the output of > > $ ldd /usr/lib/gcc/x86_64-linux-gnu/7.2.0/cc1 > > on your system. If libmpfr appears twice, it is really a bug in Ubuntu. > Looks OK here: ldd /usr/lib/gcc/x86_64-linux-gnu/7.2.0/cc1 linux-vdso.so.1 => (0x7fff551a7000) libisl.so.15 => /usr/lib/x86_64-linux-gnu/libisl.so.15 (0x7f92bab37000) libmpc.so.3 => /usr/lib/x86_64-linux-gnu/libmpc.so.3 (0x7f92ba91f000) libmpfr.so.4 => /usr/lib/x86_64-linux-gnu/libmpfr.so.4 (0x7f92ba6ba000) libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10 (0x7f92ba43a000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x7f92ba236000) libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x7f92ba019000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x7f92b9cc3000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f92b98e3000) /lib64/ld-linux-x86-64.so.2 (0x7f92baebd000) Andy -- 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 https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
[sage-devel] latex for desolve results
Hello, I'm not sure if this is a bug or not. I'm just starting to learn differential equations. The latex returned for 'h' below has superfluous () around the '-x' exponent. y = var('y') Plot1=plot_slope_field(2-y,(x,0,3),(y,0,20)) y = function('y')(x) # declare y to be a function of x h = desolve(diff(y,x) + y - 2, y, ics=[0,7]) print expand(h) print latex(expand(h)) 5*e^(-x) + 2 5 \, e^{\left(-x\right)} + 2 It looks better with out the extra \left( and \right): 5 \, e^{-x} + 2 This is with 8.4beta2 Thanks, Andy -- 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 https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
Re: [sage-devel] latex for desolve results
Vincent, I'm not expecting perfection :) It seems like a problem I might be able to fix with a little direction. I did look though the code,but didn't make much progress. I know I have run under the debugger before, but for the life of me I can remember how I did it. If I could figure out how to set a breakpoint at latex(), I might make some headway. Any pointers on debugging sage internals would be greatly appreciated. Google wasn't my friend today. Thanks, Andy On 09/02/2018 05:17 PM, Vincent Delecroix wrote: > Dear Andy, > > Thanks for your report. > > Note that this result is not wrong with the extra parenthesis. Perhaps > a bit annoying. > > SageMath is developed by volunteers and not perfect. You are very > welcome to contribute to its enhancement > > http://doc.sagemath.org/html/en/developer/ > > Best > Vincent > > Le 02/09/2018 à 16:42, Andy Howell a écrit : >> Hello, >> >> I'm not sure if this is a bug or not. I'm just starting to learn >> differential equations. The latex returned for 'h' below has superfluous >> () around the '-x' exponent. >> >> y = var('y') >> Plot1=plot_slope_field(2-y,(x,0,3),(y,0,20)) >> y = function('y')(x) # declare y to be a function of x >> h = desolve(diff(y,x) + y - 2, y, ics=[0,7]) >> print expand(h) >> print latex(expand(h)) >> >> 5*e^(-x) + 2 >> 5 \, e^{\left(-x\right)} + 2 >> >> It looks better with out the extra \left( and \right): >> >> 5 \, e^{-x} + 2 >> >> This is with 8.4beta2 >> >> Thanks, >> >> Andy >> > -- 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 https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
[sage-devel] Developer guide for casual user
I'm a casual user of sage and python. I know a little of both, but far far from expert. There have been a number of very minor bugs that I could fix, but was stymied because I don't know, or have forgotten, how to debug sage code, how to find the code be called etc. To the regular sage developer these are quite minor issues, but they are enough to stop me from pursuing issues further. I'm a C++ developer, so general concepts are not the issue, it is sage/python specific things that I need help with. I propose adding a section to the sage developer guide that address things like: How to setup a testing environment that won't interfere with my installed sage. How to debug code on the command line. How to debug in code in Jupyter. What are the differences between Sage's use of python and vanilla python? Are there tricks to sage development that make it simpler? How to I find the code being called? Which python debugger are best for sage? I can write those sections, but I will need help and direction from the community. My goal is to make it dead easy for people like myself to fix minor problems. Some of the above are probably generic python questions. However, having them addressed here makes it more likely the casual user will contribute. Even if all the doc does is to provide links to python sites, that is helpful. A couple weeks ago I was looking at a latex formatting issue that Samuel Lelievre helped me with (Thanks Samuel), but I wasn't able to trace the code in the debugger. I still want to address that. Regards, Andy -- 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 https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
Re: [sage-devel] latex for desolve results
Samuel, I am the personification of preoccupations upon preoccupations. No problem. My meager attempt lead me to pynac as well, though not into the library itself. I do know C++, so maybe I can make some progress there. I cloned pynac. There are some dependencies to work out to get it to build. I'll fiddle with it some more. Thanks for your help. Andy On 09/21/2018 05:47 PM, Samuel Lelievre wrote: > Andy, > > three weeks ago, after the partial exploration discussed on this list, > I switched to other preoccupations and forgot to get back to this. > > To recap and go a little further, here is how I would describe > the issue and some steps to explore it: > > Current: > > sage: h = e^-x > sage: latex(h) > e^{\left(-x\right)} > > Wish: > > sage: h = e^-x > sage: latex(h) > e^{-x} > > The function `latex` (see `latex??`) calls `self._latex_` > which itself (see `h._latex_??`) calls > > self._parent._latex_element_(self) > > In this case, self._parent is Sage's symbolic ring, > so the issue can be reformulated as: > > Current: > > sage: h = e^-x > sage: SR._latex_element_(h) > 'e^{\\left(-x\\right)}' > > Wish: > > sage: h = e^-x > sage: SR._latex_element_(h) > 'e^{-x}' > > This method `SR._latex_element_` (see `SR._latex_element_??`) > is defined in sage/symbolic/ring.pyx, see: > > > https://github.com/sagemath/sage/blob/master/src/sage/symbolic/ring.pyx#L888 > > Exploring further, it calls: > > char_to_str(GEx_to_str_latex(&x._gobj)) > > The only other place I find `GEx_to_str_latex` is in > > sage/src/sage/libs/pynac/pynac.pxd > > see also (searching the sagemath/sage repo on GitHub): > > > https://github.com/sagemath/sage/blob/master/src/sage/libs/pynac/pynac.pxd#L261 > > Pynac's wiki has a note about the latexing of symbolic expressions: > > https://github.com/pynac/pynac/wiki/%7C-printing > > Not sure where to go from there. This seems to be leaving the Python > world and to be calling some C or C++ library, where I'm less fluent. > > I created a ticket for this issue. I hope this can get solved! > > - Sage Trac ticket 26337 > Extraneous parentheses in latex(e^-x) > https://trac.sagemath.org/ticket/26337 > > -- > 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 > <mailto:sage-devel+unsubscr...@googlegroups.com>. > To post to this group, send email to sage-devel@googlegroups.com > <mailto:sage-devel@googlegroups.com>. > Visit this group at https://groups.google.com/group/sage-devel. > For more options, visit https://groups.google.com/d/optout. -- 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 https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
Re: [sage-devel] Re: Developer guide for casual user
Travis, On 09/21/2018 07:51 PM, Travis Scrimshaw wrote: > Hi Andy, > It would be great to improve our methodologies for > recruiting/training new contributors and developers, and I am happy to > hear you are willing to work on this. Thanks. > > I'm a casual user of sage and python. I know a little of both, but > far > far from expert. There have been a number of very minor bugs that I > could fix, but was stymied because I don't know, or have > forgotten, how > to debug sage code, how to find the code be called etc. > > > That seems a little contradictory IMO. If you know they are (very) > minor bugs, you already (mostly) know how to fix them. Although I > might have a different definition of minor than you for this. By minor I was thinking of problems that don't require a high level of mathematical sophistication nor expert level python skills. Small annoyances that should be fixed. For example the LaTeX rendering bug I mentioned a couple weeks ago. That one might be more involved, but hopefully that conveys what I was aiming at. I don't have the skills to handle core sage development, but I might be able to help with simpler aspects. > To the regular sage developer these are quite minor issues, but > they are enough to stop me from pursuing issues further. > > I'm a C++ developer, so general concepts are not the issue, it is > sage/python specific things that I need help with. > > I propose adding a section to the sage developer guide that address > things like: > > How to setup a testing environment that won't interfere with my > installed sage. > > > Technically that is impossible because you have to modify Sage to test > your development changes. However, the practical answer is git already > provides this for you. Just make your changes in a new branch. I vaguely remember some kind of python sandboxing system, the I'm not sure if that would apply here. > > How to debug code on the command line. > > How to debug in code in Jupyter. > > > Without modifying the source code (which you cannot do from either of > those options), all you can really do is isolate a MWE. > > > Are there tricks to sage development that make it simpler? > > > I'm sorry, but that really sounds like "I want to get really good > without practicing". I'd guess the word "tricks" was objectionable. What I meant was techniques like locating the source using funcName? Now that I know that exists, I can add it to my "practice". Discovering those though google searches takes time. I'd rather have a catalog of them in a known place. Sadly my memory is not getting better with age. Having one place to check speeds the process. > > How to I find the code being called? > > > %prun is reasonably good for that. The foo?? is also very useful for > looking at a particular block of code. > > Which python debugger are best for sage? > > > This is bound to have lots of bikeshedding or just be pdb. I had to look up bikeshedding :) I simply wanted to know if there are alternatives that sage developers find useful. > > > I can write those sections, but I will need help and direction > from the > community. My goal is to make it dead easy for people like myself > to fix > minor problems. Some of the above are probably generic python > questions. > However, having them addressed here makes it more likely the > casual user > will contribute. Even if all the doc does is to provide links to > python > sites, that is helpful. > > > From my experience, the biggest issue that prevents people from fixing > bugs in Sage is getting used to our development workflow and learning > how to work with git (and more generally, version control software). > This is the part where we need to focus on more. I think people are > fairly adept at finding where they need to fix a bug, although this > could be improved as well (in contrast, finding the correct spot where > to add new code to Sage seems to be more problematic). > I use git regularly. It does take awhile to learn. I can't really speak to the rest of the process. Thanks, Andy -- 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 https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
[sage-devel] 9.2 Beta0 build issue under Ubuntu 19.10
I originally sent this to sage-release when 9.1 was released. I see the same test failures under 9.2.beta0. I didn't see a way to make exceptions for which system packages are used if installed, based on the OS release. Maybe the best option is to simply document the configure options under "known issues" with Ubuntu 19.10. Regards, Andy All the tests pass under Ubuntu 19.10 after building with sage's internal versions of eclib, nauty and glpk. I did this by doing: ./configure --with-system-eclib=no -with-system-nauty=no --with-system-glpk=no The gory details: I rebuilt sage after doing: ./configure --with-system-eclib=no -with-system-nauty=no Previous fails now pass, but there were two other tests that failed hard: sage -t --long --warn-long 65.8 src/sage/numerical/backends/glpk_backend.pyx # 1 doctest failed sage -t --long --warn-long 65.8 src/sage/libs/glpk/error.pyx # 1 doctest failed Using the sage's glpk fixed those: ./configure --with-system-eclib=no -with-system-nauty=no -with-system-glpk=no Here are the details for the system installed libs. Note that the system eclib-tools says that it breaks sagemath < 8.4. I don't know if that is the same error with 9.1 Package: eclib-tools Architecture: amd64 Version: 20190226-3 Priority: optional Section: universe/math Source: eclib Origin: Ubuntu Maintainer: Ubuntu Developers Original-Maintainer: Debian Science Maintainers Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 45 Depends: libec5 (= 20190226-3), libc6 (>= 2.4), libgcc1 (>= 1:3.0), libntl35, libstdc++6 (>= 4.4.0) Breaks: sagemath (<< 8.4~) Filename: pool/universe/e/eclib/eclib-tools_20190226-3_amd64.deb Size: 10476 MD5sum: 78cec4b65cf967544656508be512d631 SHA1: f057770c95e8f499f4a62ab659c7086902b988bb SHA256: f229f2e674d8ce87e9afee8959144396acdbd42f51b41179c68acd004b1aca1e Homepage: https://github.com/JohnCremona/eclib/ Description-en: Programs for modular symbols and elliptic curves over Q This package includes several programs to compute with elliptic curves over Q ; most notably mwrank (for 2-descent on elliptic curves over Q) and the modular symbol tools used to create the elliptic curve database. Description-md5: 0eb561b8bbb6cb2cb47894e7198e0b99 apt-cache show nauty Package: nauty Architecture: amd64 Version: 2.6r10+ds-1 Priority: extra Section: universe/math Origin: Ubuntu Maintainer: Ubuntu Developers Original-Maintainer: Debian Science Maintainers Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 1094 Depends: libnauty2 (= 2.6r10+ds-1), libc6 (>= 2.14), libgmp10, zlib1g (>= 1:1.1.4) Suggests: graphviz, nauty-doc Filename: pool/universe/n/nauty/nauty_2.6r10+ds-1_amd64.deb Size: 306768 MD5sum: 8f4aee5709523b491f2ca71195f4e402 SHA1: 5df98416734668ace6d17c165ef1227d3acafd82 SHA256: 6c37a6542532750950046cbd46f613668449aa9e4be8a3e9e9221cc4ed0ec952 Homepage: http://pallini.di.uniroma1.it Description-en: library for graph automorphisms -- interface and tools nauty (No AUTomorphisms, Yes?) is a set of procedures for computing automorphism groups of graphs and digraphs. This mathematical software suite is developed by Brendan McKay and Adolfo Piperno: http://pallini.di.uniroma1.it . nauty computes graph information in the form of a set of generators, the size of the group, and the orbits of the group; it can also produce a canonical label. The nauty suite is written in C and comes with a command-line interface, a collection of command-line tools, and an Application Programming Interface (API). . This package provides the nauty interface named dreadnaut, and a small collection of utilities called gtools. Description-md5: 44ae986d51bccb00a481cefd3d38bbfa apt-cache show libglpk40 Package: libglpk40 Architecture: amd64 Version: 4.65-2 Multi-Arch: same Priority: optional Section: universe/math Source: glpk Origin: Ubuntu Maintainer: Ubuntu Developers Original-Maintainer: Debian Science Team Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 922 Depends: libamd2 (>= 1:4.5.2), libc6 (>= 2.14), libcolamd2 (>= 1:4.5.2), libgmp10, libltdl7 (>= 2.4.6), zlib1g (>= 1:1.1.4) Suggests: libiodbc2-dev, default-libmysqlclient-dev Filename: pool/universe/g/glpk/libglpk40_4.65-2_amd64.deb Size: 378136 MD5sum: c8040d41297bbb6c7cbf19078fc98b86 SHA1: a9674a96de975a8050c9d53f55a804479337196f SHA256: 428c28560e488d452ce066ac4c4c5c0b910ee8c8f0dd35131c82e8f1f042c88e Homepage: http://www.gnu.org/software/glpk/glpk.html Description-en: linear programming kit with integer (MIP) support GLPK (GNU Linear Programming Kit) is intended for solving large-scale linear programming (LP), mixed integer programming (MIP), and other related problems. It is a set of routines written in ANSI C and organized in the form of a callable library. . GLPK supports the GNU MathProg language, which is a subset of the AMPL language. GLPK also supports the standard
[sage-devel] Re: Yes, SymPy should be LGPL! (please help)
On Sun, Nov 16, 2008 at 6:17 PM, Kirill Smelkov <[EMAIL PROTECTED]> wrote: > > David, > > On Sun, Nov 16, 2008 at 08:27:10AM -0500, David Joyner wrote: >> >> Wow, a 29 page email! Printing it actually crashed gmail in epiphany, which >> is >> a new bug AFAIK, so you have potentially contributed to improving google's >> gmail program:-) > > Really?! If Google were Knuth, I'd receive 2.56$ :) Actually he no longer gives out USD, rather "personal certificates of deposit to each awardee's account at the Bank of San Serriffe, which is an offshore institution that has branches in Blefuscu and Elbonia on the planet Pincus." See http://www-cs-faculty.stanford.edu/~knuth/news.html but I guess that isn't really relavant =D > >> While I was reading your email and composing this, Ondrej replied, which >> covers a lot of what I would say, so I just have one comment. >> >> I assume by LGPL you mean LGPLv2+. (Otherwise, I have more comments:-) > > Please comment on this (http://www.fsf.org/licensing/licenses/) > > """ > GNU Lesser General Public License (LGPL) version 2.1 > > > This is the previous version of the LGPL: a free software license, but > not a strong copyleft license, because it permits linking with non-free > modules. It is compatible with GPLv2 and GPLv3. >^^ > """ > >> You said: >> >> > I'm proposing LGPL which is a different, "non viral" license [1]. >> >> Perhaps I misunderstand you, but AFAIK this is false. Any modification >> and public re-distribution of LGPL software must carry the >> LGPL or GPL license. See section 2 in http://www.gnu.org/licenses/lgpl.html > > Yes, you misunderstood me. > > Both GPL and LGPL require any modifications to the software to be made > public on redistribution, but GPL *also* requires that any _other_ > software, which uses our software in the same process, should be under > GPL *too*. > > That's the difference -- GPL covers our software + affects users and > maked them GPL too, while LGPL covers only our software and does not > affect users: > > http://en.wikipedia.org/wiki/GNU_Lesser_General_Public_License > >> The GPL and LGPL are complicated legal documents and I agree with >> what Ondrej said about your misconceptions. In my opinion, you would have >> had a much stronger argument if you would have argued GPLv2+ vs modified BSD, >> since there the differences are more clearly delineated. (Of course, the >> sympy developers may have voted against that too, I don't know.) > > I'm advocating for LGPL because it would protect SymPy and be loyal to > software which uses SymPy. Since SymPy is a small library with > well-defined task I think this is the perfect fit. > > -- >Kirill > > > > --~--~-~--~~~---~--~~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~--~~~~--~~--~--~---