List of Figures

 

Chapter 1. Why Nim?

Figure 1.1. Compilation backends

Figure 1.2. How Nim compiles source code

Figure 1.3. How the Nim compilation process compares to other programming languages

Chapter 2. Getting started

Figure 2.1. The syntax of a Nim procedure definition

Figure 2.2. for loop syntax in Nim

Chapter 3. Writing a chat application

Figure 3.1. My screen after I send the message

Figure 3.2. John’s and Grace’s screens

Figure 3.3. Client-server vs. peer-to-peer

Figure 3.4. The operation of the chat application

Figure 3.5. Successful compilation of client.nim

Figure 3.6. Starting the client without any parameters

Figure 3.7. Starting the client with one parameter

Figure 3.8. The supplied command-line parameters and how to access them

Figure 3.9. Problem caused by the client being blocked indefinitely

Figure 3.10. Blocking execution of client.nim

Figure 3.11. Blocking execution of client.nim with spawn

Figure 3.12. Good and bad protocols

Figure 3.13. The steps needed to start accepting new connections on a server socket

Figure 3.14. The difference between synchronous and asynchronous accept

Figure 3.15. Nim’s asyncdispatch event loop

Figure 3.16. The execution of listing 3.17

Figure 3.17. The nonblocking parallel execution of client.nim)

Figure 3.18. The server’s output

Figure 3.19. The client’s output

Chapter 4. A tour through the standard library

Figure 4.1. The most useful pure modules

Figure 4.2. The most useful impure modules