Update to use the official selfish spawn.
- Requires latest and greatest goblins, though.
This commit is contained in:
parent
8fd7edd0f9
commit
0efdd1f65a
4 changed files with 15 additions and 36 deletions
|
@ -1,11 +1,10 @@
|
||||||
(define-module (gib-gab-gob actors)
|
(define-module (gib-gab-gob actors)
|
||||||
#:use-module (gib-gab-gob rps)
|
#:use-module (gib-gab-gob rps)
|
||||||
#:use-module (gib-gab-gob lib) ;; to go into goblins eventually!
|
|
||||||
#:use-module (goblins)
|
#:use-module (goblins)
|
||||||
#:use-module (goblins vat)
|
#:use-module (goblins vat)
|
||||||
#:use-module (goblins actor-lib methods)
|
#:use-module (goblins actor-lib methods)
|
||||||
#:use-module (goblins actor-lib sealers)
|
#:use-module (goblins actor-lib sealers)
|
||||||
#:use-module (oop goops)
|
#:use-module (goblins actor-lib selfish-spawn)
|
||||||
#:use-module (ice-9 match)
|
#:use-module (ice-9 match)
|
||||||
#:use-module (ice-9 rdelim)
|
#:use-module (ice-9 rdelim)
|
||||||
#:export (^game-lobby ^client-picker))
|
#:export (^game-lobby ^client-picker))
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
(define-module (gib-gab-gob lib)
|
|
||||||
#:use-module (goblins)
|
|
||||||
#:export (selfish-spawn))
|
|
||||||
|
|
||||||
(define (selfish-spawn constructor . args)
|
|
||||||
|
|
||||||
(define (^selfish bcom)
|
|
||||||
(lambda (self)
|
|
||||||
(bcom (apply constructor bcom self args))))
|
|
||||||
|
|
||||||
(let ((name (procedure-property constructor 'name)))
|
|
||||||
(set-procedure-property! ^selfish 'name name))
|
|
||||||
|
|
||||||
(let ((self (spawn ^selfish)))
|
|
||||||
(pk self)
|
|
||||||
;; now transition to the version with self
|
|
||||||
($ self self)
|
|
||||||
self))
|
|
1
guix.scm
1
guix.scm
|
@ -85,4 +85,3 @@
|
||||||
"This project demonstrates both Rock Paper Scissors and Tic Tac Toe in Goblins!")
|
"This project demonstrates both Rock Paper Scissors and Tic Tac Toe in Goblins!")
|
||||||
(home-page "https://solarpunk.moe")
|
(home-page "https://solarpunk.moe")
|
||||||
(license license:gpl3+))
|
(license license:gpl3+))
|
||||||
|
|
||||||
|
|
29
hall.scm
29
hall.scm
|
@ -17,20 +17,19 @@
|
||||||
((directory
|
((directory
|
||||||
"gib-gab-gob"
|
"gib-gab-gob"
|
||||||
((compiled-scheme-file "actors")
|
((compiled-scheme-file "actors")
|
||||||
(compiled-scheme-file "lib")
|
|
||||||
(scheme-file "rps")
|
(scheme-file "rps")
|
||||||
(scheme-file "actors")
|
(scheme-file "actors")
|
||||||
(compiled-scheme-file "rps")
|
(compiled-scheme-file "rps")))))
|
||||||
(scheme-file "lib")))))
|
|
||||||
(tests ((directory "tests" ())))
|
(tests ((directory "tests" ())))
|
||||||
(programs
|
(programs
|
||||||
((directory
|
((directory
|
||||||
"scripts"
|
"scripts"
|
||||||
((in-file "make-client") (in-file "make-host")))))
|
((in-file "make-client")
|
||||||
|
(in-file "make-host")))))
|
||||||
(documentation
|
(documentation
|
||||||
((text-file "ChangeLog")
|
((text-file "README")
|
||||||
(text-file "AUTHORS")
|
(text-file "HACKING")
|
||||||
(text-file "NEWS")
|
(text-file "COPYING")
|
||||||
(directory
|
(directory
|
||||||
"doc"
|
"doc"
|
||||||
((texi-file "version")
|
((texi-file "version")
|
||||||
|
@ -39,11 +38,14 @@
|
||||||
(info-file "gib-gab-gob")
|
(info-file "gib-gab-gob")
|
||||||
(info-file "version")
|
(info-file "version")
|
||||||
(texi-file "gib-gab-gob")))
|
(texi-file "gib-gab-gob")))
|
||||||
(text-file "COPYING")
|
(text-file "NEWS")
|
||||||
(text-file "HACKING")
|
(text-file "AUTHORS")
|
||||||
(text-file "README")))
|
(text-file "ChangeLog")))
|
||||||
(infrastructure
|
(infrastructure
|
||||||
((in-file "pre-inst-env")
|
((automake-file "Makefile")
|
||||||
|
(autoconf-file "configure")
|
||||||
|
(text-file ".gitignore")
|
||||||
|
(scheme-file "hall")
|
||||||
(directory
|
(directory
|
||||||
"build-aux"
|
"build-aux"
|
||||||
((tex-file "texinfo")
|
((tex-file "texinfo")
|
||||||
|
@ -51,7 +53,4 @@
|
||||||
(text-file "missing")
|
(text-file "missing")
|
||||||
(text-file "install-sh")
|
(text-file "install-sh")
|
||||||
(text-file "mdate-sh")))
|
(text-file "mdate-sh")))
|
||||||
(scheme-file "hall")
|
(in-file "pre-inst-env")))))
|
||||||
(text-file ".gitignore")
|
|
||||||
(autoconf-file "configure")
|
|
||||||
(automake-file "Makefile")))))
|
|
||||||
|
|
Loading…
Reference in a new issue