Re: [Haskell-cafe] linking errors while compile hugs98 in macos

2013-01-31 Thread Brandon Allbery
On Thu, Jan 31, 2013 at 1:31 AM, Junior White wrote: > Hi Cafe, > I downloaded the latest hugs98 source package, unzip and build, I get > the following link errors. It seems many symbols are not defined, am I > missing same depending libraries? > I don't think anyone is maintaining hugs any mo

Re: [Haskell-cafe] list comprehansion performance has hug different

2013-01-30 Thread Brandon Allbery
On Wed, Jan 30, 2013 at 7:02 AM, Junior White wrote: > Thanks for your reply! I must learn more to fully understand what's going > on inside the list comprehension. > But when I frist learn Haskell, it says sequence doesn't matter, but now > it is a big matter, can compiler do some thing for us?

Re: [Haskell-cafe] SDL and ALUT on Windows: "stdin Bad file descriptor"

2013-01-26 Thread Brandon Allbery
On Sat, Jan 26, 2013 at 3:34 PM, Thiago Negri wrote: > I'm trying SDL on Windows, and things are getting really weird. > I can compile the code (links on the end). > When I run it, if I try using `stdin` the program crashes with this > message: > > : hGetLine: invalid argument (Bad file descripto

Re: [Haskell-cafe] Suggestiong for inter-thread communication

2013-01-26 Thread Brandon Allbery
On Sat, Jan 26, 2013 at 5:51 AM, Petr P wrote: > However, I'm not sure if Ncurses doesn't mind calling getEvent from a > different thread than the one that updates UI. > I don't know if the Haskell bindings change this, but at the C level as long as automatic echo to a window is turned off, it s

Re: [Haskell-cafe] How to escape from typecheck error: Duplicate instance declarations ?

2013-01-25 Thread Brandon Allbery
On Fri, Jan 25, 2013 at 3:18 PM, wrote: > Duplicate instance declarations: > > instance [incoherent] (Num a, Ord a, Rangable range a, > > Packable range a) => > > SubtypeOf range a > > -- Defined at ...:22:10 > > instance [incoherent] (Integral a, Packable range a, > > MultipleTo range a) => > >

Re: [Haskell-cafe] Mobile app development?

2013-01-23 Thread Brandon Allbery
On Tue, Jan 22, 2013 at 8:37 PM, Kristopher Micinski wrote: > By the way, the Android APIs aren't really meant to be used by native > code: the only real use for native code in Android is GPU code and > math code (think games and DSP-type programs). > They may not be "meant" to be in some sense,

Re: [Haskell-cafe] Mobile app development?

2013-01-22 Thread Brandon Allbery
On Tue, Jan 22, 2013 at 2:40 PM, Andrew Pennebaker < andrew.penneba...@gmail.com> wrote: > Can we un-deprecate GHC's ability to compile to C code? C may be the best > option to bridge to mobile, as Android, iOS, and Windows RT do support > C/C++ apps. > The C code generated by GHC, except in unreg

Re: [Haskell-cafe] Weird problem: Couldn't read cabal file "hashable/1.2.0.0/hashable.cabal"

2013-01-06 Thread Brandon Allbery
On Mon, Jan 7, 2013 at 1:05 AM, Eugene Kirpichov wrote: > A friend of mine is trying to install my "timeplotters" (see email > signature). > He's getting a weird error: one of the tools installs fine but the other > one fails with the error "Couldn't read cabal file "hashable/ > 1.2.0.0/hashable.c

Re: [Haskell-cafe] [Haskell-beginners] ghc and android

2013-01-01 Thread Brandon Allbery
On Tue, Jan 1, 2013 at 9:13 AM, Bernhard Urban wrote: > The main issue: The GHC runtime relies on glibc > I have to assume this is not meant literally, because ghc works on OS X and *BSD. -- brandon s allbery kf8nh sine nomine associates allber...@gmail.com

Re: [Haskell-cafe] Object Oriented programming for Functional Programmers

2012-12-31 Thread Brandon Allbery
On Mon, Dec 31, 2012 at 4:26 PM, Rico Moorman wrote: > We should first examine the merits and limitations of the traditional >> approach: using >> functions as a basis for the architecture of software systems. This will >> not only lead us to >> > > Because you both have more experience with this

Re: [Haskell-cafe] lambda case (was Re: A big hurray for lambda-case (and all the other good stuff))

2012-12-30 Thread Brandon Allbery
On Sun, Dec 30, 2012 at 8:42 PM, Dan Burton wrote: > [featureX] is usually too powerful, it surely would be abused extensively, >> which would make developer's life a nightmare, unless there is only one >> developer and whole development takes no more than a couple of months. > > > This doesn't sa

Re: [Haskell-cafe] Object Oriented programming for Functional Programmers

2012-12-30 Thread Brandon Allbery
On Sun, Dec 30, 2012 at 3:45 PM, Eli Frey wrote: > > mconcat :: Monad m => [m] -> m > > mconcat = foldl mappend [] > > We can think of `mconcat` having a little lookup table inside of itself, > and whenever we pass it a concrete `[m]`, `mappend` gets looked up and we > get the implementation for

Re: [Haskell-cafe] [Haskell-beginners] ghc and android

2012-12-30 Thread Brandon Allbery
On Sun, Dec 30, 2012 at 1:46 PM, Nathan Hüsken wrote: > > An additional issue: ghci (and Template Haskell because it uses the > > bytecode interpreter of ghci internally) currently(?) requires its own > > custom linker instead of being able to use the system linker. Said > linker > > has no supp

