Re: [Haskell-cafe] real-time audio processing [Was: can Haskell doeryting as we want?]

2010-08-04 Thread Henning Thielemann
On Wed, 4 Aug 2010, Don Stewart wrote: job.vranish: Hmm, it looks like the HASP project is working on some of this, though I'm not sure how portable their work is back to GHC: http://hasp.cs.pdx.edu/ Or look at EDSLs, like Atom: http://hackage.haskell.org/package/atom Maybe Feldspar,

Re: [Haskell-cafe] real-time audio processing

2010-08-04 Thread Henning Thielemann
On Wed, 4 Aug 2010, Stephen Sinclair wrote: On Aug 3, 8:31 pm, Jeremy Shaw wrote:  The only area I have had any trouble with Haskell is doing realtime music synthesis. And only because the garbage collector is not realtime friendly. That is not unfixable though. However, I am thinking that th

Re: [Haskell-cafe] Maybe to Either -- is there a better way?

2010-08-04 Thread Henning Thielemann
Ivan Lazar Miljenovic schrieb: > Yitzchak Gale writes: >> While useful, I think its ubiquity to simplicity ratio is not >> high enough to justify either depending on MissingH >> just for that, or adding it to a base library. > > Just like the swap :: (a,b) -> (b,a) function a lot of people were

Re: [Haskell-cafe] Re: Microsoft's Singularity Project and Haskell

2010-08-02 Thread Henning Thielemann
David Leimbach schrieb: > Haskell's great and all but it does have a few warts when it comes to > how much real trust one should put into the type system. > > Some compromises still exist like unsafePerformIO that you can't detect > simply by looking at the types of functions. > > In order to li

Re: [Haskell-cafe] Laziness question

2010-07-31 Thread Henning Thielemann
michael rice schrieb: > So, g is stricter than f? > > Wouldn't both functions need to evaluate x to the same level, *thunk* : > *thunk* to insure listhood? No. :-) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/l

Re: [Haskell-cafe] Announce type-level-natural-number-1.0: Simple, Haskell 2010-compatible type level natural numbers

2010-07-30 Thread Henning Thielemann
On Fri, 30 Jul 2010, John Meacham wrote: Heh. I was just thinking I needed type level naturals last night at the pub. I thought about type level naturals yesterday when working with HList and found that HList's dependency on TemplateHaskell is quite heavy. I wanted to support gcc's vector

Re: [Haskell-cafe] dear traversable

