Re: [Haskell-cafe] Array, Vector, Bytestring

2013-06-05 Thread Peter Simons
Hi Tom, thank you for the explanation. > I believe you are suggesting that there is redundancy in the > implementation details of these libraries, not in the APIs they > expose. I meant to say that there is redundancy in *both*. The libraries mentioned in this thread re-implement the same typ

Re: [Haskell-cafe] Array, Vector, Bytestring

2013-06-04 Thread Peter Simons
Hi Tom, > On Tue, Jun 04, 2013 at 04:01:37PM +0200, Peter Simons wrote: >> > How is this a problem? >> > >> > If you're representing text, use 'text'. >> > If you're representing a string of bytes, use 'bytestring'

Re: [Haskell-cafe] Array, Vector, Bytestring

2013-06-04 Thread Peter Simons
Hi Clark, > How is this a problem? > > If you're representing text, use 'text'. > If you're representing a string of bytes, use 'bytestring'. > If you want an "array" of values, think c++ and use 'vector'. the problem is that all those packages implement the exact same data type from scratch

Re: [Haskell-cafe] Packages in distro mentioned on hackage?

2013-04-30 Thread Peter Simons
Hi Magnus, > How does a distro get to be added like that? check out . Take care, Peter ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] What happened to http://hackage.haskell.org/platform/2010.2.0.0/cabal/haskell-platform-2010.2.0.0.tar.gz?

2013-04-03 Thread Peter Simons
Is it just me or have some of the old Haskell Platform releases disappeared from haskell.org? The 2010.x links from http://www.haskell.org/platform/prior.html also point to non-existent pages. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org htt

Re: [Haskell-cafe] Streaming bytes and performance

2013-03-19 Thread Peter Simons
Hi Don, > "Using this input file stored in /dev/shm" > > So not measuring the IO performance at all. :) of course the program measures I/O performance. It just doesn't measure the speed of the disk. Anyway, a highly optimized benchmark such as the one you posted is eventually going to beat on

Re: [Haskell-cafe] Streaming bytes and performance

2013-03-19 Thread Peter Simons
Hi Don, > Compare your program (made lazy) on lazy bytestrings using file IO: [...] if I make those changes, the program runs even faster than before: module Main ( main ) where import Prelude hiding ( foldl, readFile ) import Data.ByteString.Lazy.Char8 countSpace :: Int -> Char -> In

Re: [Haskell-cafe] Streaming bytes and performance

2013-03-19 Thread Peter Simons
Don Stewart writes: > Here's the final program: [...] Here is a version of the program that is just as fast: import Prelude hiding ( getContents, foldl ) import Data.ByteString.Char8 countSpace :: Int -> Char -> Int countSpace i c | c == ' ' || c == '\n' = i + 1 | oth

Re: [Haskell-cafe] Announce: Leksah 0.13.1 (a bit experimental)

2013-01-09 Thread Peter Simons
Hi Hamish, > Features in process-leksah have been merged into process. For newer > versions of GHC leksah-server just depends on process. I trust this applies to the unreleased beta version that you just announced, right? (The latest release versions still seem to depend on process-leksah.) In

Re: [Haskell-cafe] Announce: Leksah 0.13.1 (a bit experimental)

2013-01-07 Thread Peter Simons
Hi Hamish, would it be possible to get an update for process-leksah that works with recent versions of the 'filepath' package? I cannot build leksah-server with GCC 7.4.2 because of this issue. Take care, Peter ___ Haskell-Cafe mailing list Haskell-Ca

Re: [Haskell-cafe] How to determine correct dependency versions for a library?

2012-11-16 Thread Peter Simons
Hi Tobias, >> When such a situation has arisen in the past, it's my experience >> that the author of B typically releases an update to fix the issue >> with the latest version of C: >> >> B 2.5.4.0 build-depends: C >= 3.8 >> >> So that particular conflict does hardly ever occur in practic

Re: [Haskell-cafe] How to determine correct dependency versions for a library?

2012-11-16 Thread Peter Simons
Hi Tobias, > A 1.1.4.0 build-depends: B ==2.5.* C ==3.7.* (overspecified) > B 2.5.3.0 build-depends: C ==3.* (underspecified) > C 3.7.1.0 > > Everything works nice until C-3.8.0.0 appears with incompatible changes > that break B, but not A. > > Now both A and B have to update their depende

Re: [Haskell-cafe] How to determine correct dependency versions for a library?

