News aggregator

[Deadline extension] ACM SIGPLAN Erlang Workshop 2013Final Call For Papers

General haskell list - Thu, 06/13/2013 - 5:39pm
Hello, Responding to popular demand, we announce an extension for the Twelfth ACM SIGPLAN Erlang Workshop. New deadline is June 21st. Apologies for any duplicates you may receive. CALL FOR PAPERS ================= Twelfth ACM SIGPLAN Erlang Workshop ----------------------------------------------------------- Boston, Massachusetts, September 28, 2013 Satellite event of the 18th ACM SIGPLAN International Conference on Functional Programming (ICFP 2013) September 25-27, 2013 Erlang is a concurrent, distributed functional programming language aimed at systems with requirements of massive concurrency, soft real time response, fault tolerance, and high availability. It has been available as open source for 15 years, creating a community that actively contributes to its already existing rich set of libraries and applications. Originally created for telecom applications, its usage has spread to other domains including e-commerce, banking, databases, and computer telephony and messaging. Erlang prog
Categories: Incoming News

ANN: custom-hackage

General haskell list - Thu, 06/13/2013 - 4:09pm
https://github.com/nh2/custom-hackage An (almost trivial) script to generate 00-index.tar.gz which is necessary to run your own `remote-repo`. If you are a company that has to rely on that not everybody with a Hackage account can run arbitrary code on your computer at your next cabal install, and you want to make available only select versions of packages (as opposed to a full hackage mirror), this is for you. Just drop your tars into the directory structure, run the script and serve it over HTTP.
Categories: Incoming News

Jan Stolarek: Getting friendly with STG

Planet Haskell - Thu, 06/13/2013 - 2:45pm

I’ve been spending last months on developing GHC. No rocket science so far, just a bit of hacking here and there. The biggest thing I am working on is ticket #6135, which is about changing some of the existing PrimOps to return unboxed Int# instead of Bool. This means that the result of comparing two unboxed values will be either an unboxed 0# or unboxed 1#, instead of a tagged pointer to statically allocated object representing True or False. This modification will allow to write branchless algorithms in Haskell. I promise to write about this one day, but today I want to blog about a different topic.

It so happens that things I’ve been doing in GHC require me to make changes in the code generator. This is a bit challenging for me, because the code generator is something that didn’t interest me much when I started to learn about compilers. Probably the main reason for this is that code generation means dealing with assembly. I’ve been programming for about 16 years and only two languages caused me problems when I tried to learn them. Assembly is one of them1. I have been learning it for one year during my studies and, although I had no problems with understanding the idea behind assembly and writing short snippets of code, writing a larger piece of code always ended up in a headache.

It looks that the time has come to overcome my fear. During last months I’ve been reading a lot of assembly generated by GHC and I even made some attempts at writing assembly code by myself (well, using intrinsics, but I guess that counts). But between Haskell source code and the generated executable there are many intermediate steps. From my observations it seems that many Haskellers have basic knowledge of Core – GHC’s intermediate language. Most have also heard about other two intermediate representations used by GHC – STG and Cmm – but it seems that few people know them, unless they hack the compiler. And since I’m hacking the compiler I should probably have more knowledge about these two representations, right?

There’s a classic paper by Simon Peyton-Jones “Implementing lazy functional languages on stock hardware: the Spineless Tagless G-machine”. It is quite long – 87 pages total – and, being published in 1992, it is mostly out of date. These two things kept me from reading it, although I think that being out of date was only a pretext for me to avoid reading almost 90 pages of text. But, since I need to learn about STG, I finally decided to give it a shot. Reading the paper took my four days. Paper is very well written and in general is an easy read. I was afraid that I might not understand formal description of operational semantics of STG, but it turned out to be well explained so I had no problem with that. The major problem turned out to be the amount of knowledge I had to learn while reading. This resulted in problems with fully understanding last sections of the paper. Not because they are more difficult than the initial ones, but because I didn’t fully remember all the details that were discussed earlier. An important question is which information is not up to date. I’m not yet familiar with the existing implementation, but it seems that many things have changed: the Spineless Tagless G-machine is not tagless any more since the introduction of pointer tagging; curried function are now evaluated using eval/apply convention, while the paper describes push/enter; the paper discusses only compilation to C, while currently C back-end is becoming deprecated in favour of native code generator and LLVM; and finally the layout of closures is now slightly different than the one presented in the paper. I am almost certain that garbage collection is also performed differently. These are the differences that I noticed, which means that really a lot has changed since the publication over 20 years ago. Surprisingly, this doesn’t seem like a big problem, because the most important thing is that the paper presents an idea of how STG works, while the mentioned changes are only not so important details.

