Skip to content

Q and A Thursday

Marc Harkonen edited this page Sep 19, 2019 · 8 revisions

Put some questions here:

Is it OK to put debug SomePackage at the beginning of my package? Is there a better way to access internal functions of SomePackage from within my package? (Marc)


What are the differences between the various functions: presentation, minimalPresentation, prune, trim etc.? Say we are given a module in a subquotient form and we want to compute some things with it. In general, is it recommended to rather use a presentation and/or the other functions above and compute that way? Are these functions implemented correctly for D-modules by any chance? (Andras)


How can one programmatically obtain the string ZZ-module, submodule of ZZ^2 that appears here? (Markus)

i1 : kernel matrix {{1,2},{3,6}}

o1 = image | 2  |
           | -1 |

                               2
o1 : ZZ-module, submodule of ZZ

(class o1 just gives Module)


Is there a client-server protocol for Macaulay2 that allows external software to communicate with M2, or how difficult is it to implement this? (Markus)


The following creates a list of random integers where the size of the list is 10.

i1 : L = new List from 1..10

o1 = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}

o1 : List

i2 : apply(L, i -> random(ZZ))

o2 = {3, 9, 2, 3, 4, 2, 9, 2, 7, 4}

o2 : List

Is there a better way to do this in one line? (Mike Ruddy)


How to define a breakpoint for debugging? If I use error "debug", then I cannot step past the error. (Marc)

Clone this wiki locally