News aggregator

Gauge my competency as a programmer.

Haskell on Reddit - Sun, 09/28/2014 - 5:27pm

Gauge it on my understanding of this article. My personal assessment is that I understand it well enough to explain to a non programmer exactly as it works.

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

[ANN] lxc-0.2 and bindings-0.2 – Haskell LXC API bindings

haskell-cafe - Sun, 09/28/2014 - 9:00am
Greetings, I am pleased to announce the Haskell LXC API bindings. Bindings are represented by 2 cabal packages: lxc and bindings-lxc. LXC is a userspace interface for the Linux kernel containment features. For more information see High level Haskell bindings to LXC (Linux containers). Git repository: Direct Haskell bindings to LXC (Linux containers) C API. Git repository: === Before installation make sure you have LXC installed on your system with header files and static library. Packages have been tested with Ubuntu 12.04 and 14.04. On Ubuntu 14.04 LTS (Trusty Tahr): $ sudo apt-get install lxc-dev On previous Ubuntu versions (including 12.04 LTS Precise Pangolin) standard repositories do not contain liblxc1 package. You might want to use ppa:ubuntu-lxc/stable repository instead: $ sudo apt-get install software-pr
Categories: Offsite Discussion

Arrow key functionality for REPL written in Haskell

haskell-cafe - Sun, 09/28/2014 - 8:42am
Hi, I'm trying to implement the arrow key functionality for a systemf REPL to recall previously entered lines. I think I should save the previous lines in a list and then traverse through the list when an arrow key is pressed, but I'm no sure how to detect an arrow key and implement this functionality. Can anyone give a brief description about the implementation or point me to some other resources? Thanks! Emma _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >
Categories: Offsite Discussion

Lambda Twit (@LambdaTwit) - Haskell evaluating twitter bot

Haskell on Reddit - Sun, 09/28/2014 - 1:46am

Hi All,

@fsibot inspired me to make a haskell version.

I used mueval (from lambdabot in the irc channel), twitter-conduit and acid-state to keep track of which tweets it has replied to.

The code is on github:

Give it a try, tweet something like: "@LambdaTwit map (* 2) [1..10]"

There's an issue currently where unicode strings seems to crash the bot, I haven't worked out what is causing this yet. Lambdabot in the irc channel can handle unicode fine so I must have messed something up with how I'm calling mueval.

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

Debugging with ghci

haskell-cafe - Sun, 09/28/2014 - 1:42am
For a long time I've worked under the assumption that a breakpoint can only be used once in a ghci session, because if you run the function (main say) again, it runs to completion, ignoring the breakpoint. Restarting ghci and resetting the break point resolves the problem, but does not explain why a breakpoint cannot be used more than once. How can this behavior be explained? Also, when I stop at a breakpoint :step works as expected, but :trace does not? It simply runs the rest of the function, and using :back subsequently results in the message "not stopped at a breakpoint." Any comments on this behavior? Thanks, Dominick
Categories: Offsite Discussion

Deploying bash completion with cabal?

haskell-cafe - Sun, 09/28/2014 - 12:49am
Hi All I'm looking for a good way to deploy a bash completion script somewhere appropriate for the given operating system. Has anyone tackled this before? I was considering packaging the script in to the install using cabal data files, then having an 'install--bash-completion' option that tries to detect the right place to install it depending on the OS. Cheers Jacob _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >
Categories: Offsite Discussion

Cabal Testing Pain

haskell-cafe - Sat, 09/27/2014 - 10:54pm
Hey all, I'm trying to setup an executable cabal project, the options for cabal-based testing seem poor. I poked around for discussions of this but didn't find much. My apologies if I'm beating a dead horse. The current options, as I understand them, are 1. Split code into library, executable, and test-suite. This gets you single compilation but you have to list every source file in the library's exposed/other-modules sections. 2. Split code into executable and test-suite. You don't have to list the source files, but you get double compilation and you have to declare every dependency (and version!) twice. Am I missing a third (better) option, or is this the state of things? -- Mike Craig _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >
Categories: Offsite Discussion

List of core libraries

libraries list - Sat, 09/27/2014 - 6:13pm
Hello core libraries committee, on the library submissions page on the Haskell wiki it says: "The core libraries ... define basic APIs that are expected to be available in any Haskell implementation." Is this list of those core libraries and their maintainers up-to-date: I am asking, since GHC 7.8.3 also includes: * binary * bytestring * filepath * haskeline * hoopl * integer-gmp * terminfo * transformers But they are not core libraries. Is that correct? And GHC 7.8.3 doesn't include: * mtl * parallel * primitive * random * vector But they are core libraries. Is that correct? Cheers, Thomas _______________________________________________ Libraries mailing list Libraries< at >
Categories: Offsite Discussion

Are there any good resources for learning desugared Haskell?

Haskell on Reddit - Sat, 09/27/2014 - 5:38pm

My previous exposure to functional languages is with Scheme, wherein it is quite common to introduce sugar by showing how to write it yourself. I find this useful, because it teaches you what are the really fundamental syntactical aspects of the language, and which parts are flexible, or just a kind of short hand. (E.g., in Scheme it is not uncommon to find instructions relatively early on about how one writes a macro to define if using cond). In Haskell, syntactic forms like multiple function clauses, guards, case expressions, and conditions all of some overlapping aspects, but they also all seem function a little bit different and call for their own syntactic rules. I'd love to find a resources that will tell me what the basic idiom at work is, and maybe show me how you can reconstruct, or mimic the various derivations using that foundation. (Of course, I'm not expecting an equivalent of macros, just some insight into the desugared logic).

Thanks in advance for any pointers!

submitted by abathologist
[link] [9 comments]
Categories: Incoming News

Inferring algebraic effects

Lambda the Ultimate - Sat, 09/27/2014 - 5:16pm

Logical methods in computer science just published Matija Pretnar's latest take on algebraic effects and handlers:

We present a complete polymorphic effect inference algorithm for an ML-style language with handlers of not only exceptions, but of any other algebraic effect such as input & output, mutable references and many others. Our main aim is to offer the programmer a useful insight into the effectful behaviour of programs. Handlers help here by cutting down possible effects and the resulting lengthy output that often plagues precise effect systems. Additionally, we present a set of methods that further simplify the displayed types, some even by deliberately hiding inferred information from the programmer.

Pretnar and Bauer's Eff has made previous appearances here on LtU. Apart from the new fangled polymorphic effect system, this paper also contains an Eff tutorial.

Categories: Offsite Discussion

Robert Harper: up and running!

Planet Haskell - Sat, 09/27/2014 - 4:04pm

After far too long, and far too many obstacles to be overcome, Dave MacQueen, Lars Bergstrom, and I have finally prepared an open-source site for the entire family of languages derived from Standard ML.  The defining characteristic of Standard ML has always been that it has a mathematically precise definition, so that it is always clear what is a valid program and how it should behave.  And indeed we have seven different working compilers, all of which are compatible with each other, with the exception of some corner cases arising from known mistakes in the definition.  Moreover, there are several active projects developing new variations on the language, and it would be good to maintain the principle that such extensions be precisely defined.

To this end the sources of the 1990 and 1997 versions of the definition are on the web site, with the permission of MIT Press, as is the type-theoretic definition formulated by Chris Stone and me, which was subsequently used as the basis for a complete machine-checked proof of type safety for the entire language done by Karl Crary, Daniel K. Lee.  It is be hoped that the errors in the definition (many are known, we provide links to the extensive lists provided by Kahrs and Rossberg in separate investigations) may now be corrected by a community process.  Anyone is free to propose an alteration to be merged into the main branch, which is called “SML, The Living Language” and also known as “Successor ML”.  One may think of this as the third edition of the definition, but one that is in continual revision by the community.  Computer languages, like natural languages and like mathematics, belong to us all collectively, and we all contribute to their evolution.

Everyone is encouraged to create forks for experimental designs or new languages that enrich, extend, or significantly alter the semantics of the language.  The main branch will be for generally accepted corrections, modifications, and extensions, but it is to be expected that completely separate lines of development will also emerge.

The web site, is up and running, and will be announced in various likely places very soon.

Update: We have heard that some people get a “parked page” error from GoDaddy when accessing  It appears to be a DNS propagation problem.

Update: The DNS problems have been resolved, and I believe that the web site is stably available now as linked above.

Filed under: Research Tagged: functional programming, sml
Categories: Offsite Blogs

Snake in haskell < 170 lines [My first haskell app]

Haskell on Reddit - Sat, 09/27/2014 - 3:25pm

hi i made haskell in snake! i mean...

at the moment its like 170 lines and i'd love to see if anyone can make it shorter, more mathematically sound and or prettier. maybe i need a cabal file? i honestly don't know what i'm doing. someone on #haskell said something about golf.

anyway, this is the first thing i've written in haskell so there is likely lots to fix so here is the repo : )

submitted by becky-conning
[link] [42 comments]
Categories: Incoming News

Neil Mitchell: GHCID - a new GHCi based IDE (ish)

Planet Haskell - Sat, 09/27/2014 - 2:46pm

Summary: I've just released ghcid, which interactively shows the errors in your project on each save.

I'm please to announce ghcid, which is either "GHCi as a daemon" or "GHC + a bit of an IDE". I've been using it for my development for the last few days, and already find it quite valuable. Unlike other Haskell development tools, ghcid is intended to be incredibly simple. In particular, it doesn't integrate with any editors, doesn't depend on GHC the library and doesn't start web servers. It's under 200 lines of fairly dull Haskell, which talks over pipes to your existing ghci.

Using it

Run cabal update && cabal install ghcid to install it as normal. Then run ghcid --height=10 "--command=ghci Main.hs". The height is the number of lines you are going to resize your console window to (defaults to 8), and the command is how you start this project in ghci. Personally, I always create a .ghci file at the root of all my projects, which usually reads something like:

:set -fwarn-unused-binds -fwarn-unused-imports
:set -isrc
:load Main

With that you can pass --command=ghci (or nothing, since that is the default).

After that, resize your console and make it so you can see it while working in your editor. On Windows the ghcid console will automatically sit on top of all other windows. On Linux, you probably want to use your window manager to make it topmost or use a tiling window manager.

What you get

On every save you'll see a list of the errors and warnings in your project. It uses a single ghci under the hood, so even relatively large projects should update their status pretty quickly. As an example:

Not in scope: `verbosit'
Perhaps you meant `verbosity' (imported from System.Console.CmdArgs)
Util.hs:18:1: Warning: Defined but not used: `foo'

Or, if everything is good, you see:

All good

This project is only a few days old, so please report any bugs you find.

What you want

I regularly use an IDE to develop in a Haskell-like language. I find that with the IDE I'm about 25% more productive than without it. While an IDE can provide lots of neat features (go to definition, search, type tooltips) I think most of the productivity gains come from:

  1. Syntax coloring.
  2. A list of errors and warnings...
  3. ...which is updated as you type...
  4. ...and are highlighted in the text (red squiggles).

Every text editor already provides syntax coloring. With ghcid you get the list of errors and warnings. To get the final two features you need to integrate with an editor. I'm hoping that ghcid can do some of the heavy lifting by taking a directory of files to treat as overrides, and producing a list of warnings/errors to a file. The rest is editor specific, and I hope to attempt integration with Sublime Text at some point (although would love some help).

Categories: Offsite Blogs

Munich Haskell Meeting

haskell-cafe - Sat, 09/27/2014 - 1:46pm
Dear all, our next Haskell meeting in Munich takes place at Cafe Puck at 19h30 on Mon, 29th of September. Please go to and click the button if you plan to join. Everyone is welcome! Heinrich
Categories: Offsite Discussion

Matthew Sackman: Reading highlights this week

Planet Haskell - Sat, 09/27/2014 - 8:08am

I remember when I first went to University, coming across people who were both clearly extremely expert in their fields, from whom I wanted to learn, but were also religious, and how this utterly baffled me. At that point I would cheerfully describe myself as an avid atheist. My ignorance and naivety was somewhat extensive.

Over a decade later I like to think I have a more nuanced view. The most recent war in Gaza led, obviously, to vast amounts of suffering but some excellent articles on the subject (this one by Hadley Freeman in particular) helped me see perspectives more clearly and articulated how crucial it is to be precise with criticism: are you criticising a religion, a people, a government, a policy or something else? Nothing is ever black-and-white and it seems increasingly important to anticipate the consequences of an ill-thought-through comment or reaction. A good example of that is George Galloway's comments this week in the debate about this country once again getting involved in Iraq. On the face of it, and certainly without being remotely well-enough informed to evaluate the accuracy of his claims, if his claims on the size and makeup of ISIS/ISIL are true then there seems little likelihood that the bombing campaigns being discussed will be effective, and quite likely counter-productive. But all of that got lost due his description of Iraqis as quiescent. The way in which that description was seized upon by other MPs and the resultant media storm resulted in the over-shadowing not just of the rest of his contribution to the debate, but also of other important aspects of the debate, such as the resignation of Rushanara Ali (Labour's Shadow Minister for Education), citing once again the lack of a credible long-term plan for the region and our involvement.

Addressing the broader and somewhat more abstract issue is this enlightening article by Karen Armstrong. Again, I'm not claiming to be expert in the area, merely I found the article very educative. It had barely occurred to me that the western world's separation of the secular from the sacred was firstly such a recent occurrence, and secondly that it arose from a specific set of circumstances. There is no implicit reason why separation of state from church is an inevitable or even likely happenstance (to me, this reminds me of the question "if humans evolved from monkeys, then why can't we find monkeys still evolving into humans today?", to which the answer is "the circumstances are not right for that to occur"). The fact that the English word "religion" can't really be translated accurately into other languages (especially not languages that predate English such as Greek or Latin; as historically faith is all encompassing of life, not merely a private affair as we treat it today in the west) starts to show quite how odd the separation of secular from sacred in the modern west really is.

More interesting still is the observation that in the west, belonging to a Nation has in some ways subsumed the role of belonging to a Religion, only apparently with more positive overtones: we consider it almost reprehensible to die for your religion, but honourable to die for your nation. It would seem the concept of even belonging to a nation and having any sense of greater community outside your immediate surroundings only came about with the increased ability of governments to engage with (or intrude upon) their citizens. Before that point, presumably with church attendance widespread and frequent, one's interaction with "the wider world" was through the representative of the church. This would seem to explain a lot about why governments of the past sought the blessing of their nation's church for particular courses of action: maybe the church was seen as the bridge between the government (or monarchy) and the people. The whole article is worth a read.

Categories: Offsite Blogs

λ Bubble Pop! - Fri, 09/26/2014 - 11:53pm
Categories: Offsite Blogs

How do I enable GHCi on Emacs?

Haskell on Reddit - Fri, 09/26/2014 - 6:28pm

Just installed the Haskell, Emacs and Haskell-mode. And I tried using C-c C-l to load my .hs file into GHCi but when I do I get this message:

"haskell-mode-enable-process-minor-mode: You tried to do an interaction command, but an interaction mode has not been enabled yet."

Any help??

submitted by willrobertshaw
[link] [11 comments]
Categories: Incoming News