(load "/root/kodiak") ;; live coding. live debugging (defmacro pull (obj place &rest args) (multiple-value-bind (vars forms var set access) (get-setf-method place) (let ((g (gensym))) `(let* ((,g ,obj) ,@(mapcar #'list vars forms) (,(car var) (delete ,g ,access ,@args))) ,set)))) (clear-db) ;;the opener. what is attempted ;;code in expanded sense and concomittant(?) notions of environmental ;;code viewed in what was formerly known as the terms of metaphor - ;;terms subsumed by software itself (each live_coding (isa event)) (each live_coding (isa living_code) (viewed as_what)) (a live_coding (viewed as_technique) (pros "exposure is always good. allied with free software.") (pros "code is interface and environment. The commandline. GNU Emacs.") (pros "playfulness") (pros "privelege of source over execution perhaps") (cons "return of the virtuosic: the guitar solo translated") (cons "emphasis on the algorithmic") (cons "a too simple answer to the question what is code?") (cons "social software")) ;; existant software/expanded software ;; free_software as software enabled by further (social) software which is the GPL license (each free_software (isa software) (enabled_by license)) (each license (isa software)) (each panel (isa event) (title multiple_titles) (participants names) (subject-matter subject) (format discussion)) (each presentation (isa panel) (introduction matter) (projects description) (the_argument presented)) (each software (isa descriptive_means)) (each descriptive_means (describes event)) (each software (isa representation)) (each software (isa possible_procedure)) (each panelling_module (isa software) (recoded panel)) ;; relation of software to entry point which is process ;;(tst) ;; multiple titles (a presentation (title (a multiple_titles (first_title "live coding is dead. long live live coding.") (second_title "live coding at/and the interface"))) (subject-matter "panelling living code module") (subject-matter "interface between expanded software and existent or contemporary software") (subject-matter "environmental code towards xxxxx and plenum") (subject-matter "world as interface")) (each title (isa entry_point)) (each panelling_module (potential entry_point) (recoded live_coding)) ;; describe relation to scripting and theatre (each entrypoint (parallel opening_credits) (recoded panel)) ;;how we could work towards a panelling module / conference panel recoded ;;introduction, projects, the argument(s) ;;question of software. approach to software as descriptive means - representation and procedure. ;; kodiak.lisp above as example of a representation language ;;processes in lisp (see Paul Graham and our previous work - where?) ;;erlang style stuff - example of process approach. ;; translation notes to code in either system (defun system (command-string) (let ((proc (run-program "/bin/sh" (list "-c" command-string) :wait t :input t :output t :error t))) (prog1 (process-exit-code proc) (process-close proc)))) (defmacro question (variables query &rest body) "wrap up query in osc thing" `(query-bind ,variables ,query (progn (sleep 6) (system (concatenate 'string "sendOSC -h 127.0.0.1 9999 \"/test, " ,@body " \""))))) (defmacro pd-speak (body) `(system (concatenate 'string "sendOSC -notypetags -h 127.0.0.1 9999 \"/test, " ,@body " \""))) (defmacro test-question (variables query &rest body) "wrap up query in osc thing" `(query-bind ,variables ,query (print (concatenate 'string "sendOSC -notypetags -h 127.0.0.1 9999 \"/test, " ,@body " \"")))) ;;(question (?z ?x ?y) '(rel ?z ?x ?y) ;; (format nil "The relation ~a holds between ~a and ~a " ?z ?x ?y)) ;; process code (proclaim '(special *procs* *proc*)) (setq *cont* #'identity) (defmacro =defun (name parms &body body) (let ((f (intern (concatenate 'string "=" (symbol-name name))))) `(progn (defmacro ,name ,parms `(,',f *cont* ,,@parms)) (defun ,f (*cont* ,@parms) ,@body)))) (defmacro =bind (parms expr &body body) `(let ((*cont* #'(lambda ,parms ,@body))) ,expr)) (defmacro =values (&rest retvals) `(funcall *cont* ,@retvals)) (defmacro =funcall (fn &rest args) `(funcall ,fn *cont* ,@args)) (defvar *halt* (gensym)) (defstruct proc pri state wait) (defvar *default-proc* (make-proc :state #'(lambda (x) (format t "~%>> ") (princ (eval (read))) (pick-process)))) (defmacro fork (expr pri) `(prog1 ',expr (push (make-proc :state #'(lambda (,(gensym)) ,expr (pick-process)) :pri ,pri) *procs*))) (defmacro program (name args &body body) `(=defun ,name ,args (setq *procs* nil) ,@body (catch *halt* (loop (pick-process))))) (defun pick-process () (multiple-value-bind (p val) (most-urgent-process) (setq *proc* p *procs* (delete p *procs*)) (progn (princ (proc-state p)) (funcall (proc-state p) val)))) ;;(loop (pick-process)) (defun most-urgent-process () (let ((proc1 *default-proc*) (max -1) (val1 t)) (dolist (p *procs*) (let ((pri (proc-pri p))) (if (> pri max) (let ((val (or (not (proc-wait p)) (funcall (proc-wait p))))) (when val (setq proc1 p max pri val1 val)))))) (values proc1 val1))) (defun arbitrator (test cont) (setf (proc-state *proc*) cont (proc-wait *proc*) test) (push *proc* *procs*) (pick-process)) (defmacro wait (parm test &body body) `(arbitrator #'(lambda () ,test) #'(lambda (,parm) ,@body))) (defmacro yield (&body body) `(arbitrator nil #'(lambda (,(gensym)) ,@body))) (defun setpri (n) (setf (proc-pri *proc*) n)) (defun halt (&optional val) (throw *halt* val)) (defun kill (&optional obj &rest args) (if obj (setq *procs* (apply #'delete obj *procs* args)) (pick-process))) (defmacro while (test &rest body) `(do () ((not ,test)) ,@body)) ;;panelling module ;; translate into panel. generic introduction. each presentation. arguments pro and con live coding. summing up ;; terms, references, specifications, and thus interface ;; a model for a panel. simulation. await answer (defvar *panel_board* nil) (setq *panel_board* nil) (defun test (&rest f) (find f *panel_board* :test #' equal)) (defun state (&rest f) (push f *panel_board*)) (defun unstate (&rest f) (pull f *panel_board*)) ;;(=defun panel_module (sub_presentation_ap) ;; (introduce sub_presentation_ap) ;; (domain_mapping 'all_domains)) ;;(defun introduce (presentation_name) ;; (multiple_entry presentation_name)) (defun multiple_entry (titles) (question (?x ?y ?z) '(and (ind ?z titles) (val ?x ?z ?y)) (format nil "~a ~a" ?x ?y))) (defun domain_mapping (d) (question (?z ?x ?y) '(rel ?z ?x ?y) (format t "The relation ~a holds between ~a and ~a.~%" ?z ?x ?y))) ;; participants: character_a, character_b. participants in an event, the actors. the script ;; is the software inside or outside the characters? ;; suggested strategies ;; viral and error messages perhaps as deceitful interface. crash again. (=defun jonni (panel) (pd-speak ((format nil "Jonni commences ~a with multiple entry points or titles" panel))) ;;(format t "Jonni commences ~a with multiple entry points or titles" panel) (multiple_entry 'multiple_titles) (state 'jonni panel) (wait d (test 'martin panel) (unstate 'jonni panel) (explain_examples panel) (state 'jonni panel) (wait g (test 'martin panel) (unstate 'jonni panel) (explain_cons 'livecoding) (state 'jonni panel) (setpri 1) (yield (conclude panel))))) ;; what's next - entry, domains... (=defun martin (panel) (wait e (test 'jonni panel) (pd-speak ((format nil "Those were multiple entry points for " panel))) (pd-speak ((format nil "Martin now maps the domains for ~a " panel))) ;;(format t "Martin now maps the domains for ~a " panel) (domain_mapping 'the_domains) (state 'martin panel) (wait f (test 'jonni panel)) (unstate 'martin panel) (explain_pros 'livecoding) (state 'martin panel) (wait g (test 'jonni panel) (unstate 'martin panel)))) ;; deus_ex_machina - aside on sadean live coding - combinatorial (domain_mapping 'the_domains) (defun ex_machina (panel) (pd-speak ("The mechanist explanation of man and of nature then becomes the sole valid one. From this current thinking Sade makes essential its fundamental criterion, suspicion which is also one of the dominant traits of his own character. I am being decieved, then I must deceive. Others are dissimulating? Then I must dissimulate."))) ;; these are just sketched in ;;(explain_pros 'ap_panel) (defun explain_pros (panel) (pd-speak ("The pros of live coding as a technique leading to expanded realm of living coding can be understood as follows")) (question (?x ?y ?z) '(and (ind ?x live_coding) (val pros ?x ?z)) (format nil "~a" ?z))) ;; explain_cons (defun explain_cons (panel) (pd-speak ("The cons of live coding as a technique leading to expanded realm of living coding can be understood as follows")) (question (?x ?y ?z) '(and (ind ?x live_coding) (val cons ?x ?z)) (format nil "~a" ?z))) ;; explain_examples ;; trajectory from ap0201 devices to xxxxx and plenum (=defun explain_examples (panel) (pd-speak ("Please jonni explain the trajectory from ap0201 devices to xxxxx and plenum")) (wait i (test 'end_ex panel))) (state 'end_ex 'ap_panel) ;; interjection ;; conclude ;; we conclude (=defun conclude (panel) (pd-speak ("Please jonni and martin explain the trajectory from ap0201 devices to xxxxx and plenum")) (wait i (test 'end_conc panel))) (state 'end_conc 'ap_panel) ;; what other devices can we imagine? (program panelling () (fork (jonni 'ap_panel) 100) (fork (martin 'ap_panel) 100) (fork (ex_machina 'ap_panel) 99)) (panelling) ;; queries to be translated (?- (a presentation (subject-matter ?w))) (?- (dom ?c event)) (?- (dom ?c entry_point)) (query-bind (?x ?y) '(dom ?x ?y) (format t "A ~a is a ~a.~%" ?x ?y)) ;;(program panel () ;; (fork (panel_module 'ap) 100)) ;;(panel)