On Fri, 8 Aug 2003, Antony Courtney wrote:
> I often need to format a list of strings using some character as a
> *seperator* rather than a terminator for the items. Is there some
> simple combinator or idiom from the Prelude or standard libraries that
> could be used for this purpose?
I thin
On Sat, 21 Jun 2003, Wolfgang Jeltsch wrote:
> On Saturday, 2003-06-21, 14:38, CEST, Mark Carroll wrote:
> > I am assembling a list from start to end. I can add elements to the end with
> > "previous ++ [current]" or I can add them with "current : previous" and
> > reverse it when I'm done. Or, ma
On Mon, 24 Feb 2003, Andrew Moran wrote:
>
> Dave Tweed wrote:
>
> > If you discard `compliation preventing, very very quick to solve' bugs
> > (e.g., missing semi-colons in C++, silly typecheck errors in Haskell) I
> > find that the ratio between source code bugs and algorithm bugs is maybe
> >
On Mon, 24 Feb 2003, Malcolm Wallace wrote:
> Joe English <[EMAIL PROTECTED]> writes:
>
> > Me either; in fact even 1/4 of the time debugging
> > sounds quite high.
> >
> > When I first started using Haskell, most of my time
> > went to fighting with the typechecker, but once the
> > code checke
I think I was a bit inflamatory in my previous post because I was fuming
about something else in my life; I stand by the factual content of what I
said but wish I'd phrased it much less confrontationally.
On Mon, 9 Dec 2002, matt hellige wrote:
[snip]
> > You seem to be saying that layout should
>
On Fri, 6 Dec 2002, Ingo Wechsung wrote:
> Beg your pardon, Marcin
>
> >But they are compatible because there is one most universally accepted
> >interpretation of a tab (move to the next multiple of 8 columns). Any
> >other interpretation hampers portability and should be avoided.
>
> No. It di
> Wether spaces or tabs are better in source files is a matter of taste and
> a language should not force me to use one or another.
Well note that it doesn't only confuse compilers: if you post code for
other people to read (whose display software has their personal own
interpretation of what a t
On Wed, 31 Jul 2002, Scott J. wrote:
> I don't think I have got a fair answer to my questions regarding these
> (silly?) benchmarks. I cannot write the programs with the unboxed "things",
> but I have both the Ocaml compiler and the latest Glasgow compiler installed
> on my windows XP machine. So
On Wed, 31 Jul 2002, Andrew J Bromage wrote:
> Let me clarify what I meant by that and see if you still disagree.
>
> Realistically, _most_ new software installations today (I deliberately
> ignore legacy systems etc) are not overloaded, in that there are more
> "computrons" available than are r
On Tue, 30 Jul 2002, Andrew J Bromage wrote:
[snip]
> In the end, though, benchmarks ignore one of the most important rules
> of software performance: "throughput" (i.e. the amount of processing
> that your system can do just prior to being overloaded) is almost never
> the most important conside
> It's correct Haskell. Have a look at
> http://www.haskell.org/onlinereport/exps.html#sect3.14
Thanks; serves me right for being lazy and not having actually read a
version of the report since the various elements of monad syntax were
introduced...
___cheers,_dave___
On Wed, 3 Apr 2002, Michal Wallace wrote:
> module Main where
> alphabet = "abcdefghijklmnopqrstuvwxyz"
> count ch str = length [c | c <- str , c == ch]
> hist str = [count letter str | letter <- alphabet]
> oneline ch str = [ch] ++ " " ++ stars (count ch str)
> stars x = if x
[Moved to haskell-cafe]
On Tue, 19 Mar 2002, David Sankel wrote:
> > *everytime* about race conditions. (of course using
> > this existFile before
> > creating a temporary file is wrong, but existFile
> > has *many* other
> > applications)
>
> Could someone post an example of the creation of a
>
On Mon, 25 Feb 2002, Dean Herington wrote:
> If you're using GHC, take a look at module Readline in the util package
> (http://www.haskell.org/ghc/docs/latest/set/readline.html). I don't know
> which other Haskell systems support this module.
The annoying thing is the way that terminals general
On Wed, 13 Feb 2002, David Feuer wrote:
> > It would be a *signifigant* boon to those
> > of us trying to get haskell into organizations
> > by using it as "maintainable perl/sh", and
>
> Haskell is not a "maintainable perl/sh". It is not a good
> language for simple shell scripts, and is not
On 7 Feb 2002, Ian Zimmerman wrote:
>
> itz> All this taken together, I mean, _really_, is the lexical
> itz> structure of Haskell a botch, or what?
>
> Jon> No. Innovative. All the problems described in this thread reflect
> Jon> unwarranted assumptions inherited in emacs. It's plainly possibl
On Fri, 18 Jan 2002, Cagdas Ozgenc wrote:
> > the goal of type class is to allow overloading of function, so for example
> > id x = x is not subject to overloading => no use to put it in a type
> class.
>
> Because it doesn't do anything?
I believe that (assuming of course that you aren't a
On Fri, 18 Jan 2002, Cagdas Ozgenc wrote:
> Why does Haskell let you write functions that are not a part of type class?
[snip] Responding to the more philosophical bit rather than the concrete
type stuff snipped, I'm not a supporter of the belief that `absolutely
everything in all programs ever
No-one appears to have responded to this with a definitive answer...
On Tue, 15 Jan 2002, Feuer wrote:
> I know what you mean. However, if you look at it,
> data Empty1 a = E1
> is a datatype with one constructor, and that constructor takes no arguments.
> So this is in fact a "phantom" unit ty
On Sun, 13 Jan 2002, Liyang Hu wrote:
> > From a bit of browsing the code, it appears that setting
> > USE_DOUBLE_PRECISION will increase the precision of both Float
> > and Double types.
Note that I'd recommend getting some clarification about this from either
the current hugs team or Mark Jone
On Tue, 13 Nov 2001, Jesper Louis Andersen wrote:
> This problem has had my attention for a while now. I hope someone would
> like to help me out on the problem.
>
> I have a simple average function defined as:
>
> mean:: (Fractional a) => [a] -> a
> mean l = (sum l)/ fromI
On Fri, 12 Oct 2001, Fergus Henderson wrote:
[Dave Tweed wrote]
> > sense. I'm not sure why anymore but Haskell changed the `if clause after
> > the value' to `pattern guard | before =', so I agree it now looks as if
> > it's stating that the pattern guard is equal to the rhs.
>
> I've heard th
On Wed, 10 Oct 2001, Mark Carroll wrote:
> On 10 Oct 2001, Ketil Malde wrote:
> (snip)
> > function definitions. Perhaps one could have had a syntax like
> >
> > z a =
> > | a == 1 -> 1
> > | a == 2 -> 3
> >
> > instead, as it'd make it more consisten with the case,
On Wed, 10 Oct 2001, D. Tweed wrote:
> degenerate equality you get from defining the lhs in terms of the rhs. The
> -> is used whenever you've got something on the right that `leads to' to
^left
> som
On 10 Oct 2001, Ketil Malde wrote:
> Mark Carroll <[EMAIL PROTECTED]> writes:
>
> > On Tue, 9 Oct 2001, Ashley Yakeley wrote:
>
> >> At 2001-10-09 11:55, Mark Carroll wrote:
>
> >>> What is the rationale for when Haskell demands a "=" and when it
> >>> demands a "->"?
>
> Okay, I can't give y
To correct the incoimprehensible sentence...
On Fri, 27 Jul 2001, D. Tweed wrote:
> actually happens to be implementation defined. But I don't consider that
> when I screw up by allocating memory outside array bounds to be a bug due
^
Important confession since Fergus is in the discussion: I've not actually
read any of the C or C++ standards; I've got an impression of what they
say from various textbooks and the gcc mailing lists.
On Fri, 27 Jul 2001, Fergus Henderson wrote:
> But there are so *many* such "stupidities".
>
>
Aha, we head towards convergence :-)
On Thu, 26 Jul 2001, Frank Atanassow wrote:
> > I've never written a Haskell program using functional dependencies, or
> > existential classes, ...
>
> I find them indispensible, and I know for a fact that I am not the only one
> around our office who feels
On Thu, 26 Jul 2001, Frank Atanassow wrote:
> My reaction to that is: you are not programming in C. If you restrict
> yourself to nice subsets of a programming language, then obviously your
> programs will satisfy better properties.
That's certainly a resaonable position to take. All I'm saying
On Thu, 26 Jul 2001, Frank Atanassow wrote:
> also safety, and "theorems for free". Then there are other properties
which
> are obvious (to a programmer) in a Haskell program which get buried in
the
> equivalent C(++) program, e.g., that every member of a data structure is
> traversed in a fold ("
On Thu, 26 Jul 2001, Frank Atanassow wrote:
> > Again, as a C++ programmer I have some grasp of what program
> > rearrangements are valid (E.g.,I can't move an assignment involving an
> > expression in another variable, say v, from before an assignment to v to
> > after an assignment to v), and I
I'd like to respectfully disagree with some of this :-)
On Wed, 25 Jul 2001, Frank Atanassow wrote:
> These things are nice, but the more I learn about functional languages, the
> more I feel that they are only icing on the cake. The most important thing
> about functional languages is that we k
On Fri, 1 Jun 2001, Fergus Henderson wrote:
> Sorry for the off-topic post, but I figured someone here would know...
> can anyone please tell me how to do the double-square-bracket symbols
> that are often used in denotational semantics in LaTex? It's like
> "[[" but a single symbol without the
On Thu, 24 May 2001, Fergus Henderson wrote:
> > > I'm not sure what you mean by type-checked here. Templates are not
> > > type-checked at definition time, but are type-checked when they are
> > > used; the same is true of ordinary macros.
> >
> > I was thinking in terms of (to take a really s
On 22 May 2001, Carl R. Witty wrote:
> "D. Tweed" <[EMAIL PROTECTED]> writes:
>
> > In my experience the C++ idiom `you only pay for what you use' (==>
> > templates are essentially type-checked macros) and the fact most compilers
> > are evolved
On Wed, 21 Feb 2001, George Russell wrote:
> Hmm, this throwaway comment is getting interesting. But please cc any replies to
> me as I don't normally subscribe to haskell-cafe . . .
To be honest, I suspect I was talking complete & unadulterated
rubbish. (Not that that's unusual.)
___cheers,_da
George Russell wrote:
>
> (3) Simon Peyton Jones' comments about dictionary passing are a red herring,
> since they assume a particular form of compiler. Various (MLj, MLton)
> ML compilers already inline out all polymorphism. Some C++ compilers/linkers
> do it in a rather crude way
On Tue, 23 Jan 2001, Mark Tullsen wrote:
> Johannes Waldmann wrote:
> > ...
> > I'd rather write clear code, than worry about efficiency too early.
> > Who said this, "premature optimization is the root of all evil".
>
> I've always attributed this to Donald Knuth:
>
> Premature optimization
On Mon, 27 Nov 2000, Frank Atanassow wrote:
> > Java. Do you think that Haskell would be better without `unsafePerformIO'?
>
> Without remarking on C#, I just wanted to point out that unsafePerformIO is
> not part of the Haskell language...
Umm, I hope that everyone in the implementors camps f
On Fri, 24 Nov 2000, Jason Stokes wrote:
> I very much doubt that a "pure" Haskell (ie, a pure functional language)
> is a marketable proposition, but certainly "impure" functional languages
> or languages with heavy functional aspects (ML, Lisp, Erlang etc.) which
> retain imperative elements ha
On Wed, 27 Sep 2000, Frank Atanassow wrote:
> Personally, I think literate programming is all about syntax, so I would avoid
> trying to make the tool do any sort of semantic analysis.
Mmm, my personal view of literate programming is that it is a technique
for making learning about and comprehen
On Wed, 27 Sep 2000, D. Tweed wrote:
> On Wed, 27 Sep 2000, Frank Atanassow wrote:
> > I see the problem for a language like C++, which has true overloading, but not
> > for Haskell. In Haskell it makes sense to identify type class methods with the
> > same name, since
On Wed, 27 Sep 2000, Frank Atanassow wrote:
> D. Tweed writes:
> > Unfortunately the last time I looked at CWEB it still had the same idea
> > about identifiers as WEB itself, namely that if they match textually
> > they are the same, which makes the automatic indexes
On Wed, 27 Sep 2000, Antti-Juhani Kaijanaho wrote:
> On 2927T115028+0100, Jerzy Karczmarczuk wrote:
> It's useful only for writing Pascal, so yes, it's essentially dead.
> TeX seems to be (one of?) the only thing(s) still using it.
>
> However, it's descendant, CWEB by Knuth and Levy (iirc),
44 matches
Mail list logo