[sage-support] Re: Excessive snapshots
Hi Michael, No - didn't rebuild. Guess I figured it was some sort of configuration file that got read at start-up. :-( At least now I know which version to edit. I don't think this explains why it was saving twice a minute originally, when I'd built from source. user_conf.py must have been read then. I'll run some experiments tomorrow and report here. Are others on some version of 3.4.rc0 seeing snapshots (and .sage/ sage_notebook/backups/nb.sobj updates) at 3-minute intervals? Or something different? Thanks for the help. Rob On Mar 6, 11:41 pm, mabshoff wrote: > On Mar 6, 11:22 pm, Rob Beezer wrote: > > > > > My 30 MB nb.sobj was also being saved twice a minute. Is this a > > reasonable size for this file? > > > After some head-scratching, I found the threadhttp://tinyurl.com/aht325 > > > which had the following commands to use at the sage command line: > > > sage: nb = load('/home/rob/.sage/sage_notebook/ > > nb.sobj',compress=False) > > sage: nb.conf()['save_interval']=int > > (3600) > > sage: nb.save() > > > This seems to have halted the high frequency of the saves, but I > > haven't waited an hour to see if that is what will really happen. > > > It still does not appear that that the setting in user_conf.py was > > having any effect for me. > > Did you run "sage -b" after editing the file? > > Sage 3.3 or later should not keep any snapshots around if the > worksheet is unchanged. If it does in your case there is a new bug in > there somewhere. > > Cheers, > > Michael --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Excessive snapshots
On Mar 6, 11:22 pm, Rob Beezer wrote: > My 30 MB nb.sobj was also being saved twice a minute. Is this a > reasonable size for this file? > > After some head-scratching, I found the threadhttp://tinyurl.com/aht325 > > which had the following commands to use at the sage command line: > > sage: nb = load('/home/rob/.sage/sage_notebook/ > nb.sobj',compress=False) > sage: nb.conf()['save_interval']=int > (3600) > sage: nb.save() > > This seems to have halted the high frequency of the saves, but I > haven't waited an hour to see if that is what will really happen. > > It still does not appear that that the setting in user_conf.py was > having any effect for me. Did you run "sage -b" after editing the file? Sage 3.3 or later should not keep any snapshots around if the worksheet is unchanged. If it does in your case there is a new bug in there somewhere. Cheers, Michael --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Excessive snapshots
My 30 MB nb.sobj was also being saved twice a minute. Is this a reasonable size for this file? After some head-scratching, I found the thread http://tinyurl.com/aht325 which had the following commands to use at the sage command line: sage: nb = load('/home/rob/.sage/sage_notebook/ nb.sobj',compress=False) sage: nb.conf()['save_interval']=int (3600) sage: nb.save() This seems to have halted the high frequency of the saves, but I haven't waited an hour to see if that is what will really happen. It still does not appear that that the setting in user_conf.py was having any effect for me. --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Jmol problem
Hi, In my Sage 3.3 notebook on Mac OS 10.5/Firefox 3.07, Jmol 3d graphics are shown as just black rectangles. I know this was a problem that other people experienced. But is it now fixed? If this occurs only to me, how can I fix it? --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Excessive snapshots
Marshall, Thanks for the reply. I'm using 3.4.rc0, built from the source. I find three copies of user_conf.py: ./devel/sage-main/sage/server/notebook/user_conf.py ./devel/sage-main/build/lib.linux-x86_64-2.5/sage/server/notebook/ user_conf.py ./devel/sage-main/build/sage/server/notebook/user_conf.py which all have a 3 minute interval specifies. I edited all of them to be 3600 seconds. But I'm still getting saves about every 30 seconds after restarting Sage. Rob On Mar 6, 8:05 pm, Marshall Hampton wrote: > Yes, running 3.3 should fix that. You can safely delete most of those > snapshots if you want to save some space. Also, you can edit > user_conf.py (in sage/server/notebook) to change the autosave_interval > to something bigger (this is #5371 that you referred to, although > there we are only thinking of upping it a little, you might want to > only save once an hour or longer). > > -M. Hampton > > On Mar 6, 9:23 pm, Rob Beezer wrote: > > > I'm finding many, many files in each workseet's "snapshots" directory > > - many of them identical. They are created about two per minute, even > > if there are no changes. I have one directory with 15,000 files in > > it. This is with 3.4.rc0. > > > I got the impression that this was partially fixed > > inhttp://trac.sagemath.org/sage_trac/ticket/5291 > > and was added into 3.3 > > > Also,http://trac.sagemath.org/sage_trac/ticket/5371discussesfurther > > improvements. > > > Appears user_conf.py is part of the source, and not in my home, so it > > should be original, since I built from source? > > > My home directory is on a portable, external USB drive I pack around, > > so maybe that could have something to do with it. I think all these > > files (or writes) are also impacting my performance (intolerable waits > > on simple operations). fstab for this device says > > > LABEL=INOI-60GB-EXT /home/rob ext3 rw,relatime,noauto 0 0 > > > Am I doing something wrong, or is this not really fixed? Any short- > > term remedies? --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Division error in Sage 3.3 but not in Sage 3.1.1
Hi guys, I recently upgrade sage from 3.2.3 to 3.3. I'm also have sage 3.1.1 The thing is that the following commands give different results: F.=FiniteField(9) A. = PolynomialRing(F) K. = FractionField(A) f= 2/(t^2+2*t); g =t^9/(t^18 + t^10 + t^2);f+g In 3.1.1 gives the right answer (I guess) but in 3.2.3 give an error: ZeroDivisionError Traceback (most recent call last) ... ZeroDivisionError: division by zero in finite field. I don't know how those commands work in 3.2.3. I had a problem with sage 3.2.3, but Craig Citro helped me. Sage 3.2.3 couldn't open objects created in sage 3.1.1. This objects contain polynomials p(T) in F_q(t)[T]. Perhaps these problems are related. Any idea of how to fix that? --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Excessive snapshots
Yes, running 3.3 should fix that. You can safely delete most of those snapshots if you want to save some space. Also, you can edit user_conf.py (in sage/server/notebook) to change the autosave_interval to something bigger (this is #5371 that you referred to, although there we are only thinking of upping it a little, you might want to only save once an hour or longer). -M. Hampton On Mar 6, 9:23 pm, Rob Beezer wrote: > I'm finding many, many files in each workseet's "snapshots" directory > - many of them identical. They are created about two per minute, even > if there are no changes. I have one directory with 15,000 files in > it. This is with 3.4.rc0. > > I got the impression that this was partially fixed > inhttp://trac.sagemath.org/sage_trac/ticket/5291 > and was added into 3.3 > > Also,http://trac.sagemath.org/sage_trac/ticket/5371discusses further > improvements. > > Appears user_conf.py is part of the source, and not in my home, so it > should be original, since I built from source? > > My home directory is on a portable, external USB drive I pack around, > so maybe that could have something to do with it. I think all these > files (or writes) are also impacting my performance (intolerable waits > on simple operations). fstab for this device says > > LABEL=INOI-60GB-EXT /home/rob ext3 rw,relatime,noauto 0 0 > > Am I doing something wrong, or is this not really fixed? Any short- > term remedies? --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Chemistry usage
I was wondering what Sage can do that is particularly useful for chemistry. I am taking quantum right now and hoping to be able to use Sage to help me in class as well as for my research. --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Excessive snapshots
I'm finding many, many files in each workseet's "snapshots" directory - many of them identical. They are created about two per minute, even if there are no changes. I have one directory with 15,000 files in it. This is with 3.4.rc0. I got the impression that this was partially fixed in http://trac.sagemath.org/sage_trac/ticket/5291 and was added into 3.3 Also, http://trac.sagemath.org/sage_trac/ticket/5371 discusses further improvements. Appears user_conf.py is part of the source, and not in my home, so it should be original, since I built from source? My home directory is on a portable, external USB drive I pack around, so maybe that could have something to do with it. I think all these files (or writes) are also impacting my performance (intolerable waits on simple operations). fstab for this device says LABEL=INOI-60GB-EXT /home/rob ext3 rw,relatime,noauto 0 0 Am I doing something wrong, or is this not really fixed? Any short- term remedies? --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: sagetex issues
Finally, I got it to work. Thank you very much. However, the example1.dvi file was not saved in the folder that contains the example1.tex file. I have to look for it. Is there a way to make the texshop to do all the work? Sony .. On Mar 6, 7:54 pm, Dan Drake wrote: > On Fri, 06 Mar 2009 at 05:43PM -0800, Sony wrote: > > It seems to be working now. Thank you very much. Unfortunately, now > > I have a new problem. Please see below. > > __ > > sony$ /Applications/sage/sage /Users/Sony/Desktop/sagetexEx/ > > xample1.sage > > Traceback (most recent call last): > > File "/Users/Sony/Desktop/sagetexEx/xample1.py", line 4, in > > import sagetex > > ImportError: No module named sagetex > > sony$ > > __ > > > I placed sagetex.sty in Users/Sony/Library/texmf/tex/latex and > > sagetex.py in the sage folder. > > What am I not doing right? > > Well, if the xample1.sage file is generated, then TeX can find > sagetex.sty, so that's not the problem. I think you've put sagetex.py > (the Python module) in the wrong place -- try putting in the same > directory as your document (/Users/Sony/Desktop/sagetexEx/). There are > other ways around this, but that's the easiest way to do it. > > Dan > > -- > --- Dan Drake > - KAIST Department of Mathematical Sciences > --- http://mathsci.kaist.ac.kr/~drake > > signature.asc > < 1KViewDownload --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: sagetex issues
On Fri, 06 Mar 2009 at 05:43PM -0800, Sony wrote: > It seems to be working now. Thank you very much. Unfortunately, now > I have a new problem. Please see below. > __ > sony$ /Applications/sage/sage /Users/Sony/Desktop/sagetexEx/ > xample1.sage > Traceback (most recent call last): > File "/Users/Sony/Desktop/sagetexEx/xample1.py", line 4, in > import sagetex > ImportError: No module named sagetex > sony$ > __ > > I placed sagetex.sty in Users/Sony/Library/texmf/tex/latex and > sagetex.py in the sage folder. > What am I not doing right? Well, if the xample1.sage file is generated, then TeX can find sagetex.sty, so that's not the problem. I think you've put sagetex.py (the Python module) in the wrong place -- try putting in the same directory as your document (/Users/Sony/Desktop/sagetexEx/). There are other ways around this, but that's the easiest way to do it. Dan -- --- Dan Drake - KAIST Department of Mathematical Sciences --- http://mathsci.kaist.ac.kr/~drake signature.asc Description: Digital signature
[sage-support] Re: sagetex issues
It seems to be working now. Thank you very much. Unfortunately, now I have a new problem. Please see below. __ sony$ /Applications/sage/sage /Users/Sony/Desktop/sagetexEx/ xample1.sage Traceback (most recent call last): File "/Users/Sony/Desktop/sagetexEx/xample1.py", line 4, in import sagetex ImportError: No module named sagetex sony$ __ I placed sagetex.sty in Users/Sony/Library/texmf/tex/latex and sagetex.py in the sage folder. What am I not doing right? Sony.. On Mar 6, 10:34 am, Marshall Hampton wrote: > The command "sage" is not in your path. As Harald said, you need to > do: > > /your/path/sage filename.sage > > where /your/path is the path to where you installed sage. > > -M. Hampton > > On Mar 6, 9:29 am, Sunil Koswatta wrote: > > > Thanks for the reply again. Now I am having a hard time finding the sage > > command. I tried what you have suggested. The following is the outcome. > > > >sage filename.sage > > > -bash sage:command not found > > > Sony .. > > > --- On Fri, 3/6/09, Harald Schilly wrote: > > > > From: Harald Schilly > > > Subject: [sage-support] Re: sagetex issues > > > To: "sage-support" > > > Date: Friday, March 6, 2009, 8:37 AM > > > On Mar 6, 3:30 pm, Sunil Koswatta > > > wrote: > > > > Thanks for the reply. I appreciate it. Perhaps, I > > > do not know how to "run" example1.sage. I have > > > tried numerous (assumed) commands and some of them are > > > listed below. > > > > no, you have to run sage *on* that file. i.e. if the sage > > > command is > > > in /you/sage/path/sage then run "/your/path/sage > > > filename.sage". Don't > > > start/open sage ! If sage is in your PATH variable, then > > > you just > > > don't need to specify the full path... > > > > h --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Turning display of parents on and off
On Mar 6, 3:02 pm, Alasdair wrote: > However, it doesn't work. In console mode show_parent() should turn > the display of parents on, and hide_parent() should turn it off. It > seems to work once - but not again. That is, parent display can be > turned on, and then off, but not on again - show_parent() has no > effect after one "cycle". I'm not quite sure what's going on - my > python knowledge is limited. And sometimes when parent display is on, > hide_parent() has no effect. > > Any ideas? This is because .set_hook() pushes your function onto a list of handlers; the first handler in the list that does not raise a TryNext exception is used. So you keep adding more and more copies of repr_and_parent and repr_only onto the list. Here's a variant that works for me (in limited testing). import IPython from IPython import ipapi from IPython.genutils import Term from pprint import PrettyPrinter pformat = PrettyPrinter().pformat _show_parent_mode = False def _maybe_show_parent(self, arg): if _show_parent_mode and hasattr(arg, 'parent'): try: print >>Term.cout, "%s\n\nParent: %s"%(repr(arg),repr (arg.parent())) return except: pass raise ipapi.TryNext ipapi.get().set_hook("result_display", _maybe_show_parent) def show_parent(): global _show_parent_mode _show_parent_mode = True def hide_parent(): global _show_parent_mode _show_parent_mode = False --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Turning display of parents on and off
Thanks to the help of Robert Bradshaw, and to the file IPython/ hooks.py, I've cobbled together the following sage.init file: import IPython from IPython import ipapi from IPython.genutils import Term from pprint import PrettyPrinter pformat = PrettyPrinter().pformat def repr_and_parent(self, arg): if hasattr(arg, 'parent'): try: print >>Term.cout, "%s\n\nParent: %s"%(repr(arg),repr (arg.parent())) return except: pass raise ipapi.TryNext def repr_only(self,arg): if self.rc.pprint: out = pformat(arg) if '\n' in out: Term.cout.write('\n') print >>Term.cout, out else: print >>Term.cout, repr(arg) return None def show_parent(): ipapi.get().set_hook("result_display", repr_and_parent) def hide_parent(): ipapi.get().set_hook("result_display", repr_only) However, it doesn't work. In console mode show_parent() should turn the display of parents on, and hide_parent() should turn it off. It seems to work once - but not again. That is, parent display can be turned on, and then off, but not on again - show_parent() has no effect after one "cycle". I'm not quite sure what's going on - my python knowledge is limited. And sometimes when parent display is on, hide_parent() has no effect. Any ideas? Thanks, Alasdair --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Fwd: quad forms in SAGE question
I'm forwarding this to sage-support... -- Forwarded message -- From: Fernando Rodriguez-Villegas Date: Fri, Mar 6, 2009 at 12:00 PM Subject: quad forms in SAGE question To: William Stein , Jonathan Hanke , Craig Citro Hi Guys, Could you please tell me whether the invariants of quadratic forms over \Q as defined by Conway in his Sensual Quadr form book have been implemented in SAGE? (Or anywhere else for that matter). If not, what has been implemented so far (for rational/integral quadratic forms)? Thanks, Fernando -- Fernando Rodriguez Villegas Arizona Winter School 2009 Quadratic Forms March 14-18, 2009 http://math.arizona.edu/~swc -- William Stein Associate Professor of Mathematics University of Washington http://wstein.org --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Problems using sagetex package
Sagetex is working!!! (and also Maxima). I did the following: I found that LANG=ex_MX.UTF-8 but .bashrc had export LC_ALL=C. So I commented and run sudo dpkg-reconfigure locales After that Maxima start to works. Thanks for the support. Alex On Mar 6, 8:54 am, Robert Dodier wrote: > William Stein wrote: > > > On Thu, 05 Mar 2009 at 10:45PM -0800, Alex Lara wrote: > > >> *** - invalid byte #xC3 in CHARSET:ASCII conversion > > Try this: change the environment variable LC_CTYPE > e.g. LC_CTYPE=ES_es or LC_CTYPE=ES_es.UTF-8 or something > like that. Or maybe somehow indicated ISO 8859-1 or Latin-1 or > something. Then Clisp might know how to decode the offending bytes. > > Another tactic: put the following in your $HOME/.clisprc file. > > (format t "HELLO FROM CLISPRC~%") > (ignore-errors > (progn (setf custom:*default-file-encoding* > (ext:make-encoding :input-error-action #\?)) > (setf custom:*terminal-encoding* > custom:*default-file-encoding*))) > > That replaces undecodable bytes by '?' characters. > (The "hello" message is just to verify the code is loaded ) > > > That's a good guess. There is a known major bug in Maxima + clisp where > > it totally fails to work if there are certain non-ascii characters in the > > filenames in the current directory or PATH. I can't wait until clisp isn't > > in Sage. > > The bad news is that it's not exactly a Clisp idiosyncrasy. > Clisp is trying to "do the right thing" when faced with undecodable > bytes. > Unfortunately the Common Lisp spec, while it recognizes the > existence of character encoding issues, doesn't specify what to do > when a byte can't be decoded to a character. Other Lisp > implementations > probably have their own ways to handle it. > > FWIW > > Robert Dodier --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: sagetex issues
The command "sage" is not in your path. As Harald said, you need to do: /your/path/sage filename.sage where /your/path is the path to where you installed sage. -M. Hampton On Mar 6, 9:29 am, Sunil Koswatta wrote: > Thanks for the reply again. Now I am having a hard time finding the sage > command. I tried what you have suggested. The following is the outcome. > > >sage filename.sage > > -bash sage:command not found > > Sony .. > > --- On Fri, 3/6/09, Harald Schilly wrote: > > > From: Harald Schilly > > Subject: [sage-support] Re: sagetex issues > > To: "sage-support" > > Date: Friday, March 6, 2009, 8:37 AM > > On Mar 6, 3:30 pm, Sunil Koswatta > > wrote: > > > Thanks for the reply. I appreciate it. Perhaps, I > > do not know how to "run" example1.sage. I have > > tried numerous (assumed) commands and some of them are > > listed below. > > > no, you have to run sage *on* that file. i.e. if the sage > > command is > > in /you/sage/path/sage then run "/your/path/sage > > filename.sage". Don't > > start/open sage ! If sage is in your PATH variable, then > > you just > > don't need to specify the full path... > > > h --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Problems using sagetex package
On Mar 6, 8:56 am, William Stein wrote: > That said -- I'm really looking forward to Sage switching to Maxima + ECL. I;'m pretty sure ECL will exhibit some variation on Clisp's behavior, for better or worse. Robert Dodier --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Problems using sagetex package
On Fri, Mar 6, 2009 at 7:54 AM, Robert Dodier wrote: > > William Stein wrote: > >> > On Thu, 05 Mar 2009 at 10:45PM -0800, Alex Lara wrote: > >> >> *** - invalid byte #xC3 in CHARSET:ASCII conversion > > Try this: change the environment variable LC_CTYPE > e.g. LC_CTYPE=ES_es or LC_CTYPE=ES_es.UTF-8 or something > like that. Or maybe somehow indicated ISO 8859-1 or Latin-1 or > something. Then Clisp might know how to decode the offending bytes. > > Another tactic: put the following in your $HOME/.clisprc file. > > (format t "HELLO FROM CLISPRC~%") > (ignore-errors > (progn (setf custom:*default-file-encoding* > (ext:make-encoding :input-error-action #\?)) > (setf custom:*terminal-encoding* > custom:*default-file-encoding*))) > > That replaces undecodable bytes by '?' characters. > (The "hello" message is just to verify the code is loaded ) > >> That's a good guess. There is a known major bug in Maxima + clisp where >> it totally fails to work if there are certain non-ascii characters in the >> filenames in the current directory or PATH. I can't wait until clisp isn't >> in Sage. > > The bad news is that it's not exactly a Clisp idiosyncrasy. > Clisp is trying to "do the right thing" when faced with undecodable > bytes. > Unfortunately the Common Lisp spec, while it recognizes the > existence of character encoding issues, doesn't specify what to do > when a byte can't be decoded to a character. Other Lisp > implementations > probably have their own ways to handle it. > > FWIW > > Robert Dodier Many thanks for the workarounds above! We may be able to at least automate them for Sage, which would be a step forward. That said -- I'm really looking forward to Sage switching to Maxima + ECL. William --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Problems using sagetex package
William Stein wrote: > > On Thu, 05 Mar 2009 at 10:45PM -0800, Alex Lara wrote: > >> *** - invalid byte #xC3 in CHARSET:ASCII conversion Try this: change the environment variable LC_CTYPE e.g. LC_CTYPE=ES_es or LC_CTYPE=ES_es.UTF-8 or something like that. Or maybe somehow indicated ISO 8859-1 or Latin-1 or something. Then Clisp might know how to decode the offending bytes. Another tactic: put the following in your $HOME/.clisprc file. (format t "HELLO FROM CLISPRC~%") (ignore-errors (progn (setf custom:*default-file-encoding* (ext:make-encoding :input-error-action #\?)) (setf custom:*terminal-encoding* custom:*default-file-encoding*))) That replaces undecodable bytes by '?' characters. (The "hello" message is just to verify the code is loaded ) > That's a good guess. There is a known major bug in Maxima + clisp where > it totally fails to work if there are certain non-ascii characters in the > filenames in the current directory or PATH. I can't wait until clisp isn't > in Sage. The bad news is that it's not exactly a Clisp idiosyncrasy. Clisp is trying to "do the right thing" when faced with undecodable bytes. Unfortunately the Common Lisp spec, while it recognizes the existence of character encoding issues, doesn't specify what to do when a byte can't be decoded to a character. Other Lisp implementations probably have their own ways to handle it. FWIW Robert Dodier --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Problems using sagetex package
On Fri, Mar 6, 2009 at 7:28 AM, Alex Lara wrote: > > Hi there, > > I suppose it has to be with permissions. Sage is installed at my home > directory. If a run sage as a root (su and then ./sage) maxima > works!!! But if only run sage with sudo ./sage it does'nt. > > Do you have an idea why is that? That could also be exactly what Dan and I said -- a funny filename character issue, which you don't see was root since root has different files in root's PATH. William > > ---Alex > > On Mar 6, 8:21 am, William Stein wrote: >> On Fri, Mar 6, 2009 at 1:33 AM, Dan Drake wrote: >> > On Thu, 05 Mar 2009 at 10:45PM -0800, Alex Lara wrote: >> >> > What do you get when you run "sage -maxima"? >> >> >> > --Mike >> >> >> I got this: >> >> >> *** - invalid byte #xC3 in CHARSET:ASCII conversion >> >> Break 1 [4]> >> >> > I am totally guessing here, but is there a non-ascii character somewhere >> > in the path to your Sage install, or in your shell's $PATH? >> >> That's a good guess. There is a known major bug in Maxima + clisp where >> it totally fails to work if there are certain non-ascii characters in the >> filenames in the current directory or PATH. I can't wait until clisp isn't >> in Sage. >> >> >> >> >> >> > Dan >> >> > -- >> > --- Dan Drake >> > - KAIST Department of Mathematical Sciences >> > --- http://mathsci.kaist.ac.kr/~drake >> >> > -BEGIN PGP SIGNATURE- >> > Version: GnuPG v1.4.9 (GNU/Linux) >> >> > iEYEARECAAYFAkmw7fAACgkQr4V8SljC5Lp5YwCfe+WRYLfaH6suwEKaL4TlorOb >> > 23sAnjZMePg3aYtcBumhxsngrICzeOXW >> > =WCyC >> > -END PGP SIGNATURE- >> >> -- >> William Stein >> Associate Professor of Mathematics >> University of Washingtonhttp://wstein.org > > > -- William Stein Associate Professor of Mathematics University of Washington http://wstein.org --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: sagetex issues
Thanks for the reply again. Now I am having a hard time finding the sage command. I tried what you have suggested. The following is the outcome. >sage filename.sage -bash sage:command not found Sony .. --- On Fri, 3/6/09, Harald Schilly wrote: > From: Harald Schilly > Subject: [sage-support] Re: sagetex issues > To: "sage-support" > Date: Friday, March 6, 2009, 8:37 AM > On Mar 6, 3:30 pm, Sunil Koswatta > wrote: > > Thanks for the reply. I appreciate it. Perhaps, I > do not know how to "run" example1.sage. I have > tried numerous (assumed) commands and some of them are > listed below. > > no, you have to run sage *on* that file. i.e. if the sage > command is > in /you/sage/path/sage then run "/your/path/sage > filename.sage". Don't > start/open sage ! If sage is in your PATH variable, then > you just > don't need to specify the full path... > > h > --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Problems using sagetex package
Hi there, I suppose it has to be with permissions. Sage is installed at my home directory. If a run sage as a root (su and then ./sage) maxima works!!! But if only run sage with sudo ./sage it does'nt. Do you have an idea why is that? ---Alex On Mar 6, 8:21 am, William Stein wrote: > On Fri, Mar 6, 2009 at 1:33 AM, Dan Drake wrote: > > On Thu, 05 Mar 2009 at 10:45PM -0800, Alex Lara wrote: > >> > What do you get when you run "sage -maxima"? > > >> > --Mike > > >> I got this: > > >> *** - invalid byte #xC3 in CHARSET:ASCII conversion > >> Break 1 [4]> > > > I am totally guessing here, but is there a non-ascii character somewhere > > in the path to your Sage install, or in your shell's $PATH? > > That's a good guess. There is a known major bug in Maxima + clisp where > it totally fails to work if there are certain non-ascii characters in the > filenames in the current directory or PATH. I can't wait until clisp isn't > in Sage. > > > > > > > Dan > > > -- > > --- Dan Drake > > - KAIST Department of Mathematical Sciences > > --- http://mathsci.kaist.ac.kr/~drake > > > -BEGIN PGP SIGNATURE- > > Version: GnuPG v1.4.9 (GNU/Linux) > > > iEYEARECAAYFAkmw7fAACgkQr4V8SljC5Lp5YwCfe+WRYLfaH6suwEKaL4TlorOb > > 23sAnjZMePg3aYtcBumhxsngrICzeOXW > > =WCyC > > -END PGP SIGNATURE- > > -- > William Stein > Associate Professor of Mathematics > University of Washingtonhttp://wstein.org --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Problems using sagetex package
On Fri, Mar 6, 2009 at 1:33 AM, Dan Drake wrote: > On Thu, 05 Mar 2009 at 10:45PM -0800, Alex Lara wrote: >> > What do you get when you run "sage -maxima"? >> > >> > --Mike >> >> I got this: >> >> *** - invalid byte #xC3 in CHARSET:ASCII conversion >> Break 1 [4]> > > I am totally guessing here, but is there a non-ascii character somewhere > in the path to your Sage install, or in your shell's $PATH? That's a good guess. There is a known major bug in Maxima + clisp where it totally fails to work if there are certain non-ascii characters in the filenames in the current directory or PATH. I can't wait until clisp isn't in Sage. > > Dan > > -- > --- Dan Drake > - KAIST Department of Mathematical Sciences > --- http://mathsci.kaist.ac.kr/~drake > > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.9 (GNU/Linux) > > iEYEARECAAYFAkmw7fAACgkQr4V8SljC5Lp5YwCfe+WRYLfaH6suwEKaL4TlorOb > 23sAnjZMePg3aYtcBumhxsngrICzeOXW > =WCyC > -END PGP SIGNATURE- > > -- William Stein Associate Professor of Mathematics University of Washington http://wstein.org --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: sagetex issues
On Mar 6, 3:30 pm, Sunil Koswatta wrote: > Thanks for the reply. I appreciate it. Perhaps, I do not know how to "run" > example1.sage. I have tried numerous (assumed) commands and some of them are > listed below. no, you have to run sage *on* that file. i.e. if the sage command is in /you/sage/path/sage then run "/your/path/sage filename.sage". Don't start/open sage ! If sage is in your PATH variable, then you just don't need to specify the full path... h --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: sagetex issues
Thanks for the reply. I appreciate it. Perhaps, I do not know how to "run" example1.sage. I have tried numerous (assumed) commands and some of them are listed below. sage: sage example1.sage sage: sage `example1.sage' sage: sage `example1.sage` sage: sage "example1.sage" sage: load(`example1.sage') etc. Sony .. --- On Fri, 3/6/09, Dan Drake wrote: > From: Dan Drake > Subject: [sage-support] Re: sagetex issues > To: sage-support@googlegroups.com > Date: Friday, March 6, 2009, 6:19 AM > On Thu, 05 Mar 2009 at 08:55PM -0800, Sony wrote: > > It did not worked. I am getting the following in the > console. > [...] > > Package sagetex Warning: There were undefined Sage > formulas and/or > > plots. > > Run Sage on example1.sage, and then run LaTeX on > example1.tex again. > > You have to follow the advice given in the output: run Sage > on > example1.sage, and then run LaTeX again. > > The file example1.sage is generated when you run LaTeX on > example1.tex. > When you do "sage example1.sage", that will > generate yet another file, > example1.sout, which LaTeX will use if you compile your > document again. > > Dan > > -- > --- Dan Drake > - KAIST Department of Mathematical Sciences > --- http://mathsci.kaist.ac.kr/~drake --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: sagetex issues
On Thu, 05 Mar 2009 at 08:55PM -0800, Sony wrote: > It did not worked. I am getting the following in the console. [...] > Package sagetex Warning: There were undefined Sage formulas and/or > plots. > Run Sage on example1.sage, and then run LaTeX on example1.tex again. You have to follow the advice given in the output: run Sage on example1.sage, and then run LaTeX again. The file example1.sage is generated when you run LaTeX on example1.tex. When you do "sage example1.sage", that will generate yet another file, example1.sout, which LaTeX will use if you compile your document again. Dan -- --- Dan Drake - KAIST Department of Mathematical Sciences --- http://mathsci.kaist.ac.kr/~drake signature.asc Description: Digital signature
[sage-support] sagetex issues
Hello I have downloaded and installed the sage (os x 10.5 intel version). Sage seems to be working fine. Then I downloaded sagetex 2.0 package. I moved sagetex.sty into user/library/texmf/tex/latex folder. Then I moved sagetex.py into the sage folder. Then I ran a simple latex code (copied from the example in the sagetex folder.) using TeXshop. The following is the code. %!TEX TS-program = sage \documentclass{article} \usepackage{sagetex} \begin{document} This is an example $2+2=\sage{2+2}$. If you raise the current year mod $100$ ($\sage{mod(\the\year, 100)}$) to the power of the current day ($\the\day$), you get $\sage{Integer(mod(\the\year, 100))^\the\day}$. Also, $\the\year$ modulo $42$ is $\sage{\the\year \percent 42}$. \end{document} It did not worked. I am getting the following in the console. ___ LaTeX Warning: Reference `...@sageinline0' on page 1 undefined on input line 16. LaTeX Warning: Reference `...@sageinline1' on page 1 undefined on input line 17. LaTeX Warning: Reference `...@sageinline2' on page 1 undefined on input line 18. LaTeX Warning: Reference `...@sageinline3' on page 1 undefined on input line 19. Package sagetex Warning: There were undefined Sage formulas and/or plots. Run Sage on example1.sage, and then run LaTeX on example1.tex again. [1{/usr/local/texlive/2008/texmf-var/fonts/map/pdftex/updmap/ pdftex.map}] (./example1.aux) LaTeX Warning: There were undefined references. ___ What seems to be the problem? Can someone help? Thank you very much. Sony.. --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Problems using sagetex package
On Thu, 05 Mar 2009 at 10:45PM -0800, Alex Lara wrote: > > What do you get when you run "sage -maxima"? > > > > --Mike > > I got this: > > *** - invalid byte #xC3 in CHARSET:ASCII conversion > Break 1 [4]> I am totally guessing here, but is there a non-ascii character somewhere in the path to your Sage install, or in your shell's $PATH? Dan -- --- Dan Drake - KAIST Department of Mathematical Sciences --- http://mathsci.kaist.ac.kr/~drake signature.asc Description: Digital signature