News aggregator

GHC-7.8.3 is out!

Haskell on Reddit - Fri, 07/11/2014 - 6:18am
Categories: Incoming News

ANN: FFI bindings to cuBLAS and cuSPARSE

haskell-cafe - Fri, 07/11/2014 - 6:00am
I have written FFI bindings to the cuBLAS and cuSPARSE libraries, which are CUDA libraries for executing linear algebra computations on the GPU. It's a relatively straightforward translation of the C API. It's slightly novel in that I use language-c and Template Haskell to parse the C headers and create the FFI declarations, avoiding the boilerplate that may otherwise be necessary, even using a preprocessor such as c2hs. I've done a similar thing with a subset of the MAGMA GPU library. It's less polished, and the installation process is more unforgiving, so I haven't put it up on Hackage. Finally, I've written a library which abstracts the immutable API of hmatrix and provides a pure, hmatrix-like interface for cuBLAS/MAGMA, enabling simultaneous development of linear algebra programs using either hmatrix or the above GPU bindings as backends. Additionally, I have written "medium-level" mutable and immutable interfac
Categories: Offsite Discussion

Haskell beginner looking for direction

Haskell on Reddit - Fri, 07/11/2014 - 3:38am

Disclaimer: I think I've been doing functional programming for just over half a month.

I've been learning Haskell through "Learn You a Haskell" and messing around on some different webpages, getting a closer look at some packages (the numeric probability package from Hackage, for example) while reading about monads a bit. I want to continue my learning but in a more focused manner (and I'd like to take a break from LYAH; I feel that it has been better serving as a reference than something to "read" at this point).

I think one of the best ways to do this (and please tell me if you disagree) is to get a good outline of topics to learn and learn them in order. I have heard Real World Haskell is outdated in some ways but still a useful tool. Would you recommend this or any other tools? If I choose to read Real World Haskell, which sections should I skip and read somewhere else (or at least read with caution)?

Background: I am a mathematics undergrad student in my 4th year. My interests are in machine learning, statistics, and information theory. I have a background in basic measure theory (from a probabilistic perspective) but not category theory as well as mathematical statistics. I can program in Python and Java. Haskell interests me for a number of reasons, including the fact that it is so mathematically oriented, it seems to have great potential uses in data science/machine learning/AI (this is a big one, and if anyone has any links to things related to this, I'd love to see them), its use is becoming more widespread (and thus potentially viable in a number of new industry settings?), and honestly, it just feels nice to use.

submitted by Knux-
[link] [10 comments]
Categories: Incoming News

Any tips for newbies on designing ASTs for existing languages?

Haskell on Reddit - Fri, 07/11/2014 - 3:10am

I've heard that Haskell is very good at parsing and there are some good libraries for this (parsec, attoparsec, uu-parsinglib and so on).

Anyway, in the process "input -> Lexing -> Parsing" I haven't reached parsing stage. I'm stuck on designing the Token type and AST type. Any tips, rules of thumbs, mind patterns, little and concrete examples, tutorials for this type of intuition?

My goal is implement basic parsers and prettyprinters for ActionScript, C++ and Java, to be able to translate code between them. I cannot use existing parsing libraries, because they are just too broad. I need only subsets of these languages to be able to intertranslate. I assume that correcty designed AST is larger part of parsing problem, so I ask here.

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

What's the performance bottleneck in this prime sieve function?

Haskell on Reddit - Fri, 07/11/2014 - 2:01am

Learning haskell, I wrote this simple function that's supposed to return a list of prime numbers up to n. It works for low enough n, but above 5000 or so, it becomes noticeably slower to begin, which is far lower than a prime sieve has any right to slow down. What am I missing?

import Data.List sieve :: (Integral a) => a -> [a] sieve n | n < 2 = [] | n == 2 = [2] | otherwise = comb [2..n] where comb xxs@(x:xs) | x^2 > last xs = xxs | otherwise = x : comb (xs \\ [2*x, 3*x .. n]) comb [] = [] submitted by ZankerH
[link] [21 comments]
Categories: Incoming News

I just built my first app in haskell (a CHIP-8 cpu emulator). Code review and/or tips?

Haskell on Reddit - Fri, 07/11/2014 - 12:01am

Hey guys,

I started working on an emulator for the old CHIP-8 CPU as a project to learn haskell. Although it probably wasn't the best choice of project due to how basic it is, I've definitely gotten hooked on haskell.

I've done a few clojure projects in the past, so I'm familiar with the functional programming basics, but I haven't experimented much with haskell's abstractions (apart from basic monads).

If anyone can offer any improvements or tips, i'd be greatly appreciated. I'm planning on doing plenty more haskell projects, so I'd like to nip any bad practices in the bud.

You can find the project here:

Thanks in advance!

submitted by tominated
[link] [3 comments]
Categories: Incoming News

Tutorial for reader and write monad?

Haskell on Reddit - Thu, 07/10/2014 - 9:24pm

Hey everyone. I've just started out with Haskell, and I just can't seem to understand how the reader and writer monads work. Could someone point me to some place where they're explained well? Thanks!

submitted by Bollu
[link] [15 comments]
Categories: Incoming News

Meetup - Calling all haskellers from Croatia

haskell-cafe - Thu, 07/10/2014 - 8:07pm
We've opened a meetup group for all haskellers from Croatia and someone suggested we should post info about it here as it might reach more interested people that way. Here's the link to the meetup group (please join): Sorry for the spam if this doesn't apply to you. -Deni _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >
Categories: Offsite Discussion

[ANN](and feedback request) unagi-chan: Fast and scalable concurrent queues for x86, with a Chan-like API

haskell-cafe - Thu, 07/10/2014 - 7:39pm
I'm happy to finally release unagi-chan, an implementation of high-performance concurrent FIFO queues that have an API very similar to Control.Concurrent.Chan. You can see benchmarks and documentation here: If you have a moment (especially if you're on a non-x86 architecture) please take 10 minutes and run the tests with: $ cabal configure --enable-tests $ cabal build $ time ./dist/build/test/test Thanks to Ryan Newton for helping answer some low-level questions about his atomic-primops package which provides the CAS and fetch-and-add implementations that are the core of unagi-chan. REQUEST FOR FEEDBACK: would anyone be interested in any functionality like the following: - concurrent builder for Text, something like: new :: IO (InTextChan , Lazy.Text) write :: String -> InTextChan -> IO () - something similar for ByteString (is there a class for types convertable to ByteString?) - concurrent Text and/or ByteSt
Categories: Offsite Discussion

ATX Haskell meetup/study groups happening this month!

Haskell on Reddit - Thu, 07/10/2014 - 4:46pm

Here in sunny Austin Texas we've spun up a Haskell meetup group, and if you're in the area, you should join! Specifically, we've set up a small meetup tomorrow as a training class to help people solidify and expand their Haskell knowledge.

We currently are having monthly meetups here with classical talks, and we're also planning of setting up monthly or biweekly study groups like the one tomorrow for people to talk and learn in a different setting. So the one tomorrow will hopefully be the first of many more to come.

Tomorrow the study group will be downtown at MakerSquare - and if you're in the area, you should come by! Brand new to Functional Programming? Don't have GHC installed? Don't even know what Haskell is? No matter - things will happen, people will learn things, and you should come by and learn how awesome it is and how awesome all of us are, and we'll help you as much as we can.

Next week we'll be having a meeting at Rackspace in North Austin, where we'll be talking about error handling in Haskell, and I'll probably talk about something and I have no idea what that will be yet (it'll be a secret).

We normally have a turnout of about 20 people for the meetings. But that's just because you haven't come and hung out yet. The meetings are typically open forum and rather lax. So you're encouraged to raise your hand or just speak up.

We also tend to go drink beers and talk into the night afterwords - with many riveting conversations, including subjects like (roughly in order of priority):

  • Tacos. Beer. Serious business.
  • Why is software so terrible?
  • How to achieve world domination in a purely-functional way?
  • Education and how to do that properly.
  • War stories (tears of joy/pain are encouraged)
  • Cloud computing (the half-dozen Rackspace employees love this one!)
  • Ask Austin (me, not the town) how some random GHC thing works.
  • Non-taco-related foods.

Also, a bajillion points go to Rackspace for giving us a great working space for our meetups so far and providing us with great pizza for the past several meetings.

submitted by aseipp
[link] [comment]
Categories: Incoming News

PEPM 2015: Call for papers

General haskell list - Thu, 07/10/2014 - 6:43am
PEPM 2015 Paper Submission Deadline: September 12 (FIRM) Note: deadline is significantly earlier than previous years. Hope to see you in Mumbai, India! ----------------------------- C A L L F O R P A P E R S ----------------------------- ======= PEPM 2015 =========== ACM SIGPLAN 2015 WORKSHOP ON PARTIAL EVALUATION AND PROGRAM MANIPULATION Tue-Wed, January 13-14, 2015, Mumbai, India, co-located with POPL'15 Sponsored by ACM SIGPLAN SCOPE The PEPM Symposium/Workshop series aims at bringing together researchers and practitioners working in the areas of program manipulation, partial evaluation, and program generation. PEPM focuses on techniques, theory, tools, and applications of analysis and manipulation of programs. The 2015 PEPM workshop will be based on a broad interpretation of semantics-based program manipulation and continue last years' successful effort to expand t
Categories: Incoming News

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