News aggregator

Using cabal to build in subdirectories?

Haskell on Reddit - Fri, 10/23/2015 - 1:56pm


I use haskell to to Project Euler problems, so my "project" directory looks like p1,p2, p3 ... pn for each different problem that I'm working on. inside each subdirectory there's a Main.hs and any other supporting .hs files.

I'm wondering if there's a way to use cabal with unix wildcards or regexes to build everything without needing an explicit executable section for each problem in the .cabal file.

submitted by cptwolf
[link] [7 comments]
Categories: Incoming News

Meta: How does Reddit know my "Recently Viewed Links"?

Haskell on Reddit - Fri, 10/23/2015 - 5:10am

If I click one of the posted links to an external site (not the comments for that post) it appears on the sidebar under "Recently Viewed Links". How does Reddit know that I've viewed the external site?

submitted by tomejaguar
[link] [7 comments]
Categories: Incoming News

Is it appropriate to ask for help writing an algorithm here in exchange for bounties (money)? If not, is there a better place?

Haskell on Reddit - Thu, 10/22/2015 - 11:04pm

So unless a mod posts that's it's fine, I won't place my specific inquiry here in order to not break the spirit of the post.

Basically I need a script that's beyond my ability to write and I'm willing to pay for it. It's not anywhere near a full on software project. I just need to process a set of values and run a (difficult) calculation on them and output the solution to the terminal or to a file or whatever. Based on my non-professional experience, I'd say it's on the level of an extremely hard homework assignment.

Is there a good place for me to ask for this? I'm asking in this sub, because the problem seems particularly suited to Haskell or other functional languages.

submitted by rorriMnmaD
[link] [10 comments]
Categories: Incoming News

Haskell Computer Vision SIFT binding?

Haskell on Reddit - Thu, 10/22/2015 - 10:41pm

Anyone know a way to run a SIFT detector/descriptor from Haskell?

I've been doing my Machine Perception homework in Haskell so far, and don't want to stop here.

submitted by CarbonFire
[link] [13 comments]
Categories: Incoming News

Why don't we hear people complaining about Clean's overloaded `length`?

Haskell on Reddit - Thu, 10/22/2015 - 9:21pm

Wasn't one of Clean's original design goals to be an educational language for strongly-typed, lazy functional programming? So how come we're not hearing educators complaining that Clean's length function is overloaded and the one for [] is just an instance?

In fact, I happened to go to a university where (at least at that time) Clean was used in the introductory functional programming class, and I specifically remember that when length was used in an early example, the lecturer mentioned that it's overloaded, we'll be covering typeclasses in a couple lectures, just pretend that its type is specialized to [], and we swiftly moved on.

Why does the similar situation in Haskell suddenly freak out so many people?

submitted by gergoerdi
[link] [44 comments]
Categories: Incoming News

[ANN] haskell-ide project

haskell-cafe - Thu, 10/22/2015 - 8:06pm
The ongoing effort to save us as a community from separately implementing the same functionality over and over around IDEs[1] has found a home in the haskell-ide project on github [2]. This mail serves as a call to collaborate for all parties interested in this space. It is still at a very early stage, but the intent is to pool resources so that we can have really good support for IDEs that can extend through the entire tool chain from changes to GHC to better support tooling through the build environment and community information management. This should mean that people who are familiar with a particular part of the chain can focus their efforts there, knowing that the other parts will be covered too. This is a deliberately broad and vague scope, the reality is likely to be much more limited initially, but the sooner we can get started the sooner we will have something concrete to criticise and improve. For those wishing to get involved the following resources currently exist * the haskell-ide maili
Categories: Offsite Discussion

Expressiveness of Morte

Haskell on Reddit - Thu, 10/22/2015 - 4:52pm

I’m wondering if it would be possible to translate GHC Core or STG to Morte (calculus of constructions). More generally, is there any information/papers on the difficulties/limitations of Morte/CoC?

submitted by altaic
[link] [26 comments]
Categories: Incoming News

Seeking review for hexagonal grid library

Haskell on Reddit - Thu, 10/22/2015 - 2:46pm

Hi, all. Long time lurker, first time poster. Someone just posted about making a hex-grid game, so I'm finally coming out of the woodwork.

Many know about the almighty hexagon post. (Thank you, /u/redblobgames!) I wanted to make a package to implement useful things on that page. Yes, I'm aware of the grid library.

Could anyone look at the code and tell me about areas for improvement (or features they would like to see)? Feel free to attack anything... implementations, naming, module structure, testing, documentation, formatting, usability.

(edit: formatting issues, forgot link)

submitted by josephwrock
[link] [7 comments]
Categories: Incoming News

New STM Data Structures Collection

haskell-cafe - Thu, 10/22/2015 - 1:47pm
Hi everyone! I want to present a couple of STM data structures which were implemented by me and Ryan Yates this summer (during GSOC 2015). I decided to create only a candidate package [1]. I would be glad if anyone can take a look and/or comment on topic. Since Hackage does not provide the easy way to `cabal install` candidate packages I have written a script [2] which should do all the work for you. It create a directory in /tmp and initialized sandbox along with cloning the library from github [3]. After that it will download Haskell program with an example of data structure usage. ​Thank you for your attention. [1] [2] [3] ​
Categories: Offsite Discussion

[ANN] haskell-ide project

