Donald Bruce Stewart | 1 May 2006 07:27
Picon
Picon
Favicon
Gravatar

Haskell Weekly News: May 1, 2006


                    Haskell Weekly News: May 1, 2006

   Welcome to issue 34 of HWN, a weekly newsletter covering developments
   in the Haskell community. Each Monday, new editions are posted to
   [1]the Haskell mailing list as well as to [2]the Haskell Sequence and
   [3]Planet Haskell. [4]RSS is also available, and headlines appear on
   [5]haskell.org.

   1. http://www.haskell.org/mailman/listinfo/haskell
   2. http://sequence.complete.org/
   3. http://planet.haskell.org/
   4. http://sequence.complete.org/node/feed
   5. http://haskell.org/

   A double-plus episode this week, as last week's HWN went missing
   during a furious hack fest.

Announcements

     * GHC 6.4.2. Simon Marlow [6]announced the release of the Glasgow
       Haskell Compiler, version 6.4.2. GHC is a state-of-the-art
       programming suite for Haskell. Included is an optimising compiler
       generating good code for a variety of platforms, together with an
       interactive system for convenient, quick development. The
       distribution includes space and time profiling facilities, a large
       collection of libraries, and support for various language
       extensions, including concurrency, exceptions, and foreign
       language interfaces (C, whatever). GHC is distributed under a
       BSD-style open source license.
(Continue reading)

Bulat Ziganshin | 1 May 2006 10:47
Picon

Fwd: Re[2]: speed of Binary serialization libraries


continuing theme of fast serialization library, i should say that this
library, Streams, also implements much faster general (text) I/O.
below is it's results comparing to well-known Handles:

===8<==============Original message text===============
> Do you have a URL or darcs repository?

http://freearc.narod.ru/Streams.tar.gz
http://haskell.org/haskellwiki/Library/Streams - docs

AltBinary is not yet documented, but al least you can do

import Data.AltBinary
import Data.Binary.ByteAligned

and use the well-known NewBinary (GHC Binary) interface with
openBinMem, get, put_ and all other functions.

One more Streams-advertizing is the following table of text I/O
speeds. It constructed, again, using 100 mb in each test. Strings I/O
was tested using 15-char and 80-char lines (see conclusion at the end):

Handle:
vPutChar: 150.336 secs (user: 566.974 secs)
vGetChar: 100.905 secs (user: 92.864 secs)
vPutStrLn15: 34.310 secs (user: 31.165 secs)
vGetLine15 : 18.397 secs (user: 16.914 secs)
vPutStrLn80: 9.874 secs (user: 8.843 secs)
vGetLine80 : 10.955 secs (user: 9.974 secs)
(Continue reading)

Santiago Escobar | 1 May 2006 23:36
Picon

CFP: 2nd Int'l Workshop on Automated Specification and Verification of Web Systems (WWV'06)

       [ We apologize for multiple copies ]

