Distributed newLisp question....

Started by borgauf, May 08, 2013, 07:08:37 PM

Previous topic - Next topic


I'm a total beginner, but I've read extensively about Lisp, functional programming, and distributed computing. I keep hearing that Lisp languages can rewrite/update their own code while running, but I can't wrap my brain around that. For example, the famous "Lisp at JPL" essay talked about redoing/refactoring running code that was out in space. So, here's a problem: Imagine two separate programs running on two separate computers are doing a collaborative "game of life" where algorithms change and morph because each program is helping the other. This would be a sort of distributed, synergetic evolution, but the changes to data and code would be swapped back and forth real-time and incorporated real-time. This is the sort of stuff I'm interested in, and just from reading about newLisp, it seems possible with newLisp. Is this true? . . . Or do I need to wake up, get real, and go back to Visual Basic programming?


A running newLISP program can load code and execute it, so it's not difficult in theory. And you can use the debugger too. For example, consider this file:

(define x 0)
(define (ticker)
        (sleep 10000)
        (println "x is " x))

(define (main)
  (while (< x 20)

(println "finished")

You can modify this while it's running, by changing the value of x using the debugger.

http://newlispfanclub.alh.net/forum/viewtopic.php?f=16&t=3458&hilit=debug">Here's another post that you might find interesting: