Re: [sage-devel] Re: [sage-edu] Re: Sage-enabled textbook for Abstract Algebra

2015-08-01 Thread Michael Orlitzky
On 07/31/2015 07:06 PM, Dima Pasechnik wrote:
> 
> You don't need a closing tag that can be inserted by software, 
> as certainly is the case for \section or \item..
> (unless you spent a large part of your life writing HTML or XML by hand, 
> of course :-))
> 

The parser can insert them for you, but there are a lot of cases where
it's not at all clear *where* the closing tag should go. Often, the
presence of the opening tag is the bug -- not the absence of the closing
tag. In that case adding the closing tags just makes things worse.

Compare e.g. an XHTML 1.1 parser with an HTML5 parser. In XHTML, closing
tags are required, but in HTML they're not. Writing an XHTML parser is
simple -- any small XML parser will do -- but an HTML "parser" requires
lots of ugly logic.

I put "parser" in scare-quotes because you can't really parse HTML; you
have to "tag soup" it. Most of the additional crud in an HTML parser is
devoted to on-the-fly error handling (the user started a list item
within a table within a paragraph and didn't close anything?). If you
want to leave off your closing tags, in theory it's no problem -- once
you know the error handling rules, you know where the closing tag will
be added, and that's where it will go. But no one understands all of the
error-handling rules, so no one really knows what's going to happen when
they leave off a closing tag. It's very easy to trick people with short
examples.

So ultimately, it's just easier to spend some extra milliseconds putting
the closing tag where you know you want it. Otherwise, the first time
you have to debug a display issue twenty levels deep in some parser's
error-handling routine, you're going to find yourself in the red.

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


[sage-devel] Re: Sage-enabled textbook for Abstract Algebra

2015-08-01 Thread Rob Beezer
Thanks, Bill. It continues to be fun and there's lots more to do.  But I am 
also looking forward to writing more content myself. ;-)

Rob

On Saturday, August 1, 2015 at 2:54:37 AM UTC-7, Bill Hart wrote:
>
> Rob, this is truly fantastic work. I want to congratulate you on getting 
> this up and running!
>

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


[sage-devel] Re: Sage-enabled textbook for Abstract Algebra

2015-08-01 Thread Rob Beezer
Dear Bernard,

I was thinking more of the "static" HTML pages you sent that had been 
generated from TeX/LaTeX with your GIAC extensions (giac.tex).  The 
mathematics on those pages might look better with MathJax and that would be 
an easier scenario to configure.

For the calculator page you just sent in this message, you need to be more 
careful.  When you output some result and add it to the page, then you have 
to instruct MathJax to process that material again.  This gets a bit tricky 
and I can't say I fully understand the order in which MathJax processes a 
page (relative to everything else).  And the delimiters may need to be "\[, 
\]" rather than double-dollar for display math.

http://docs.mathjax.org/en/latest/typeset.html

The later processing is something "knowls" (like embedded pop-ups) need to 
handle.  So there could b some hints in the Javascript here:

http://aimath.org/knowl.js

Rob

On Saturday, August 1, 2015 at 1:28:01 AM UTC-7, parisse wrote:
>
>
>
> Le samedi 1 août 2015 02:17:34 UTC+2, Rob Beezer a écrit :
>>
>> Dear Bernard,
>>
>> Thanks for the note and links.  I was not very aware of GIAC.  It could 
>> be a useful thing for MathBook XML authors to have available.
>>
>> Have you considered using MathJax within your HTML output?  It too is 
>> Javascript and can be configured to execute locally.
>>
>>
> I got disappointing results for dynamic rendering (bugs, slowness) when 
> using latex/mathjax for Xcas offline in the browser, perhaps because I do 
> not use mathjax properly.
> Compare latex/mathjax 
>  with 
> Firefox/mathml 
>  
>

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


Re: [sage-devel] Trac notifications (was Re: Mutability of matrices with no entries)

