[Question]
  [
Create a program that prints all whole numbers inclusively between an interval `(a, b)`, and replaces multiples of 8 in the sequence with random (uniformly distributed, independent of other characters), non-numeric, non-whitespace, printable ASCII characters. 
Assume 0 < a < b in all cases.
If the number has more than 1 digit, make sure the amount of characters in the replacement matches!
Examples:
```
(1, 16) -> 1 2 3 4 5 6 7 $ 9 10 11 12 13 14 15 n@
(115, 123) -> 115, 116, 117, 118, 119, :F<, 121, 122, 123
(1, 3) -> 1 2 3
```
Non-Examples:
```
(1, 16) -> 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
(115, 123) -> 115 116 117 118 119 $ 121 122 123
```
This is code golf, so the shortest code in bytes wins!
**Current Winner:**
 [Pyke (21 bytes) by muddyfish](https://codegolf.stackexchange.com/questions/104356/crazy-8s-code-golf/104439#104439)
**Most Popular:**
 [Python 2 (119 bytes) by Dennis](https://codegolf.stackexchange.com/questions/104356/crazy-8s-code-golf/104437#104437)
  
[Answer]
# [Python 2](https://docs.python.org/2/), 119 bytes
```
import random,string
def f(a,b):print`[random.choice(string.printable[10:95])for _ in`a`]`[2+a%8*b::5]or a;a<b<f(a+1,b)
```
[Try it online!](https://tio.run/nexus/python2#JY1BDoIwFETX9BR/Y0KlIRaC0cpNSGN/gWoTaUnt/fELu5eZl5nNL2tMGRKGKS7im5MPLzbNDlyJwnK1UpDNcPT1@I5@nMtDq/cO7Wce5EXdO81dTPAEHwwabYamwtPtbJXqNOX4wN72tFpJ2t3@Kj2A5eRDKQXIKxcEsiNs2p0FtFyxwh0iK/bD7Qc "Python 2 – TIO Nexus")
[Answer]
# Python 2, 126 bytes
[Try it online!](https://repl.it/EwR4/5)
```
import random,string
def f(a,b):
 while b/a:print[a,eval('random.choice(string.printable[10:-6])+'*len(`a`)+"''")][a%8<1];a+=1
```
Many thanks to Flp.Tkc and EasterlyIrk for all of their help!
[Answer]
## zsh, ~~100~~ 98 bytes
```
for i in {$1..$2};{((i%8))&&<<<$i||<<<`yes 'shuf -e {!..~}|grep "[^0-9]"|head -c1'|head -$#i|zsh`}
```
The two input arguments are passed as command line arguments, and the numbers are output on separate lines.
```
for i in {$1..$2};{   # loop through the range
((i%8))&&             # if the number is not divisible by 8 (i % 8 != 0),
<<<$i||               # output it
<<<`                  # otherwise, output the following:
yes '                 # using `yes' as a golfy loop
shuf -e {\!..\~}      # shuffle the range of printable ASCII (minus space)
|grep "[^0-9]"        # get rid of numbers
|head -c1'            # take the first character
|head -$#i            # obtain a string with that code repeated len(i) times... 
|zsh                  # ... and eval it
`}
```
[Answer]
## Pyke, ~~22~~ 21 bytes
```
h1:Fi8%!I`lV~Kl7T>Hs0
```
[Try it here!](http://pyke.catbus.co.uk/?code=h1%3AFi8%25%21I%60lV%7EKl7T%3EHs0&input=16%0A4)
Takes input in the form: `higher`, `lower`
```
h1:                   -  range(lower, higher+1, 1)
   F                  - for i in ^:
    i8%               -    i % 8 
       !              -   not ^
        I             -  if ^:
         `l           -    len(str(i))
           V          -   repeat V ^ times
            ~K        -        printable_ascii
              l7      -       ^.strip()
                T>    -      ^[10:]
                  H   -     random.choice(^)
                   s0 -    sum(^)
```
[Answer]
# Mathematica, 96 bytes
```
Range@##/.a_?(8∣#&):>Join[33~(c=CharacterRange)~47,58~c~127]~RandomChoice~⌊Log10@a+1⌋<>""&
```
**Explanation**
For inputs `m` and `n`:
```
Range@##
```
Generate `{m, m + 1, m + 2, ... , n}`
```
/.a_?(8∣#&):>
```
For all numbers that are divisible by 8 (call that `a`), apply this replacement rule:
```
Join[33~(c=CharacterRange)~47,58~c~127]
```
Get a list of all printable ASCII characters, except digits.
```
... ~RandomChoice~⌊Log10@a+1⌋
```
Pseudo-randomly choose `Floor[Log10[a] + 1]` characters from the list, allowing duplicates.
```
<>""
```
Join the characters.
[Answer]
## R, 73 bytes
```
i=scan();x=i[1]:i[2];x[!x%%8]=sample(sapply(c(32:46,58:126),intToUtf8));x
```
Reads input from stdin and replaces replaces numbers divisible by `8` with a uniformly chosen sample of ascii characters in the range `32...47, 58...126`. To draw the random sample we need a vector of characters, unfortunately `intToUtf8()` returns one string rather than a vector so we also have to vectorize it over the range using `sapply`.
[Answer]
# Python 2, 126 bytes
[*(one does not simply outgolf Dennis)*](https://codegolf.stackexchange.com/a/104437/60919)
Seeing as I did a lot of work on heather's answer, I thought I'd post my own solutions too.
```
import random,string
def f(a,b):
 while b/a:print[a,eval('random.choice(string.printable[10:-6])+'*len(`a`)+"''")][a%8<1];a+=1
```
This is a function which takes two arguments and prints directly to `STDOUT`.
# 127 bytes
```
import random,string
lambda a,b:[[x,eval('random.choice(string.printable[10:-6])+'*len(`x`)+`''`)][x%8<1]for x in range(a,b+1)]
```
This is an unnamed anonymous function - to use, assign to a variable (such as `f`), and then call with `f(a, b)`. This returns the output as a list.
[Answer]
# [Pip](https://github.com/dloscutoff/pip), 28 bytes
```
Fia,b+1Pi%8?i{RC@>PA@`\D`}Mi
```
Takes the numbers as command-line arguments and prints a newline-separated list of results. [Try it online!](https://tio.run/nexus/pip#@@@WmaiTpG0YkKlqYZ9ZHeTsYBfg6JAQ45JQ65v5//9/0/9GpgA "Pip – TIO Nexus")
Explanation:
```
                              a,b are cmdline args; PA is string of all printable ASCII
Fia,b+1                       For i in range(a, b+1):
       P                       Print this:
        i%8?i                  If i%8 is truthy (nonzero), i; otherwise:
             {           }Mi   Map this function to the digits of i:
                @>PA           All but the first character of PA (removes space)
                    @`\D`      Find all regex matches of \D (nondigits)
              RC               Random choice from that list of characters
                               The map operation returns a list, which is concatenated
                               before printing
```
[Answer]
# JavaScript (ES6), 114 bytes
```
f=(x,y)=>(x+"").replace(/./g,d=>x%8?d:String.fromCharCode((q=Math.random()*84)+(q>15?43:33)))+(x<y?[,f(x+1,y)]:"")
O.textContent = f(1,200)
```
```
<pre id=O>
```
Those darn built-ins with 23-byte names....
[Answer]
# Bash + [apg](https://linux.die.net/man/1/apg), ~~64~~, ~~76~~, 73 bytes
EDITS:
* Fixed the "8 8" issue, exclude numeric characters from a set of random chars, +12 bytes
* **-3 bytes**, replaced `$1 $2` with `$@`, thx @pxeger
**Golfed**
```
seq $@|sed "$[(7&(8-$1%8))+1]~8s/.*/a=&;apg -a1 -n1 -Mcsl -m\${#a} -x0/e"
```
**Test**
```
>./crazy8 8 8
$
>./crazy8 115 123
115
116
117
118
119
As_
121
122
123
>./crazy8 1 16
1
2
3
4
5
6
7
"
9
10
11
12
13
14
15
x!
```
[Answer]
# [MATL](https://github.com/lmendo/MATL), 26 bytes
```
&:"@8\?@}6Y24Y2X-Xz@VnT&Zr
```
[Try it online!](https://tio.run/nexus/matl#@69mpeRgEWPvUGsWaWQSaRShG1HlEJYXohZV9P@/OZehOQA "MATL – TIO Nexus")
### Explanation
```
&:        % Input a and b (implicit). Push range [a a+1 ... b]
"         % For each k in that range
  @       %   Push k
  8\      %   Modulo 8
  ?       %   If non-zero
    @     %     Push k
  }       %   Else
    6Y2   %     Push string of all printable ASCII chars
    4Y2   %     Push string '0123456789'
    X-    %     Set difference
    Xz    %     Remove space. Gives string of possible random chars
    @Vn   %     Push number of digits of k
    T&Zr  %     Random sample with replacement of that many chars from the string
          % End if, end for each, display (implicit)
```
[Answer]
# [Pyth](https://github.com/isaacg1/pyth), 24 bytes
```
jm?%d8dsmO-r\~\ jkUT`d}F
```
[Try it online!](https://tio.run/nexus/pyth#@5@Va6@aYpFSnOuvWxRTF6OQlR0akpBS6/b/v6GOgqEZAA "Pyth – TIO Nexus")
### Explanation:
```
jm?%d8dsmO-r\~\ jkUT`d}FQ  # Auto-fill variables
                      }FQ  # Splat inclusive range on the input
 m?%d8d                    # Map over each number, if it isn't divisible by 8 return it
       smO          `d     # for each other number, select a character at random for
                             each of it's digits and then flatten into one string
           r\~\            # Printable ASCII excluding space
          -     jkUT       # Setwise difference with numeric values (remove numbers)
j                          # Join with newlines
```
[Answer]
# [Perl 6](http://perl6.org/), 60 bytes
```
{map {$_%8??$_!!S:g/./{grep(/\D/,"!".."~").pick}/},$^a..$^b}
```
Explanation:
* `{ map { }, $^a .. $^b }`: A lambda that takes two arguments, generates the list of integers in that range, and returns it with the following transformation applied to each element:
* `$_ % 8 ?? $_ !!`: If the element is not divisible by 8, pass it on unchanged. Otherwise...
* `S:g/./{ }/`: ...replace each character of its string representation with the value generated by this expression:
* `grep(/\D/, "!" .. "~").pick`: Generate the range of characters between `!` and `~` (in Unicode order), filter out digits, and randomly pick one of the remaining characters.
[Answer]
## Perl, 66 bytes
```
map{$_%8||s%.%do{$_=chr rand 126}until/[!-\/:-~]/;$_%ge;say}<>..<>
```
Run with `-E` flag:
```
perl -E 'map{$_%8||s%.%do{$_=chr rand 126}until/[!-\/:-~]/;$_%ge;say}<>..<>' <<< "8
16"
```
This is pretty straight forward:  
-`<>..<>` creates a list of the numbers between the 2 inputs number. And then `map` iterates over it:  
-`$_%8||...` : the `...` are executed only if `$_` is a multiple of 8.  
-`s%.%xxx%ge` : replace every character with `xxx`.  
- `do{$_=chr rand 126}until/[!-\/:-~]/` pick a random character (from codes 0 to 126) until we get one that satisfies `/[!-\/:-~]/`, ie. one that is printable and is not a digit.  
- `say`: print it.
[Answer]
# [C (gcc)](https://gcc.gnu.org/), ~~129~~ 119 bytes
```
s(a,r){a&&s(!isdigit(r=rand()%94+33)?putchar(r),a/10:a,0);}f(a,b){b>a&&f(a,b-1);b%8?printf("%d",b):s(b,0);printf(" ");}
```
[Try it online!](https://tio.run/##ZY7LCsIwEEX3fkWsVGYwakMFH9X6LXm0OlBjSeJCit9e04KIuLsczmFGLy9a9zOyunmYih11eLbV6lpOvsgH05D6Y3T/RYFuQ9h7kNxhJ@dzD1Pyhi4UwJ2ctAYw3W8WeY7n9hH0VTpwyOVaZAfJMyxedUwVdqqM8biXAguV7s6tIxtqSFKTROHgQQ3@h7Iktn3c7CbJMkDW@fHc8BJkiEUNgovtYL0B "C (gcc) – Try It Online")
129 → 119 Use the `%94+33` trick from [O.O.Balance](https://codegolf.stackexchange.com/a/161452/31443)
### Ungolfed:
```
s(a,r){
    a&&                                  // Loop recursively on a!=0
    s(!isdigit(r=rand()%94+33)           // Test random selection
      ?putchar(r),a/10                   // Print and reduce a
      :a                                 // Retry random selection
      ,0);                               // Second arg, recurse
}
f(a,b){
    b>a&&                                // Loop recursively on b>a
    f(a,b-1);                            // Reduce b, recurse
    b%8?printf("%d",b)                   // Print non 8's
       :s(b,0);                          // Call s() for 8's
    printf(" ");                         // Space separator
}
```
[Answer]
# C, ~~157~~ 115 bytes
```
f(a,b){b-a&&f(a,b-1);if(b%8)printf("%d",b);else for(;b;b/=10){while(isdigit(a=rand()%94+33));putchar(a);}puts("");}
```
Try it online [here](https://tio.run/##HYzNCoMwEITvfYoQUHapUsUKleDD5FcXrEqStgfx2dPgnL4ZZkbXk9YpOZCVwkPVsiwvrlsU5EAVL9w9rdEBLwzPHWGXYJnbPAgl1GNsGzx@My0WKBiaKIIcvVwNYDE8712HKPZP1LP0IFGcmQNwninlV/aWtMJ3I4PsuLGscG0jvS00eXplDoa@aps@2zP9AQ). Thanks to [jxh](https://codegolf.stackexchange.com/users/31443/jxh) for golfing 42 bytes.
Ungolfed version:
```
f(a, b) { // recursive function, parameters are implicitly int
    b-a && f(a, b-1); // recurse until a = b
    if(b % 8)            // if the number is a multiple of 8
        printf("%d", b); // simply print it
    else for(; b; b /= 10) { // while b > 0, lop off the last digit
        while(isdigit(a = rand() % 94 + 33)); // generate random characters in ASCII range [33, 127] until one is non-numeric
        putchar(a); // print the character
    }
    puts(""); // print a newline
}
```
[Answer]
# Java 10, ~~149~~ 147 bytes (lambda function)
```
b->a->{var r="";for(;a<=b;r+=" ",a++)for(var c:(a+"").split("")){char t=0;for(;t<33|t>126|t>47&t<59;t*=Math.random())t=127;r+=a%8<1?t:c;}return r;}
```
[Try it online.](https://tio.run/##lZDNbsIwEITvPMUqUiu7AYuQ8lMcp7dKPXDiWPWwmACmwYmcDRKiefbUEdBrqWRZI8@3a83s8YiD/fqr1TlWFSzQ2HMPoCIko2HvXVGTycWmtppMYcXbVSTvlrJt5vr3QUtyxm7TFDQoaFeDFAfp@YgOnAoCuSkck5iolXShCiDoYxjy7rEj9JxhGARcVGVuiHnFz3rnDVLDyyQlcfxNaTSa@Pt5@kjJ@EXSk1og7YRDuy4OjHNS0WjafYAPsyR6pbmWjcuodhacbFrpY/tT1qvcJ78WcCzMGg6@FHYJ8PGJvOsHYHmqKDuIoiZReodyy7TAssxPLJrwm@Jc/kmP4l88Gt8xEP9v@/CGzy5402vaHw)
# Java 10, ~~227~~ 225 bytes (full program)
```
interface M{static void main(String[]A){var r="";for(var a=new Long(A[0]);a<=new Long(A[1]);r+=" ",a++)for(var c:(a+"").split("")){char t=0;for(;t<33|t>126|t>47&t<59;t*=Math.random())t=127;r+=a%8<1?t:c;}System.out.print(r);}}
```
[Try it online.](https://tio.run/##TU7LbsIwEPwVyxLIJhDFoTwdt@JeThwRh5UTwNDYyNmmqtJ8uzFISL2M5qHZnQu0MLmU1xCMxcofQVdk2zUIaDRpnSlJDcayHXpjT/vDhncteOIVpfLoPHsIULb6IZ/Onthmnx24hOK/I6LjE0UJHUOS8FdLrxkklPK0uX0ZZJHxTp9jgCp7npZYTKd/@C7yecS3xRCL2UriSG0Bz6kHW7qacY5K5IvHAxgsC/GBay373W@DVZ26b0xvcTcyz2XfhxCWWRD57A4)
**Explanation:**
```
b->a->{          // Method with two integer parameters and String return-type
  var r="";      //  Result-String, starting empty
  for(;a<=b      //  Loop as long as `a` is smaller than or equal to `b`
      ;          //    After every iteration:
       r+=" ",   //     Append a space to the result-String
       a++)      //     And increase `a` by 1
    for(var c:(a+"").split("")){
                 //   Inner loop over the characters of the current number
      char t=0;  //    Random-char, starting at 0
      for(;t<33|t>126|t>47&t<59;
                 //    Loop until `t` is a non-digit printable ASCII char
          t*=Math.random())t=127;
                 //     Set `t` to a random character with a unicode in the range [0,127)
      r+=a%8<1?  //   If the current `a` is divisible by 8:
          t      //    Append the random character
         :       //   Else:
          c;}    //    Append the digit instead
  return r;}     //  Return the result
```
[Answer]
# [APL (Dyalog Extended)](https://github.com/abrudz/dyalog-apl-extended), 32 bytes
```
{(?84¨⍕⍵)⊇⎕D~⍨'!'…'~'}¨@{0=8|⍵}…
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT9dNrShJzUtJTfn/qG@qp/@jtgkG/6s17C1MDq141Dv1Ue9WzUdd7UApl7pHvSvUFdUfNSxTr1OvPbTCodrA1qIGqKAWKPQ/DajxUW8fxIyu5kPrjR@1TQTygoOcgWSIh2fwf0OFNAVDMy5DQ1MQw8iYCyRgDAA "APL (Dyalog Extended) – Try It Online")
Huge thanks to [Adám](https://codegolf.stackexchange.com/users/43319/ad%C3%A1m) and [dzaima](https://codegolf.stackexchange.com/users/59183/dzaima) for their help. First time using Dyalog Extended!
Explanation:
```
{(?84¨⍕⍵)⊇⎕D~⍨'!'…'~'}¨@{0=8|⍵}…  ⍝ Dyadic 2-train
                               …  ⍝ Tacit range: list of numbers from left arg 
                                  ⍝ to right arg inclusive
{(?84¨⍕⍵)⊇⎕D~⍨'!'…'~'}¨@{0=8|⍵}   ⍝ Monadic function applied to above          
                        {     }   ⍝ Function definition
                           8|⍵    ⍝ 8 modulo every item in our range
                         0=       ⍝ Transform list into a boolean vector, with
                                  ⍝ 1 where item was equal to zero, 0 otherwise
                      ¨@          ⍝ Applies left function to each item selected
                                  ⍝ by above
{                    }            ⍝ Function definition
              '!'…'~'             ⍝ Range of all printable ASCII chars
          ⎕D~⍨                    ⍝ Remove numeric characters from above
 (    ⍕⍵)                         ⍝ Convert function argument to string
                                  ⍝ (e.g., 123 -> "123")
   84¨                            ⍝ For each character, replace with number 84
                                  ⍝ (number of non-numeric printable ASCII chars)
  ?                               ⍝ Generate random number from 1-84 for each
                                  ⍝ 84 in list
         ⊇                        ⍝ Index the ASCII char list with above random
                                  ⍝ numbers
```
[Answer]
# Inlined version
# [Scala](http://www.scala-lang.org/), 132 bytes
```
def S(a:Int,b:Int)= a to b map(x=>if(x%8==0)Random.nextInt(((33 to 47)++(58 to 126)).length).toChar.toString else String.valueOf(x))
```
[Try it online!](https://tio.run/##VY/dSsQwEIXv8xRzI0zYJXStP4tQQb0SFME@wbSd7kbSJDRTKYjPXhP2ypuZc4ZzPpjUk6PNTjHMAqkY0wfnuBcbvJkWoc6xebNJnpdx5Fn9iy5infkkP4RJKRW6r9yDd7IeeBX2Q4KnGH8UwDbwCC3Sw6uXfVemboBAAnQwUcS1ebQjrlfHpqn0BWh8ZuQgItZ1Sd7c690Ob49FH67vtDaO/UnO2kh4OdOcVyuz9Sdglxgu2nyTW/gjs7XeAGK@CbZ4qPZ1VYrlM61@tz8 "Scala – Try It Online")
# [Scala](http://www.scala-lang.org/), 198 bytes
### An improved functional version with immutable state (03-04-2018)
```
  def S(a: Int, b: Int)={
    val c=(33 to 47)++(58 to 126)
    val r = (a to b).toStream.map {case x if x%8==0=>c(Random.nextInt(c.length)).toChar.toString
      case x => String.valueOf(x)}
    r}
```
[Try it online!](https://tio.run/##VVDRSsQwEHzPV8yLkHBH6Fn1DiEH6pOgCN4XpGl6F0mTkqZSOPrtNWlF8Gl3Z2dndrdX0srZtJ0PEX0uuPLWahWNd7wdoqys5m@mj89D0@hA/lGHaCz/lK72LSHEV19pDu/SOOgxalf3eOq6KwFmoNYNTlQ@4tXFLaolMpGbwLe0UIKWJaLH3Z5tNvT@kPPd7QP7YwQIUJnhivHoTzFo2fJWdrgq2WuMMA3Gm4MQhTgquu7FXVolWVHFrXbneGF59uUiwyph3HkxAH41xBErzJPnoD8aOrJpoYQpndGlVqQnuiu2ZZGl8m8YmeYf "Scala – Try It Online")
**A functional style solution in Scala (350 bytes)
for the fun of it.**
```
def r(a:Int, b:Int)={
    var l=(33 to 47).toList:::(58 to 126).toList
    l=Random.shuffle(l)
    var x=ListBuffer[String]()
    var k=0
    (a to b).toList.foreach{e=>{
         if(k==l.length){k=0
         l=Random.shuffle(l)}
         if (e.toInt%8==0){x+=l(k).toChar.toString
           k+=1}
         else{x+=e.toString
             k+=1}}}
    x}
```
*Suggestions for improvements are welcomed.*
[Answer]
# PHP, 163 bytes
```
$n=range(48,57);$c=array_diff(range(32,126),$n);
foreach(range($a,$b) as $v){if($v%8!=0){echo $v;}
else{for($i=0;$i<strlen($v);$i++){echo chr($c[array_rand($c)]);}}}
```
### Explanation:
* `$n = range(48,57)` These are the ASCII codes for numbers, which are in the middle of special characters (32-47) and other characters (58-126).
* `$c = array_diff(range(32,126), $n)` Using the `$n` array, exclude numeric characters and build an array of acceptable ASCII characters.
* `foreach(range($a,$b) as $v)` Loop over the range of values from `$a` to `$b` (inclusive), as $v inside the loop.
* `if($v % 8 != 0) { echo $v; }` Test for $v being evenly divisible by 8 using the mod operator `%`.
* `else { for($i = 0; $i < strlen($v); $i++) { ... }}` If not evenly divisible by 8, loop enough times for the number of digits in the number and print the characters (in the next step).
* `echo chr($c[array_rand($c)])` Print a single character from the acceptable array of ASCII values in `$c`. `array_rand` returns an index in the array, so we have to get the actual value at that index using `$c[random_key]`.
I could probably make this smaller by creating `$c` differently, and the loop to print the ASCII characters feels clunky so I'll continue to ponder how to shorten that. 
[Answer]
## postgresql9.6 251 chars
very long code but postgresql also does it.  
```
do language plpgsql $$ begin for n in a..bloop raise info'%',case when 0=n%8then(select array_to_string(array(select*from(select chr(generate_series(33,126)))t where chr!~'\d'order by random()limit floor(log(n))+1),''))else n::text end;end loop;end;$$
```
formatted sql is here:
```
do language plpgsql $$
begin
for n in a..b loop
    raise info '%',
    case when 0 = n % 8 then (
        select array_to_string(array(select * from (
            select chr(generate_series(33, 126))
        ) t where chr !~ '\d' order by random() limit floor(log(n)) + 1), '')
    ) else n::text
    end;
end loop;
end;
$$
```
[Answer]
## [QBIC](https://drive.google.com/drive/folders/0B0R1Jgqp8Gg4cVJCZkRkdEthZDQ), 79 bytes
```
::[a,b|~c%8=0|[_l!c$||_R33,116|~e>47 and e<58|e=e+z]Z=Z+chr$(e)]\Z=Z+!c$]Z=Z+@ 
```
Skipping the numbers is a costly affair, here's a version that might also randomly select `0-9` for 20 bytes less:
```
::[a,b|~c%8=0|[len(!c$)|Z=Z+chr$(_r33,126|)]\Z=Z+!c$]Z=Z+@ 
```
Sample output for `1, 89`
```
1 2 3 4 5 6 7 U 9 10 11 12 13 14 15 M9 17 18 19 20 21 22 23 ^L 25 26 27 28 29 30 
31 <U 33 34 35 36 37 38 39 gH 41 42 43 44 45 46 47 aJ 49 50 51 52 53 54 55 1b 57 58 59 60 
61 62 63 ,C 65 66 67 68 69 70 71 ]; 73 74 75 76 77 78 79 [B 81 82 83 84 85 86 87 Ix 89 
```
Explanation:
```
::        Get inputs 'a' and 'b' from the command line
[a,b|     FOR(c=a; c<=b; c++)
~c%8=0|   IF c is cleanly divisible by 8 THEN
 _l!c$|   Take the length (_l) of the string representation (! ... $) of c 
[      |  FOR (d = 1; d<= length(c); d++)
_R33,116| Set e to a random value in the range 33 - 116 (all the printable ascii's - 10)
~e>47     IF e falls between 47
and e<58| and 58 (ASCII code for 0-9) THEN 
e=e+z     e = e + 10 (z == 10 in QBIC)
]         END IF
Z=Z+      Add to Z$
chr$(e)]  ASCII character e
\         ELSE if c is not cleanly divisible by 8
Z=Z+!c$   Add to Z the string representation of c
]         NEXT
Z=Z+@     Add a space to Z$ (@ is an implicitly delimited string literal with 1 significant space)
( Z$ is implicitly printed at end of program )
```
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), 17 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
```
ŸεD8ÖižQžhK¦.rsg£
```
Takes the input as `highest\nlowest`, and outputs a list.
[Try it online](https://tio.run/##ASkA1v9vc2FiaWX//8W4zrVEOMOWacW@UcW@aEvCpi5yc2fCo///MTIzCjExNQ) or [verify all test cases](https://tio.run/##yy9OTMpM/V9Waa@k8KhtkoKSfWXC/6M7zm11sTg8LfPovsCj@zK8Dy3TKypOP7T4f22tzv/oaEMdQ7NYHThlaKpjaGSMytIBkRY6hoZGsbEA).
**Explanation:**
```
Ÿ                  # Create a list in the range [low (implicit) input, high (implicit) input]
 ε                 # Map each value to:
  D                #  Duplicate the value
   8Öi             #  If it's divisible by 8:
      žQ           #   Push all printable ASCII characters (" " through "~")
        žhK        #   Remove all digits
           ¦       #   Remove the first character (the space)
            .r     #   Randomly shuffle the remaining characters
              s    #   Swap to take the map value again
               g   #   Get its length
                £  #   And leave that many characters from the string
                   # (and implicitly output the resulting list after we're done mapping)
```
[Answer]
# [Japt](https://github.com/ETHproductions/japt), 20 bytes
```
;òV ®%8?Z:EÅk9ò)öZìl
```
[Try it](https://ethproductions.github.io/japt/?v=1.4.6&code=O/JWIK4lOD9aOkXFaznyKfZa7Gw=&input=MQoyMAotUw==)
```
;òV ®%8?Z:EÅk9ò)öZìl     :Implicit input of integers U & V
 òV                      :Range [U,V]
    ®                    :Map each Z
     %8                  :  Modulo 8
       ?Z:               :  If truthy, return Z, else
;         E              :  Printable ASCII
           Å             :  Slice off first character
            k            :  Remove
             9ò          :    Range [0,9]
               )         :  End remove
                 Zì      :  Digit array of Z
                   l     :  Length
               ö         :  Get that many random characters from the string
```
[Answer]
# [Forth (gforth)](http://www.complang.tuwien.ac.at/forth/gforth/Docs-html/), 128 bytes
```
include random.fs
: f 1+ swap do i 8 mod if i . else i 0 <# #s #> 0 do 83 random 33 + dup 47 > 10 * - emit loop ."  "then loop ;
```
[Try it online!](https://tio.run/##LYxBa8IwHEfvfoo3exAUS0vFiYonC9tJcB53Kcs/GkiT0ERk@/Jdhjv93g8eT/sh3ZZX/TfjaNyXvSth6JzyfanjZIumXhAfXUB5DBt6rzA6Y4nYKBkq9gVFpDhkzNam@S/QNCxQ98DqlQN1xZwl0puE9T5QTmGabuKedze@teeWj7Y98sInl/dTzkl0s4RxJpnOmh8hiijC4IMM9ntSU68r9PgL "Forth (gforth) – Try It Online")
### Explanation
Loop from start to end, print number if not multiple of 8, otherwise get the number of digits in the number and print that many random characters followed by a space
### Code Explanation
```
include random.fs          \ include/import the random module
: f                        \ start new word definition
  1+ swap                  \ add 1 to end number, because forth loops are [start, end), and swap order
  do                       \ start counted loop form start to end
    i 8 mod                \ get the remainder of dividing i (loop index) by 8
    if                     \ if true (not 0, therefore not multiple of 8)
      i .                  \ print the index
    else                   \ otherwise
      i 0                  \ convert index to double-length number
      <# #s #>             \ use formatted numeric output to convert number to a string
      0 do                 \ loop from 0 to (string-length - 1)
        84 random          \ get random number between 0 and 83
        33 +               \ add 33
        dup 47 >           \ check if result is larger than 47
        10 * -             \ if it is add 10 to result (results in number in range: 33-47,58-126)
        emit               \ output ascii char corresponding with number
      loop                 \ end inner loop
    ."  "then            \ output a space and then close the if/else
  loop                   \ end the outer loop
;                        \ end the word definition
```
### UnGolfed
I don't usually ungolf my solutions, but this one is long/complicated enough that I think it's needed
```
include random.fs
\ get the length (in digits) of a number
: num-length 0 <# #s #> nip ;
\ check if a number is a multiple of another
: is-multiple mod 0= ;               
\ get a random printable non-digit ascii char           
: random-char 84 random 33 + dup 47 > 10 * - ;  
\ get a "random" string of printable ascii chars the same length as a number
: rand-str num-length 0 do random-char emit loop space ;
\ print numbers from a to b, replacing multiple of 8 with a random ascii string of the same length
: crazy-eights 1+ swap do i 8 is-multiple if i rand-str else i . then loop ;
```
[Answer]
# [PHP](https://php.net/), 130 bytes
```
function($a,$b){for(;$a<=$b;$a++)echo$a%8?$a:(function($l){while($l--)echo chr(($x=rand(44,128))-($x>58?:11));})(strlen($a))," ";}
```
[Try it online!](https://tio.run/##bY3NCsIwEITvfYpQVtjFFEz9K8baFxEk1tQUShLWioL47LWK4MXTDPMNM9HFYVtFF4VlDnxgGwP3rT/jjLSARpRDc/V13waPYCQc6dEERg1mW8JxlOmUbO0CmElRgdngr93R4@bazo4uyz4lUTtGhHvJxp9wsZAqL4iyMdkti2qjFJF@El567uz7jkimItXPQScJNKikUCvSyWcq3fu9T79ALUeUz/8yKf7maynymSI9vAA "PHP – Try It Online")
Ungolfed:
```
function c8( $a, $b ) { 
    for( ; $a<=$b; $a++ ) {                // loop between a -> b
        echo $a % 8 ? $a :                 // every 8, call anon func instead of value
            (function($l) {
                while( $l-- ) {            // repeat length of value
                    $x = rand( 44, 128 );  // range size is printable chars [33,47][58,127]
                    $x-= $x > 58 ?: 11;    // Subtract one from x. If x was less than or 
                                           // equal to 58, subtract a further ten from it
                                           // so that it now falls within the 33-47 range
                    echo chr( $x );        // echo ASCII value
                }
            })( strlen( $a ) )," ";
    }
}
```
[Answer]
# [Kotlin](https://kotlinlang.org), 136 bytes
```
{r:IntRange->var s=""
for(i in r){for(c in "$i"){var n=java.util.Random().nextInt(83)
if(n>14)n+=10
s+=if(i%8>0)c
else '!'+n}
s+=" "}
s}
```
[Try it online!](https://tio.run/##jVbbbts4EH33V0yMtJUQV4niJHWNONhsty0CdLdA27dFH2iZtrmRSJek4qaB/2W/ZX8se4aUZBVbYJsHhyLncmY4Z4a3xpdKPx4f0ysrhZcLWhpLfq0cFWYhaWXKJRVrUZZSr@R0AMG19xs3PT7mcz7OnBfFrfwKKYhkhamOvxznJ2fj84tBsCu@3dPE0Su29xYKg84bCdpYs7Kigkvh8aG0dwRvtF2bUpKuq7m0jpQuytqpO1ne01z6rZSahMa2l/ZOlP/8nYgRzdMRNhdk5aYUhXRU1aVXmxIrs6QJpOFFkpNfaqkLSVvl12ShYSpKaq0QeQX7C@W8VfMayRhBZyE3Ej/asxEDA5bzYUUB1w4etdHPAVNaVcSP7Vp56TZAMIoBiTkiuf746uamp5kNOA3XzkGVTugSqbikOWPk6AvhZCNyswyoYyZoLRCWsZLzpSkH2JXyI6rELQKrwz6yWpk64t37a6NvklNxQJXwxVq6g@Dn9VdRca6m4SvJR5RfpPT8Ck5OaUxndE4X9IIO6SXlJ5TnlJ9SPqb8jPJz0r9EpfwcaqfjqBc@8gv@ecE/E/55OaLpm0uWYg@np0G@9TjeOwwo/kA6fxLX5Ie48osf4mJYjIpBMSZEBTwMJ6BhnU9MgT4LRuRMrJ@1sbhgH4@Q1vk9PlFNusvkBkUFKpWimi8ELWtdeGV0LDjwg5Pv4pdgBcvEIW@YDKhbh0vyNSpnFf35sOTqq/2m9tkABlvRJOhO6Ub7D7xKp/Qxyj8MBkQw/ptcCvCgb4pJwjSXolgHDq1QWbE@ok4E1KJRcEl0J2yrP6PhEDtsIumpB600Og5m3rQ@ujLkKBhIqxUjGrUKznNpK5SuBR8aahotsyAQ/O1NwePwsDE07NwGO2@lljb2l8ZIQ5/Y3CTVjkm5V9jztMdQph6woAhE5Blg7VW2Cjydw8Xc3EXaBRmHOrlVG8JmcFVljQrnr0Exo7/Enchqr8rsQ8CXpJmWXz1uMZmM00ZDLSlpNFC1Z@02tWaOZqj4XtQfQ/ZM3WtQWds@umtye3ltPCJrm2TokaPmCljFWMSjRTnaa4T2t1VO9uWaDHc@9@JLtKEF6BHElso630v0Bg2dwe7Fv7uqNm1NyR3NuuhjYpqAnkyQm5O0d0j/QcJ/snTyO6FnB8@OoqewvYt4bVe7MZmCQiPvZs6@E7sIsINHQ2JO9O1g9YGJHNVWTU0uGh3Wt/E4bgx2sRIj6UIn@V2gyLv2YXqTODaBCueJsCs3pWtrxf1l5P5V2rH/XWxBvd7SXNlKRlKXtKFZlM3HF7GXPT7YadtQnl8F4s/AeISVqED09IHXRUPBYfoQinv2P1Wtlom@Qh3roxnq1h3NsKGeTK5O0mLA9xPvZMcnSCb@7x4Drk/2HpkSi7Yhdu0SkxrD7J6W1lQNrWPhxLG55caNxrdF8MYpj@dDy4Om@8bnQGH0IiqtwqvExuHaFe2olzs8UmLy0HGjDo/r5lnAQ5ufIITHkNw0LT92Cb@2ZqsZm0c0D4PYEUpaCC/QDzi8d0rLJD04yBCU8glSkGaV2DTCoe595g1nM6XdoCUCW8ic@iZpNsNEfPo0vCZ498@Tz/jstNut5jD/nHamGUkYabNWKssaoUYi8LbUyfAwyGGMHj5sEl6nu2HaUKhHshAv3aBYV6K8tquaZ97rNi3J8FexwF2g9x9AOybyfS9vIx6TuFt@DqGFtPl3Bo@lRRxogYA7JB1vmERaa@wUQxteubu0oXWwO38ORcKF1Fo5aNCH4RJig88ST8D3yyTPsvh8OcfidMyrsOSXRPqziQmsxqVHejNjH/8F "Kotlin – Try It Online")
[Answer]
# [Zsh](https://www.zsh.org/), 67 bytes
```
for i ({$1..$2})((i%8))||i=`tr -dc !-/:-~</*/ur*|head -c$#i`&&<<<$i
```
[Try it online!](https://tio.run/##BcHRCkAwFADQX7ky2tSsS0q6/oW2afdJDS@MX59z7iPkw5@AOAB2fd72CAzyEdi2onuVlFyNSqXE83JG0M5Coc2kPzKNuWKTgl8daCtKXuqaiATn/AM "Zsh – Try It Online")
Feels pretty long, but so are most answers to this one.
[Answer]
# Python 2, 180 Bytes
```
from random import*
def f(a,b):
 for i in range(a,b+1):
  if i%8<1:
   k,i=str(i),''
   for _ in k:i+=choice([chr(j)for j in range(33,48)]+[chr(j)for j in range(57,126)])
  print i
```
EDIT:
Thanks @Flp.Tkc for realising I hadn't read the task properly.
Thanks @Caleb for pointing out I could use a few to reduce the byte count.
Thanks @Dennis for pointing out about the fact that numbers can't be included.
EDIT 2:
The current version could probably be simplified more than it is.
[Answer]
# [PowerShell](https://github.com/PowerShell/PowerShell), ~~82~~ 89 bytes
```
$a,$b=$args;$a..$b|%{($_,(-join[char[]](33..47+58..127|random -c "$_".Length)))[!($_%8)]}
```
[Try it online!](https://tio.run/nexus/powershell#@6@SqKOSZKuSWJRebK2SqKenklSjWq2hEq@joZuVn5kXnZyRWBQdG6thbKynZ2KubWqhp2doZF5TlJiXkp@roJusoKQSr6Tnk5qXXpKhqakZrQjUq2qhGVv7//9/Q0PT/4ZGxgA "PowerShell – TIO Nexus")
]