[Haskell-cafe] ANNOUNCE: Palindromes 0.1

Johan Jeuring johanj at cs.uu.nl
Sat Sep 12 06:16:46 EDT 2009

Hi Henning,

Thanks for the many suggestions.

> On Sun, 6 Sep 2009, Johan Jeuring wrote:
>> The primary features of Palindromes include:
>> *  Linear-time algorithm for finding exact palindromes
>> *  Linear-time algorithm for finding text palindromes,
>> ignoring spaces, case of characters, and punctuation
>> symbols.
> You made me curious, whether there are palindromes in my texts.  
> However, I have some difficulties getting sensible results from it.  
> First I found a long palindrome, that was actually a code example  
> for an array definition.

This was using the option -t I suppose.

> So I wondered, whether this palindrome shadows nicer shorter  
> palindromes in the same text.

Indeed it might. By using -ts you will get all text palindromes around  
every position in the string, but I guess you found this option (the  
description of which was not correct, as you noticed). But on a long  
text you get (probably too) many results.

> How about an option for showing the n longest palindromes or  
> palindromes with length larger than n?

This makes sense. I will add an option -n which takes a number n and  
outputs all palindromes of length at least n.

> Then I found a palindrome in
>  Functi[on sin is no]t defined
> How about restricting text palindromes to sequences that are bounded  
> by space and punctuation?

This makes sense as well.

> The Palindrome welcome message is a bit disturbing when running  
> palindrome on a set of files.

I see. I'll remove it.

> I also like to filter out HTML markup (with strip-html from tagchup  
> package), before piping into palindrome. This however would require  
> to run palindrome on standard input.

Again, this makes sense.

> The options are '-x' for a single answer and '-xs' for multiple  
> answers, but for '-ts' this logic does not hold. How about '-lt' or  
> '-tl' ? I would like to have '-ts' to print all text palindromes (or  
> actually, I would like to get all palindromes with at least 5  
> characters).


>> Documentation
>> -------------
>> The API is documented using Haddock and available on the  
>> Palindromes package
>> site.
> It says, that the executable is FindingPalindromes, but actually it  
> is palindromes, right?


> Pretty much suggestions, I know. Don't get worried and thank you for  
> the program!

You're welcome, thanks for the suggestions. I'll try to upload a new  
version of palindromes that includes your suggestions in the next  
couple of weeks.

-- Johan

More information about the Haskell-Cafe mailing list