« Reply #21 on: December 21, 2017, 09:16:01 PM »
Not in lisp but I liked the idea for a test run in my new IronPython interpreter for Bricscad
from System import Random
import Bricscad.ApplicationServices as AcAp
import Bricscad.EditorInput as AcEd
import Teigha.DatabaseServices as AcDb
def matrix():
chars = get_random_unicode(200)
ed = AcAp.Application.DocumentManager.MdiActiveDocument.Editor
ed.WriteMessage(chars)
def get_random_unicode(length):
include_ranges = [
( 0x0021, 0x0021 ),
( 0x0023, 0x0026 ),
( 0x0028, 0x007E ),
( 0x00A1, 0x00AC ),
( 0x00AE, 0x00FF ),
( 0x0100, 0x017F ),
( 0x0180, 0x024F ),
( 0x2C60, 0x2C7F ),
( 0x16A0, 0x16F0 ),
( 0x0370, 0x0377 ),
( 0x037A, 0x037E ),
( 0x0384, 0x038A ),
( 0x038C, 0x038C ),
]
random = Random()
alphabet = []
for i in range(length):
for (i, j) in include_ranges:
alphabet.append(unichr(random.Next(i, j)))
alphabet.append(' ')
return ''.join(alphabet)
« Last Edit: December 21, 2017, 09:37:54 PM by MickD »
Logged
"Programming is really just the mundane aspect of expressing a solution to a problem."
- John Carmack
"Short cuts make long delays,' argued Pippin.”
- J.R.R. Tolkien