2010-07-30 Thread Henning Thielemann
On Fri, 30 Jul 2010, Ben wrote: dear traversable geniuses -- i am looking for "better" implementations of unzipMap :: M.Map a (b, c) -> (M.Map a b, M.Map a c) unzipMap m = (M.map fst m, M.map snd m) Maybe: mapPair (M.fromAscList, M.fromAscList) $ unzip $ map (\(a,(b,c)) -> ((a,b), (a

Re: [Haskell-cafe] OpenGL Speed!

2010-07-30 Thread Henning Thielemann
On Fri, 30 Jul 2010, Eitan Goldshtrom wrote: HGL actually looks like EXACTLY what I need. I only need to set pixels, which looks like just what HGL would be good at. Only problem is that I can't find a single tutorial for HGL. Does anyone know or any, or where I could find one? I found the

Re: [Haskell-cafe] OpenGL Speed!

2010-07-30 Thread Henning Thielemann
Vo Minh Thu schrieb: > There other possibilities to deal with raster graphics: > - Use gtk; i.e. something like > http://hackage.haskell.org/package/AC-EasyRaster-GTK > - Output the data in some image format (if you want to do it yourself, > the most simple is PPM) > - Use X11 directly (if you're

Re: [Haskell-cafe] fine control of bytestring streaming

2010-07-27 Thread Henning Thielemann
On Tue, 27 Jul 2010, Alberto G. Corona wrote: The question is: are there some way to control bytestring streaming?. Can It be done without the stream handler? I think there is a function that converts a lazy ByteString to a list of strict ByteStrings, that should work without copying the ch

Re: [Haskell-cafe] monoids and monads

2010-07-27 Thread Henning Thielemann
John Lato schrieb: > Hello, > > I was wondering today, is this generally true? > > instance (Monad m, Monoid a) => Monoid (m a) where > mempty = return mempty > mappend = liftM2 mappend > > I know it isn't a good idea to use this instance, but assuming that > the instance head does what I me

Re: [Haskell-cafe] monoids and monads

2010-07-27 Thread Henning Thielemann
John Lato schrieb: > Hello, > > I was wondering today, is this generally true? > > instance (Monad m, Monoid a) => Monoid (m a) where > mempty = return mempty > mappend = liftM2 mappend > > I know it isn't a good idea to use this instance, but assuming that > the instance head does what I me

Re: [Haskell-cafe] Instances for Set of Functor, Traversable?

2010-07-26 Thread Henning Thielemann
On Mon, 26 Jul 2010, Gregory Crosswhite wrote: Is there a specific reason why Set doesn't have instances for Functor and Traversable? Sure, fmap needs an Ord restriction for the element type, which is not possible for the plain Functor constructor class. E.g. in fmap (const 'a') set all

Re: [Haskell-cafe] Porting ELF statifier to Haskell!

2010-07-24 Thread Henning Thielemann
C K Kashyap schrieb: > Hi, > At my work we ran into a situation where we started wishing there was a > way to take a dynamically linked executable and create a statically > linked bundle out of it. Little bit of googling got me to statifier - > http://statifier.sourceforge.net/statifier/main.html.

Re: [Haskell-cafe] bounded ranges

2010-07-22 Thread Henning Thielemann
On Thu, 22 Jul 2010, Chad Scherrer wrote: Hello cafe, I'm trying to do some things with bounded indices so I can carry around arrays (well, Vectors, really) without needing to refer to the bounds. For example, if I know my indices are Bool values, I can do rangeSize (minBound, maxBound :: B

Re: [Haskell-cafe] Plotting Vectors with GnuPlot Wrapper

2010-07-17 Thread Henning Thielemann
Maryam Moghadas schrieb: > Hi > When I use Vectors as a PlotStyle in Graphics.Gnuplot.Simple, the output > curve.gp and curve0.csv is not generated correctly. > For example when I write in ghci: > > plotPathStyle [] (PlotStyle Vectors (DefaultStyle 1)) [(1,1),(2,7)] Yes, my wrap

Re: [Haskell-cafe] ByteString, zipWith', and rewrite rules

2010-07-13 Thread Henning Thielemann
Thomas M. DuBuisson wrote: Comments on the zipWith' function inside of Data.ByteString say: -- Rewrite rules -- are used to automatically covert zipWith into zipWith' when a pack is -- performed on the result of zipWith. This is only true internally to Data.ByteString because the zipWith' funct

Re: [Haskell] Re: [Haskell-cafe] ANN: HaRe-0.6, now on Hackage

2010-07-10 Thread Henning Thielemann
Chris BROWN schrieb: > Daniel, Ivan, >>> >>> >>> >>> One comment on your .cabal file: it's usually preferred to write "base >>> = 3 && <5" rather than "base >= 3 && <= 4". >> >> In particular if e.g. base-4.2.0.0 doesn't fall in the latter range. >> I don't know how exactly Cabal interprets th

Re: [Haskell-cafe] Transformers versus monadLib versus...

2010-07-10 Thread Henning Thielemann
On Mon, 5 Jul 2010, Gregory Crosswhite wrote: Hey everyone, What is the current state regarding transformers versus monadLib versus mmtl versus ... etc.? Transformers seems to be the "blessed" replacement for mtl, so when is it worthwhile to use the other libraries instead? I like 'transfor

Re: [Haskell-cafe] What is Haskell unsuitable for?

2010-07-08 Thread Henning Thielemann
On Tue, 6 Jul 2010, Edward Kmett wrote: > While we're on the topic, does anyone else get funny looks when they > say "monads"? Sadly, yes. ;) There is no need anymore to bother people with the word "monad": http://www.haskell.org.monadtransformer.parallelnetz.de/haskellwiki/Category:Mona

Re: [Haskell-cafe] reading and playing music openAL

2010-07-07 Thread Henning Thielemann
On Tue, 6 Jul 2010, Maria Gabriela Valdes wrote: Hi ! We have a question about about openAL. We would like to know if anybody knows how to read a WAV file by chunks of a determined size, and after doing some processing with a specific chunk send that same chunk back to the sound card so we ca

Re: [Haskell-cafe] ANNOUNCE: ghc-gc-tune: a tool for analyzing the impact of GC flags

2010-07-06 Thread Henning Thielemann
Andrew Coppin schrieb: > I've always thought of compiler flags as being a fairly imprecise tool. > For example, -funbox-strict-fields applies a particular transformation > to EVERY STRICT FIELD IN THE ENTIRE PROGRAM. Which is fine if it's > always a win - but then, if it were always a win, there w

Re: [Haskell-cafe] music-related problem

2010-07-04 Thread Henning Thielemann
On Sun, 4 Jul 2010, Stephen Tetley wrote: If you add Rest as an alternative constructor to Item you should be able to attribute Items with their duration rather than their onset position. For most processing this would simplify things. This is also the way, Haskore organizes its data, but Has

Re: [Haskell-cafe] music-related problem

2010-07-04 Thread Henning Thielemann
On Sun, 4 Jul 2010, Michael Mossey wrote: Serguey Zefirov wrote: The thing that is hard for me to understand is how, in a functional paradigm, to update the entire Doc by chasing down every tie and making all necessary updates. This looks like one of graph algorithms. Notes are nodes, ties

Re: [Haskell-cafe] music-related problem

2010-07-04 Thread Henning Thielemann
On Sun, 4 Jul 2010, Michael Mossey wrote: I can solve a simpler problem which is -- Given a note with tieNext set, and a list of notes, find -- the end Loc of the last note in the chain. Only notes -- with the same pitch as 'firstNote' are considered when looking -- for the chain of notes. com

Re: [Haskell-cafe] Space leak with unsafePerformIO

2010-06-28 Thread Henning Thielemann
On Sun, 27 Jun 2010, Henning Thielemann wrote: Maybe I can combine splitAtLazy and (++) to a function like splitAtAndAppend :: [x] -> ([a] -> [b]) -> ([a] -> [b]) -> [a] -> [b] but I'm afraid I will need pairs temporarily and then I run into the same problems. I

Re: [Haskell-cafe] GHCi and State

2010-06-28 Thread Henning Thielemann
On 25.06.2010 11:07, corentin.dup...@ext.mpsa.com wrote: 2. For now, the game is more or less playable in GHCi. But my concern is: When you use GHCi, you are in the IO monad, right? How to had state to this monad? I would like that the player can compose his rule in GHCi, and when he is done,

Re: [Haskell-cafe] Space leak with unsafePerformIO

2010-06-27 Thread Henning Thielemann
On Sun, 27 Jun 2010, Bertram Felgenhauer wrote: If the compiler had produced Main.lvl3 = case Main.ds of wild_Xw { (prefix_aCf, suffix_aCh) -> suffix_aCh } Main.lvl4 = Main.go1 Main.lvl3 instead, then there would not be a leak. This whole record selector thunk business is very fra

[Haskell-cafe] Space leak with unsafePerformIO

2010-06-26 Thread Henning Thielemann
Attached is a program with a space leak that I do not understand. I have coded a simple 'map' function, once using unsafePerformIO and once without. UnsafePerformIO has a space leak in some circumstances. In the main program I demonstrate cases with and without space leak. Without space leak the pr

Re: [Haskell-cafe] Re: ANN: bitspeak 0.0.1

2010-06-24 Thread Henning Thielemann
On Mon, 21 Jun 2010, Maurí­cio CA wrote: bitspeak is a small proof of concept application that allows writing text using only two commands (yes/no, 1/2, top/down etc.). Looks cool! Did you forget any dependencies tho? I get the following error: Oops... Three modules ended up missing in .ca

Re: [Haskell-cafe] Re: What is Haskell unsuitable for?

2010-06-18 Thread Henning Thielemann
Maciej Piechotka schrieb: > 1. Glueing a few highier level, object-oriented libraries if it is just > glueing. > > 2. (Currently) AFAIK real-time applications although it is rather > property of GHC GC then the language itself In my experience the garbage collector was not the problem in real-ti

Re: [Haskell-cafe] What is Haskell unsuitable for?

2010-06-17 Thread Henning Thielemann
On Wed, 16 Jun 2010, Marc Weber wrote: Hi Aditya Siram, - maybe shell scripting: running ghci takes longer than starting bash. Compiling is not always an option because executables are bigger than shell scripts or C executables Is Hugs better in this respect? __

[Haskell-cafe] Re: [Haskell] ANNOUNCE: Sifflet visual programming language, release 0.1.7

2010-06-11 Thread Henning Thielemann
On Fri, 11 Jun 2010, Ben Millwood wrote: On Fri, Jun 11, 2010 at 2:52 PM, Henning Thielemann wrote: I'm uncertain whether fgl conforms to the package versioning policy, but if it does, then changes in its Cabal file should not bother sifflet. Thus upper bound fgl < 5.4.3 s

[Haskell-cafe] Re: package naming policy

2010-06-11 Thread Henning Thielemann
On Tue, 8 Jun 2010, Don Stewart wrote: Great points: I've added them to this wiki page of for and against points: http://haskell.org/haskellwiki/Libraries/WhenToRewriteOrRename Please add points as you see fit, and maybe we can come up with a mitigation/change plan. Closely related is th

Re: [Haskell-cafe] Re: Re: Difference between div and /

2010-06-03 Thread Henning Thielemann
On Thu, 3 Jun 2010, Maciej Piechotka wrote: Hmm. Thanks - however I fail to figure out how to do something like: "generate a random number with normal distribution with average avg and standard deviation stdev". Unfortunately the package is restricted to discrete distributions so far. __

Re: [Haskell-cafe] Re: Difference between div and /

2010-06-02 Thread Henning Thielemann
Richard O'Keefe schrieb: > > On Jun 3, 2010, at 1:13 AM, Maciej Piechotka wrote: > >> On Wed, 2010-06-02 at 14:01 +1200, Richard O'Keefe wrote: >>> For what applications is it "useful" to use the same symbol >>> for operations obeying (or in the case of floating point >>> operations, *approximati

Re: [Haskell-cafe] Re: Difference between div and /

2010-06-02 Thread Henning Thielemann
Sorry, I missed this post. Maciej Piechotka schrieb: > Well - i tried to write some package dealing with distributions etc. > > If you have something like that: > > instance ... => Distribution (Linear a) a where > rand (Linear f s) g = > let (gf, gt) = genRange g > (v

Re: [Haskell-cafe] Re: Difference between div and /

2010-06-02 Thread Henning Thielemann
On Wed, 2 Jun 2010, Maciej Piechotka wrote: On Wed, 2010-06-02 at 14:01 +1200, Richard O'Keefe wrote: For what applications is it "useful" to use the same symbol for operations obeying (or in the case of floating point operations, *approximating* operations obeying) distinct laws? If the giv

Re: [Haskell-cafe] PDF generation?

2010-06-01 Thread Henning Thielemann
On Tue, 1 Jun 2010, Jim Tittsler wrote: What is the easiest way to create PDF files from Haskell? Is gtk2hs's PDF output the preferred way? I have successfully used HPDF for http://hackage.haskell.org/package/internetmarke Certainly there could be some improvements to HPDF's API interfac

[Haskell-cafe] Re: The state of Hackage: what are we doing about it?

2010-06-01 Thread Henning Thielemann
Marc Weber schrieb: > Excerpts from Don Stewart's message of Tue Jun 01 01:13:20 +0200 2010: >> I see fairly regular complaints about too many Haskell libraries, >> bewildering choice of difficult-to-determine quality. > > I want to send a small reminder that there was the idea adding a public > w

Re: [Haskell-cafe] Wire GUI

2010-05-30 Thread Henning Thielemann
Andrew Coppin schrieb: > I'm looking at a project which involves a GUI where you can insert > components and wire up connections between them. Obviously the details > of what the components are and what code gets executed for them is > domain-specific, however the general idea of graphically wiring

Re: [Haskell-cafe] MultiParamClasses question

2010-05-25 Thread Henning Thielemann
On Tue, 25 May 2010, Eugeny N Dzhurinsky wrote: I'm trying to create set of polymorphic functions for working with custom containers. I decided to try out typeclass and define generic function, which uses the methods from the typeclass. The quick and naive solution is listed below: There are

Re: [Haskell-cafe] Declaring a tuple of instances of Enums as an instance of the Enum class

2010-05-25 Thread Henning Thielemann
Daniel Fischer schrieb: > On Sunday 23 May 2010 15:33:58, Ivan Lazar Miljenovic wrote: >> R J writes: >>> Say I've got a type "Month" declared as an instance of the "Enum" >>> class, and a type "MonthPair" declared as a pair of months: >>> data Month = January | February | March | April | May | Ju

Re: [Haskell-cafe] Haskell SVG path parser?

2010-05-24 Thread Henning Thielemann
On Mon, 24 May 2010, Dimitry Golubovsky wrote: Henning, Thanks, I'll try to use your code. BTW does it handle the syntax where repeated operation is omitted, per SVG spec 8.3.1? Don't know, I just wrote the little parser in a way that it could handle my example SVG file. :-) _

Re: [Haskell-cafe] Haskell SVG path parser?

2010-05-24 Thread Henning Thielemann
On Mon, 24 May 2010, Dimitry Golubovsky wrote: Does there exist any Haskell package/library to parse the syntax of SVG elements, esp. PATH? That is, the syntax of the "d" attribute (e. g. M 100 100 L 300 100 L 200 300 z)? Hackage doesn't seem to have any, and Google search yields very broad r

Re: [Haskell-cafe] double2Float is faster than (fromRational . toRational)

2010-05-21 Thread Henning Thielemann
On Fri, 21 May 2010, Daniel van den Eijkel wrote: Dear Haskellers, I just want to share an observation. I had to convert a Double to a Float value in an inner loop of an application, and I used somethin like this: xf = (fromRational $ toRational xd) :: Float I think realToFrac is the func

Re: [Haskell-cafe] TagSoup 0.9

2010-05-19 Thread Henning Thielemann
Don Stewart schrieb: > Or use things from the download-curl package, which provides a nice > openURL function. The openURL function from TagSoup is lazy, which the proposed replacement 'getResponseBody =<< simpleHTTP (getRequest x)' is not. Is the openURL function from download-curl lazy? ___

[Haskell-cafe] Re: [Haskell] ANNOUNCE: Introducing Sifflet, visual functional programming language

2010-05-15 Thread Henning Thielemann
Gregory D. Weber schrieb: > Introducing Sifflet -- version 0.1.5, first public release! > > Sifflet is a visual, functional programming language. Cool - when do we get something like Gem Cutter? :-) http://resources.businessobjects.com/labs/cal/gemcutter-techpaper.pdf __

Re: [Haskell-cafe] Speed of Error handling with Continuations vs. Eithers

2010-05-14 Thread Henning Thielemann
On Mon, 10 May 2010, Max Cantor wrote: Based on some discussions in #haskell, it seemed to be a consensus that using a modified continuation monad for Error handling instead of Eithers would be a significant optimization since it would eliminate a lot of conditional branching (everytime >>= i

Re: [Haskell-cafe] Re: What do _you_ want to see in FGL?

2010-05-14 Thread Henning Thielemann
Heinrich Apfelmus schrieb: > Ivan Miljenovic wrote: >> I'm not sure I understand what you're saying here: first you said you >> wanted to be able to specify a vertex type, now you're saying that you >> don't want to know what the vertex type even is (except that it's some >> abstract Node type)?

Re: [Haskell-cafe] Re: What do _you_ want to see in FGL?

2010-05-13 Thread Henning Thielemann
Heinrich Apfelmus schrieb: > Yes, the integers are just indexes. Of course, the example with the even > integers is a bit silly; ... might be useful for bipartite graphs ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mail

Re: [Haskell-cafe] Re: What do _you_ want to see in FGL?

2010-05-10 Thread Henning Thielemann
On Tue, 11 May 2010, Ivan Lazar Miljenovic wrote: Henning Thielemann writes: I do not see why there is the need for any type extension, at all. Consider cabal-sort, a very basic program, that is Haskell-98 today, will no longer run in Hugs and JHC (untested so far) because it uses FGL&#

Re: [Haskell-cafe] Re: What do _you_ want to see in FGL?

2010-05-10 Thread Henning Thielemann
On Tue, 11 May 2010, Ivan Miljenovic wrote: You're splitting apart related data into _three_ different data structures (the graph, vertex labels and edge labels)? _That_ doesn't make sense. There are no edge labels, only vertex labels. And yes, I find separation of data structures for separ

Re: [Haskell-cafe] Re: What do _you_ want to see in FGL?

2010-05-10 Thread Henning Thielemann
On Tue, 11 May 2010, Ivan Lazar Miljenovic wrote: Henning Thielemann writes: That is, in principle you could also use an unlabelled graph with FilePath as node type and you could manage a (Map FilePath (IO ())) yourselve and FGL does even not know about its existence. Yes, but why

Re: [Haskell-cafe] Re: What do _you_ want to see in FGL?

2010-05-10 Thread Henning Thielemann
On Mon, 10 May 2010, Ivan Lazar Miljenovic wrote: As I said, we're considering using an Associated Type to let users choose what type they want to use (probably with a default Map instance for this). However, we'd recommend/push the Int-based one. I do not see why there is the need for any t

Re: [Haskell-cafe] Re: What do _you_ want to see in FGL?

2010-05-10 Thread Henning Thielemann
On Mon, 10 May 2010, Heinrich Apfelmus wrote: The nodes are file paths, labeled with a corresponding IO action to create the file. The nodes are created from a list of rules that specify how to create an output file from several input files. That is, in principle you could also use an unlabel

Re: [Haskell-cafe] What do _you_ want to see in FGL?

2010-05-10 Thread Henning Thielemann
Ivan Lazar Miljenovic schrieb: > Pros for allowing you to use a custom node type: > * Matches your data better > * No need for extra lookup maps when converting your data to FGL form > > Cons: > * Makes type-sigs uglier/more verbose Unlabelled graphs with custom node type would have only one typ

Re: [Haskell-cafe] What do _you_ want to see in FGL?

2010-05-10 Thread Henning Thielemann
On Wed, 28 Apr 2010, Ivan Miljenovic wrote: So you don't want the labels to be part of the actual datatype? And for users to then have to deal with any labels they want themselves? Recently I wrote cabal-sort using FGL http://hackage.haskell.org/package/cabal-sort It sorts cabal packages

Re: [Haskell-cafe] Re: nun.haskell.org http services down?

2010-05-06 Thread Henning Thielemann
Ivan Lazar Miljenovic schrieb: > Malcolm Wallace writes: >> We think that the apache web server [snip] > > Well, _there's_ your problem! You're relying on some random project > written using that completely unsafe C language rather than one written > using a pure garbage-collected language with

Re: [Haskell-cafe] Re: Why cabal forces reinstallation of happstack-utils?

2010-05-06 Thread Henning Thielemann
Ivan Lazar Miljenovic schrieb: > Henning Thielemann writes: >> This makes sense. It would be certainly better if cabal-install would >> alert about the found inconsistency instead of trying to fix it. Then >> there might an additional cabal-install flag, that makes cabal-

Re: [Haskell-cafe] Re: Why cabal forces reinstallation of happstack-utils?

2010-05-06 Thread Henning Thielemann
Daniel Fischer schrieb: > On Wednesday 05 May 2010 15:45:38, Henning Thielemann wrote: >> Surprisingly using plain Cabal (runhaskell Setup configure; runhaskell >> Setup build; runhaskell Setup install) often works in these cases. > > That's not surprising. > runhaske

Re: [Haskell-cafe] Re: Why cabal forces reinstallation of happstack-utils?

2010-05-05 Thread Henning Thielemann
Maciej Piechotka schrieb: > On Wed, 2010-05-05 at 01:09 +0200, Daniel Fischer wrote: >> On Mittwoch 05 Mai 2010 00:55:38, Maciej Piechotka wrote: >>> I try to configure happstack with parsec 3.1. It seems to fail due to >>> cabal: >>> >> happstack-util.cabal says parsec < 3, so --constraint="parsec

Re: [Haskell-cafe] ANN: precis-0.3.1 - Cabal package diff tool

2010-05-05 Thread Henning Thielemann
On Wed, 5 May 2010, Stephen Tetley wrote: I'm open to suggests for prettifying the output, or adding further comparisons. While coding precis, I decided that trying to police version numbers would be impractical so I decided to focus on changes/diffs instead. Sure, but it helps to get an appr

Re: [Haskell-cafe] nun.haskell.org http services down?

2010-05-05 Thread Henning Thielemann
On Wed, 5 May 2010, Roel van Dijk wrote: I think it would be nice in general to be able to mirror at least hackage.haskell.org. Something like rsync would be close to ideal for this purpose. Reasons I would like to mirror hackage: 1 - Provide alternative when the main hackage is down 2 - Acces

Re: [Haskell-cafe] ANN: precis-0.3.1 - Cabal package diff tool

2010-05-05 Thread Henning Thielemann
On Thu, 29 Apr 2010, Stephen Tetley wrote: I've upload precis to Hackage - a diff tool for Cabal packages. I have added a note to: https://www.haskell.org/haskellwiki/Package_versioning_policy ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.or

Re: [Haskell-cafe] Haskell and the Software design process

2010-05-03 Thread Henning Thielemann
Ketil Malde schrieb: > Henning Thielemann writes: > >>> http://www.haskell.org/ghc/docs/6.12.2/html/libraries/base-4.2.0.1/Control-Exception.html#v%3Athrow > >> I see. This should be forbidden, at all! :-) > > Why is this worse than or different from 'er

Re: [Haskell-cafe] Haskell and the Software design process

2010-05-03 Thread Henning Thielemann
Gregory Collins schrieb: > Henning Thielemann writes: > >> It's not possible to throw exceptions from pure code. You can only >> call 'error' and that's another name for 'undefined', i.e. you have a >> partial (non-total ?) function. >

Re: [Haskell-cafe] Haskell and the Software design process

2010-05-03 Thread Henning Thielemann
On Mon, 3 May 2010, Gregory Collins wrote: Don Stewart writes: Some key points: * Avoid partial functions As an important corollary to this one I would add: "never throw exceptions from pure code". They often leak out from "catch" blocks and ruin your day. It's not possible to throw

Re: [Haskell-cafe] Problem about pattern matching.

2010-04-28 Thread Henning Thielemann
minh thu schrieb: > 2010/4/28 Magicloud Magiclouds : >> Hi, I have code as below. How come "case" version works wrong and >> gives me "overlap" compiling warning? Thanks. >> if dayOfMonth == firstDayOfMonth >>then v day (x, y) >>else if dayOfMonth == lastDayOfMonth >> then not_ $ v da

Re: [Haskell-cafe] Re: GSoC: Improving Cabal's Test Support

2010-04-28 Thread Henning Thielemann
Richard G. schrieb: > I think that formatted plain-text output would be much better than XML, > something that is human-readable and relatively easy to parse via > machine. Something similar to the GHC error output would work well > because developers are familiar with it. > > Test : > >

Re: [Haskell-cafe] What do _you_ want to see in FGL?

2010-04-28 Thread Henning Thielemann
Ivan Miljenovic schrieb: > So you don't want the labels to be part of the actual datatype? And > for users to then have to deal with any labels they want themselves? No, you would continue to provide labelled and unlabelled graphs, where unlabelled graphs (or just Graphs) are the base type and l

Re: [Haskell-cafe] What do _you_ want to see in FGL?

2010-04-27 Thread Henning Thielemann
Ivan Lazar Miljenovic schrieb: > Henning Thielemann writes: >> I was not happy with the way FGL handles lables so far: >> http://www.haskell.org/pipermail/libraries/2008-February/009241.html > > Not sure I follow what you want there: you want to remove the whole > conce

Re: [Haskell-cafe] What do _you_ want to see in FGL?

2010-04-27 Thread Henning Thielemann
Ivan Lazar Miljenovic schrieb: > Since I've volunteered myself to help maintain/upgrade FGL, what do the > people in the community want to see happen with it? I was not happy with the way FGL handles lables so far: http://www.haskell.org/pipermail/libraries/2008-February/009241.html ___

Re: [Haskell-cafe] Re: The instability of Haskell libraries

2010-04-27 Thread Henning Thielemann
Christopher Lane Hinson schrieb: > > On Tue, 27 Apr 2010, Brandon S. Allbery KF8NH wrote: > >>> I despair that a better Numeric hierarchy will never make it into >>> Haskell. >> >> >> I thought the main reason for that was that nobody could agree on a >> "better" hierarchy that was actually usabl

Re: [Haskell-cafe] The instability of Haskell libraries

2010-04-25 Thread Henning Thielemann
Ivan Lazar Miljenovic schrieb: > Henning Thielemann writes: >> My conclusion was: Never define orphan instances privately. If an >> instance cannot be added to the packages that provide the associated >> type or the class, then discuss the orphan instance with the maintaine

Re: [Haskell-cafe] The instability of Haskell libraries

2010-04-25 Thread Henning Thielemann
John Goerzen schrieb: > My second example was the addition of instances to time. My conclusion was: Never define orphan instances privately. If an instance cannot be added to the packages that provide the associated type or the class, then discuss the orphan instance with the maintainers of the t

[Haskell-cafe] Re: ANN: scan-0.1.0.4, a style scanner for Haskell sources

2010-04-22 Thread Henning Thielemann
On Wed, 21 Apr 2010, Christian Maeder wrote: I think, I've addressed the points made by Henning and Sebastian. (Don't forget to "cabal update".) Cool! ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/h

Re: [Haskell-cafe] ANN: scan-0.1.0.3, a Haskell style scanner

2010-04-19 Thread Henning Thielemann
Christian Maeder schrieb: > Henning Thielemann schrieb: > >> The updated Haskell code might be written to a new file by default. Then >> I can interactively transfer the corrections I like to the original code >> using Kompare. I would also not use '-' as option.

Re: [Haskell-cafe] ANN: scan-0.1.0.3, a Haskell style scanner

2010-04-19 Thread Henning Thielemann
On Mon, 19 Apr 2010, Christian Maeder wrote: Dear Haskell friends, I like to announce a Haskell style scanner at http://hackage.haskell.org/package/scan At first I thought it is a scanner (for whatever purpose) implemented in Haskell style. No it checks whether a Haskell module follows a ce

Re: [Haskell-cafe] Ocaml for Haskellers tutorial

2010-04-17 Thread Henning Thielemann
Bas van Dijk schrieb: I don't know why the heap and stack overflow problems go away. So lets look at the core output of the latter program: $ ghc-core -- -O2 FoldlProfile.hs $wsum :: [Int] -> Int# $wsum = \ (w_s1rS :: [Int]) -> $wfoldl_f 0 w_s1rS $wfoldl_f :: Int# -> [Int] -> Int# $wfoldl_f =

Re: [Haskell-cafe] Why does the transformers/mtl 'Error' class exist?

2010-04-17 Thread Henning Thielemann
Ryan Ingram schrieb: It's used in the implementation of "fail" for those monads. class Monad m where ... fail :: String -> m a fail = error -- default implementation which is then used to desugar do-notation when pattern matching fails: do Left x <- something retu

Re: [Haskell-cafe] What is the consensus about -fwarn-unused-do-bind ?

2010-04-15 Thread Henning Thielemann
John Meacham schrieb: > On Fri, Apr 09, 2010 at 09:07:29AM -0700, Bryan O'Sullivan wrote: >> On Fri, Apr 9, 2010 at 6:44 AM, Ivan Lazar Miljenovic < >> ivan.miljeno...@gmail.com> wrote: >>> As of 6.12.1, the new -fwarn-unused-do-bind warning is activated with >>> -Wall. This is based off a bug rep

Re: [Haskell-cafe] Re: instance Eq (a -> b)

2010-04-14 Thread Henning Thielemann
Ashley Yakeley schrieb: Joe Fredette wrote: this is bounded, enumerable, but infinite. The question is whether there are types like this. If so, we would need a new class: I assume that comparing functions is more oftenly a mistake then actually wanted. Say I have compared f x == f y and la

Re: [Haskell-cafe] Can Haskell enforce the dimension?

2010-04-09 Thread Henning Thielemann
On Sat, 10 Apr 2010, Haihua wrote: Hi, In C++, template can be used to enforce the dimension. For example, F=m*a is OK and F=m*t will issue a compile time error. http://www.haskell.org/haskellwiki/Libraries_and_tools/Mathematics#Physical_units ___ H

Re: [Haskell-cafe] mapM for vectors

2010-04-09 Thread Henning Thielemann
Don Stewart schrieb: > alexey.skladnoy: >> Hello >> >> I found that there is no monadic map for vector. It's possible to define to >> define such map using conversion to list, but I suppose it's not efficient. >> I >> didn't make any measurements. >> >>> mapM' :: Monad m => (a -> m b) -> V.Vecto

Re: [Haskell-cafe] what are the safety conditions for unsafeIOToST

2010-04-07 Thread Henning Thielemann
Gregory Crosswhite schrieb: I would venture that the condition under which unsafeIOtoST would be safe is if all of the computations you are performing in the IO monad are only changing state that is local to the computation within the ST monad in which you are running. (For example, if there

Re: [Haskell-cafe] Established names for a couple of list functionals?

2010-04-07 Thread Henning Thielemann
Stephen Tetley schrieb: Hello all Having traversals with special behaviour for the first or last element is useful for my current work: -- first element special -- anacrusisMap :: (a -> b) -> (a -> b) -> [a] -> [b] anacrusisMap _ _ [] = [] anacrusisMap f g (a:as) = f a : map g as -- last

Re: [Haskell-cafe] The 8 Most Important GSoC Projects

2010-04-03 Thread Henning Thielemann
Don Stewart schrieb: While at ZuriHac, a few of us GSoC mentors got together to discuss what we think the most important student projects for the summer should be. Here's the list: http://donsbot.wordpress.com/2010/04/01/the-8-most-important-haskell-org-gsoc-projects/ Please consider appl

Re: [Haskell-cafe] The 8 Most Important GSoC Projects

2010-04-03 Thread Henning Thielemann
Ivan Lazar Miljenovic schrieb: Don Stewart writes: Portability? You already have GHC on the machine, right? You don't necessarily need the GHC API to get something prototyped quickly. I meant in the sense of writing this as a tool, which will also work if the user prefers JHC, YHC, et

Re: [Haskell-cafe] Integers v ints

2010-04-02 Thread Henning Thielemann
Jens Blanck schrieb: I was wondering if someone could give me some references to when and why the choice was made to default integral numerical literals to Integer rather than to Int in Haskell. Also, if you are aware of similar discussions in other languages. I think type defaulting is only an

Re: [Haskell-cafe] libraries and executables in cabal

2010-03-25 Thread Henning Thielemann
Paul Brauner schrieb: > Hi, > > i'm working on a project made of > > - lots of modules > - one excutable importing these modules > - another excutable importing these same modules > > I don't especially want to expose those modules as libraries, especially > on hackage, since they are meaning

Re: [Haskell-cafe] Syntax programming with lexemes rather than trees?

2010-03-24 Thread Henning Thielemann
Stephen Tetley schrieb: Hello All Modern functional programming languages give you algebraic data types that are mighty convenient for programming with syntax trees. However, I'm working in a domain (music typesetting) where modelling syntax with trees can be problematic and I'm wondering whethe

Re: [Haskell-cafe] Alternative dependencies in Cabal file

2010-03-18 Thread Henning Thielemann
Matthias Reisner schrieb: Thanks, I missed that the flags are set dynamically if a dependency cannot be satisfied. Only cabal-install does this, plain Cabal only takes flags that were set by the user. ___ Haskell-Cafe mailing list Haskell-Cafe@haskel

Re: [Haskell-cafe] ANNOUNCE: tupleinstances-0.0.1

2010-03-16 Thread Henning Thielemann
On Tue, 16 Mar 2010, Diego Echeverri wrote: "There are only two hard things in Computer Science: cache invalidation and naming things" - Phil Karlton I'm open to suggestions :-) It depends on the intended use. :-] Maybe something with "vector"? ___

Re: [Haskell-cafe] Re: If wishes were horses...

2010-03-12 Thread Henning Thielemann
On Fri, 12 Mar 2010, Johannes Waldmann wrote: Ketil Malde malde.org> writes: Prelude Data.List> :t foldl foldl :: (a -> b -> a) -> a -> [b] -> a What should the type look like? Good question - and in my posting I tried to avoid the impression that I have an answer, because I really haven

[Haskell-cafe] Detecting extensions of the host processor

2010-03-10 Thread Henning Thielemann
I like to detect at runtime whether the processor my program runs on has certain extensions (SSE2, SSE3 or so) in order to execute optimized code. On Linux I can process the contents of /proc/cpuinfo but this will not work on Windows. Is there a portable way in Haskell? ___

Re: [Haskell-cafe] Num instance for Lazy ByteStrings (was: NumLazyByteString Package License)

2010-03-10 Thread Henning Thielemann
Yitzchak Gale schrieb: Henning Thielemann wrote: Is NumLazyByteString a newtype around Bytestring.Lazy that interprets the bit stream represented by the ByteString as integer? Thomas DuBuisson wrote: Not exactly. There is not newtype wrapper. NumLazyByteString is: instance Num

Re: [Haskell-cafe] Num instance for Lazy ByteStrings (was: NumLazyByteString Package License)

2010-03-08 Thread Henning Thielemann
On Mon, 8 Mar 2010, Thomas DuBuisson wrote: Tristan and other interested parties on the Cafe, Answering your question first, Tristan: I was going to use BSD3 (if it isn't already) for the NumLazyByteString. Is NumLazyByteString a newtype around Bytestring.Lazy that interprets the bit stream

Re: [Haskell-cafe] Haskell course, training

2010-03-08 Thread Henning Thielemann
On Sun, 7 Mar 2010, G?nther Schmidt wrote: I think I've reached the point where I need some tutoring, so provided I've got money for travel and course fees, and time, where do I get it? I'm not a student so some courses aren't available to me. How about visiting our Haskell meeting in Leipzi

[Haskell-cafe] Re: [Haskell] Recursive definition of fibonacci with Data.Vector

2010-03-08 Thread Henning Thielemann
On Sun, 7 Mar 2010, Edgar Z. Alvarenga wrote: Hello, why I can't define a recursive vector using Data.Vector, like in the example: import qualified Data.Vector as V let fib = 0 `V.cons` (1 `V.cons` V.zipWith (+) fib (V.tail v)) Since I liked to have both element-wise lazy construction and

<    1   2   3   4   5   6   7   8   9   10   >