PasteRack.org
Paste # 3467
2018-04-08 15:46:19

Fork as a new paste.

Paste viewed 42 times.


Embed:

  1. #lang racket
  2.  
  3. (require racket/unsafe/ops)
  4.  
  5. (let ([a (unsafe-fxlshift 1 62)]
  6.       [b (unsafe-fxlshift 1 (read))])
  7.   (printf "~a~%~a~%~a ~a~%" a b (fixnum? a) (fixnum? b)))
  8.  
  9. #|
  10.  
  11. output
  12.  
  13. 4611686018427387904
  14. 281474976710656
  15. #f #t
  16.  
  17. |#
  18.  

=>

eval:2:0: unsafe-fxlshift: access disallowed by code

inspector to protected variable from module: '#%unsafe

  in: unsafe-fxlshift