haskell

1993-10-12 Thread Colin Runciman
John L writes: > When I have tried to talk to individuals about natural number induction > using (n+k) patterns, then the problems start. Because they are so > unlike the form of patterns they have become used to they find all > sorts of difficulties. What if n is negative. Ah yes, well it can't

haskell

1993-10-14 Thread Colin Runciman
(I sent this before, but it didn't seem to get through. Sorry if it's a repeat for anyone.) - More on (n+k) patterns. (I'm inflamed!) In response to JL's latest: > The problem is only partly to do with naturals. Having these would > certainly improve matters but I suspect the Nu

Re: Haskell program manipulator

1997-09-26 Thread Colin Runciman
Mariano wrote: > Has anyone written a Haskell program manipulator? > What I have in mind is some kind of interactive environment allowing one > to, say, fold/unfold definitions, typecheck (sub)expressions, > etc... Mark replied: > Not yet, but that is exactly what I am working on in my dissertat

some Standard Haskell issues

1998-08-07 Thread Colin . Runciman
* the name! Names including a date, like Haskell 98, or a specific use, like Teaching Haskell, could mislead. Standard Haskell 1 is rather long (and ambiguous). The reasons why Haskell 1.5 suggests greater stability than Haskell 1.4 are too obscure. So if Standard Haskell says too mu

more on name, MR and comments

1998-08-07 Thread Colin . Runciman
| > Names including a date, like Haskell 98, ... could mislead. | How would this be misleading? There is a popular myth that newer is better. Dating a language almost guarantees that before long it is seen as ... well ... dated! Haskell 2 (or Haskell 2005) might come along and be a big improve

MonadZero

1998-11-04 Thread Colin . Runciman
I'm with the Option 2 Zap MonadZero Today lobby. I dislike ~ patterns for all sorts of reasons (won't drag up all *that* again now!) but that the introduction or elimination of a ~ can alter the *type* of an expression is particularly horrible. The attempt to introduce notions of guaranteed eval

re: Default Default

1998-11-05 Thread Colin . Runciman
I agree with John P. A memorable phrase from the opening of Backus's celebrated 1978 diatribe (Can Programming be Liberated ...) was his dismayed reference to the `primitive word-at-a-time style' of conventional programming languages of the day, too much influenced by the architectural peculiarit

Re: Default Default

1998-11-09 Thread Colin . Runciman
| Twenty years later, must we really settle for primitive modulo-word-size | arithmetic as the default? | | And many others support Integer over Int as the default default. | | So do I, if it's done right. But we already decided that doing it right | is too hard for Haskell 98; it will have

re: Random Access Files in Haskell

1999-07-08 Thread Colin . Runciman
A little while ago Damir Medak asked: | Any experiences or hints how to implement Random Access Files | in Haskell? The Binary library distributed with nhc13 and nhc98 supports random access. It can be used to implement indexed file structures of various kinds. See http://www.cs.york.ac.uk/fp/

re: virtual terminal in Haskell

1999-07-08 Thread Colin . Runciman
Marcin Kowalczyk (I think) wrote: | I have to think about a good abstraction of terminal actions. I don't | quite like ... because it does not allow integration with arbitrary IO | (or I miss something?) and it heavily depends on the terminal having | particular properties, offered in a context-

re: diagonalisation

1999-07-12 Thread Colin . Runciman
Another alternative to diag [[f x y | x < - xs] | y <- ys] is to write it as diagWith f xs ys where: diagWith f [] ys = [] diagWith f xs [] = [] diagWith f (x:xs) ys = d [x] xs ys where d xs' xs ys = zipWith f xs' ys ++ d' xs ys where d' [] [] = [] d' [] (y:ys)

re: Need information (preferably in book form).

1999-08-11 Thread Colin . Runciman
"Michael T. Richter" <[EMAIL PROTECTED]> wrote: | I've come to the conclusion that I need a book; a book which deals | primarily with learning functional programming as a paradigm (although | using Haskell as the illustrative language has obvious benefits). ... | | Can anybody recommend such a b

