[PD-dev] strings

Mathieu Bouchard matju at artengine.ca
Sun Dec 17 16:42:59 CET 2006


On Sun, 17 Dec 2006, Bryan Jurish wrote:

> ... which wouldn't get us true strings in the mathematical sense of a 
> free monoid <Alphabet,concat()>, since the empty string is the identity 
> element for concat()...

Right, and it may seem like not much, but if one is going to make a lot of 
abstractions for basic string processing, i'd rather have them use monoid 
algorithms rather than semigroup algorithms. The monoid algorithms are 
often nicer... semigroup algorithms can't start with an empty string, so 
they start with the first character of a string, and then do a 
foreach-loop that starts on the second character so that the first 
character isn't counted twice, so you have to decide a way to skip that 
character... ugly.

  _ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju
| Freelance Digital Arts Engineer, Montréal QC Canada


More information about the Pd-dev mailing list