![]() search |
TALISMAN
general
Information
Unix server |
|
|
pig-sticking.shtml
|
Erlkönig: pig-sticking.shtml
From blojo@soda.berkeley.edu Wed May 20 00:34:12 1992
From: blojo@soda.berkeley.edu (Jon Blow)
Subject: Soda motd II
Date: 20 May 92 02:44:05 GMT
Newsgroups: alt.motd
Organization: Crimestoppers-A-Go-Go
Welcome to Soda
5/19 TOTAL Hosersness.
3772 xxxxxx (/usr3) 2663 xxxxxx
\_find . -name \* -exec compress {} \;
3750 xxxxxx (/usr3) 2619 xxxx
3105 xxxxxx (/usr3) 2609 xxx
2851 xxxxxxxx 2589 xxxxx
2680 xxxxx (/usr3) 2505 xx
5/18 In how many languages can you say "stick your head in a pig"?
Collect them all here and we shall rival the x = 3 list...
UNIX csh: head $user >> /dev/pig
60a OOP Scheme: (ask you 'insert-head pig)
C: insert(Listtype pig, Listelement yourhead);
^
[This totally misses the point. It's not OO
or nearly as abstract as ~xxxxxxxx/pig.c]
is better than
ask2(you, stick, "head", pig);
/* really the same as...
you->stick(you, "head", pig);
^
[NOT. Try actually evaluating that.]
See ~xxxxxxxx/pig.c for details..... */
^
Ever hear of varargs, Dan? I thought not.
These still pale compared to the old vanilla:
(*(you->insert))(head, pig)
C++: you->insert(head, pig); /* note the simpler notation */
^
Note your mom...
\_ note my grandmother
perl: $pig = $body{head} <--- BZZT! Wrong. Try...
$body_part_location{$you, "head"} = $pig;
FMPL: ask(~pig, be_stuck(ask(.#self, head)))
FMPL-SFG: pig's be_stuck(.self's head)
fcl: if pig is somewhat available
then locality(you.head, pig) is very high.
forth: pig you head @ !
CL: (setf (location (you head)) pig)
PostScript: /stick-in-pig {/pig exch def} def
/head stick-in-pig
TCL: proc stickit {head} {
set ${pig} [list ${pig} ${head}]
return ${pig}
}
TCL#2: proc stickit head {
uplevel #0 "lappend pig $head"
}
OOScheme: (define head
(let ((contents nil))
(lambda (m . arg)
(cond ((eq? m 'stick)
(set! contents (car arg)))
(else (set! contents nil))))))
(head 'stick pig)
Scheme: (define (stick pig head)
(call-with-current-continuation
(lambda (c)
(c (cons head pig)))))
Kodiak: (a pig p1
(contents (a head h1)))
Prolog: stick(H,P) :- in(H,P), !.
FX90: (define-datatype container
(pigholder->container object))
(define-datatype holden
(pair->holden container object))
(match (pigholder->container pig)
((pigholder->container~ c) (pair->holden
(pigholder->container c)
(head->object #u))))
680x0: move #PIG,D0
swap D0
move #HEAD,D0
swap D0
move.L D0,A7
Z80: LD DE,#PIG
LD HL,#HEAD
LD BC,#$FFFF
DJNZ
Cluless: head:= [head insert pig];
UnterMud: actor.$head = pig.$body
Basica:
|