>>10
That's not optimized. It might push the same code twice, causing the unpleasant effect of several words in a row having the same formatting. Please fix it by ensuring that two redundant codes can't exist in the stack at the same time.
Please avoid calling rand() multiple times until you find a suitable code. Moreover, don't call rand() if some overriding condition is met ((pushed == 0) and (pushed > 4) in your code).
That's not optimized. It might push the same code twice, causing the unpleasant effect of several words in a row having the same formatting. Please fix it by ensuring that two redundant codes can't exist in the stack at the same time.
how would you handle something like [m]a [aa]b [m]c[/m] d[/aa] e[/m]?
anyway, here's a better one: /* Copyright (c) 2008 Anonymous
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that you grant this
* same permission to anyone you distribute it to without any additional
* restrictions.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
>>10 >>13
These both suck some long Sussman'.
You really should implement a more probabilistic model rather than just using plain randomness for everything. (i.e.: nest depth of tags effects chance of escaping tags or increasing nest dept, && certain random patterns that have already occured should be more likely to reoccur.
You really should implement a more probabilistic model rather than just using plain randomness for everything. (i.e.: nest depth of tags effects chance of escaping tags or increasing nest dept, && certain random patterns that have already occured should be more likely to reoccur.
that's great if you want to get the same five patterns over and over again instead of coming up with new ones.
Name:
Anonymous2009-03-20 20:20
Haveyougeneratedyourrandom BBCode today?
Name:
Anonymous2009-03-20 20:27
Yes, indeed. I actually have. Was a great experience.
Name:
Anonymous2009-03-20 20:28
ITT: OPTIMIZING BBCODE GENERATORS THAT TAKE NANOSECONDS TO RUN.
Name:
Anonymous2009-03-20 20:29
I'm glad to hearthat. HAND.
Name:
Anonymous2009-03-20 20:33
>>15
...You don't undertand the word 'probabilistic' do you? It does not mean deterministic, it simply means weighted randomness. So you dont end up with shit like >>16
MarijuanaMUST be legalized. BBCode MASTERSsmoke WEED!
Name:
Anonymous2009-03-20 20:46
GREEEEEEN
Marijuana MUST be legalized.
BBCode MASTERSsmoke WEED!
Name:
Anonymous2009-03-20 20:46
GREEEEEEN
MarijuanaMUSTbelegalized.
BBCode MASTERS smoke WEED!
Name:
Anonymous2009-03-20 20:46
HOLY SHITILOVE ICECREAM
Marijuana MUST be legalized.
BBCodeMASTERS smoke WEED!
Name:
Anonymous2009-03-20 20:47
>>21
No >>16 looks like utter shit, and if it is weighted it is done very poorly and the algorithm is likely very primitive- Like all the spam in this thread. >>17 on the other hand looks very smooth and well done, if that is computer generated I would be impressed.
>>55
No, I didn't. I posted >>13 and I doubt >>17 is random generated.
If it is, author I would like to see the code.
Name:
Anonymous2009-03-20 20:56
Honestly I think the completely random generated ones look more aesthetically pleasing than the weighted ones.
Name:
Anonymous2009-03-20 21:18
>>57
You havn't seen or visualized a good weighting algorithm then. It would BBCodify text in a manner similar to a human poster, with pleasing patterns visible i.e, nesting subs to depth 5 and then unnesting while alternating bold and italicized words. I would try, but for the algorithm to be good enough to meet my expectations it would be good enough that I could write a research paper on it, and that would just be a large waste of time when I could design better useful algorithms I will actually get paid to submit to journal instead.
Name:
Anonymous2009-03-20 21:22
>>58
"I could do it... But... I don't have the time. So I only talk shit."
Name:
Anonymous2009-03-20 21:39
>>59
The first half is correct. I don't know where you got the latter half or what relevance it has at all when discussing a theoretical algorithm. If you could please elaborate?
That is, unless IHBT.
Name:
Anonymous2009-03-20 21:40
What'sgoingonhere?
Name:
Anonymous2009-03-20 22:14
a b c d e f g h i j k l m n o p q r s t u v w x y z
Name:
Anonymous2009-03-20 22:15
a b c d e f g h i j k l m n o p q r s t u v w x y za b c d e f g h i j k l m n o p q s t u v w x y z a b c d e f g h i j k l m n o p q r s t u v w x y z