News aggregator

Advice on migrating live applications to Haskell

Haskell on Reddit - Mon, 07/13/2015 - 1:40am

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]
Categories: Incoming News

Please rename 'stack' to 'haystack'

Haskell on Reddit - Sun, 07/12/2015 - 11:07pm

'Stack' is too generic and widely used to mean different things in programming.

Searching for 'haskell stack' ( currently has this as the top result - 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 ( 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 ( and this is not going to happen. I believe that it was a mistake not picking the name stkg ( but it's a closed chapter for now.

submitted by haskman
[link] [77 comments]
Categories: Incoming News

Announcing libravatar < at > hackage

haskell-cafe - Sun, 07/12/2015 - 8:09pm
Hello! Libravatar - - is a free-as-in-freedom and decentralized avatar (profile image delivery service, a replacement of the centralized and proprietary grava7ar. There has been a Haskell library for grava7ar for some time, but not for Libravatar. I just finished writing one, and did a bit of testing which had good results. More testing and feedback etc. very very welcome! I also enourage you all to *integrate libravatar into your desktop/web applications and websites*! Support openness, decentralization and freedom by using Libravatar. --- fr33domlover <> GPG key ID: 63E5E57D (size: 4096) GPG key fingerprint: 6FEE C222 7323 EF85 A49D 5487 5252 C5C8 63E5 E57D _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >
Categories: Offsite Discussion

On Windows after I install the new cabal-install then when I do a cabal update it says there is a new ...

haskell-cafe - Sun, 07/12/2015 - 6:28pm
On Windows after I install the new cabal-install then when I do a cabal update it says there is a new cabal-install available. Yet cabal-install installed without any errors. Why do I get this message? -- -- Sent from an expensive device which will be obsolete in a few months! :D Casey _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >
Categories: Offsite Discussion

AI4FM 2015: Final call for short contributions

General haskell list - Sun, 07/12/2015 - 2:48pm
AI4FM 2015 The 6th International Workshop on the use of AI in Formal Methods *1st September 2015 in Edinburgh, Scotland.* In association with AVoCS 2015 ( Important dates ---------- *Submission deadline: 1st August 2015* Notification of acceptance: 10th August 2015 Final version due: 21st August 2015 Workshop: 1st September 2015 Overview ---------- The 6th International Workshop on the use of AI in Formal Methods (AI4FM 2015) will be held on the 1st of September, 2015 in Edinburgh, Scotland. The AI4FM workshops bring together researchers from formal methods, automated reasoning and AI; aiming to address the issue of how AI can be used to support the formal software development process, including requirement analysis, modelling and proof. The workshops include a mix of industrial and academic participants and we anticipate attracting a similarly diverse audience in AI4FM 2015. We invite 3-page short contributions (extended abs
Categories: Incoming News

mp4v2 bindings for Haskell?

Haskell on Reddit - Sun, 07/12/2015 - 2:42pm

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]
Categories: Incoming News

Daniil Frumin: Darcs 2.10.1 (Mac OSX build)

Planet Haskell - Sun, 07/12/2015 - 12:13pm

Darcs 2.10.1 has been released!

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 > . You can also report bugs by email to > bugs at, or come to #darcs on

I’ve updated Mac OS to version 2.10.1. You can install it with

brew install
Tagged: darcs, haskell, homebrew
Categories: Offsite Blogs

Problems with Numeric.Matrix module

Haskell on Reddit - Sun, 07/12/2015 - 12:12pm

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]
Categories: Incoming News

Using newtypes or any data with unboxed Vectors

libraries list - Sun, 07/12/2015 - 7:54am
I think I've managed to come up with an easy, useful, and sound way for mere mortals to use unboxed vectors with arbitrary datatypes, without using template Haskell. I had a need for this capability, googled about it, and I didn't find a satisfying way to do it. This technique seemed useful and simple enough to go into the vector library, but there's so much stuff going on in there I'm not ready to submit a patch. A user just needs to create an UnboxEquivalent instance for their type, and then they can work with what looks and acts like a vector of their type, but is in fact backed by a newtype-wrapped unboxed vector of the equivalent type. newtype SmallPos = Pos Int deriving (Eq, Ord, Show) smallPos :: Int -> SmallPos smallPos x | x > 0 && x < 100 = Pos x | otherwise = error "bad SmallPos" instance UnboxEquivalent SmallPos where type UnboxEquiv SmallPos = Word8 toUnbox (Pos x) = fromIntegral x fromUnbox x = (Pos (fromIntegral x)) test1 :: EVector SmallPos test1 = Data.Vecto
Categories: Offsite Discussion

Free, cofree, and IO

Haskell on Reddit - Sun, 07/12/2015 - 7:23am

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]
Categories: Incoming News

When can we expect the next version of the Haskell Platform?

Haskell on Reddit - Sun, 07/12/2015 - 2:13am

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]
Categories: Incoming News

Mockup of a redesigned /r/haskell (based on the new

Haskell on Reddit - Sun, 07/12/2015 - 1:09am

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

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:

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):

You can try it out yourself if you have the Stylish browser extension by making a new style and pasting this gist in:

submitted by evanrelf
[link] [31 comments]
Categories: Incoming News

SQL database schema diff tool

haskell-cafe - Sat, 07/11/2015 - 6:54pm
Hi, list! I wish I have a tool which would compare two database sachemas, where each schema is represented as a list of 'CREATE smth' instructions. The result of such a comparison would be a list of 'ALTER smth' instructions. This instruction set would change the database from first state to second, if the transition is possible without data losses. The 'hard' mode - to prepare the transition for any inputs, with minimal data losses. The database of interest is PostgreSQL. Does such a tool exist? If not, which package do I better use to build the AST of initial schemas? The example schema is in attach. Thanks in advance, Sergey _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >
Categories: Offsite Discussion

Calculus in Haskell?

Haskell on Reddit - Sat, 07/11/2015 - 5:56pm

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]
Categories: Incoming News

ANN: transformers-lift

Haskell on Reddit - Sat, 07/11/2015 - 4:27pm

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]
Categories: Incoming News

Anything like find-by-example from Pharo Smalltalk in Haskell?

Haskell on Reddit - Sat, 07/11/2015 - 3:10pm

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]
Categories: Incoming News