So, now that I have a basic idea of how STG works, what comes next? There are a few follow up papers:

  • “The STG runtime system (revised)” – an updated description of STG written in 1999 by Simon Peyton Jones and Simon Marlow. I guess it’s also outdated, but still probably worth reading. It has only 65 pages :)
  • “Making a Fast Curry. Push-Enter vs. Eval-Apply for Higher-order Languages” – this described the mentioned eval/apply and push/enter strategies. Already read this one.
  • “Faster Laziness Using Dynamic Pointer Tagging” – this will tell you why STG is not tagless. Read this one also.

And once I’ll deal with STG I’ll have to learn about Cmm.

  1. In case you’re interested, the other one is Io
Categories: Offsite Blogs

Automating Hackage accounts

haskell-cafe - Thu, 06/13/2013 - 2:44pm
Could we add an HTML form for creating new Hackage accounts? Right now, our community is small enough that emailing ross< at >soi.city.ac.uk and waiting for a manual response isn't too bad of a problem, but as we grow, it would be nice for these sorts of things to be handled by a server, like with RubyGems and NPM.
Categories: Offsite Discussion

ANN: Angel 0.4.2

haskell-cafe - Thu, 06/13/2013 - 6:49am
I'm pleased to announce the release of Angel 0.4.2 and that I have officially taken over maintainership of this project. Thanks to Jamie Turner for starting such a great project and allowing me to take over this project. angel is a daemon that runs and monitors other processes. It is similar to djb's daemontools or the Ruby project god. It's goals are to keep a set of services running, and to facilitate the easy configuration and restart of those services. 0.4.1 added the "count" option to the config to control the number of instances of a particular process to start. 0.4.2 added the "pidfile" option to specify the path of a pidfile to generate when monitoring processes.
Categories: Offsite Discussion

Haskell Platform 2013.2.0.0 64bit.pkg

haskell-cafe - Thu, 06/13/2013 - 6:37am
Today I cleared out everything, using uninstall-hs and rm -rf ~/.cabal ~/Library/Haskell I downloaded Haskell Platform 2013.2.0.0 64bit.pkg and installed it. I was unsuccessful in installing the packages I wanted using cabal install, which suggested running ghc-pkg check. So I cleared out everything again and reinstalled the HP. In the admin account, ghc-pkg check says Warning: haddock-interfaces: /Library/Haskell/ghc-7.6.3/lib/haskell-platform-2013.2.0.0/ doc/html/haskell-platform.haddock doesn't exist or isn't a file Warning: haddock-html: /Library/Haskell/ghc-7.6.3/lib/haskell-platform-2013.2.0.0/ doc/html doesn't exist or isn't a directory
Categories: Offsite Discussion

Testing invasive proposals with Hackager

haskell-cafe - Thu, 06/13/2013 - 2:59am
In many discussions we make guesses about how much code proposals like Functor => Monad would break. You can use https://github.com/dterei/Hackager to build all of Hackage (preferably in a VM). Of course many packages have external dependencies, so I'd like to share the following list of packages to save you some time. (These are the names of packages suited for a Ubuntu 13.04 VM, and with these installed, 2800 packages are successfully built and 1700 failing, so it's quite good coverage. If you find more packages that improve on this, please add them.) acl-dev attr-dev binutils-dev cfitsio-dev expect-dev freeglut3-dev libadns1-dev libalure-dev libasound-dev libaspell-dev libatlas-dev libaugeas-dev libavcodec-dev libavfilter-dev libavformat-dev libavutil-dev libbibutils-dev libbluetooth-dev libbz2-dev libcal3d12-dev libcmph-dev libcrack2-dev libcrypto++-dev libcsound64-dev libctemplate-dev libcurl-dev libcv-dev libcwiid-dev libdb-dev libdevil-dev libdpkg-dev libev-dev libevent-dev libexif-dev libfam-dev
Categories: Offsite Discussion

Nightly builds of GHC HEAD for OS X 10.8

haskell-cafe - Thu, 06/13/2013 - 2:09am
Since mid-January, I’ve been running nightly builds of GHC on my Mac Pro for 10.8.x, 64-bit. I’ve decided to make these results publically downloadable here: http://ghc.newartisans.com. The installer tarballs are in dist, while the fulltest and nofib logs are in logs. According to Jenkins this build takes 8h15m minutes, so I figured this might save others some CPU heat.
Categories: Offsite Discussion

Haskell Weekly News: Issue 270

