Re: [Haskell-cafe] Re: Simple quirk in behavior of `mod`

2009-08-04 Thread Lennart Augustsson
That how I was taught to round in school, so it doesn't seem at all unusual to me. 2009/7/23 Matthias Görgens matthias.goerg...@googlemail.com: Round-to-even means x.5 gets rounded to x if x is even and x+1 if x is odd. This is sometimes known as banker's rounding. OK.  That's slightly

[Haskell-cafe] FFI: Problem with Signal Handler Interruptions

2009-08-04 Thread Levi Greenspan
Dear list members, In February this year there was a posting Why does sleep not work? (http://www.haskell.org/pipermail/haskell-cafe/2009-February/055400.html). The problem was apparently caused by signal handler interruptions. I noticed the same (not with sleep though) when doing some FFI work

[Haskell-cafe] Re: Proposal: TypeDirectedNameResolution

2009-08-04 Thread Heinrich Apfelmus
Henning Thielemann wrote: Heinrich Apfelmus schrieb: Note that there are alternative solution for this particular problem. For instance, a version of qualified with different semantics will do; something like this import Data.List import sometimes qualified Data.Map as Map

[Haskell-cafe] Re: Cyclic data declarations

2009-08-04 Thread Heinrich Apfelmus
Job Vranish wrote: I think that in an ideal world haskell would have some way of allowing infinite types if you asked for them explicitly (say in the type signature somehow) and then just automatically wrap/unwrap everything with newtypes behind the scenes (well maybe in an ideal world it

Re: [Haskell-cafe] ANNOUNCE: The Haskell Platform 2009.2.0.2

2009-08-04 Thread Andrew Coppin
Don Stewart wrote: andrewcoppin: Maybe I'm being dense... Is there somewhere which lists what's changed from the last release? Oh, sorry, that will be in the web announcement tomorrow. No problem. ;-) Given the Platform's aims, I think it would be a good idea to make it blindingly

Re: [Haskell-cafe] funct.prog. vs logic prog., practical Haskell

2009-08-04 Thread Peter Verswyvelen
On Sun, Aug 2, 2009 at 12:25 PM, Petr Pudlak d...@pudlak.name wrote: I'd like to convince people at our university to pay more attention to functional languages, especially Haskell. Their arguments were that (1) Functional programming is more academic than practical. (2) They are using

Re: [Haskell-cafe] Haskell interface files: Why used? What about same data in object files?

2009-08-04 Thread Malcolm Wallace
I am trying to understand the design of the Haskell interface files. Why are they a separate file rather than having the same data in the object file generated by the compiler? (Naively, it seems to me this would work also. Am I missing something?) Placing interface information into

[Haskell-cafe] Re: ANN: yst 0.2.1

2009-08-04 Thread spoon
This sounds great! I really like using yaml for web development. However, my last use case was for a non-techie, so I created a little desktop application for editing the yamlbase, if you excuse the neologism. I think it worked quite well, because the user was then presented with a friendly

Re: [Haskell-cafe] Haskell interface files: Why used? What about same data in object files?

2009-08-04 Thread Neil Mitchell
Hi Some good reasons for having a separate interface are:  they can be human-readable and human-writable (ghc's do not fulfill this criterion); they can be used to bootstrap mutually recursive modules in the absence of any object files (ghc uses .hs-boot files instead); other tools can

Re: [Haskell-cafe] Re: Cyclic data declarations

2009-08-04 Thread Job Vranish
In a lot of cases though annotating all the recursive aspects with newtypes is a _royal_ pain, and is even worse if you want the datatypes to be instances of common type classes like Functor, Applicative, etc... (try it sometime) I don't advocate allowing infinite types wholesale, just in specific

[Haskell-cafe] Re: Thinking about what's missing in our library coverage

2009-08-04 Thread John MacFarlane
+++ Don Stewart [Aug 03 09 22:53 ]: alexander.dunlap:          o pandoc — markdown, reStructuredText, HTML, LaTeX, ConTeXt, Docbook, OpenDocument, ODT, RTF, MediaWiki, groff No. Pandoc is too actively developed to go into the HP. It's also much more of an end-user application than a

[Haskell-cafe] Split package organization (AntTweakBar, Cabal, darcs)

2009-08-04 Thread Gregory D. Weber
I'm working on a Haskell binding for AntTweakBar, a light user interface for OpenGL applications (http://www.antisphere.com/Wiki/tools:anttweakbar). I have three questions about how to organize it as a Haskell package or packages, Cabal, and darcs. First, since AntTweakBar provides support for

Re: [Haskell-cafe] Re: Thinking about what's missing in our library coverage

2009-08-04 Thread Magnus Therning
On Tue, Aug 4, 2009 at 4:54 PM, John MacFarlanej...@berkeley.edu wrote: [..] In this connection, I want to make a general point about the HP: In a way, it doesn't matter so much which additional pure Haskell libraries it includes, because once you have cabal install, you can get anything

Re: [Haskell-cafe] Re: Thinking about what's missing in our library coverage

2009-08-04 Thread Max Rabkin
On Tue, Aug 4, 2009 at 6:13 PM, Magnus Therningmag...@therning.org wrote: AFAIU the plan is to separate GHC and its platform packages, so in the future it might not be that easy to get to the point where you _can_ run 'cabal install'. Absolutely not. The point of HP is to make the path from

Re: [Haskell-cafe] Re: Thinking about what's missing in our library coverage

2009-08-04 Thread Bulat Ziganshin
Hello John, Tuesday, August 4, 2009, 7:54:14 PM, you wrote: methods other than Deflate. A better solution, perhaps, would be a binding to libzip. it's hard to find feature list for libzip, but i suggest to look into 7zip library support. it supports lot of archive formats, including zip, rar,

Re: [Haskell-cafe] Re: Thinking about what's missing in our library coverage

2009-08-04 Thread Bryan O'Sullivan
On Mon, Aug 3, 2009 at 10:40 PM, Alexander Dunlap alexander.dun...@gmail.com wrote: o unicode text [text] [text-icu] — packed, unicode text This is essential, although I don't know if it is stable enough for the platform (?). I'm doing some cleaning up of the APIs at the moment

Re: [Haskell-cafe] Cyclic data declarations

2009-08-04 Thread Edward Kmett
There are a number of ways to fix this of various complexity, depending on how many kinds of statements you have in your language and how adverse you are to code duplication. One option is to remove the recursion from your statement type and to make a 'base functor' like you've proposed with your

Re: [Haskell-cafe] Re: Thinking about what's missing in our library coverage

2009-08-04 Thread Magnus Therning
Max Rabkin wrote: On Tue, Aug 4, 2009 at 6:13 PM, Magnus Therningmag...@therning.org wrote: AFAIU the plan is to separate GHC and its platform packages, so in the future it might not be that easy to get to the point where you _can_ run 'cabal install'. Absolutely not. The point of HP is to

Re: [Haskell-cafe] Re: Thinking about what's missing in our library coverage

2009-08-04 Thread Max Rabkin
On Tue, Aug 4, 2009 at 11:56 PM, Magnus Therningmag...@therning.org wrote: AIUI, on systems with working package managers, HP will be a metapackage which depends on the appropriate real packages. Yes, but again, the role of HP shouldn't be to limit the pain of installing bindings to C

[Haskell-cafe] Hackage Download Rankings August 2009

2009-08-04 Thread Don Stewart
Total package downloads on Hackage, by August 1 2009, http://www.galois.com/~dons/hackage/august-2009/popularity-august-2009.html All packages by month: http://www.galois.com/~dons/hackage/august-2009/hackage-august-2009.html Raw data:

[Haskell-cafe] A problem with bytestring 0.9.1.4 hGetBuf: invalid argument

2009-08-04 Thread kenny lu
Hi all, I've recently came across a problem when processing a large text file (around 2G in size). I wrote a Haskell program to count the number of lines in the file. module Main where import System import qualified Data.ByteString.Char8 as S -- import Prelude as S main :: IO () main = do {

Re: [Haskell-cafe] A problem with bytestring 0.9.1.4 hGetBuf: invalid argument

2009-08-04 Thread Don Stewart
haskellmail: Hi all, I've recently came across a problem when processing a large text file (around 2G in size). I wrote a Haskell program to count the number of lines in the file. module Main where import System import qualified Data.ByteString.Char8 as S -- import Prelude as S

Re: [Haskell-cafe] A problem with bytestring 0.9.1.4 hGetBuf: invalid argument

2009-08-04 Thread kenny lu
Oh right. Thanks for pointing out. :) On Wed, Aug 5, 2009 at 10:06 AM, Don Stewart d...@galois.com wrote: haskellmail: Hi all, I've recently came across a problem when processing a large text file (around 2G in size). I wrote a Haskell program to count the number of lines in the