Overview
Starts: Monday, September 26, 2016
Ends: Monday, October 10th, 2016 @ 12:00pm(noon) ET
Description: Return all the numbers between 0 through 9 without using numbers in your code
Type: Short-Code

Explanation:
  • Create an alias that returns all the numbers from 0 through 9 without using any numbers in your code
  • Duplicate numbers within the returned value are not allowed
  • Non-numerical characters in the returned value are not allowed
  • Order does not matter
  • Alias must be named numbers
  • There are two categories: Entries that make use of Re-Encode/decoding inputs and those that do not


Categories:
There are two categories for this challenge of which can be entered. You may submit to either or both categories. That is you may submit an entry for one of the catagories and make another submission for the other. The categories are:
  • Re-Encoding/Decoding via $chr(), $asc(), or similar; Entries in this category make use of a static string that isn't produced from native mIRC functionality to derive the resulting numbers from
  • Non Re-Encoding/Decoding: Entries in this category pull all numbers/inputs from the result of native mIRC functionality alone


Rules:
  • Your code's length will be calculated using the 'byte' value from HERE
  • Your code will be saved as numbers.mrc
  • Your code will be loaded into a fresh mIRC v7.46 instance's remote section
  • Your code can contain supporting aliases
  • Your code does not have to run clean but it must be able to re-run indefinitely.
  • No use of external-input identifiers such as $?, $input, etc
  • No File-system access
  • No Coms
  • No DLLs
  • No Sockets
  • Do not abuse the rules, byte counter or test alias


Submitting:
  • Send entries to me via Forum Privage Message with the topic "$Numbers Challenge - Entry"
  • In your entry post, specify if it uses Re-Encoding/Decoding to achieve the goal or not
  • You may submit as many times as you like, only your last entry for each category at the end of the challenge will be evaluated
  • I will check the forums at least once a day for new entries, evaluate them and tell you if the entry is valid


Test Alias:
Code:
;; /test_numbers @N
;; @N = Number of times to test the $numbers alias
alias test_numbers {
  if ($_test_numbers($iif($1,$1,10))) {
    echo 04 -a Failed $v1
  }
  else {
    echo 03 -a All tests passed!
  }
}
alias -l _test_numbers {
  if ($read($scriptdirnumbers.mrc, r, /(\d)/, 1)) {
    return 0 File contains a number on line: $readn
  }
  else {
    var %x = 0, %e = $1, %numbers
    while (%x < %e) {
      inc %x
      %Numbers = $numbers
      if (!$len(%Numbers)) {
        return $ord(%x) pass: Nothing returned
      }
      elseif ($regex(%Numbers, /([^\d])/)) {
        return $ord(%x) pass: Contains non-numerical character $regml(1)
      }
      elseif ($regex(%numbers, /(.).*?\1/)) {
        return $ord(%x) pass: Contains duplicate $regml(1)
      }
      elseif ($regsubex(0123456789, /[ $+ %numbers $+ ]/g,)) {
        return $ord(%x) pass: Missing $v1
      }
    }
  }
}





My ReEncode/Decode Entry sha256: 4509a16b85eb15bc5ecea144eda6550aa589e9e75fa33a589fa582e25b8fc870
I have no entry for non-ReEncode/Decode

Last edited by FroggieDaFrog; 27/09/16 04:52 AM.

I am SReject
My Stuff