2015-08-01 Thread R. Andrew Ohana
On Aug 1, 2015 13:21, "Michael Orlitzky"  wrote:
>
> On 07/31/2015 07:51 PM, Andrey Novoseltsev wrote:
> > Hello,
> >
> > While working on http://trac.sagemath.org/ticket/18613 I ran into the
> > following problem:
>
> Argh, the trac notifications still aren't fixed. Can someone please add
> a reverse DNS entry for 128.208.160.253 (the server that's sending the
> notifications)? The PTR should be "trac.sagemath.org" since that's the
> name the server is saying "HELO" with.

I've made a request to UW to add the DNS entry (since they are effectively
our ISP), but they like to take their time. I finally got a response on the
ticket I opened last night, so hopefully this will be resolved soon.

>
> --
> You received this message because you are subscribed to the Google Groups
"sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
email to sage-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-devel.
> 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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: [sage-edu] Re: Sage-enabled textbook for Abstract Algebra

2015-08-01 Thread Rob Beezer
On Saturday, August 1, 2015 at 3:12:38 AM UTC-7, Dima Pasechnik wrote:

> IMHO we should think about moving non-technical Sage docs to mathbook.
>>
> write an automatic converted, why not...
>  
>

Sage-flavored ReST/Sphinx might be structured/predictable enough to be very 
amenable to this. 

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


[sage-devel] Re: [sage-edu] Re: Sage-enabled textbook for Abstract Algebra

2015-08-01 Thread Rob Beezer


On Saturday, August 1, 2015 at 2:05:07 AM UTC-7, Dima Pasechnik wrote:

> Perhaps they should rather generate your XML? (beezertex filename ;-))
> No, seriously...
>

Yes, seriously.  ;-)  I hope that something like this will be in place 
eventually.
 

> Please note that I actually rather like the way the e-book in question 
> looks like, it's great in this way.  And, by the way, looks good on an 
> Android tablet too...
>

Thanks for the testing, and I'm glad you like the end-product.  All the 
CSS/Javascript is by a student of mine, Michael DuBois, who was supported 
at the tail end of the last NSF education grant (UTMOST).  The small-screen 
interface never would have happened without him.

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


[sage-devel] Trac notifications (was Re: Mutability of matrices with no entries)

2015-08-01 Thread Michael Orlitzky
On 07/31/2015 07:51 PM, Andrey Novoseltsev wrote:
> Hello,
> 
> While working on http://trac.sagemath.org/ticket/18613 I ran into the
> following problem:

Argh, the trac notifications still aren't fixed. Can someone please add
a reverse DNS entry for 128.208.160.253 (the server that's sending the
notifications)? The PTR should be "trac.sagemath.org" since that's the
name the server is saying "HELO" with.

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


[sage-devel] Re: [sage-edu] Re: Sage-enabled textbook for Abstract Algebra

2015-08-01 Thread Rob Beezer


On Saturday, August 1, 2015 at 2:45:16 AM UTC-7, Volker Braun wrote:

> It would be nice if Sage cells would know about which cells they depend 
> on; Right now evaluating a cell in the middle is very likely to cough up an 
> error message about something not being defined.
>

Yes, Sage Cells are "linked" with all the others on a page, but you 
typically want to execute them in order, so starting in the middle can be a 
disaster.  MathBook XML is very flexible about "chunking" - so you can 
decide whether a section is a whole web page, or if a subsection is a 
webpage, or ...  So you have some control about how many cells are enclosed 
as a unit.  (And you should make this decision early while writing Sage 
cells!)

There is also the inverse problem of defining some complicated object in a 
Sage Cell on some previous page and wanting to reuse it.  This is solved 
partially by being able to use a cross-reference from the second page back 
to the cell on the previous page.  The code still needs to re-run, but the 
author does not need to create and maintain the second version.

IMHO we should think about moving non-technical Sage docs to mathbook.
>

 Of course, I'd stand ready to help with technical advice and additions to 
MathBook XML to support this.  The underlying HTML is meant to be very 
semantic/structural/skinnable (without being too impractical), so ideally 
it would be possible to retain all the navigation, but also give a 
Sage-blue look and branding.

An example with lots of Sage, which has a feel similar to the thematic 
tutorials, is at:

http://linear.ups.edu/eagts/

With Sage 6.7, nineteen (out of 417) doctests are failing since the last 
update was Sage 5.12, so it needs just a bit of clean-up.  Mostly 
deprecations, and rearrangments of output format.

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


[sage-devel] Re: [sage-edu] Re: Sage-enabled textbook for Abstract Algebra

2015-08-01 Thread Dima Pasechnik


On Saturday, 1 August 2015 10:45:16 UTC+1, Volker Braun wrote:
>
> On Saturday, August 1, 2015 at 4:14:33 AM UTC+2, Rob Beezer wrote:
>>
>> Seems only tex can understand TeX.  ;-) 
>>
>
> Tex it a Turing-complete language, XML is not. Hence only TeX can 
> understand TeX,
>
 
 Rather, "Wahr sind nur die Gedanken, die sich selber nicht verstehen"
 

> but for XML there are various 100% compliant parsers and converters. IMHO 
> your decision to use XML is spot-on, its the right tool for the job.
>

Yeah, let us forbid Turing-complete languages, they are just too dangerous. 
Volker, have you secretly started on rewriting Sage a straight-line program?


> IMHO we should think about moving non-technical Sage docs to mathbook.
>
write an automatic converted, why not...
 

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


[sage-devel] Re: Sage-enabled textbook for Abstract Algebra

2015-08-01 Thread Bill Hart
Rob, this is truly fantastic work. I want to congratulate you on getting 
this up and running!

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


[sage-devel] Re: [sage-edu] Re: Sage-enabled textbook for Abstract Algebra

2015-08-01 Thread Volker Braun
On Saturday, August 1, 2015 at 4:14:33 AM UTC+2, Rob Beezer wrote:
>
> Seems only tex can understand TeX.  ;-) 
>

Tex it a Turing-complete language, XML is not. Hence only TeX can 
understand TeX, but for XML there are various 100% compliant parsers and 
converters. IMHO your decision to use XML is spot-on, its the right tool 
for the job.

It would be nice if Sage cells would know about which cells they depend on; 
Right now evaluating a cell in the middle is very likely to cough up an 
error message about something not being defined.

IMHO we should think about moving non-technical Sage docs to mathbook.

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


[sage-devel] Re: [sage-edu] Re: Sage-enabled textbook for Abstract Algebra

2015-08-01 Thread Dima Pasechnik


On Saturday, 1 August 2015 03:14:33 UTC+1, Rob Beezer wrote:
>
> On 07/31/2015 05:25 PM, Dima Pasechnik wrote: 
> > And if it is so easy to convert LaTeX into HTML, why hasn't anybody 
> done it 
> > successfully?  tex4ht  is the only one I know that comes close, and 
> only 
> > because it is the only one that uses the tex executable. 
> > 
> > sure, why is this bad to use the tex executable? Because it has to be 
> done on 
> > the fly in your browser? Well, I cannot care less -- perhaps someone 
> should 
> > develop a NaCL implementation of (La)TeX to be runnable in the browser? 
>
> Not bad to use the tex executable.  That is the key design decision in 
> tex4ht 
> that makes it as good as it is.  Seems only tex can understand TeX.  ;-) 
>

Perhaps they should rather generate your XML? (beezertex filename ;-))
No, seriously...

Please note that I actually rather like the way the e-book in question 
looks like, it's great in this way.  And, by the way, looks good on an 
Android tablet too...

 

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


[sage-devel] Re: Mutability of matrices with no entries

2015-08-01 Thread Volker Braun
The principle of least surprise would suggest that mutability should follow 
the same rules independent of the matrix size. And echelon_form should 
always return an immutable matrix.




