sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.44k stars 480 forks source link

revision of programming guide #3905

Closed jhpalmieri closed 16 years ago

jhpalmieri commented 16 years ago

I've edited the programming guide; this has involved a fair amount of reorganization, some rewriting, some deleting, and some new stuff. I hope I haven't removed anyone's favorite part.

The coercion section is unchanged, because of comments by craigcitro in #3738: I hope he produces a new coercion section for this document.

The section after coercion, on mutability, is unchanged, although it needs to be expanded. I don't really understand the issues involved, so I don't think I'm the right person to do this.

The new version also has nothing on benchmarking or profiling. Feel free to write something and produce a patch.

Meanwhile, in addition to the patch, you can look at a PDF version of the guide here: http://www.math.washington.edu/~palmieri/Sage/prog.pdf

Once this ticket is merged we can close:

CC: @robertwb @mwhansen

Component: documentation

Keywords: programming guide

Issue created by migration from https://trac.sagemath.org/ticket/3905

jhpalmieri commented 16 years ago
comment:1

(By the way, this patch also fixes the issue raised in #3393. If this patch gets merged into Sage, we should close that ticket, too.)

jhpalmieri commented 16 years ago

Attachment: prog.patch.gz

malb commented 16 years ago
comment:2

Page 1

Page 2

Page 3

Page 9

Page 11

Page 12

Page 13

Page 14

Page 15

Page 16

Page 17

Page 18

Page 19

Page 22

Page 23

Page 24

Page 27

Page 29

Page 30

Page 31

Page 32

Page 33

Page 34

Page 35

Page 38

Page 41

Page 45

Page 49

Page 53

Page 54

Page 55

Page 56

Page 60

Page 63

Page 65

Page 66

malb commented 16 years ago
comment:3

Hi, I've posted my notes above. Please be soft on me w.r.t. to the wording which might be perceived as rude/commanding. I don't mean it that way rather these are just short notes with suggestions/impressions etc. I hope you don't take offense.

jhpalmieri commented 16 years ago
comment:4

Thanks for the comments. I will be busy with some other work for a while, and then I'll have time to try to deal with these. I will probably have questions about some of them, because I don't understand everything that I probably should.

Meanwhile, if you have more comments, please let me know.

malb commented 16 years ago

my comments from trac as a patch

malb commented 16 years ago
comment:6

Attachment: prog.2.patch.gz

Hi there, I made my comments into a patch which ought to be applied after John's patch. This is not perfect or release quality and it still needs some heavy editing. Maybe someone can get through the new prog.tex and make sure it is not worse than what we currently ship and then we can apply both patches? Then, mhansen can convert the Developer's guide to Sphinx and we can go on editing it afterwards?

jhpalmieri commented 16 years ago
comment:7

As I said earlier, I don't have time to work on this right now, so thanks for doing this. After a quick glance, malb's patch looks good to me (although I just looked at the diff, I didn't apply it and build the new documentation). I was sort of thinking that the authors could be "The Sage Hive Mind" :), but the "The Sage Group" is okay, too. I wonder if the lines

This document was authored by William Stein, David Joyner, John Palmieri 
and others with the editorial help of Iftikhar Burhanuddin and Martin Albrecht. 

should be deleted altogether? Or replaced with (a footnote?)

The first version of this document was authored by William Stein and David 
Joyner with the editorial help of ...; various members of the Sage group have 
contributed to later editions, following the procedures outlined in 
Chapters ?? and ??

I don't care that much about attribution, since I feel like I just reorganized and edited: I'm not sure that I added enough content to distinguish me from the rest of the Sage Group. But I won't fight it if you want to keep my name there. (The important thing from my point of view is that we're getting a more-or-less up-to-date version of this documentation, and that seems to be happening.)

In any case, I'm happy other people are working on this, too, and I'm looking forward to seeing the Sphinx version.

malb commented 16 years ago
comment:8

Replying to @jhpalmieri:

In any case, I'm happy other people are working on this, too, and I'm looking forward to seeing the Sphinx version.

Lets sort out the attribution thing after the Sphinx-isation? But I also don't mind getting rid of that sentence.

jhpalmieri commented 16 years ago
comment:9

By the way, do the patches here take care of #1647 and #1648? How about #2078? #2422? (And I already pointed out #3393.)

If this is closed, I think those others should be as well. (It's always fun to close a lot of tickets, right?)

85eec1a4-3d04-4b4d-b711-d4db03337c41 commented 16 years ago

Description changed:

--- 
+++ 
@@ -8,3 +8,10 @@

 Meanwhile, in addition to the patch, you can look at a PDF version of the guide here:
 [http://www.math.washington.edu/~palmieri/Sage/prog.pdf](http://www.math.washington.edu/~palmieri/Sage/prog.pdf)
+
+Once this ticket is merged we can close:
+* #1647
+* #1648
+* #2078
+* #2422
+* #3393
85eec1a4-3d04-4b4d-b711-d4db03337c41 commented 16 years ago
comment:10

Thanks for pointing that out. I mentioned this ticket on the tickets you mentioned.

Cheers,

Michael

89c6e537-b2e3-45e6-882d-d4957b74ffe5 commented 16 years ago
comment:11

mabshoff is looking at the first patch, I've looked over the second patch, and the only complaint I have is that approx. line 312 isn't grammatical:

It is {\em very important} that you include your name in
the AUTHOR log, since everybody who submits code to \sage
to receive proper credit...

They should receive proper credit...

85eec1a4-3d04-4b4d-b711-d4db03337c41 commented 16 years ago
comment:12

Replying to @rlmill:

They should receive proper credit...

That section is being deleted, so no harm done :)

rlm and I read over the patches and it is better to get them in (even if they are slighly imperfect) than to let them bitrot. The remaining issues can be addressed via follow up tickets. This work by John and Martin is certainly long needed and a great improvement to the documentation.

Cheers,

Michael

85eec1a4-3d04-4b4d-b711-d4db03337c41 commented 16 years ago
comment:13

Unfortunately Martin's patch breaks the doctests. Some of them can be fixed by adding

sage: K.<x> = QQ[]
sage: G = PermutationGroup([[(1,2,3),(4,5)], [(1,2)]])
sage: rgp = Gp()
sage: def gap_randstring(n):
...       current_randstate().set_seed_gap()
...       return gap(n).SCRRandomString()
sage: def rtest():
...       current_randstate().set_seed_gp(rgp)
...       return (ZZ.random_element(1000), RR.random_element(),
...               K.random_element(), G.random_element(),
...               gap_randstring(5),
...               rgp.random(), ntl.ZZ_random(99999),
...               random())

to a bunch of the randgen examples, but I consider that too ugly a solution to do it.

We could take out the randgen chapter for now and deal with it at a later ticket. Thoughts?

Cheers,

Michael

89c6e537-b2e3-45e6-882d-d4957b74ffe5 commented 16 years ago
comment:14

The PRNG stuff is very well documented in the relevant modules. Perhaps a pointer in that direction is enough?

85eec1a4-3d04-4b4d-b711-d4db03337c41 commented 16 years ago
comment:15

Replying to @rlmill:

The PRNG stuff is very well documented in the relevant modules. Perhaps a pointer in that direction is enough?

I definitely agree, so I am merging malb's patch without the PRNG section. We will deal with that problem down the road. Time to get alpha3 out.

Cheers,

Michael

85eec1a4-3d04-4b4d-b711-d4db03337c41 commented 16 years ago
comment:16

Merged both patches in Sage 3.1.2.alpha3