2012-11-11 Thread Peter Simons
Hi Clark. > I think we just use dependencies [to specify] different things. If dependency version constraints are specified as a white-list -- i.e. we include only those few versions that have been actually verified and exclude everything else --, then we take the risk of excluding *too much*. T

Re: [Haskell-cafe] How to determine correct dependency versions for a library?

2012-11-09 Thread Peter Simons
Hi Clark, > It's not restrictive. how can you say that by adding a version restriction you don't restrict anything? > I just don't like to claim that my package works with major versions > of packages that I haven't tested. Why does it not bother you to claim that your package can *not* be

Re: [Haskell-cafe] How to determine correct dependency versions for a library?

2012-11-09 Thread Peter Simons
Hi Janek, > How to determine proper version numbers? if you know for a fact that your package works only with specific versions of its dependencies, then constrain the build to exactly those versions that you know to work. If *don't* know of any such limitations, then *don't* specify any constr

Re: [Haskell-cafe] GHC maintenance on Arch

2012-10-30 Thread Peter Simons
Hi Vagif, > I fail to see how a fringe bleeding edge linux distro undermines a > haskell platform. Arch Linux does not comply to the Haskell Platform. That fact communicates to users of the distribution: "We, the maintainers, don't believe that HP is relevant." Clearly, this undermines the Hask

Re: [Haskell-cafe] GHC maintenance on Arch

2012-10-29 Thread Peter Simons
Hi Timothy, the Haskell community is not the right audience to be addressing these complaints to. Instead, you should be talking to the ArchLinux developers, who are responsible for packaging Haskell-related software in the [core] and [extra] repositories. I am no expert in these matters, but my g

[Haskell-cafe] extensible-exceptions no longer a part of GHC 7.6.1?

2012-09-10 Thread Peter Simons
Hi, 'extensible-exceptions' used to be a part of GHC, but it appears that the package has been dropped from 7.6.1. Yet, the release notes on haskell.org don't say anything about this subject (other than TODO). Was that change intentional? Take care, Peter __

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

2012-07-24 Thread Peter Simons
Hi Brandon, > I think you'd have to install a separate ghc-mod binary for each one, > then, as it looks to me like ghc-mod is using ghc-as-a-library.  That > is, it actually has the compiler linked into itself. I see, thank you for the clarification. One more thing: I would like to configure

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

2012-07-23 Thread Peter Simons
Hi, 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 itself, but that is not the version I want it to use for sy

Re: [Haskell-cafe] ghc-7.4 on CentOS-5.8 ?

2012-06-27 Thread Peter Simons
Hi Johannes, > ghc-7.0 is working but when I use it to compile 7.4, > it breaks with some linker error (relocation R_X86_64_PC32 ...) > it also suggests "recompile with -fPIC" but I don't see how. I seem to remember that this is a problem with the old version of GCC that's used to build the co

Re: [Haskell-cafe] [Haskell] JustHub 'Sherkin' Release

2012-06-20 Thread Peter Simons
Hi Chris, I'm also wondering about this issue: >> - How do you handle packages that depend on system libraries? "hsdns", >> for example, requires the adns library to build. Does Hub know about >> this? Does Hub know about system-level libraries that Haskell packages need to build

Re: [Haskell-cafe] [Haskell] JustHub 'Sherkin' Release

2012-06-18 Thread Peter Simons
Hi Chris, > There is a worked out example at the bottom of the overview up on the > web site: http://justhub.org/overview thank you for the pointer, I think I found it: ^=7.4.1 List-0.4.2 fgl-5.4.2.4 hexpat-0.20.1 mtl-2.1.1 regex-base-0.93.2 regex-compat-0.95.1

Re: [Haskell-cafe] [Haskell] JustHub 'Sherkin' Release

2012-06-18 Thread Peter Simons
Hi Chris, > hub save project >project.har I am curious to see what this file looks like. Could you please post a short example of one? Take care, Peter ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/ha

Re: [Haskell-cafe] [Haskell] JustHub 'Sherkin' Release

2012-06-17 Thread Peter Simons
Hi Chris, >> How much time, approximately, did you spend working with Nix? >> 1 hour? 10 hours? 10 days? 10 months? > > You know that it is not 10 months. actually, no. I don't know that, which is why I asked. I find it hard to get an answer from you, though. It seems strange that you keep su

Re: [Haskell-cafe] [Haskell] JustHub 'Sherkin' Release