On Saturday, August 1, 2015 at 1:51:12 AM UTC+2, Andrey Novoseltsev wrote:
>
> Hello,
>
> While working on http://trac.sagemath.org/ticket/18613 I ran into the 
> following problem:
>
> sage: matrix(2, 1).echelon_form().is_mutable()
> False
> sage: matrix(2, 0).echelon_form().is_mutable()
> True
>
> i.e. while usually echelon_form returns an immutable matrix this is not 
> the case with trivial ones. The reason is in the beginning of its code:
>
> if self._nrows == 0 or self._ncols == 0:
> self.cache('pivots', ())
> self.cache('rank', 0)
> if transformation:
> return self, self
> return self
>
> The question is how to fix it:
> 1) make here a copy of self, set it to be immutable, and return it
> 2) make self immutable and return self
> 3) always make matrices without elements immutable (not sure if this can 
> be done in one place or in several implementations)
>
> It seems that 3) is the most sensible, but what if some code checks for 
> the ability to change a matrix a refuses to work with immutable ones? Any 
> suggestions?
>
> Thank you!
> Andrey
>
>

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


[sage-devel] Re: Sage-enabled textbook for Abstract Algebra

2015-08-01 Thread parisse


Le samedi 1 août 2015 02:17:34 UTC+2, Rob Beezer a écrit :
>
> Dear Bernard,
>
> Thanks for the note and links.  I was not very aware of GIAC.  It could be 
> a useful thing for MathBook XML authors to have available.
>
> Have you considered using MathJax within your HTML output?  It too is 
> Javascript and can be configured to execute locally.
>
>
I got disappointing results for dynamic rendering (bugs, slowness) when 
using latex/mathjax for Xcas offline in the browser, perhaps because I do 
not use mathjax properly.
Compare latex/mathjax 
 with 
Firefox/mathml 
 

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


[sage-devel] Re: Sage-enabled textbook for Abstract Algebra

2015-08-01 Thread parisse


Le samedi 1 août 2015 02:17:34 UTC+2, Rob Beezer a écrit :
>
> Dear Bernard,
>
> Thanks for the note and links.  I was not very aware of GIAC.  It could be 
> a useful thing for MathBook XML authors to have available.
>
> Have you considered using MathJax within your HTML output?  It too is 
> Javascript and can be configured to execute locally.
>
>  
I just made a try for Xcas offline in the browser because Chrome or IE do 
not implement mathml output. Using latex output from giac, I get however 
disappointing results for dynamic rendering (it's buggy), perhaps because I 
don't know how to use mathjax properly. And it's slow. Look at the 
difference between Firefox/Mathml 
 and Latex/Mathjax. 


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


Re: [sage-devel] Re: using lower case to name functionality/constructor after a person?

2015-08-01 Thread Nathann Cohen
> Some people may know that in German we generally spell nouns upper-case.
> Nonetheless, I am in favour of spelling the names in function names
> lower-case, because of a comment of some of my maths professors. He said
> that it is a great honour for a mathematician if his/her name is finally
> used as an adjective and thus with lower case.

Amen to that. An upper case indicates a citation, while a lower case
indicates that the guy is part of the mathematical theory.

The same way that there are many theorems bearing some guy's name, but
when "X's Lemma" gets famous... Then you know it's the real deal ;-)

Nathann

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


[sage-devel] Re: using lower case to name functionality/constructor after a person?

2015-08-01 Thread Simon King
Hi!

On 2015-07-31, Andrey Novoseltsev  wrote:
> On Friday, 31 July 2015 02:59:26 UTC-6, Dima Pasechnik wrote:
>>
>> In various places one sees things like Graph.tutte_polynomial, 
>> Graph.lovasz_theta; whenever I see this (leave alone writing code like 
>> this) I feel this is a typo, and it must become Graph.Tutte_polynomial, etc.
>>
>> Am I alone here, or this ought to be capitalised throughout?
>>
>> Dima
>>
>
> I have exactly the same feelings - it is one thing to have conventions for 
> words that can be spelled either way, but it seems to me that since names 
> are always written with capital, that's how it should be written in the 
> code as well.

Some people may know that in German we generally spell nouns upper-case.
Nonetheless, I am in favour of spelling the names in function names
lower-case, because of a comment of some of my maths professors. He said
that it is a great honour for a mathematician if his/her name is finally
used as an adjective and thus with lower case.

Also it is a great honour to appear in a function name and thus lower
case...

Best regards,
Simon


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