Re: [Haskell-cafe] Type error when trying to adapt http-proxy to new conduit

2012-12-26 Thread Brandon Allbery
On Wed, Dec 26, 2012 at 6:22 PM, Pieter Laeremans wrote: > Network/HTTP/Proxy.hs:254:15: > Couldn't match expected type `ResourceT > IO (CIN.Pipe () () ByteString () > (ResourceT IO) ())' > with actual type `IO >

Re: [Haskell-cafe] multi-thread and lazy evaluation

2012-12-24 Thread Brandon Allbery
On Mon, Dec 24, 2012 at 8:45 AM, Corentin Dupont wrote: > *execBlocking :: MVar (Maybe MyData) -> IO () > execBlocking mv = do >let (a::String) = a >--If you uncomment the next line, it will work >--putStrLn $ show a >putMVar mv (Just $ MyData a "toto")* > It's laziness, yes; you

Re: [Haskell-cafe] GHC shows wrong line number in error?

2012-12-20 Thread Brandon Allbery
On Thu, Dec 20, 2012 at 3:47 AM, Niklas Hambüchen wrote: > `b' is a rigid type variable bound by > a type expected by the context: TestG b at Clean.hs:49:23 > It might be worth rephrasing this error message somehow, although I suspect it's written to fit into existing error repor

Re: [Haskell-cafe] Hackage suggestion: Gather the list of the licenses of all dependencies of a package

2012-12-15 Thread Brandon Allbery
On Sat, Dec 15, 2012 at 4:38 PM, Henk-Jan van Tuyl wrote: > On Sat, 15 Dec 2012 16:14:59 +0100, Brandon Allbery > wrote: > >> On Sat, Dec 15, 2012 at 9:01 AM, Petr P wrote: >> >>> So if I put cpphs into build-tools and I don't have it installed, the >

Re: [Haskell-cafe] Hackage suggestion: Gather the list of the licenses of all dependencies of a package

2012-12-15 Thread Brandon Allbery
On Sat, Dec 15, 2012 at 9:25 AM, Malcolm Wallace wrote: > This might a good time to remind everyone that every single program > compiled by a standard GHC is linked against an LGPL library (the Gnu > multi-precision integer library) - unless you take care first to build your > own > This is less

Re: [Haskell-cafe] Hackage suggestion: Gather the list of the licenses of all dependencies of a package

2012-12-15 Thread Brandon Allbery
On Sat, Dec 15, 2012 at 9:01 AM, Petr P wrote: > So if I put cpphs into build-tools and I don't have it installed, the > build will fail? Is this a desired behavior, or a bug? > Shortcoming of cabal; it only "knows about" libraries because it is really just a front-end for ghc-pkg, so can't real

Re: [Haskell-cafe] LGPL and Haskell (Was: Re: ANNOUNCE: tie-knot library)

2012-12-12 Thread Brandon Allbery
On Wed, Dec 12, 2012 at 4:58 PM, Ramana Kumar wrote: > Using it has the advantage of offering a reason to push those on the fence > about whether to make their software free. > As has already been pointed out, definitions of "free" differ. -- brandon s allbery kf8nh

Re: [Haskell-cafe] Can cabal be turned into a package manager?

2012-12-12 Thread Brandon Allbery
On Wed, Dec 12, 2012 at 12:51 PM, Andre Cunha wrote: > Janek, did you mean something like Rubygems (http://rubygems.org)? It > manages the download, installation and manipulation of Ruby packages, > called "gems". A gem can contain executable programs or libraries (just > like traditional packages

Re: [Haskell-cafe] ANNOUNCE: tie-knot library

2012-12-11 Thread Brandon Allbery
On Tue, Dec 11, 2012 at 8:26 PM, Ramana Kumar wrote: > Using the GPL (or a strong copyleft free license) strengthens the free > software community of which I thought the Haskell community is a part (or > at least intersects substantially). > Haskell libraries are mostly BSD licensed, as is GHC it

Re: [Haskell-cafe] GHCi + FFI + global C variables

2012-12-11 Thread Brandon Allbery
On Tue, Dec 11, 2012 at 5:57 AM, Francisco Vieira de Souza < vieira.u...@gmail.com> wrote: > Hi Simon! Is it not necessary to show the type of igraph_bool_t > igraphhaskell_initialized like > > "int igraph_bool_t igraphhaskell_initialized = 0"? > "igraph_bool_t" uses the _t suffix convention for

Re: [Haskell-cafe] How can I avoid buffered reads?

2012-12-06 Thread Brandon Allbery
On Thu, Dec 6, 2012 at 5:14 PM, Donn Cave wrote: > While I guess /dev/urandom isn't supposed to block, so it would look > about the same to select(2) either way, /dev/random is select-able, true? > Both should be cdevs, not files, so they do not go through the normal filesystem I/O pathway in th

Re: [Haskell-cafe] How can I avoid buffered reads?

2012-12-06 Thread Brandon Allbery
On Thu, Dec 6, 2012 at 3:24 PM, Tristan Seligmann wrote: > On 29 Nov 2012 12:27 PM, "Leon Smith" wrote: > System.Posix.IO and Foreign.This appears to work, but for better or > worse, it is using blocking calls to the "read" system call and is not > integrated with GHC's IO manager. This

Re: [Haskell-cafe] lambda case

2012-12-01 Thread Brandon Allbery
On Sat, Dec 1, 2012 at 5:30 AM, Roman Cheplyaka wrote: > I find this discussion useful — there are some interesting points > (splitting "case of" into two parts) that I don't remember reading in the > original thread (but maybe it's just me). > Mentioned twice that I recall, as treating 'of' as