General haskell list - Thu, 06/13/2013 - 12:32am
Welcome to issue 270 of the HWN, an issue covering crowd-sourced bits of information about Haskell from around the web. This issue covers the week of June 2 to 8, 2013. Quotes of the Week * shachaf: getLine :: IO String contains a String in the same way /bin/ls contains a list of files. Top Reddit Stories * Haskell's HLearn library cross-validates more than 400x faster than Java's Weka due to new monoid based algorithm Domain: izbicki.me, Score: 86, Comments: 13 On Reddit: [1] http://goo.gl/dAoe5 Original: [2] http://goo.gl/dLZJv * FP Complete Launches Haskell in Real World Competition with $1,000 Cash Prize Each Month Domain: fpcomplete.com, Score: 80, Comments: 10 On Reddit: [3] http://goo.gl/FthPX Original: [4] http://goo.gl/pzgQ2 * So I write compilers for a living now Domain: evincarofautumn.blogspot.it, Score: 76, Comments: 69 On Reddit: [5] http://goo.gl/hXp0G Original: [6] http://goo.gl/wMaab * Haskell for all: pipes-pa
Categories: Incoming News

Daniil Frumin: Building GHCJS

Planet Haskell - Thu, 06/13/2013 - 12:05am
1 Intro

In this post I would like to talk about my experience with
bootstrapping GHCJS using the provided facilities ghcjs-build. I
never used tools like Vagrant or Puppet before so all of this was
kinda new to me.

2 Initial installation

GHCJS can’t actually work with vanilla GHC 7.* as it requires to
apply some patches (in order to get JS ffi to work, it adds
JavaScriptFFI language extension among other modifications).

ghcjs-build uses Vagrant (a tool for automatically building and
running work environments) to mange the work environment, so prior to
running GHCJS you need to install vagrant and VirtualBox. It’s actually
a sensible way to tackle a project like that: everyone has similar
work environments, you don’t have to mess with your local GHC
installation. It also make use of Puppet deployment system in
puppetlabs-vcsrepo module for cloning Git repositories.

Currently, there are two ways to start up GHCJS using ghcjs-build

2.1 Using the prebuilt version git clone https://github.com/ghcjs/ghcjs-build.git cd ghcjs-build git checkout prebuilt vagrant up

Using this configuration the following procedures are performed:

  1. Vagrant sets up a 32-bit Ubuntu Precise system (/Note: if this is
    your first time running Vagrant it downloads the 280Mb
    precise32.box file from the Vagrant site/)
  2. Vagrants does some provisioning using Puppet (downloads and
    installs necessary packages)
  3. A 1.4GB archive with ghcjs and other prebuilt tools are downloaded
    and extracted.
2.2 Compiling from source git clone https://github.com/ghcjs/ghcjs-build.git cd ghcjs-build vagrant up

Apart from setting up the box this will

  1. Get the GHC sources from Git HEAD and applies the GHCJS patch.
  2. Get all the necessary packages for ghcjs
  3. Get the latest Cabal from Git HEAD, applies the GHCJS patch and
    build it.
  4. Compile the necessary libraries using ghcjs
  5. Compile ghcjs-examples and its dependencies (it appears that it
    can take a lot of time to compile gtk2hs and gtk2hs’s tools)

Please note, that depending on your computer, you might want to go for
a long walk, enjoy a small book or get a night sleep (assuming you are
not scared by the sound of computer fans).

Apart from being slow, the process of compiling everything from
source is error prone. To give you a taste, last night I was not able
to reproduce a working environment myself, because of some recent
changes in GHC HEAD. The prebuilt version on the other hand is
guaranteed to install correctly.

Hopefully, the GHCJS patches will be merged upstream before the GHC
7.8 is out. That way you won’t need to partake in building GHC from
the source in order to use GHCJS.

2.3 Communicating with the VM

After you’ve finished with the initial setup you should be able just
to

vagrant ssh

in your new vm and start messing around.

ghcjs command is available to you and Vagrant kindly forwards the
3000 port on the VM to the local 3030 port, allowing you to run web
servers like warp on the VM and accessing them locally.

You can access your local project directory under /vagrant in VM:

$ ls /vagrant keys manifests modules outputs README.rst Vagrantfile

However, copying file back-and-forth is not a perfect solution. I
recommend setting up a sshfs filesystem (Note: if you are on OSX,
don’t forget to install fuse4x kernel extension
):

$ vagrant ssh-config Host default HostName 127.0.0.1 User vagrant Port 2222 UserKnownHostsFile /dev/null StrictHostKeyChecking no PasswordAuthentication no IdentityFile "/Users/dan/.vagrant.d/insecure_private_key" IdentitiesOnly yes LogLevel FATAL $ sshfs vagrant@localhost:/home/vagrant ../vm -p2222 -oreconnect,defer_permissions,negative_vncache,volname=ghcjs,IdentityFile=~/.vagrant.d/insecure_private_key $ ls ../vm

