Re:Adventures of an imperative programmer in the land of fp
by jacquesm on Friday August 27, 2010 @11:23AM
(#1639054)
For me one of the real eye openers was that I'd gotten to the end of a fairly long book on FP without seeing a single assignment of a value to a variable.
[ Parent
| on HN ]
Re:Adventures of an imperative programmer in the land of fp
by rgoddard on Friday August 27, 2010 @11:30AM
(#1639071)
I have just finished the first iteration of a web app written in clojure and in the several hundred lines of code, I have a single variable which changes state.
Re:Adventures of an imperative programmer in the land of fp
by jacquesm on Friday August 27, 2010 @12:05PM
(#1639189)
Neat! Did you use a templating system? And if so which one?
Re:Adventures of an imperative programmer in the land of fp
by rgoddard on Friday August 27, 2010 @03:51PM
(#1639994)
I am using hiccup for generating the html, compojure and ring for routing and request/response handling, jetty as the webserver and postgresql as the database
Re:Adventures of an imperative programmer in the land of fp
by jacquesm on Friday August 27, 2010 @04:32PM
(#1640149)
Did you cook up your own authentication or is that provided by one of those?
Re:Adventures of an imperative programmer in the land of fp
by rgoddard on Friday August 27, 2010 @09:59PM
(#1640944)
As of now I am just using my own. The user can create an account with username/password. When they login, it will associate the user with the session object. Session management is handled by ring, although the session data resides in memory only. I have a function which wraps around the routes which require the user to be logged in and checks the session to make sure the user is not nil.
Re:Adventures of an imperative programmer in the land of fp
by die_sekte on Friday August 27, 2010 @01:02PM
(#1639372)
The usual solution for that would be hiccup, with a few custom functions.
Re:Adventures of an imperative programmer in the land of fp
by runevault on Friday August 27, 2010 @01:21PM
(#1639434)
Depends, Enlive is seeing at least some use as well (the web app I built for personal use has enlive handling the HTML as well).