Re: [Haskell-cafe] ANNOUNCE: rethinkdb 0.1.0

2012-11-23 Thread Brandon Allbery
On Fri, Nov 23, 2012 at 7:03 PM, Etienne Laurin wrote: > What is the advantage of RethinkDB? [4] > [4] > http://www.quora.com/RethinkDB/What-is-the-advantage-of-RethinkDB-over-MongoDB How about a URL for those who prefer not to be sold by Facebook? -- brandon s allbery kf8nh

Re: [Haskell-cafe] Compilers: Why do we need a core language?

2012-11-23 Thread Brandon Allbery
On Fri, Nov 23, 2012 at 9:59 AM, Mike Meyer wrote: > I have to ask if your core language for Maple was larger than Maple? I can think of several reasons why it would make sense, especially if the core language is much harder for a human to write for but much easier to optimize and/or generate m

Re: [Haskell-cafe] Compilers: Why do we need a core language?

2012-11-22 Thread Brandon Allbery
On Thu, Nov 22, 2012 at 7:56 AM, Jacques Carette wrote: > On 20/11/2012 6:08 PM, Richard O'Keefe wrote: > >> On 21/11/2012, at 4:49 AM, wrote: >> >> Well, I don't know. Would it save some time? Why bother with a core >>> language? >>> >> For a high level language (and for this purpose, even Fort

Re: [Haskell-cafe] cabal install... Trying to recover

2012-11-21 Thread Brandon Allbery
On Wed, Nov 21, 2012 at 12:06 PM, Gregory Guthrie wrote: > OK; I took HTTP out, but still get the same error; > > cabal: The following packages are likely to be broken by the > reinstalls: > > QuickCheck-2.4.2 > > haskell-platform-2012.4.0.0 > > Use --force-reinsta

Re: [Haskell-cafe] cabal install... Trying to recover

2012-11-21 Thread Brandon Allbery
On Wed, Nov 21, 2012 at 9:08 AM, Gregory Guthrie wrote: > The error seems odd to me (cabal-install-1.16.0.2 depends on > Cabal-1.16.0.3 which failed to install.), that an older version depends on > a newer one? > There was a minor bug in the Cabal library necessitating a point release. cabal-in

Re: [Haskell-cafe] cabal install...

2012-11-20 Thread Brandon Allbery
On Tue, Nov 20, 2012 at 4:10 PM, Gregory Guthrie wrote: > Hmm, > > Now when I tried to run Leksah, I get not only some broken packages (which > I can avoid for my current project), but: > > ** ** > > : cannot satisfy -package-id > base-4.5.1.0-7c83b96f47f23db63c42a56351dcb917: > >

Re: [Haskell-cafe] Compilers: Why do we need a core language?

2012-11-20 Thread Brandon Allbery
On Tue, Nov 20, 2012 at 6:54 AM, wrote: > I know nothing about compilers and interpreters. I checked several > books, but none of them explained why we have to translate a > high-level language into a small (core) language. Is it impossible > (very hard) to directly translate high-level language

Re: [Haskell-cafe] Reactive-Banana-Wx Install Trouble

2012-11-19 Thread Brandon Allbery
On Mon, Nov 19, 2012 at 5:13 PM, Ian wrote: > Expected type: Args >-> Distribution.Simple.Setup.BuildFlags >-> Distribution.PackageDescription.PackageDescription >-> Distribution.Simple.LocalBuildInfo.LocalBuildInfo >

Re: [Haskell-cafe] A small step towards solving cabal hell.

2012-11-18 Thread Brandon Allbery
On Sun, Nov 18, 2012 at 11:04 AM, Brandon Allbery wrote: > There's another consideration, which is are you optimizing hackage by > pessimizing development? You could break xmonad-contrib into (usually) one > package per module if you really wanted to --- but now the developers nee

Re: [Haskell-cafe] A small step towards solving cabal hell.

2012-11-18 Thread Brandon Allbery
On Sun, Nov 18, 2012 at 10:15 AM, wrote: > Well in some cases, it might not be easy to break up the libraries. If > there is sufficient mutual dependency, doing so won't even help the > situation. However, I already looked at the code to some large libraries, > such as xmonad-contrib, and gtk2h

Re: [Haskell-cafe] Hard drive thrashing with modern controllers

2012-11-12 Thread Brandon Allbery
On Mon, Nov 12, 2012 at 4:21 AM, Ketil Malde wrote: > timothyho...@seznam.cz writes: > > import Control.Monad > > foo = do > > forever $ writeFile "filename.foo" "Hello world!" > > I could be wrong, but I suspect this is unlikely to result in (hardly) > any disk operations at all, as long as th

Re: [Haskell-cafe] Hard drive thrashing with modern controllers

2012-11-10 Thread Brandon Allbery
On Sat, Nov 10, 2012 at 3:02 PM, wrote: > Hmm. I was hoping for good news that things had changed for the better :( > . I want these files to be on the disk so I don't lose data in the case of > failure. A common solution here is to acidify the program, but that is not > acceptable from a usab

Re: [Haskell-cafe] Hard drive thrashing with modern controllers

2012-11-10 Thread Brandon Allbery
On Sat, Nov 10, 2012 at 2:49 PM, wrote: > import Control.Monad > foo = do > forever $ writeFile "filename.foo" "Hello world!" > > will that destroy those sectors of my SSD after the rated 3000 write > cycles? > Check your OS; while the firmware of modern SSD devices does much of the work of rot

Re: [Haskell-cafe] Cross platform method for getting the /actual/ contents of a directory

2012-11-07 Thread Brandon Allbery
On Wed, Nov 7, 2012 at 2:16 PM, wrote: > And this works fine on linux, but I wonder. On other systems, is "." and > ".." allowed as file names? Couldn't a windows user actually end up with a > file name named "." and this method would fail? > Windows treats dots in filenames specially as well,

Re: [Haskell-cafe] Problems updating cabal-install on Mac OS

2012-11-06 Thread Brandon Allbery
On Tue, Nov 6, 2012 at 2:22 PM, Harald Bögeholz wrote: > I thought that by issuing these two commands > > Haralds-iMac:~ bo$ which cabal > /Users/bo/Library/Haskell/bin/cabal > 3@haral:117 B$ type which which is /usr/bin/which It's not a bash builtin, so it doesn't show the current shel

Re: [Haskell-cafe] Problems updating cabal-install on Mac OS

2012-11-06 Thread Brandon Allbery
On Tue, Nov 6, 2012 at 12:27 PM, Harald Bögeholz wrote: > > Installing executable(s) in > > /Users/bo/Library/Haskell/ghc-7.4.2/lib/cabal-install-1.16.0.1/bin > > Updating documentation index /Users/bo/Library/Haskell/doc/index.html > > When I then tried > > cabal update > > it still said > > > D

Re: [Haskell-cafe] Partial application in case expression rules

2012-11-05 Thread Brandon Allbery
On Mon, Nov 5, 2012 at 4:15 PM, Stephen Tetley wrote: > There is a long extant GHC extension to elide constructor arguments > f (Leaf {}) = ... > f (Node {}) = ... > I don't think that's an extension, it falls out directly from how Haskell builds records on top of ADTs and is specified in the sta

Re: [Haskell-cafe] GHC maintenance on Arch

2012-10-29 Thread Brandon Allbery
On Mon, Oct 29, 2012 at 5:56 AM, Magnus Therning wrote: > Now I'm going to run the risk of upsetting you quite a bit by being > completely blunt. > Indeed. > You come across in your mail like someone who has thought through your > own situation, but fail to see the larger picture. You do know

Re: [Haskell-cafe] serialize an unknown type

2012-10-21 Thread Brandon Allbery
On Sun, Oct 21, 2012 at 12:39 PM, Corentin Dupont wrote: > Nobody on this one? > Here is a simplified version: > > data Event a where > InputChoice :: a -> Event a > > How to serialize/deserialize this? > How were you expecting to serialize/deserialize a function? -- brandon s allbery kf8

Re: [Haskell-cafe] Why Kleisli composition is not in the Monad signature?

2012-10-16 Thread Brandon Allbery
On Tue, Oct 16, 2012 at 1:19 PM, AUGER Cédric wrote: > What do you mean by demonstrate? If you do not want to fit the > mathematical presentation, then I have nothing to demonstrate, you have > your point of view, I have mine and they differ. Now, if you want to > I think the point is that Monad

Re: [Haskell-cafe] forkProcess, forkIO, and multithreaded runtime

2012-10-15 Thread Brandon Allbery
On Mon, Oct 15, 2012 at 12:30 PM, Joey Hess wrote: > forkProcess comes with a giant warning: since any other running threads > are not copied into the child process, it's easy to go wrong: e.g. by > accessing some shared resource that was held by another thread in the > parent. > > In my

Re: [Haskell-cafe] One of the new buzz phrases is "Event-Sourcing"; is Haskell suitable for this?

2012-09-29 Thread Brandon Allbery
On Sat, Sep 29, 2012 at 8:46 PM, KC wrote: > http://martinfowler.com/eaaDev/EventSourcing.html STM? And I believe there's work on the debugger in ghci to "run programs backwards". -- brandon s allbery allber...@gmail.com wandering unix systems administrat

Re: [Haskell-cafe] Partial statical linking

2012-09-24 Thread Brandon Allbery
On Mon, Sep 24, 2012 at 7:42 AM, Jason Dusek wrote: > I am not sure why that happens -- libgcc.a wasn't explicitly > asked for; but it stands to reason that one shouldn't specify > No, but it's required for anything that uses the C compiler (which in this case would be glibc and any foreign libr

Re: [Haskell-cafe] Call for discussion: OverloadedLists extension

2012-09-23 Thread Brandon Allbery
Maybe what's needed is a way to mutate the lexer by adding new kinds of literals; Unicode offers a number of paired brackets and quote-like characters. Although that is likely to get into readability issues especially if you do have a mixture of [Char], ByteString, and Text for some reason. (Map

Re: [Haskell-cafe] Partial statical linking

2012-09-19 Thread Brandon Allbery
On Wed, Sep 19, 2012 at 7:06 AM, Jason Dusek wrote: > What I attempted was building a binary with only some C libraries > statically linked, with this command line: > > # Build https://github.com/erudify/sssp on Ubunut 12.04 > ghc -outputdir ./tmp -v --make -O2 sssp.hs -o sssp.ubuntu \ >

Re: [Haskell-cafe] [ANNOUNCE] Fmark markup language

2012-09-18 Thread Brandon Allbery
On Tue, Sep 18, 2012 at 10:34 AM, José Lopes wrote: > Why do you say that _italics_ and *italics* are semantically different? > What do you mean? > The parenthetical hinted at it: (I tend to use the former for titles and such) > > There's a convention at work here, namely that italicized book t

Re: [Haskell-cafe] [ANNOUNCE] Fmark markup language

2012-09-18 Thread Brandon Allbery
On Tue, Sep 18, 2012 at 1:05 AM, Ivan Lazar Miljenovic < ivan.miljeno...@gmail.com> wrote: > to it (though I agree that Markdown has some odd choices; in > particular, the ability to use both _ and * for italics whilst > requiring ** for bold). > The odd thing is, I've found that I use those cons

Re: [Haskell-cafe] Tutorial: Haskell for the Evil Genius

2012-09-14 Thread Brandon Allbery
On Fri, Sep 14, 2012 at 9:08 PM, Andrew Pennebaker < andrew.penneba...@gmail.com> wrote: > Given that Maybe and Either don't modify state, nor do they communicate >> with outside interfaces, nor do they specify computation ordering, I don't >> understand why they're implemented as monads. Why not

Re: [Haskell-cafe] [ANN] Cumino 0.2 - Now supports pretty indentation through stylish-haskell

2012-09-13 Thread Brandon Allbery
On Thu, Sep 13, 2012 at 2:22 AM, Alfredo Di Napoli < alfredo.dinap...@gmail.com> wrote: > urxvtc -e sh -c 'echo a' >> xterm -e echo a >> > > I would like to, and in fact I've already tried, but urxvt is trickier > than other shells. Using the command you gave me does not create a new > win

Re: [Haskell-cafe] [ANN] Cumino 0.2 - Now supports pretty indentation through stylish-haskell

2012-09-12 Thread Brandon Allbery
On Wed, Sep 12, 2012 at 1:36 PM, Alfredo Di Napoli < alfredo.dinap...@gmail.com> wrote: > If such a possibility exists, > I would be happy to fix the urxvt support :) > Actually I went back through it and it should only be an issue if urxvtc is used; urxvt "should" always be standalone. Unless t

Re: [Haskell-cafe] Invitation to connect on LinkedIn

2012-09-12 Thread Brandon Allbery
On Wed, Sep 12, 2012 at 2:21 PM, damodar kulkarni wrote: > Correct me if I am wrong, but by looking at the way the message is > created, I think, LinkedIn is acting a kind of spammer these days. Shall we > lodge protest against it as a community? > What happens is that anyone who joins is pushed

Re: [Haskell-cafe] [ANN] Cumino 0.2 - Now supports pretty indentation through stylish-haskell

2012-09-12 Thread Brandon Allbery
On Wed, Sep 12, 2012 at 11:25 AM, Alfredo Di Napoli < alfredo.dinap...@gmail.com> wrote: > I'm not in front of the pc now, but afair the problem was related to > opening a new urxvt window FROM a running urxvt. > More details soon :) > urxvt defaults to using a client-server model for all termina

Re: [Haskell-cafe] How to waitForProcess?

2012-09-04 Thread Brandon Allbery
On Tue, Sep 4, 2012 at 9:39 PM, Mike Ledger wrote: > You might have to use hGetContents, then waitForProcess, and then > terminateProcess -- you can then check if the process is indeed terminated > using getProcessExitCode. Er? When waitForProcess returns the process is dead; there's nothing t

Re: [Haskell-cafe] Installation issues with Centos

2012-09-02 Thread Brandon Allbery
On Sun, Sep 2, 2012 at 10:49 PM, Manish Trivedi wrote: > I am attaching the config.log in the email. > You didn't install ghc properly, or you did and you then added its internal directory to your $PATH. The executables in /usr/local/lib/ghc-7.4.1 should not be run directly, as they require setup

Re: [Haskell-cafe] Installation issues with Centos

2012-09-02 Thread Brandon Allbery
On Sun, Sep 2, 2012 at 9:26 PM, Manish Trivedi wrote: > [root@qa-engine1 haskell-platform-2012.2.0.0]# yum install gmp > This is just the runtime library; you will also need the compile/link-time library provided by gmp-devel. That said, the contents of the config.log mentioned in the error mes

Re: [Haskell-cafe] Function names in Haskell lib not first-class on web!

2012-08-31 Thread Brandon Allbery
On Thu, Aug 30, 2012 at 11:21 PM, damodar kulkarni wrote: > Note: google badly fails to search these functions identifiers. http://symbolhound.com/ -- brandon s allbery allber...@gmail.com wandering unix systems administrator (available) (412) 475-9364

Re: [Haskell-cafe] Cabal install fails due to recent HUnit

2012-08-27 Thread Brandon Allbery
On Mon, Aug 27, 2012 at 4:23 PM, Bryan O'Sullivan wrote: > On Mon, Aug 27, 2012 at 11:39 AM, Erik Hesselink wrote: > >> >> Yes, you are right. So the question is how long to support systems >> with the old cabal 0.10. This is the one included with the previous >> haskell platform (and thus lots of

Re: [Haskell-cafe] Simple shell scripts

2012-08-27 Thread Brandon Allbery
On Mon, Aug 27, 2012 at 1:55 PM, Eric Tanter wrote: > Here is a simple shell script (upper.hs): > "shell script" means a script written in the shell's programming language. This is probably best referred to as a Haskell script. > bash-3.2$ yes | runghc upper.hs | head -n 3 > Y > Y > Y > : hFl

Re: [Haskell-cafe] Network.Curl cookie jar madness

2012-08-19 Thread Brandon Allbery
On Sat, Aug 18, 2012 at 8:52 PM, Michael Orlitzky wrote: > Curl is making the request, but if I remove the (hPutStrLn stderr > response_body), it doesn't work! What's even more insane is, this works: > > hPutStrLn stderr response_body > > and this doesn't: > > hPutStrLn stdout response_body >

Re: [Haskell-cafe] Adding to / subtracting from a LocalTime?

2012-08-18 Thread Brandon Allbery
On Sat, Aug 18, 2012 at 6:05 PM, Adde Nilsson wrote: > Ok, do you know of any way to add/subtract without converting to UTC and > back? I'm not sure I'd do that in any environment, since usually libraries don't deal with the result crossing a daylight/summer time change (and those that do, surp

Re: [Haskell-cafe] Platform Versioning Policy: upper bounds are not our friends

2012-08-17 Thread Brandon Allbery
On Fri, Aug 17, 2012 at 4:35 PM, Bryan O'Sullivan wrote: > Any vastly more complicated and detailed versioning scheme has a huge > burden to prove that it won't collapse dramatically more quickly. (Frankly, > I think that anything involving "specify every detail of your known > dependencies" is de

Re: [Haskell-cafe] Platform Versioning Policy: upper bounds are not our friends

2012-08-15 Thread Brandon Allbery
On Wed, Aug 15, 2012 at 11:02 PM, MightyByte wrote: > be to add a flag to Cabal/cabal-install that would cause it to ignore > upper bounds. (Frankly, I think it would also be great if > Ignore, or at least treat them as being like flags... if the versions don't converge with them, start relaxin

Re: [Haskell-cafe] Platform Versioning Policy: upper bounds are not our friends

2012-08-15 Thread Brandon Allbery
On Wed, Aug 15, 2012 at 6:46 PM, Carter Schonwald < carter.schonw...@gmail.com> wrote: > no one is disputing that there are conditional changes in dependencies > depending on library versions. Indeed. But the ghc release that split up base broke cabalised packages with no warning to users until

Re: [Haskell-cafe] Platform Versioning Policy: upper bounds are not our friends

2012-08-15 Thread Brandon Allbery
On Wed, Aug 15, 2012 at 4:44 PM, Johan Tibell wrote: > On Wed, Aug 15, 2012 at 1:02 PM, Brandon Allbery > wrote: > > So we are certain that the rounds of failures that led to their being > > *added* will never happen again? > > It would be useful to have some examples o

Re: [Haskell-cafe] Platform Versioning Policy: upper bounds are not our friends

2012-08-15 Thread Brandon Allbery
On Wed, Aug 15, 2012 at 3:57 PM, Johan Tibell wrote: > On Wed, Aug 15, 2012 at 12:38 PM, Bryan O'Sullivan > wrote: > > I propose that the sense of the recommendation around upper bounds in the > > PVP be reversed: upper bounds should be specified only when there is a > known > > problem with a ne

Re: [Haskell-cafe] For consistency; it would be better if the import statement matched the cabal install statement or :m form.

2012-08-14 Thread Brandon Allbery
On Tue, Aug 14, 2012 at 11:04 PM, KC wrote: > :m +Data.Array.Repa.Algorithms.Randomish > > cabal install repa.algrothms > > would be more consistent. > What do you do when multiple modules use the same namespace? (monads-{fd,tf} and the regex modules being cases in point) -- brandon s allbery

Re: [Haskell-cafe] Debian 6.0.5: 'cabal install curl' problem

2012-08-14 Thread Brandon Allbery
On Tue, Aug 14, 2012 at 10:23 AM, dokondr wrote: > Anyway, then I did: > -> apt-get install curl > -> cabal install curl > Cabal fails to install 'curl' because it can not find curl library. Please > see detailed cabal output at the end of this message. > Just as a general thing, almost all Linu

Re: [Haskell-cafe] createProcess running non-existent programs

2012-08-13 Thread Brandon Allbery
On Mon, Aug 13, 2012 at 10:23 AM, Donn Cave wrote: > Though speaking of platforms, I guess one large headache would be > what to do about Microsoft operating systems. Given the unusual > Microsoft provides APIs that work as is for this, by my understanding; it's the POSIX fork/exec model that m

Re: [Haskell-cafe] createProcess running non-existent programs

2012-08-13 Thread Brandon Allbery
On Mon, Aug 13, 2012 at 7:26 AM, Alexander Kjeldaas < alexander.kjeld...@gmail.com> wrote: > This isn't that hard - a pipe shouldn't be needed anymore. Just require a > post-2003 glibc. > So, we are desupporting the *BSDs and OS X (and Solaris etc.) now? glibc is only used on Linux and the Hurd

Re: [Haskell-cafe] but module Data.Array.Rep.Algorithms.Ramdomish is in package repa-algorithms

2012-08-12 Thread Brandon Allbery
email is the new twitter On Sun, Aug 12, 2012 at 3:21 PM, Albert Y. C. Lai wrote: > On 12-08-12 02:18 PM, KC wrote: > > I use "cabal install repa" but then WinGHCi says > > module Data.Array.Rep.Algorithms.**Ramdomish not found. > > __**_ > Haskell-Caf

Re: [Haskell-cafe] hGetContents Illegal byte sequence / ghc-pkg

2012-08-11 Thread Brandon Allbery
On Sat, Aug 11, 2012 at 7:13 AM, Benjamin Edwards wrote: > inspecting the source of readProcessWithExitCode yields an obvious > explanation to the MVar problem, but I don't understand why hGetContents is > so offended. > I think last time I looked into this there was no normalization of package.c

Re: [Haskell-cafe] Data.Data and OverlappingInstances

2012-08-09 Thread Brandon Allbery
On Thu, Aug 9, 2012 at 6:00 AM, Timo von Holtz wrote: > instance Num a => Test a where > foo = return 1 > > instance Test Int where > foo = return 2 > > Erm, this isn't going to work anyway, is it? I think the first instance matches all types and then throws an error if the result isn't an in

Re: [Haskell-cafe] Explicit forall - Strange Error

2012-07-31 Thread Brandon Allbery
On Tue, Jul 31, 2012 at 2:59 PM, Shayan Najd Javadipour wrote: > {-# LANGUAGE GADTs,RankNTypes #-}data T a where T1 :: (forall b. b -> b) -> > (forall a. Int -> T a) > {- Error: > Data constructor `T1' returns type `forall a. Int -> T a' > instead of an instance of its parent type `T a' > >

Re: [Haskell-cafe] every Friday the 13th at midnight...

2012-07-27 Thread Brandon Allbery
On Fri, Jul 27, 2012 at 5:50 AM, Corentin Dupont wrote: > I'm looking for a library to be able to express, store and retrieve > recurring appointments, like "every Monday at midnight". > I saw Data.Time.Recurrence, which has a nice language, but how to store > the appointments? A command like: > *

Re: [Haskell-cafe] Which ghc binary does ghc-mod use?

2012-07-23 Thread Brandon Allbery
On Mon, Jul 23, 2012 at 2:06 PM, Peter Simons wrote: > I am a happy user of Emacs with ghc-mod for Haskell programming. There is > just > one issue I've run into: I have multiple versions of GHC installed on my > machine. Now, ghc-mod seems to use the GHC binary that was used to compile > ghc-mod

Re: [Haskell-cafe] stripSuffix

2012-07-17 Thread Brandon Allbery
On Tue, Jul 17, 2012 at 8:33 PM, Alvaro Gutierrez wrote: > Pardon me if this has been answered before: how come there's a > stripPrefix in Data.List, but no matching stripSuffix? > Probably because prefixes are easier to do, given the nature of singly linked lists. -- brandon s allbery

Re: [Haskell-cafe] Non-greedy match in Text.Regx.Posix

2012-07-17 Thread Brandon Allbery
On Tue, Jul 17, 2012 at 9:54 AM, C K Kashyap wrote: > I guess I better invest my time in Parsec then :) > That's certainly more Haskelly... but it's often possible to rephrase a regexp in POSIX ERE language without using the non-greedy PCREism. What exactly are you trying to match / what is you

Re: [Haskell-cafe] wondering about a MonadIO instance for a heap data type

2012-07-11 Thread Brandon Allbery
On Wed, Jul 11, 2012 at 8:00 PM, Qi Qi wrote: > List [] is a monad, why not for heap data. Heap data could be an instance > of Monad too. > Only if you can define a meaningful semantics for it. Lists aren't a monad because of liftIO, but because the monad pattern means something (backtracking/m

Re: [Haskell-cafe] Bad interface problem.

2012-07-11 Thread Brandon Allbery
On Wed, Jul 11, 2012 at 5:28 AM, Magicloud Magiclouds < magicloud.magiclo...@gmail.com> wrote: > Even I removed all user space packages, the error was still. I think > it is a ghc pkg problem, that every package register itself as > package:function while ghc (or cabal?) required > package-version

Re: [Haskell-cafe] ghci and TH cannot: unknown symbol `stat64`

2012-07-11 Thread Brandon Allbery
On Wed, Jul 11, 2012 at 10:25 AM, Michael Snoyman wrote: > test.hs: > /home/ubuntu/.cabal/lib/persistent-sqlite-1.0.0/ghc-7.4.1/HSpersistent-sqlite-1.0.0.o: > unknown symbol `stat64' > test.hs: test.hs: unable to load package `persistent-sqlite-1.0.0' > The immediate cause is that some C source f

Re: [Haskell-cafe] Getting a segmentation fault when starting/stopping the RTS, from C, several times.

2012-07-10 Thread Brandon Allbery
On Tue, Jul 10, 2012 at 10:55 PM, Captain Freako wrote: > Hi experts, > > Should I expect the following C code to run to completion, or am I trying > to do something that was never intended? > Quoth the Fine Manual (8.2.1.1. Using your own main()

Re: [Haskell-cafe] package to expand TH macros?

2012-07-01 Thread Brandon Allbery
On Sun, Jul 1, 2012 at 1:56 PM, Eric wrote: > I seem to remember finding a package a few days ago that would take > Haskell source with TH, then run and expand the TH macros in-place to > produce equivalent, TH-free Haskell source. > It is kinda hard to find for some reason... you're looking f

Re: [Haskell-cafe] Data.Bitmap, readBitmap exception

2012-06-28 Thread Brandon Allbery
On Thu, Jun 28, 2012 at 7:34 AM, Alexander Foremny < alexanderfore...@gmail.com> wrote: > I am using bitmap-0.2 [1] to load a Bitmap file [2]. However, the > following sample GHCi session fails for me. > For what it's worth, my system doesn't recognize your bitmap as a valid image file. -- bran

Re: [Haskell-cafe] transformers problem: Could not deduce MonadTrans (StateT s) ??

2012-06-23 Thread Brandon Allbery
On Sat, Jun 23, 2012 at 12:22 PM, Anton Kholomiov wrote: > Why this function doesn't compile? > > phi :: Monad m => StateT s m () > phi = lift $ return () > > I get (ghc-7.4.1) > > Could not deduce (MonadTrans (StateT s)) > arising from a use of `lift' > from the context (Monad m) >

Re: [Haskell-cafe] Why does (++ "!") "bla" return "bla!" and not "!bla"?

2012-06-21 Thread Brandon Allbery
On Fri, Jun 22, 2012 at 12:54 AM, Hilco Wijbenga wrote: > I think I'm close to understanding why (++ "!") "bla" returns "bla! > instead of "!bla" but I seem to be missing the last step. :-) I > noticed that ((++) "!") "bla" does indeed return "!bla". So it seems > to be related to the infix proper

Re: [Haskell-cafe] Why does Enum succ and pred functions throw exception

2012-06-21 Thread Brandon Allbery
On Thu, Jun 21, 2012 at 5:11 AM, Rouan van Dalen wrote: > Can anyone shed some light on why the succ and pred functions of the Enum > typeclass throw > exceptions if we go over the upper or lower boundary, and not return Maybe > a? > Enum and Bounded have a complicated and arguably incorrect[1] r

Re: [Haskell-cafe] How do people still not understand what FP is about? What are we doing wrong?

2012-06-18 Thread Brandon Allbery
On Mon, Jun 18, 2012 at 5:21 PM, Gregory Collins wrote: > On Mon, Jun 18, 2012 at 10:51 PM, Ertugrul Söylemez wrote: > >> Indeed there is a line to be drawn here. However, I think I can fit >> both kinds of people under the adjective "retarded". >> > > Off-topic: it would be even better to avoid

Re: [Haskell-cafe] Mac and Gtk2hs problem

2012-06-07 Thread Brandon Allbery
On Thu, Jun 7, 2012 at 8:40 AM, Heinrich Apfelmus wrote: > Tanja Piechnick wrote: > >> Loading package glib-0.12.3.1 ... can't load .so/.DLL for: intl >> (dlopen(/usr/local/Cellar/**gettext/0.18.1.1/lib/libintl.**dylib, >> 9): no suitable image found. Did find:

Re: [Haskell-cafe] Requesting Feedback: I Love Haskell, but can't find a place to use it

2012-05-30 Thread Brandon Allbery
On Wed, May 30, 2012 at 8:30 PM, Jonathan Geddes wrote: > I had hoped that compiling Haskell to C with -fvia-C (or would it be just > -C?) would allow Haskell to run in new, uncharted territory such as Android > (with NDK), IOS, Google's NaCl, etc. But today I learned that GHC's C > backend has be

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-05-24 Thread Brandon Allbery
On Thu, May 24, 2012 at 11:05 PM, Magicloud Magiclouds < magicloud.magiclo...@gmail.com> wrote: > Hi there, > The code could not be simpler. Just ldapInit, ldapSimpleBind. > I just found that the code works with ghci, too. So to sum up, > ghci/runhaskell works, ghc not. A possibility that occu

Re: [Haskell-cafe] Most C++ compilers will not optimize x^2.0 as x*x but instead will do an expensive ...

2012-05-23 Thread Brandon Allbery
On Wed, May 23, 2012 at 10:19 PM, Bardur Arantsson wrote: > This has come up before -- this KC person probably has a broken mail > client which doesn't set appropriate References headers. > That, however, ignores the rest of it; the lack of references in this case forms a pattern with the other t

Re: [Haskell-cafe] [Haskell-beginners] Most C++ compilers will not optimize x^2.0 as x*x but instead will do an expensive ...

2012-05-23 Thread Brandon Allbery
On Wed, May 23, 2012 at 9:47 PM, KC wrote: > exponentiation and logarithm. > So, I believe this C++ versus Haskell versus (your language of choice) is > a Penn & Teller misdirection. > Whereas, another level of indirection solves everything. > Is it me or is this style of message — content broke

Re: [Haskell-cafe] import IO

2012-05-16 Thread Brandon Allbery
On Wed, May 16, 2012 at 3:32 PM, A Smith wrote: > Hi folks > I need a little help. > I had a hiccup upgrading my Ubuntu system, and eventually did a fresh > install. > Its mostly fixed to my old favourite ways but I cannot remember what's > needed to install the stuff that the "import IO" stateme

Re: [Haskell-cafe] Annoyed at System.Random

2012-05-04 Thread Brandon Allbery
On Fri, May 4, 2012 at 10:11 AM, Vincent Hanquez wrote: > For the language, i think assembly is a no-no with cabal, as such it need > to be embedded in gcc inline assembly if you want to have something that > works (unless there's a secret way to run assembler in a portable fashion > in cabal). >

<    1   2   3   4   >