2012-06-15 Thread Peter Simons
Hi Chris, > I deatiled some of my trials with Nix -- I wasn't making it up! of course, I didn't mean to imply that you were. My question was phrased poorly, I am sorry. What I meant to ask is: how much time, approximately, did you spend working with Nix? 1 hour? 10 hours? 10 days? 10 months? T

Re: [Haskell-cafe] [Haskell] JustHub 'Sherkin' Release

2012-06-15 Thread Peter Simons
Hi Chris, > I cannot see how it can address any of the user-level Haskell package > database management and sandboxing mechanisms that I mentioned in the > announcement and subsequent emails. have you ever actually used Nix? Take care, Peter ___ H

Re: [Haskell-cafe] [Haskell] JustHub 'Sherkin' Release

2012-06-15 Thread Peter Simons
Hi Chris, > Where is this functionality provided by Nix? simply run these commands # Haskell Platform 2009.2.0.2 nix-env -p ~/ghc-6.10.4 -iA haskellPackages_ghc6104.haskellPlatform # Haskell Platform 2010.2.0.0 nix-env -p ~/ghc-6.12.3 -iA haskellPackages_ghc6123.haskellPlatform # Haskell

Re: [Haskell-cafe] Installing REPA

2012-04-07 Thread Peter Simons
Hi Ben, > Please try again now. thank you very much for the quick update! Everything installs fine now. I've also packaged the latest versions for NixOS. Take care, Peter ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org

Re: [Haskell-cafe] Subscriber-only lists as Maintainer contacts of Cabal packges

2012-04-07 Thread Peter Simons
Hi Joachim, > Please make sure the list is not set to subscriber only; it is an > unreasonable burden to subscribe for people who just want to send you > one question, and possibly have to contact dozends of different > package authors, e.g. as a distribution packager. +1 I have had that pro

Re: [Haskell-cafe] Installing REPA

2012-04-07 Thread Peter Simons
Hi Ben, > I've just pushed Repa 3 onto Hackage, which has a much better API > than the older versions, and solves several code fusion problems. when using the latest version of REPA with GHC 7.4.1, I have trouble building the repa-examples package: | Building repa-examples-3.0.0.1... | Prepr

Re: [Haskell-cafe] How to make asynchronous I/O composable and safe?

2012-01-14 Thread Peter Simons
Hi Daniel, > I've been trying to write networking code in Haskell too. I've also > come to the conclusion that channels are the way to go. isn't a tuple of input/output channels essentially the same as a stream processor arrow? I found the example discussed in the "arrow paper" [1] very enlight

Re: [Haskell-cafe] How to make asynchronous I/O composable and safe?

2012-01-14 Thread Peter Simons
Hi guys, >> I'm not happy with asynchronous I/O in Haskell. It's hard to reason >> about, and doesn't compose well. > > Async I/O *is* tricky if you're expecting threads to do their own > writes/reads directly to/from sockets. I find that using a > message-passing approach for communication

Re: [Haskell-cafe] ANN: wxHaskell 0.13.2

2012-01-07 Thread Peter Simons
Hi guys, > I am please to announce that wxHaskell 0.13.2 has just been uploaded > to Hackage. when I try to build the latest version on Linux/x86_64 running NixOS, I get the following error at configure time: Setup: Missing dependency on a foreign library: * Missing C library: wx_gtk2u

Re: [Haskell-cafe] Announce: The Haskell Platform 2011.4

2011-12-18 Thread Peter Simons
Hi guys, > We're pleased to announce the release of the Haskell Platform: a > single, standard Haskell distribution for everyone. Haskell Platform 2011.4 is fully supported on NixOS . Take care, Peter ___ Haskell-Cafe mailing lis

Re: [Haskell-cafe] [ANNOUNCEMENT] xmobar 0.14

2011-12-11 Thread Peter Simons
Hi Antoine, > What errors are you getting compiling with GHC 6.10.4? If its a small > thing I certainly don't mind patching things. I am sorry, my previous statement was inaccurate. Parsec 3.1.2 compiles fine, but the 'text' library -- on which Parsec depends -- does not. We can probably avoid

Re: [Haskell-cafe] [ANNOUNCEMENT] xmobar 0.14

2011-12-11 Thread Peter Simons
Hi Jose, > Peter, would using parsec 3.x be an acceptable solution to you? well, we can link xmobar with parsec 3.x on NixOS. The situation is tricky, though, because the latest version of parsec that we have, 3.1.2, doesn't compile with GHC 6.10.4 anymore, so we'd have to use some older version

Re: [Haskell-cafe] [ANNOUNCEMENT] xmobar 0.14

