comparison doc/manual.tex @ 2016:3ed2ee0815d2

Warn about MLton memory usage
author Adam Chlipala <adam@chlipala.net>
date Sun, 25 May 2014 09:21:56 -0400
parents 403f0cc65b9c
children afeeabdcce77
comparison
equal deleted inserted replaced
2015:4a93f379c452 2016:3ed2ee0815d2
60 Some other packages must be installed for the above to work. At a minimum, you need a standard UNIX shell, with standard UNIX tools like sed and GCC (or an alternate C compiler) in your execution path; MLton, the whole-program optimizing compiler for Standard ML; and the development files for the OpenSSL C library. As of this writing, in the ``testing'' version of Debian Linux, this command will install the more uncommon of these dependencies: 60 Some other packages must be installed for the above to work. At a minimum, you need a standard UNIX shell, with standard UNIX tools like sed and GCC (or an alternate C compiler) in your execution path; MLton, the whole-program optimizing compiler for Standard ML; and the development files for the OpenSSL C library. As of this writing, in the ``testing'' version of Debian Linux, this command will install the more uncommon of these dependencies:
61 \begin{verbatim} 61 \begin{verbatim}
62 apt-get install mlton libssl-dev 62 apt-get install mlton libssl-dev
63 \end{verbatim} 63 \end{verbatim}
64 64
65 Note that, like the Ur/Web compiler, MLton is a whole-program optimizing compiler, so it frequently requires much more memory than old-fashioned compilers do. Expect building Ur/Web with MLton to require not much less than a gigabyte of RAM. If a \texttt{mlton} invocation ends suspiciously, the most likely explanation is that it has exhausted available memory.
66
65 To build programs that access SQL databases, you also need one of these client libraries for supported backends. 67 To build programs that access SQL databases, you also need one of these client libraries for supported backends.
66 \begin{verbatim} 68 \begin{verbatim}
67 apt-get install libpq-dev libmysqlclient-dev libsqlite3-dev 69 apt-get install libpq-dev libmysqlclient-dev libsqlite3-dev
68 \end{verbatim} 70 \end{verbatim}
69 71
70 It is also possible to access the modules of the Ur/Web compiler interactively, within Standard ML of New Jersey. To install the prerequisites in Debian testing: 72 It is also possible to access the modules of the Ur/Web compiler interactively, within Standard ML of New Jersey. To install the prerequisites in Debian testing:
71 \begin{verbatim} 73 \begin{verbatim}
72 apt-get install smlnj libsmlnj-smlnj ml-yacc ml-lpt 74 apt-get install smlnj libsmlnj-smlnj ml-yacc ml-lpt
73 \end{verbatim} 75 \end{verbatim}
74 76
75 To begin an interactive session with the Ur compiler modules, run \texttt{make smlnj}, and then, from within an \texttt{sml} session, run \texttt{CM.make "src/urweb.cm";}. The \texttt{Compiler} module is the main entry point. 77 To begin an interactive session with the Ur compiler modules, run \texttt{make smlnj}, and then, from within an \texttt{sml} session, run \texttt{CM.make "src/urweb.cm";}. The \texttt{Compiler} module is the main entry point, and you can find its signature in \texttt{src/compiler.sig}.
76 78
77 To run an SQL-backed application with a backend besides SQLite, you will probably want to install one of these servers. 79 To run an SQL-backed application with a backend besides SQLite, you will probably want to install one of these servers.
78 80
79 \begin{verbatim} 81 \begin{verbatim}
80 apt-get install postgresql mysql-server 82 apt-get install postgresql mysql-server