When you are done you can just umount ../vm

3 Compiling other packages

Since the diagrams package on Hackage depends on the older version
of base we are going to use the latest version from Git:

mkdir dia; cd dia git clone git://github.com/diagrams/diagrams-core.git cd diagram-core && cabal install && cd .. cabal unpack active cd active-0.1* cat >version.patch <<EOF --- active.cabal 2013-06-12 12:58:40.082914214 +0000 +++ active.cabal.new 2013-06-12 12:58:31.029465815 +0000 @@ -19,7 +19,7 @@ library exposed-modules: Data.Active - build-depends: base >= 4.0 && < 4.7, + build-depends: base >= 4.0 && < 4.8, array >= 0.3 && < 0.5, semigroups >= 0.1 && < 0.10, semigroupoids >= 1.2 && < 3.1, @@ -31,7 +31,7 @@ test-suite active-tests type: exitcode-stdio-1.0 main-is: active-tests.hs - build-depends: base >= 4.0 && < 4.7, + build-depends: base >= 4.0 && < 4.8, array >= 0.3 && < 0.5, semigroups >= 0.1 && < 0.10, semigroupoids >= 1.2 && < 3.1, EOF patch active.cabal < version.patch cabal install cd .. git clone git://github.com/diagrams/diagrams-lib.git cd diagrams-lib && cabal install && cd .. git clone git://github.com/diagrams/diagrams-svg.git cd diagram-svg && cabal install && cd ..

Other packages I had to install already had their Hackage versions
updated.

Now you can try to build a test diagram to see that everything works

module Main where import Diagrams.Prelude import Diagrams.Backend.SVG.CmdLine d :: Diagram SVG R2 d = square 20 # lw 0.5 # fc black # lc green # dashing [0.2,0.2] 0 main = defaultMain (pad 1.1 d)

then you can compile and run it

ghc --make Test.hs ./Test -w 400 -o /vagrant/test.svg

And that’s it!

4 Outro

I would also like to note that we are currently polishing the GHCJS
build process. Luite, especially is working on making ghcjs work (and
run tests) with Travis CI (it take quite a bit of time to build ghcjs
and sometimes travis is timeouting) and I am working on tidying up
the build config.

Stay tuned for more updates.


Tagged: diagrams, ghcjs, haskell, soc
Categories: Offsite Blogs

Reminder: two weeks to submit talks for CUFP 2013

General haskell list - Wed, 06/12/2013 - 8:38pm
This CFP and the form for submitting presentation proposals can be found at: http://cufp.org/2013cfp Commercial Users of Functional Programming 2013 Sponsored by SIGPLAN CUFP 2013 Co-located with ICFP 2013 Boston, MA, United States Sep 22-24 Talk Proposal Submission Deadline: 29 June 2013 The annual CUFP workshop is a place where people can see how others are using functional programming to solve real world problems; where practitioners meet and collaborate; where language designers and users can share ideas about the future of their favorite language; and where one can learn practical techniques and approaches for putting functional programming to work. Giving a CUFP Talk If you have experience using functional languages in a practical setting, we invite you to submit a proposal to give a talk at the workshop. We are looking for both experience reports and in-depth technical talk
Categories: Incoming News

Examples of MVars usage

haskell-cafe - Wed, 06/12/2013 - 8:29pm
Hello, everyone. I am looking for packages on hackage which use MVars extensively. Those which create plenty of MVars -- not just one or two for conditional synchronization or to keep track of a value throughout the program. My purpose is to analyze usage patterns of MVars. Does anybody have any suggestions? So far I have analyzed a few packages: * conjure (0.1) * distributed-process (0.4.2) * distributed-process-p2p (0.1.1.0) * leksah (0.12.1.3) * manatee-core (0.1.1) * urlcheck (0.1.1) Nonetheless, I feel like I still haven't covered a good enough range of usage, since some examples are small, and some use MVars just for a small number of cases, while the heavy lifting is done with STM. And surely because there are only 6 of them. Any suggestion will be very much appreciated. []'s -- Francisco Soares Nt. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Categories: Offsite Discussion

runContId

Haskell on Reddit - Wed, 06/12/2013 - 5:36pm

It seems like most of the time when using the Cont monad, one would eventually end up with the "final result" in the intermediate result, leading to this pattern:

runContId k = runCont k id

Have others observed this as well? Might it be useful for something like this to live in Control.Monad.Trans.Cont?

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

Haskell Weekly News: Issue 270

Haskell on Reddit - Wed, 06/12/2013 - 5:34pm
Categories: Incoming News