News aggregator

RBM and Backprop implementation

Haskell on Reddit - Tue, 01/05/2016 - 10:44pm

I've been trying to understand the contrastive divergence training of RBMs and back-propagation for NNs, so I implemented them in Haskell, and it works! Take a look at https://github.com/aeyakovenko/rbm. I would love some feedback. Cross-post from /r/machinelearning

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

ETAPS 2016 satellite workshops joint call for papers

General haskell list - Tue, 01/05/2016 - 10:09pm
Joint Call for Papers ETAPS 2016 Satellite Workshops Eindhoven, The Netherlands, 2-3 and 8 April 2016 http://www.etaps.org/2016/workshops ETAPS, the European Joint Conferences on Theory and Practice of Software, is the primary European forum for academic and industrial researchers working on topics relating to Software Science. The nineteenth edition, ETAPS 2016, will take place in Eindhoven, The Netherlands, 2-8 April 2016, and covers besides the main conferences ESOP, FASE, FOSSACS, POST and TACAS, a large number of satellite workshops and other events in the fields of Software Engineering, Formal Methods, Logics of Programs and the Theory of Computation. This is the joint call for papers for ETAPS 2016 for 21 satellite workshops with open calls. ETAPS satellite workshops will take place in the weekend of Saturday-Sunday, 2-3 April, before the ETAPS main conferences, and on Friday, 8 April, after them. For more information on
Categories: Incoming News

Convolutionnal Neural Network in Haskell?

Haskell on Reddit - Tue, 01/05/2016 - 8:35pm

Hi, I have been looking for a cabal package that handle CNN (Convolutionnal Neural Network) with no success. Is there such a package available?

Thanks!

submitted by Dref360
[link] [11 comments]
Categories: Incoming News

NFM 2016 - second call for papers

General haskell list - Tue, 01/05/2016 - 7:47pm
NFM 2016 – Second Call For Papers THE 8TH NASA FORMAL METHODS SYMPOSIUM http://crisys.cs.umn.edu/nfm2016 June 07 - June 09 2016 McNamara Alumni Center University of Minnesota 200 Oak Street S.E., Minneapolis, MN 55455 THEME OF THE SYMPOSIUM The widespread use and increasing complexity of mission-critical and safety-critical systems at NASA and the aerospace industry requires advanced techniques that address their specification, design, verification, validation, and certification requirements. The NASA Formal Methods Symposium is a forum to foster collaboration between theoreticians and practitioners from NASA, academia, and the industry, with the goal of identifying challenges and providing solutions towards achieving assurance for such critical systems. New developments and emerging applications like autonomous on-board software for Unmanned Aerial Systems (UAS), UAS Traffic Management (UTM), advanced separation assurance algorithms for aircraft, and the need for system-wide fault detection, diagn
Categories: Incoming News

MSFP 2016: Call for Papers

General haskell list - Tue, 01/05/2016 - 4:53pm
Sixth Workshop on MATHEMATICALLY STRUCTURED FUNCTIONAL PROGRAMMING 8 April 2016, in Eindhoven, The Netherlands A satellite workshop of ETAPS 2016 http://msfp2016.bentnib.org/ The sixth workshop on Mathematically Structured Functional Programming is devoted to the derivation of functionality from structure. It is a celebration of the direct impact of Theoretical Computer Science on programs as we write them today. Modern programming languages, and in particular functional languages, support the direct expression of mathematical structures, equipping programmers with tools of remarkable power and abstraction. Where would Haskell be without monads? Functional reactive programming without temporal logic? Call-by-push-value without adjunctions? The list goes on. This workshop is a forum for researchers who seek to reflect mathematical phenomena in data and control. The first MSFP workshop was held in Kuressaare, Estonia, in July 2006, affiliated with MPC 2006 and AMAST 2006. The second MSFP workshop was held
Categories: Incoming News

Prelude> 2 ^ 3 ^ 4 ^ 5 hangs stack ghci

Haskell on Reddit - Tue, 01/05/2016 - 4:53pm

I figured it out now, but my first instinct was to recreate the error by evaluating by hand. So, I typed

Prelude> 2 ^ 3

8

Prelude> 8 ^ 4

4096

Prelude> 4096 ^ 5

1152921504606846976 (I hope I typed that correctly)

But, then, I realized, this was being associated in the other direction. So, I checked that out by hand.

prelude> 4 ^ 5 1024 Prelude> 3 ^ 1024 --do I dare even test this one? it will be a 300+ digit number.

3733918(etc) . . . .for 4 lines. I can't even guess how much it would take to calculate 2 ^ (300 digit number) but it would require more than the known universe turned into RAM memory to store the result.

So, at first I wondered what was wrong with Stack ghci, but now, just take this as a friendly public service announcement.

submitted by Xalem
[link] [36 comments]
Categories: Incoming News

Do Free Monads Actually Matter?

