Re: [Haskell-cafe] ANNOUNCE: A Levenberg-Marquardt implementation

2009-09-12 Thread Khudyakov Alexey
В сообщении от Четверг 10 сентября 2009 17:21:40 автор Bas van Dijk написал: > We like to announce the release of a Haskell binding to Manolis > Lourakis's C levmar library bindings-levmar fails to configure on debian testing with following message: $ cabal install bindings-levmar Resolving dep

Re: [Haskell-cafe] ANNOUNCE: Palindromes 0.1

2009-09-12 Thread Johan Jeuring
Hi Henning, Thanks for the many suggestions. On Sun, 6 Sep 2009, Johan Jeuring wrote: The primary features of Palindromes include: * Linear-time algorithm for finding exact palindromes * Linear-time algorithm for finding text palindromes, ignoring spaces, case of characters, and punctuatio

Re: [Haskell-cafe] Just to let people know

2009-09-12 Thread Don Stewart
jefferson.r.heard: > lhs2TeX does not compile with the latest version of base. complaints > about Control.Exception abound Adding --constraint='base<4' helps. That's what the Arch Linux package uses: http://aur.archlinux.org/packages.php?ID=12648

Re: [Haskell-cafe] Just to let people know

2009-09-12 Thread Jeff Heard
I know, but I'm not the package maintainer... I didn't mean it couldn't be installed, just that it didn't compile out of the box On Sat, Sep 12, 2009 at 6:19 AM, Don Stewart wrote: > jefferson.r.heard: >> lhs2TeX does not compile with the latest version of base.  complaints >> about Control.Exce

Re: [Haskell-cafe] ANNOUNCE: A Levenberg-Marquardt implementation

2009-09-12 Thread Xiao-Yong Jin
Khudyakov Alexey writes: > В сообщении от Четверг 10 сентября 2009 17:21:40 автор Bas van Dijk написал: >> We like to announce the release of a Haskell binding to Manolis >> Lourakis's C levmar library > > bindings-levmar fails to configure on debian testing with following message: > > $ cabal

[Haskell-cafe] Re: Darcs and NFS Resolution

2009-09-12 Thread Trent W. Buck
[Due to circumstances beyond my control, I cannot CC the OP. Sorry.] Jason Dagit writes: >> [Darcs] assumes that when your OS is [POSIX], all your mounted >> volumes will natively support POSIX. Some CIFS servers (namely, Samba) *do* implement POSIX semantics. I take it to OP is using a Micro

Re: [Haskell-cafe] Re: Darcs and NFS Resolution

2009-09-12 Thread Max Rabkin
On Sat, Sep 12, 2009 at 5:22 PM, Trent W. Buck wrote: > Ew.  I'm not keen on calling mv(1) to handle each rename, let alone via > sh (which WILL explode on some paths, and allow injection attacks). rawSystem does not use sh (hence the "raw") --Max ___

[Haskell-cafe] Re: Darcs and NFS Resolution

2009-09-12 Thread Petr Rockai
trentb...@gmail.com (Trent W. Buck) writes: > I'm also puzzled as to why this works -- surely mv(1) assumes POSIX > semantics, too? I would be interested in seeing the exact error > transcript, preferably as an issue on bugs.d.n. I'm not sure the > problem has been diagnosed correctly. Well, not

[Haskell-cafe] Haskell Weekly News: Issue 130 - September 12, 2009

2009-09-12 Thread Joe Fredette
--- Haskell Weekly News http://sequence.complete.org/hwn/20090912 Issue 130 - September 12, 2009 --- Welcome to issue 130 of HWN, a newsletter

[Haskell-cafe] why these two are not equivalent?

2009-09-12 Thread Diego Souza
Hi, I was trying to solve a simple problem in SPOJ, however, after two weeks trying almost everything I could think of, I was still getting WrongAnswer. Then I decided to do the same thing in C++ and I really got puzzled when I got ACcepted. I tried to understand what was different without succe

HECC License (was: [Haskell-cafe] Haskell Weekly News: Issue 130 - September 12, 2009)

2009-09-12 Thread Thomas DuBuisson
>   hecc-0.1. Marcel Fourn√© [5]announced the first release of hecc, the >   Elliptic Curve Cryptography Library for Haskell. Implemented are >   affine, projective, jacobian and modified jacobian point formats with >   the basic operations. Included as an Example is a basic ECDH as well as >   a b

Re: [Haskell-cafe] why these two are not equivalent?

2009-09-12 Thread Jason Dagit
On Sat, Sep 12, 2009 at 12:08 PM, Diego Souza wrote: > Hi, > > I was trying to solve a simple problem in SPOJ, however, after two weeks > trying almost everything I could think of, I was still getting > WrongAnswer. > > Then I decided to do the same thing in C++ and I really got puzzled when > I

Re: [Haskell-cafe] why these two are not equivalent?

2009-09-12 Thread Jason Dagit
On Sat, Sep 12, 2009 at 12:46 PM, Jason Dagit wrote: > > > On Sat, Sep 12, 2009 at 12:08 PM, Diego Souza wrote: > >> Hi, >> >> I was trying to solve a simple problem in SPOJ, however, after two weeks >> trying almost everything I could think of, I was still getting >> WrongAnswer. >> >> Then I de

Re: [Haskell-cafe] why these two are not equivalent?

