[sage-devel] Re: Python Javascript String

2007-10-17 Thread Robert Bradshaw

I actually had this question too. Was it just to place it under the  
main sage revision control?

- Robert

On Oct 17, 2007, at 6:46 AM, Matt F wrote:


 Hi -

 I'm new to Sage and I was just wondering why the javascript for the
 notebook was all placed in a string rather than just a javascript file
 or straight embedding into the web pages.

 Thanks for any response.


 

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Python Javascript String

2007-10-17 Thread Timothy Clemans

Isn't extcode also under revision control. The plain txt js file would
be located in extcode right?

On 10/17/07, Robert Bradshaw [EMAIL PROTECTED] wrote:

 I actually had this question too. Was it just to place it under the
 main sage revision control?

 - Robert

 On Oct 17, 2007, at 6:46 AM, Matt F wrote:

 
  Hi -
 
  I'm new to Sage and I was just wondering why the javascript for the
  notebook was all placed in a string rather than just a javascript file
  or straight embedding into the web pages.
 
  Thanks for any response.
 
 
 

 


--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Python Javascript String

2007-10-17 Thread Robert Bradshaw

Yes, it is under a different repository. The advantage of placing it  
under the main one, however, is that much of it seems tightly coupled  
to the python source in that same repository, so one could commit  
javascript and python server changes in sync.

- Robert

On Oct 17, 2007, at 9:48 AM, Timothy Clemans wrote:

 Isn't extcode also under revision control. The plain txt js file would
 be located in extcode right?

 On 10/17/07, Robert Bradshaw [EMAIL PROTECTED] wrote:

 I actually had this question too. Was it just to place it under the
 main sage revision control?

 - Robert

 On Oct 17, 2007, at 6:46 AM, Matt F wrote:


 Hi -

 I'm new to Sage and I was just wondering why the javascript for the
 notebook was all placed in a string rather than just a javascript  
 file
 or straight embedding into the web pages.

 Thanks for any response.







 

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Python Javascript String

2007-10-17 Thread Timothy Clemans

On 10/17/07, Bobby Moretti [EMAIL PROTECTED] wrote:

 Is there any reason that a .js file could not be placed in the same
 directory as the server code, as part of the main source repository?


In the Knoboo source code, images, js files, html files, css files,
python files, etc are intermixed.
http://trac.knoboo.com/browser/trunk/knoboo/knoboo

I guess if they are doing that then it could be done that way in Sage.

 -Bobby

 On 10/17/07, Robert Bradshaw [EMAIL PROTECTED] wrote:
 
  Yes, it is under a different repository. The advantage of placing it
  under the main one, however, is that much of it seems tightly coupled
  to the python source in that same repository, so one could commit
  javascript and python server changes in sync.
 
  - Robert
 
  On Oct 17, 2007, at 9:48 AM, Timothy Clemans wrote:
 
   Isn't extcode also under revision control. The plain txt js file would
   be located in extcode right?
  
   On 10/17/07, Robert Bradshaw [EMAIL PROTECTED] wrote:
  
   I actually had this question too. Was it just to place it under the
   main sage revision control?
  
   - Robert
  
   On Oct 17, 2007, at 6:46 AM, Matt F wrote:
  
  
   Hi -
  
   I'm new to Sage and I was just wondering why the javascript for the
   notebook was all placed in a string rather than just a javascript
   file
   or straight embedding into the web pages.
  
   Thanks for any response.
  
  
  
  
  
  
  
  
 
  
 


 --
 Bobby Moretti
 [EMAIL PROTECTED]

 


--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Python Javascript String

2007-10-17 Thread boothby

The short answer is, because that's what either William, Alex Clemesha, or I 
did when the notebook had about a hundred lines of javascript associated with 
it.  And nobody has bothered to change it since.  I've never considered it to 
be a problem, and it makes sense in css.py since substitutions are made for 
color schemes.

If you want to fix it, I'll be happy to referee the patch.


On Wed, 17 Oct 2007, Matt F wrote:


 Hi -

 I'm new to Sage and I was just wondering why the javascript for the
 notebook was all placed in a string rather than just a javascript file
 or straight embedding into the web pages.

 Thanks for any response.


 




--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Python Javascript String

2007-10-17 Thread William Stein

On 10/17/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 The short answer is, because that's what either William, Alex Clemesha, or I 
 did when the notebook had about a hundred lines of javascript associated with 
 it.  And nobody has bothered to change it since.  I've never considered it to 
 be a problem, and it makes sense in css.py since substitutions are made for 
 color schemes.

 If you want to fix it, I'll be happy to referee the patch.

If you change the file to a .js file, then it can be quite tricky to
actually *find* the file
at runtime in a reliable way.   I.e., there are some nontrivial
technical issues with
changing the file
form .py to .js or .css, because code is not run from SAGE_ROOT/devel, it is
run form SAGE_ROOT/local/lib/python/site-packages, after it is installed.

The natural solution would be to put the file in extcode, but this has a whole
set of other problems, as mentioned above, because of tight integration between
that code and other notebook code.

William

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Python Javascript String

2007-10-17 Thread Matt F

I guess this leads to another question then...is there any desire to
removing the tight coupling? As I'm sure many programmers have been
taught, tight coupling isn't a good practice...sorry if that sounds
pompous or arrogant, it isn't meant to be.


--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Python Javascript String

2007-10-17 Thread Mike Hansen

 I guess this leads to another question then...is there any desire to
 removing the tight coupling? As I'm sure many programmers have been
 taught, tight coupling isn't a good practice...sorry if that sounds
 pompous or arrogant, it isn't meant to be.

I don't think the coupling is that tight since it's just a bunch of
triple-quoted strings in a .py file.  One can change the Python code
without changing the Javascript and vice-versa.  And as William
mentioned, there are some advantages to keeping it in js.py.

--Mike

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---