#15246 closed enhancement (fixed)
add xkcd function to sage
Reported by:  mderickx  Owned by:  

Priority:  minor  Milestone:  sage6.4 
Component:  user interface  Keywords:  
Cc:  Merged in:  
Authors:  Maarten Derickx, André Apitzsch  Reviewers:  Travis Scrimshaw 
Report Upstream:  N/A  Work issues:  
Branch:  dfc8753 (Commits, GitHub, GitLab)  Commit:  
Dependencies:  Stopgaps: 
Description
Sage already has an xgcd function but no xkcd function. We should really change that.
Attachments (1)
Change History (32)
comment:1 Changed 9 years ago by
 Component changed from number fields to number theory
 Status changed from new to needs_review
comment:2 Changed 9 years ago by
 Status changed from needs_review to needs_work
Changed 9 years ago by
comment:3 Changed 9 years ago by
 Status changed from needs_work to needs_review
comment:4 Changed 9 years ago by
Ok, I changed the patch according to your comment.
comment:5 Changed 8 years ago by
 Milestone changed from sage6.0 to sage6.1
comment:6 Changed 8 years ago by
 Milestone changed from sage6.1 to sageduplicate/invalid/wontfix
 Reviewers set to Frédéric Chapoton
 Status changed from needs_review to positive_review
Useless. Sage is not the place for that.
comment:7 Changed 8 years ago by
 Status changed from positive_review to needs_review
Reassigning a ticket to "won't fix" and giving the positive review by the same person is bad form. I happen to think it's a fun easter egg. Xkcd often does have relevant and highly quotable mathematicsrelated cartoons.
comment:8 Changed 8 years ago by
Ok.
Sorry for misbehaving.
I still think that this has nothing to do here, and that kids should go and play elsewhere.
comment:9 Changed 8 years ago by
 Reviewers Frédéric Chapoton deleted
comment:10 followup: ↓ 11 Changed 8 years ago by
I happen to think there is a valid reason to insert this easter egg: it might earn Sage a mention in a future xkcd comic, which would be excellent marketing. I can even imagine a "Droste effect" where one of the characters uses Sage, mistypes the xgcd command and sees... him/herself.
My one complaint is the use of an NSFW doctest. Surely we can be less immature than that! (This reminds me of the discovery of "B00B135" in some shipped Microsoft code. Not helpful.)
comment:11 in reply to: ↑ 10 Changed 8 years ago by
I happen to think there is a valid reason to insert this easter egg: it might earn Sage a mention in a future xkcd comic, which would be excellent marketing. I can even imagine a "Droste effect" where one of the characters uses Sage, mistypes the xgcd command and sees... him/herself.
Given that the author has already been interviewed in Math Horizons, I think this is a definite possibility.
My one complaint is the use of an NSFW doctest. Surely we can be less immature than that! (This reminds me of the discovery of "B00B135" in some shipped Microsoft code. Not helpful.)
Hmm, very good point. Although the specific comic itself is probably one of the greatest ones out there for "pure" math types (though I was amazed at the haters out there for this one). Maybe we can use the ... in the title attribute of the img link? Or do you have a different comic suggestion? I looked a few just now but the rest of the better mathspecific ones are (of course) somewhat more subdiscipline specific.
comment:12 Changed 8 years ago by
 Component changed from number theory to user interface
 Priority changed from major to minor
However, let's move it to the correct component :)
comment:13 Changed 8 years ago by
So this ticket seems that this ticket is getting some attention again. I would like to adres the comments above so that this ticket can get a positive review and get merged.
However before this the question: should this ticket be "won't fix" or should it be given a mile stone again in order to get merged still has to be settled. Right now there only seems to be one person that thinks that this should be "won't fix". So I would say we should give it a mile stone again. But it doesn't feel like good behavior to do that myself as I am the author of this ticket.
comment:14 Changed 8 years ago by
 Milestone changed from sageduplicate/invalid/wontfix to sage6.1
Sorry, I had meant to change the milestone back but I forgot.
comment:15 Changed 8 years ago by
 Milestone changed from sage6.1 to sage6.2
comment:16 Changed 8 years ago by
 Milestone changed from sage6.2 to sage6.3
comment:17 Changed 8 years ago by
 Branch set to u/aapitzsch/ticket/15246
 Commit set to 9743e619e17a8ff40682261f9908b5b5d1e4f2dd
comment:18 Changed 8 years ago by
 Status changed from needs_review to needs_work
 Please remove the alt text as requested by Kedlaya.
 Never use a bare
except:
, always useexcept Exception:
or even better, catch a specific exception.
 Can you avoid the
finally: file.close()
using awith:
statement?
comment:19 Changed 8 years ago by
On further reflection, I suppose we should still doctest alt text. Maybe use comic 353 (Python) for that instead?
comment:20 Changed 8 years ago by
 Commit changed from 9743e619e17a8ff40682261f9908b5b5d1e4f2dd to 9f39fa108ec6d0bda1db8265d93563ee8fdb72a2
comment:21 Changed 8 years ago by
 Status changed from needs_work to needs_review
comment:22 followup: ↓ 23 Changed 8 years ago by
Rebase perhaps? Given that the original doctest was considered unprofessional, perhaps we do not want it to become part of the history of sage?
comment:23 in reply to: ↑ 22 Changed 8 years ago by
 Branch changed from u/aapitzsch/ticket/15246 to u/aapitzsch/ticket/15246_xkcd
 Commit changed from 9f39fa108ec6d0bda1db8265d93563ee8fdb72a2 to b7cd4584da0fbe3436a2e0fd2dc396182353affa
Replying to nbruin:
Rebase perhaps? Given that the original doctest was considered unprofessional, perhaps we do not want it to become part of the history of sage?
Done.
comment:24 Changed 8 years ago by
 Branch changed from u/aapitzsch/ticket/15246_xkcd to u/jdemeyer/ticket/15246
 Created changed from 10/01/13 13:39:27 to 10/01/13 13:39:27
 Modified changed from 08/03/14 19:56:17 to 08/03/14 19:56:17
comment:25 Changed 8 years ago by
 Commit changed from b7cd4584da0fbe3436a2e0fd2dc396182353affa to dfc8753829cc5fcf256a6698b94206fb50de797e
New commits:
dfc8753  Use xkcd comic number from json data

comment:26 Changed 8 years ago by
 Milestone changed from sage6.3 to sage6.4
comment:27 Changed 8 years ago by
 Reviewers set to Travis Scrimshaw
 Status changed from needs_review to positive_review
LGTM (unless it's easy to open a web browser only in the command line a la import antigravity
).
comment:28 Changed 8 years ago by
 Branch changed from u/jdemeyer/ticket/15246 to dfc8753829cc5fcf256a6698b94206fb50de797e
 Resolution set to fixed
 Status changed from positive_review to closed
comment:29 Changed 8 years ago by
 Commit dfc8753829cc5fcf256a6698b94206fb50de797e deleted
AT LAST !
Nathann
comment:30 Changed 8 years ago by
HMmmm... Looks like sending this message erased the "commit" field, but I can't set it back O_o
Nathann
comment:31 Changed 5 years ago by
See #23348 as a followup.
Use a python 3 compatible syntax to raise errors