2011-12-10 Thread Peter Simons
Hi Jose, > I'm happy to announce the release of xmobar 0.14. previous versions of xmobar used to compile fine with GHC 6.10.4, but the new version no longer does: src/Parsers.hs:163:52: Couldn't match expected type `Char' against inferred type `[Char]' Expected type: GenPa

Re: [Haskell-cafe] problem with cabal install MissingH-1.1.1.0

2011-09-22 Thread Peter Simons
Hi Mariano, > I'm with mac OS X lion, ghc version 7.2.1 and when a i try to install > MissingH version 1.1.1.0 it fails with [...] that version of MissingH compiles fine on Linux, so I reckon the problem you're seeing is in some way specific to Darwin. Your best bet of getting a fix would be to

Re: [Haskell-cafe] ANN: cabal-ghci 0.1

2011-09-09 Thread Peter Simons
Hi Etienne, > Here is a helpful package I wrote to ease the development of projects > using cabal. thank you very much for this helpful tool! I notice that Haddock has trouble parsing the documentation: http://hackage.haskell.org/packages/archive/cabal-ghci/0.1/logs/failure/ghc-7.2 Is tha

Re: [Haskell-cafe] Off-topic: Mathematics

2011-08-30 Thread Peter Simons
Hi Andrew, > I know of several places where I can ask maths questions and half a > dozen people will take guesses at what the correct solution might be. > I haven't yet found anywhere where I can say "when would a > chi-squared test be more appropriate than a KS test?" and get an > informed,

[Haskell-cafe] Distributions link on Hackage

2011-08-11 Thread Peter Simons
Hi, the home page of a package on Hackage links to various distributions to show which versions are available, i.e. Fedora, Debian, FreeBSD, etc. In NixOS, we have fairly up-to-date package set, and I would like to see that distribution included on Hackage. Now I wonder how to get that done? Can

Re: [Haskell-cafe] Crypto-api performance

2011-05-05 Thread Peter Simons
Hi Matthew, > While I haven't investigated myself, from seeing haskell build processes > in the past this is almost certainly not crypto-api's fault and is in > fact your linker's fault. If you are not using it already, try switching > to gold over ld, it may help. well, memory consumption sk

Re: [Haskell-cafe] Crypto-api performance

2011-05-04 Thread Peter Simons
Also, it appears that crypto-api needs vast amounts of memory when compiled with optimization enabled. The latest version 0.6.1 is effectively unbuildable on my EeePC, which has only 1GB RAM. That property is fairly undesirable for a library package. Take care, Peter

Re: [Haskell-cafe] makeTokenParser + LanguageDef

2011-03-08 Thread Peter Simons
Hi Klaus, for what it's worth, you might want to consider using this package instead of Parsec: http://hackage.haskell.org/package/BNFC Take care, Peter ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/

Re: [Haskell-cafe] Why is there no "splitSeperator" function in Data.List

2011-02-14 Thread Peter Simons
Hi Evan, >>> The reason it's not in Data.List is because there are a bazillion >>> different splits one might want (when I was pondering the issue >>> before Brent released it, I had collected something like 8 >>> different proposed splits), so no agreement could ever be reached. >> >> It is

[Haskell-cafe] ArchLinux binary repository available for beta testing

2011-01-11 Thread Peter Simons
Hi guys, those of you who use the ArchLinux distribution might be interested to know that a team of volunteers has put together a binary package repository that complements the set of Haskell packages that's already being distributed by ArchLinux. Subscribers of that repository can use Pacman to i

Re: [Haskell-cafe] ANNOUNCE: storable-endian

2010-12-24 Thread Peter Simons
Hi guys, >> You could use ADNS.Endian.endian from package hsdns in your Setup.hs >> to define endianness at compile time. > > Cool, it's already there! However I would not recommend to let a > low-level library depend on a higher-level one. I think it would be > cleaner to move the ADNS.Endi

Re: [Haskell-cafe] GHC 7.0.1 developer challenges

2010-12-15 Thread Peter Simons
Hi John, > I think the previous responder was asserting the 32M limit, not you. I believe the previous poster suggested that you use ulimit to provide a hard upper bound for run-time memory use. That 32M figure seemed to be made up out of thin air just as an example to illustrate the syntax of t

Re: [Haskell-cafe] GHC 7.0.1 developer challenges

2010-12-14 Thread Peter Simons
Hi John, > On Mon, Dec 13, 2010 at 10:45 AM, Peter Simons wrote: > >> Relying exclusively on GHC's ability to limit run-time memory >> consumption feels like an odd choice for this task. It's nice that >> this feature exists in GHC, but it's inheren