*******************************************************************

     2nd International Workshop on Automated
          Specification and Verification
               of Web Systems (WWV'06)

            Cyprus, November 15-19, 2006
               (Track of ISoLA 2006)

      http://www.dsic.upv.es/workshops/wwv06

*******************************************************************

SCOPE

The  increased  complexity  of Web sites and the explosive growth of
Web-based applications has turned their design and construction into
a  challenging problem. Nowadays, many companies have diverted their
Web   sites   into   interactive,   completely-automated,  Web-based
applications (such  as  Amazon, on-line banking, or travel agencies)
with  a  high complexity that requires appropriate specification and
verification  techniques and tools. Systematic, formal approaches to
the  analysis  and  verification  can  address  the problems of this
particular  domain  with  automated  and  reliable  tools  that also
incorporate semantic aspects.

We solicit paper on formal methods and techniques applied to Web
sites, Web services or Web-based applications, such as:
(Continue reading)

Bulat Ziganshin | 2 May 2006 10:15
Picon

Optimizing locking with MVars

Hello haskell,

Main reason of slowness of existing Handle-based I/O in GHC is locking
around each operation. it is especially bad for simple char-at-a-time
I/O where 99% of time spent on locking and unlocking.

To be exact, on my CPU, hPutChar for 100mb file requires 150 seconds,
while hGetChar for the same file is "only" 100 seconds long. it seems
that former use 3 locking operations and later 2 ones, because my own
vGetChar/vPutChar implementations both requires 52 seconds, of those
only about one second is real work and rest is just `withMVar`
expenses.

Until now, i thought that this 0.5 ms (about 1000 primitive CPU
operations) on each withMVar is pure time required to perform
takeMVar+putMVar operations. But yesterday i investigated this problem
deeper and results was amazing!

First, i just made local copy of `withMVar` and added INLINE to it:

import Control.Exception as Exception
{-# INLINE inlinedWithMVar #-}
inlinedWithMVar :: MVar a -> (a -> IO b) -> IO b
inlinedWithMVar m io =
  block $ do
    a <- takeMVar m
    b <- Exception.catch (unblock (io a))
            (\e -> do putMVar m a; throw e)
    putMVar m a
    return b
(Continue reading)

J.N. Oliveira | 2 May 2006 10:21
Picon
Favicon

Call for papers: FM-Ed'06 - Formal Methods in the Teaching Lab


Call for Papers -- Submission deadline: June 9, 2006

                              FORMAL METHODS IN THE TEACHING LAB
                 Examples, Cases, Assignments and Projects Enhancing Formal Methods Education

                                http://www.di.uminho.pt/FME-SoE/FMEd06/

                             A Workshop at the Formal Methods 2006 Symposium
                                  Workshop: Saturday, August 26, 2006
                                    Symposium: August 21 - 27, 2006
                              McMaster University, Hamilton, Ontario, Canada

I. ORGANIZATION

This workshop is organized by the Formal Methods Europe Subgroup on Education.

        Dines Bjørner (JAIST, Japan)
        Eerke Boiten (University of Kent, UK)
        Raymond Boute (Universiteit Gent, Belgium)
        Andrew Butterfield (Trinity College, Dublin)
        John Fitzgerald (University of Newcastle upon Tyne, UK)
        Randolph Johnson
        Steve King (University of York, UK)
        Peter Lucas
        Michael Mac an Airchinnigh (Trinity College, Dublin)
        Dino Mandrioli (Politecnico di Milano, Italy)
        Andrew Martin (Oxford University, UK)
        José Oliveira (Universidade do Minho, Portugal) -- Convenor
        Kees Pronk (Technische Universiteit Delft, NL)
(Continue reading)

David House | 2 May 2006 22:36
Picon
Gravatar

(GHC) Boot files and instance declarations

Hi all. A quick bootfiles question.

The GHC docs specify not to put instance decls in bootfiles. However,
what if i need to? For example, say I have a module A where I'm
importing a module B with the {-# SOURCE #-} pragma. Module A needs to
know that the types in module B are instances of some typeclasses
(instance declarations for which are given in module B). How would I
manage this?

Thanks in advance.

--
-David House, dmhouse <at> gmail.com, http://xmouse.ithium.net
John Meacham | 3 May 2006 00:37
Favicon

Re: Optimizing locking with MVars

On Tue, May 02, 2006 at 12:15:20PM +0400, Bulat Ziganshin wrote:
> Second, i've developed my own simplified version of this procedure.
> Here i should say that my library uses "MVar ()" field to hold lock
> and separate immutable data field with actual data locked:
> 
> data WithLocking h = WithLocking h !(MVar ())

This reminds me, I wonder if we should have an MVar varient that is
_just_ for locking, it would have no separate take and put primitives,
just a withLock, enforcing the restriction that the thread that took the
lock is the same one that will return it.

this would allow standard priority inversion reduction techniques to be
used and could signifigantly mitigate the problem of accidentally
performing a long pure evaluation while holding a lock. when another
thread comes along that needs a lock, it will give its CPU time to the
thread holding it so it can finish up its long computation.

with MVars, you never know whether an MVar is being used for simple
locking or as an inter-thread communication mechanism.

        John

--

-- 
John Meacham - ⑆repetae.net⑆john⑈
Ralf Lammel | 3 May 2006 00:39
Picon
Favicon

Last call for papers: RULE-BASED PROGRAMMING 2006


RULE'06, 7th International Workshop on Rule-Based Programming, 11th August, 2006, Seattle, USA, A
Satellite Event of RTA 
http://www.dcs.kcl.ac.uk/events/RULE06/

________________________________________

IMPORTANT DATES 

- 14th May, 2006 Deadline for electronic submission of papers
- 15th June, 2006 Notification of acceptance of papers
- 30th June, 2006 Deadline for final versions of accepted papers
- 11th August, 2006 Workshop
________________________________________

INVITED SPEAKERS 

Joint RULE and WRS keynote speakers: 
- Dick Kieburtz, OHSU/OGI School of Science & Engineering 
- Claude Kirchner, INRIA and LORIA
________________________________________

RULE-BASED PROGRAMMING

The rule-based programming paradigm is characterized by the repeated, localized transformation of a
data object such as a term, graph, proof, constraint store, etc. The transformations are described by
rules which separate the description of the object to be replaced (the pattern) from the calculation of
the replacement. Optionally, rules can have further conditions that restrict their applicability. The
transformations are controlled by explicit or implicit strategies. 
The basic concepts of rule-based programming appear throughout computer science, from theoretical
(Continue reading)

Bulat Ziganshin | 3 May 2006 09:26
Picon

Re[2]: Optimizing locking with MVars

Hello John,

Wednesday, May 3, 2006, 2:37:03 AM, you wrote:

> This reminds me, I wonder if we should have an MVar varient that is
> _just_ for locking, it would have no separate take and put primitives,
> just a withLock, enforcing the restriction that the thread that took the
> lock is the same one that will return it.

to be exact, i has the following definitions, which uses class to
define 'lock' operation and therefore allow alternative
implementations in future without need to change application code that
uses this operation:

> data WithLocking h = WithLocking h !(MVar ())
> 
> -- | Add lock to object to ensure its proper use in concurrent threads
> addLocking h = do
>     mvar <- newMVar ()
>     return (WithLocking h mvar)
> 
> -- | Run `action` with locked version of object `h`
> withLocking :: h -> (WithLocking h -> IO a) -> IO a
> withLocking h action = do
>     addLocking h >>= action
> 
> -- | Define class of locking implementations, where 'lh' holds lock around 'h'
> class Locking lh h | lh->h where
>     -- | Perform `action` while exclusively locking wrapped object
>     lock :: lh -> (h->IO a) -> IO a
(Continue reading)

Malcolm Wallace | 3 May 2006 18:42
Picon

ANNOUNCE: hmake-3.11

			hmake - 3.11
			------------

This announcement is for a bug-fix release of 'hmake', the
compiler-independent project-building tool for Haskell programs.  It
automates recompilation analysis, based on import declarations in your
files, to rebuild only those modules that are impacted by a change.  It
is rather like ghc's --make mode, but faster, less memory intensive, and
it works with any compiler (e.g. hbc, nhc98).  hmake also knows about
preprocessors such as Happy, Alex, c2hs, gh, and Hat, and does the right
things with modules that need them.

This release is essentially just a refresh to counter bit-rot.

  * New: the #! runhs script interpreter.
  * Bugfix: now finds dependency B with explicit braces in
            module A where { import B; ... }
  * Bugfixes: for compatibility problems with gcc-4.0.
  * Re-organised the internal cpphs library.

The webpage is at

    http://haskell.org/hmake

Regards,
    Malcolm

Gmane