Conal Elliott | 2 Dec 2007 21:03
Gravatar

IVars

what became of (assign-once) IVars?  afaict, they were in concurrent haskell and now aren't.

_______________________________________________
Haskell mailing list
Haskell <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell
Lennart Augustsson | 3 Dec 2007 09:29
Favicon
Gravatar

Re: IVars

You can make them from MVars.

On Dec 2, 2007 8:03 PM, Conal Elliott <conal <at> conal.net> wrote:
what became of (assign-once) IVars?  afaict, they were in concurrent haskell and now aren't.

_______________________________________________
Haskell mailing list
Haskell <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell


_______________________________________________
Haskell mailing list
Haskell <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell
John Hughes | 3 Dec 2007 12:31
Picon
Picon

Jobs in Functional Programming event at Chalmers

I’m proud to announce that the first ”Jobs in Functional Programming” recruitment evening will be held at Chalmers University on the 14th of December. As far as I am aware, this is the first time such an event has been held anywhere in the world. While we’re holding the event at Chalmers because we have many skilled functional programmers among our students, it is of course open to anyone who would like to take part. All the details can be found at www.jobs-in-fp.org.

 

Welcome to what promises to be a very exciting event!

 

John Hughes

_______________________________________________
Haskell mailing list
Haskell <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell
Conal Elliott | 4 Dec 2007 07:25
Gravatar

Re: IVars

Oh.  Simple enough.  Thanks.

Another question:  why the IO in readIVar :: IVar a -> IO a, instead of just readIVar :: IVar a -> a?  After all, won't readIVar iv yield the same result (eventually) every time it's called?

On Dec 3, 2007 12:29 AM, Lennart Augustsson <lennart <at> augustsson.net> wrote:
You can make them from MVars.

On Dec 2, 2007 8:03 PM, Conal Elliott <conal <at> conal.net> wrote:
what became of (assign-once) IVars?  afaict, they were in concurrent haskell and now aren't.

_______________________________________________
Haskell mailing list
Haskell <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell



_______________________________________________
Haskell mailing list
Haskell <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell
Lennart Augustsson | 4 Dec 2007 09:19
Favicon
Gravatar

Re: IVars

Good question.  That must be a matter of taste, because as you say the read will always produce the same result.  But it sill is a bit of a strange operation.

  -- Lennart

On Dec 4, 2007 6:25 AM, Conal Elliott < conal <at> conal.net> wrote:
Oh.  Simple enough.  Thanks.

Another question:  why the IO in readIVar :: IVar a -> IO a, instead of just readIVar :: IVar a -> a?  After all, won't readIVar iv yield the same result (eventually) every time it's called?


On Dec 3, 2007 12:29 AM, Lennart Augustsson <lennart <at> augustsson.net> wrote:
You can make them from MVars.

On Dec 2, 2007 8:03 PM, Conal Elliott <conal <at> conal.net> wrote:
what became of (assign-once) IVars?  afaict, they were in concurrent haskell and now aren't.

_______________________________________________
Haskell mailing list
Haskell <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell




_______________________________________________
Haskell mailing list
Haskell <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell


_______________________________________________
Haskell mailing list
Haskell <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell
Simon Peyton-Jones | 4 Dec 2007 09:25
Picon
Favicon
Gravatar

RE: IVars

But since the read may block, it matters *when* you perform it.  For example if you print “Hello” and then read the IVar, you’ll block after printing; but if you read the IVar and then print, the print won’t come out.  If the operation was pure (no IO) then you’d have a lot less control over when it happened.

 

Simon

 

From: haskell-bounces <at> haskell.org [mailto:haskell-bounces <at> haskell.org] On Behalf Of Lennart Augustsson
Sent: 04 December 2007 08:19
To: Conal Elliott
Cc: haskell <at> haskell.org
Subject: Re: [Haskell] IVars

 

Good question.  That must be a matter of taste, because as you say the read will always produce the same result.  But it sill is a bit of a strange operation.

  -- Lennart

On Dec 4, 2007 6:25 AM, Conal Elliott < conal <at> conal.net> wrote:

Oh.  Simple enough.  Thanks.

Another question:  why the IO in readIVar :: IVar a -> IO a, instead of just readIVar :: IVar a -> a?  After all, won't readIVar iv yield the same result (eventually) every time it's called?

 

On Dec 3, 2007 12:29 AM, Lennart Augustsson <lennart <at> augustsson.net> wrote:

You can make them from MVars.

On Dec 2, 2007 8:03 PM, Conal Elliott <conal <at> conal.net> wrote:

what became of (assign-once) IVars?  afaict, they were in concurrent haskell and now aren't.

_______________________________________________
Haskell mailing list
Haskell <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell

 

 


_______________________________________________
Haskell mailing list
Haskell <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell

 

_______________________________________________
Haskell mailing list
Haskell <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell
Andres Loeh | 4 Dec 2007 11:18
Favicon

REMINDER: HC&A Report (December 2007 edition)

Dear Haskellers,

the deadline for the December 2007 edition of the Haskell Communities
and Activities Report is only a few days away. If you haven't already,
please write an entry for your new project, or update your old entry.

Until now, I have about 30 reactions. This is okay compared to the
development of previous editions, but not enough given the number of
announcements on this list during the past months. Also, many regular
contributors haven't yet submitted their entries. Please do!

The deadline is Friday,

   7 December 2007.

If you absolutely cannot make it by Friday, I may be able to give a
few days extension on an individual basis. Please contact me if you
have any questions.

Please mail your entries to <hcar at haskell dot org>, in plain text
or pseudo-(La)TeX format. More information can be found in the
original Call for Contributions at

  http://www.haskell.org/pipermail/haskell/2007-November/019988.html

I look forward to receiving your contributions.

Thanks a lot,

  Andres (current editor)
Rishiyur Nikhil | 4 Dec 2007 13:17
Favicon

Re: Haskell Digest, Vol 52, Issue 1

Simon Peyton-Jones said:

>  But since the read may block, it matters *when* you perform it.
>  For example if you print "Hello" and then read the IVar, you'll
>  block after printing; but if you read the IVar and then print, the
>  print won't come out.  If the operation was pure (no IO) then you'd
>  have a lot less control over when it happened.

But this is true of any expression in a non-strict language.

Why the special treatment of IVars?

Nikhil

_______________________________________________
Haskell mailing list
Haskell <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell
Simon Marlow | 4 Dec 2007 14:53
Picon

Re: Re: Haskell Digest, Vol 52, Issue 1

Rishiyur Nikhil wrote:
> Simon Peyton-Jones said:
> 
>  >  But since the read may block, it matters *when* you perform it.
>  >  For example if you print "Hello" and then read the IVar, you'll
>  >  block after printing; but if you read the IVar and then print, the
>  >  print won't come out.  If the operation was pure (no IO) then you'd
>  >  have a lot less control over when it happened.
> 
> But this is true of any expression in a non-strict language.
> 
> Why the special treatment of IVars?

Consider this:

  do
     x <- newIVar
     let y = readIVar x
     writeIVar x 3
     print y

(I wrote the let to better illustrate the problem, of course you can inline 
y if you want).  Now suppose the compiler decided to evaluate y before the 
writeIVar.  What's to prevent it doing that?  Nothing in the Haskell spec, 
only implementation convention.  GHC will not transform the program in this 
way, because it can have some other undesirable effects.  e.g. see

   http://hackage.haskell.org/trac/ghc/ticket/1592

A pure readIVar would be just like lazy I/O, with similar drawbacks.  With 
readIVar, the effect that lets you observe the evaluation order is 
writeIVar; with hGetContents it is hClose.  Conclusion: it's probably no 
worse than lazy I/O.

Cheers,
	Simon
Peter Morris | 4 Dec 2007 15:42
Picon

Small Workshop: DEPENDENTLY TYPED PROGRAMMING

Hi everybody,

You may be interested to know that we (Thorsten Altenkirch, Tarmo Uustalu 
& myself) are organizing a small TYPES workshop on *Dependently
Typed Programming*. This is a workshop in the tradition of previous
workshops on "Dependent Types in Programming" and "Dependently
Typed Programming" which cover the use of dependent types in
programming in languages like Agda, Cayenne, Coq's CIC, DML,
Epigram, Omega, ...

The workshop is taking place 18-20 February in Nottingham at the NCSL
conference centre. This is on campus but much nicer than the usual
student accommodation!

The invited speakers at the workshop will be Lennart Augustsson and
Xavier Leroy.

For more details see the web page:

http://sneezy.cs.nott.ac.uk/darcs/DTP08

The deadline for talks and registration will be in January. However, if
you know you would like to come we would appreciate it if you could
email us (_ <at> _ dtpnott08 cs.nott.ac.uk) as soon as possible to register
your intentions. We have to promise a certain number of rooms and you
will also ensure you get accommodation at the NCSL.

Cheers,
The Organizers

_______________________________________________
Haskell mailing list
Haskell <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell

Gmane