2009-09-12 Thread Diego Souza
> Looks like the output should be sorted. The C++ version does this with the > iterator over map implicitly. I don't spot where your haskell > version sorts the output. > > There could be other problems, that's just what I can notice in 2 minutes of > looking. > > Good luck! Jason, I assumed D

Re: [Haskell-cafe] instance Monad (Either String) in Prelude or Data.Either?

2009-09-12 Thread Henning Thielemann
Evan Laforge schrieb: > On Fri, Sep 11, 2009 at 6:10 AM, Edward Kmett wrote: >> Unfortunately, the instance of Monad for Either a is somewhat misguided in >> Haskell. >> >> There is a spurious restraint that the Left value in your Either be a member >> of some Error class, which was brought about

Re: [Haskell-cafe] Re: Darcs and NFS Resolution

2009-09-12 Thread Brandon S. Allbery KF8NH
On Sep 12, 2009, at 11:22 , Trent W. Buck wrote: Jason Dagit writes: which ensures that when the operating system is not WIN32, that renaming of files will be performed by the OS shell. I'm also puzzled as to why this works -- surely mv(1) assumes POSIX semantics, too? I would be interested

Re: [Haskell-cafe] Re: Darcs and NFS Resolution

2009-09-12 Thread Ganesh Sittampalam
On Sat, 12 Sep 2009, Brandon S. Allbery KF8NH wrote: On Sep 12, 2009, at 11:22 , Trent W. Buck wrote: Jason Dagit writes: which ensures that when the operating system is not WIN32, that renaming of files will be performed by the OS shell. I'm also puzzled as to why this works -- surely mv(1

Re: [Haskell-cafe] Re: Darcs and NFS Resolution

2009-09-12 Thread Brandon S. Allbery KF8NH
On Sep 12, 2009, at 18:24 , Ganesh Sittampalam wrote: On Sat, 12 Sep 2009, Brandon S. Allbery KF8NH wrote: In order to handle the case where you're moving across filesystems, mv(1) gracefully degrades to cp + rm. rename(2) does not. This also happens to work around compatibility issues with

Re: [Haskell-cafe] instance Monad (Either String) in Prelude or Data.Either?

2009-09-12 Thread Edward Kmett
You could, but then you need overlapping instances to define the one in Control.Monad.Error. -Edward Kmett On Sat, Sep 12, 2009 at 4:26 PM, Henning Thielemann < lemm...@henning-thielemann.de> wrote: > Evan Laforge schrieb: > > On Fri, Sep 11, 2009 at 6:10 AM, Edward Kmett wrote: > >> Unfortunate

[Haskell-cafe] flexible contexts problem

2009-09-12 Thread Sean McLaughlin
I'm having trouble understanding the following behavior. The following program compiles: {-# OPTIONS_GHC -XMultiParamTypeClasses -XFlexibleContexts #-} import Control.Monad.State class Has α s where has :: s -> (α, s) project :: (MonadState s m, Has α s) => m α project = do (α, s) <- gets h

Re: [Haskell-cafe] flexible contexts problem

2009-09-12 Thread Luke Palmer
2009/9/12 Sean McLaughlin : > I'm having trouble understanding the following behavior.  The following > program compiles: > {-# OPTIONS_GHC -XMultiParamTypeClasses -XFlexibleContexts  #-} > import Control.Monad.State > class Has α s where >   has :: s -> (α, s) > project :: (MonadState s m, Has α s

Re: [Haskell-cafe] flexible contexts problem

2009-09-12 Thread Brandon S. Allbery KF8NH
On Sep 12, 2009, at 20:17 , Sean McLaughlin wrote: However, if you replace the function f with f :: (MonadState s m, Has Int s) => m Int f = do x <- project y <- project return x then it fails with the error Could not deduce (Has α s) from the context (MonadState

Re: [Haskell-cafe] flexible contexts problem

2009-09-12 Thread Sean McLaughlin
Ah, I see. Thanks very much. For some reason I figured the second type would be resolved to Int, but now I see that is totally wrong. Best, Sean On Sat, Sep 12, 2009 at 8:34 PM, Brandon S. Allbery KF8NH < allb...@ece.cmu.edu> wrote: > On Sep 12, 2009, at 20:17 , Sean McLaughlin wrote: > > Howe

[Haskell-cafe] [ANNOUNCE] A statistics library

2009-09-12 Thread Bryan O'Sullivan
I'm pleased to announce a new Haskell statistics library, imaginatively named statistics : http://hackage.haskell.org/package/statistics - Support for common discrete and continuous probability distributions (binomial, gamma, exponential, geomet

[Haskell-cafe] yhc compiled hbc

2009-09-12 Thread Fernan Bolando
Hi all Are there any yhc users here? Can anybody send me a precompiled yhc cross-platform hbc file? regards fernan -- http://www.fernski.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Using tiny (atomic) mutables between multiple threads

2009-09-12 Thread Belka
Hello, Haskell Cafe! I used an MVar to signalize to many threads, when it's time to finish their business (I called it a LoopBreaker). Recently I realized, that it might be too expensive (to use MVar) for cases when threads are many and all of them read my LoopBreaker intensively. This assumption

Re: [Haskell-cafe] Using tiny (atomic) mutables between multiple threads

2009-09-12 Thread Bulat Ziganshin
Hello Belka, Sunday, September 13, 2009, 10:45:35 AM, you wrote: i suggest you to use IORef Bool instead - as it was said once by SimonM, it's safe to use in m/t environment, of course without all fancy features of MVar locking if you need to be as fast as possible, IOUArray (1,1) may be used -