This file is indexed.

/usr/share/polymake/demo/legacy.ipynb is in polymake-common 3.2r2-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
{
 "cells": [
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# If you have not used polymake in a long time...\n",
    "\n",
    "...you might want to read up on some things that are important for backward compatibility.\n",
    "\n",
    "### Numbers\n",
    "\n",
    "`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 [GMP](http://www.swox.com/gmp/) `polymake` can also become your favorite programmable pocket calculator:\n",
    "\n",
    "    \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "$f = new Integer(1);"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "    \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "for (my $i = new Integer(100); $i>0; --$i) { $f *= $i; }"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "    \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000\n",
       "\n"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "print $f;"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "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:\n",
    "\n",
    "    \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "$bignum=93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000;"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "    \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000\n",
       "    \n"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "print $bignum;"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "$ratnum=123456/789012;"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "    \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "10288/65751\n",
       "    \n"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "print $ratnum;"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "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).  \n",
    "\n",
    "\n",
    "### Stored files\n",
    "\n",
    "Suppose you still have a file `cube.poly`, e.g., from trying out the tutorial of a previous version.  You can still do\n",
    "\n",
    "    \n",
    "    polymake cube.poly N_FACETS\n",
    "\n",
    "    \n",
    "    N_FACETS\n",
    "    6\n",
    "\n",
    "\n",
    "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:\n",
    " 1.  The old stand-alone clients (such as `cube`, e.g.) are gone.\n",
    " 2.  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.\n",
    "\n",
    "Equivalent to calling \"`cube c3.poly 3`\" as before would now be:\n",
    "\n",
    "    \n",
    "    polymake 'save(cube(3),\"c3.poly\")'\n",
    "\n",
    "\n",
    "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.\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "polymake",
   "language": "polymake",
   "name": "polymake"
  },
  "language_info": {
   "codemirror_mode": "perl",
   "file_extension": ".pm",
   "mimetype": "text/x-polymake",
   "name": "polymake"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}