RE: [PHP-DEV] Re: Suggestion: Adding fmt like linebreak algorithm
Forgive me, but what does BC stand for? I'd be happy to have a go at creating the new function though... Dave -Original Message- From: Markus Fischer [mailto:[EMAIL PROTECTED]] Sent: 27 December 2001 05:15 To: Sean R. Bright Cc: 'Dominik Roettsches'; [EMAIL PROTECTED] Subject: Re: [PHP-DEV] Re: Suggestion: Adding fmt like linebreak algorithm On Wed, Dec 26, 2001 at 11:32:22PM -0500, Sean R. Bright wrote : I need to find a plaintext version of Knuth's paper, then maybe I could help. I don't want to look at fmt's code. You should. It's pretty straightforward to bind. -- Please always Cc to me when replying to me on the lists. -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Re: Suggestion: Adding fmt like linebreak algorithm
On Thu, Dec 27, 2001 at 10:08:04AM -, Dave Brotherstone wrote : Forgive me, but what does BC stand for? Backwards compatibility. I'd be happy to have a go at creating the new function though... No one will be going to stop you ;-) -- Please always Cc to me when replying to me on the lists. -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DEV] Re: Suggestion: Adding fmt like linebreak algorithm
Hello, Sean: I need to find a plaintext version of Knuth's paper, then maybe I could help. I don't want to look at fmt's code. You should. It's pretty straightforward to bind. I mailed you 2 files which could be interesting for you. Dave: I'd be happy to have a go at creating the new function though... for those who'd like to have a go in trying to implement Knuth's algorithm or adapt it from fmt, I can provide some useful links: http://www.cstug.cz/latex/ltnavig/general/tex-source.html - you can find a DVI-file here of a smaller version of Breaking lines into paragraphs from Knuth The source and binaries for the GNU textutils which fmt is a part of can be found (for example) here: ftp://gnu.ms.uky.edu/pub/mirrors/gnu/textutils/ Please tell me, if could be of assistance any further. Thanks to those who try to implement this into wordwrap, Dominik -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DEV] Re: Suggestion: Adding fmt like linebreak algorithm
Hello Sean, My concern (though maybe unwarrented, someone more familiar with these matters might correct me) is that fmt is released under the GPL and I recall us having problems with things like readline in the past. Is this a non-issue? Otherwise I could read the paper and write a clean room implementation... It think since php is a non-gpl soft one can't simply integrate fmt into php sourcecode. I'm also not an expert in these licensing issues but to my view a clean-room implementation should be more appropriate. I'm off for a few days. It would be nice if you continue the discussing and perhaps even begin to code some lines to get it running... Regards, Dominik -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Re: Suggestion: Adding fmt like linebreak algorithm
On Wed, 26 Dec 2001, Markus Fischer wrote: On Wed, Dec 26, 2001 at 02:22:02AM -, Dominik Roettsches wrote : Another suggestion is to replace the wordwrap code by the algorithm of Knuth. This would break BC and therefore isn't an option. Only changin the algorithm, but not touching the parameters will not break BC IMO. It just outputs something different, but that isn't a problem with wrapping lines IMO. Derick -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Re: Suggestion: Adding fmt like linebreak algorithm
On Wed, Dec 26, 2001 at 01:10:47PM +0100, [EMAIL PROTECTED] wrote : On Wed, 26 Dec 2001, Markus Fischer wrote: On Wed, Dec 26, 2001 at 02:22:02AM -, Dominik Roettsches wrote : Another suggestion is to replace the wordwrap code by the algorithm of Knuth. This would break BC and therefore isn't an option. Only changin the algorithm, but not touching the parameters will not break BC IMO. It just outputs something different, but that isn't a problem with wrapping lines IMO. Err, changing exit() also doesn't touch its parameters (at least, there would be a way to do it so) and still it breaks BC because the output is different (which was my point). -- Please always Cc to me when replying to me on the lists. -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Re: Suggestion: Adding fmt like linebreak algorithm
On Wed, Dec 26, 2001 at 01:10:47PM +0100, [EMAIL PROTECTED] wrote: On Wed, 26 Dec 2001, Markus Fischer wrote: On Wed, Dec 26, 2001 at 02:22:02AM -, Dominik Roettsches wrote : Another suggestion is to replace the wordwrap code by the algorithm of Knuth. This would break BC and therefore isn't an option. Only changin the algorithm, but not touching the parameters will not break BC IMO. It just outputs something different, but that isn't a problem with wrapping lines IMO. I think it's okay if you just use the wordwrap part of fmt. I don't like the idea of wordwrap() doing the other stuff fmt does. Better add a new function then. Stig -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Re: Suggestion: Adding fmt like linebreak algorithm
[EMAIL PROTECTED] (Stig Venaas) schrieb in [EMAIL PROTECTED]:">news:[EMAIL PROTECTED]: On Wed, Dec 26, 2001 at 01:10:47PM +0100, [EMAIL PROTECTED] wrote: On Wed, 26 Dec 2001, Markus Fischer wrote: On Wed, Dec 26, 2001 at 02:22:02AM -, Dominik Roettsches wrote : Another suggestion is to replace the wordwrap code by the algorithm of Knuth. This would break BC and therefore isn't an option. Only changin the algorithm, but not touching the parameters will not break BC IMO. It just outputs something different, but that isn't a problem with wrapping lines IMO. I think it's okay if you just use the wordwrap part of fmt. I don't like the idea of wordwrap() doing the other stuff fmt does. Better add a new function then. ACK. but who would do that, are there any volunteers? I could be of assistance but I'm not skilled enough in C... It would be nice if someone who's interested could help! Thanks in advance, Dominik -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DEV] Re: Suggestion: Adding fmt like linebreak algorithm
I need to find a plaintext version of Knuth's paper, then maybe I could help. I don't want to look at fmt's code. Sean -Original Message- From: Dominik Roettsches [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 26, 2001 8:15 PM To: [EMAIL PROTECTED] Subject: Re: [PHP-DEV] Re: Suggestion: Adding fmt like linebreak algorithm [EMAIL PROTECTED] (Stig Venaas) schrieb in [EMAIL PROTECTED]:">news:[EMAIL PROTECTED]: On Wed, Dec 26, 2001 at 01:10:47PM +0100, [EMAIL PROTECTED] wrote: On Wed, 26 Dec 2001, Markus Fischer wrote: On Wed, Dec 26, 2001 at 02:22:02AM -, Dominik Roettsches wrote : Another suggestion is to replace the wordwrap code by the algorithm of Knuth. This would break BC and therefore isn't an option. Only changin the algorithm, but not touching the parameters will not break BC IMO. It just outputs something different, but that isn't a problem with wrapping lines IMO. I think it's okay if you just use the wordwrap part of fmt. I don't like the idea of wordwrap() doing the other stuff fmt does. Better add a new function then. ACK. but who would do that, are there any volunteers? I could be of assistance but I'm not skilled enough in C... It would be nice if someone who's interested could help! Thanks in advance, Dominik -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Re: Suggestion: Adding fmt like linebreak algorithm
On Wed, Dec 26, 2001 at 11:32:22PM -0500, Sean R. Bright wrote : I need to find a plaintext version of Knuth's paper, then maybe I could help. I don't want to look at fmt's code. You should. It's pretty straightforward to bind. -- Please always Cc to me when replying to me on the lists. -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Re: Suggestion: Adding fmt like linebreak algorithm
On Tue, Dec 25, 2001 at 11:20:25PM -, Dominik Roettsches wrote : Hello Yasuo How about submit bug report (Feature Request)? Okay, I did that, thanks for your hint. I didn't know about the usual way of submitting articles to this group. I hope it gets integrated, I'd really appreciate that feature. Not in PHP, thats for sure. I also don't quite understand why its so important to cover fmt for that. A few (ok, maybe a few more) lines of PHP code will do the same. And as Manuel already pointed out he has written such a functionality already. -- Please always Cc to me when replying to me on the lists. -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Re: Suggestion: Adding fmt like linebreak algorithm
Markus Fischer wrote: On Tue, Dec 25, 2001 at 11:20:25PM -, Dominik Roettsches wrote : Hello Yasuo How about submit bug report (Feature Request)? Okay, I did that, thanks for your hint. I didn't know about the usual way of submitting articles to this group. I hope it gets integrated, I'd really appreciate that feature. Not in PHP, thats for sure. I also don't quite understand why its so important to cover fmt for that. A few (ok, maybe a few more) lines of PHP code will do the same. And as Manuel already pointed out he has written such a functionality already. I agree. Current PHP covers most of features can be found in fmt. Just a little more code is needed. New features are useful for text e-mail messages. However, I don't think it is important to support it. -- Yasuo Ohgaki -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DEV] Re: Suggestion: Adding fmt like linebreak algorithm
Doesn't wordwrap() already handle this? Or am i missing something? Sean -Original Message- From: Yasuo Ohgaki [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 25, 2001 8:22 PM To: [EMAIL PROTECTED]; Markus Fischer Subject: Re: [PHP-DEV] Re: Suggestion: Adding fmt like linebreak algorithm Markus Fischer wrote: On Tue, Dec 25, 2001 at 11:20:25PM -, Dominik Roettsches wrote : Hello Yasuo How about submit bug report (Feature Request)? Okay, I did that, thanks for your hint. I didn't know about the usual way of submitting articles to this group. I hope it gets integrated, I'd really appreciate that feature. Not in PHP, thats for sure. I also don't quite understand why its so important to cover fmt for that. A few (ok, maybe a few more) lines of PHP code will do the same. And as Manuel already pointed out he has written such a functionality already. I agree. Current PHP covers most of features can be found in fmt. Just a little more code is needed. New features are useful for text e-mail messages. However, I don't think it is important to support it. -- Yasuo Ohgaki -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Re: Suggestion: Adding fmt like linebreak algorithm
Sean R. Bright wrote: Doesn't wordwrap() already handle this? Or am i missing something? Sean Almost, just missing some features that can be found in fmt. Which is useful for text message formatting :) -- Yasuo Ohgaki -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DEV] Re: Suggestion: Adding fmt like linebreak algorithm
[EMAIL PROTECTED] (Sean R. Bright) schrieb in news:001301c18daf$df79f6f0 $e18e0418@cc230545b: Doesn't wordwrap() already handle this? Or am i missing something? Sean wordwrap() does just a simple wordwrap searching for the first whitespace backwards and breaking the line. The formatting fmt does is near-optimal line-breaking according to the paper published by Donald E. Knuth: Breaking Paragraphs into Lines, D.E. Knuth and M.F. Plass, chapter 3 of _Digital Typography_, CSLI Lecture Notes #78. It achieves a better result than first fit (backward first fit search) or other simple search methods by making use of dynamic programming. Another suggestion is to replace the wordwrap code by the algorithm of Knuth. I'm looking forward to read your replies, Dominik -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Re: Suggestion: Adding fmt like linebreak algorithm
Dominik Roettsches wrote: [EMAIL PROTECTED] (Sean R. Bright) schrieb in news:001301c18daf$df79f6f0 $e18e0418@cc230545b: Doesn't wordwrap() already handle this? Or am i missing something? Sean wordwrap() does just a simple wordwrap searching for the first whitespace backwards and breaking the line. The formatting fmt does is near-optimal line-breaking according to the paper published by Donald E. Knuth: Breaking Paragraphs into Lines, D.E. Knuth and M.F. Plass, chapter 3 of _Digital Typography_, CSLI Lecture Notes #78. It achieves a better result than first fit (backward first fit search) or other simple search methods by making use of dynamic programming. Another suggestion is to replace the wordwrap code by the algorithm of Knuth. I'm looking forward to read your replies, Dominik I've never take a look at wordwrap code, but Dominik's suggestion sounds nice to me. There are many search replace algorithms patented, but I don't think any of Knuth's algorithms are patented :) -- Yasuo Ohgaki -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Re: Suggestion: Adding fmt like linebreak algorithm
On Wed, Dec 26, 2001 at 02:22:02AM -, Dominik Roettsches wrote : Another suggestion is to replace the wordwrap code by the algorithm of Knuth. This would break BC and therefore isn't an option. -- Please always Cc to me when replying to me on the lists. -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]