Alex Ferguson wrote:
>
> What's the state of the art as regards calling Haskell functions from
> 'the outside world'? I note that Haskell Direct has this in its
> manifesto, but says "currently unsupported". Does that mean a moderate
> size black hole at the centre of something still potentiall
that function. Perhaps thread-safety can be
further broken down into two different types?
I'm getting the feeling that we may be opening Pandora's Box here.
Surely, there must be a more elegant solution that resolves all of these
problems. If I come up with it, I'll let you know. :)
- Michael Hobbs
utput variable names. Thus, it
redeclares the same variable names twice. Try:
> %fun mirror :: Polar -> Polar
> %call (< polarToCart / cartToPolar > (int x) (int y))
> %code x_inv = -x;
> % y_inv = -y;
> %result (< polarToCart / cartToPolar > (int x_inv) (int y_inv))
- Michael Hobbs
"Manuel M. T. Chakravarty" wrote:
>
> Michael Hobbs <[EMAIL PROTECTED]> wrote,
>
> > I don't think that these three FFI types are enough to cover *all* of
> > the bases regarding callbacks, blocking, and thread-safety.
>
> My point here is that,
Since we're on the topic of the mailing list, has anyone else realized
that the archives are less-than-complete? For instance, most all of
Simon Marlow's recent emails are not listed there.
- Michael Hobbs
In the short term, you can do what I do, use a combination of IORef and
unsafePerformIO to store the ThreadId into a "global variable". I try
not to use this too much though, since it does break down the purely
functional aspect of Haskell.
George Russell wrote:
>
> Yes, it's me again. Could th
l execute serially. I haven't thought enough
about it to come up with a concrete solution. If this is good enough,
I'll see if I can noodle on it some more.
- Michael Hobbs
such a function would require an
unsafePerformIO if it is to be used globally.
...or querying the system time, down to the nanosecond...
- Michael Hobbs
Michael Hobbs wrote:
> (We're assuming that we can't lock them both simultaneously)
I knew I should have read the literature on deadlock avoidance before
posting that message. :-/ In fact, I should have used the word
"atomically" above instead of "simultaneously&
Michael Hobbs wrote:
> Here's my stab at it. (NB: This is simply an off-the-cuff attempt. It
> looks like it should work right, but it is far from rigorously tested or
> analyzed.)
I discovered a path that would cause a deadlock in that code as well.
However, I have a chang
George Russell wrote:
> Does the phrase "Dining Philosophers Problem" ring a bell with anyone?
And AFAIK, the existing solutions to that problem requires a knowledge
of who all the philosophers are and what they are attempting to do. That
gets back to the issue of having a global value that store
11 matches
Mail list logo