Re: [Haskell-cafe] GHC 7.0.1 developer challenges

2010-12-13 Thread Peter Simons
Hi Mathieu, > Why don't you use ulimit for this job? > > $ ulimit -m 32M; ./cpsa yes, I was thinking the same thing. Relying exclusively on GHC's ability to limit run-time memory consumption feels like an odd choice for this task. It's nice that this feature exists in GHC, but it's inherently

Re: [Haskell-cafe] ANN: hledger 0.13

2010-12-09 Thread Peter Simons
Hi Simon, > [Are you] avoiding use of cabal-install and hackage entirely? yes, I'm trying to provide a package for hledger 0.13 that can be installed using ArchLinux's native package manager. The current version is available here: . > How did hl

Re: [Haskell-cafe] ANN: hledger 0.13

2010-12-07 Thread Peter Simons
Hi Simon, thank you very much for your efforts. I wonder whether there is any particular reason why hledger won't build with process-1.0.1.3? Take care, Peter ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listin

[Haskell-cafe] Re: Updating Haskell Packages through Archlinux becoming A Pain

2010-11-16 Thread Peter Simons
Hi Mathew, > [My GHC installation breaks] when pacman updates a package using an > AUR package, which cabal refuses to install because it can break > other packages (yet the package still gets installed according to > pacman). this bug has been fixed about two weeks ago; it should no longer o

[Haskell-cafe] Who manages ?

2010-11-04 Thread Peter Simons
Hi guys, a while ago, I created an account on Trac. Now, it seems that I've forgotten both the password and the e-mail address that I used at the time. I cannot log in, and I cannot make Trac send me the password either. Clearly, I need the help of a human being with administrator privileges to fi

[Haskell-cafe] Re: I/O performance drop in ghc 6.12.1

2010-01-14 Thread Peter Simons
Hi Svein, > Hold on, he's using hGetBuf/hPutBuf. exactly, that's what I was thinking. When a program requests that 'n' bytes ought to be read into memory at the location designated by the given 'Ptr Word8', how could GHC possibly do any encoding or decoding? That API doesn't allow for multi-byte

[Haskell-cafe] I/O performance drop in ghc 6.12.1

2010-01-14 Thread Peter Simons
Hi, I just updated to GHC 6.12.1, and I noticed a significant drop in I/O performance that I can't explain. The following code is a simple re-implementation of cat(1), i.e. it just echos all data from standard input to standard output: > module Main ( main ) where > > import System.IO > import Fo

Re: [Haskell-cafe] Functional MetaPost in 5 Steps

2008-10-28 Thread Peter Simons
Hi Robin, > [FuncMP problems with pdflatex] I have no experience whatsoever with pdflatex, I'm sorry, Funcmp works just fine for me in normal LaTeX, though. That's not exactly what you need, but from the sound of it, it might be step forward anyway. First of all, try writing the MetaPost files w

[Haskell-cafe] Re: [Haskell] Re: Streams: the extensible I/O library

2006-02-06 Thread Peter Simons
Hey Bulat, I tried removing the "import System.Win32", but unfortunately it only got me so far: | Examples$ ghc -i.. -O2 -funbox-strict-fields --make wc.hs -o wc | Chasing modules from: wc.hs | [ 1 of 16] Compiling System.FD( ../System/FD.hs, ../System/FD.o ) | | /tmp/ghc9376_0.hc:6

[Haskell-cafe] Re: binary IO

2005-12-30 Thread Peter Simons
Hi Bulat, >> general-purpose binary I/O library for Haskell. > > where i can find it? the module is available here: http://cryp.to/blockio/fast-io.html http://cryp.to/blockio/fast-io.lhs The article is incomplete and a bit messy, but the code works fine. Feedback and ideas for improvemen

[Haskell-cafe] Re: Haskell Speed

2005-12-29 Thread Peter Simons
Albert Lai writes: > For almost a decade, most (I dare claim even all) Pascal > and C compilers were "three-pass" or "two-pass". It means > perhaps the compiler reads the input two or three times > [...], or perhaps the compiler reads the input once, > produces an intermediate form and saves

[Haskell-cafe] Re: binary IO

2005-12-29 Thread Peter Simons
Bulat Ziganshin writes: > your BlockIO library is great, but it's usage is limited > to very specific sutuations - when we can save pass state > between processing of individual bytes In my experience, any other approach to I/O is slow. If you don't have an explicit state between processing of

