Just for my own pleasure and curiosity I wanted to combine Lisp’s possibilities to generate dynamic web pages and some basic math I picked up at Project Euler. The whole endeavour was inspired by Adam Tornhill’s great tutorial.
I am using:
as the basic libraries which are all available via quicklisp.
I did not spend much time on the design of this page and have only very little knowledge about JavaScript and CSS. This could all be added in a real web application. Furthermore, one could set up a database and store factorizations already calculated and so on…
After downloading the source and place it in a location ASDF knows, simply type:
> (asdf:load-system :web-primes)
Then visit http://localhost:8080/primfaktoren in your browser and start factorizing.
To stop the server, type the following in your REPL:
> (hunchentoot:stop web-primes::*acceptor*)