News aggregator

ANN: SciFlow-0.5.0

haskell-cafe - Tue, 06/07/2016 - 10:48pm
Hi Cafe, I've been working on a package to manage data analysis pipelines, mainly for personal use. But I feel there may be others who are interested in this as well, so I just published an up-to-date version to hackage. Briefly, this package help you design and manage data analysis pipelines written in Haskell, with computation steps being just Haskell functions with type: a -> IO b. I use template Haskell to construct the dependency graph, and computation steps are assembled according to the graph and type checked at compile time. Each step can be configured to run either locally or on a remote machine. Concurrency is also supported. Independent steps will run simultaneously. Take a look at https://github.com/kaizhang/SciFlow for breif introduction and some examples. This package is still under heavy development, but it is quite stable otherwise as I've been using it on our cluster for some time. I hope you would find it useful and any feedback is welcome! _______________________________________________
Categories: Offsite Discussion

How to capture the output of GHCi :show command

haskell-cafe - Tue, 06/07/2016 - 7:02pm
I would like to be able to bind the output of GHCi's :show to a variable, but I don't see a nice way to do so. Is it possible to do this directly in GHCi? My specific use for this is appending to the current prompt.
Categories: Offsite Discussion

Vacancy: Professor Software technology at UtrechtUniversity

haskell-cafe - Tue, 06/07/2016 - 5:08pm
The Faculty of Science at Utrecht University is seeking to appoint a Full Professor in Software Technology to lead, alongside the other two chairs, the division of Software Systems within the Faculty. The full Professor directs and supervises research in the field of software technology, specifically in the design and development of formalisms and methodologies for effective program construction and program analysis. She/he develops new initiatives, aiming at research programs in software technology. This includes the acquisition of external research funds, both at the national and international levels, and the dissemination of research results and its applications to the relevant research communities. The full professor has a leading role in teaching and supervision. She or he contributes to the department’s curriculum development at BSc, MSc and PhD levels. The full professor plays an active role in the leadership and administrative duties of the Department and/or Faculty. For more information about
Categories: Offsite Discussion

Vacancy: Professor Software technology at UtrechtUniversity

General haskell list - Tue, 06/07/2016 - 5:07pm
The Faculty of Science at Utrecht University is seeking to appoint a Full Professor in Software Technology to lead, alongside the other two chairs, the division of Software Systems within the Faculty. The full Professor directs and supervises research in the field of software technology, specifically in the design and development of formalisms and methodologies for effective program construction and program analysis. She/he develops new initiatives, aiming at research programs in software technology. This includes the acquisition of external research funds, both at the national and international levels, and the dissemination of research results and its applications to the relevant research communities. The full professor has a leading role in teaching and supervision. She or he contributes to the department’s curriculum development at BSc, MSc and PhD levels. The full professor plays an active role in the leadership and administrative duties of the Department and/or Faculty. For more information about
Categories: Incoming News

Twan van Laarhoven: Stream fusion for streaming, without writing any code

Planet Haskell - Tue, 06/07/2016 - 3:02pm

I recently came accross the streaming library. This library defines a type Stream (Of a) m b for computations that produce zero or more values of type a in a monad m, and eventually produce a value of type b. This stream type can be used for efficient IO without having to load whole files into memory. The streaming library touts bechmark results showing superior performance compared to other libraries like conduit, pipes and machines.

Looking at the datatype definition,

data Stream f m r = Step !(f (Stream f m r)) | Effect (m (Stream f m r)) | Return r

it struck me how similar this type is to what is used in the stream fusion framework. The main difference being that the streaming library allows for interleaved monadic actions, and of course the lack of decoupling of the state from the stream to allow for fusion. But the vector library actually also uses such a monadic stream fusion framework, to allow for writing into buffers and such. This is type is defined in the module Data.Vector.Fusion.Stream.Monadic.

data Stream m a = forall s. Stream (s -> m (Step s a)) s data Step s a where Yield :: a -> s -> Step s a Skip :: s -> Step s a Done :: Step s a

So, why not try to use vector's stream type directly as a representation of streams? I added this type as an extra alternative to the benchmark, and without writing any more code, the results are pretty impressive:

The only function that could be improved is scanL. In vector this function is implemented in terms of prescan (scanL without the first element) and cons, which makes it pretty inefficient. So I made a specialized implementation.