post-doc position to suit Haskell enthusiast

1999-09-03 Thread Colin . Runciman
). Where: York, UK. For details, enquiries, etc please contact: Dr Colin Runciman Department of Computer Science University of York, YORK, YO10 5DD, UK Phone: +44 (1904) 432740 E-mail

re: The Haskell mailing list

1999-10-08 Thread Colin . Runciman
| Traffic on the Haskell mailing list has jumped dramatically of late ... | ... if traffic is too heavy, large numbers of people will unsubscribe | ... in the end, heavy traffic is self defeating. I agree. Indeed I was on the point of unsubscribing, even though I have a strong interest in Has

re: Is there a space leak here?

2000-02-28 Thread Colin . Runciman
Joe, Have you tried any of the more powerful forms of heap-profiling, beyond static tagging of producer/construction? | My hypothesis is that 'deserialize' (the problematic function, | called 'buildTree' in my earlier message) is building up | a long chain of suspensions of the form | | s

runtime optimization of haskell

2000-03-23 Thread Colin . Runciman
D. Tweed wrote: | I'm just curious if there's anyone in the Haskell/FP community working on | such things? (The closest thing I'm aware of is David Lester's stuff on | throw away compilation (sorry no pointer)) Perhaps you were thinking of David *Wakeling*'s work? See: David Wakeling, The dynam

Re: Finding primes using a primes map with Haskell and Hugs98

