@@ -127,7 +127,7 @@ \section{Introduction}
127127
128128We considered off the shelf solutions, such as the Sage
129129notebook~\cite {sagenotebook }, but we wanted a more
130- lightweight solution: one that does not require users to create
130+ lightweight solution, in particular one that does not require users to create
131131new accounts at a web site.
132132
133133\trym 2 runs in modern browsers, including Chrome, Firefox, Safari, and Edge, both on mobile devices and desktop
@@ -238,35 +238,86 @@ \subsection{Features}
238238
239239\section {Tutorials }
240240
241- You can create your own tutorials for the web version. If you teach a course,
242- email your tutorial to your students. They can include your tutorial in their web app by clicking
243- {\it Load Tutorial} on the website.
244- If you want to share a tutorial with the community, we would
245- be happy to include them on the website!
246-
247- You can use the \M 2 package {\it DocConverter}.
248- It converts a file from {\it SimpleDoc} to the tutorial specific HTML. Please see the
249- {\it DocConverter} package for instructions and examples.
250-
251-
241+ The purpose of the mathematical tutorials in \trym 2 is to make abstract
242+ mathematical concepts more concrete as well as to provide a playground for users
243+ and students to experiment and explore the mathematics.
244+
245+ The tutorials are interactive, \M 2 examples in a tutorial can be run
246+ by clicking or pressing on the highlighted code. The text of the
247+ tutorial includes mathematics, using the mathjax tex library for
248+ browsers. Users can easily modify this \M 2 code in the Editor, in
249+ order to work examples and exercises, or to investigate further the
250+ mathematical concepts taught in the tutorial.
251+
252+ \trym 2 includes several tutorials describing basic \M 2 usage and
253+ mathematics around Gr\" obner bases and polynomial algebra. These
254+ tutorials include content written by the authors and by David
255+ Eisenbud.
256+
257+ Additional tutorials can be used in \trym 2 by simply uploading them in the
258+ {\it Load your own tutorial} section.
259+
260+ \subsection {Authoring a tutorial }
261+
262+ The format of tutorials for \trym 2 is the simple markdown format, used
263+ on many websites, such as github. The title line begins with a `` \# ''
264+ and contains the title (and possibly author) of the tutorial. Each lesson
265+ in the tutorial is marked by two `` \# '' s, and each piece of \M 2 code is enclosed in triple
266+ backticks `` ` (these should be on their own line). The text itself
267+ can contain latex math, as well as html markup. Blank lines separate
268+ paragraphs. A tutorial template file is available for download in the
269+ {\it Load your own tutorial} section of \trym 2, see
270+ Figure~\ref {fig:markdown }.
271+
272+ Instructors or users who wish to share their tutorials with their
273+ students or others should distribute their tutorials to them, e.g. via
274+ email, a course website, dropbox, google drive, etc. Each
275+ user then uploads the tutorial in their own \trym 2. Note that an
276+ uploaded tuorial is only available to that user, it is not made
277+ publically available. We encourage interested authors to share their
278+ tutorials at the \trym 2 google group (\cite {trym2:googlegroup }). This
279+ is also an excellent place to ask questions and get help about writing
280+ tutorials.
281+
282+ Existing \M 2 documentation in simpledoc format can be converted into
283+ tutorials via the \M 2 package {\tt TryM2Tutorials}. This is how several of
284+ the distributed tutorials were generated.
285+
286+ We are collaborating with several mathematicians to develop more
287+ tutorials. We will keep a curated collection of tutorials on various
288+ mathematical topics at the \trym 2 google group (\cite {trym2:googlegroup }).
289+
252290\section {Internal structure }
253291
254- We choose to implement the server in Node.js
255- because of Node.js's event-driven, non-blocking I/O model~\cite {nodejs }.
256- The Node.js server functions as a bridge between \M 2 instances and end users.
257-
258- For every user we start a new \M 2 process and
259- provide them with the underlying Linux system in a separate virtual environment.
260- This allows advanced users to
261- interact with the file system or run shell commands by using \M 2's {\tt get}
292+ The front end of \trym 2 is written in TypeScript, and uses Material Design Lite
293+ \cite {MDL } for user interface elements. The server back end is
294+ implemented in Node.js. The Node.js server functions as a bridge
295+ between \M 2 instances and users. For every user, the server starts
296+ a new \M 2 process in a separate and sandboxed linux virtual environment.
297+
298+ Technically, this is achieved by using Docker
299+ containers~\cite {docker }. Docker implements a high-level API to
300+ provide lightweight containers that run processes in isolation. The
301+ server starts a new Docker container running \M 2 for every user. The
302+ Node.js server communicates with Docker containers via {\it ssh}. This
303+ allows containers to run on independent machines, so in the future
304+ this will allow the configuration of systems which can scale with
305+ demand.
306+
307+ This architecture provides a sandboxed and secure linux environment
308+ for every \trym 2 user. For instance, users can interact with the
309+ sandboxed file system and run shell commands via \M 2's {\tt get}
262310command:
263311
264- \begin {verbatim }
312+ { \tiny \begin {verbatim }
265313i1 : -- get information on the underlying
266314 -- operating system
267315 get "!uname -mrs"
268- o1 = Linux 3.13.0-49-generic x86_64
316+ o1 = Linux 4.4.0-81-generic x86_64
317+ \end {verbatim }
318+ }
269319
320+ {\tiny \begin {verbatim }
270321i2 : -- write to a file
271322 "results.txt" << "Hello!" << close
272323o2 = results.txt
@@ -280,39 +331,28 @@ \section{Internal structure}
280331i4 : -- obtain the file
281332 get "!open results.txt"
282333\end {verbatim }
334+ }
283335
284- Technically, this is achieved by using Docker containers~\cite {docker }. Docker implements
285- a high-level API to provide lightweight containers that run processes in isolation.
286- We start a new Docker container running \M 2 for every user. The Node.js
287- server communicates with Docker containers via {\it ssh}. This allows us to easily
288- scale the application as demand grows.
289336
290337To ease the setup process we provide a virtual machine that contains both the Node.js server
291338and Docker. This virtual machine is configured using {\tt vagrant}, a tool to create and
292339configure reproducible and portable development environments~\cite {vagrant }.
293340
294341\section {Conclusion }
295342
296- By providing \M 2 as a web application, we hope to lower the
297- entry barrier for new users, therefore increasing the number
343+ \trym 2 lowers the entry barrier for new users of \M 2, therefore increasing the number
298344 of users and fostering research in computational algebraic geometry and commutative algebra.
299345
300-
301- We are collaborating with several mathematicians to develop more tutorials.
302- We plan to substantially increase the number of tutorials in the tutorial database over the next semester.
303-
304-
305- We envision some form of session sharing which allows to use the web app as a tool for collaborative research.
306-
307-
308- The application was designed with \M 2 in mind, but
309- the entire structure will work for other command line programs such as Singular~\cite {singular },
310- and GAP~\cite {GAP4 }. A similar web application for Singular is work in progress.
346+ For all users, \trym 2 is a useful way to use \M 2 on shared or mobile
347+ devices where it is difficult or impossible to install software. For
348+ some, the user interface of \trym 2 is a more natural way to interact with \M 2.
311349
312350\section {Acknowledgments }
313351
314- We would like to thank Charles Boyd, Dan Grayson, Greg Smith, and Benjamin Lorenz for
352+ We would like to thank Dan Grayson, Greg Smith, and Benjamin Lorenz for
315353fruitful discussions on system security and on user interface design.
354+ We would like to thank David Eisenbud for writing his \M 2 tutorials.
355+
316356
317357\bibliographystyle {plain}
318358\bibliography {references}
0 commit comments