erkin / ponysay

Pony rewrite of cowsay.
GNU General Public License v3.0
1.2k stars 81 forks source link

Knuth's word wrapping algorithm? #165

Open maandree opened 11 years ago

maandree commented 11 years ago

I do not know how effective Knuth's word wrapping algorithm is, but if it is not too much slower than our naïve algorithm, it should be used instead.

When implemention Knuth's algorithm, it is important not to forget to adjust it to support soft hyphens.

JotaRandom commented 11 years ago

a link or any project or anithing that implement that algorithm??

maibe a test for look for speed can be usefull here, I think

maandree commented 11 years ago

I cannot find it in The Art of Computer Programming or any of his published papers, so we have to look further. I do know that it is the algorithm used by Texlive, perhaps it is not too hard to cannibilise from that.

JotaRandom commented 11 years ago

if this make the source more light and maintaninable over time, and easy to underestand (cof I repprobe programming cof) I give my +1's