-
Notifications
You must be signed in to change notification settings - Fork 3
Utah2016 Ask Dan and Mike
Note that there is an attached M2 file from this session.
-
All the variables are defined function level. So if you do := in a function for local assignment and then use that letter again in a function you need to use = since the previous := has already set it to be local. This includes for loops and if/then statements.
-
Note that local only takes one argument. So you can't do local(a,b), but can do local a to create an instance of a local variable a that has a null value as default.
-
Preferred is to not make a ring variable a local variable as the user needs access. Also, in packages, refer to ring variables using things like R_i as you also don't want to assume the ring variable names are something particular as the user has their choice there also.
-
If you are not creating a ring, it can be good/correct/helpful to have the user give a ring as one of the arguments.
-
Is there a package with power series? Hilbert Series
-
Anything of Type Expression (e.g. Expression of Class Power, Expression of Class Divide, etc.) --- these are all Type Expression which are things that are not evaluated. If you peek at one of these objects they are lists or lists of lists. You can try value of these objects and see what you get, often get errors.
-
Note everyone has the ability to put issues on GitHub. For bugs, the best is a complete snippet of code so that Mike can replicate the problem as well as what the expected result is. For features/needs this should also be posted on GitHub.
-
For a matrix M_1 gives a vector in a free module because matrix is really a homomorphism of free modules and so M_blah is actually an element in the free module. So this does not work the same when working with a mutable matrix. The idea would be to implement code so that this notation for mutable matrices should return another mutable matrix that is the correct portion of the original. They hoped someone would implement that.
-
How do you put an issue in GitHub? Go to the main Macaulay2/M2 and click on M2. Click on the Issues tab. Click on New Issue. Put in a title, like Documentation for Set - Set. Then type in the issue. Make it as clear as possible to Dan and Mike.
-
Note that it is actually possible for all of us to fix documentation, in particular. Get a fork of M2, open the documentation. Fix it and then do a Pull Request. If you are not sure what all this GitHub stuff is about, we can help you here at the workshop, or you can ask in the Google Group.
-
Making your own changes. Fork it first, then clone (see GitHub instructions for cloning, this is the same as what we did for the workshop, you are just doing it for the whole system). But even without that you can explore the structure and directories on the web in GitHub. M2/Macaulay2 contains all non package M2, there is also a folder which is Packages and one of the Packages folders is "Macaulay2Doc". ALL of the documentation (that is not in its own package) is in this folder. You can search using emacs tags search or grep to find which file the file it is in. Here is an example of using grep
grep --color=never -rnH -e "(symbol-,Set,Set)" .
(r makes it go recursively and the . says this directory and all subdirectories), but this returns nothing. So if we add some stars in, then it allows 0 or any number of spaces and we get what we need
grep --color=never -rnH -e "(symbol-,*Set,*Set)" .
-
I think there should be a function already, but you can't find it, first start with the types you think it should act on. If it isn't there, it might not exist, but it could be in a package --- at this point go to the google group and ask.
- It might be good to have an index somewhere with all the packages in it.
- Search on the M2 webpage does search all of the packages as well as the main documentation, so this might be a good way to search.
- Discussion of making the big index an issue happened.
-
KEY --- if you overload a method in a package that is already in the core, it will not show up in the current index, only in the package.
-
Discussion of style and color of the HTML. If anyone is familiar/good/likes CSS, please consider taking on this problem.
-
notify is a great function that tells you where files are being loaded from. If you can't remember this function, look at the documentation for load. Surely you can remember that function. loadedFiles will tell you what files are loaded. This can be really helpful to see what M2 is using.
-
Cool new function in 1.9 called uninstallAllPackages() and that does just what you think it would. It uninstalls all the locally defined packages.
-
Set your editor to never use tabs. Any positive number of spaces is fine, as long as you are consistent.
-
Is there any documentation on taking a function and making it a method and then moving from method to package where it has documentation and tests. It would be nice to have a documentation or video that actually shows each of these for a single function.
-
All of the things we've noted about making documentation and code changes apply to changing the main wiki as well --- fork, make changes, and submit a pull request.