Haskell on Reddit - Tue, 01/05/2016 - 12:51pm

So I've read this: http://degoes.net/articles/modern-fp/ and a few years ago I also read this: http://www.haskellforall.com/2012/06/you-could-have-invented-free-monads.html

I "get" the mechanism for free monads, and catamorphisms, and algebras. Unfortunately, I'm still not convinced by the utility. When should I actually whip out a free monad? When is it that I really do need the flexibility of interpreters, and how is that more or less appropriate than the traditional approach of typeclasses, or multiparameter typeclasses? I see a lot of "how", and "what", but I think the articles I've linked to don't give a lot of "why"! What's the motivation, and what are the tradeoffs?

submitted by saposcat
[link] [46 comments]
Categories: Incoming News

Douglas M. Auclair (geophf): December 2015 1HaskellADay 1-Liners

Planet Haskell - Tue, 01/05/2016 - 6:47am
One-liners
  • December 30th, 2015: You have a string of 'digits' in base whatever to convert to an Int
    debase :: [Int] -> Int -> Int
    debase [12,21,3] 26 ~> 8661
    Define debase
    • Gautier DI FOLCO @gautier_difolco
      import Data.Bifunctor
      debase = curry (sum . uncurry (zipWith (*)) . bimap reverse (flip iterate 1 . (*)))
    • bazzargh @bazzargh
      debase a b = sum $ zipWith (*) (reverse a) (map (b^) [0..])
    • obadz @obadzz
      or debase l b = foldl (\ p n -> p * b + n) 0 l
    • bazzargh @bazzargh
      that's better than mine. how about:
      flip (foldl1 . ((+) .) . (*))
  • December 12th, 2015: #math You have this sequence: [1,1,1,1,1,1,2,1,1,1,3,3] What is this pattern? Is there one? Write #haskell to generate this list.
  • December 3rd, 2015: Lens-y again Points-free-itize the following correctName :: Row -> Row correctName r = set lastName (init (view lastName r)) r
  • December 3rd, 2015: Let's get a little lens-y with this one: accumer :: Getter a t a -> t -> [a] -> [a] accumer f s acc = ans where ans = view f s:acc
    • Define the curried-accumer function that curries away the acc-argument.
    • What would the curried definition be if the function type were: accumer :: Getter a t a -> t -> Set a -> Set a
  • December 3rd, 2015: define minimax :: Ord eh => eh -> (eh, eh) -> (eh, eh) such that, e.g.: minimax 1 (2,3) ~> (1,3) minimax 10 (2,3) ~> (2,10)
    • Thomas Dietert @thomasdietert In that case, minimax n (x,y) = (minimum [n,x,y], maximum [n,x,y])
    • joomy @cattheory minimax = liftM2 (***) min max
  • December 1st, 2015: define (->>) :: (a -> m ()) -> (a -> m ()) -> a -> m () All monadic effects must be evaluated.
    • Jérôme @phollow (->>) f g a = f a >> g a 
      • then liftM2 (>>)
      • Nicoλas @BeRewt but the full applicative is: liftA2 (*>)
Categories: Offsite Blogs

Question regarding performance

Haskell on Reddit - Tue, 01/05/2016 - 6:41am

I am writing a parser for email's headers with attoparsec. But while trying to optimize this code I stumble upon several questions that I cannot answer by myself.

So naturally I am looking for the help of the community.

  • Is function call cheap in haskell ? Because when displaying cost center with +RTS -p two near function's calls in the code seem pretty distant in time. (in a flamegraph you can detect that with huge gap between each step of the call stack). Inlining function seems to overcome most of this not solicited overhead.

  • Is it possible to see strictness in Haskell/GHC ? Often time I want to see at a certain point in the program (at runtime), what have been evaluated or not. Is there an equivalent of traceShow but for strictness ? This traceStrict will (without forcing any evaluation) recursively show the state of a variable (thunks, WHNF, NF, ...) Most of the time I am trying to guess around and add some $!, (or just adding it everywhere and see if it's making a difference). Or is it possible to use ghc to dump intermediate representation to see this at compile time ?

  • Why MonoTraversable is faster than Traversable ? I tend to use classyPrelude everywhere in my programs in replacement for prelude. By default classyPrelude uses functions from MonoTraversable instead of Traversable. For a reason that I cannot explain the Monoidic version seems faster. What is the benifit of adding the Monoid constraint instead of just using the Generic version ?

  • What's the difference between

This

func = do ... toto where toto = do ...

and

toto = do .... func = do ... toto

For me there is none, but when I changed the first version for the later one. Performance seemed to improve for unknown reasons.

Any explanation will be welcome :)

Compilation of answers
  • Is function call cheap in haskell ?

Look at tibbe answer

  • Is it possible to see strictness in Haskell/GHC ?

MaxGabriel

