I have built a chrome extension that uses a back-end powered by a Python server with Flask. It receives a fairly modest but steady amount of traffic daily, and this traffic is growing (slowly). I'm very comfortable in Python so there's nothing inherently wrong with the current set up, but I love Haskell and have an interest in switching the server over. I want to do this because:
- Haskell is awesome and I want to get better at it. At my current skill level, I'm far less productive in Haskell than in other languages - most of my time is spent trying to understand new libraries, and wrapping my head around how to use them. I really want to see if Haskell can be as productive for me as the veterans in this community claim it is for them.
- Type safety.
I have these concerns that have been holding me back from making the switch:
- This is currently deployed on Heroku. I've never successfully deployed a Haskell app to production, and haven't even yet attempted getting it to work well with Heroku. Halcyon looks really cool, but historically things in the building and deploying area end up being much harder and more time consuming for me in practice than I think it should be. Python seems to be much easier to use in this area (at least for me, please share your opinion if you disagree).
- I currently use a Python library to hash and check passwords (passlib). Switching to a new library without making everyone reset their passwords seems like a potential pain point.
- I'm worried the time required to completely rewrite the server will outweigh the benefit of the switch. The current implementation is ~1500 lines of Python.
- Swapping out a live server for a new one just seems plain tricky. That one is not a Haskell related fear.
Are there pros or cons of such a change I'm not considering? Does anyone here have experience rewriting a production application in Haskell and have some stories to share on what you learned from it? Would you do it again? Any thoughts on this situation would be appreciated!submitted by aviaviaviavi
[link] [10 comments]
'Stack' is too generic and widely used to mean different things in programming.
Searching for 'haskell stack' (https://duckduckgo.com/?q=haskell+stack) currently has this as the top result - http://www.haskell.org/haskellwiki/Stack_overflow. I'm sure that will change, but it does show how 'stack' conflicts unnecessarily with other usages of the term. Not to mention haskell specific terms like 'monad transformer stack' etc.
Can we please rename it to something more distinct and a little easier to search for online?
I suggest 'haystack', which can be shortened to 'hastack' or 'hstack' (but still pronounced haystack). Almost anything less generic than 'stack' would be fine though.
Edit: To clarify to people who think that Google gets it right, or that searchability of stack is not a concern - it's not just about being able to search for stack. It's about having a collision that doesn't need to exist. As 'kqr' points out below - One problem lies in searching for "haskell stack <something>" where the "<something> stack" is a relevant thing on its own, such as "transformer stack" or "web dev stack". And once the name is solidified, we will have to pay the cost of not being able to search correctly for things year after year.
Edit 2: Haystack is only a suggestion. Hastack is a good amalgam of Haskell and stack. Hstack also works. Other things people suggested (in no particular order) - "sheaf", "costack", "hake", "needle", and perhaps a little less seriously also things like "dude", "bro", "plz". Also suggested - reusing the name "stackage"/"stk" as those tools are effectively defunct now.
Edit 3. Chris Done has said this will not happen (https://www.reddit.com/r/haskell/comments/3d3e95/please_rename_stack_to_haystack/ct1itcd). However, this post has reached 100 upvotes, indicating that it has atleast some popular support. Chris / someone else from FPComplete, please let us know if this has no chance at all of happening so we can stop the bikeshedding :)
Final Edit: The powers that be have spoken (https://www.reddit.com/r/haskell/comments/3d9z57/about_the_name_stack/) and this is not going to happen. I believe that it was a mistake not picking the name stkg (https://www.reddit.com/r/haskell/comments/3d9z57/about_the_name_stack/ct3d6rv) but it's a closed chapter for now.submitted by haskman
[link] [77 comments]
On Windows after I install the new cabal-install then when I do a cabal update it says there is a new ...
Another relative newcomer to haskell, I'm rewriting a media management system for my home video library that I originally wrote in Python as a way to work through concepts in LYAH and RWH. It's taken me a few weeks to get the basic concepts solid, and work through some differences between the code in RWH and what works in the current platform.
At this point, I need some functions that will read tags from .mp4/.m4v videos. I tried TagLib that I found on hackage,but that doesn't seem to work with videos (and only mentions audio in the docs). Does anyone know of any haskell bindings for the mp4v2 library, or of any library that will read mp4 video tags in haskell?
My other choice is to start to rewrite something like Python's mutagen in haskell, but I'm not quite sure I'm ready for that.submitted by rogue203
[link] [5 comments]
Citing the official release notes> The darcs team is pleased to announce the release of darcs 2.10.1 ! > .. > > # What's new in 2.10.1 (since 2.10.0) # > > - generalized doFastZip for darcsden support > - support terminfo 0.4, network 2.6, zlib 0.6, quickcheck 2.8 and > attoparsec 0.13 > - errorDoc now prints a stack trace (if profiling was enabled) (Ben Franksen) > - beautified error messages for command line and default files (Ben Franksen) > - fixed the following bugs: > - issue2449: test harness/shelly: need to handle > mis-encoded/binary data (Ganesh Sittampalam) > - issue2423: diff only respecting --diff-command when a diff.exe > is present (Alain91) > - issue2447: get contents of deleted file (Ben Franksen) > - issue2307: add information about 'darcs help manpage' and > 'darcs help markdown' (Dan Frumin) > - issue2461: darcs log --repo=remoterepo creates and populates > _darcs (Ben Franksen) > - issue2459: cloning remote repo fails to use packs if cache is > on a different partition (Ben Franksen) > > # Feedback # > > If you have an issue with darcs 2.10.0, you can report it on > http://bugs.darcs.net/ . You can also report bugs by email to > bugs at darcs.net, or come to #darcs on irc.freenode.net.
I’ve updated Mac OS to version 2.10.1. You can install it withbrew install http://darcs.covariant.me/darcs.rb
Tagged: darcs, haskell, homebrew
I just installed Haskell Platform 2014.2.0.0 (x64) for Windows. I tried to load Numeric.Matrix into GHCi to play around. It wouldn't compile, giving this error on 161:5:'typeOf' is not a (visible) method of class 'Typeable'
So I commented out the instance that was causing the problem:instance Typeable a => Typeable (Matrix a) where typeOf x = mkTyConApp (mkTyCon3 "bed-and-breakfast" "Numeric.Matrix" "Matrix") [typeOf (unT x)] where unT :: Matrix a -> a unT = undefined
This allowed it to load into GHCi with a warning:The import of 'Data.Typeable' is redundant except perhaps to import instances from 'Data.Typeable'
I instantiated a matrix:> let m = fromList [[1.0,5.0,9.0],[3.0,5.0,7.0],[6.0,4.0,8.0]]
which worked, then tried to compute its determinant> det m
which crashed GHC. Has anyone gotten this module to run smoothly?submitted by lithiumdeuteride
[link] [2 comments]
I've been writing a series of posts on using the free monad for DSLs and cofree comonads for the corresponding interpreters.
I've written a bit about bringing IO into that mix here.
Hopefully some folks find it interesting and/or useful. Let me know if you have any comments / feedback / criticism.submitted by dalaing
[link] [5 comments]
Right now we're still on 2014.2.0.0. When is 2015.4.0.0 shipping? Will it have GHC 7.10.2?submitted by bitmadness
[link] [3 comments]
Hi guys! I'm an ultra-noob to Haskell (still working my way through LYAH) but I'm falling in love with the language and I'm really enjoying learning!
Since I can't really do anything in Haskell to help out the community, I thought I could contribute with a potential redesign of the subreddit, based on the updated website design over at http://haskell.org/.
I've spent a few hours making a mockup of what the subreddit could look, using a modified version of the /r/Naut subreddit theme. I think it would be really nice to have a more consistent design across the website and this subreddit, and Naut brings a lot of the modern, clean design we see on the updated website here.
I'd appreciate hearing your opinions, and I will try to make whatever modifications needed to fit the needs or /r/haskell.
TL;DR: Check it out here: https://www.reddit.com/r/evanrelf/UPDATE 7/12/15: This is how it would look on the actual /r/haskell and not my test subreddit (with it's sparse posts): http://imgur.com/a/wlCwZ
You can try it out yourself if you have the Stylish browser extension by making a new style and pasting this gist in: https://gist.github.com/evanrelf/a2291d8b9d195cc35a1csubmitted by evanrelf
[link] [31 comments]
When I learned Group Theory I found a really good exercise was expressing the Rubik's Group in Haskell. It was particularly interesting to think about efficient ways of representing permutation groups and coming up with a notation in Haskell that matched the mathematical notation.
I've recently started learning some calculus and I was thinking about trying to do something similar. But I'm not really sure where to start. And I'm having trouble finding calculus in packages (everything I've found is lambda calculus).
My line of thinking was something like this... calculating the derivative takes a function (x -> t) to the derivative dx/dt. This seems like an Endofunctor DxDt t x (also a Bifunctor and Contravariant Functor?). Further, you can take additional derivatives of a derivative, which suggests to me a Monadic bind/join possibility on DxDt t (DxDt t x). I don't know enough Category theory to take that thought any further though. E.g. is the Comonad indefinite integration?
Additionally the largely mechanical integration / differentiation rules seem like combinators. Particularly when it comes to things like the chain rule or for more complex things like linear DEs. I imagine you could apply a parser combinator over a function to find its derivative provided it was formulated properly.
Rather than a paper on the subject (which would almost certainly be too dense for me) are there any blog posts / Hackage packages that could shed some light on where to continue this mini-project? Also any comments on whether any of the above is remotely correct?submitted by TheCriticalSkeptic
[link] [21 comments]
The transformers package defines lifting operations for each monad transformer. Those lifting operations have common type signatures and laws they obey -- just what a type class method needs. However, for some reason they're not type class methods but completely separate functions, and their signatures and laws are defined in a separate module (Control.Monad.Signatures).
The transformers-lift defines the type classes for lifting monad transformers operations and also adds missing instances (so now you can lift catch through ExceptT, pass and listen through WriterT and RWST, and more).
The package is extremely lightweight, so if your library defines custom monad transformers, consider adding instances for transformers-lift.submitted by int_index
[link] [4 comments]
Just watched 7 minutes of Pharo Smalltalk for Rubyists and thought that Haskell obviously should have something like it (If it already does it should be advertised a bit better). Also, Hoogle is great and would greatly benefit from something like this integrated into it (alongside Djinn).submitted by AisRauli
[link] [9 comments]