Re: [sage-combinat-devel] Making code for some seminormal representations faster
I'm currently going around in circles with some CombinatorialFreeModule woes. The previous code for these alternating seminormal forms works, but in order to cope with the many variations of seminormal representations that I decided to implement working I've have had to jazz things up quite a lot. Now my basic class structure looks something like this: from sage.combinat.free_module import CombinatorialFreeModule from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing class A(CombinatorialFreeModule): def __init__(self, base_ring, basis_keys, prefix='a', **kwargs): super(A,self).__init__(base_ring, basis_keys, prefix=prefix, ** kwargs) class Element(CombinatorialFreeModule.Element): pass class B(A): def __init__(self, base_ring, basis_keys, prefix='b', **kwargs): super(B,self).__init__(base_ring, basis_keys, prefix=prefix, ** kwargs) class C(B): def __init__(self, shape, prefix='c', **kwargs): base_ring=PolynomialRing(Integers(), 'q') super(B,self).__init__(base_ring, shape.standard_tableaux(), prefix= prefix, **kwargs) This simplified code works fine. For example, sage: C(Partition([3,2])).an_element() 2*c[[[1, 2, 5], [3, 4]]] + 3*c[[[1, 3, 4], [2, 5]]] + 2*c[[[1, 3, 5], [2, 4 ]]] Unfortunately my real code does not work, having issues like: sage: rep=SeminormalRepresentation([2,1]); rep SeminormalRepresentation([2,1])# seems to work OK sage: rep.an_element() # try to construct an element repr(sage.algebras.iwahori_hecke_algebras. iwahori_hecke_algebra_representations.SeminormalRepresentation_with_category .element_class at 0x119a88c80) failed: AttributeError: 'SeminormalRepresentation_with_category' object has no attribute '_prefix' sage: rep(StandardTableau([[1,2],[3]])) AttributeErrorTraceback (most recent call last) ... AttributeError: 'SeminormalRepresentation_with_category' object has no attribute '_basis_keys' Does anyone have an idea of what is going wrong. Part of the issue might be all of the super calls, but I tried taking though ut and explcitly calling the previous class (they are linearly ordered), but this doesn't help. For anyone feeling masochistic, the full code is at trac:17303 http://trac.sagemath.org/ticket/17303 (it uses 6.5beta0) Andrew -- You received this message because you are subscribed to the Google Groups sage-combinat-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-combinat-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-combinat-devel. For more options, visit https://groups.google.com/d/optout.
Re: [sage-combinat-devel] A small hint in Symmetric Functions
Salut Nicolas! On Thu, Nov 20, 2014 at 12:19:15PM +0100, Nicolas Borie wrote: As I was constructing some Free Modules over the symmetric functions, I fall on this (sage 6.4.beta2 for my version (yes, that's probably old)): sage: SymmetricFunctions(QQ) in CommutativeRings() False sage: SymmetricFunctions(QQ).a_realization() in CommutativeRings() True I would have loved that the two lines return True. If I say no mistakes, the symmetric functions should be an abstract parent with severals realizations. The category is *probably* initialized in sf.py with the line: Parent.__init__(self, category = GradedHopfAlgebras(R).WithRealizations()) Is this enought to change this category for the following one (with QQ replaced by R in the source code naturally) ? sage: GradedHopfAlgebras(QQ).Commutative().WithRealizations() +1 While you are at it, you might as well want to go for: HopfAlgebras(R).Graded().Connected().Commutative().WithRealizations() Perhaps this question is relatively empty but I didn't contribute to Sage for something like a year. I just reviewed 2 tickets the last 6 month and I am still scared of using git (don't laugh please!). So I asked before since a such one line patch cost 10 minutes for git lovers but probably 2 hours with the cheat-sheet of Volker for me. Ok, I just heard someone saying that it will need one than one line since it could be nice to add the proper test in the documentation... Rhoo This sounds like a perfect ticket for a come back. The extra time you'll spend there is a long term investment anyway. Cheers, Nicolas -- Nicolas M. Thiéry Isil nthi...@users.sf.net http://Nicolas.Thiery.name/ -- You received this message because you are subscribed to the Google Groups sage-combinat-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-combinat-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-combinat-devel. For more options, visit https://groups.google.com/d/optout.
Re: [sage-combinat-devel] Making code for some seminormal representations faster
Hmmm... I don't see anything from a quick read of the code why this is going wrong. I'll take a more detailed look today. Best, Travis On Friday, November 21, 2014 5:55:51 AM UTC-8, Andrew wrote: I'm currently going around in circles with some CombinatorialFreeModule woes. The previous code for these alternating seminormal forms works, but in order to cope with the many variations of seminormal representations that I decided to implement, I've have had to jazz things up quite a lot. Now my basic class structure looks something like this: from sage.combinat.free_module import CombinatorialFreeModule from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing class A(CombinatorialFreeModule): def __init__(self, base_ring, basis_keys, prefix='a', **kwargs): super(A,self).__init__(base_ring, basis_keys, prefix=prefix, ** kwargs) class Element(CombinatorialFreeModule.Element): pass class B(A): def __init__(self, base_ring, basis_keys, prefix='b', **kwargs): super(B,self).__init__(base_ring, basis_keys, prefix=prefix, ** kwargs) class C(B): def __init__(self, shape, prefix='c', **kwargs): base_ring=PolynomialRing(Integers(), 'q') super(B,self).__init__(base_ring, shape.standard_tableaux(), prefix=prefix, **kwargs) This simplified code works fine. For example, sage: C(Partition([3,2])).an_element() 2*c[[[1, 2, 5], [3, 4]]] + 3*c[[[1, 3, 4], [2, 5]]] + 2*c[[[1, 3, 5], [2, 4]]] Unfortunately my real code does not work, having issues like: sage: rep=SeminormalRepresentation([2,1]); rep SeminormalRepresentation([2,1])# seems to work OK sage: rep.an_element() # try to construct an element repr(sage.algebras.iwahori_hecke_algebras. iwahori_hecke_algebra_representations. SeminormalRepresentation_with_category.element_class at 0x119a88c80) failed: AttributeError: 'SeminormalRepresentation_with_category' object has no attribute '_prefix' sage: rep(StandardTableau([[1,2],[3]])) AttributeErrorTraceback (most recent call last ) ... AttributeError: 'SeminormalRepresentation_with_category' object has no attribute '_basis_keys' Does anyone have an idea of what is going wrong. Part of the issue might be all of the super calls, as perhaps some of the the classes higher up are not using super, but I tried taking out all ofthe super calls and, instead, explicitly calling the previous classes (they are linearly ordered), and unfortunately this doesn't help. For anyone feeling masochistic, the full code is at trac:17303 http://trac.sagemath.org/ticket/17303 (it uses 6.5beta0) Andrew -- You received this message because you are subscribed to the Google Groups sage-combinat-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-combinat-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-combinat-devel. For more options, visit https://groups.google.com/d/optout.
[sage-combinat-devel] post-doctoral position in Lyon
Hello everybody, there is a post-doctoral position in algebraic combinatorics opening in Lyon (France) next September. Details can be found here: http://math.univ-lyon1.fr/~chapoton/postdoc2015-2016.html Please pass the word to people you know that could be interested. Lyon is a nice city, and there is an active group in combinatorics in our department. By the way, some other post-doc positions are available in Lyon, please look there for more information: http://milyon.universite-lyon.fr/offres-de-post-docs/3-post-doctoral-positions-in-mathematics-and-or-computer-science--170911.kjsp?RH=MILYON-FR Cheers, Frederic -- You received this message because you are subscribed to the Google Groups sage-combinat-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-combinat-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-combinat-devel. For more options, visit https://groups.google.com/d/optout.
Re: [sage-combinat-devel] Making code for some seminormal representations faster
Hi Andrew, On Fri, Nov 21, 2014 at 05:55:51AM -0800, Andrew wrote: I'm currently going around in circles with some CombinatorialFreeModule woes. The previous code for these alternating seminormal forms works, but in order to cope with the many variations of seminormal representations that I decided to implement working I've have had to jazz things up quite a lot. Now my basic class structure looks something like this: from sage.combinat.free_module import CombinatorialFreeModule from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing class A(CombinatorialFreeModule): def __init__(self, base_ring, basis_keys, prefix='a', **kwargs): super(A,self).__init__(base_ring, basis_keys, prefix=prefix, **kwargs) class Element(CombinatorialFreeModule.Element): pass class B(A): def __init__(self, base_ring, basis_keys, prefix='b', **kwargs): super(B,self).__init__(base_ring, basis_keys, prefix=prefix, **kwargs) class C(B): def __init__(self, shape, prefix='c', **kwargs): base_ring=PolynomialRing(Integers(), 'q') super(B,self).__init__(base_ring, shape.standard_tableaux(), prefix=prefix, **kwargs) This simplified code works fine. For example, sage: C(Partition([3,2])).an_element() 2*c[[[1, 2, 5], [3, 4]]] + 3*c[[[1, 3, 4], [2, 5]]] + 2*c[[[1, 3, 5], [2, 4]]] Unfortunately my real code does not work, having issues like: sage: rep=SeminormalRepresentation([2,1]); rep SeminormalRepresentation([2,1])# seems to work OK sage: rep.an_element() # try to construct an element repr(sage.algebras.iwahori_hecke_algebras.iwahori_hecke_algebra_repre sentations.SeminormalRepresentation_with_category.element_class at 0x119a88c80) failed: AttributeError: 'SeminormalRepresentation_with_category' object has no attribute '_prefix' sage: rep(StandardTableau([[1,2],[3]])) AttributeErrorTraceback (most recent call last) ... AttributeError: 'SeminormalRepresentation_with_category' object has no attribute '_basis_keys' Does anyone have an idea of what is going wrong. Part of the issue might be all of the super calls, but I tried taking though ut and explcitly calling the previous class (they are linearly ordered), but this doesn't help. Hmm, I haven't taken the time to think with a pen and paper, but I don't guarantee that the what the super call do is as straightforward as it ought to, given that the instance of A being initialized will end up being in a subclass A_with_category, and similarly for the others. Does it work if instead you call explicitly A.__init__ in B.__init__, and so on? Cheers, Nicolas -- Nicolas M. Thiéry Isil nthi...@users.sf.net http://Nicolas.Thiery.name/ -- You received this message because you are subscribed to the Google Groups sage-combinat-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-combinat-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-combinat-devel. For more options, visit https://groups.google.com/d/optout.
Re: [sage-combinat-devel] Making code for some seminormal representations faster
On Saturday, 22 November 2014 10:24:43 UTC+11, Nicolas M. Thiery wrote: Hi Andrew, Hmm, I haven't taken the time to think with a pen and paper, but I don't guarantee that the what the super call do is as straightforward as it ought to, given that the instance of A being initialized will end up being in a subclass A_with_category, and similarly for the others. Does it work if instead you call explicitly A.__init__ in B.__init__, and so on? Hi Nicolas, I fixed my problem so the code is working now. It is possible that there are some issues with the super calls but as far as I can tell it is working as I expect. One question that I should ask you, however, is the following. I have a suspicion that I should define a category for the Hecke algebra representations, however, I don't know what the benefits are of doing this or how to do it. Certainly the code seems to work without this (not that I have added extensive tests yet or properly implemented the mathematics), but if this is necessary, or desirable, I would like to understand what this gives me over and above having a dedicated class for Hecke algebra representations. Andrew -- You received this message because you are subscribed to the Google Groups sage-combinat-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-combinat-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-combinat-devel. For more options, visit https://groups.google.com/d/optout.
Re: [sage-combinat-devel] Making code for some seminormal representations faster
Hey Andrew and Nicolas, I've probably mentioned this before, but I think we should figure out how we want to handle categories for representations in general. I would like this for Lie algebras (equiv. universal enveloping algebras), quantum groups, and general groups (equiv. group algebras). Something which would be benefit from having a category for Hecke algebra representations would be methods for constructing the Grothendieck group, a list of simples (up to isomorphism), and a canonical place to look for constructing examples (via ``an_element()``). So my thoughts (if you've heard this before, feel free to skip) on this would be to construct a category parameterized by a Hecke algebra ``H`` which is a subcategory of the category of modules over ``H.base_ring()``. For general representation categories, we'd have an abstract method ``representation_action()`` (the name can change, I didn't think too hard about this) that the user must implement and which we use throughout the category and with some default implementation of ``get_action()`` which calls ``representation_action()`` when passed an element of ``H``. In this case specifically, we could define a generic ``representation_action()`` which converts an element to the T_i basis and calls ``T_action(i)`` (again, probably a better name out there). Although for now we can just have a base class for all Hecke algebra representations, and there is not a clear and obvious gain to me at present from defining such a category. Best, Travis On Friday, November 21, 2014 4:16:13 PM UTC-8, Andrew wrote: On Saturday, 22 November 2014 10:24:43 UTC+11, Nicolas M. Thiery wrote: Hi Andrew, Hmm, I haven't taken the time to think with a pen and paper, but I don't guarantee that the what the super call do is as straightforward as it ought to, given that the instance of A being initialized will end up being in a subclass A_with_category, and similarly for the others. Does it work if instead you call explicitly A.__init__ in B.__init__, and so on? Hi Nicolas, I fixed my problem so the code is working now. It is possible that there are some issues with the super calls but as far as I can tell it is working as I expect. One question that I should ask you, however, is the following. I have a suspicion that I should define a category for the Hecke algebra representations, however, I don't know what the benefits are of doing this or how to do it. Certainly the code seems to work without this (not that I have added extensive tests yet or properly implemented the mathematics), but if this is necessary, or desirable, I would like to understand what this gives me over and above having a dedicated class for Hecke algebra representations. Andrew -- You received this message because you are subscribed to the Google Groups sage-combinat-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-combinat-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-combinat-devel. For more options, visit https://groups.google.com/d/optout.
Re: [sage-devel] Better tracebacks (#71)
Let me also mention that I have no plans to change anything regarding the inspect module, this is only about displaying tracebacks. -- 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] Bug in abs(I*x).diff(x)
I've written up all the equations from this thread together with detailed step by step derivation: http://www.theoretical-physics.net/dev/math/complex.html e.g. the derivatives are here: http://www.theoretical-physics.net/dev/math/complex.html#complex-derivatives Most of the examples from this thread are there, but few are still missing, I'll add them tomorrow. Bill, please let me know if you have any feedback/comments to it. Ondrej -- 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: Build error in Sage-6.2: pynac-0.3.2
Yep, still an issue with 6.3 6.4 using Fedora 20 32-bit. My pie-neck be bugging... ...Compiling from source code is no fun; my penguin is tired. -- 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: Code of Conduct
Hi y'all! I have heard that this is a Texan greeting, so, I hope nobody feels offended... Am Freitag, 21. November 2014 08:36:40 UTC+1 schrieb Nathann Cohen: Also, I can accept that using he as a general pronoun is not intended to be sexist, especially from a non-nature speaker, but I am really struggling to find a reasonable interpretation this last sentence. The best I can come up with is that you are trying to be funny and it's lost in translation. Is this what you intended? It was a joke, indeed. It is getting dangerous to joke, guys That's the problem with political correctness. I know that some people, mainly in the USA but not so much elsewhere, find PC very important. But they should not forget: - In international settings (such as here!) you simply can not expect that everybody knows about fine details of the English language. For example, my German translation for guys would be Leute, which is 100% neutral and actually only exist in plural (there is no der Leut/ die Leut referring to a single person), and I suppose in French (Nathann's principal language) it is les gens, which I think is similar. So, I was shocked when someone stated that Nathann was sexist when speaking about 10 to 20 guys discussing. -- If we'd start with PC, we would seriously discriminate non-native English speakers. Thus, PC is politically incorrect when used in an inter-cultural setting. - In the case of cultural differences, which sometimes become apparent in jokes that can't be understood by people from another culture, one should generally assume that the other person does *not* have a bad intention. Also known as in dubio pro. -- If you can see a neutral or positive meaning in what someone says, then you shouldn't assume a bad intention (double meaning of to assume is totally intended here...). - PC is a moving target. Words that used to be perfectly neutral in the past are now considered offensive. And words that have been used as insult of a minority are sometimes taken up by the minority and re-defined as positive --- but then sometimes the minority would only allow the use of the formerly offensive word by members of the minority, not by outsiders. Which is discrimination answered by discrimination, and is near to impossible to understand for non-native speakers, which is again discriminating. -- Don't start to try and define what is offensive. It is useless. So, please cut PC out! There is some truth in its basic idea (one should speak in a way that does not exclude people that shouldn't be excluded), but it becomes totally unreasonable and seriously discriminating in any pluralistic setting. That's funny, since PC pretends to support pluralism, but from my perspective it miserably fails. PC (when it is supposed to be more than a very rough guideline) is unacceptable as the base of a pluralistic society such as ours. Back to the question of a code of conduct. - Law (or a code of conduct) can define what is misbehaviour, but it can not *prevent* misbehaviour. - A committee that creates bad consequences for offenders would theoretically be able to prevent continued misbehaviour. However, I'd think the creation of such committee would be overbearing. Sage is not a state. - It strikes me as perfectly possible that person A acts in compliance with a code of conduct, but still person B feels offended by person A. This is a totally normal situation in real life and keeps courts busy. And this situation can by definition not be avoided by *any* kind of code of conduct. - I know that some people disagree with me, but I truly believe that bluntly punishing a criminal is *not* helpful for the crime victim. And far less when it is not a crime but just civil misbehaviour. I do acknowledge that there has been hurt feeling on sage-(combinat-)devel in the past, but I think our existing way of dealing with it is of a very suitable kind. Certainly it could be improved (be more supportive for the offended, and avoid replying to an offender in an offensive way, since this would feed the troll), but a code of conduct would totally change our existing approach, and this strikes me as plain wrong. William was correct in counting my vote as -1. Cheers, 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.
[sage-devel] Re: Better tracebacks (#71)
IMHO this would better be solved upstream. * IPython input transformers should also keep a map from the original source lines to the transformed lines. By default, that would just be the identity map. * IPython already hooks into the linecache used for tracebacks in get_ipython().compile.cache, just store the original source together with the transformed source and line mapping. Probably that can just be added at the end of the cache tuple. * IPython already hooks into the exception formatting to colorize the exceptions, this should always show the pre-transformed source. On Friday, November 21, 2014 6:45:32 AM UTC, Jeroen Demeyer wrote: Hello, I have a working proof-of-concept to improve tracebacks for preparsed code and for Cython code. On http://trac.sagemath.org/ticket/71, you can see an example of a new traceback. This isn't a finished patch yet, but I would like some opinions on the general approach first. The main changes are: 1) Change the preparser to add the unpreparsed source as comments. Yes, this increases the size of preparsed code a lot: sage: preparse('2 + 3') 'Integer(2) + Integer(3) #sage_pp#:2 + 3' 2) When executing load() or attach(), always save the preparsed source to a temporary file. This is needed to get any traceback at all for this exec()ed code. 3) Add an upstream patch to IPython (which is likely to be accepted upstream, I asked ipython-dev) to not replace the .pyx file by the .so file in tracebacks. 4) Write a custom extract_tb() function which undoes preparsing in tracebacks and which makes paths absolute w.r.t. SAGE_SRC. The latter is needed because Cython filenames in tracebacks are relative. 5) Monkey-patch the Python library function traceback.extract_tb() with this custom function when the SageTerminalApp starts. -- 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: Code of Conduct
PS: On 2014-11-21, Simon King simon.k...@uni-jena.de wrote: That's the problem with political correctness. I know that some people, mainly in the USA but not so much elsewhere, find PC very important. Interestingly, I just read in Wikipedia that in the USA, the term political correctness is mainly used by right-wing people, and has a pejorative sense. Before reading it, I had the impression that the term was mainly used by people aiming at pluralism, and had a positive meaning to them. Yet another cultural difference, I guess. Cheers, 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.
Re: [sage-devel] Re: Better tracebacks (#71)
On 2014-11-21 14:00, Volker Braun wrote: IMHO this would better be solved upstream. I don't want to make this specific to IPython. I also want to use it for sage-run and sagenb and perhaps other places too which don't use IPython. -- 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: Code of Conduct
I am not exactly a -1 for the code of conduct, but at some point between -1 and 0. And of course, i wouldn't quit working on Sage and/or commenting here regardless of the final decision about the code of conduct. My experience in the Sage community has been very positive so far. Discussions have been productive and respectful except for a few isolated cases. I feel good in this community, i have found very nice and interesting people here. And, very importantly, Sage now includes some features that are important for my work because i implemented them. I don't think that a change of conduct would change any of the above. And even if it does, i would still have powerful reasons to keep contributing to the Sage development. El viernes, 21 de noviembre de 2014 03:06:53 UTC+1, William escribió: Can somebody help me count the votes? I made pass through this long and complicated thread, and here's what I seem to have got: FOR a code of conduct, possibly suitably word-smithed (7): Jan Groenewald Travis Scrimshaw Anne Schilling Mike Zabrocki Andrew Mathas Ben Salisbury Viviane Pons AGAINST having code of conductor (5) Robert Dodier Simon King mmarco Nathann Cohen Harald Schilley (qualified) Other proposal or comments, but didn't vote and proposal gained no significant traction (5): william stein karl dieter John Perry rjf cremona Also, important question. Is there anybody who is *seriously* considering quitting working on Sage if they don't like the way this vote goes? If you don't want to respond on list, feel free to email me offlist at wst...@uw.edu javascript:. Thanks, -- William On Thu, Nov 20, 2014 at 12:37 PM, Robert Dodier robert...@gmail.com javascript: wrote: On 2014-11-19, Tom Boothby tomas@gmail.com javascript: wrote: In situations where it looks like real abuse has occurred, a committee of arbiters should exist to rule on it. Instituting a committee of authorities seems misdirected -- unless one takes an inclusive approach and declares that all participants are hereby authorities. That is, that all participants are equally empowered to complain about bad behavior -- anyone can say to anyone, cut that shit out, perhaps worded more tactfully, but the same in content at least. About the fabled rudeness of the inhabitants of NYC, I speculate that it's misunderstood by outsiders. What is actually going on is that all citizens feel empowered to complain when anyone breaks a rule. Instead of suffering in silence as someone cuts in line or stands in a doorway, someone just goes ahead and says, hey, stop it. I'm told (never spent much time there myself) that it makes people more polite, because one knows that one cannot get away with petty misbehavior. I'd like to think the same applies to any informal gathering of humanity. best, Robert Dodier -- 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+...@googlegroups.com javascript:. To post to this group, send email to sage-...@googlegroups.com javascript:. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout. -- William Stein Professor of Mathematics University of Washington http://wstein.org -- 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: Code of Conduct
I wasn't going to go there, but since it was brought up... ncohen knows that in no way is this me griping about him personally; I remember some far more vituperative problems from long ago that (thankfully) involve no-one in this thread, to my recollection. Sorry Nathan, but since you asked, these comments clearly violate item (4) of the proposed code of conduct, and arguably items (1) and (2) as well. For those of us (like me) who access this on the web and hence had to look up (1)-(4), I have to say I agree that those were in violation of (1). Here is part of (4): Be respectful and polite. Not all of us will agree all the time, but disagreement is no excuse for poor behavior and poor manners. We might all experience some frustration now and then, but we cannot allow that frustration to morph into personal attacks. Now, realistically that is not going to happen - because it's SO EASY to just hit reply. But what a (short) community standard can do is to provide guidelines for how to deal with such situations. In this particular case, it was particularly sad because, although I agreed that Nathann was out of line (and told him so privately), I also think that those who were replying to him probably should have just disengaged from the degenerating conversation. It's not in our blood to do it, as mathematicians! But sometimes necessary, to let things cool down. Honestly, I felt really bad for everyone involved in that discussion, because it was clear everyone was at least a little miffed, if not hurt. Hence the idea of suggesting somewhere (without an explicit code, perhaps) that in such situations the community expects (whatever that means) that people just stop talking about a given thing - or at least stop doing so on sage-devel. On sage-flame, go for it, if you really want to; private emails, we can't stop you. It won't stop a thread from going, but at least someone not directly involved (perhaps not from a committer list) can say Remember community standards item #43-E-5 paragraph 7b! and that is the cue that if those involved keep going, be it on their own heads for hurt feelings. Or wasted time. Well, then I believe that my only defense is that I was feeling very alone trying to get item 3 observed. Indeed, a bug had been returning wrong answers for 20 months and nothing had been done against it by those who knew the code, despite frequent reminders. I had tried a lot but in vain, I did not understand the code sufficiently. Oh, I have been there. We have ALL (well, anyone who has worked on Sage for more than a few hours a year) been there. Yes it is annoying. And I have also been the one who never replied to pings because I had other priorities or my kids were sick or I was worried about something else at work or I was trying to actually get away from the internet for more than 12 hours or I didn't have a working Sage installation and would rather read a book or watch TV than try to figure out how I broke it... maybe community standard #5 can be We know there will be unfixed bugs, and as an open source, all-volunteer project, we can only encourage others kindly to work on them, except more elegant, and with a Stuart Smalley aesthetic in it. -- 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: Build error in Sage-6.2: pynac-0.3.2
I didn't really follow this conversation, but it sounds like there is an easy fix and just no one ever committed it. Is there even a ticket? Yep, still an issue with 6.3 6.4 using Fedora 20 32-bit. My pie-neck be bugging... ...Compiling from source code is no fun; my penguin is tired. -- 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: Better tracebacks (#71)
You don't have to use IPython interactively, just use its machinery for evaluating code-from-a-string instead of reinventing the wheel. Really, why doesn't SageNB just do the equivalent of sage.repl.interpreter.get_test_shell().run_cell('1+1'), instead there is multiple temporary files with some base64 encoding thrown in for fun? This is Python, you can just compile/evaluate code in a string without any temporary files! You need a little bit of thought to get the tracebacks right, but IPython already implements that for you. On Friday, November 21, 2014 1:58:34 PM UTC, Jeroen Demeyer wrote: On 2014-11-21 14:00, Volker Braun wrote: IMHO this would better be solved upstream. I don't want to make this specific to IPython. I also want to use it for sage-run and sagenb and perhaps other places too which don't use IPython. -- 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] Maple versus Mathematica
Le mercredi 19 novembre 2014 00:03:27 UTC+1, William a écrit : lM = Map[If[# == 0, 0, 1] , M[[2]][[#[[2]] /@ M[[3]], #[[2]] /@ M[[4, {2}]; Holy f*2}];ng s/@! Sure this answer by Sage is less cryptic: sage: p=Permutation([4,1,2,5,3]) sage: type(p) class 'sage.combinat.permutation.StandardPermutations_all_with_category.element_class' but it prevents me (and perhaps others) to do any development in such a system :-( I think the thread about a pseudo Code of Conduct is indeed intended to prevent guys (yes, guys) like Nathann to say simply that in some areas Sage code is a whole mess. Too bad. -- 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] Bug in abs(I*x).diff(x)
On 20 November 2014 22:08, Ondřej Čertík ondrej.cer...@gmail.com wrote: On Thu, Nov 20, 2014 at 7:53 PM, Bill Page bill.p...@newsynthesis.org wrote: ... This problem can be reduced to finding an algorithm to determine if f(x) is everywhere non-negative. Richardson proves that no such algorithm exists. I see. But what does this have to do with the derivative of |f(x)| that we are trying to figure out? This has to do with 'conjugate' in general, not just derivatives of expressions containing 'conjugate'. The problem is that 'conjugate' is transcendental but it cannot be written in terms of log and exp. As you pointed out, the challenge is that if you include conjugate(x), then you might be out of luck. But aren't you out of luck already if you have abs(x) in the expression in the first place? I.e. taking a derivative is not going to change anything, you are still out of luck. You are right about the derivative. But my limited understanding is that the strategy is not to avoid 'abs(x)' but rather to avoid 'sin'. We cannot similarly avoid 'conjugate' and in general the effect of including 'conjugate' is apparently unknown. But one effect of including 'conjugate' is that we can have expressions like x+conjugate(x) which is necessarily real-valued, rather like 'abs(x)' for x real-valued is non-negative. So it would be nice to know, for example for any expression composed of x, integers, +, *, sin, and conjugate, if there is an algorithm to determine if this expression is everywhere real-valued. -- 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: Better tracebacks (#71)
Its not brain surgery, but you want 1) Apply the preparser, possibly other input transformations 2) handle syntax errors from the preparser and show an appropriate error (not: a traceback inside the preparser) 3) handle errors from the string - ast compilation and show an appropriate error 4) put the source into traceback.linecache 5) beautify the traceback IPython does all these things already. Loading code from a file is just loading + evaluating the loaded string. On Friday, November 21, 2014 5:08:50 PM UTC, Jeroen Demeyer wrote: On 2014-11-21 15:29, Volker Braun wrote: You don't have to use IPython interactively, just use its machinery for evaluating code-from-a-string instead of reinventing the wheel. What's wrong with exec(compile())? There is not much reinvented in that. Note that it's not just code evaluated from a string, it's also stuff like load() and attach(). I don't know if there are IPython equivalents for those. -- 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: Code of Conduct
Hi! On 2014-11-21, mmarco mma...@unizar.es wrote: And of course, i wouldn't quit working on Sage and/or commenting here regardless of the final decision about the code of conduct. I forgot to say: I would very likely not quit because of that, even though I am -1. My experience in the Sage community has been very positive so far. Discussions have been productive and respectful except for a few isolated cases. I feel good in this community, i have found very nice and interesting people here. +1 :) And, very importantly, Sage now includes some features that are important for my work because i implemented them. ... and because someone else reviewed them. I count this as another argument why a code of conduct is not needed. Sage-developers typically want to use Sage for what they are really interested in. So, they have a strong interest in getting work done. Hence, they have good reason to behave in a constructive way: If someone trolls around, then (s)he is likely to not get help/trac review from the community. And the worst what can happen to them is: Not getting response. That's the good old don't feed the troll, and for that basic rule we don't need a code of conduct. 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.
[sage-devel] Re: Maple versus Mathematica
Hi Jean, On 2014-11-21, Jean Bétréma jean.betr...@gmail.com wrote: Sure this answer by Sage is less cryptic: sage: p=Permutation([4,1,2,5,3]) sage: type(p) class 'sage.combinat.permutation.StandardPermutations_all_with_category.element_class' but it prevents me (and perhaps others) to do any development in such a system :-( Just doing sage: p?? will show you the source code, and doing sage: edit(p, 'vim') # or another editor instead of vim will allow you to work on the code. Hitting type(p) is simply not the best approach to find out about stuff. 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.
Re: [sage-devel] Re: Code of Conduct
Which kind of rule would you see in a code of conduct that would make messages like those you cited (not all were pointing at you, by the way) illegal ? (1) Statements were made that were not factually correct. (2) People were directly insulted. (3) Conversely, Sage is constantly evolving, and earlier decisions that were made in good faith may sometimes need to be reconsidered. Nonetheless, we should still appreciate the hard work done in the past. The thread that the quotes were from are an example where the design discussions were done in private. It was *not* a pleasant experience for the people who at the end fixed the bug. I thought that sage-devel was there for discussions about the code, design discussions etc.. The discussions seemed to suppress that aspect completely, which I find very unfortunate. As William said, one option is to just move the actual design discussions to a private forum where contributions are constructive rather than counter-productive. Best, Anne -- 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] Maple versus Mathematica
On Nov 21, 2014 5:27 PM, Jean Bétréma jean.betr...@gmail.com wrote: Le mercredi 19 novembre 2014 00:03:27 UTC+1, William a écrit : lM = Map[If[# == 0, 0, 1] , M[[2]][[#[[2]] /@ M[[3]], #[[2]] /@ M[[4, {2}]; Holy f*2}];ng s/@! Sure this answer by Sage is less cryptic: sage: p=Permutation([4,1,2,5,3]) sage: type(p) class 'sage.combinat.permutation.StandardPermutations_all_with_category.element_class' but it prevents me (and perhaps others) to do any development in such a system :-( Hi, I am quite confused by this. Having a good type system at hand is really helpful, in my opinion. What do you actually expect to get here instead? Sage already changes some of Python to make it more useful, but I think those basics should stay as they are. H -- 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: Code of Conduct
(1) Statements were made that were not factually correct. (2) People were directly insulted. (3) Conversely, Sage is constantly evolving, and earlier decisions that were made in good faith may sometimes need to be reconsidered. Nonetheless, we should still appreciate the hard work done in the past. Anne, please let us stop re-doing that match here. It will really last forever otherwise. 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.
Re: [sage-devel] Re: Code of Conduct
Hi Simon, I think your comments are a form of uber political correctness, in that you are taking the moral high ground that it is not politically correct to be political correct:) Although I agree that there are some merits to this perspective I think that this is just a distraction from the current discussion. On sage-dev we're focused on sage, so mathematics and coding. Is is ever necessary, or useful, to talk about hating a particular person or a group of people? Andrew -- 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] Maple versus Mathematica
On 18 Nov 2014 22:37, Stefan stefanvanz...@gmail.com wrote: I don't know if I simply lack the appropriate Mathematica knowledge, but years ago, when I implemented matroids lM = Map[If[# == 0, 0, 1] , M[[2]][[#[[2]] /@ M[[3]], #[[2]] /@ M[[4, {2}]; I am no expert on Mathematica, but Mathematica code does not need to be so crytic. Anyway, is it any less readable than this code to plot the Mandelbrot set? http://preshing.com/20110926/high-resolution-mandelbrot-in-obfuscated-python/ Or this C code http://www.ioccc.org/2013/birken/birken.c Dave. -- 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: Code of Conduct
On Thursday, November 20, 2014 6:06:53 PM UTC-8, William wrote: Can somebody help me count the votes? I made pass through this long and complicated thread, and here's what I seem to have got. I'm -1 to an enforcable code of conduct. In extreme cases (which haven't happened) a list administrator could temporarily ban someone. The natural outrage such an action is bound to have is, in my opinion, a good deterrent on using it. I explain my motivation below. From the information I see, sage-devel is behaving like most online forums. Most of the discussion is civil and productive, but there is the occasional derailing. As far as I know, this happens on any forum of reasonable size, unless there is heavy moderation (which would slow down and defeat the purpose of sage-devel). I think sage-flame was a nice invention and has helped in controlling signal-to-noise on sage-devel in the past. It hasn't been used so frequently recently. If I'm right that sage-devel is not particularly hostile (for the most part it's pretty good in my opinion), then I don't think implementing a code of conduct with teeth is going to improve the situation significantly. Having guidelines for conduct easily available might help in showing newcomers that we care. A perceived offender can be pointed to it too to make the person aware how other people are perceiving his tone. I think the most effective way of establishing the community we want is by leading by example. That already happens quite a bit. -- 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: Code of Conduct
On sage-dev we're focused on sage, so mathematics and coding. Is is ever necessary, or useful, to talk about hating a particular person or a group of people? If what you have in mind is my I hate the fact that [...], you will find that it hates a fact. Not this or that person. Don't act as if I said that I hated a person. I said that I hate a fact, and indeed I hate a fact. Now, if your question is whether it is useful or necessary to talk about hating a fact, then the answer is that it is not necessarily useful. Is it particularly useful on sage, where we are focused on mathematics and coding, to talk about whether people should talk about hating facts ? Or whether people should talk about things which are not necessary/useful ? I do not think that the answer to that is of any consequence. 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: Code of Conduct
On 2014-11-21, William Stein wst...@gmail.com wrote: Can somebody help me count the votes? I made pass through this long and complicated thread, and here's what I seem to have got: I'd say it's OK to have such a code, but it's not really OK to actively enforce it. Such an active enforcement would only be counterproductive, if not outright impossible. Dima -- 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: Code of Conduct
Hi Andrew, Am Freitag, 21. November 2014 20:43:12 UTC+1 schrieb Andrew: I think your comments are a form of uber political correctness, in that you are taking the moral high ground that it is not politically correct to be political correct:) Although I agree that there are some merits to this perspective I think that this is just a distraction from the current discussion. In some post in this thread it was claimed that another post was sexist, even though there was enough reason to refuse the claim. One person imputed bad intention to another person, without considering in dubio pro. Such questionable, annoying and distracting claims and imputations will occur a lot more when they can be based on the authority of a code of conduct. I don't want it. That's how my comment is related with the current discussion. Cheers, 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.
Re: [sage-devel] Bug in abs(I*x).diff(x)
On Fri, Nov 21, 2014 at 9:37 AM, Bill Page bill.p...@newsynthesis.org wrote: On 20 November 2014 22:08, Ondřej Čertík ondrej.cer...@gmail.com wrote: On Thu, Nov 20, 2014 at 7:53 PM, Bill Page bill.p...@newsynthesis.org wrote: ... This problem can be reduced to finding an algorithm to determine if f(x) is everywhere non-negative. Richardson proves that no such algorithm exists. I see. But what does this have to do with the derivative of |f(x)| that we are trying to figure out? This has to do with 'conjugate' in general, not just derivatives of expressions containing 'conjugate'. The problem is that 'conjugate' is transcendental but it cannot be written in terms of log and exp. As you pointed out, the challenge is that if you include conjugate(x), then you might be out of luck. But aren't you out of luck already if you have abs(x) in the expression in the first place? I.e. taking a derivative is not going to change anything, you are still out of luck. You are right about the derivative. But my limited understanding is that the strategy is not to avoid 'abs(x)' but rather to avoid 'sin'. We cannot similarly avoid 'conjugate' and in general the effect of including 'conjugate' is apparently unknown. But one effect of including 'conjugate' is that we can have expressions like x+conjugate(x) which is necessarily real-valued, rather like 'abs(x)' for x real-valued is non-negative. So it would be nice to know, for example for any expression composed of x, integers, +, *, sin, and conjugate, if there is an algorithm to determine if this expression is everywhere real-valued. I am still confused about one thing: is this issue is already present in FriCAS before your changes? Because you can already use conjugate, sin, +, *, ..., even without defining the derivative for abs(x). I fail to see how defining the abs(x).diff(x) in the way you did it can introduce issues that weren't present in the first place. - I have finished the writeup, it starts here (you might want to refresh your browser to see the latest changes): http://www.theoretical-physics.net/dev/math/complex.html#complex-conjugate and it was implemented with these two PRs: https://github.com/certik/theoretical-physics/pull/39 https://github.com/certik/theoretical-physics/pull/40 I must say one thing that I like about the theta is that it tells you immediately if the function is analytic or not (if theta is present it is not, if it is not present, then the expression does not depend on theta, and thus is analytic). For example, for log(z), the theta cancels, and so the result 1/z is analytic. I found a bug in these results from FriCAS: (4) - D(abs(f(x)),x) , _ _ , f(x)f (x) + f(x)f (x) (4) - 2abs(f(x)) Type: Expression(Integer) (5) - D(abs(log(x)),x) __ xlog(x) + x log(x) (5) -- _ 2xxabs(log(x)) Type: Expression(Integer) The bar must be over the whole f(x) as well as log(x), because conjugate(log(x)) is only equal log(conjugate(x)) if x is not negative real number. See the example here: http://www.theoretical-physics.net/dev/math/complex.html#id1 where I have it explicitly worked out. You can also check that easily in Python: In [1]: from cmath import log In [2]: x = -1+1j In [3]: log(x).conjugate() Out[3]: (0.34657359027997264-2.356194490192345j) In [4]: log(x.conjugate()) Out[4]: (0.34657359027997264-2.356194490192345j) In [5]: x = -1 In [6]: log(x).conjugate() Out[6]: -3.141592653589793j In [7]: log(x.conjugate()) Out[7]: 3.141592653589793j In [8]: log(x.conjugate()) - 2*pi*1j Out[8]: -3.141592653589793j Where [3] and [4] are equal, but [6] and [7] are not (you need to subtract 2*pi*i from [7], as in [8], in order to recover [6], consistent with the formula in the writeup). Apart from this issue, all other examples that you posted seem to be correct and agree with my hand based step by step calculation in the writeup. Ondrej -- 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] Maple versus Mathematica
On Nov 21, 2014 11:46 AM, Dr. David Kirkby (Kirkby Microwave Ltd) drkir...@kirkbymicrowave.co.uk wrote: On 18 Nov 2014 22:37, Stefan stefanvanz...@gmail.com wrote: I don't know if I simply lack the appropriate Mathematica knowledge, but years ago, when I implemented matroids lM = Map[If[# == 0, 0, 1] , M[[2]][[#[[2]] /@ M[[3]], #[[2]] /@ M[[4, {2}]; I am no expert on Mathematica, but Mathematica code does not need to be so cryptic. Can anybody rewrite the above line of mathematica code so that it does something equivalent, but is less cryptic? Anyway, is it any less readable than this code to plot the Mandelbrot set? http://preshing.com/20110926/high-resolution-mandelbrot-in-obfuscated-python/ Or this C code http://www.ioccc.org/2013/birken/birken.c Dave. -- 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: Maple versus Mathematica
The ith element of a list is M[[i]]. An expression ending in is a lambda function, with # being the first parameter. f /@ B is equivalent to map(f, B) (f is applied to each element of B). If[# == 0, 0, 1] is equivalent to lambda x: x==0 ? 0 : 1 So to me, it looks like: m2 = [m[2][i] for i in [x[2] for x in m[3]] m3 = [m2[i] for i in [x[2] for x in m[4]] lM = [[0 if i==0 else 1 for i in x] for x in m3] There's a decent chance that I missed something, though. It's been a long while since I did anything in mathematica, and I've realized that mathematica quickly starts looking like line noise after I've stopped using it. Thanks, Jason P.S. I was curious about the online mathematica the other night. If I understood the marketing material correctly, it seems you get interactive computation included in the base price, and you are charged for offline computation. I checked the prices, and saw that the credit system they offer sells computational time for about $10.80/hour (in $15 increments), down to $6.47/hour (if you buy $180 at a time), billed in 100ms chunks [1]. In comparison, the highest price an Amazon Linux EC2 On Demand instance is a 32 processor, 244GB Ram, 8 800GB SSD instance for $6.82/hour. I realize I didn't count Amazon's bandwidth charges ($0.12/GB after 1GB out from EC2 to internet each month), but regardless, that seems like relatively expensive computational time. [1] http://www.wolfram.com/cloud-credits/ (down at the bottom) [2] http://aws.amazon.com/ec2/pricing/ On 11/21/14, 20:45, William Stein wrote: On Nov 21, 2014 11:46 AM, Dr. David Kirkby (Kirkby Microwave Ltd) drkir...@kirkbymicrowave.co.uk mailto:drkir...@kirkbymicrowave.co.uk wrote: On 18 Nov 2014 22:37, Stefan stefanvanz...@gmail.com mailto:stefanvanz...@gmail.com wrote: I don't know if I simply lack the appropriate Mathematica knowledge, but years ago, when I implemented matroids lM = Map[If[# == 0, 0, 1] , M[[2]][[#[[2]] /@ M[[3]], #[[2]] /@ M[[4, {2}]; I am no expert on Mathematica, but Mathematica code does not need to be so cryptic. Can anybody rewrite the above line of mathematica code so that it does something equivalent, but is less cryptic? Anyway, is it any less readable than this code to plot the Mandelbrot set? http://preshing.com/20110926/high-resolution-mandelbrot-in-obfuscated-python/ Or this C code http://www.ioccc.org/2013/birken/birken.c Dave. -- 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 mailto:sage-devel%2bunsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com mailto: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 mailto:sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com mailto: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.