No need to use up more memory than necessary,
alias randtok { return $gettok($1,$rand(1,$numtok($1,$2)),$2) }
Nice and easy. :)
Well in my opinion for readability its such a small tradeoff that really its not worth not putting it in 2 vars first.
Just to make Sunny look like a good guy:
alias randtok { tokenize -i $2 $1 | return $($ $+ $r(1,$0),2) }
You're missing an 'i' in tokenize, @SReject
well you right @Sorasyn but it easier to read in the old way, but you 100% right :)@SReject your code is use less 3 bytes less then @Sorasyn one :)
@Conscious Fixed
@thegingon I had a typo. Its fixed now, And I did it just to show that Sunny's wasn't the worst 'shortcode' for readability
Eh I couldnt make it shorter but I could make it even more less readable :)
alias randtok { return $regsubex($1,/(.+?)(?:\x $+ $base($2,10,16) $+ |$)/g,) $+ $regml($r(1,$regml(0))) }
Well @[Plornt], you did it :)
Well @[Plornt], I made yours shorter
alias randtok return $regsubex($1,/(.+?)(?:\x $+ $base($2,10,16) $+ |$)/g,) $+ $regml($r(1,$regml(0)))
Not to be that guy but.... @[Plornt] & Savage_CL:
alias randtok return $regml($r(1,$regex($1,/([^\x $+ $base($2,10,16) $+ ]+)/g)))
Slightly shorter than yours, @SReject :
alias randtok return $regml($r(1,$regex($1,/([^\ $+ $base($2,10,8) $+ ]+)/g)))
Unfortunately, I'm not adept enough with mIRC to be a contender in this war of bytes.
Well in my opinion for readability its such a small tradeoff that really its not worth not putting it in 2 vars first.