News aggregator

FP Haskell Center - FP Complete - Tue, 11/04/2014 - 9:54am
Categories: Offsite Blogs

Functional Jobs: Senior Software Engineer at McGraw-Hill Education (Full-time)

Planet Haskell - Tue, 11/04/2014 - 8:42am

This Senior Software Engineer position is with the new LearnSmart team at McGraw-Hill Education's new and growing Research & Development center in Boston's Innovation District.

We make software that helps college students study smarter, earn better grades, and retain more knowledge.

The LearnSmart adaptive engine powers the products in our LearnSmart Advantage suite — LearnSmart, SmartBook, LearnSmart Achieve, LearnSmart Prep, and LearnSmart Labs. These products provide a personalized learning path that continuously adapts course content based on a student’s current knowledge and confidence level.

On our team, you'll get to:

  • Move textbooks and learning into the digital era
  • Create software used by millions of students
  • Advance the state of the art in adaptive learning technology
  • Make a real difference in education

Our team's products are built with Flow, a functional language in the ML family. Flow lets us write code once and deliver it to students on multiple platforms and device types. Other languages in our development ecosystem include especially JavaScript, but also C++, SWF (Flash), and Haxe.

If you're interested in functional languages like Scala, Swift, Erlang, Clojure, F#, Lisp, Haskell, and OCaml, then you'll enjoy learning Flow. We don't require that you have previous experience with functional programming, only enthusiasm for learning it. But if you have do some experience with functional languages, so much the better! (On-the-job experience is best, but coursework, personal projects, and open-source contributions count too.)

We require only that you:

  • Have a solid grasp of CS fundamentals (languages, algorithms, and data structures)
  • Be comfortable moving between multiple programming languages
  • Be comfortable with modern software practices: version control (Git), test-driven development, continuous integration, Agile

Get information on how to apply for this position.

Categories: Offsite Blogs

Monads and scope

haskell-cafe - Tue, 11/04/2014 - 5:02am
*Question 1: Are monad stacks "transparent" -- that is, can one use a layer in the middle of a monad stack without thinking about other layers?* In learning about how to stack multiple monads (or more literally, how to stack monad transformers on top of a monad), I was expecting that in order to reach into the middle of the stack, one would have to stay aware of the order in which the stack was created, and unwrap outer transformers to get there. That appears to be false. For instance, the program UglyStack.hs in Chapter 18 (Monad Transformers) of Real World Haskell <> includes a function called "constrainedCount" that, in a ReaderT (StateT IO) stack, calls "ask", "get" and some IO functions as if no layer of the stack interferes with any of the others. Is that true in general? That is, if I build on top of a monad M a stack of monad transformers T1 T2 T3 ... TN M, and each of the Tn have different functions associated with them, call I call tho
Categories: Offsite Discussion

Inlinable vs inline

haskell-cafe - Tue, 11/04/2014 - 2:20am
Hi, I wanted to get some clarifications on how inlinable and inline behave. One particular case is where you have a module exporting some functions with helper functions that are not exported. You go ahead and add inlinable to the exported functions so that the call site can specialize on them. Is there any penalty to adding inline vs inlinable to the helper functions? For example, are there cases where a helper function will not inline and thus can not be specailized at the call site and it would be better to declare the helper function inlinable? I would be interested to hear any nuances related to the differences and practical consequences of these pragmas. Thanks! Charlie Durham _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >
Categories: Offsite Discussion

Obscure, important concepts

