6 ms·
Popularizing Haskell through easy web deployment
- RyanZAG 13y agoI get the desire, but you'll never be able to popularize Haskell because the only people who want to use it are math majors, and most web devs are not math majors. If you want to popularize Haskell you'll need to rework the syntax at the very least.
- coolsunglasses 13y agoThe syntax isn't the primary difficulty for a beginner by any means.
- codygman 13y ago> the only people who want to use it are math majors Edit: This is FUD and I kind of feel offended by it, though I'm not sure that is rational I'm not a math major. I am a web dev. I want to use Haskell (and am using in a smaller capacity) because it means I have to be up late fixing things less. It means that I can worry about my sites getting hacked less because of the strong static typing guarantees which protect me against csrf. On top of all that type annotations are great for documenting things. On top of that, composing functions and monads can allow you to do things much safer and much more quickly. There are many teaching resources which show how some of Haskell's perceived cons can be pros such as these: http://yannesposito.com/Scratch/en/blog/Haskell-the-Hard-Way/ http://yannesposito.com/Scratch/en/blog/Haskell-the-Hard-Way... http://book.realworldhaskell.org/ http://book.realworldhaskell.org/ http://learnyouahaskell.com/ http://learnyouahaskell.com/ http://adit.io/posts/2013-04-17-functors,_applicatives,_and_monads_in_pictures.html http://adit.io/posts/2013-04-17-functors,_applicatives,_and_... (with web dev applicable example) http://en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_Hours http://en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_H... Honestly from my experiences in #haskell on freenode, /r/haskell, and Haskell related content on the web it seems like many more people are using it with the intent to make "real world software". I haven't gotten the ivory tower vibe from anyone in the Haskell community yet. Quite the opposite actually, everyone seems very pragmatic.
- PeterisP 13y agoThe syntax for "record types" - elements of named tuples - is really awkward and pollute namespace. I.e., if I want a module in my app to have two different types containing an element 'customerID' that I'd like to refer by name in that context, then it's a bit painful - and it is a really common need if I need to quickly make a mostly-CRUD webapp, for which otherwise Haskell/Yesod would be as practical as Ruby/Rails.
- carterschonwald 13y agoThere are a few different solutions to the record name space problem that are due to land in the next year. And already some decent lens based solutions too.
- Fixnum 13y agoIt's being fixed. http://www.reddit.com/r/haskell/comments/1rpte3/explanation_of_the_new_haskell_records_extension/ http://www.reddit.com/r/haskell/comments/1rpte3/explanation_...
- pekk 13y agoMost frameworks protect you against CSRF, that is not unique to Haskell. Other languages also allow you to check your work using tests and static checks.
- codygman 13y agoI would argue that it isn't quite the same, since with Haskell you can enforce it with the type system. While other frameworks are great pieces of engineering and usually well tested, Haskell is nothing without it's type system therefore tons of work is put towards ensuring that what the type system says is true, is true. The other thing is I believe frameworks like Yesod use property based testing which IME catches a lot more than unit tests by themselves. I feel like my point is unclear here, perhaps someone more experienced with Haskell and/or Yesod can articulate it better than I can.
- nnq 13y agoThe syntax is not the problem for Haskell gaining acceptance for web dev. Most web devs are frightened by functional programming idioms and will run away screaming when exposed to monads. But the biggest problem imho is the type system that while great, makes things like making simple structs / named tupples or whatever you want to call them annoying and the lack of any "nice" way to just do OOP in it - and no, saying OOP is a bad idea and pretending it doesn't exist doesn't work. Scala is a good Haskell for web dev. But it's too complex and has no chance of broad adoption against Node/Javascript, Ruby, Python and even PHP frameworks because for 90% of devs it simply doesn't bring anything good enough to make it worth putting up with the complexities stemming from the unholy OOP+FP mix.
- deleted 13y ago[deleted]
- klrr 13y agoSorry, actually thought you were trolling when you first said only math major use it and then made it sound like the syntax was the reason for. The core points in your criticism is known though, and basically apply to any other language. Most language with new concepts and new syntax will be difficult to learn if you already are used to another language. Especially if the language is almost the opposite of the one you learn. Imperative language are about writing how and writing functionally is about writing what. Widely different mindset is needed to accomplish many tasks. Recursion being one thing, monadic computation being another. One thing many people coming from OOP to Haskell have a hard time with is that they write new classes when what they really want is new datatypes. In the end you win when you've learnt a language such as Haskell though, cause even if you won't write production code in it you will learn a lot of useful practices you can apply to everyday programming. Also you will have a new language to write your side projects in. ;)
- kazagistar 13y ago> In the end you win when you've learnt a language such as Haskell though, cause even if you won't write production code in it you will learn a lot of useful practices you can apply to everyday programming. This is why I hopefully trudge on, even though the further I get into haskell, the more hope I lose of this being true.
- klrr 13y agoClearly a troll, down-vote and move along.
- Mikeb85 13y agoPlease, if you've ever taken even an introductory college math course you'll understand Haskell's syntax. Heck, it's not that hard to reason about even if you haven't...
- nnq 13y ago> nicely structured codebases whose language helped prevent a jumbled undocumented mess What makes one think that any language can prevent "a jumbled undocumented mess"?
- codygman 13y agoI believe no language can prevent a "jumbled undocumented mess", but it a language can get pretty far just by making paths to make documented and clear code easier than paths to no documentation and jumbled code.
- acchow 13y agoIt sounds like a thinly-veiled quip against duck typing. Type systems are self-documenting? (Or, Hindley-Milner type systems are self-documenting?)
- tel 13y agoOh yes! My favorite part of Haskell's type system is it's documentation purpose. It doesn't cover intent very well, but it's quite frequent that I can reason about the entire purpose and functionality of a function just by looking at its type. This documentation is guaranteed to never go out of date.
- miloshadzic 13y agoI feel that while type information is useful, some of the more advanced libraries have signatures that are very difficult to reason about. Disclaimer: Didn't write read a lot of Haskell so it may be just that.
- tel 13y agoDefinitely. It can go VERY overboard at times, and that's part of Haskell style, writing code that makes intelligible types appear. It means that both the compiler and your users will have an easy time with your code. Most of the best libraries are pretty good about that. It's also a familiarity thing. The most complex signatures require some practice before they're easy to digest.
- klrr 13y agoSince no one have pointed out yet, I take the opportunity to recommend FPComplete. It's a new company focusing on this exact problem. They offer tools like an IDE and deployment model. You can just sign-up on their website and start coding directly, you don't need to mess with setting things up. They also got School of Haskell which is a central place of really great tutorials ranging from tutorials on developing web apps to category theory stuff. Check them out: https://www.fpcomplete.com/ https://www.fpcomplete.com/
- gu 13y agoI don't get the appeal of an IDE in Haskell development. You can download the Haskell platform on haskell.org. In the case of Windows or OS X, it takes a few mouse clicks, and on Linux you launch a package manager to install it. There may be some benefits of using whatever FP Complete offers, but if anyone is struggling with getting Haskell set up on his computer with the official releases, then that person might need to acquire some other skills first before delving into the world of pure functional programming.
- GeneralMayhem 13y agoInstallation hardly counts as a success when you're playing with a new language. An IDE that can make intelligent suggestions would make Haskell much, much more approachable.
- dragonwriter 13y agoYour post implies that the main reason people would use an IDE is because they are having trouble getting non-IDE tools for the language setup. Of all the benefits I've heard ever used to sell IDEs, that's got to be the least common. Usually, things like syntax highlighting and error detection as you type, project management tools, version control integration, autocomplete, documentation/API tooltips, debugger integration, etc. are the advantages. Some of those might be less relevant to Haskell than to, say, Java/C# style languages, but some of them would still be useful.
- gu 13y ago
- regularfry 13y agoWhat gave PHP its boost was a pervasive mod_php, and an instant change-file/see-change cycle. mod_buildpack?
- klrr 13y agoNot sure if it's related (not a web developer), but here it is anyway: http://nixos.org/~eelco/mod_haskell/ http://nixos.org/~eelco/mod_haskell/
- mbq 13y agoTwo, well, issues from my experience with gitit (great software by the way): compilation may take huge amounts of RAM compared to what the webapp itself will later use -- it is likely that one will need to use some other, metal machine for building. Also, Haskell is doing idle garbage collection which eats CPU even when nothing is happening, and this may become a less or more painful surprise. It can be turned off, though.
- dons 13y ago> idle garbage collection ... Eating CPU when nothing is happening .. Painful surprise Wait, what?
- jcurbo 13y agoI don't have any specific info about what the parent post was talking about, but for those that were curious about Haskell's garbage collector in general (like me), here is a Stack Overflow link with some explanation: http://stackoverflow.com/questions/15236238/current-state-of-haskell-soft-real-time http://stackoverflow.com/questions/15236238/current-state-of... And here is the GHC (Haskell compiler) docs on controlling the garbage collector: http://www.haskell.org/ghc/docs/7.0.1/html/users_guide/runtime-control.html http://www.haskell.org/ghc/docs/7.0.1/html/users_guide/runti...
- MaxGabriel 13y agoCool. Does Haskell have a great web development tutorial out there that could use this?
- tel 13y agoThe Happstack tutorial [0] is pretty great and I just put together a bare-bones compiling Happstack server [1]. That might be a great way to start. Happstack is a fairly unopinionated web package, so there's a bit of elbow grease needed still, but it's my favorite. [0] http://www.happstack.com/docs/crashcourse/index.html http://www.happstack.com/docs/crashcourse/index.html [1] https://github.com/tel/happstack-heroku-test https://github.com/tel/happstack-heroku-test
- PeterisP 13y agoThe "book" for Yesod framework is quite like a walkthrough - http://www.yesodweb.com/book http://www.yesodweb.com/book
- egonschiele 13y agoI wrote a tutorial a while back that finishes with deploying to Heroku: http://adit.io/posts/2013-04-15-making-a-website-with-haskell.html http://adit.io/posts/2013-04-15-making-a-website-with-haskel...
- Mikeb85 13y agoFor me, the biggest issue to learning Haskell is once programs progressed to a certain level of complexity, the sheer amount of types that got thrown at me made my head hurt. I could deal with pure functions, IO, monads (I even like monads), even mutable variables and arrays weren't too bad. But the types, so many types and types of types... It seemed every value that was meant to represent anything had its own type and reasoning about what function to use on what type was too much. Maybe I'll revisit it one day, but that was my pain point...
- Ixiaus 13y agoThe more software you write in it the more that stuff becomes second nature (unless you're a library writer in which you have to reason about your types very carefully).