Compare commits

...

2 commits

Author SHA1 Message Date
0efdd1f65a Update to use the official selfish spawn.
- Requires latest and greatest goblins, though.
2023-07-02 00:08:23 -07:00
8fd7edd0f9 Remove debug 2023-07-01 23:16:22 -07:00
4 changed files with 15 additions and 37 deletions

View file

@ -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))
@ -128,7 +127,6 @@
(if (not (not char)) (if (not (not char))
(error "coords already chosen:" coords) (error "coords already chosen:" coords)
(begin (begin
(pk mark mark-char)
($ mark 'choose! mark-char) ($ mark 'choose! mark-char)
($ self 'display))))] ($ self 'display))))]
[(display) [(display)

View file

@ -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))

View file

@ -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+))

View file

@ -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")))))