[Haskell-cafe] Re: binary IO

2005-12-27 Thread Peter Simons
Joel Reymont writes: > I will have to leave this for a while. I apologize but > I'm more than a bit frustrated at the moment and it's not > fair of me to take it out on everybody else. Never mind. Haskell has a very high potential for frustrating newcomers. I went through the exact same experi

[Haskell-cafe] Re: binary IO

2005-12-27 Thread Peter Simons
Joel Reymont writes: > I would challenge everyone with a fast IO library to plug > it into the timeleak code, run it under a profiler and > post the results (report + any alarms). My guess is that you would learn more if _you_ would plug the different IO libraries into your test code. I'm cert

[Haskell-cafe] Re: Haskell Speed

2005-12-25 Thread Peter Simons
Tomasz Zielonka writes: >> wc :: String -> (Int, Int, Int) >> wc file = ( length (lines file) >> , length (words file) >> , length file >> ) > > I have a crazy idea: what if we computed all three length > applications concurrently, with the RTS preempting the

[Haskell-cafe] Re: Haskell Speed

2005-12-25 Thread Peter Simons
Paul Moore writes: > It would be interesting to see standalone code for wcIOB > (where you're allowed to assume that any helpers you > need, like your block IO library, are available from the > standard library). This would help in comparing the > "obviousness" of the two approaches. A simpl

[Haskell-cafe] Re: Haskell Speed

2005-12-23 Thread Peter Simons
Daniel Carrera writes: > when I have a simple algorithm and performance is an > issue [...] I'd use C. You don't have to. You can write very fast programs in Haskell. I never really finished the article I wanted to write about this subject, but the fragment I have might be interesting or even

[Haskell-cafe] Re: Haskell Speed

2005-12-23 Thread Peter Simons
Daniel Carrera writes: > If the results could be trusted, they would be useful. > You could balance the expected loss in performance > against other factors (e.g. speed of development). How do you measure the time it takes to come up with a QuickSort algorithm that, implemented in Haskell, cru

[Haskell-cafe] Re: Haskell Speed

2005-12-23 Thread Peter Simons
Daniel Carrera writes: > http://shootout.alioth.debian.org/ > > It looks like Haskell doesn't do very well. It seems to be > near the bottom of the pile in most tests. Is this due to > the inherent design of Haskell or is it merely the fact that > GHC is young and hasn't had as much time to

[Haskell-cafe] Re: Tutorial uploaded

2005-12-21 Thread Peter Simons
> Some example for writing a text the IO oriented way: > do putStrLn "bla" > replicateM 5 (putStrLn "blub") > putStrLn "end" > > whereas the lazy way is > putStr (unlines (["bla"] ++ replicate 5 "blub" ++ ["end"])) Um, maybe it's just me, but I think the first program is far s

[Haskell-cafe] Re: Tutorial uploaded

2005-12-20 Thread Peter Simons
Daniel Carrera writes: > I'm scared of monads :) I really don't know what a monad > is. Neither do I, but that doesn't mean that I can't use just fine. ;-) >> putStrLn :: String -> World -> World > > That seems less scary. Things become a lot clearer when you think about how to print _two

[Haskell-cafe] Re: Tutorial uploaded

2005-12-20 Thread Peter Simons
> == So how do I write "Hello, world"? == > > Well, the first thing you need to understand that in a > functional language like Haskell, this is a harder > question than it seems. Most of the code you will write > in Haskell is "purely functional", which means that it > returns the same thin

[Haskell-cafe] Re: module names

2005-12-17 Thread Peter Simons
Scherrer, Chad writes: > When I'm using ghci, I have lots of modules that I > sometimes want to load "as Main", and sometimes I only > want them loaded as a dependency from another module. > Currently, I have to go into each file to change the > "module Foo where" line to do this. Maybe the

[Haskell-cafe] Re: syscall, sigpause and EINTR on Mac OSX

2005-12-11 Thread Peter Simons
Joel Reymont writes: > How do I get a threaded+debug runtime? You have to build GHC from source code for that. When you do, make sure your ${srcdir}/ghc/mk/build.mk file contains: GhcRTSWays += thr_debug Peter ___ Haskell-Cafe mailing list Haskell

[Haskell-cafe] Re: [Newbie] Why or why not haskell ?

2005-12-10 Thread Peter Simons
Christophe Plasschaert writes: > With erlang or haskell, can we play with or implement > lower network fuction (routing daemon interacting with a > kernel) [...] I can't speak for Erlang, but in Haskell you can. Through the Foreign Function Interface, you can access arbitrary 3rd-party librari

