10 \newcommand\barbelow[1]{\stackunder[1.2pt]{#1}{\raisebox{-4mm}{\boldmath$\uparrow$}}} |
10 \newcommand\barbelow[1]{\stackunder[1.2pt]{#1}{\raisebox{-4mm}{\boldmath$\uparrow$}}} |
11 |
11 |
12 |
12 |
13 \begin{document} |
13 \begin{document} |
14 |
14 |
15 % BF IDE |
|
16 % https://www.microsoft.com/en-us/p/brainf-ck/9nblgggzhvq5 |
|
17 |
|
18 \section*{Coursework 10 (Scala)} |
15 \section*{Coursework 10 (Scala)} |
19 |
16 |
20 This coursework is worth 10\%. It is about a small programming |
17 This coursework is worth 10\%. It is about a small programming |
21 language called brainf***. The first part is due on 13 December at |
18 language called brainf***. The first part is due on 13 December at |
22 11pm; the second, more advanced part, is due on 20 December at |
19 11pm; the second, more advanced part, is due on 20 December at |
99 shown to be Turing complete\ldots{}if this doesn't ring any bell with |
96 shown to be Turing complete\ldots{}if this doesn't ring any bell with |
100 you: it roughly means that every(!) algorithm can, in principle, |
97 you: it roughly means that every(!) algorithm can, in principle, |
101 be implemented in brainf***. It just takes a lot of determination and |
98 be implemented in brainf***. It just takes a lot of determination and |
102 quite a lot of memory resources. Some relatively sophisticated sample |
99 quite a lot of memory resources. Some relatively sophisticated sample |
103 programs in brainf*** are given in the file \texttt{bf.scala}, including |
100 programs in brainf*** are given in the file \texttt{bf.scala}, including |
104 a brainf*** program for the Sierpinski triangle and the Mandelbrot set.\bigskip |
101 a brainf*** program for the Sierpinski triangle and the Mandelbrot set. |
|
102 There seems to be even a dedicated Windows IDE for bf programs, though |
|
103 I am not sure whether this is just an elaborate April fools' joke---judge |
|
104 yourself: |
|
105 |
|
106 \begin{center} |
|
107 \url{https://www.microsoft.com/en-us/p/brainf-ck/9nblgggzhvq5} |
|
108 \end{center} |
|
109 |
105 |
110 |
106 \noindent |
111 \noindent |
107 As mentioned above, brainf*** has 8 single-character commands, namely |
112 As mentioned above, brainf*** has 8 single-character commands, namely |
108 \texttt{'>'}, \texttt{'<'}, \texttt{'+'}, \texttt{'-'}, \texttt{'.'}, |
113 \texttt{'>'}, \texttt{'<'}, \texttt{'+'}, \texttt{'-'}, \texttt{'.'}, |
109 \texttt{','}, \texttt{'['} and \texttt{']'}. Every other character is |
114 \texttt{','}, \texttt{'['} and \texttt{']'}. Every other character is |