Rearrange for independent packages.
parent
419e90e42f
commit
f269c02c23
@ -0,0 +1,22 @@
|
||||
PACKAGES=syndicate syndicate-examples
|
||||
COLLECTS=syndicate syndicate-examples
|
||||
|
||||
all: setup
|
||||
|
||||
clean:
|
||||
find . -name compiled -type d | xargs rm -rf
|
||||
find . -name '*.rkte' | xargs rm -rf
|
||||
|
||||
setup:
|
||||
raco setup --check-pkg-deps --unused-pkg-deps $(COLLECTS)
|
||||
|
||||
link:
|
||||
raco pkg install --link $(PACKAGES)
|
||||
|
||||
unlink:
|
||||
raco pkg remove $(PACKAGES)
|
||||
|
||||
test: setup testonly
|
||||
|
||||
testonly:
|
||||
raco test -p $(PACKAGES)
|
@ -0,0 +1,84 @@
|
||||
# Second Racket implementation of Syndicate
|
||||
|
||||
## The language itself
|
||||
|
||||
This repository contains a [Racket](http://racket-lang.org/)
|
||||
implementation of Syndicate, which includes
|
||||
|
||||
- the implementation of the `#lang syndicate` language, in the
|
||||
[`syndicate` directory](syndicate/).
|
||||
|
||||
- a TCP echo server example, which listens for connections on port
|
||||
5999 by default, in
|
||||
[`syndicate-examples/echo.rkt`](syndicate-examples/echo.rkt).
|
||||
Connect to it using, for example, `telnet localhost 5999`.
|
||||
|
||||
- a number of other examples both small and large, in
|
||||
[`syndicate-examples/`](syndicate-examples/).
|
||||
|
||||
## New implementation
|
||||
|
||||
This is a reimplementation of Syndicate that takes the language-level
|
||||
constructs of facets, endpoints, and fields to heart, integrating
|
||||
knowledge of facets and endpoints into the dataspace implementation
|
||||
itself.
|
||||
|
||||
It gains a *significant* performance advantage by doing so.
|
||||
|
||||
Programs seem to be about *20x faster* (compared to the
|
||||
[previous implementation](https://github.com/tonyg/syndicate/tree/master/racket)).
|
||||
Some are only 10x faster, some are 30x faster.
|
||||
|
||||
The implementation techniques herein are the subject of a forthcoming
|
||||
paper. The prototype that embodies the new idea is in
|
||||
[historical/prototype.rkt](historical/prototype.rkt), and
|
||||
[syndicate/HOWITWORKS.md](syndicate/HOWITWORKS.md) describes the
|
||||
approach via prose.
|
||||
|
||||
All the drivers end up looking much nicer with this new
|
||||
implementation. The previously-separate GL-2D support is now
|
||||
integrated as just another driver (though the timing characteristics
|
||||
of the old implementation are not precisely preserved). The
|
||||
[ground.rkt](syndicate/ground.rkt) implementation is much cleaner.
|
||||
|
||||
To see the difference in speed, try out the "many Racket logos"
|
||||
animation example/demo after installing the `syndicate` and
|
||||
`syndicate-examples` packages:
|
||||
|
||||
racket -l syndicate-examples/gl-2d-many
|
||||
|
||||
Hopefully you'll get a smooth 60fps, though I admit I'm running it on
|
||||
a fairly fast machine so you might need to drop the `sprite-count` in
|
||||
the code a bit to sustain 60fps.
|
||||
|
||||
## Compiling and running the code
|
||||
|
||||
You will need Racket version 7.6 or later.
|
||||
|
||||
Once you have Racket installed, run
|
||||
|
||||
raco pkg install syndicate
|
||||
|
||||
to install the package from the Racket package repository, or
|
||||
|
||||
raco pkg install --link syndicate
|
||||
|
||||
from the root directory of the Git checkout to install the package
|
||||
from a local snapshot. This will make `#lang syndicate` available to
|
||||
programs.
|
||||
|
||||
Repeat the process with `syndicate-examples` in place of `syndicate`
|
||||
to install the examples as well.
|
||||
|
||||
Alternatively, `make link` from the root directory of the Git checkout
|
||||
installs both packages from the local copy.
|
||||
|
||||
### Running the tests
|
||||
|
||||
The implementation test suite lives in [syndicate/test/](syndicate/test/). Run it with:
|
||||
|
||||
raco setup syndicate; raco test -p syndicate
|
||||
|
||||
## Copyright
|
||||
|
||||
Copyright © Tony Garnock-Jones 2010-2020.
|
@ -1,4 +1,4 @@
|
||||
#lang imperative-syndicate
|
||||
#lang syndicate
|
||||
;; Simple mutable box and count-to-infinity box client.
|
||||
|
||||
(message-struct set-box (new-value))
|
@ -1,8 +1,8 @@
|
||||
#lang imperative-syndicate
|
||||
#lang syndicate
|
||||
|
||||
(require/activate imperative-syndicate/drivers/tcp)
|
||||
(require/activate imperative-syndicate/drivers/external-event)
|
||||
(require/activate imperative-syndicate/reassert)
|
||||
(require/activate syndicate/drivers/tcp)
|
||||
(require/activate syndicate/drivers/external-event)
|
||||
(require/activate syndicate/reassert)
|
||||
(require (only-in racket/port read-bytes-line-evt))
|
||||
|
||||
(spawn (define id 'chat)
|
@ -1,6 +1,6 @@
|
||||
#lang imperative-syndicate
|
||||
#lang syndicate
|
||||
|
||||
(require/activate imperative-syndicate/drivers/tcp)
|
||||
(require/activate syndicate/drivers/tcp)
|
||||
(require racket/format)
|
||||
|
||||
(message-struct speak (who what))
|
@ -1,6 +1,6 @@
|
||||
#lang imperative-syndicate
|
||||
#lang syndicate
|
||||
|
||||
(require/activate imperative-syndicate/drivers/tcp)
|
||||
(require/activate syndicate/drivers/tcp)
|
||||
(require racket/format)
|
||||
|
||||
(message-struct speak (who what))
|
@ -0,0 +1,13 @@
|
||||
#lang syndicate
|
||||
|
||||
(require/activate syndicate/drivers/tcp)
|
||||
|
||||
(spawn (during/spawn (tcp-connection $id (tcp-listener 5999))
|
||||
(on-start (printf "Accepted connection ~v\n" id))
|
||||
(on-stop (printf "Closed connection ~v\n" id))
|
||||
(assert (tcp-accepted id))
|
||||
(on-start (issue-credit! (tcp-listener 5999))
|
||||
(issue-credit! tcp-in id))
|
||||
(on (message (tcp-in-line id $bs))
|
||||
(issue-credit! tcp-in bs)
|
||||
(send! (tcp-out id (bytes-append bs (bytes 13 10)))))))
|
@ -1,7 +1,7 @@
|
||||
#lang imperative-syndicate
|
||||
#lang syndicate
|
||||
|
||||
(require/activate imperative-syndicate/drivers/external-event)
|
||||
(require/activate imperative-syndicate/drivers/filesystem)
|
||||
(require/activate syndicate/drivers/external-event)
|
||||
(require/activate syndicate/drivers/filesystem)
|
||||
(require racket/file)
|
||||
|
||||
(require (only-in racket/port read-bytes-line-evt))
|
@ -1,8 +1,8 @@
|
||||
#lang imperative-syndicate
|
||||
#lang syndicate
|
||||
|
||||
(require racket/set)
|
||||
(require 2htdp/image)
|
||||
(require/activate imperative-syndicate/drivers/gl-2d)
|
||||
(require/activate syndicate/drivers/gl-2d)
|
||||
|
||||
(define (spawn-background)
|
||||
(spawn (during (window $width $height)
|
@ -1,17 +1,17 @@
|
||||
#lang imperative-syndicate
|
||||
#lang syndicate
|
||||
|
||||
(require racket/set)
|
||||
(require data/order)
|
||||
(require srfi/19)
|
||||
(require (prefix-in i: 2htdp/image))
|
||||
(require (prefix-in p: pict))
|
||||
(require syndicate-gl/affine)
|
||||
(require syndicate/drivers/gl-2d/affine)
|
||||
(require "layout/main.rkt")
|
||||
(require "hsv.rkt")
|
||||
(require imperative-syndicate/bag)
|
||||
(require imperative-syndicate/pattern)
|
||||
(require syndicate/bag)
|
||||
(require syndicate/pattern)
|
||||
|
||||
(require/activate imperative-syndicate/drivers/gl-2d)
|
||||
(require/activate syndicate/drivers/gl-2d)
|
||||
|
||||
;;---------------------------------------------------------------------------
|
||||
|
Before Width: | Height: | Size: 483 KiB After Width: | Height: | Size: 483 KiB |
Before Width: | Height: | Size: 491 KiB After Width: | Height: | Size: 491 KiB |
@ -0,0 +1,18 @@
|
||||
#lang setup/infotab
|
||||
(define collection "syndicate-examples")
|
||||
|
||||
(define deps '("base"
|
||||
"syndicate"
|
||||
"bitsyntax"
|
||||
"packet-socket"
|
||||
"compatibility-lib"
|
||||
"data-lib"
|
||||
"gui-lib"
|
||||
"htdp-lib"
|
||||
"images-lib"
|
||||
"net-lib"
|
||||
"pict-lib"
|
||||
"plot-lib"
|
||||
"srfi-lite-lib"))
|
||||
|
||||
(define build-deps '("rackunit-lib"))
|
@ -1,9 +1,9 @@
|
||||
#lang imperative-syndicate
|
||||
#lang syndicate
|
||||
|
||||
(require "protocol.rkt")
|
||||
(require "message.rkt")
|
||||
|
||||
(require/activate imperative-syndicate/reload)
|
||||
(require/activate syndicate/reload)
|
||||
|
||||
(spawn #:name 'channel-factory
|
||||
(stop-when-reloaded)
|
@ -1,8 +1,8 @@
|
||||
#lang imperative-syndicate
|
||||
#lang syndicate
|
||||
|
||||
(require/activate imperative-syndicate/reload)
|
||||
(require/activate imperative-syndicate/supervise)
|
||||
(require/activate imperative-syndicate/drivers/config)
|
||||
(require/activate syndicate/reload)
|
||||
(require/activate syndicate/supervise)
|
||||
(require/activate syndicate/drivers/config)
|
||||
|
||||
(require "protocol.rkt")
|
||||
|
@ -1,5 +1,5 @@
|
||||
#lang imperative-syndicate
|
||||
(require/activate imperative-syndicate/reload)
|
||||
#lang syndicate
|
||||
(require/activate syndicate/reload)
|
||||
(spawn-reloader "config.rkt")
|
||||
(spawn-reloader "session.rkt")
|
||||
(spawn-reloader "channel.rkt")
|
@ -1,9 +1,9 @@
|
||||
#lang imperative-syndicate
|
||||
#lang syndicate
|
||||
|
||||
(require "protocol.rkt")
|
||||
(require "message.rkt")
|
||||
|
||||
(require/activate imperative-syndicate/reload)
|
||||
(require/activate syndicate/reload)
|
||||
|
||||
(spawn #:name 'greeter
|
||||
(stop-when-reloaded)
|
@ -0,0 +1,3 @@
|
||||
#lang syndicate
|
||||
(require/activate syndicate/reload)
|
||||
(spawn-reloader "dynamic-main.rkt")
|
@ -1,4 +1,4 @@
|
||||
#lang imperative-syndicate
|
||||
#lang syndicate
|
||||
|
||||
(provide (struct-out ircd-listener)
|
||||
(struct-out ircd-motd)
|
@ -0,0 +1,21 @@
|
||||
#lang syndicate
|
||||
;; Demonstration stack configuration for various hosts.
|
||||
|
||||
(require racket/match)
|
||||
(require (only-in mzlib/os gethostname))
|
||||
(require (only-in racket/string string-split))
|
||||
(require "configuration.rkt")
|
||||
|
||||
(spawn
|
||||
(match (gethostname)
|
||||
[other ;; assume a private network
|
||||
(define-values (interface mkaddr me gw)
|
||||
(match (car (string-split other "."))
|
||||
["skip" (values "en0" (lambda (v) (bytes 192 168 2 v)) 222 254)]
|
||||
["leap" (values "wlp4s0" ;; wtf
|
||||
(lambda (v) (bytes 192 168 2 v))
|
||||
222
|
||||
254)]
|
||||
[_ (values "wlan0" (lambda (v) (bytes 192 168 2 v)) 222 254)]))
|
||||
(assert (gateway-route (bytes 0 0 0 0) 0 (mkaddr gw) interface))
|
||||
(assert (host-route (mkaddr me) 24 interface))]))
|
@ -1,4 +1,4 @@
|
||||
#lang imperative-syndicate
|
||||
#lang syndicate
|
||||
|
||||
(require/activate "ethernet.rkt")
|
||||
(require/activate "arp.rkt")
|
@ -1,6 +1,6 @@
|
||||
#lang imperative-syndicate
|
||||
#lang syndicate
|
||||
|
||||
(require/activate imperative-syndicate/drivers/timer)
|
||||
(require/activate syndicate/drivers/timer)
|
||||
(require/activate "ethernet.rkt")
|
||||
(require/activate "arp.rkt")
|
||||
(require/activate "ip.rkt")
|
@ -1,4 +1,4 @@
|
||||
#lang imperative-syndicate
|
||||
#lang syndicate
|
||||
;; UDP/TCP port allocator
|
||||
|
||||
(provide spawn-port-allocator
|
@ -1,4 +1,4 @@
|
||||
#lang imperative-syndicate
|
||||
#lang syndicate
|
||||
|
||||
(provide (struct-out udp-remote-address)
|
||||
(struct-out udp-handle)
|
Binary file not shown.
After Width: | Height: | Size: 250 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,140 @@
|
||||
Sound pack downloaded from Freesound.org
|
||||
----------------------------------------
|
||||
|
||||
This pack of sounds contains sounds by LittleRobotSoundFactory ( https://www.freesound.org/people/LittleRobotSoundFactory/ )
|
||||
You can find this pack online at: https://www.freesound.org/people/LittleRobotSoundFactory/packs/16681/
|
||||
|
||||
|
||||
License details
|
||||
---------------
|
||||
|
||||
Sampling+: http://creativecommons.org/licenses/sampling+/1.0/
|
||||
Creative Commons 0: http://creativecommons.org/publicdomain/zero/1.0/
|
||||
Attribution: http://creativecommons.org/licenses/by/3.0/
|
||||
Attribution Noncommercial: http://creativecommons.org/licenses/by-nc/3.0/
|
||||
|
||||
|
||||
Sounds in this pack
|
||||
-------------------
|
||||
|
||||
* 270344__littlerobotsoundfactory__shoot-00.wav
|
||||
* url: https://www.freesound.org/people/LittleRobotSoundFactory/sounds/270344/
|
||||
* license: Attribution
|
||||
* 270343__littlerobotsoundfactory__shoot-01.wav
|
||||
* url: https://www.freesound.org/people/LittleRobotSoundFactory/sounds/270343/
|
||||
* license: Attribution
|
||||
* 270342__littlerobotsoundfactory__pickup-03.wav
|
||||
* url: https://www.freesound.org/people/LittleRobotSoundFactory/sounds/270342/
|
||||
* license: Attribution
|
||||
* 270341__littlerobotsoundfactory__pickup-04.wav
|
||||
* url: https://www.freesound.org/people/LittleRobotSoundFactory/sounds/270341/
|
||||
* license: Attribution
|
||||
* 270340__littlerobotsoundfactory__pickup-01.wav
|
||||
* url: https://www.freesound.org/people/LittleRobotSoundFactory/sounds/270340/
|
||||
* license: Attribution
|
||||
* 270339__littlerobotsoundfactory__pickup-02.wav
|
||||
* url: https://www.freesound.org/people/LittleRobotSoundFactory/sounds/270339/
|
||||
* license: Attribution
|
||||
* 270338__littlerobotsoundfactory__open-01.wav
|
||||
* url: https://www.freesound.org/people/LittleRobotSoundFactory/sounds/270338/
|
||||
* license: Attribution
|
||||
* 270337__littlerobotsoundfactory__pickup-00.wav
|
||||
* url: https://www.freesound.org/people/LittleRobotSoundFactory/sounds/270337/
|
||||
* license: Attribution
|
||||
* 270336__littlerobotsoundfactory__shoot-02.wav
|
||||
* url: https://www.freesound.org/people/LittleRobotSoundFactory/sounds/270336/
|
||||
* license: Attribution
|
||||
* 270335__littlerobotsoundfactory__shoot-03.wav
|
||||
* url: https://www.freesound.org/people/LittleRobotSoundFactory/sounds/270335/
|
||||
* license: Attribution
|
||||
* 270334__littlerobotsoundfactory__jingle-lose-01.wav
|
||||
* url: https://www.freesound.org/people/LittleRobotSoundFactory/sounds/270334/
|
||||
* license: Attribution
|
||||
* 270333__littlerobotsoundfactory__jingle-win-00.wav
|
||||
* url: https://www.freesound.org/people/LittleRobotSoundFactory/sounds/270333/
|
||||
* license: Attribution
|
||||
* 270332__littlerobotsoundfactory__hit-03.wav
|
||||
* url: https://www.freesound.org/people/LittleRobotSoundFactory/sounds/270332/
|
||||
* license: Attribution
|
||||
* 270331__littlerobotsoundfactory__jingle-achievement-00.wav
|
||||
* url: https://www.freesound.org/people/LittleRobotSoundFactory/sounds/270331/
|
||||
* license: Attribution
|
||||
* 270330__littlerobotsoundfactory__jingle-achievement-01.wav
|
||||
* url: https://www.freesound.org/people/LittleRobotSoundFactory/sounds/270330/
|
||||
* license: Attribution
|
||||
* 270329__littlerobotsoundfactory__jingle-lose-00.wav
|
||||
* url: https://www.freesound.org/people/LittleRobotSoundFactory/sounds/270329/
|
||||
* license: Attribution
|
||||
* 270328__littlerobotsoundfactory__hero-death-00.wav
|
||||
* url: https://www.freesound.org/people/LittleRobotSoundFactory/sounds/270328/
|
||||
* license: Attribution
|
||||
* 270327__littlerobotsoundfactory__hit-00.wav
|
||||
* url: https://www.freesound.org/people/LittleRobotSoundFactory/sounds/270327/
|
||||
* license: Attribution
|
||||
* 270326__littlerobotsoundfactory__hit-01.wav
|
||||
* url: https://www.freesound.org/people/LittleRobotSoundFactory/sounds/270326/
|
||||
* license: Attribution
|
||||
* 270325__littlerobotsoundfactory__hit-02.wav
|
||||
* url: https://www.freesound.org/people/LittleRobotSoundFactory/sounds/270325/
|
||||
* license: Attribution
|
||||
* 270324__littlerobotsoundfactory__menu-navigate-00.wav
|
||||
* url: https://www.freesound.org/people/LittleRobotSoundFactory/sounds/270324/
|
||||
* license: Attribution
|
||||
* 270323__littlerobotsoundfactory__jump-03.wav
|
||||
* url: https://www.freesound.org/people/LittleRobotSoundFactory/sounds/270323/
|
||||
* license: Attribution
|
||||
* 270322__littlerobotsoundfactory__menu-navigate-02.wav
|
||||
* url: https://www.freesound.org/people/LittleRobotSoundFactory/sounds/270322/
|
||||
* license: Attribution
|
||||
* 270321__littlerobotsoundfactory__menu-navigate-01.wav
|
||||
* url: https://www.freesound.org/people/LittleRobotSoundFactory/sounds/270321/
|
||||
* license: Attribution
|
||||
* 270320__littlerobotsoundfactory__jump-00.wav
|
||||
* url: https://www.freesound.org/people/LittleRobotSoundFactory/sounds/270320/
|
||||
* license: Attribution
|
||||
* 270319__littlerobotsoundfactory__jingle-win-01.wav
|
||||
* url: https://www.freesound.org/people/LittleRobotSoundFactory/sounds/270319/
|
||||
* license: Attribution
|
||||
* 270318__littlerobotsoundfactory__jump-02.wav
|
||||
* url: https://www.freesound.org/people/LittleRobotSoundFactory/sounds/270318/
|
||||
* license: Attribution
|
||||
* 270317__littlerobotsoundfactory__jump-01.wav
|
||||
* url: https://www.freesound.org/people/LittleRobotSoundFactory/sounds/270317/
|
||||
* license: Attribution
|
||||
* 270316__littlerobotsoundfactory__open-00.wav
|
||||
* url: https://www.freesound.org/people/LittleRobotSoundFactory/sounds/270316/
|
||||
* license: Attribution
|
||||
* 270315__littlerobotsoundfactory__menu-navigate-03.wav
|
||||
* url: https://www.freesound.org/people/LittleRobotSoundFactory/sounds/270315/
|
||||
* license: Attribution
|
||||
* 270311__littlerobotsoundfactory__explosion-03.wav
|
||||
* url: https://www.freesound.org/people/LittleRobotSoundFactory/sounds/270311/
|
||||
* license: Attribution
|
||||
* 270310__littlerobotsoundfactory__explosion-04.wav
|
||||
* url: https://www.freesound.org/people/LittleRobotSoundFactory/sounds/270310/
|
||||
* license: Attribution
|
||||
* 270309__littlerobotsoundfactory__craft-00.wav
|
||||
* url: https://www.freesound.org/people/LittleRobotSoundFactory/sounds/270309/
|
||||
* license: Attribution
|
||||
* 270308__littlerobotsoundfactory__explosion-00.wav
|
||||
* url: https://www.freesound.org/people/LittleRobotSoundFactory/sounds/270308/
|
||||
* license: Attribution
|
||||
* 270307__littlerobotsoundfactory__explosion-01.wav
|
||||
* url: https://www.freesound.org/people/LittleRobotSoundFactory/sounds/270307/
|
||||
* license: Attribution
|
||||
* 270306__littlerobotsoundfactory__explosion-02.wav
|
||||
* url: https://www.freesound.org/people/LittleRobotSoundFactory/sounds/270306/
|
||||
* license: Attribution
|
||||
* 270305__littlerobotsoundfactory__climb-rope-loop-00.wav
|
||||
* url: https://www.freesound.org/people/LittleRobotSoundFactory/sounds/270305/
|
||||
* license: Attribution
|
||||
* 270304__littlerobotsoundfactory__collect-point-00.wav
|
||||
* url: https://www.freesound.org/people/LittleRobotSoundFactory/sounds/270304/
|
||||
* license: Attribution
|
||||
* 270303__littlerobotsoundfactory__collect-point-01.wav
|
||||
* url: https://www.freesound.org/people/LittleRobotSoundFactory/sounds/270303/
|
||||
* license: Attribution
|
||||
* 270302__littlerobotsoundfactory__collect-point-02.wav
|
||||
* url: https://www.freesound.org/people/LittleRobotSoundFactory/sounds/270302/
|
||||
* license: Attribution
|
||||
|
@ -1,9 +1,9 @@
|
||||
#lang imperative-syndicate
|
||||
#lang syndicate
|
||||
;; Santa Claus Problem
|
||||
;; https://www.schoolofhaskell.com/school/advanced-haskell/beautiful-concurrency/4-the-santa-claus-problem
|
||||
;; https://arxiv.org/pdf/1810.09613.pdf
|
||||
|
||||
(require/activate imperative-syndicate/drivers/timer)
|
||||
(require/activate syndicate/drivers/timer)
|
||||
(require racket/list)
|
||||
(require racket/set)
|
||||
|
@ -1,7 +1,7 @@
|
||||
#lang imperative-syndicate
|
||||
#lang syndicate
|
||||
|
||||
(require/activate imperative-syndicate/distributed)
|
||||
(require/activate imperative-syndicate/drivers/external-event)
|
||||
(require/activate syndicate/distributed)
|
||||
(require/activate syndicate/drivers/external-event)
|
||||
(require (only-in racket/port read-line-evt))
|
||||
|
||||
(assertion-struct Present (name))
|
@ -1,4 +1,4 @@
|
||||
#lang imperative-syndicate
|
||||
#lang syndicate
|
||||
|
||||
(assertion-struct greeting (text))
|
||||
|
@ -1,7 +1,7 @@
|
||||
#lang imperative-syndicate
|
||||
#lang syndicate
|
||||
|
||||
(require/activate imperative-syndicate/drivers/sqlite)
|
||||
(require/activate imperative-syndicate/drivers/timer)
|
||||
(require/activate syndicate/drivers/sqlite)
|
||||
(require/activate syndicate/drivers/timer)
|
||||
|
||||
(define PATH "t.sqlite")
|
||||
(define DB (sqlite-db PATH))
|
@ -1,6 +1,6 @@
|
||||
#lang imperative-syndicate
|
||||
#lang syndicate
|
||||
|
||||
(require/activate imperative-syndicate/drivers/external-event)
|
||||
(require/activate syndicate/drivers/external-event)
|
||||
(require (only-in racket/port read-bytes-line-evt))
|
||||
|
||||
(spawn (define stdin-evt (read-bytes-line-evt (current-input-port) 'any))
|
@ -1,6 +1,6 @@
|
||||
#lang imperative-syndicate
|
||||
#lang syndicate
|
||||
|
||||
(require/activate imperative-syndicate/drivers/timer)
|
||||
(require/activate syndicate/drivers/timer)
|
||||
|
||||
(spawn #:name 'plain-timer-demo
|
||||
(field [count 0])
|
@ -1,6 +1,6 @@
|
||||
#lang imperative-syndicate
|
||||
#lang syndicate
|
||||
|
||||
(require/activate imperative-syndicate/drivers/udp)
|
||||
(require/activate syndicate/drivers/udp)
|
||||
|
||||
(spawn (define s (udp-listener 5999))
|
||||
(during s
|
@ -1,7 +1,7 @@
|
||||
#lang imperative-syndicate
|
||||
#lang syndicate
|
||||
|
||||
(require/activate imperative-syndicate/drivers/timer)
|
||||
(require/activate imperative-syndicate/drivers/udp)
|
||||
(require/activate syndicate/drivers/timer)
|
||||
(require/activate syndicate/drivers/udp)
|
||||
(require racket/random file/sha1)
|
||||
|
||||
;; IANA offers guidelines for choosing multicast addresses [1].
|
@ -1,7 +1,7 @@
|
||||
#lang imperative-syndicate
|
||||
#lang syndicate
|
||||
|
||||
(require/activate imperative-syndicate/drivers/web)
|
||||
(require/activate imperative-syndicate/drivers/timer)
|
||||
(require/activate syndicate/drivers/web)
|
||||
(require/activate syndicate/drivers/timer)
|
||||
|
||||
(define server (http-server "localhost" 8081 #f))
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue