News aggregator

Eric Kidd: Unscientific column store benchmarking in Rust

Planet Haskell - Sun, 05/17/2015 - 2:03pm

I've been fooling around with some natural language data from OPUS, the “open parallel corpus.” This contains many gigabytes of movie subtitles, UN documents and other text, much of it tagged by part-of-speech and aligned across multiple languages. In total, there's over 50 GB of data, compressed.

“50 GB, compressed” is an awkward quantity of data:

Let's look at various ways to tackle this.

Read more…

Categories: Offsite Blogs

Announcement: Gipeda, the git performance dashboard

haskell-cafe - Sun, 05/17/2015 - 1:46pm
Dear Haskellers, a while ago, I set up a performance dashboard¹ for GHC, based on codespeed², but I was dissatisfied, so in the end, I wrote a new one, called Gipeda for “Git Performance Dashboard”. The git in the name as, in contrast to codespeed, I do not try to be VCS-agnostic but do want to use and expose the structure of your project’s git repository in the output. You can have a look at It should be relatively self-explanatory. Just note that by default it hides boring stuff (commits and results with no significant change), you can select what to show in the top-right corner. The idea behind gipeda is relatively simple. Starting with a directory with one file for each of your project’s benchmarked commit, gipeda digests this to produce a bunch of JSON files. It uses shake³ to avoid unnecessary recalculations. A static HTML file with lots o
Categories: Offsite Discussion

Escaping Cabal Hell with NixOS

Haskell on Reddit - Sun, 05/17/2015 - 1:24pm

I love writing Haskell, but until recently I was totally discouraged by Cabal hell. I've just lived through it too many times. I know about sandboxes, and I've used them with some success, but rebuilding all the dependencies everytime I need to create a new project was a total bummer.

So it was with some excitement that I read ocharles's post about using nix as a cabal cache. I'm happy to report that nix has liberated me from the dread that I felt everytime I wanted to start something new using Haskell. Its great, and after the first invocation of nix-shell, its super fast. I'm back to loving Haskell again!

The thing that was holding me back from trying it is that I was daunted by the nixos install process. I know you can use nix without nixos, but I wanted the full experience. I've lived through slackware, debian, ubuntu and probably a couple distros I don't even remember. But its been a long time since I got wireless drivers working from a cold install with no network connection. Its a pain every time. Using nothing but google and my wits, I concocted the following invocation which got my WIFI up and running:

nmcli dev wifi connect HOTSPOT password PASSWORD iface wlp3s0

and suddenly I had a working machine, and the fresh clean feeling of a brand new distribution, with package dependencies specified declaratively. It feels great.

If you also want to try doing webstuff with Haskell, Yesod and Nix, check out the nix-shell settings I'm using. (I stole most of it from somewhere I can't remember, but I'll update with attribution if I can recall)

submitted by ludflu
[link] [22 comments]
Categories: Incoming News

ARM64 Haskell via GHC 7.10.1 - How to build?

Haskell on Reddit - Sun, 05/17/2015 - 11:51am

(Cross-posted from the Haskell-iPhone mailing list, which I suspect might be dead)

I see from the discussion in GHC Trac #7942 that ARM64 support has been merged into GHC and should be available in 7.10.1. This is wonderful — and necessary for iOS development if one intends to pass through the Apple App Store, as since February new apps are rejected lest they support ARM64.

However, while scripts seem to be provided in ghc-ios-scripts for installing binaries of GHC 7.8.3 for the iOS Simulator (i386-apple-darwin11) and actual iOS devices (arm-apple-darwin10, 32-bit ARM), the scripts for aarch64-apple-darwin14 (ARM64 on iOS devices) aren’t used by the main wrapper scripts and the installation scripts don’t appear to mention anything about installing a GHC built for ARM64 cross-compiling — indeed, it’s only 32-bit ARM via GHC 7.8.3. I can’t find any binary GHCs on the 7.10.1 downloads either.

Following the guide for building a GHC cross-compiler for iOS targets, building GHC 7.10.1 for cross-compiling to ARM64 is currently failing for me (on a 2014 MacBook Air running Mac OS X Yosemite, 10.10.3) probably due to some trivial issue with my build environment. ./configure says:

checking version of gcc... configure: error: Need at least gcc version 3.0 (3.4+ recommended)

That’s configuring with

./configure --target=aarch64-apple-darwin14 --with-gcc=aarch64-apple-darwin14-clang


$ gcc -v Configured with: --prefix=/Applications/ --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn) Target: x86_64-apple-darwin14.3.0 Thread model: posix $ aarch64-apple-darwin14-clang aarch64-apple-darwin14-clang: line 7: /usr/local/opt/llvm/bin/clang: No such file or directory aarch64-apple-darwin14-clang: line 7: exec: /usr/local/opt/llvm/bin/clang: cannot execute: No such file or directory

Note the aarch64-apple-darwin14-clang command I’m running there is the script from ghc-ios-scripts, which seems overly simplistic compared to the same script for ARMv7 GHC-iOS.

I suppose the solution might even be as simple as installing an adequate version of LLVM+Clang over there at /usr/local/opt/llvm which the commands seem to be looking for — but which version might be appropriate? Moreover, is there some guide on how to install what needs to be installed? The ghc-ios scripts get 3.0, yet some Trac comments seem to suggest some very recent version of LLVM, possibly 3.6 or maybe just the latest development version.

Is this even something people have working?

Apologies if this isn’t the right forum for this — this is my first time on Reddit. Is there an iOS-specific subreddit? Or is this perhaps more appropriate for StackOverflow? I have no idea.

Edit: added link to GHC iOS cross compiling guide and details of build machine.

Update: I tried installing clang+llvm-3.6.0-x86_64-apple-darwin and pointing the arm-apple-darwin10-clang script at it. It then passes the configure command with this message buried somewhere in the middle of the log:

checking whether bootstrap compiler is affected by bug 9439... You are using a new version of LLVM that hasn't been tested yet! We will try though... opt: /var/folders/1w/gjgqw7hj6wlb4krcpxl0svhm0000gq/T/ghc489_0/ghc489_2.ll:7:6: error: unexpected type in metadata definition !0 = metadata !{metadata !"top", i8* null} ^ failed to compile

Running make thereafter:

[ 1 of 90] Compiling Distribution.Compat.CreatePipe ( libraries/Cabal/Cabal/Distribution/Compat/CreatePipe.hs, bootstrapping/Distribution/Compat/CreatePipe.o ) opt: /var/folders/1w/gjgqw7hj6wlb4krcpxl0svhm0000gq/T/ghc4275_0/ghc4275_40.ll:7:6: error: unexpected type in metadata definition !0 = metadata !{metadata !"top", i8* null} ^ make[1]: *** [utils/ghc-cabal/dist/build/tmp/ghc-cabal] Error 1 make: *** [all] Error 2

According to GHC bug comments, «GHC HEAD currently only supports LLVM version 3.6». I tried checking out the master branch to see if it’s something that had changed since the 7.10.1 release branch, but configuring and calling make after a checkout of master yields the same errors.

Update 2: Apparently the GHC I had installed won’t build with -fllvm if PATH picks LLVM 3.6. However, even after fixing PATH to get LLVM 3.5.2 and using GHC 7.10.1 to build, I get a new error:

/bin/sh: HaskellCPPCmd@: command not found make[1]: *** [compiler/stage1/build/primops.txt] Error 1

The file mk/ says somewhere in the middle:

HS_CPP = @HaskellCPPCmd@ @HaskellCPPArgs@

which looks like something that should get substituted, but it seems to be taking the second @ as part of the name to substitute. Is this some preprocessor malfunctioning?

submitted by mgomezch
[link] [5 comments]
Categories: Incoming News

new to haskell, newish to programming, how do I tell cabal where to find a dependency I compiled from source?

Haskell on Reddit - Sun, 05/17/2015 - 11:23am

Hello, I compiled SDL2-2.0.3 in $HOME/local and would like to tell cabal to find it there when I cabal install helm.

I'm looking over the cabal documentation but the options seem to all regard where to put the installed package. Thanks for any help

submitted by sleepystudy
[link] [16 comments]
Categories: Incoming News

Generalizing Kleisli-composition to arrows

Haskell on Reddit - Sun, 05/17/2015 - 9:55am

Is there a way to generalize the >=> operator from (a -> m b) -> (b -> m c) -> (a -> m c) to p a (m b) -> p b (m c) -> p a (m c) for some Category/Arrow-subclass p?

I managed to do this for ArrowChoice and Maybe using pattern matching:

infixr 9 .? (.?) :: ArrowChoice p => p b (Maybe c) -> p a (Maybe b) -> p a (Maybe c) p1 .? p2 = proc a -> do mb <- p2 -< a case mb of Just b -> p1 -< b Nothing -> returnA -< Nothing

But can this be done with >>= instead of pattern matching, in order to define this function for arbitrary monads?

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

no Web-Security component in Haskell?

haskell-cafe - Sun, 05/17/2015 - 7:11am
Hallo, I did not found anything comparable to Spring Security[1][2] (Java) or Symfony Security[3] (PHP) in Haskell. Both components are used in web applications to grant or deny access to resources based on roles, ACLs or custom voters. A naive strategy would be to port the concepts of both components, which are very similar, to Haskell. They represent a lot of accumulated knowledge from many experts about web security. Or are there better ways to do web security in a powerful language like Haskell? Regards, Thomas Koch [1] [2] [3]
Categories: Offsite Discussion

Looking for an equivalent to blockly for functional languages?

Haskell on Reddit - Sun, 05/17/2015 - 6:45am

Is there a blockly for functional languages? If there isn't, what would it look like?

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

help with hsqml-demo-samples

Haskell on Reddit - Sun, 05/17/2015 - 12:06am

I want to start developing with hsQML. I spent the whole afternoon installing QT5, cabal, hsqml and setting up the sandbox. My whole goal for today was to run the factorial sample.

I can't believe I'm asking this because I feel like it should be obvious, but how do I run this? A google search doesn't show more than a handful tutorials, in fact searching 'hsqml' in this subreddit will show them all in a very short list. I already built the sample in a sandbox. If I do something like:

ghc --make src/Factorial1.hs

I get this error:

Could not find module `Paths_hsqml_demo_samples'

Is the line import Paths_hsqml_demo_samples in Factorial1.hs some sort of placeholder?

submitted by OrangePhi
[link] [2 comments]
Categories: Incoming News

The Eventual Monad

Haskell on Reddit - Sat, 05/16/2015 - 4:35pm
Categories: Incoming News

Help me change my mind about learning Haskell

Haskell on Reddit - Sat, 05/16/2015 - 2:53pm

Hi there.

I come from an OOP background: it was php, perl, python, java, ruby, scala for me. Once I've stumbled upon scala I've quickly fallen in love with proper static typing that actually helps you and after that - functional programming. I got comfortable with scalaz and some of the category concepts.

When learning scalaz and FP I've always looked at Haskell as the source of all this. I've read LYAHFTGG, but never actually tried writing code with Haskell. And I've asked myself - why is that.

I guess my reasoning is this:

  • Everything that I can think of can be done with Scala. Is there anything that Haskell can do and Scala can't?
  • I already have 3+ years of Scala experience. I'd have to start over with Haskell.
  • Haskell isn't safe haven as well. There's exceptions and head [] can still blow your program off.
  • Haskell IDE situation worries me. Intellij IDEA does a pretty good job being a Scala IDE - you can refactor, autocomplete, inspect, etc. I've tried two haskell plugins on idea and they both weren't on par feature wise.

So I've been thinking - is there even a point for me to learn Haskell? Or should I just deepen my knowledge of FP using Scala as a tool?

submitted by arturaz
[link] [47 comments]
Categories: Incoming News

lens over tea #3: folds

Haskell on Reddit - Sat, 05/16/2015 - 12:08pm
Categories: Incoming News

Philip Wadler: Summer School on DSL Design and Implementation

Planet Haskell - Sat, 05/16/2015 - 10:22am
The Scala team at EPFL is running a Summer School on DSL Design and Implementation, 12-17 July in Lausanne, Switzerland. They have a great line-up, including Martin Odersky, Tiark Rompf, Kunle Olukotun, and Matthew Flatt. I'll be there, speaking on A practical theory of language-integrated query and Quoted Domain Specific Languages: Everything old is new again.
Categories: Offsite Blogs

Philip Wadler: Status Report 5

Planet Haskell - Sat, 05/16/2015 - 10:00am

I am recovered. My bone marrow biopsy and my scan at the National Amyloidosis Centre show no problems, and my urologist has discharged me. Photo above shows me and Bob Harper (otherwise known as TSOPLRWOKE, The Society of Programming Language Researchers With One Kidney Each) at Asilomar for Snapl.
My thanks again to staff of the NHS. Everyone was uniformly friendly and professional, and the standard of care has been excellent. My thanks also to everyone who wished me well, and especially to the SIGPLAN EC, who passed a get-well card around the world for signing, as shown below. I am touched to have received so many good wishes.
Related: Status Report, Status Report 2, A paean to the Western General, Status Report 3, Status Report 4.

Categories: Offsite Blogs

Philip Wadler: Status Report 4

Planet Haskell - Sat, 05/16/2015 - 8:35am

It seemed as if no time had passed: the anaesthetist injected my spine, and next thing I knew I was waking in recovery. Keyhole surgery to remove my left kidney was completed on Tuesday 17 March, and I expect to leave the Western General on Saturday 21 March. Meanwhile, progress on diagnosing the amyloid spotted in my liver: I had a bone marrow biopsy on Thursday 19 March, and two days of testing at the National Amyloidosis Centre in London are to be scheduled. NHS has provided excellent care all around.

My room was well placed for watching the partial eclipse this morning. A nurse with a syringe helped me jury rig a crude pinhole camera (below), but it was too crude. Fortunately, there was exactly the right amount of cloud cover through which to view the crescent sun. My fellow patients and our nurses all gathered together, and for five minutes it was party time on the ward.

Update: I left the hospital as planned on Saturday 21 March. Thanks to Guido, Sam, Shabana, Stephen, and Jonathan for visits; to Marjorie for soup; to Sukkat Shalom council for a card and to Gillian for hand delivery; and to Maurice for taking me in while my family was away.

Related: Status report, Status report 2, A paean to the Western General, Status report 3.

Categories: Offsite Blogs

Philip Wadler: Multiple inheritance, revisited

Planet Haskell - Sat, 05/16/2015 - 8:33am
Via @ReifyReflect (Sam Lindley) and @PedalKings. Previously: Multiple inheritance.
<script async="" charset="utf-8" src=""></script>
Categories: Offsite Blogs