[Haskell-cafe] Re: Network parsing and parsec

2005-09-15 Thread Peter Simons
John Goerzen writes: > With networking, you must be careful not to attempt to > read more data than the server hands back, or else you'll > block. [...] With a protocol such as IMAP, there is no > way to know until a server response is being parsed, how > many lines (or bytes) of data to read

[Haskell-cafe] Re: Creating a Haskell section in Autoconf Macro Archive

2005-08-12 Thread Peter Simons
David Roundy writes: > I'm happy of course to have darcs' autoconf macros > included, I'm just not too likely to find time to do it > myself. :) I have the same problem, which is why I hoped someone would help with the effort. ;-) Peter ___ Haskell

[Haskell-cafe] Creating a Haskell section in Autoconf Macro Archive

2005-08-12 Thread Peter Simons
Fellow Haskell'ers, I've been maintaining the site for a while now, and I can't help but notice that there is no Haskell section. I know that GHC comes with a lot of useful Haskell-related Autoconf macros, so does Darcs, and so do a lot of other projects too. Thu

[Haskell-cafe] Re: Creating a Haskell app to do crosstabs

2005-08-11 Thread Peter Simons
Bulat Ziganshin writes: > afaik Spirit is modeled after ParseC (parsing combinators) > haskell library and Phoenix was needed for this library > because parser combinators require lazy functional language to > work :) Just a minor nit: the Phoenix library has nothing to do with parsing. It's

[Haskell-cafe] Re: cabal --user question

2005-07-11 Thread Peter Simons
Isaac Jones writes: > ./setup configure --user #if it depends on user-local packages > ./setup build > ./setup install --user > Perhaps install --user should be the default if you > configure --user. Yes, I think that would be more intuitive. It would also be nice to be able to configure Ca

[Haskell-cafe] HaXml (was: Processing a file with HaXml ...)

2005-06-02 Thread Peter Simons
Graham Klyne writes: > http://www.ninebynine.org/Software/HaskellUtils/HaXml-1.12/ > This code is all heavily refactored from the original > HaXml for improved XML entity handling, namespace, > xml:lang and xml:base support [...]. Is there any chance of reuniting the two HaXml versions into

[Haskell-cafe] Re: CGI module almost useless

2005-06-01 Thread Peter Simons
John Goerzen writes: > Is there a better CGI module out there somewhere [...]? http://cryp.to/formdata/ The module addresses your points insofar as that it doesn't prohibit you from solving them yourself -- like Network.CGI does. Patches to improve (read: add) documentation would be very welcom

[Haskell-cafe] Re: Unexported functions are evil

2005-05-17 Thread Peter Simons
Iavor Diatchki writes: >> Do you have an concrete example which illustrates this >> point? > [...] consider a file A.hs that defines some data type T > and exports a function "f" that is defined in terms of a > private function "g". Now if we place "g" in a file > called "Private.hs" then A

[Haskell-cafe] Re: Unexported functions are evil

2005-05-17 Thread Peter Simons
Thanks for your opinions everybody! Ketil Malde writes: > I guess you could sometimes have name clashes as well? I was afraid about those for the longest time too, but in practice name clashes curiously enough hardly ever occur -- in my experience. The problem only arises when you actually _us

[Haskell-cafe] Unexported functions are evil

2005-05-15 Thread Peter Simons
Please pardon the tendentious subject, but I felt like making a clear statement. ;-) I was wondering: Is there any reason why you would have a function in one of your modules and _not_ export it? I ask because I have _never_ had problems with a module exporting too much, but I have had problems w

[Haskell-cafe] Re: NumberTheory library

2005-05-04 Thread Peter Simons
The list found at http://haskell.org/libraries/#numerics might be a good starting point for finding what you need. I can recommend the "DoCon" library, which is pretty sophisticated. Another good choice might be the crypto library available at: http://www.haskell.org/crypto/ It also includ

[Haskell-cafe] Re: Where do you use Haskell?

2005-05-03 Thread Peter Simons
Daniel Carrera writes: > So, I'm tempted to conclude that FP is only applicable to > situations where user interaction is a small part of the > program. For example, for simulations. I can't confirm that. I've written several I/O-intensive applications in Haskell, including full-blown network

[Haskell-cafe] Re: Random State Monad and Stochastics

