Hi - Continuing the conversation about math constants:
On 6/2/15, 7:27 AM, "Damian McGuckin" <[email protected]> wrote: >On Mon, 1 Jun 2015, Michael Ferguson wrote: > >>>> 3. Could the M_* constants from math.h be added to Math.chpl? >>>> (Especially M_PI.) >>> >>> Yeah, I'd think we'd want to do that. I think the main challenge is > >Ditto. > >>> probably choosing names (e.g., I don't think M_PI is probably right for >>> Chapel...). If you have names you'd like to propose, please let us >>>know > >Probably should try and find similar discussions done for C/C++ >standardization and ensure that you do not repeat the same things. These aren't actually (AFAIK) in a C standard but are in POSIX. I put the same constants that were in math.h... > >I you avoid making them global, which may have performance issues later, >that solves a lot of name clash issues. I did an experiment: use Math; var e = 10; writeln(e); compiles, runs, and prints 10. So I think this is OK. But, of course, you won't get an error if you do writeln(e) but you meant to (and forgot) to declare a variable called 'e'. Would you prefer that these constants end up in a different module that needed to be explicitly included? (e.g. use Math.Constants) ? I (personally) think that since another module's variable called e can shadow the Math one, it's reasonable for Math.chpl to declare e. > >> I have a draft adding these, see: >> >> https://github.com/chapel-lang/chapel/pull/2013 > >> Let's discuss the naming of them there. > >How many discussion lists besides user & developers are there? We use GitHub to discuss specific patches, since it makes viewing the changes easier. The page I linked to is a GitHub pull request, which really is a place to discuss a patch on its way to merging... Any discussion in the pull request will (as far as I know) be available indefinitely and can be found from the commit history; but the discussions in email are not linked to particular commits. Regarding your question of other mailing lists, see http://sourceforge.net/p/chapel/mailman/?source=navbar for a list of Chapel related public mailing lists. Besides chapel-users and chapel-developers, the main remaining list for discussion is chapel-education - which is a list about using Chapel in an education setting (for example, teaching a course on parallel programming). Thanks, -michael ------------------------------------------------------------------------------ _______________________________________________ Chapel-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/chapel-users