In GHCi you can use :sprint to print a variable without forcing its evaluation. I think if you stop the program in the GHCi debugger you should be able to then check if a value is a thunk or not

It's the perfect solution for me

tibbe

Look at the intermediate output (-ddump-simpl) you can see if e.g. arguments are passed unboxed (e.g. Int#) or boxed (e.g. Int)

It's works but the dump is really tedious to read (at least with my current knowledge)

edsko

Understanding the RealWorld

For more information about the runtime behavior

  • What's the difference between

ephrion

Top level functions are more likely to get inlined and memoized than where functions IIRC.

submitted by erebe
[link] [11 comments]
Categories: Incoming News

How do I read/debug build errors?

Haskell on Reddit - Tue, 01/05/2016 - 1:19am

Compared to Python/Java/C++, I find it really hard to read Haskell build errors. Does anyone have tips on how I could understand errors better?

submitted by Maplicant
[link] [8 comments]
Categories: Incoming News

Zero config, no server Haste.App

Haskell on Reddit - Mon, 01/04/2016 - 11:30pm
Categories: Incoming News

Compose Conference Call for Participation [NYC,Feb 4-5]

haskell-cafe - Mon, 01/04/2016 - 8:50pm
=============================================== Call for Participation Compose Conference 2016 February 4-5, 2016 New York, NY http://www.composeconference.org/ =============================================== The practice and craft of functional programming :: Conference Compose is a conference for typed functional programmers, focused specifically on Haskell, OCaml, F#, SML, and related technologies. Typed functional programming has been taken up widely, by industry and hobbyists alike. For many of us it has renewed our belief that code should be beautiful, and that programming can be as enjoyable as it is practical. Compose is about bringing together functional programmers of all levels of skill and experience — from technical leads to novices, and from long-time hackers to students just getting started. It will feature a keynote by Eugenia Cheng on her work popularizing mathematics, two days of great talks, and plans are underway for a weekend hackathon/unconference. * Invited Talks: Eugenia C
Categories: Offsite Discussion

"Hask" anything, New Years edition! The thread where you ask and we try to answer!

Haskell on Reddit - Mon, 01/04/2016 - 6:15pm

If your question wasn't answered last time feel free to ask again! (Sometimes it's just a matter of getting the right person to see your question.)

Here is a link to the previous thread: https://www.reddit.com/r/haskell/comments/3uvf4p/hask_anything_the_thread_where_you_ask_and_we_try/

Looking for questions to answer? Try sorting by new.

submitted by dagit
[link] [66 comments]
Categories: Incoming News

Spurious memory leak example from the wiki

haskell-cafe - Mon, 01/04/2016 - 4:26pm
I can't get the two examples (sum/product) in: https://wiki.haskell.org/Memory_leak#Holding_a_reference_for_a_too_long_time to behave differently under O2 or O0. Same profile report each time. Have changes to prelude (FTP? Rewrite rules/build stuff for folds?) made these do the same thing? The foldl/foldl' examples behave the same as you might expect. (216mb vs. 1mb of heap) --- Chris Allen _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Categories: Offsite Discussion

Is there any hope to see the "import problem" solved ?

Haskell on Reddit - Mon, 01/04/2016 - 3:11pm

I've been switching to Haskell as my main language for about 2 years now, and I think I'm pretty much up to speed with any scripting languages I used to use before. However, what is still killing me (and slowly me down) is the import process. For example, I'm writing a simple script which parse two (using cassava), compare them (these), and display them (tabular). Adding to that, the standard monad, maybe , monoid etc I end up with the following import section

import qualified Data.ByteString.Lazy as BL import Data.Char (toLower, ord) import Data.Csv import Data.List.Split (splitOn) import Data.Maybe (catMaybes) import Data.Monoid import System.Environment (getArgs) import Control.Monad import Control.Applicative import Data.String (fromString) import Data.Map(Map) import qualified Data.Map as Map import Data.Maybe import Data.Traversable (traverse) import Options.Applicative as Opt import Data.Align (align) import Data.These import Text.Regex.PCRE((=~~)) import Text.Regex(subRegex, mkRegex) import Text.Tabular as Table import qualified Text.Tabular.Ascii as Ascii

Not mentioning adding all the libraries to the cabal file. All of that is is somehow ridiculous for a 10 (ok 50) line script. If there is one feature in Haskell which I would like to see in the "new-haskell" is the "import problem". Is there any hope that it will be sorted somehow ? The solution I can see are

- extension allowing to alias group of import into one - template haskell allowing to declare import allowing import group alias - a community effort to propose "currated" group of libraries. - something else

I could of course write my own "prelude" and push it on hackage, but if everybody do that, hackage will become cluttered unless the community agreed on a naming scheme like Prelude.maxigit or User.maxigit ...

Am I the only one having this problem and if not how do you solve it ?

submitted by maxigit
[link] [46 comments]
Categories: Incoming News