haskell-cafe - Tue, 11/04/2014 - 12:53am
What concepts relatively unique to Haskell are powerful, widely applicable, and not mentioned in most introductory texts? (By "relatively unique to Haskell" I mean maybe they're part of Lisp or Scheme, but not, say, Java.) Some of the concepts important to Haskell, such as lambda expressions and recursion, are also present in more popular languages. Many others, though, either have no equivalent in (most) other languages, or else are very unlike the equivalent: types, classes and kinds higher-order functions evaluation partial application tail recursion laziness currying pattern matching application and composition operations contexts functors, applicatives, monads monad transformers * lenses* * :def macros* * arrows* * continuation passing style* * software transactional memory* Most of those topics appear to be covered by introductory texts, but the last five are not. I found each of them by accident, and each
Categories: Offsite Discussion

Code review request: Library and executable to readUSB temperature device

haskell-cafe - Mon, 11/03/2014 - 11:49pm
Dear reader, I have written a small executable and library to read values from a USB device and would like someone with more knowledge then hlint to review my code. If you find the time to read please consider placing comments/issues on Github or mailing the list or me directly with your comments. I also have the following doubts about the code: - It has some bit-shifting code on line 18 to 20. Is there a nicer "unpack two bytes to an integer" method? - I'm using test-framework with test-framework-hunit but it feels clunky, is hspec a more common approach to testing? - I'm ignoring a lot of return values between lines 61 to 70. In a language like Python or Java I would add assert statements or checks with exceptions there. How should I go about that in Haskell? Greetings, Bram
Categories: Offsite Discussion

Is there even 1 single competent haskell tutorial?

Haskell on Reddit - Mon, 11/03/2014 - 10:09pm

I have looked at LYAH, CIS 194, Typeclassopeadia (I really don't care how it's spelled), Real World Haskell, etc., etc., etc., and each and every last one (a) is incapable of holding my attention, (b) contains code errors in its example, or (c) is written by someone who either does not know how to communicate in English or does not care to communicate in any intelligible way. No, I will not ask questions on the IRC channel because, in addition to the fact I keep odd hours and people often sleep when I am awake, the people on IRC have enough of their own stuff to get thru and do not need me asking the fifty thousand questions I have as a result of the shoddy authorship I have so far tried to deal with. I do not pay them anything to answer questions nor would I be able to afford to pay them anything, anyway; therefore, I should not be interfering with their attempts to get stuff finished. There is an adage which says, "You only know a subject if you can explain it to others" and the difficulty I am experiencing with learning haskell suggests there is not anyone who actually knows the language, as a result. So, as I apologize for what could easily be considered a rant, can anyone please point out a simple, error free, and intelligible haskell tutorial?

submitted by sickOfLaziness
[link] [38 comments]
Categories: Incoming News

NFM 2015 - deadline extension: Nov 18

General haskell list - Mon, 11/03/2014 - 8:37pm
CALL FOR PAPERS *** Deadline extension: Nov 18, 2014 *** The 7th NASA Formal Methods Symposium <> 27 – 29 April 2015 Pasadena, California, USA THEME The widespread use and increasing complexity of mission- and safety-critical systems require advanced techniques that address their specification, verification, validation, and certification. The NASA Formal Methods Symposium is a forum for theoreticians and practitioners from academia, industry, and government, with the goals of identifying challenges and providing solutions to achieving assurance in mission- and safety-critical systems. Within NASA such systems include for example autonomous robots, separation assurance algorithms for aircraft, Next Generation Air Transportation (NextGen), and autonomous rendezvous and docking for spacecraft. Moreover, emerging paradigms such as property-based design, code generation, and safety cases are bringing with them new chall
Categories: Incoming News

New Functional Programming Job Opportunities

haskell-cafe - Mon, 11/03/2014 - 7:00pm
Here are some functional programming job opportunities that were posted recently: Senior Software Engineer at Soda Software Labs Cheers, Sean Murphy
Categories: Offsite Discussion

[ANN]json-autotype: Tool generating JSON parsers and type declarations from example documents...

haskell-cafe - Mon, 11/03/2014 - 6:59pm
Dear Fellow Haskellers, I've just published a beta version of a tool facilitating generation of Haskell type declarations from example JSON documents. It is supposed to simplify implementing large JSON-based interfaces, without necessity of writing any boilerplate code. USAGE: ====== After installing with `cabal install json-autotype`, you might generate stub code for the parser: $ json-autotype input.json -o MyFormat.hs Then you might test the parser by running it on an input file: $ runghc MyFormat.hs input.json If everything is correct, then feel free to inspect the data structure generated automatically for you! The goal of this program is to make it easy for users of big JSON APIs to generate entries from example data. Occasionally you might find a valid JSON for which `json-autotype` doesn't generate a correct parser. You may either edit the resulting file _and_ send it to the author as a test case for future release. HOW IT WORKS: ============== The program uses union type unification to tr
Categories: Offsite Discussion

Proposal: strictify foldl'

libraries list - Mon, 11/03/2014 - 6:51pm
As Duncan Coutts explains toward the end of (which proposes something else I personally *don't* endorse), foldl', the strict foldl, isn't actually strict enough. In particular, it's only conditionally strict in the initial value for the accumulator: foldl' (\_ x -> x) undefined [3] = 3 Why does this matter? Strictness analysis needs to look at (and be able to look at) the function passed to foldl' to determine whether the expression is strict in the initial value. foldl'-as-foldr tends to complicate this sort of analysis already. Proposal: make foldl' unconditionally strict in the initial accumulator value, both in GHC.List and in (the default definition in) Data.Foldable, and make foldr' in Data.Foldable unconditionally strict in the initial value of its accumulator. Specifically, foldl' k z0 xs = foldr (\v fn z -> z `seq` fn (k z v)) id xs z0 would change to foldl' k !z0 xs = foldr (\v fn z -> z `seq` fn (k z v)) id xs z0 ______________________________________
Categories: Offsite Discussion

add Storable a => Storable (Ratio a) and Storable a => Storable (Complex a) to base

libraries list - Mon, 11/03/2014 - 6:07pm
Getting those two into base for 7.10 would be quite nice. I think this will mostly impact folks who maintain numerical computing libraries, such as myself, and even then, I think this would be a change well worth having! discussion period 1 week (because I'd like to get it OK'd with plenty of time before the merge window for 7.10 finally closes) _______________________________________________ Libraries mailing list Libraries< at >
Categories: Offsite Discussion

Travis builds failing with spurious errors

haskell-cafe - Mon, 11/03/2014 - 5:29pm
Hi all, Apologies if this is not the right space to ask this question. We set up CI for Agda with Travis: <>. The problem is that we're having trouble with older versions of GHC. For example, with GHC 7.4.2, the build complains that ScopedTypeVariables is not enabled, even if it is. You can check the build failure here: <>, and the relevant file here: <>. As you can see from the pragmas ScopedTypeVariables is enabled, and in fact when building locally I have no problems. We also got some spurious messages regarding syntax. Has anybody encountered similar problems? I don't know if it's something depending on Travis or some configuration mistakes, but I'm a bit at loss on how to research this. Moving the OPTIONS_GHC pragma after the LANGUAGE pragmas seems to fix the issue but I'd like to know what's going on.
Categories: Offsite Discussion

Help with Data.Map (new to haskell ..)

Haskell on Reddit - Mon, 11/03/2014 - 4:57pm

Hey guys,

I've been looking on the web on how haskell works, but even with google's help I can't figure out what's wrong with my code:

import qualified Data.Map as Map data Env = EmptyEnv | BasicEnv Map.Map String Val | ExtendEnv String Val | GetEnv Env String Val deriving (Show, Eq)

The error is this:

Expecting two more arguments to `Map' Expected a type, but `Map' has kind `* -> * -> *' In the type `Map' In the definition of data constructor `BasicEnv' In the data declaration for `Env' Failed, modules loaded: none.

Val is another type I deffined.

Until now this tutorial has been helpfull, but now I'm stuck..

Edit: Mistake in the title, I wanted to say that I'm "new to haskell" :)


BasicEnv (Map.Map String Val)


Thanks for the help guys!

submitted by husky11
[link] [4 comments]
Categories: Incoming News

ANN: Released new version of Haskell plugin forIntelliJ

haskell-cafe - Mon, 11/03/2014 - 10:57am
Hi everyone, I'm glad to announce version 0.2. It's available in Jetbrains plugin repository. Besides improvements and minor changes, version 0.2 has support for HLint inspection and quick fixes based on HLint suggestions. For more information, see change notes. Complete feature list is now: - Syntax highlighting (which can be customized); - Error/warning highlighting; - Find Usages of identifiers; - Resolving references of identifiers (also to library code if library source code is added to project and resolves inside import declaration); - Code completion by resolving references; - Renaming variables (which first shows preview so refactoring scope can be adjusted); - View type info from (selected) expression; - View expression info; - View quick documentation; - View quick definition; - Structure view; - Navigate to declaration (called `Class` in IntelliJ menu); - Navigate to identifier (called `Symbol` in IntelliJ menu); - Code completion by looking to import declarations; - Simple form of code for
Categories: Offsite Discussion

Pattern variables in Template Haskell

haskell-cafe - Mon, 11/03/2014 - 10:07am
Dear Haskell-cafe, I'm trying to use Template Haskell to generate patterns in Haskell code, but after a couple of days of trying, I have not come with a solution. I hope somebody could help me. My problem is basically that I want something like: example :: Maybe a -> a example $(j "x") = x to work correctly. The idea of this simple quoter is to generate code similar to: example :: Maybe a -> a example (Just x_123) = x_123 that is, to create the "Just" pattern, and to make "x" bind to the same element. Right now my code reads: j :: String -> Q Pat j s = return (ConP 'Just [VarP (mkName s)]) which generated a new variable "x" each time, thus unable to match with the "x" in the RHS. I have also tried with lookupValueName. Note that my problem is a bit more complicated, with variable names coming from a different source. However, I think that if I solve this problem where I can make variables in a pattern and in an expression match, I should be able to use them in my complete solution. Thanks in advance
Categories: Offsite Discussion