2000-12-20 Thread Colin . Runciman
> There are numerous ways of optimising sieving for primes, none of which > have much to do with this list. For example, two suggestions: > (1) for each k modulo 2*3*5*7, if k is divisible by 2/3/5 or 7, ignore, otherwise > sieve separately for this k on higher primes. (Or you might use prod

re: Questions about Trie

2001-05-18 Thread Colin . Runciman
> Greeting, I'm a last year student in a computer science field. I'm > currently trying to code an implementation for a compression using basic > Lempel-zif technique. I use a Trie (retrieval) as a data structure for > the dynamic dictionary aplication. The problem is Trie uses not just an > o

re: Haskell slicing tool?

2002-03-19 Thread Colin Runciman
> Are there any tools to perform program slicing on Haskell? > I often find myself wanting to find all "fromJusts" invoked > from the current function, or all functions that use a > particular member of my monad's ADT. Assuming that what you want to see are the applications of these functions tha

Re: trees with pointers to parents & memory gobbling

2002-06-15 Thread Colin Runciman
Hal Daume III wrote: >I have a datatype which (simplified) looks like: > >data FBTree a = FBLeaf (Maybe (FBTree a)) a | FBBranch (Maybe (FBTree >a)) (FBTree a) (FBTree a) > >is basically a tree with Maybe a parent node. however, unlike the nice >non-haskell equivalent, they tend to eat up memory

Re: Weird profiling behaviour

2002-06-26 Thread Colin Runciman
Ketil Z. Malde wrote: >I have what I think is a really strange problem. I have a fair sized >problem, which involves sorting a data set, first on labels (which are >Strings) and then on scores (which are Ints). > >The strange thing is that string sorting is *vastly* faster than int >scoring! No

Re: Q: Forcing repeated evaluation

2002-09-12 Thread Colin Runciman
Jan Kybic wrote: >Hello, >I have another question regarding the optimisation of Haskell code: >I have a relatively inexpensive function generating a long list, imagine >something like (I simplified a lot): > >l = [ i*i*i | i <- [0..n] ] -- for very large n > >This long list is consumed

Re: "interact" behaves oddly if used interactively

2003-10-01 Thread Colin Runciman
Christian Maeder wrote: Malcolm Wallace wrote: [...] Surely the name suggests that "interactive" behaviour is required, i.e. exactly some interleaving of input and output. The chunk-size of the interleaving should depend only on the strictness of the argument to "interact". I'm not happy that

Re: [Haskell] Space behaviour & hyperseq

2004-06-18 Thread Colin Runciman
rmalising evaluations. But there should be no need for repeated traversals (let alone repeated double traversals, using ==) of already-evaluated structure. With a suitable instance of Norm, your hyperseq function can be redefined hyperseq :: Norm a => a -> b -> b hyperseq x y |

Re: [Haskell] Space behaviour & hyperseq

2004-06-18 Thread Colin Runciman
Johannes, the result of an application 'normal x' is always true ... I understand how this works, but do we agree that it looks outright ugly? I don't see why f x | normal x = ... x ... is any more ugly than f x@(x : xs) = ... x ... or (far worse) f ~(x : xs) = ... x ... or strictness annotations,

[Haskell] Re: elementary tracing for Haskell

2004-10-11 Thread Colin Runciman
Phil, Are there any tools for beginning programmers that give traces of Haskell programs? I want something like the following. Given the defintion sum [] = 0 sum (x:xs) = x + sum xs typing sum [1,2,3] should yield this trace sum [1,2,3] 1 + sum [2,3] 1 + 2 + sum [3]

Re: [Haskell] factoring `if'

2004-10-11 Thread Colin Runciman
Serge, How do you think, is the program (1) equivalent to (2) in the meaning of Haskell-98 ? (1) (\ x -> (if p x then foo (g x) else foo (h x)) where p ... g ... h ... foo ... ) (2) (\ x -> foo ((if p x then g x else h x) where

[Haskell] ANN: SmallCheck 0.3

2008-05-06 Thread Colin Runciman
complete coverage of a defined test-space * display counter-examples of functional type Comments and suggestions welcome. Colin Runciman ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

[Haskell] ANN: SmallCheck 0.4

2008-05-27 Thread Colin Runciman
suggestions welcome. Colin Runciman ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell] Abusing quickcheck to check existential properties

2008-10-22 Thread Colin Runciman
Norman, I guess what I would like is to reuse most of the mechanisms in QuickCheck to have it say one of these two things: 1. Found an satisfying instance after 73 tries: [gives instance] 2. After 100 tries, could not find a satisfying instance. Like failure, the first tells you something

Re: [Haskell] memory management

2009-08-04 Thread Colin Runciman
Nathan, I'm interested in research relating to memory management in Haskell. I'm at the point where I don't know enough to have very specific questions, but I'm especially interested in garbage collection in Haskell, and any available statistics (such as, how long does a thunk typically

Re: [Haskell] space behaviour of lazy recursive lists

2005-02-03 Thread Colin Runciman
Axel, ... However, they do not directly solve my problem in the bigger program which still has the same linearly growing memory requirement. The problem seems to be very, very hard to find. I suspect it is related to lazyness as in the gibs example, but I just cannot put my finger on the code that

Re: [Haskell] line-based interactive program

2005-07-07 Thread Colin Runciman
Christian Maeder wrote: -- a filter program process an entire input to yield some output type FilterProgram = [Line] -> [Line] Forget this, if it's not an (old) exercise Yes, people don't write lazy functional programs in Haskell any more.  In the Era of Monadic Enlighte

Re: [Haskell] line-based interactive program

2005-07-08 Thread Colin Runciman
Christian Maeder wrote: >Could you also insert a prompt that is shown before the lines are read? >(The first prompt seems to be tricky assuming line buffering ) > > If line-buffering is assumed or imposed, of course it prevents the programming of interactive applications where the units of input

Re: [Haskell] line-based interactive program

2005-07-08 Thread Colin Runciman
Christian, >>buffer xs = foldl const xs xs >>I don't find it this easy nor a good programming practise. >> >> I don't see why you should think it hard to define a function like 'buffer'. The whole purpose of foldl is to encapsulate accumulation. It demands the full spine of its list argument

[Haskell] post-doc job in functional programming

2005-08-01 Thread Colin Runciman
der: David Duke) and the University of York (grant holder: Colin Runciman). A post-doctoral researcher is being appointed at each site. The researcher at Leeds is expected to specialise in data visualisation and the researcher at York in functional programming systems, but the intention is that wo

[Haskell] post-doc job in functional programming

2005-08-13 Thread Colin Runciman
on between the University of Leeds (grant holder: David Duke) and the University of York (grant holder: Colin Runciman). A post-doctoral researcher is being appointed at each site. The researcher at Leeds is expected to specialise in data visualisation and the researcher at York in functional p

Re: [Haskell] [ANNOUNCE] yhc - York Haskell Compiler

2005-11-14 Thread Colin Runciman
Bulat, CR> * Part of Tom's motivation for the new back-end is a nice implementation CR> of his Hat G-machine for tracing. i'm interested whether this sort of things is possible as back-end for GHC? it will be great if current front-end for GHC which supports number of widely used extensions ca

Re: [Haskell] [ANNOUNCE] yhc - York Haskell Compiler

2005-11-14 Thread Colin Runciman
Thomas Davie wrote: I haven't played around with nhc98 yet, but I was intrigued by its small size and its (modestly-sized and simple) bytecoded implementation. Should I now be more interested in Yhc instead? ;-) As far as the YHC team is concerned, yes... As far as the nhc team is... I'm not

Re: [Haskell] The Haskell mailing list

2005-11-16 Thread Colin Runciman
Simon, Can anyone remember when the Haskell mailing list first opened? Does anyone have an archive that goes right back to the beginning? The attached posting to the fp mailing list, dated 2 April 1990, included the announcement of the new haskell mailing list. Colin R >From [EMA

[Haskell] ANN: hpc -- Haskell Program Coverage

2006-08-10 Thread Colin Runciman
-intro.html Colin Runciman and Andy Gill ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

[Haskell] ANN: SmallCheck 0.0 another lightweight testing tool

2006-08-21 Thread Colin Runciman
I have written a prototype tool that is similar in spirit, and in some of its workings, to QuickCheck, but based on exhaustive testing in a bounded space of test values. Sales pitch: wouldn't you like to ... * write test generators for your own types more easily? * be sure that any counter-exam

[Haskell] ANN: SmallCheck 0.1

2006-09-13 Thread Colin Runciman
SmallCheck: another lightweight testing library in Haskell. Folk-law: if there is any case in which a program fails, there is almost always a simple one. SmallCheck is similar to QuickCheck (Claessen and Hughes 2000-) but instead of a sample of randomly generated values, SmallCheck tests properti

Re: [Haskell] ANN: SmallCheck 0.1

2006-09-14 Thread Colin Runciman
Don, >Let's run QuickCheck (check) head to head with SmallCheck (scheck): >... >lambdabot> scheck \s -> not (null s) ==> minimum (s :: [Int]) == (last . > sort) s > Failed test no. 10. Test values follow.: [-1,-1,-1,-1,-1,-1,-1,0] > >lambdabot> check \s -> not (null s) ==> minimum (

[Haskell] ANN: SmallCheck0.2

2006-11-06 Thread Colin Runciman
SmallCheck 0.2: another lightweight testing library in Haskell -- A new version of SmallCheck can be obtained from: http://www.cs.york.ac.uk/fp/smallcheck0.2.tar Main differences from 0.1: * choice of interactive or non-interactive te

[Haskell] fun at York (reminder)

2007-11-13 Thread Colin Runciman
Fun people, There will be Fun in the Afternoon at York on Thursday 22 November. See http://sneezy.cs.nott.ac.uk/fun/ for details. If you plan to come, and have not already mailed to say so, please send me a non-empty message with EITHER "curried fun" OR "uncurried fun" as the subject line -- p