Re: [Haskell-cafe] Modifying Running Programs

2004-08-01 Thread Donald Bruce Stewart
alex:
> eBay modifies 30k lines of code per week while
> maintaining 99.92% uptime.
> 
> Is there a way to force ghc (or some other Haskell
> implementation) to load new implementations of
> functions without restarting the program?
> 
> Alternatively, is there a way of restarting a
> program with new code without having to
> reconstruct all its in memory state?

You could consider using hs-plugins:
  http://www.cse.unsw.edu.au/~dons/hs-plugins/

the example at the bottom of 
  http://www.cse.unsw.edu.au/~dons/hs-plugins/hs-plugins-Z-H-7.html#node_sec_6.2

shows how to load a new object into a running program, changing an
already existing function on the fly. This uses GHC's dynamic linker
underneath.

-- Don
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Modifying Running Programs

2004-08-01 Thread MR K P SCHUPKE
>Is there a way to force ghc (or some other Haskell
>implementation) to load new implementations of
>functions without restarting the program?

Yes, if you use the dynamic loading interface fron ghci.
Code can be loaded and unloaded at runtime (however I
believe the actual memory is never recovered)

Keean.
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Modifying Running Programs

2004-08-01 Thread S. Alexander Jacobson
eBay modifies 30k lines of code per week while
maintaining 99.92% uptime.

Is there a way to force ghc (or some other Haskell
implementation) to load new implementations of
functions without restarting the program?

Alternatively, is there a way of restarting a
program with new code without having to
reconstruct all its in memory state?

-Alex-


__
S. Alexander Jacobson tel:917-770-6565 http://alexjacobson.com
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Multiprocessor compiling.

2004-08-01 Thread S. Alexander Jacobson
On Sat, 31 Jul 2004, Alastair Reid wrote:
> On Saturday 31 July 2004 09:11, Matthew Roberts wrote:
> > tell us the fundamental reason it is hard to compile Haskell
> > for multiple processor machines - in broad strokes.
>
> Unpredictability, heavy use of heap and overly fine granularity of inherent
> parallelism.

How well does GPH solve the first two of these
problems (I think it solves the third by asking
the programmer for parallel annotations)?

Also, if you use forkOS, doesn't your app
inevitably distribute itself accross multiple
processors if the OS runs threads that way?
If the OS does run threads that way, are you
saying that forkOS is *very* inefficient (or does
the forkOS implementation in e.g. GHC solve the
problems you describe)?

-Alex-

__
S. Alexander Jacobson tel:917-770-6565 http://alexjacobson.com
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe