)
}
}
)
(
}
{
)
)
(
)
(
(
{
}
)
(
)
}
)
)
{
(
(
)
)
}
)
(
}

Nonsense Logs

  1. const SPEED = 700;
  2.  
  3. const addKeys = obj => {
  4.   obj.keys = Object.keys(obj)
  5.   return obj
  6. }
  7.  
  8. const wordParts = {
  9.   start: addKeys({
  10.     z: .3,
  11.     zim: .1,
  12.     zz: .1,
  13.     zzz: .1,
  14.     ziz: .05,
  15.     zoo: .1,
  16.     koe: .05,
  17.     kob: .05,
  18.     'cow cow': .1,
  19.     'how ': .02,
  20.     sl: .1,
  21.     ko: .05
  22.   }),
  23.  
  24.   mid: addKeys({
  25.     i: .1,
  26.     oo: .1,
  27.     a: .1,
  28.     e: .3,
  29.     oe: .1,
  30.     ebobe: .1,
  31.     y: .1
  32.   }),
  33.  
  34.   end: addKeys({
  35.     z: .3,
  36.     n: .1,
  37.     t: .05,
  38.     rat: .1,
  39.     '!': .05,
  40.     '?': .05,
  41.     '': .1
  42.   })
  43. };
  44.  
  45. const wordPart = (
  46.     type,
  47.     dupeOdds = .1,
  48.     dupeMax = 8,
  49.     capOdds = .05
  50.   ) => {
  51.  
  52.   let result = '';
  53.   const part = wordParts[type];
  54.   while (result === '') {
  55.     const choice = part.keys[
  56.       Math.floor(Math.random() * part.keys.length)
  57.     ];
  58.     if (Math.random() < part[choice]) {
  59.       result = choice;
  60.       if (Math.random() < dupeOdds) {
  61.         const dupes = Math.round(
  62.           Math.random() * Math.random() * dupeMax
  63.         );
  64.         result = result.repeat(dupes);
  65.       }
  66.     }
  67.   }
  68.   wordPart.accum += result;
  69.  
  70.   if (Math.random() < capOdds) {
  71.     wordPart.accum = wordPart.accum.toUpperCase()
  72.   }
  73.   return wordPart;
  74. }
  75. wordPart.accum  = '';
  76.  
  77. const word = () =>
  78.   wordPart('start')('mid')('end').accum + ' '
  79.  
  80. document.body.style.fontSize="2em";
  81. setInterval(() => {
  82.   document.body.innerHTML += word();
  83.   wordPart.accum = ''
  84. }, SPEED);

Sometimes to entertain myself I will write nonsense style print/log statements. Things like console.log('cowcow'). This snippet generates a variety of these kinds of phrases.

snippet.zone ~ 2021-24 /// {s/z}