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] 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

[Haskell] ANN: SmallCheck 0.4

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

[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] 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 --

[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

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 (s :: [Int])

[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

[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

[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

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

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 can

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

[Haskell] post-doc job in functional programming

2005-08-13 Thread Colin Runciman
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 programming systems

[Haskell] post-doc job in functional programming

2005-08-01 Thread Colin Runciman
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 work

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 or

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 to

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

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] 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] 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

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,

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: awaitEval in Concurrent Haskell

2003-02-17 Thread Colin Runciman
Claus, It may be possible to get the two representations together by applying the predicate to a reader for x, generated from x, which would complement something like Hood's writer for x, generated from x. Just as the context demanding parts of x isn't aware of triggering observations, the

Re: awaitEval in Concurrent Haskell

2003-02-17 Thread Colin Runciman
the problems with types is to use a multi-parameter type class. Little example attached. So, thanks again Claus! Regards Colin R -- A mini-experiment in concurrent data-driven assertions. -- Colin Runciman after Claus Reinke after Andy Gill after ... -- February 2003 import Control.Concurrent

Re: awaitEval in Concurrent Haskell

2003-02-17 Thread Colin Runciman
Simon, Does this mean you can womble along with Claus's suggestion? I'm feeling a bit swamped at the moment, and not keen to undertake another open-ended implementation exercise. So if you can manage without, and perhaps use the experience to refine the specification of a Really Useful

Re: awaitEval in Concurrent Haskell

2003-02-11 Thread Colin Runciman
C.Reinke wrote: I'm not sure whether I understand what you have in mind later on, but this first part sounds so remarkably like something I've seen before, that I'll take my chances. Do you remember Andy Gill's Hood from long ago? Inside its implementation, it had a very similar problem:

Re: awaitEval in Concurrent Haskell

2003-02-06 Thread Colin Runciman
Simon, Next idea is to have a function await :: a - b - b which is rather like 'seq' except that it waits for its first argument to be evaluated, whereas 'seq' evaluates it. Then you could write a new version of 'length' which used await before every case expression. Is that what you had in

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 several

Re: Weird profiling behaviour

2002-06-27 Thread Colin Runciman
Ketil Z. Malde wrote: 5.02 uses quicksort, That's funny, since I see quadratic scaling, I must be hitting worst case both times? 'sort' and 'sortBy' *are* implemented in the same way, right? Implementations of QuickSort on lists usually take the easy option of using the head of the list as

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! Now,

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! Now,

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 as

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

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

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: 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

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

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

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

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

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