Excerpts from Bardur Arantsson's message of Tue Feb 16 23:48:14 +0200 2010:
This cannot be fixed in the sendfile library, it is a
feature of TCP that connections may linger for a long
time unless explicit timeouts are used.
The problem is that the sendfile library *doesn't* wake
up when
I think that GSL does not include linear programming solvers, but in the
GSL home page there is a reference to the GLPK package:
http://www.gnu.org/software/glpk/glpk.html
I have not used it, but it would be very nice to have a simple Haskell
interface to GLPK (or other similar library) in
2010/2/16 Neil Brown nc...@kent.ac.uk:
I had a look at the code for Event (both versions) and Lock (but not the
others just yet) and it seemed fine. If you do lots of calls to waitTimeout
before a set you will accumulate old locks in the list, but that won't cause
any error that I can see, so
Hello folks,
is there an example (simpe or not) for the use of Data.Random.RVarT with an
underlying monad other than Identity, e.g. StateT, ReaderT etc.?
Thx
Torsten
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
2010/2/16 Simon Marlow marlo...@gmail.com:
You might want to take a look at the concurrency part of the GHC test suite:
http://darcs.haskell.org/testsuite/tests/ghc-regress/concurrent/should_run/
Not that we've really solved the problem you're talking about, but you might
get some ideas.
Roel van Dijk wrote:
2010/2/16 Neil Brown nc...@kent.ac.uk:
I had a look at the code for Event (both versions) and Lock (but not the
others just yet) and it seemed fine. If you do lots of calls to waitTimeout
before a set you will accumulate old locks in the list, but that won't cause
any
2010/2/17 Neil Brown nc...@kent.ac.uk:
You don't need to do use ThreadId: MVar has an Eq instance, so you could
make your Lock type derive an Eq instance, and then you can just compare the
Locks to remove it after the timeout occurs (e.g. using delete to take it
out of the list; it should be
I've also discovered something interesting: when I link with the 'threaded'
runtime, but let the program use only one core (with '+RTS -N1'), the
problem disappears. How comes?
The whole thing remains a mystery, because I think what I'm trying to do is
quite common...
Yves Parès wrote:
There
You're probably correct about the dependencies. I have never tried to
compile wxHaskell against GHC 6.12.1
I'm waiting for Haskell Platform to be released to make the required
changes since (working primarily on Windows) I just don't have time to
create a complete GHC 6.12 installation with most
Leon Smith wrote:
Heinrich Apfelmus wrote:
I see no obvious deficiencies. :) Personally, I'd probably structure it like
http://www.haskell.org/haskellwiki/Prime_numbers#Implicit_Heap
This variant, based on the wiki article, is cleaner, slightly
simpler, appears to be just as fast,
Hi
I agree with the sentiments below.
I subscribe to particular lists because of their specialism. The URL
referred to had a tenuous Haskell connection, and definitely not work
the bandwidth consumed. I'm having a difficult enough time trying to
master Haskell without that form of diversion.
Hello,
We would like to announce the release of concurrent-extra [1]. A
library which offers a few extra synchronization primitives. These
primitives are found in the standard libraries of languages like Java
and Python, but not in Haskell.
Quick overview:
* Lock: Enforce exclusive access to a
Hello,
Thanks for the release!
On Wed, Feb 17, 2010 at 03:10:38PM +0100, Roel van Dijk wrote:
* RLock: A lock which can be acquired multiple times by the same
thread. Also known as a reentrant mutex.
In acquire (l. 111), if the lock was already acquired it goes by
| otherwise →
Hi Alex,
this looks very very interesting, gimme some time to figure it. I hope
you'll take questions later ...
Günther
Am 16.02.10 22:34, schrieb Alexander Solla:
On Feb 16, 2010, at 12:48 PM, Alexander Solla wrote:
(Accumulator String)s are (Accumulator value)s for any value. So you
I find myself often writing this pattern:
someFun x y z = ...
fun y z = runFun $ someFun someDefault y z
or, alternatively:
fun y = runFun . someFun someDefault y
The second option approaches the ideal pointfreeness (or pointlessness if
you prefer), but I'd like to go farther:
(...) ::
Sean Leather wrote:
I find myself often writing this pattern:
someFun x y z = ...
fun y z = runFun $ someFun someDefault y z
or, alternatively:
fun y = runFun . someFun someDefault y
I very often write this too (wanting function composition, but with a
two-argument
That signature is the `oo` specs combinator in Data.Aviary:
fun = runFun `oo` someFun someDefault
-md
begin Sean Leather quotation:
I find myself often writing this pattern:
someFun x y z = ...
fun y z = runFun $ someFun someDefault y z
or, alternatively:
fun y = runFun .
Hi,
This literate haskell file was intended to be a quick question about a
problem i have been pondering, but it developed into a short
presentation instead. What i want to know is if there is already
something like this (and suggestions for improvement of course).
{-#LANGUAGE
On 17 February 2010 15:41, Mike Dillon m...@embody.org wrote:
That signature is the `oo` specs combinator in Data.Aviary:
Hi Mike
Thanks - indeed, I was just looking up the thread that covered them a
month or two ago:
http://www.haskell.org/pipermail/haskell-cafe/2009-December/071392.html
I
Am Mittwoch 17 Februar 2010 16:31:16 schrieb Sean Leather:
I find myself often writing this pattern:
someFun x y z = ...
fun y z = runFun $ someFun someDefault y z
or, alternatively:
fun y = runFun . someFun someDefault y
The second option approaches the ideal pointfreeness (or
begin Stephen Tetley quotation:
On 17 February 2010 15:41, Mike Dillon m...@embody.org wrote:
That signature is the `oo` specs combinator in Data.Aviary:
Hi Mike
Thanks - indeed, I was just looking up the thread that covered them a
month or two ago:
On Wed, Feb 17, 2010 at 3:27 PM, Felipe Lessa felipe.le...@gmail.com wrote:
In acquire (l. 111), if the lock was already acquired it goes by
| otherwise → do putMVar mv mb
Lock.acquire lock
So it puts back the information about the owner of the RLock and
On 17 February 2010 16:05, Mike Dillon m...@embody.org wrote:
...
Are you kidding me? I love writing code like this:
o = bunting bunting cardinal thrush blackbird
:)
Hi Mike
Thanks! - it took me a surprising amount of time to get from this
(where I cheated and used an online
The easiest solution is simply to define
unionAll = nub . mergeAll
where
-- specialized definition of nub
nub = map head . groupBy (==)
Talking about the easiest solution, I guess this is a quite easy way of
defining unionAll as well: http://gist.github.com/306782
On Wed, Feb 17, 2010 at 2:36 AM, Taru Karttunen tar...@taruti.net wrote:
Excerpts from Bardur Arantsson's message of Tue Feb 16 23:48:14 +0200 2010:
This cannot be fixed in the sendfile library, it is a
feature of TCP that connections may linger for a long
time unless explicit timeouts
Am Mittwoch 17 Februar 2010 17:46:38 schrieb Ozgur Akgun:
The easiest solution is simply to define
unionAll = nub . mergeAll
where
-- specialized definition of nub
nub = map head . groupBy (==)
Talking about the easiest solution, I guess this is a quite easy
Hello, all!
Can somebody please explain, what is the best way of using CURL with several
threads? I wrote simple client, which tries to authenticate against HTTP
server. With running this client, it starts to eat memory insanely (and I know
this code is far, far away of even being close to be
Ooops I thought the inner lists are possibly of infinite size.
On 17 February 2010 17:16, Daniel Fischer daniel.is.fisc...@web.de wrote:
Am Mittwoch 17 Februar 2010 17:46:38 schrieb Ozgur Akgun:
The easiest solution is simply to define
unionAll = nub . mergeAll
where
Am Mittwoch 17 Februar 2010 18:59:42 schrieb Ozgur Akgun:
Ooops I thought the inner lists are possibly of infinite size.
Both, I think.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Wed, Feb 17, 2010 at 05:11:45PM +0100, Roel van Dijk wrote:
On Wed, Feb 17, 2010 at 3:27 PM, Felipe Lessa felipe.le...@gmail.com wrote:
In release (l. 142) Nothing is put into mv
then do Lock.release lock
putMVar mv Nothing
I'm
Jeremy Shaw wrote:
On Wed, Feb 17, 2010 at 2:36 AM, Taru Karttunen tar...@taruti.net wrote:
So for sendfile, instead of threadWaitWrite we could do:
r - timeout (60 * 10^6) threadWaitWrite
case r of
Nothing - ... -- timed out
(Just ()) - ... -- keep going
For sendfile, a timeout of
What i want to know is if there is already
something like this (and suggestions for improvement of course).
...
Sometimes i find myself needing to associate a constant with a type
or, more precisely, with a type class instance.
I'm not sure if this is what you're looking for, but it
On Wed, Feb 17, 2010 at 07:34:07PM +0200, Eugene Dzhurinsky wrote:
Hopefully, someone could help me in overcoming my ignorance :)
I realized that I can share the same Chan instance over all invocations in
main, and wrap internal function into withCurlDo to ensure only one IO action
gets executed
As far as I can see, you'd use that for systems of linear equalities, but
for systems of linear inequalities with a linear objective function, it's
not suitable. I may be wrong though :)
There's a linear [1] reduction from one problem to the other and vice versa.
[1] The transformation itself
On Wed, Feb 17, 2010 at 16:48, Stephen Tetley wrote:
On 17 February 2010 15:41, Mike Dillon m...@embody.org wrote:
That signature is the `oo` specs combinator in Data.Aviary:
Nice!
I wouldn't recommend writing code that depends on Data.Aviary, but
some of the combinators are often worth
On Wed, Feb 17, 2010 at 1:27 PM, Bardur Arantsson s...@scientician.netwrote:
(Obviously, if people are using sendfile with something other than
happstack,
it does not help them, but it sounds like trying to fix things in
sendfile is misguided anyway.)
How so? As a user I expect
Alberto Ruiz wrote:
I think that GSL does not include linear programming solvers, but in the
GSL home page there is a reference to the GLPK package:
http://www.gnu.org/software/glpk/glpk.html
I have not used it, but it would be very nice to have a simple Haskell
interface to GLPK (or
Yves Parès wrote:
I've also discovered something interesting: when I link with the
'threaded' runtime, but let the program use only one core (with '+RTS
-N1'), the problem disappears. How comes?
The whole thing remains a mystery, because I think what I'm trying to do
is quite common...
Interesting. Do you have any details on this? It seems like it would be hard
to express system of linear inequalities as a finite system of linear
equations.
Thanks,
Dan
2010/2/17 Matthias Görgens matthias.goerg...@googlemail.com
As far as I can see, you'd use that for systems of linear
Hi Sean
Thanks for the comment.
David Menendez pointed out on the other thread that they generalize
nicely to functors:
http://www.haskell.org/pipermail/haskell-cafe/2009-December/071428.html
Typographically they are a pun on ML's composition operator (o), if
you don't define o - (aka 'monocle'
On Sunday 14 February 2010 17:02:36 Henk-Jan van Tuyl wrote:
The symbols that are not specified in a library can be found here:
http://www.haskell.org/haskellwiki/Keywords
Hoogle used to show links to this page, when a keyword was searched, but
not anymore.
This isn't Haskell 98 only, is
Okay! So under UNIX, haskell threaded runtime uses pthreads, if I well
understood.
To sum up, in order to achieve what I want, I have no other choice than
compiling with '-threading' and importing as 'safe' the functions which can
make a 'sleep'.
Thanks!
Ben Franksen wrote:
Yves Parès
On Wed, Feb 17, 2010 at 6:58 AM, Heinrich Apfelmus
apfel...@quantentunnel.de wrote:
Ah, I meant to use the union' from your previous message, but I think
that doesn't work because it doesn't have the crucial property that the case
union (VIP x xs) ys = ...
does not pattern match on the
On Wed, Feb 17, 2010 at 3:17 AM, Jeremy O'Donoghue
jeremy.odonog...@gmail.com wrote:
You're probably correct about the dependencies. I have never tried to
compile wxHaskell against GHC 6.12.1
I'm waiting for Haskell Platform to be released to make the required
changes since (working primarily
I haven't seen anybody mentioning «Joy of Cats» by Adámek, Herrlich
Strecker:
It is available online, and is very well-equipped with thorough
explanations, examples, exercises funny illustrations, I would say
best of university lecture style: http://katmat.math.uni-bremen.de/acc/.
On Wed, Feb 17, 2010 at 3:54 PM, Jeremy Shaw jer...@n-heptane.com wrote:
On Wed, Feb 17, 2010 at 1:27 PM, Bardur Arantsson s...@scientician.netwrote:
(Obviously, if people are using sendfile with something other than
happstack,
it does not help them, but it sounds like trying to fix
On Wed, Feb 17, 2010 at 6:58 AM, Heinrich Apfelmus
apfel...@quantentunnel.de wrote:
Ah, I meant to use the union' from your previous message, but I think
that doesn't work because it doesn't have the crucial property that the case
union (VIP x xs) ys = ...
does not pattern match on the
Hello Yves,
Thursday, February 18, 2010, 2:10:42 AM, you wrote:
Okay! So under UNIX, haskell threaded runtime uses pthreads, if I well
understood.
not exactly. it still uses lightweight (green) threads, but starts
additional OS threads as required to keep N haskell threads running.
it's very
Sean Leather wrote:
(...) :: (c - d) - (a - b - c) - a - b - d
(...) f g x y = f (g x y)
Does anybody else care about this? What are some alternative
solutions?
Here is a different solution:
http://okmij.org/ftp/Haskell/polyvariadic.html#polyvar-comp
f:: a1-a2- -cp (where
By purest coincidence I just wrote the exact same function (the simple
mergeAll', not the VIP one). Well, extensionally the same...
intensionally mine is 32 complicated lines and equivalent to the 3
line mergeAll'. I even thought of short solution by thinking that
pulling the first element
Thank you all.
But there are two things that remain obscure:
First, there is my situation: int the main thread, I call to some C
functions binded through FFI. All of them are marked 'unsafe', except one,
which is internally supposed to make pauses with 'usleep'.
I then execute in another haskell
51 matches
Mail list logo