News aggregator

US Haskell Developer Position

haskell-cafe - Thu, 06/11/2015 - 4:26pm
Karamaan Group, a principal investment firm based in Manhattan, is looking for an outstanding software developer to develop tools for financial analysis and knowledge management. We are a growth oriented firm that values people who take a craftsman's pride in their work. Our ideal candidate is an experienced software developer with strong analytical, organizational, and communication skills. A candidate who demonstrates an intense focus on quality, but has the ability to recognize and make the tradeoffs that are a necessary part of day-to-day software development. Candidates should have at least a degree in a quantitative field and a keen interest in building robust and elegant computer programs. This is a high-impact, high-visibility position where successful candidates will be entrusted with a lot of responsibility for products that have a direct effect on the P&L of the firm and influences our workflow. The ideal candidate will have experience with Haskell, relational database technologies, and Java. Al
Categories: Offsite Discussion

Please help. Unable to cabal install simple libraries, like vector, boxes on OS X.

Haskell on Reddit - Thu, 06/11/2015 - 1:54pm

Has anyone else faced this?

OS X Mavericks 10.9.5

ghci version -- 7.10.1

cabal -- 1.22.4.0

bash-3.2$ cabal install vector

Resolving dependencies...

Configuring vector-0.10.12.3...

Building vector-0.10.12.3...

Preprocessing library vector-0.10.12.3...

Data/Vector/Generic.hs:61:3: parse error on input ‘unsafeUpd’ Failed to install vector-0.10.12.3

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

Syntax readability survey

Haskell on Reddit - Thu, 06/11/2015 - 1:10pm

I've been wondering what makes code syntax in one programming language more readable / fun to write than others.

I wrote two ToDo apps in pseudo-code here: https://gist.github.com/everdev/275c8562e356b7f30c52

Would love your thoughts on which one feels more readable and would be more enjoyable to read/write and why. Thanks!

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

Self-Representation in Girard’s System U

Lambda the Ultimate - Thu, 06/11/2015 - 12:45pm

Self-Representation in Girard’s System U, by Matt Brown and Jens Palsberg:

In 1991, Pfenning and Lee studied whether System F could support a typed self-interpreter. They concluded that typed self-representation for System F “seems to be impossible”, but were able to represent System F in Fω. Further, they found that the representation of Fω requires kind polymorphism, which is outside Fω. In 2009, Rendel, Ostermann and Hofer conjectured that the representation of kind-polymorphic terms would require another, higher form of polymorphism. Is this a case of infinite regress?

We show that it is not and present a typed self-representation for Girard’s System U, the first for a λ-calculus with decidable type checking. System U extends System Fω with kind polymorphic terms and types. We show that kind polymorphic types (i.e. types that depend on kinds) are sufficient to “tie the knot” – they enable representations of kind polymorphic terms without introducing another form of polymorphism. Our self-representation supports operations that iterate over a term, each of which can be applied to a representation of itself. We present three typed self-applicable operations: a self-interpreter that recovers a term from its representation, a predicate that tests the intensional structure of a term, and a typed continuation-passing-style (CPS) transformation – the first typed self-applicable CPS transformation. Our techniques could have applications from verifiably type-preserving metaprograms, to growable typed languages, to more efficient self-interpreters.

Typed self-representation has come up here on LtU in the past. I believe the best self-interpreter available prior to this work was a variant of Barry Jay's SF-calculus, covered in the paper Typed Self-Interpretation by Pattern Matching (and more fully developed in Structural Types for the Factorisation Calculus). These covered statically typed self-interpreters without resorting to undecidable type:type rules.

However, being combinator calculi, they're not very similar to most of our programming languages, and so self-interpretation was still an active problem. Enter Girard's System U, which features a more familiar type system with only kind * and kind-polymorphic types. However, System U is not strongly normalizing and is inconsistent as a logic. Whether self-interpretation can be achieved in a strongly normalizing language with decidable type checking is still an open problem.

Categories: Offsite Discussion

Benchmarking two versions of the same package?

haskell-cafe - Thu, 06/11/2015 - 12:41pm
Hi -cafe, While we can easily benchmark different functions or libraries easily with criterion, I can't think of a reasonably easy (and accurate!) way of benchmarking two versions of the same package. And not necessarily version as in cabal version -- one of the use cases I have in mind would be running a benchmark suite whenever a PR gets merged to the main branch of a library, so the benchmark would need to compare the performance of the library's-code-before-merging and after. This definitely can't be accomplished with something like criterion because we can't have two different instances of a package in scope for a module, even with -XPackageImports. If we separately build the same program against two instances of the same library and run the benchmarks separately, this might happen far apart enough that the machine running this might be under a different load. This does however seem to be the only actual solution? Run separately at two different commits, diff the numbers, report. I have felt the nee
Categories: Offsite Discussion

Questions about concurrency and laziness

haskell-cafe - Thu, 06/11/2015 - 12:35pm
Hi, First of all, apologies if this is not the right place to ask this question. I'm reading the book "Parallel and concurrent programming in Haskell" and I'm having some issues reasoning about the impact of laziness. Looking at the first example in chapter 8 [1] main = do m1 <- newEmptyMVar m2 <- newEmptyMVar forkIO $ do r <- getURL "http://www.wikipedia.org/wiki/Shovel" putMVar m1 r forkIO $ do r <- getURL "http://www.wikipedia.org/wiki/Spade" putMVar m2 r r1 <- takeMVar m1 r2 <- takeMVar m2 print (B.length r1, B.length r2) I don't understand why this function is not just putting an unevaluated thunk in the MVar. Well, I assume that getURL is an eager function, but looking at its code [2] or at the documentation of Network.Browser [3] I don't see why... Am I looking at this wrong? Is there any rule of thumb to be used in these cases? I have the impression that it's really easy to end up creating thunks in parallel threads and evaluating them in the main one... Thanks
Categories: Offsite Discussion

Is there a way to ensure I can't call a function with arguments in the wrong order?

Haskell on Reddit - Thu, 06/11/2015 - 10:44am

I mean when all its parameters are the same type.

So if you have this:

createUser :: String -> String -> String -> User createUser firstName lastName aboutMe = fail

What are the best modern techniques for ensuring I don't pass the arguments in the wrong order?

P.S. I'm aware that functions technically only have one argument, but I hope you know what I mean.

submitted by [deleted]
[link] [25 comments]
Categories: Incoming News

TH to generate imports?

haskell-cafe - Thu, 06/11/2015 - 10:12am
Hi guys, I wanted to know if it's possible to use TH on an "import" statement. What I want to do is to generate the names of the packages I need to import. For example: import $(genImport "MyPackage") genImport :: String -> Q TH.Exp genImport s = ... Is that possible? Thanks! Corentin _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Categories: Offsite Discussion

What are the best modern options for writing a Haskell web app?

Haskell on Reddit - Thu, 06/11/2015 - 10:08am

I guess I mean both a build tool and a framework. Something that be be bootstrapped pretty quickly.

Ideally all configuration would have sane, modern defaults, and I wouldn't touch any configuration files until I absolutely need to override something. Probably the only thing I'll ever configure is my database.

I'm a fan of rapid development, TDD, and BDD. I only want to worry about the business logic of my app, how I structure my model, and how I render things to the browser (oh, I guess that's MVC, isn't it?).

Everything else should be automatic and something I don't have to think about. I'm okay with "opinionated" tools if they allow for rapid development.

Are there any modern Haskell frameworks and build tools to let me do this?

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

haskell team at megacorp is hiring!

haskell-cafe - Thu, 06/11/2015 - 3:49am
Dear Haskell Colleagues, my team at megacorp, one of the largest for profit organizations on the planet, is looking to grow! about the haskell team: currently 3 engineers, though a 4th on the way already, in the past 6 months alone we've deployed customer facing APIs into production (no small feat in megacorp), built self serve generative sampling based data anonymization tools that promise to transform how megacorp customer data gets shared within and without. And thats just to start! We've repeatedly demonstrated that our use of haskell helps us develop and evolve great software for the business. the haskell team is part of a larger "new product / R&D" group whose mission is to build new tools, products and services to help pull megacorp kicking and screaming into the 2010's in terms of technology and services. The new product group is broadly seeking competent thoughtful technologists across a range of skill sets -- frontend, python, java, and haskell -- to join the engineering team. (so even if you're
Categories: Offsite Discussion

Proposal: Add IsList instance for ZipList

libraries list - Thu, 06/11/2015 - 3:02am
foo = getZipList $ [f,g,h] <$> [a,b,c] <*> [d,e,i] looks a lot better than bar = getZipList $ ZipList [f,g,h] <$> ZipList [a,b,c] <*> ZipList [d,e,i]
Categories: Offsite Discussion

IORef vs MVar vs TVar vs TMVar

Haskell on Reddit - Wed, 06/10/2015 - 10:36pm

When dealing with Haskell, you often hear that using TVar over IORef, you will suffer a performance overhead. I put together a small benchmark comparing the 2, and also looking at MVar and TMVar.

results: https://tvh.github.io/refs-bench.html

code: https://gist.github.com/tvh/62d025441419278b55ac

Modifying an IORef is indeed faster, but only if you accept potential lost writes. atomicModifyIORef is almost an order of magnitude slower than modifyTVar.

Another thig I noticed is that MVar is also slower than TMVar. This benchmark only shows performance when the MVar is filled though.

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

Thank you to new maintainers

haskell-cafe - Wed, 06/10/2015 - 10:24pm
The libraries I used maintain have all be handed off. Thank you to: Adam Bergmark for taking over hscamwire. Lana Black for taking over hdaemonize. Jose Calderon for taking over serial. And goodbye for now to this wonderful community. Maybe I'll be back in a few years. Unless I become a field ecologist or a florist or something. Fred Ross http://madhadron.com
Categories: Offsite Discussion