News aggregator

SIGPLAN Programming Languages Mentoring Workshop < at >ICFP

haskell-cafe - Tue, 05/31/2016 - 11:02pm
SIGPLAN Programming Languages Mentoring Workshop < at > ICFP Nara, Japan (co-located with ICFP 2016) Sunday, September 18th, 2016 We are pleased to invite students interested in functional programming research to the programming languages mentoring workshop at ICFP. The goal of this workshop is to introduce senior undergraduate and early graduate students to research topics in functional programming as well as provide career mentoring advice. We have recruited leaders from the functional programming community to provide overviews of current research topics and give students valuable advice about how to thrive in graduate school, search for a job, and cultivate habits and skills that will help them in research careers. This workshop is part of the activities surrounding ICFP, the International Conference on Functional Programming, and takes place the day before the main conference. One goal of the workshop is to make the ICFP conference more accessible t
Categories: Offsite Discussion

SIGPLAN Programming Languages Mentoring Workshop < at > ICFP

General haskell list - Tue, 05/31/2016 - 11:02pm
SIGPLAN Programming Languages Mentoring Workshop < at > ICFP Nara, Japan (co-located with ICFP 2016) Sunday, September 18th, 2016 We are pleased to invite students interested in functional programming research to the programming languages mentoring workshop at ICFP. The goal of this workshop is to introduce senior undergraduate and early graduate students to research topics in functional programming as well as provide career mentoring advice. We have recruited leaders from the functional programming community to provide overviews of current research topics and give students valuable advice about how to thrive in graduate school, search for a job, and cultivate habits and skills that will help them in research careers. This workshop is part of the activities surrounding ICFP, the International Conference on Functional Programming, and takes place the day before the main conference. One goal of the workshop is to make the ICFP conference more accessible t
Categories: Incoming News

Jan Stolarek: Installing OCaml under openSUSE 11.4, or: “the compilation of conf-ncurses failed”

Planet Haskell - Tue, 05/31/2016 - 6:29am

Recently I decided to learn the basics of OCaml and I spent yesterday installing the compiler and some basic tools. On my machine at work I have a Debian 7 installation, while on my home laptop I have openSUSE 11.4. Both systems are quite dated and ship with OCaml 3.x compiler, which is five years old. Obviously, I wanted to have the latest version of the language. I could have compiled OCaml from sources – and in fact I have done that in the past to compile the latest version of Coq – but luckily there is a tool called OPAM (OCaml Package manager). OPAM can be used to easily download and install desired version of OCaml compiler. As the name implies, OPAM can be also used for managing packages installed for a particular compiler version.

The installation process went very smooth on my Debian machine, but on openSUSE I have run into problems. After getting the latest compiler I wanted to install ocamlfind, a tool required by a project I wanted to play with. To my disappointment installation ended with an error:

[ERROR] The compilation of conf-ncurses failed at "pkg-config ncurses".   This package relies on external (system) dependencies that may be missing. `opam depext conf-ncurses.1' may help you find the correct installation for your system.

I verified that I indeed have installed development files for the ncurses library as well as the pkg-config tool. Running the suggested opam command also didn’t find any missing dependencies, and the log files from the installation turned out to be completely empty, so I was left clueless. Googling revealed that I am not the first to encounter this problem, but offered no solution. I did some more reading on pkg-config and learned that: a) it is a tool that provides meta-information about installed libraries, and b) in order to recognize that a library is installed it requires extra configuration files (aka *.pc files) provided by the library. Running pkg-config --list-all revealed that ncurses is not recognized as installed on my system, which suggested that the relevant *.pc files are missing. Some more googling revealed that ncurses library can be configured and then compiled with --enable-pc-files switch, which should build the files needed by pkg-config. I got the sources for the ncurses version installed on my system (5.7) only to learn that this build option is unsupported. This explains why the files are missing on my system. I got the sources for the latest version of ncurses (6.0), configured them with --enable-pc-files and compiled, only to learn that the *.pc files were not built. After several minutes of debugging I realized that for some unexplained reasons the configure-generated script which should build the *.pc files (located at misc/gen-pkgconfig) did not receive +x (executable) permission. After adding this permission manually I ran the script and got five *.pc files for the ncurses 6.0 library. Then I had to edit the files to match the version of ncurses of my system – relevant information can be obtained by running ncurses5-config --version. The only remaining thing was to place the five *.pc files in a place where pkg-config can find them. On openSUSE this was /usr/local/pkgconfig, but this can differ between various Linux flavours.

After all these magical incantations the installation of ocamlfind went through fine and I can enjoy a working OCaml installation on both of my machines. Now I’m waiting for the “Real-world OCaml” book ordered from Amazon (orders shipped from UK Amazon to Poland tend to take around two weeks to arrive).

Categories: Offsite Blogs

2nd Call for Papers: WFLP 2016 - Update: EPTCS Proceedings

General haskell list - Mon, 05/30/2016 - 5:19pm
24th International Workshop on Functional and (Constraint) Logic Programming (WFLP 2016) September 13-14, part of the Leipzig Week of Declarative Programming (L-DEC 2016) *********************************************************** Deadlines: * abstract submission: June 15, 2016 * paper submission: June 22, 2016 * notification: July 15, 2016 * camera-ready (workshop) version due: August 10, 2016 Papers can be directly accepted for publication in the formal EPTCS proceedings, or accepted for presentation at the workshop and invited to another round of reviewing after revision. More details on the web page. *********************************************************** The international workshops on functional and (constraint) logic programming aim at bringing together researchers, students, and practitioners interested in functional programming, logic programming, and their integration. This year the workshop is co-located with two other events as part of http://nfa.imn.htwk-le
Categories: Incoming News

DEADLINE EXTENSION: 19th ACM/IEEE MSWiM 2016 - Malta,Nov 13-17, 2016

General haskell list - Mon, 05/30/2016 - 4:05pm
=================================================== Call-For-Papers: 19th ACM/IEEE MSWiM 2016 Malta, Nov 13-17, 2016 ==================================================== IMPORTANT: Submission deadline Extended: Paper registration through EDAS: June 8th, 2016 Paper Submission: June 12th, 2016 =================================================== ------ ACM/IEEE* MSWiM 2016 is the 19th Annual International Conference on Modeling, Analysis and Simulation of Wireless and Mobile Systems. MSWiM is an international forum dedicated to in-depth discussion of Wireless and Mobile systems, networks, algorithms and applications, with an emphasis on rigorous performance evaluation. MSWiM is a highly selective conference with a long track record of publishing innovative ideas and breakthroughs. MSWiM 2016 will be held Malta, Nov 13-17, 2016 Authors are encouraged to submit full papers presenting new research related to the theory or prac
Categories: Incoming News

Philip Wadler: Speaker's Trust removes all trace of Leanne Baghouti

Planet Haskell - Mon, 05/30/2016 - 3:42pm
Leanne Baghouti, a British-Palestinian won her local round of Speaker's Trust "Speak Out" competition with an impassioned talk about Palestinian human rights. Her talk, and all sign that she had won the competition, were later deleted from the competition web site.

A colleague characterised her talk as "full of anti-Semitic and aggressive material from sources in the Middle East". I watched the video, and heard nothing anti-Semitic. It is a word that should be used with care.

Speaker's Trust has released a statement regarding the matter:
“There are two fundamental rules that are made explicit during the training: the speech must have a positive and uplifting message – in fact this is one of the core terms of the agreement with the Jack Petchey Foundation [and] a speaker should never inflame or offend the audience or insult others and this, by definition, means that propaganda is ruled out absolutely from the outset… Speakers Trust and Jack Petchey Foundation judging panel decided unanimously against sending Leanne Mohamad through to the next stage and she will not be speaking at the Grand Final. These were precisely our concerns.”And another:
Our primary duty of care is to the young people we work with and we cannot tolerate any form of insult or abuse. We are concerned and saddened that Leanne’s experience has been less than positive.
Leanne Mohamad is the Redbridge Regional Final winner and there has never been any suggestion that she should be disqualified. Almost 190,000 young people have spoken out over the years on any topic which they feel passionately about and none has ever been banned from the process or silenced.
We are, however, a small charity without the capacity to moderate comments 24 hours a day and it was considered essential to protect Leanne by temporarily suspending the regional video over the bank holiday, until we were able to consult with her school and family.
Of 37 talented regional Champions only fifteen can be voted through to the Grand Final. This selection process took place on Saturday 21st May based on standard judging criteria and without any external influence or input.
The general “rules” of effective public speaking are guidelines to help speakers to create a speech that will connect with a large and diverse audience and every speech was judged on its own merits. At the heart of what we do lies the determination that all of our young speakers, irrespective of background, race or creed, should be able to speak out in a safe and supportive environment.
Categories: Offsite Blogs

Proposal: Add // for Data.Sequence

libraries list - Mon, 05/30/2016 - 2:21pm
BACKGROUND ---------- Data.Array provides (//) for incremental array updates. Data.Sequence lacks this useful functionality. SCOPE ----- Doing this efficiently may require that Data.Sequence access Data.IntMap. (It currently does not.) David Feuer commented: We may need to add some more splitting functions to Data.IntMap, if it supports them, but we probably want to do so anyway to match up with Data.Map. SOLUTIONS ----------- David Feuer offered the following implementation sketch. (See Collect all requested changes into an IntMap, then use something similar to Data.Sequence.splitMap with Data.IntMap.split to spread them through the tree. David Feuer commented: splitMap itself is overkill, because we'll likely be able to preserve whole subtrees. WHAT MIGHT BREAK ---------------- No anticipated breakage.
Categories: Offsite Discussion

configurable mapping between data declarations andgiven XML schema?

haskell-cafe - Mon, 05/30/2016 - 11:04am
Dear Cafe, I have a legacy XML schema, and some Haskell data declarations. I want to map bidirectionally between XML documents and data. I absolutely cannot change the schema. I could change the data declarations, but it would not help much, since I don't think there is any form of declaring data that would allow me to derive the transformations generically. So, I have a mess of ad-hoc transformations. What could be done about this? I think I need "generic with customization". More detail: Comments appreciated. - J.W.
Categories: Offsite Discussion

Philip Wadler: Omar Barghouti banned by Israel for travelling for supporting BDS

Planet Haskell - Mon, 05/30/2016 - 3:35am
Omar Barghouti, a Palestinian living in Israel, has been denied the right to travel, for no reason other than that he is an effective supporter of BDS (Boycott, Divestment, Sanctions). Glenn Greenwald interviews him in The Intercept.
Despite having lived in Israel for 22 years with no criminal record of any kind, Omar Barghouti (above) was this week denied the right to travel outside the country. As one of the pioneers of the increasingly powerful movement to impose boycotts, sanctions, and divestment measures (BDS) on Israel, Barghouti, an articulate, English-speaking activist, has frequently traveled around the world advocating his position. The Israeli government’s refusal to allow him to travel is obviously intended to suppress his speech and activism. Prime Minister Benjamin Netanyahu was one of the world leaders who traveled last year to Paris to participate in that city’s “free speech rally.” ...

Sarah Leah Whitson of Human Rights Watch told the Electronic Intifada that “Israel’s refusal to renew Barghouti’s travel document appears to be an effort to punish him for exercising his right to engage in peaceful, political activism, using its arsenal of bureaucratic control over Palestinian lives.” She added: “Israel has used this sort of control to arbitrarily ban many Palestinians from traveling, as well as to ban international human rights monitors, journalists, and activists from entering Israel and the occupied Palestinian territories.” ...

Barghouti: Many people are realizing that Israel is a regime of occupation, settler colonialism, and apartheid and are therefore taking action to hold it to account to international law. Israel is realizing that companies are abandoning their projects in Israel that violate international law, pension funds are doing the same, major artists are refusing to play Tel Aviv, as Sun City was boycotted during apartheid South Africa. ...

We live in a country where racism and racial incitement against indigenous Palestinians has grown tremendously into the Israeli mainstream. It has really become mainstream today to be very openly racist against Palestinians. Many settlers and hard-right-wing Israelis are taking matters into their own hands – completely supported by the state – and attacking Palestinians.
Categories: Offsite Blogs

Discussion: Add total indexing function to Data.Sequence

libraries list - Sun, 05/29/2016 - 10:21pm
Data.Sequence offers index :: Seq a -> Int -> a which throws an error if the index is out of range. I'd like to add something like indexMay :: Seq a -> Int -> Maybe a Aside from the safety factor, indexMay would offer a way to ensure the indexing occurs at a particular time. Much like Data.Vector.indexM, this can help prevent memory leaks. In fact, an analogue of indexM can be implemented in terms of indexMay: indexM :: Applicative m => Seq a -> Int -> m a indexM xs i = case xs `indexMay` i of Nothing -> error "indexM: index out of range" Just x -> pure x
Categories: Offsite Discussion

Proposal: Add insertAt to Data.Sequence

libraries list - Sun, 05/29/2016 - 9:32pm
I've come up with an implementation of insertAt :: Int -> a -> Seq a -> Seq a
Categories: Offsite Discussion

JSON parser that returns the rest of the string thatwas not used

haskell-cafe - Sun, 05/29/2016 - 6:09pm
As someone who spent many years putting data in S-expression format, it seems natural to me to write multiple S-expressions (or JSON objects) to a file, and expect a reader to be able to read them back one at a time. This seems comparatively uncommon in the JSON world. Accordingly, it looks like the most popular JSON parsing lib, Aeson, doesn't directly provide this functionality. Functions like decode just return a "Maybe a", not the left-over input, meaning that you would need to somehow split up your multi-object file before attempting to parse, which is annoying and error prone. It looks like maybe you can get Aeson to do what I want by dropping down to the attoparsec layer and messing with IResult. But is there a better way to do this? Would this be a good convenience routine to add to aeson in a PR? I.e. would anyone else use this? Thanks, -Ryan _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >
Categories: Offsite Discussion

Testing for different dependency versions?

haskell-cafe - Sun, 05/29/2016 - 5:33am
Hi, I was wondering: what is the most practical way to go about testing or otherwise determining if your packaged library works with other dependency versions? E.g., cabal init specified base 4.6 because that is what happens to be installed on my Debian Jessie system, but that wouldn't even build on hackage.
Categories: Offsite Discussion

Quantum Programming EDSLs other than Quipper

haskell-cafe - Sat, 05/28/2016 - 4:04pm
Hi all, Quipper [1] is a well-known library that provides an EDSL for writing and simulating quantum algorithms in Haskell. I was wondering if there was any other attempt to design an EDSL in Haskell to express quantum algorithms. In particular, Quipper is not able to statically ensure that the algorithm written is physically meaningful, as one could violate the "non-cloning property", for example (a qubit cannot be copied, for those who do not speak quantumly). Violations like this are detected at runtime when simulating the algorithm or when producing the corresponding circuit as output. Authors of Quipper already said that some of those properties could be possible to check “if Haskell had linear types”. The point is that Haskell's support for dependently typed programming has grown quite a lot in the last years, and I think that, at least theoretically, something better can now be achieved. So do anyone know any more recent attempt to express quantum computations in an Haskell EDSL that levera
Categories: Offsite Discussion

Reminder: Functional High-Performance Computing 2016

haskell-cafe - Sat, 05/28/2016 - 3:58pm
Dear colleagues, A reminder of the approaching paper deadline (10th June) for FHPC 2016 ... ====================================================================== CALL FOR PAPERS FHPC 2016 The 5th ACM SIGPLAN Workshop on Functional High-Performance Computing Nara, Japan September 22, 2016 Co-located with the International Conference on Functional Programming (ICFP 2016) Submission Deadline: Friday, 10 June, 2016 (anywhere on earth) ====================================================================== The FHPC workshop aims at bringing together researchers exploring uses of functional (or more generally, declarative or high-level) programming technology in application domains where high performance is essential. The aim of the meeting is to enable sharing of results, experien
Categories: Offsite Discussion

Higher order type functions

haskell-cafe - Sat, 05/28/2016 - 1:22am
Hi folks! I'm playing with GHC 8 and have the following type family definend: type family InsertSorted (gt :: k -> k -> Bool) (a :: k) (xs :: [k]) :: [k] where InsertSorted f a '[] = '[a] InsertSorted f a (x ': xs) = If (f a x) (x ': InsertSorted f a xs) (a ': x ': xs) With appropriate type functions, I can evaluate this in GHCi with `:kind!` and it does what I want: λ> :kind! InsertSorted GreaterThan One '[Two, Four] InsertSorted GreaterThan One '[Two, Four] :: [Face] = '['One, 'Two, 'Four] λ> :kind! InsertSorted GreaterThan Queen '[Two, Four] InsertSorted GreaterThan Queen '[Two, Four] :: [Face] = '['Two, 'Four, 'Queen] However, I get an error if I try to use this in a type signature. This code: data Deck (b :: [k]) where Empty :: Deck '[] (:::) :: CardT s f -> Deck xs -> Deck (InsertSorted GreaterThan '(s, f) xs) gives me this error: • The type family ‘GreaterThan’ should have 2 arguments, but has been given none • In the definition of data con
Categories: Offsite Discussion

Announce: Haskell Platform 8.0.1

General haskell list - Fri, 05/27/2016 - 8:14pm
On behalf of the Haskell Platform team, I'm happy to announce the release of Haskell Platform 8.0.1 Now available at This platform includes features initially planned in the "Improving the 'Get Haskell Experience'" proposal of June 2015. [1] * Minimal as well as Full distributions. The minimal distribution only includes GHC core libraries as well as additional tools. This is now the recommended distribution. The Full distribution remains an option for those who want a one-step installer with the broader set of platform libraries preinstalled. * Inclusion of the Stack tool for developing Haskell projects [2] Other highlights of this release include the following * The new cabal 1.24 including the great "new-build" tech preview of nix-like build dependency management [3] * On windows, a cabal/msys setup that allows packages such as "network" to build "out of the box". (almost*) * At long last, prebuilt Linux 32 bit platform installers Changes to Conte
Categories: Incoming News

Proposal: Add `maxOn` and `minOn` functions to Data.Ord

libraries list - Fri, 05/27/2016 - 7:51pm
I think these are useful in general, and that they would make a good addition to `Data.Ord`. The names are inspired by `sortOn`. Definitions: ``` minOn :: Ord b => (a -> b) -> a -> a -> a minOn f x y = case comparing f x y of LT -> x _ -> y maxOn :: Ord b => (a -> b) -> a -> a -> a maxOn f x y = case comparing f x y of GT -> x _ -> y ``` These don't need to be the exact definitions, but they convey the semantics I'm looking for. _______________________________________________ Libraries mailing list Libraries< at >
Categories: Offsite Discussion

read "2" in a "void" context?

haskell-cafe - Fri, 05/27/2016 - 7:28pm
Hi fellow Haskellers! If I bring up ghci and evaluate `read 2` I get the error " no parse" GHCi, version 7.10.2: :? for help Prelude> read "2" *** Exception: no parse Exactly how is this message coming about? I understand that `read` needs a return type in order to determine which type class instance to run. So, in this case, which type is `read` being asked to return? Thanks, Erik _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >
Categories: Offsite Discussion

Stefan Jacholke: Hello Blockly

Planet Haskell - Fri, 05/27/2016 - 6:00pm

Officially, HSOC projects start from the 13th June. This provides time to do some research. Today I decided to take a look at Blockly.

Setting up Blockly is rather straightforward. I cloned Blockly as a git submodule. I created a simple HTML page with a Blockly canvas. Setting up Blockly involves creating a static sized div and loading the javascript. Later I will set it up as a resizable workspace. Blockly comes with a javascript CodeGen, later I will have to implement a Haskell/CodeWorld CodeGen for the project.


Following the advice on the README I created a new codeworld Linux user account and went on to set up CodeWorld. The current build script for CodeWorld covers the zypper, apt-get and yum package managers. Running Arch I’ve got pacman. I already had most the required packages (git, zlib, ncurses, gcc, gmp, patch, autoconf, automake, openssl).

What I was missing was

pacman -S npm nodejs

I also had GHC 7.10.3 and cabal already installed.

Installing GHCJS:

git clone cabal install ./ghcjs ghcjs-boot

and also ghcjs-dom

cabal install ghcjs-dom

I don’t have the cabal bin in my PATH so I needed:

export PATH=/home/codeworld/.cabal/bin:$PATH

before running the standard CodeWorld build script. After running, started up the web server. Everything ran fine, minus saving projects, which I did not set up.


I wanted to play around with GHCJS as well, having never used it before. Documentation was rather scarce but I managed to put together a simple hello world application; with a compiled js file of about 43KLOC.

A lot of the sample programs found were using an old version of GHCJS-DOM. I will return to GHCJS when I start programming on the project.

Testing, testing

My goal today was to quickly set a simple page containing Blockly and a CodeWorld application as a simple test.

I created a simple HTML file with Bootstrap for minimal styling, added Blockly and an iframe for running a standard CodeWorld application.

Setting up the example Snap site comprises of:

module Main where import Control.Applicative import Snap.Core import Snap.Http.Server import Snap.Util.FileServe import Snap.Util.FileUploads import System.Directory import System.FilePath main :: IO () main = quickHttpServe site site :: Snap () site = ifTop (writeBS "hello world") <|> route [ ("foo", writeBS "bar") ,("echo/:echoparam", echoHandler) ] <|> serveDirectory "web" echoHandler :: Snap () echoHandler = do param <- getParam "echoparam" maybe (writeBS "must specify echoparam in URL") writeBS param

With the server looking for a page to serve from “web” if it does not match any of the routes.

I originally wanted to send a code sample from the FunBlocks page to the locally hosted CodeWorld server with a XMLHttpRequest, however, this I could not do as the FunBlocks site and CodeWorld server were on different ports, thus I ended up receiving

XMLHttpRequest cannot load. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin is therefore not allowed access

as an error.

Not wanting to mess around with headers I decided to just copy over the codeworld-server files and serve the same resources, with the new index page as an addition.

I actually only wanted the compile and run features for this simple test. So currently the server is exactly the same as the codeworld-server with a modified codeworld.js and custom index. This makes things easy as FunBlocks can be hosted together with CodeWorld later, just on a different page. I would enjoy having a solid implementation for the language.

Any thoughts on a good approach to take with this are welcome.

Type checking and an intermediate form.

The flow of the language will be something similar to:

Blocks -> Intermediate code representation -> CodeGen

The intermediate code representation should cover a basic set of features of Haskell, enough to be able to generate valid CodeWorld applications. User friendliness is also a concern, since the project is educationally focussed.

Blocks should snap properly and maybe display suitable error messages otherwise. For this to occur however, some form of type checking will have to be implemented.

I gathered some resources which I will look at later:

The easiest might be to rely on Hint to type check Haskell expressions and do some backtracing, this avoids having to implement type inference. Though if time allows I might be tempted to do a proper implementation.

Most CodeWorld functions are monomorphic and have concrete types, with some exceptions (simulations). So some part of CodeWorld can be implemented without worrying too much about type checking, however, I would enjoy having a solid implementation for the language.

Any thoughts on a good approach to take with this are welcome.

Categories: Offsite Blogs