Haskell on Reddit - Thu, 10/22/2015 - 1:09pm
Categories: Incoming News

Continuation of "Haskell School of Music" by Paul Hudak. Where to look?

Haskell on Reddit - Thu, 10/22/2015 - 12:58pm

I'm writing bachelor thesis about reactive programming in Haskell. I'm using Euterpea to develop simple audio application. I almost finished Haskell School of Music by Paul Hudak.

But, as some of you know, Mr. Hudak passed away earlier this year and the book is now finished - chapters on frequency modulation are only half way done. Physical Modelling chapter has a lot of empty spaces. I can't understand ideas presented there if there is no explanation :(

Is there any information whether the book is going to be finished? I don't even know how can I obtain such information.

Is anyone except Paul Hudak involved in writing Haskell School of Music?

submitted by lovaz
[link] [6 comments]
Categories: Incoming News

New microbenchmark question

Haskell on Reddit - Thu, 10/22/2015 - 2:41am

We all love microbenchmarks, why wouldn't we?

So, there was a new microbenchmark posted, and again, it striked me that my naive Haskell implementation is twice as slow as python one ran from PyPy, and just as slow as Python one ran from CPython (regular "python").

Here's a link to my fork:

  1. Generate json with ruby generate_json.rb (sorry)
  2. Run python-based one with time python
  3. Build haskell one with cd json-hs && make && cd ..
  4. Run haskell one with time ./json-hs-bin

My results after 15 minutes of poking:

➜ json git:(master) ✗ time pypy ./ 0.500162876712 0.499362626291 0.499902604092 pypy ./ 5.37s user 0.91s system 99% cpu 6.346 total ➜ json git:(master) ✗ time python ./ 0.500162876712 0.499362626291 0.499902604092 python ./ 11.44s user 0.81s system 98% cpu 12.443 total ➜ json git:(master) ✗ time ./json-hs-bin 0.5001628767123875 0.4993626262908803 0.49990260409169224 ./json-hs-bin 12.37s user 1.60s system 98% cpu 14.207 total

Original reddit post with discussions:

So, my question is: is this "ok" or is there some relatively-simple trick that could be applied and considerably improve performance? Thank you.

submitted by k-bx
[link] [25 comments]
Categories: Incoming News

how to create a pipes producer from websockets?

haskell-cafe - Thu, 10/22/2015 - 12:42am
Hello All, I am trying to use both the websockets library and the pipes library. They seem like a natural fit. However, I wanted to use the websockets library to build a pipes 'Producer' and that does not seem possible without some heavy lifting. The websockets library does not give me a connection I can read from and write to. Instead, I need to supply an IO action (called a clientApp). And execute it using something like: --runClient :: String -- ^ Host
Categories: Offsite Discussion

[ANN] codex 0.4

haskell-cafe - Wed, 10/21/2015 - 7:48pm
Hello Café, I have released a new version of `codex`[1] (a ctags file generator for cabal/stack projects and their dependencies). This release include some fixes but more important it *include support for `stack`* projects. As `stack` is multi-platform and so is `codex`, it should work seamlessly on any OS but I have only done testing on unix. Cheers [1] <>aloiscochard/ codex <>
Categories: Offsite Discussion

Breaking Changes and Long Term Support Haskell

libraries list - Wed, 10/21/2015 - 10:33am
There seems to be a fair amount of friction between those who want to introduce new features or fix significant historical warts in the base libraries - even if this requires breaking changes - and those who insist on no significant breaking changes in new releases, regardless of the reason or how much warning was given. The rest of the industry has already solved this with long-term/extended support releases. Some version of the platform is blessed with long-term support, and will continue to receive bug fixes and security patches for a number of years, but no other changes. This solution exists for Haskell as well, in the form of Long-Term Support Haskell ( by FP Complete. Not only GHC but an entire ecosystem of libraries are frozen when a new LTS version is released and only bug/security fixes are allowed going forward. Users requiring long-term stability over new features could use LTS Haskell, while those who accept some fixing up of old code
Categories: Offsite Discussion

3 release policy

libraries list - Tue, 10/20/2015 - 8:55pm
A "3 release policy" has been recently mentioned several times, whereby it should always be possible to write code that compiles with the last three releases of GHC, without generating any -Wall warnings. The no warning requirement seems excessively harsh. Will early warnings of impending breakage really cause so much trouble that accepted proposals have to be dragged out over several years to avoid them? If so, would a flag to suppress the warnings suffice? I should note that GHC has traditionally had no qualms about introducing new warnings, on by default. -- View this message in context: Sent from the Haskell - Libraries mailing list archive at
Categories: Offsite Discussion

Default definition for fromRational

libraries list - Thu, 10/15/2015 - 11:51pm
A suitable default definition for fromRational could be the following: fromRational n = fromInteger (numerator n) / fromInteger (denominator n) Changing the MINIMUM pragma to just {-# MINIMAL recip | (/) #-} - Joe
Categories: Offsite Discussion

New gtk2hs 0.12.4 release

gtk2hs - Wed, 11/21/2012 - 12:56pm

Thanks to John Lato and Duncan Coutts for the latest bugfix release! The latest packages should be buildable on GHC 7.6, and the cairo package should behave a bit nicer in ghci on Windows. Thanks to all!


Categories: Incoming News