4 ms·
Could someone link me to a consumer web app with standard features (generating HTML, talking to a database, making requests to 3rd party services) that uses one
by swanson 14y ago
Could someone link me to a consumer web app with standard features (generating HTML, talking to a database, making requests to 3rd party services) that uses one of these typed functional languages (Haskell, Clojure, whatever)?
I'm genuinely curious what this code would look like - every example I've ever seen goes something like "Types are the best thing ever! Here's an example: sorting a list! making a stack/queue! See it's GUARANTEED to work! Math and stuff!". The closest I've seen is the Gilded Rose kata, but that doesn't seem to handle UI/database.
And, please, don't say "just use an I/O monad!" - that isn't helpful to me.
- deleted 14y ago[deleted]
- pufuwozu 14y agoAuthor here. I use Haskell for a lot of webapps. Here's a webapp that talks to GitHub: http://licentious.herokuapp.com/ http://licentious.herokuapp.com/ https://github.com/pufuwozu/licentious https://github.com/pufuwozu/licentious Here's a programming language competition that I organise: http://www.pltgames.com/ http://www.pltgames.com/ The web framework that I use is Yesod. Over the years I've used CakePHP, Django, Rails, Lift and Play! - Yesod is definitely the BEST framework I've used: http://www.yesodweb.com/ http://www.yesodweb.com/
- runT1ME 14y agoClojure isn't typed, and Scala is a functional language, is used extensively at Twitter and FourSquare, LinkedIn from what I heard, some at Yammer, and a ton of other companies.
- Sssnake 14y agoSure, here's a haskell web app written with snap. I wouldn't take too much from the yesod example you were given, yesod is not idiomatic haskell at all. https://github.com/chrisdone/hpaste https://github.com/chrisdone/hpaste
- xavi 14y agoHere's a complete authentication web app that uses Clojure https://github.com/xavi/noir-auth-app https://github.com/xavi/noir-auth-app It generates HTML using Enlive (for complete separation of code and markup), it talks to a MongoDB database (using CongoMongo). It also has a little bit of ClojureScript (I think that being able to use the same language in both client and server is a very good benefit of using Clojure for web apps, especially if the people developing the front-end and the back-end are the same).