And that's all. A simple streaming 'library' with state of the art performance, while writing hardly any new code. Now to be fair, there are some reasons why you wouldn't always want to use these fusing streams. In particular, the resulting code could get quite large, and without fusion they may not be the most efficient.

Categories: Offsite Blogs

On-site GHC-related Haskell/C opportunity atPositive Technologies (Moscow)

haskell-cafe - Tue, 06/07/2016 - 1:07pm
Good day! The Moscow office of Positive Technologies (https://www.ptsecurity.com) is looking for an experienced Haskell developer with a strong C background. You will be working in a team that develops a next generation security platform: think widely available, easy to use, dramatically enhanced security. In particular, we want you to help rewrite our core application in Haskell, which in turn requires porting GHC runtime to run on bare metal. Details can be seen in our Reddit posting: https://www.reddit.com/r/haskell/comments/4msraq/onsite_ghcrelated_haskellc_opportunity_at/ To apply, send you resume or questions to career< at >ptsecurity.com and CC skosyrev< at >ptsecurity.com.
Categories: Offsite Discussion

uninstalling ghc-8.0.1-x86_64 installed through"install-haskell-platform.sh"

haskell-cafe - Mon, 06/06/2016 - 4:03pm
Hi all, How can I uninstall cleanly ghc-8.0.1-x86_64 that I installed using the script install-haskell-platform.sh (found on haskell.org website under Generic Linux). I'm on ubuntu Trusty. Thanks, Pat _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Categories: Offsite Discussion

WADT 2016 -- Extended Deadline

General haskell list - Mon, 06/06/2016 - 2:16pm
CFP: WADT 2016 - 23rd International Workshop on Algebraic Development Techniques (extended deadline) Link: http://cs.swan.ac.uk/wadt16/ When Sep 21, 2016 - Sep 24, 2016 Where Gregynog, UK Submission Deadline June 17, 2016 (extended) Notification July 3, 2016 (extended) Final Version Due July 15, 2016 AIMS AND SCOPE The algebraic approach to system specification encompasses many aspects of the formal design of software systems. Originally born as formal method for reasoning about abstract data types, it now covers new specification frameworks and programming paradigms (such as object-oriented, aspect-oriented, agent-oriented, logic and higher-order functional programming) as well as a wide range of application areas (including information systems, concurrent, distributed and mobile systems). The workshop will provide an opportunity to present recent and ongoing work, to meet colleagues, and to discuss new ideas and future trends. TOP
Categories: Incoming News

New Haddock

General haskell list - Mon, 06/06/2016 - 2:03pm
I couldn’t find an announcement of the new version of Haddock. You can now document your libraries even more beautifully. For example, will render as https://hackage.haskell.org/package/random-fu-0.2.7.0/docs/Data-Random-Distribution-Binomial.html#v:integralBinomialPDF <https://hackage.haskell.org/package/random-fu-0.2.7.0/docs/Data-Random-Distribution-Binomial.html#v:integralBinomialPDF> Also don’t forget you can put really nice diagrams in your documentation e.g. http://hackage.haskell.org/package/diagrams-contrib-1.3.0.7/docs/Diagrams-Example-Logo.html <http://hackage.haskell.org/package/diagrams-contrib-1.3.0.7/docs/Diagrams-Example-Logo.html> and http://hackage.haskell.org/package/diagrams-contrib-1.3.0.7/docs/Diagrams-TwoD-Layout-Tree.html <http://hackage.haskell.org/package/diagrams-contrib-1.3.0.7/docs/Diagrams-TwoD-Layout-Tree.html>. Dominic Steinitz dominic< at >steinitz.org http://idontgetoutmuch.wordpress.com _______________________________________________ Haskell mailing list Haskell< at >haskel
Categories: Incoming News

Philip Wadler: Papers We Love: John Reynolds, Definitional Interpreters for Higher Order Languages

Planet Haskell - Mon, 06/06/2016 - 11:32am
I will be speaking on John Reynolds paper, Definitional Interpreters for Higher Order Languages, at Papers We Love, London, 6:30pm Tuesday 7 June; details here.
Categories: Offsite Blogs

Having issue in running Haskell code in Atom

haskell-cafe - Sun, 06/05/2016 - 9:21pm
Hello All, I have started learning Haskell couple of days ago. I was looking for an IDE and found Atom as one of them. When I started using it I installed multiple packages and tried running creating Haskell files and saving it. This IDE always gives me following error. Please help to debug this: [Enter steps to reproduce below:] 1. ... 2. ... **Atom Version**: 1.7.4 **System**: Microsoft Windows 10 Pro **Thrown From**: [haskell-ghc-mod]( https://github.com/atom-haskell/haskell-ghc-mod) package, v1.14.5 ### Stack Trace Haskell-ghc-mod: ghc-mod failed to launch. It is probably missing or misconfigured. ENOENT ``` At Error: spawn ghc-mod ENOENT PATH: undefined path: undefined Path: C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program F
Categories: Offsite Discussion

Robert Harper: PFPL Commentary

Planet Haskell - Sun, 06/05/2016 - 8:42pm

I am building a web page devoted to the 2nd edition of Practical Foundations for Programming Languages, recently published by Cambridge University Press.  Besides an errata, the web site features a commentary on the text explaining major design decisions and suggesting alternatives.  I also plan to include additional exercises and to make sample solutions available to faculty teaching from the book.

The purpose of the commentary is to provide the “back story” for the development, which is often only hinted at, or is written between the lines, in PFPL itself.  To emphasize enduring principles over passing fads, I have refrained from discussing particular languages in the book.  But this makes it difficult for many readers to see the relevance.  One purpose of the commentary is to clarify these connections by explaining why I said what I said.

As a starting point, I explain why I ignore the familiar concept of a “paradigm” in my account of languages.  The idea seems to have been inspired by Kuhn’s (in)famous book The Structure of Scientific Revolutions, and was perhaps a useful device at one time.  But by now the idea of a paradigm is just too vague to be useful, and there are many better ways to explain and systematize language structure.  And so I have avoided it.

I plan for the commentary to be a living document that I will revise and expand as the need arises.  I hope for it to provide some useful background for readers in general, and teachers in particular.  I wish for the standard undergraduate PL course to evolve from a superficial taxonomy of the weird animals in the language zoo to a systematic study of the general theory of computation.  Perhaps PFPL can contribute to effecting that change.

 

 


Filed under: Research, Teaching
Categories: Offsite Blogs

Ken T Takusagawa: [awlyiqda] Type signatures asking for more than they need

Planet Haskell - Sun, 06/05/2016 - 7:14pm

A type signature to a function creates the requirement that an argument passed to the function have a specified type.  However, operationally, the function only needs for the argument to have certain operations (other functions) defined on it.

Type classes in Haskell provide a means for a function to be polymorphic, accepting many different types, with the type class defining the set of fundamental functions (methods) available.  However, even type classes may be too much: a function might require only a subset of the fundamental functions.

Duck typing is a much "looser" way of addressing this same problem.  Previous thoughts on this problem.

Sometimes, even though all the operations a function needs might be defined on a type, we want to use the type signature of the function to restrict what it can be called on.  The "explode" method might be defined for both firecrackers and nuclear weapons, but we might never want to accidentally pass a nuclear weapon to a certain function.

There is also a software engineering, and somewhat social, aspect to this problem.  Even though today's implementation of a function might not require some method of a type class, tomorrow's improved implementation might.  Declaring the type signature to be more than minimal is like making a reservation for future demands of functionality in the arguments.  Making such a reservation forces all other software calling that function to provide that functionality, even though it isn't currently used.  A type signature therefore represents a battle over a property line: who "owns" the right to decide what functionality an object should have?

Categories: Offsite Blogs

haskell-ide-engine versus hsdev (and Debuggers)

haskell-cafe - Sun, 06/05/2016 - 6:35pm
Hello, I am new to Haskell and thinking of contributing to the IDE efforts. I've noticed two projects which aim to provide a "service" that editors and IDEs can call to help present useful information to programmers. I am wondering how these projects differ and why they are separate efforts since they seem to have very similar end goals? Another thing that I am wondering is if either of these two projects aims to provide debugger support and what the general state of debuggers for Haskell is? I've seen a project for a Haskell remote debugger which looks it was ghci/interpreter based and was being used by Eclipse and IntelliJ. It didn't work when I tried it, however, and I am not sure that the project is still active. It also looks like ghc only recently began adding support for debugging compiled Haskell and that initial efforts may be to get things working with gdb or lldb. Am I correctly understanding the current landscape as far as Haskell debuggers go? Thanks! Leonard _________________________________
Categories: Offsite Discussion

Final CFP: 4th ACM SIGPLAN International Workshop onFunctional Art, Music, Modelling and Design

haskell-cafe - Sun, 06/05/2016 - 2:09pm
4th ACM SIGPLAN International Workshop on Functional Art, Music, Modelling and Design http://functional-art.org/2016/ Co-located with ICFP Nara, Japan, 24 September, 2016 Key Dates: Submission deadline - June 24 Author Notification - 15 July Camera Ready - 31 July Workshop - September 24, 2016 We welcome submissions from academic, professional, and independent programmers and artists. Final Call for Papers, Demos, *and* Performances The ACM SIGPLAN International Workshop on Functional Art, Music, Modelling and Design (FARM) gathers together people who are harnessing functional techniques in the pursuit of creativity and expression. Functional Programming has emerged as a mainstream software development paradigm, and its artistic and creative use is booming. A growing number of software toolkits, frameworks and environments for art, music and design now employ functional programming languages and techniques. FARM is a forum for exploration and critical evaluation of these developments,
Categories: Offsite Discussion

Strange type error with -XTypeApplications

haskell-cafe - Sat, 06/04/2016 - 9:32pm
This program: * {-# LANGUAGE TypeApplications #-}* * main = print (fromDynamic < at >Int undefined)* produces this error message: * foo.hs:3:15: error:* * • Cannot apply expression of type ‘t0’* * to a visible type argument ‘Int’* * • In the first argument of ‘print’, namely* * ‘(fromDynamic < at >Int undefined)’* * In the expression: print (fromDynamic < at >Int undefined)* * In an equation for ‘main’:* * main = print (fromDynamic < at >Int undefined)* However, I'd expect it to be "Not in scope: fromDynamic" _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Categories: Offsite Discussion

Accumulating and threading output of functions

haskell-cafe - Sat, 06/04/2016 - 4:18pm
Hello all, I have a number of functions, whose type is something like this: f:: a -> b -> (b, c) i.e. it returns a modified b and an additional c. Now I want to write a combinator, which assembles a list of such functions into a single one. This combinator will have to thread the bs from one function to the next and accumulate the cs into a single c. While I was able to write this using a fold, I am not happy with it (my first attempt had a bad error in it, which is always a bad sign). Are you aware of any idioms, how to do such things on the beaten track?
Categories: Offsite Discussion

announce: arithmoi 0.4.2.0

haskell-cafe - Sat, 06/04/2016 - 3:59pm
It is with great pleasure that the arithmoi maintainers (andrew lelechenko and myself) would like to share the 0.4.2.0 release with the haskell community. This release https://hackage.haskell.org/package/arithmoi-0.4.2.0 includes a multiplicatively infinite (but addititively finite) increase in test coverage and correspondingly every known bug in arithmoi has been fixed (so theres no known crashing/faulting bugs, and all tested code gives mathematically correct answers) I would especially like to thank Andrew Lelechenko for becoming a fellow maintainer, his incredibly meticulous, clean, thorough engineering is really what made this release possible and excellent. this should treated as a stable library version release. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Categories: Offsite Discussion

New version of itself

haskell-cafe - Sat, 06/04/2016 - 2:24pm
Hello all, I find myself frequentlly writing types like this data Logger a l = Lgr { runLogger :: a -> Log l -> (Log l, Logger a l) } The purpose is to give a logger a chance to carry an internal state. It could e.g. choose to log only every n invocations. To do this it must keep track of how many times it has been called. I want to leave such things private to the Logger. (1) I know that this is not an unusal thing to do, but it has an OO feel to it. Is there a more functional alternative to it. Should I just not worry? (2) I can write a combinator which creates a Logger from a list of Loggers. Since each Logger potentially returns a new version of itself, I must always re-assemble the combined logger from all the returned new versions. I am worried that this is a costly operation, particularly when most Loggers just return themselves unaltered. I don't have any hard numbers about the performance penalty though. These Loggers are used in a discrete-event-simulation and they will get called many t
Categories: Offsite Discussion

Month in Haskell Mode May 2016

haskell-cafe - Sat, 06/04/2016 - 12:56pm
Hi, Month in Haskell Mode May 2016 progress report is available: https://github.com/haskell/haskell-mode/wiki/Month-in-Haskell-Mode-May-2016
Categories: Offsite Discussion