Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

LOL LISP

Name: Anonymous 2012-04-03 14:35

I've seen claims that you can modify Lisp programs while they are running, yet I've never seen it happen. I call bullshit. Stop making shit up, you faggots.

Name: Anonymous 2012-04-03 16:06

you also haven't seen air

Name: Anonymous 2012-04-03 16:10

...

This is something you learn when you use your first Lisp implementation. You can compile and modify stuff in the global environment if you so wish. Typically when you write a new function and enter it in your REPL (or have SLIME or your environment send it to it, directly or not), it ends up compiling the function and replacing a global (or dynamic or lexical) binding.

You don't have to take my word for it. You can do this shit even in C or other languages: it's called "code injection" or hooking in them, because they're not designed from the ground up to allow this, so you have to use hacks like that, but in Lisp, code and data is both dynamically allocated in memory and replacing functions is easy because calls to functions tend to be indirect (they can be direct, but you'll have to recompile the function if you want to replace the calls then). This is what happens when you have a compiler in your runtime.

Name: Anonymous 2012-04-03 16:18

>>1
Hey, >>1, did you know that running computer programs are stored in a device called "RAM?"  If you research that term, you just might become enlightened.

Name: Anonymous 2012-04-03 17:15

#;1> (define (f)
       (eval (read))
       ; g is not defined yet
       (g))
Warning: the following toplevel variables are referenced but unbound:
  g (in f)
#;2> (f)
(define (g) (display "your gay")) ; this is evaled in f
your gay ; now g exists

Name: bampu pantsu 2012-05-29 4:10

bampu pantsu

Don't change these.
Name: Email:
Entire Thread Thread List