News for hackers. Stuff that matters.
Re:Racket: The Lisp for the Modern Day by perihelions on Thursday June 29, 2023 @11:00AM (#36521317)
I just checked: SBCL on Linux/amd64 puts compiled functions in a r+w+x page. You could write Lisp that writes Lisp that writes self-modifying machine code, and it would (I think) run by default.

    (compiled-function-p #'f) ; T
    
    (disassemble 'f)
    ; disassembly for F
    ; Size: 58 bytes. Origin: #x5350CD14                          ; F
    ; 14:       498B4510         MOV RAX, [R13+16]                ; thread.binding-stack-pointer
    ; 18:       488945F8         MOV [RBP-8], RAX
    ; 1C:       4883EC10         SUB RSP, 16
    ; [...]


    $ pmap $PID --range 5350CD14
    442331:   /usr/bin/sbcl
    0000000053498000 122272K rwx--   [ anon ]
     total           122272K

There are no comments on this comment yet.