2005-05-02 Thread Peter Simons
Dominic Steinitz writes: > I don't think they are in the standard libraries but > there was some discussion about them a few months ago but > I couldn't find a reference. > Peter, Can you supply one? Naturally. ;-) The discussion started here: http://www.haskell.org//pipermail/libraries/2

[Haskell-cafe] Re: fptools in darcs now available

2005-04-29 Thread Peter Simons
Simon Marlow writes: > if I just want to check out e.g. Haddock, I have to get > the entire fptools repo (350M+, wasn't it?). I guess the "best" way to do that with Darcs would be to (1) pull the fp-tools repository, (2) delete all files you don't need for Haddock, (3) pull that into your H

[Haskell-cafe] Re: about Ghci

2005-04-28 Thread Peter Simons
SCOTT J writes: > What do I have to do in order not having to type always > :set -fglasgow-exts Add the line {-# OPTIONS -fglasgow-exts #-} at the top of the source code. Then the flag will be set when you load the module. This works for all kind of settings: http://haskell.org/ghc/docs

[Haskell-cafe] Re: Closest analog to popen()

2005-04-14 Thread Peter Simons
Dimitry Golubovsky writes: >> System.Process.runInteractiveCommand > Is this available only in 6.4? Yes, I think so. The module's source code was posted to the -libraries mailing list a while ago, but GHC 6.4 is the first release to ship it. Peter

[Haskell-cafe] Re: Closest analog to popen()

2005-04-13 Thread Peter Simons
Dimitry Golubovsky writes: > Does there exist any analog of popen in the standard Haskell libraries? Maybe System.Process.runInteractiveCommand is what you need? http://haskell.org/ghc/docs/latest/html/libraries/base/System.Process.html Peter ___

[Haskell-cafe] Re: Strange HTTP module behavior [PATCH]

2005-02-19 Thread Peter Simons
John Goerzen writes: > Which arguably is not what one would expect recv to do, > and in any case is undocumented at > http://www.haskell.org/ghc/docs/latest/html/libraries/network/Network.Socket.html#v%3Arecv Someone correct me if I am wrong, but I think that _all_ I/O functions may throw an E

[Haskell-cafe] Re: Literate Haskell

2005-02-19 Thread Peter Simons
Dmitri Pissarenko writes: > I'm curious what experienced Haskellers think about using > literate Haskell in daily work. My experience is that literate-style documentation tends to be out-of-sync or misleading as quickly as any other kind of documentation. It doesn't matter that much whether you

[Haskell-cafe] Re: Parsing in Haskell

2005-02-15 Thread Peter Simons
Johan Glimming writes: > What is the best way of replacing yacc/bison and (f)lex when > migrating the project into Haskell? My favorite tool for writing parsers is this one: http://www.cs.chalmers.se/~markus/BNFC/ You give it a grammar in BNF notation, and it will generate parsers and appro

[Haskell-cafe] Re: Point-free style

2005-02-10 Thread Peter Simons
Jan-Willem Maessen writes: > Is it really clear or obvious what > >map . (+) > > means? Yes, it is perfectly obvious once you write it like this: incrEach :: Integer -> [Integer] -> [Integer] incrEach = map . (+) Now compare that to the following function, which does the some thing

[Haskell-cafe] Re: File path programme

2005-02-02 Thread Peter Simons
Glynn Clements writes: >> Well, there is a sort-of canonic version for every path; >> on most Unix systems the function realpath(3) will find >> it. My interpretation is that two paths are equivalent >> iff they point to the same target. > I think that any definition which includes an "iff"

[Haskell-cafe] Re: File path programme

2005-01-31 Thread Peter Simons
Sven Panne writes: > OK, but even paths which realpath normalizes to different > things might be the same (hard links!). Sure, but paths it normalizes to the same thing almost certainly _are_ the same. ;-) That's all I am looking for. In general, I think path normalization is a nice-to-have fea

[Haskell-cafe] Re: File path programme

2005-01-31 Thread Peter Simons
Sven Panne writes: > Hmmm, I'm not really sure what "equivalence" for file > paths should mean in the presence of hard/symbolic links, > (NFS-)mounted file systems, etc. Well, there is a sort-of canonic version for every path; on most Unix systems the function realpath(3) will find it. My inte

[Haskell-cafe] Re: File path programme

2005-01-31 Thread Peter Simons
Robert Dockins writes: > 1) File names are abstract entities. There are a number of > ways one might concretely represent a filename. Among these > ways are: > >a) A contiguous sequence of octets in memory > (C style string on most modern hardware) >b) A sequenc

  1   2   >