News aggregator

GHC 7.4.2 on Ubuntu Trusty

glasgow-user - 0 sec ago
In order support some older software that we released, we need to get a working GHC 7.4.2 on Ubuntu Trusty. We currently have GHC 7.8.3. The binary tarball for GHC 7.4.2 does not install on Trusty due to multiple incompatibilities. For example, GHC requires GMP 3, but Trusty only provides GMP >= 4. Etc. I tried building GHC 7.4.2. from source on Trusty. But the process won't boot from our currently installed GHC 7.8.3. The oldest GHC binary I can get is GHC 7.6.3, which happens to be still available from the Ubuntu distribution itself (neither the binary tarball nor compiling from source work for GHC 7.6.3 on Trusty either). But booting from GHC 7.6.3 won't work either. How do I get a working GHC 7.4.2 on Trusty? Thanks, Yitz
Categories: Offsite Discussion

Timing execution of individual functions in ghci?

haskell-cafe - 0 sec ago
When playing around with various implementations of a single function it would be nice to time the execution. Is there some way to do that easily from within GHCi? Or am I forced to look to criterion for that? /M
Categories: Offsite Discussion

Seemingly impossible programs

Lambda the Ultimate - 3 hours 51 min ago

In case this one went under the radar, at POPL'12, Martín Escardó gave a tutorial on seemingly impossible functional programs:

Programming language semantics is typically applied to
prove compiler correctness and allow (manual or automatic) program
verification. Certain kinds of semantics can also be applied to
discover programs that one wouldn't have otherwise thought of. This is
the case, in particular, for semantics that incorporate topological
ingredients (limits, continuity, openness, compactness). For example,
it turns out that some function types (X -> Y) with X infinite (but
compact) do have decidable equality, contradicting perhaps popular
belief, but certainly not (higher-type) computability theory. More
generally, one can often check infinitely many cases in finite time.

I will show you such programs, run them fast in surprising instances,
and introduce the theory behind their derivation and working. In
particular, I will study a single (very high type) program that (i)
optimally plays sequential games of unbounded length, (ii) implements
the Tychonoff Theorem from topology (and builds finite-time search
functions for infinite sets), (iii) realizes the double-negation shift
from proof theory (and allows us to extract programs from classical
proofs that use the axiom of countable choice). There will be several
examples in the languages Haskell and Agda.

A shorter version (coded in Haskell) appears in Andrej Bauer's blog.

Categories: Offsite Discussion

ghci balkiness on OS X?

glasgow-user - 6 hours 46 min ago
On my OS X, if I load a couple hundred modules into ghci as bytecode, text entry gets balky and laggy. So e.g. if I hold down a key, the letters will stream in but have frequent hiccups. This seems to adversely affect haskeline as well, such that, using vi mode, sometimes ^[ to move to command mode will be lost, or it will spontaneously go to insert mode, or ^[ followed by 'h' will be just beep and remain in insert mode. If I load most of the modules compiled, this doesn't happen, or at least is not nearly so bad. It doesn't seem to be due to background work by ghci or anything, because it doesn't matter how long I wait after loading the modules. My previous random guess was that increased memory use made the GC work more, and my pauses were due to major collections. But when I try on linux, ghci remains responsive no matter how many modules I load, so maybe it's an OS X only problem. Do any other OS X users see this effect?
Categories: Offsite Discussion

GADTs and defining Functor?

Haskell on Reddit - Tue, 10/21/2014 - 9:39pm

So I am trying to mimmic an example to use a Free monad and one problem I have hit is when I start using typeclasses in the GADT constructors.

Here is a reduced example that gets the error output of Could not deduce (a1 ~ a) that happens when implementing the functor.

{-# LANGUAGE GADTs #-} module Test where data Something blah where ResultA :: Int -> (Int -> blah) -> Something blah ResultB :: (Num a) => (a -> blah) -> Something blah ResultC :: (Num a) => Int -> a -> Something blah -- ResultD :: (Show s) => Int -> s -> Something blah instance Functor Something where fmap f (ResultA i g) = ResultA i (f . g) fmap f (ResultB g) = ResultB (f . g) fmap f (ResultC i d) = ResultC i (f d) -- fmap f (ResultD i d) = ResultD i (f d)

Secondly, when I throw in a second kind of typeclass (ResultD), it also tries to equate those.

I have tried FlexibleContexts and FlexibleInstances, but that hasn't gotten me anywhere.

As a moderate beginner, I had a hunch that maybe I was missing the extra kind on Something. But Functor corrects my attempt on that.

The first argument of ‘Functor’ should have kind ‘* -> * ’, but ‘Something blah’ has kind ‘ * ’

Am I allowed to use typeclasses on GADTs? What am I fundamentally missing?

Note, the real context is cereal's Serialize typeclass, not Num--but this example should be prelude-only friendly.

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

A taste of Haskell (tutorial)

del.icio.us/haskell - Tue, 10/21/2014 - 7:51pm
Categories: Offsite Blogs

Student looking for internship.

Haskell on Reddit - Tue, 10/21/2014 - 1:55pm

Hi everyone, i'm a french CS student in my 4th year, and i'd like to apply for an internship this summer (or a summer job but i guess it might be that much harder to find).

I would really love to find an internship where i could use functionnal programming, and why not Haskell!

In France, it would be mostly Ocaml and that would be fine, but do you have any idea where i could find an internship where i would use Haskell?(i'm not limiting myself with the location, could be EU, NA, or anything really :) )

Every suggestions are welcome, thanks all.

(Also if my english is bad, you may correct me, i'll improve faster)

edit: /u/gallais pointed out in MP that i should says clearly if i prefer internship in a lab or in an enterprise, i already tried out both, and i like both so no clear priority here. Next year i'll mostly follow courses on data mining and algorithms so that may be a preference.

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

a textured quad/triangle

haskell-cafe - Tue, 10/21/2014 - 11:24am
Hello, I am looking for a working example of texture binding, using VBOs and OpenGL4+ standard. A textured quad/triangle would be great. Does anybody have one? Regards, Vlad _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Categories: Offsite Discussion

Postdoc Position in Functional and Constraint Programmingat KU Leuven

General haskell list - Tue, 10/21/2014 - 9:14am
Postdoctoral position in Functional and Constraint Programming at KU Leuven The Declarative Languages and Artificial Intelligence (DTAI) group of KU Leuven (Belgium) invites applicants for a postdoctoral position in the area of functional and constraint programming. The position revolves around domain-specific languages (DSLs) embedded in Haskell for constraint programming. It is part of the EU project GRACeFUL whose overarching theme is tools for collective decision making. The KU Leuven part of the project is under the direction of prof. Tom Schrijvers. To apply you must hold a recent PhD (or be about to graduate) related to either functional or constraint programming. Experience in both areas is an advantage. You will work closely with prof. Schrijvers and his PhD students at KU Leuven, as well as with the GRACeFUL project partners across Europe. The position is for 3 years. The salary is competitive and the starting date negotiable (but no later than February 1). Moreover, KU Leuven's policy of equal
Categories: Incoming News

criterion

del.icio.us/haskell - Tue, 10/21/2014 - 5:34am
Categories: Offsite Blogs