From: Barry Margolin
Subject: Lisp on TV
Date: 
Message-ID: <barmar-1110981739480001@barmar.ne.mediaone.net>
In last night's episode of "The Net" (on the USA cable network), which
will be rerun tonight at 11pm EDT, there's a scene where a hacker is
breaking into the computer system that runs the electric power grid.  Set
your VCRs and freeze on the screen shot (it's about 15 minutes into the
episode).  It looked to me like a couple of functions from a logic
programming language (perhaps a Prolog interpreter) in Lisp.  Anyone
recognize where the code is from?  Here's what I was able to see in the
screen shot:

(lexpand 'bk-out hostile)

(defconstant unbound "unbound")

(defmacro deref (exp)
  "Follow pointers for bound variables."
  `(progn (loop while (and (var-p ,exp) (bound-p ,exp))
             do (setf ,exp (var-binding ,exp)))
          ,exp))

(defstruct var name (binding unbound))

(defun bound-p (var) (not (eq (var-binding var) unbound)

(defun unify (x y)
  "Destructively unify two expressions"
  (cond ((eql (deref x) (deref y) x)
        ((var-p x) (set-binding1 x y))
        ((var-p y) (set-binding1 y x))
        ((and (bound-p x) (bound-p y))
         (and (unify (deref x) (deref y))

-- 
Barry Margolin, ······@bbnplanet.com
GTE Internetworking, Burlington, MA

From: Steve Gonedes
Subject: Re: Lisp on TV
Date: 
Message-ID: <m2u31a69na.fsf@KludgeUnix.com>
······@bbnplanet.com (Barry Margolin) writes:

 
< In last night's episode of "The Net" (on the USA cable network), which
< will be rerun tonight at 11pm EDT, there's a scene where a hacker is
< breaking into the computer system that runs the electric power grid.  Set
< your VCRs and freeze on the screen shot (it's about 15 minutes into the
< episode).  It looked to me like a couple of functions from a logic
< programming language (perhaps a Prolog interpreter) in Lisp.  Anyone
< recognize where the code is from?  Here's what I was able to see in the
< screen shot:
< 
< (lexpand 'bk-out hostile)
< 
< (defconstant unbound "unbound")
< 
< (defmacro deref (exp)
<   "Follow pointers for bound variables."
<   `(progn (loop while (and (var-p ,exp) (bound-p ,exp))
<              do (setf ,exp (var-binding ,exp)))
<           ,exp))
< 
< (defstruct var name (binding unbound))
< 
< (defun bound-p (var) (not (eq (var-binding var) unbound)
< 
< (defun unify (x y)
<   "Destructively unify two expressions"
<   (cond ((eql (deref x) (deref y) x)
<         ((var-p x) (set-binding1 x y))
<         ((var-p y) (set-binding1 y x))
<         ((and (bound-p x) (bound-p y))
<          (and (unify (deref x) (deref y))
< 

With the exception of (lexpand 'bk-out), it looks like the stuff on
page 377 and 378 of Norvig's Case Studies in CL, book.

The "'bk-out hostile" almost sounds like some kind of slang you'd here
on Mtv. Then again, maybe it just means blackout in an unfriendly
mannor?
From: Rainer Joswig
Subject: Re: Lisp on TV
Date: 
Message-ID: <joswig-1210980018510001@194.163.195.67>
In article <·······················@barmar.ne.mediaone.net>,
······@bbnplanet.com (Barry Margolin) wrote:

> In last night's episode of "The Net" (on the USA cable network), which
> will be rerun tonight at 11pm EDT, there's a scene where a hacker is
> breaking into the computer system that runs the electric power grid.  Set
> your VCRs and freeze on the screen shot (it's about 15 minutes into the
> episode).  It looked to me like a couple of functions from a logic
> programming language (perhaps a Prolog interpreter) in Lisp.  Anyone
> recognize where the code is from?  Here's what I was able to see in the
> screen shot:
> 
> (lexpand 'bk-out hostile)
> 
> (defconstant unbound "unbound")
> 
> (defmacro deref (exp)
>   "Follow pointers for bound variables."
>   `(progn (loop while (and (var-p ,exp) (bound-p ,exp))
>              do (setf ,exp (var-binding ,exp)))
>           ,exp))
> 
> (defstruct var name (binding unbound))
> 
> (defun bound-p (var) (not (eq (var-binding var) unbound)
> 
> (defun unify (x y)
>   "Destructively unify two expressions"
>   (cond ((eql (deref x) (deref y) x)
>         ((var-p x) (set-binding1 x y))
>         ((var-p y) (set-binding1 y x))
>         ((and (bound-p x) (bound-p y))
>          (and (unify (deref x) (deref y))


Peter Norvig's book has following code:


;;;; -*- Mode: Lisp; Syntax: Common-Lisp -*-
;;;; Code from Paradigms of AI Programming
;;;; Copyright (c) 1991 Peter Norvig

;;;; File prologc.lisp: Final version of the compiler,
;;;; including all improvements from the chapter.

(in-package "USER")
(requires "prolog")

(defconstant unbound "Unbound")

(defstruct var name (binding unbound))

(defun bound-p (var) (not (eq (var-binding var) unbound)))

(defmacro deref (exp)
  "Follow pointers for bound variables."
  `(progn (loop while (and (var-p ,exp) (bound-p ,exp))
             do (setf ,exp (var-binding ,exp)))
          ,exp))

(defun unify! (x y)
  "Destructively unify two expressions"
  (cond ((eql (deref x) (deref y)) t)
        ((var-p x) (set-binding! x y))
        ((var-p y) (set-binding! y x))
        ((and (consp x) (consp y))
         (and (unify! (first x) (first y))
              (unify! (rest x) (rest y))))
        (t nil)))

....

;-)

-- 
http://www.lavielle.com/~joswig
From: Kent M Pitman
Subject: Re: Lisp on TV
Date: 
Message-ID: <sfwzpb2y9q7.fsf@world.std.com>
······@lavielle.com (Rainer Joswig) writes:


> In article <·······················@barmar.ne.mediaone.net>,
> ······@bbnplanet.com (Barry Margolin) wrote:
> 
> > In last night's episode of "The Net" (on the USA cable network), which
> > will be rerun tonight at 11pm EDT, there's a scene where a hacker is
> > breaking into the computer system that runs the electric power grid.  Set
> > your VCRs and freeze on the screen shot (it's about 15 minutes into the
> > episode).  It looked to me like a couple of functions from a logic
> > programming language (perhaps a Prolog interpreter) in Lisp.  Anyone
> > recognize where the code is from?  Here's what I was able to see in the
> > screen shot: [...]
> 
> Peter Norvig's book has following code:

Hey, I wonder if Peter got money for this.  Not sure if it's the "movie 
distribution rights" or the "performance rights" that are implicated, but
either way he should be beating down their door for a royalty payment!
(Then again, maybe it's worth it to him to see movies offering free
ads for Lisp that way; if it was a can of Diet Coke, the Coke people
would probably have had to pay for the placement.)
 --Kent

p.s. I'm just being flippant about royalties, btw.  If anyone actually cares 
     about the copyright issues, see my page
        http://world.std.com/~pitman/law.html 
     for pointers to various useful references about copyright law.  
     From the description given, though, I'm pretty sure this particular
     case would have little trouble qualifying as a "fair use" exemption
     to the normal rules.  So there go those riches from copyright 
     infringement suits... Only one thing to do--investigate a libel
     suit instead.  Surely no serious Lisp programmer would use his
     or her special knowledge of "the right way to do things" for bad!
     How dare they suggest otherwise?  (And how dare they use the word
     "hacker" that way?)
From: Rainer Joswig
Subject: Re: Lisp on TV
Date: 
Message-ID: <joswig-1210980637020001@194.163.195.67>
In article <···············@world.std.com>, Kent M Pitman
<······@world.std.com> wrote:

> ······@lavielle.com (Rainer Joswig) writes:
> 
> 
> > In article <·······················@barmar.ne.mediaone.net>,
> > ······@bbnplanet.com (Barry Margolin) wrote:
> > 
> > > In last night's episode of "The Net" (on the USA cable network), which
> > > will be rerun tonight at 11pm EDT, there's a scene where a hacker is
> > > breaking into the computer system that runs the electric power grid.  Set
> > > your VCRs and freeze on the screen shot (it's about 15 minutes into the
> > > episode).  It looked to me like a couple of functions from a logic
> > > programming language (perhaps a Prolog interpreter) in Lisp.  Anyone
> > > recognize where the code is from?  Here's what I was able to see in the
> > > screen shot: [...]
> > 
> > Peter Norvig's book has following code:
> 
> Hey, I wonder if Peter got money for this.

It's the other way round. It's product placement.
Vendors may need to have some marketing. Lisp on TV is a start. ;-)

We should make sure that Lisp code is visible in all
high-tech-related movies. ;-) I remember seeing a report
with scenes from the media lab - some Scheme code for 3d
stuff was visible. Cyc is another candidate with
visible Lisp code...

I'd be more interested how the code made its way into
the movie? If my Powerbook ever gets filmed, I'll
promise to have MCL in front with some code - any offers?

-- 
http://www.lavielle.com/~joswig
From: Peter Norvig
Subject: Re: Lisp on TV
Date: 
Message-ID: <362CC221.8CEEC40E@mail.arc.nasa.gov>
Nope, I haven't seen any royalties yet.  As I recall, I did retain movie rights
in my contract with Morgan Kaufmann.  I never thought those rights would be
worth anything, but you never know ...

-Peter



Kent M Pitman wrote:

> ······@lavielle.com (Rainer Joswig) writes:
>
> > In article <·······················@barmar.ne.mediaone.net>,
> > ······@bbnplanet.com (Barry Margolin) wrote:
> >
> > > In last night's episode of "The Net" (on the USA cable network), which
> > > will be rerun tonight at 11pm EDT, there's a scene where a hacker is
> > > breaking into the computer system that runs the electric power grid.  Set
> > > your VCRs and freeze on the screen shot (it's about 15 minutes into the
> > > episode).  It looked to me like a couple of functions from a logic
> > > programming language (perhaps a Prolog interpreter) in Lisp.  Anyone
> > > recognize where the code is from?  Here's what I was able to see in the
> > > screen shot: [...]
> >
> > Peter Norvig's book has following code:
>
> Hey, I wonder if Peter got money for this.  Not sure if it's the "movie
> distribution rights" or the "performance rights" that are implicated, but
> either way he should be beating down their door for a royalty payment!
> (Then again, maybe it's worth it to him to see movies offering free
> ads for Lisp that way; if it was a can of Diet Coke, the Coke people
> would probably have had to pay for the placement.)
>  --Kent
>
From: David Steuber "The Interloper
Subject: Re: Lisp on TV
Date: 
Message-ID: <36254ec5.7206201@news.newsguy.com>
On Sun, 11 Oct 1998 17:39:48 -0400, ······@bbnplanet.com (Barry
Margolin) claimed or asked:

% In last night's episode of "The Net" (on the USA cable network), which
% will be rerun tonight at 11pm EDT, there's a scene where a hacker is
% breaking into the computer system that runs the electric power grid.  Set
% your VCRs and freeze on the screen shot (it's about 15 minutes into the
% episode).  It looked to me like a couple of functions from a logic
% programming language (perhaps a Prolog interpreter) in Lisp.

You watch that terrible show?

The Terminator had C64 assembly code during the chase sequence in the
alley behind "Technoir".  I guess we know where the future of
high-tech is going :-)

--
David Steuber (ver 1.31.2a)
http://www.david-steuber.com
To reply by e-mail, replace trashcan with david.

So I have this chicken, see?  And it hatched from this egg, see?  But
the egg wasn't laid by a chicken.  It was cross-laid by a turkey.
From: ······@cit.org.by
Subject: Re: Lisp on TV
Date: 
Message-ID: <70215f$ndl$1@nnrp1.dejanews.com>
In article <················@news.newsguy.com>,
  ········@david-steuber.com wrote:
> On Sun, 11 Oct 1998 17:39:48 -0400, ······@bbnplanet.com (Barry
> Margolin) claimed or asked:
>
> % In last night's episode of "The Net" (on the USA cable network), which
> % will be rerun tonight at 11pm EDT, there's a scene where a hacker is
> % breaking into the computer system that runs the electric power grid.  Set
> % your VCRs and freeze on the screen shot (it's about 15 minutes into the
> % episode).  It looked to me like a couple of functions from a logic
> % programming language (perhaps a Prolog interpreter) in Lisp.
>
> You watch that terrible show?
>
> The Terminator had C64 assembly code during the chase sequence in the
> alley behind "Technoir".  I guess we know where the future of
> high-tech is going :-)
>

And Robocop had command.com loading during his initialisation :)



  ---Eugene Zaikonnikov

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own