From a55ac92fa098a3881255dc92ca7a20618711459e Mon Sep 17 00:00:00 2001 From: "chris.sutcliffe" Date: Wed, 15 Dec 2021 11:44:37 +0000 Subject: shortened example section --- report/esoteric_project_report.tex | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/report/esoteric_project_report.tex b/report/esoteric_project_report.tex index 70b82c4..5b33d6b 100644 --- a/report/esoteric_project_report.tex +++ b/report/esoteric_project_report.tex @@ -96,14 +96,17 @@ This report will first cover our research into esoteric languages in Chapter 2. \section{Esoteric Languages (Esolangs)} Esolangs are programming languages designed to be jokes or proof of concept languages, rather than those to be used in actual programming tasks. Typically, the reason they are created is for fun rather than any serious desire to solve a particular programming problem, and so most languages aim to be funny, to be as difficult to use as possible or to have few features while still being Turing complete. Some esoteric languages are also designed to adapt existing languages into simpler or more usable forms. -\section{Shakespearian Programming Language} -The Shakespeare Programming Language is esoteric code parodied on extracts from Romeo and Juliet. Here, code is written so it reads like how a script would, such as \texttt{[Enter Juliet]} where \texttt{Juliet} may be a variable name. Other examples include using \texttt{Acts} or \texttt{Scenes} as GOTO statements, where the interpreter can jump to a certain point in the code and read from there. Otherwise, these are ignored similar to the title or character descriptions. Other examples include LOLCODE, Hodor or White Space. This serves the purpose of writing code in a different manner to usual, sometimes for humour. The aim is to replace typical language features so that it can still be read by a compiler or interpreter but also look and read very differently by the user. - -\section{Befunge} -Befunge is one of the most popular and well known esoteric languages, intentionally designed to be hard to compile. Befunge code is written in a 2d plane, where ASCII characters represent instructions. An instruction pointer starts in the top left of this plane, and begins travelling right. Data is stored in a stack, similar to many other esoteric languages. One other feature of Befunge is that it is self-modifying, meaning instructions can modify the plane the code is on. Since Befunge-98, there is no fixed size of the plane, meaning Befunge is a Turing complete language. - -\section{Pyth} -Pyth is a language designed to be both concise, but also clear to read. Pyth is designed to be similar to python, but with every instruction a single character. When ran, a pyth code is first compiled into python before being executed. Unlike many other esoteric languages, Pyth is procedural based, not stack based. Print statements are also implicit in Pyth, and all constructs are end of line terminated. +\section{Examples of Esoteric Languages} +There are many different examples of esoteric languages. +One such language is the Shakespearian Programming Language, which is an where code is written so it reads like how a script would, such as \texttt{[Enter Juliet]} where \texttt{Juliet} may be a variable name. +Another example of an esoteric language is Befunge, one of the most popular and well known esoteric languages, which is intentionally designed to be hard to compile. +Befunge code is written in a 2d plane, where ASCII characters represent instructions. +An instruction pointer starts in the top left of this plane, and begins travelling right. +Data is stored in a stack, similar to many other esoteric languages. +One other feature of Befunge is that it is self-modifying, meaning instructions can modify the plane the code is on. +Since Befunge-98, there is no fixed size of the plane, meaning Befunge is a Turing complete language. +Moreover, Pyth is a language designed to be both concise, but also clear to read. +Pyth is designed to be similar to python, but with every instruction a single character. When ran, a pyth code is first compiled into python before being executed. Unlike many other esoteric languages, Pyth is procedural based, not stack based. Print statements are also implicit in Pyth, and all constructs are end of line terminated. \chapter{Compiler Design and Methodology} This chapter will discuss how compilers work, and the design behind them. The goal of a compiler is to convert the source code into an from which the CPU can execute. As mentioned in chapter 2, a compiler works by converting the entire source code in one go, then executing, unlike a interpreter which executes each line at a time. However, before the code can be executed a number of steps have to be taken. -- cgit v1.2.3