fork download
  1. (defparameter *handwritten-table*
  2. (let ((table (make-hash-table)))
  3. (loop for i from 0 to 25 do
  4. (setf (gethash (+ 120016 i) table) (+ 65 i)))
  5. (loop for i from 0 to 25 do
  6. (setf (gethash (+ 120042 i) table) (+ 97 i)))
  7. table))
  8.  
  9. (defun read-handwritten-char (stream)
  10. (let* ((c (read-char stream))
  11. (code (char-int c))
  12. (tr (gethash code *handwritten-table*)))
  13. (if tr
  14. (int-char tr)
  15. (unread-char c stream))))
  16.  
  17. (defun read-handwritten-token (stream)
  18. (concatenate 'string (loop with c
  19. do (setf c (read-handwritten-char stream))
  20. while c
  21. collect c)))
  22.  
  23. (defun handwritten-reader (stream char)
  24. (unread-char char stream)
  25. (let ((x (read-from-string (read-handwritten-token stream))))
  26. x))
  27.  
  28. (loop for i from 0 to 51 do
  29. (set-macro-character (int-char (+ i 120016)) #'handwritten-reader))
  30.  
  31.  
  32. ; 𝓝𝓸𝔀 𝔀𝓮 𝓬𝓪𝓷 𝓾𝓼𝓮 𝓱𝓪𝓷𝓭𝔀𝓻𝓲𝓽𝓽𝓮𝓷 𝓬𝓱𝓪𝓻𝓪𝓬𝓽𝓮𝓻𝓼 𝓪𝓵𝓶𝓸𝓼𝓽 𝓪𝓷𝔂𝔀𝓱𝓮𝓻𝓮...
  33. (𝓭𝓮𝓯𝓾𝓷 𝓱𝓮𝓵𝓵𝓸 () (𝓹𝓻𝓲𝓷𝓽 "𝓗𝓮𝓵𝓵𝓸, 𝓦𝓸𝓻𝓵𝓭"))
  34. (𝓱𝓮𝓵𝓵𝓸)
Success #stdin #stdout 0.03s 10656KB
stdin
Standard input is empty
stdout
"𝓗𝓮𝓵𝓵𝓸, 𝓦𝓸𝓻𝓵𝓭"