# Differences

This shows you the differences between two versions of the page.

 user_guide:tutorials:legacy [2019/02/11 16:41]oroehrig ↷ Page moved from user_guide:howto:legacy to user_guide:tutorials:legacy user_guide:tutorials:legacy [2019/02/11 16:42] (current)oroehrig 2019/02/11 16:42 oroehrig 2019/02/11 16:41 oroehrig ↷ Page moved from user_guide:howto:legacy to user_guide:tutorials:legacy2019/01/25 13:40 oroehrig ↷ Page moved from user_guide:legacy to user_guide:howto:legacy2019/01/25 09:27 oroehrig ↷ Page moved from tutorial:legacy to user_guide:legacy2017/05/19 16:18 oroehrig [Stored files] some more wrong formatting.2017/05/19 16:18 oroehrig fixed some broken perl and formatting2017/03/24 13:04 oroehrig created extra tutorial for references to older versions. 2019/02/11 16:42 oroehrig 2019/02/11 16:41 oroehrig ↷ Page moved from user_guide:howto:legacy to user_guide:tutorials:legacy2019/01/25 13:40 oroehrig ↷ Page moved from user_guide:legacy to user_guide:howto:legacy2019/01/25 09:27 oroehrig ↷ Page moved from tutorial:legacy to user_guide:legacy2017/05/19 16:18 oroehrig [Stored files] some more wrong formatting.2017/05/19 16:18 oroehrig fixed some broken perl and formatting2017/03/24 13:04 oroehrig created extra tutorial for references to older versions. Line 1: Line 1: - ======If you have not used polymake in a long time...====== + {{page>.:latest:@FILEID@}} - + - ...you might want to read up on some things that are important for backward compatibility. + - + - ==== Numbers ==== + - + - ''​polymake''​ always was a hybrid system written half in C++, half in Perl, but it is only now that the user can directly take advantage of C++ data types and interfaces in Perl.  For instance, via the interface to [[http://​www.swox.com/​gmp/​|GMP]] ''​polymake''​ can also become your favorite programmable pocket calculator:​ + - + - <​code>​ + - polytope > $f = new Integer(1);​ + - + - polytope > for (my$i = new Integer(100);​ $i>0; --$i) { $f *=$i; } + - + - polytope ​> print $f; + - 93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000 + - ​ + - + - The input of large integer and rational numbers was kind of subtle in the past, but now (since version 2.11) it has become quite intuitive: + - <​code>​ + - polytope >$bignum=93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000;​ + - + - polytope > print $bignum; + - 93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000 + - + - polytope >$ratnum=123456/​789012;​ + - + - polytope > print \$ratnum; + - 10288/​65751 + - + - ​ + - Each integer constant being too large to fit into a normal perl scalar value is automatically converted to an ''​Integer''​ object; each fraction of two integer constants is automatically converted to a ''​Rational''​ object (and canonicalized,​ as can be seen in the example above). ​ + - + - + - ==== Stored files ==== + - + - Suppose you still have a file ''​cube.poly'',​ e.g., from trying out the tutorial of a previous version. ​ You can still do + - + - <​code>​ + - polymake cube.poly N_FACETS + - ​ + - <​code>​ + - N_FACETS + - 6 + - ​ + - + - from the command line as you used to.  This is the backward compatibility mode.  While this may give the impression that nothing changed and that you do not have to adapt to the new, this is plain wrong. ​ There are two things to keep in mind: + - - The old stand-alone clients (such as ''​cube'',​ e.g.) are gone. + - - Once you used the next generation ''​polymake''​ on your old files they will be transformed into XML (keeping all your data). ​ In particular, once you called the next generation ''​polymake''​ on your files you will not be able to use any old version on them later. + - + - Equivalent to calling "''​cube c3.poly 3''"​ as before would now be: + - + - <​code>​ + - polymake '​save(cube(3),"​c3.poly"​)'​ + - ​ + - + - A word of warning: It was rarely legal but always popular to edit files that ''​polymake''​ worked on with an ASCII text processor. ​ This is still possible (if you know what you are doing), but in addition to the caveats previously in place (which are still valid) you have to pay attention to producing valid XML. +
• user_guide/tutorials/legacy.txt