Compare commits

...

367 Commits
fruit ... main

Author SHA1 Message Date
Tony Garnock-Jones de03fc12f1 Allow CHAT_PORT to override chat.rkt example default port 2024-06-12 12:30:35 +02:00
Tony Garnock-Jones 4ba9eee1c7 Use `after-seconds` in supervise.rkt 2024-05-27 16:00:34 +02:00
Tony Garnock-Jones b59197f94b Add after-seconds, every-seconds 2024-05-27 12:06:25 +02:00
Tony Garnock-Jones 455cf24954 Pull emacs local variables out into a separate .el file 2024-05-27 09:15:54 +02:00
Tony Garnock-Jones 57bf923a1c Repair detection of transient references 2024-05-21 12:28:14 +02:00
Tony Garnock-Jones d6bebc2901 Better tracing of relay activity embedded references 2024-05-21 12:24:14 +02:00
Tony Garnock-Jones 5cf90cb33b Whoops: need to ignore extensions 2024-05-19 21:49:44 +02:00
Tony Garnock-Jones 9d285baafe Handle all Packet variations 2024-05-19 21:46:35 +02:00
Tony Garnock-Jones 8816e685cf Merge latest changes from the syndicate-protocols repository 2024-05-19 21:41:33 +02:00
Tony Garnock-Jones 599b4ed469 Packet::Nop 2024-05-19 21:32:44 +02:00
Tony Garnock-Jones 3aef7abc49 Optionally use noise padding 2024-05-19 21:05:41 +02:00
Tony Garnock-Jones 4c4131d4b1 Cope with optional padding in tunnelled noise 2024-05-19 20:59:03 +02:00
Tony Garnock-Jones a95336c465 Repair egregious (?!?!) bug where an entity would hash (?) or compare (?) different to itself when used as part of a key in a hash-table in a skeleton 2024-05-17 20:41:59 +02:00
Tony Garnock-Jones a200c68715 Improve dataspace and skeleton logging 2024-05-17 20:41:16 +02:00
Tony Garnock-Jones 1f978aade4 Clearer presentation of error logging for distributed/tcp 2024-05-17 20:38:37 +02:00
Tony Garnock-Jones 54a83b8998 Quieten logging down 2024-05-17 17:14:59 +02:00
Tony Garnock-Jones 5b2b381ad7 Simple supervision 2024-05-17 16:46:15 +02:00
Tony Garnock-Jones 35b94db883 Add bind/bind* to smart-pattern 2024-05-17 16:36:42 +02:00
Tony Garnock-Jones ba869b5cb6 discard smart-pattern 2024-05-17 13:01:16 +02:00
Tony Garnock-Jones 6aa1250d32 record patterns 2024-05-17 13:01:09 +02:00
Tony Garnock-Jones 6e555c9fd5 Update binary schemas 2024-04-19 12:57:14 +02:00
Emery Hemingway 8ebde104ca http: order absent fields first
This makes the absent variants the default initialization for
some implementations.
2024-04-19 10:51:40 +02:00
Tony Garnock-Jones c538c577c3 Many improvements to drivers/http.rkt 2024-04-10 15:42:22 +02:00
Tony Garnock-Jones bd973f069a Direct response example in http-server.rkt 2024-04-10 15:40:32 +02:00
Tony Garnock-Jones c7e8c55b58 Merge latest changes from the syndicate-protocols repository 2024-04-10 15:16:55 +02:00
Tony Garnock-Jones c0239cf322 And with that we are almost back where we started with http.prs! 2024-04-10 15:16:35 +02:00
Tony Garnock-Jones 9cc4175f24 Cope with HTTP/1.0's optional Host header 2024-04-10 14:54:19 +02:00
Tony Garnock-Jones 70f42dd931 Another revision of http.prs 2024-04-10 14:31:27 +02:00
Tony Garnock-Jones ef1ebe6412 Sigh. <done> turns out to be a good idea in addition to <processing> 2024-04-10 13:24:25 +02:00
Tony Garnock-Jones 2a88896e09 Further checks 2024-04-09 14:57:46 +02:00
Tony Garnock-Jones 3bbad3df6d Repair latent error of mismatched key types 2024-04-09 14:49:45 +02:00
Tony Garnock-Jones 86b74cd807 Better items->entries routine 2024-04-09 14:41:21 +02:00
Tony Garnock-Jones 9a0697e3c5 New dataspace pattern language. 2024-04-09 14:00:33 +02:00
Tony Garnock-Jones 0370c19e43 New http server protocol implementation and example 2024-04-09 13:01:27 +02:00
Tony Garnock-Jones e6234b7713 Update noise implementation for new protocol 2024-04-09 11:36:22 +02:00
Tony Garnock-Jones c97069375a More dataspace logging 2024-04-09 11:35:48 +02:00
Tony Garnock-Jones 6673c2b68c Repair comment syntax in config files 2024-04-09 11:35:22 +02:00
Tony Garnock-Jones 269dd2dc40 Merge latest changes from the syndicate-protocols repository 2024-04-09 09:15:59 +02:00
Tony Garnock-Jones ca18ca08df Alternative representation of dataspacePatterns 2024-04-09 09:15:21 +02:00
Tony Garnock-Jones 40ca168eac Repair typo 2024-04-09 09:13:51 +02:00
Tony Garnock-Jones cdb44de662 Merge latest changes from the syndicate-protocols repository 2024-04-04 16:46:01 +02:00
Tony Garnock-Jones 5a73e8d4c3 Alter dataspacePatterns language to make rec and arr more like dict 2024-04-04 16:31:09 +02:00
Tony Garnock-Jones ba2bd81f3d Update HOWITWORKS.md for extensible record matching 2024-04-04 16:03:00 +02:00
Tony Garnock-Jones 6d1278fbb0 Adjust skeleton for extensible dataspace patterns 2024-04-04 15:16:45 +02:00
Tony Garnock-Jones 710ff91a64 Revise http protocol 2024-04-01 15:56:07 +02:00
Tony Garnock-Jones c59e044695 Set embeddedType for noise 2024-03-28 15:49:48 +01:00
Tony Garnock-Jones bf0d47f1b7 Repair noise protocol 2024-03-28 15:17:28 +01:00
Tony Garnock-Jones 7797a3cd09 Updated description of gatekeeper protocol 2024-03-22 10:11:57 +01:00
Tony Garnock-Jones b214835bcc Make argument to `turn-stop!` mandatory 2024-03-10 12:56:39 +01:00
Tony Garnock-Jones 5d0d636f16 Happy new year 2024-03-10 12:43:06 +01:00
Tony Garnock-Jones 54cba83791 Bring up-to-date with Preserves and protocol changes 2024-03-10 12:40:28 +01:00
Tony Garnock-Jones 68ed693c41 Merge latest changes from the syndicate-protocols repository 2024-03-10 12:36:50 +01:00
Tony Garnock-Jones 9864ce0ec8 Switch `#!` to `#:` 2024-02-05 23:14:19 +01:00
Tony Garnock-Jones 5dd68e87c1 Preserves 0.993 lacks float 2024-02-03 15:16:23 +01:00
Tony Garnock-Jones f785274e35 Avoid double-execution within a round; see syndicate-lang/syndicate-js#3 2023-12-19 23:18:22 +13:00
Tony Garnock-Jones 16763a8b4f Merge latest changes from the syndicate-protocols repository 2023-12-19 21:49:20 +13:00
Tony Garnock-Jones 97876335ba Save a few bytes on the wire. If not now, never I guess 2023-12-19 21:37:41 +13:00
Tony Garnock-Jones d7b330e6dd stdenv.prs 2023-12-04 22:25:40 +01:00
Tony Garnock-Jones aee1eb4c27 Update schemaish #lang 2023-10-31 22:51:34 +01:00
Tony Garnock-Jones 0e43100e98 Merge latest changes from the syndicate-protocols repository 2023-10-31 22:45:22 +01:00
Tony Garnock-Jones fe9ceaf65c Update comment syntax for Preserves 0.991 2023-10-31 21:56:44 +01:00
Tony Garnock-Jones cc1c421ac5 Merge latest changes from the syndicate-protocols repository 2023-10-18 14:03:11 +02:00
Tony Garnock-Jones 72566ac223 Update for Preserves 0.990 2023-10-18 14:02:28 +02:00
Tony Garnock-Jones d1286b43f0 Preserve service submodules for embedding via `raco exe` 2023-10-12 16:51:53 +02:00
Tony Garnock-Jones e75453d0b4 Noise is too noisy 2023-09-29 16:09:40 +02:00
Tony Garnock-Jones 51db5f9247 Merge latest changes from the syndicate-protocols repository 2023-02-11 21:50:52 +01:00
Tony Garnock-Jones d8a139b23a Switch back to transport sequence representation 2023-02-11 21:49:49 +01:00
Tony Garnock-Jones a0ae1a2ac3 Merge latest changes from the syndicate-protocols repository 2023-02-11 17:47:03 +01:00
Tony Garnock-Jones 46fd2dec3b Set of any for transports in gatekeeper.Route 2023-02-11 17:43:42 +01:00
Tony Garnock-Jones b3df469c80 New gatekeeper protocol 2023-02-10 12:04:21 +01:00
Tony Garnock-Jones d701adcf11 Merge latest changes from the syndicate-protocols repository 2023-02-09 23:09:14 +01:00
Tony Garnock-Jones 1ae2583414 Remove accidental self-qualification 2023-02-09 23:07:43 +01:00
Tony Garnock-Jones f3c9662607 Another small error 2023-02-08 23:43:51 +01:00
Tony Garnock-Jones 82624d3007 Another small error 2023-02-08 23:39:42 +01:00
Tony Garnock-Jones 8b690b9103 Repair minor error 2023-02-08 23:36:21 +01:00
Tony Garnock-Jones 5a52f243e5 Adjust steps in noise and sturdy 2023-02-08 23:11:05 +01:00
Tony Garnock-Jones 6224baa2b6 Avoid variable-arity steps 2023-02-08 23:04:42 +01:00
Tony Garnock-Jones 8619342e5e Refinements 2023-02-08 22:11:45 +01:00
Tony Garnock-Jones 5bcb268ff8 Adjust ResolvePath/TransportConnection/PathStep 2023-02-08 20:36:14 +01:00
Tony Garnock-Jones 36c57de871 PROTOCOLS_BRANCH 2023-02-08 19:39:40 +01:00
Tony Garnock-Jones 9cd2e6776c Refactor gatekeeper protocols. 2023-02-08 17:46:47 +01:00
Tony Garnock-Jones a086c1d721 Repair typo 2023-02-07 13:18:18 +01:00
Tony Garnock-Jones bc41182533 Another small repair 2023-02-07 13:11:14 +01:00
Tony Garnock-Jones 2ad99b56b8 Be more precise about HMAC-BLAKE2s-256 and the key length 2023-02-07 12:44:47 +01:00
Tony Garnock-Jones 0e158a7b79 Repair incorrect signature 2023-02-06 17:06:26 +01:00
Tony Garnock-Jones 02acdbeb03 Switch to HMAC-BLAKE2s 2023-02-06 16:31:04 +01:00
Tony Garnock-Jones d43d78daaf Merge latest changes from the syndicate-protocols repository 2023-02-06 16:19:12 +01:00
Tony Garnock-Jones f6b88ee3fb Switch to HMAC-BLAKE2s 2023-02-06 16:19:03 +01:00
Tony Garnock-Jones fe2b018c50 Timers are now in seconds, not milliseconds 2023-02-06 15:41:14 +01:00
Tony Garnock-Jones 08e3290ff0 Merge latest changes from the syndicate-protocols repository 2023-02-06 15:36:37 +01:00
Tony Garnock-Jones ee8a23aa2e Switch from milliseconds to seconds. Fixes #1 2023-02-06 15:36:17 +01:00
Tony Garnock-Jones cc7ec64815 Repair and update attenuation processing 2023-02-06 12:01:34 +01:00
Tony Garnock-Jones b213d90d3c Merge latest changes from the syndicate-protocols repository 2023-02-06 11:06:13 +01:00
Tony Garnock-Jones 5cd0335a79 Argh, previous commit won't work 2023-02-06 11:06:02 +01:00
Tony Garnock-Jones f3edc4e6c0 Merge latest changes from the syndicate-protocols repository 2023-02-06 10:58:37 +01:00
Tony Garnock-Jones b52da09081 More usable (?) rewrite language 2023-02-06 10:58:16 +01:00
Tony Garnock-Jones a0fa6b032a Merge latest changes from the syndicate-protocols repository 2023-02-06 10:45:54 +01:00
Tony Garnock-Jones 9ca618268e Simplify attenuations 2023-02-06 10:45:41 +01:00
Tony Garnock-Jones 4da58b50a3 Repair .gitignore 2023-02-04 17:05:13 +01:00
Tony Garnock-Jones 8d553a1ee5 Include racketEvent.prs 2023-02-04 17:02:29 +01:00
Tony Garnock-Jones dbfab46afc Merge latest changes from the syndicate-protocols repository 2023-02-04 16:31:17 +01:00
Tony Garnock-Jones 9f1f76d0ca Remove racketEvent.prs 2023-02-04 16:30:27 +01:00
Tony Garnock-Jones fdf775d835 Change port, include server config 2023-02-04 16:27:02 +01:00
Tony Garnock-Jones 7b49079832 Include simpleChatProtocol ourselves 2023-02-04 15:50:42 +01:00
Tony Garnock-Jones 01f4286ffc Merge latest changes from the syndicate-protocols repository 2023-02-04 13:47:00 +01:00
Tony Garnock-Jones f4078aabaa Update binary bundle 2023-02-04 13:46:49 +01:00
Tony Garnock-Jones 557a36756f First step of cleanup of protocols 2023-02-04 13:46:34 +01:00
Tony Garnock-Jones 6ecf6b37d1 Merge latest changes from the syndicate-protocols repository 2023-01-27 12:52:17 +01:00
Tony Garnock-Jones 07a5f688be Repair binary bundle 2023-01-27 12:52:07 +01:00
Tony Garnock-Jones e6df614094 Merge latest changes from the syndicate-protocols repository 2023-01-27 12:45:11 +01:00
Tony Garnock-Jones fff84d4c2a Update noise mapping 2023-01-27 12:45:02 +01:00
Tony Garnock-Jones 48e044b899 Tweak deps 2023-01-25 21:15:15 +01:00
Tony Garnock-Jones 5983cd01f1 Another note re noise 2023-01-23 13:08:12 +01:00
Tony Garnock-Jones 8e72496c21 Better factoring 2023-01-19 16:30:30 +01:00
Tony Garnock-Jones 5d368fed95 First experimental noise relay 2023-01-19 16:21:26 +01:00
Tony Garnock-Jones 59f133a62f Refactor tcp relay support; add client support; add chat example 2023-01-19 14:47:02 +01:00
Tony Garnock-Jones 0d361dc065 Merge latest changes from the syndicate-protocols repository 2023-01-19 12:19:31 +01:00
Tony Garnock-Jones e8881f5980 Now I have actually implemented Noise, revise the schema 2023-01-19 12:18:58 +01:00
Tony Garnock-Jones 7b8a4a7576 Switch to fixcopyright package 2023-01-17 11:48:01 +01:00
Tony Garnock-Jones a41c6fb254 Merge latest changes from the syndicate-protocols repository 2023-01-16 16:21:57 +01:00
Tony Garnock-Jones 40b4681a6e Ugh, xsalsa20poly1305 as an AEAD isn't a thing 2023-01-16 16:21:12 +01:00
Tony Garnock-Jones 1225a468d1 Merge latest changes from the syndicate-protocols repository 2023-01-16 15:57:43 +01:00
Tony Garnock-Jones 89353fa84f Happy new year 2023-01-16 15:57:29 +01:00
Tony Garnock-Jones 639ceae231 instantiate-pattern 2023-01-16 15:56:25 +01:00
Tony Garnock-Jones 0f5e033174 noise 2023-01-16 15:52:46 +01:00
Tony Garnock-Jones aae53b5525 Update precompiled form 2023-01-16 15:51:57 +01:00
Tony Garnock-Jones 2124915de2 Allow various kinds of statelike processing during pattern analysis 2022-12-24 21:08:57 +13:00
Tony Garnock-Jones 55e5c36725 Remove seemingly-unnecessary case for ($ (unquote bp) p) in pattern.rkt 2022-12-15 11:45:49 +13:00
Tony Garnock-Jones afb887e649 Named arguments to analyse-pattern 2022-12-15 11:42:06 +13:00
Tony Garnock-Jones cfe2cc4af7 Update to latest racket-auxiliary-macro-context 2022-12-15 11:09:40 +13:00
Tony Garnock-Jones 7f84fb9d10 drivers/http: support 405 Method Not Allowed response 2022-12-14 12:10:53 +13:00
Tony Garnock-Jones 271da81942 drivers/http: avoid values, better async usage 2022-12-14 11:53:51 +13:00
Tony Garnock-Jones b4b44b6444 Update dependencies 2022-12-13 21:06:20 +13:00
Tony Garnock-Jones 9cbe11b32d HTTP driver 2022-12-13 21:03:44 +13:00
Tony Garnock-Jones bd5cb6e35c Merge latest changes from the syndicate-protocols repository 2022-12-13 18:08:59 +13:00
Tony Garnock-Jones 4c03646567 HTTP 2022-12-13 18:08:34 +13:00
Tony Garnock-Jones 4878c40be5 Make suspend exit the async block 2022-12-09 21:24:13 +13:00
Tony Garnock-Jones 41b38e7fb2 define/await 2022-11-30 19:50:25 +00:00
Tony Garnock-Jones 092fb7eb2f async.rkt 2022-11-30 18:27:54 +00:00
Tony Garnock-Jones 4e79ff6db0 Repair schema-compiler 2022-11-25 13:50:42 +01:00
Tony Garnock-Jones e17aa14a44 Return void from let/query 2022-11-25 13:50:36 +01:00
Tony Garnock-Jones d4a03a3f7c Commit to having onStop shutdownActions run in parent facet context 2022-11-24 14:29:51 +01:00
Tony Garnock-Jones 83b0cd41e0 Repair quotation of ellipsis literals 2022-11-24 09:58:04 +01:00
Tony Garnock-Jones b39515c6e5 dummy-port-relay-loader.rkt 2022-05-26 17:35:09 +02:00
Tony Garnock-Jones 094838bd2b Support for running Racket programs as inferior services 2022-05-26 17:07:40 +02:00
Tony Garnock-Jones 004bcbc5a8 Move syndicate-protocols inside the syndicate package, so that the package-builder can see it 2022-05-25 21:02:57 +02:00
Tony Garnock-Jones a176b22bf7 Update README 2022-05-17 13:45:34 +02:00
Tony Garnock-Jones ad69faaca4 Rename launchers to avoid conflict with syndicate-rs syndicate-server 2022-04-30 20:20:17 +03:00
Tony Garnock-Jones 80d75383b0 Merge latest changes from the syndicate-protocols repository 2022-02-04 20:53:16 +01:00
Tony Garnock-Jones ca92d99c52 Remove notion of "system-layer-service" from core protocols 2022-02-04 14:26:50 +01:00
Tony Garnock-Jones 19c96bdef2 Allow userDefined states 2022-02-03 22:55:06 +01:00
Tony Garnock-Jones 88fcb0467a Fix launcher 2022-01-20 10:23:21 +01:00
Tony Garnock-Jones 69fbfbbd29 Update syndicate-msd deps 2022-01-20 09:56:32 +01:00
Tony Garnock-Jones 2fe0d24911 MSD ("message sequence diagram"/trace) renderer, based on some of my PhD code 2022-01-20 09:54:07 +01:00
Tony Garnock-Jones 1b9eddc0b6 Update code to match latest schema changes 2022-01-20 09:54:07 +01:00
Tony Garnock-Jones 8d0a88e4c2 Merge latest changes from the syndicate-protocols repository 2022-01-20 09:53:39 +01:00
Tony Garnock-Jones ab34b62cf1 Refine the trace protocol a bit 2022-01-20 09:40:53 +01:00
Tony Garnock-Jones 5a65256cf3 Syndicate traces 2022-01-19 14:24:21 +01:00
Tony Garnock-Jones 257c604e2b Repair bad record pattern 2022-01-17 00:22:10 +01:00
Tony Garnock-Jones 4875ebb529 Merge latest changes from the syndicate-protocols repository 2022-01-16 21:17:59 +01:00
Tony Garnock-Jones a06d532006 Extension point. Closes #2 2022-01-16 21:17:36 +01:00
Tony Garnock-Jones 0b2b0f4dfa A new test 2022-01-16 09:48:31 +01:00
Tony Garnock-Jones d4d53fa9ba Bump copyright years 2022-01-16 09:48:18 +01:00
Tony Garnock-Jones e04b898c7f Adjustments to service.prs 2022-01-07 15:29:20 +01:00
Tony Garnock-Jones 5f60c22e49 More simplifications, to sturdy this time 2021-12-13 15:43:01 +01:00
Tony Garnock-Jones 49075e7e84 Embedded values count as atoms here 2021-12-13 14:22:32 +01:00
Tony Garnock-Jones b3e24d819c Experiment: stricter, simpler dataspacePatterns 2021-12-13 13:49:58 +01:00
Tony Garnock-Jones b2df99cbc0 New preserves-schemac invocation style 2021-12-13 13:44:02 +01:00
Tony Garnock-Jones 51422d2450 Use internal mutation instead of re-parameterization 2021-12-01 15:04:14 +01:00
Tony Garnock-Jones b42230b96a ServiceObject 2021-10-06 21:51:08 +02:00
Tony Garnock-Jones 239b1b15cc Repair incorrect definition name 2021-09-27 13:57:12 +02:00
Tony Garnock-Jones 9078267e76 Fix typo 2021-09-27 13:56:12 +02:00
Tony Garnock-Jones 955177b7db Clarify action of `core-service` 2021-09-27 13:53:54 +02:00
Tony Garnock-Jones b4b4995d84 Oops - wanted literals, but had refs instead 2021-09-27 13:50:29 +02:00
Tony Garnock-Jones 422904010b Refine approach to services 2021-09-27 13:48:26 +02:00
Tony Garnock-Jones c5643fb1b1 No more distinction between internal/external protocol variants 2021-09-24 13:02:51 +02:00
Tony Garnock-Jones 953d568abd Merge latest changes from the syndicate-protocols repository 2021-09-24 12:57:30 +02:00
Tony Garnock-Jones 6cfd97c91a Remove protocol variant complication (experimental) 2021-09-24 12:57:05 +02:00
Tony Garnock-Jones 770fb79882 Develop service model 2021-09-24 12:56:30 +02:00
Tony Garnock-Jones 701f5722f0 Error on sending transient references 2021-09-02 16:47:09 +02:00
Tony Garnock-Jones 0ff8c2c872 Stdio transport 2021-08-19 18:17:51 -04:00
Tony Garnock-Jones c2de82a2b7 schemas/transportAddress.prs 2021-08-18 22:59:59 -04:00
Tony Garnock-Jones 776105c776 Merge latest changes from the syndicate-protocols repository 2021-08-11 16:07:53 -04:00
Tony Garnock-Jones 9445a71b53 Use correct latest version of preserves-schemac 2021-08-11 16:05:36 -04:00
Tony Garnock-Jones 5ff75d05ab Remove name from DBind 2021-08-11 15:52:01 -04:00
Tony Garnock-Jones 6fec849b2f Merge latest changes from the syndicate-protocols repository 2021-08-11 15:44:45 -04:00
Tony Garnock-Jones 8cd601a777 Remove name field from DBind 2021-08-11 15:43:29 -04:00
Tony Garnock-Jones f82b9094a0 Bring up to date with latest changes 2021-07-27 16:01:12 +02:00
Tony Garnock-Jones 90b56b1154 Merge latest changes from the syndicate-protocols repository 2021-07-25 18:46:46 +02:00
Tony Garnock-Jones 0b2c7ecfe1 Rename RefAny -> Cap 2021-07-22 14:12:53 +02:00
Tony Garnock-Jones be6b30bba6 Switch Ref -> RefAny 2021-07-22 13:43:14 +02:00
Tony Garnock-Jones 993cf78a38 DeBruijn-like binding in patterns 2021-07-12 21:10:19 +02:00
Tony Garnock-Jones b4b5a443d1 Use external protocol variant 2021-07-03 16:33:10 +02:00
Tony Garnock-Jones 996658cd0e Merge latest changes from the syndicate-protocols repository 2021-07-03 09:04:21 +02:00
Tony Garnock-Jones f7c6e7d164 Specify embedded type for sturdy.prs 2021-07-03 09:00:58 +02:00
Tony Garnock-Jones e7ddfdf311 EntityRef.Ref in dataspacePatterns 2021-07-02 16:51:21 +02:00
Tony Garnock-Jones dab79020f4 Variations on protocol for internal and external use 2021-07-02 16:48:15 +02:00
Tony Garnock-Jones a6639b5380 Error packets 2021-07-02 10:11:53 +02:00
Tony Garnock-Jones 1eb4acdaca Merge latest changes from the syndicate-protocols repository 2021-07-01 10:09:49 +02:00
Tony Garnock-Jones 06e922c511 Compiled schema bundle 2021-07-01 10:04:26 +02:00
Tony Garnock-Jones 13bc05e13c Merge latest changes from the syndicate-protocols repository 2021-07-01 09:58:30 +02:00
Tony Garnock-Jones 255416c295 make pull-protocols 2021-07-01 09:58:25 +02:00
Tony Garnock-Jones 93c196acaa Move schemas into subdirectory after subtree split 2021-07-01 09:51:53 +02:00
Tony Garnock-Jones 8008ca5a53 Rearrange protocols subtree 2021-07-01 09:51:17 +02:00
Tony Garnock-Jones 10694bb032 Split 'syndicate/schemas/' into commit 'e034486aaa96d08ecd85461904b1559564464e5a'
git-subtree-dir: syndicate/schemas
git-subtree-mainline: 824c2e201c
git-subtree-split: e034486aaa
2021-07-01 09:49:29 +02:00
Tony Garnock-Jones 824c2e201c Rename NamedSimplePattern_ -> Binding 2021-06-25 10:25:39 +02:00
Tony Garnock-Jones e034486aaa Update schemas to match new identifier restrictions. 2021-06-25 09:45:38 +02:00
Tony Garnock-Jones f2063997ec Update schemas to match new identifier restrictions. 2021-06-25 09:45:38 +02:00
Tony Garnock-Jones ef8e205eb2 Update README 2021-06-22 16:17:51 +02:00
Tony Garnock-Jones c8f32f1910 Remove old implementation from git 2021-06-22 16:06:03 +02:00
Tony Garnock-Jones b05451972b Minor tightening 2021-06-21 15:14:35 +02:00
Tony Garnock-Jones 1d43b731f3 Repair embarrassing error in gen:custom-write for fields 2021-06-21 14:40:00 +02:00
Tony Garnock-Jones 1fb116630e Queries 2021-06-21 14:39:41 +02:00
Tony Garnock-Jones 9fe2f923bc tcp-echo-server-naive.rkt 2021-06-19 11:38:44 +02:00
Tony Garnock-Jones 6fe031e678 once 2021-06-18 22:19:54 +02:00
Tony Garnock-Jones dfd51a5235 Repair connection-state tracking 2021-06-18 18:12:23 +02:00
Tony Garnock-Jones 2e0b9505cc Sensible defaults; and return local source/sink from establish-connection 2021-06-18 17:43:16 +02:00
Tony Garnock-Jones 20eeb6cd55 Introduce "smart constructors" for patterns to merge literal chunks where possible, making patterns-over-patterns less annoying to express (hopefully) 2021-06-18 17:02:56 +02:00
Tony Garnock-Jones 8b1d3a5e3f Put pattern-expanders first 2021-06-18 14:57:21 +02:00
Tony Garnock-Jones 6284fd6ebc Slightly better error messages 2021-06-18 14:57:05 +02:00
Tony Garnock-Jones 824b078eac Simpler stream connection protocol. 2021-06-18 13:48:12 +02:00
Tony Garnock-Jones 28901e9d31 Simpler stream connection protocol. 2021-06-18 13:48:12 +02:00
Tony Garnock-Jones 68db114840 Factor generic stream stuff out of tcp.rkt into stream.rkt 2021-06-17 15:26:14 +02:00
Tony Garnock-Jones cf93327ed6 Services and service activation 2021-06-17 14:57:06 +02:00
Tony Garnock-Jones 0ab3526cba Services and service activation 2021-06-17 14:57:06 +02:00
Tony Garnock-Jones 373fb77fc3 Make distributed/tcp-server respect TcpListenError 2021-06-17 13:43:01 +02:00
Tony Garnock-Jones 6cfe8c2ba4 `when` -> `on`; StreamConnection API; better `this-target`; tcp-listen errors
- spec-generic StreamConnection translators, for simple TCP API
 - `when` -> `on`, better use for event-expanders
 - Removal of special processing of `at`, making `this-target` properly lexically scopeable
 - TcpListenError and handling of tcp-listen errors
 - SYNDICATE_COLUMNS for pretty-printing of dataspace traces
 - Repair driver-support.rkt thread shutdown turn-taking
 - Refinements to stream protocols and implementation
 - Improvements to syntax location preservation in syntax.rkt
2021-06-17 13:38:30 +02:00
Tony Garnock-Jones ac8ea67ab1 `when` -> `on`; StreamConnection API; better `this-target`; tcp-listen errors
- spec-generic StreamConnection translators, for simple TCP API
 - `when` -> `on`, better use for event-expanders
 - Removal of special processing of `at`, making `this-target` properly lexically scopeable
 - TcpListenError and handling of tcp-listen errors
 - SYNDICATE_COLUMNS for pretty-printing of dataspace traces
 - Repair driver-support.rkt thread shutdown turn-taking
 - Refinements to stream protocols and implementation
 - Improvements to syntax location preservation in syntax.rkt
2021-06-17 13:38:30 +02:00
Tony Garnock-Jones a43b6d39aa Downgrade a log-warning to a log-debug 2021-06-16 21:56:40 +02:00
Tony Garnock-Jones b6bc816daf Split out experimental "stream" protocols; make tcp.rkt use them; more inertness checks
Also, a few other important changes:
 - Better printing of entity-ref structs
 - Inertness checks on assertion retraction (!) and preventer-disarm
 - Correct selection of active facet during dataflow recomputations
 - Repair silly omission in turn-assert/dataflow!
2021-06-16 21:44:07 +02:00
Tony Garnock-Jones d30c6feeee Split out experimental "stream" protocols; make tcp.rkt use them; more inertness checks
Also, a few other important changes:
 - Better printing of entity-ref structs
 - Inertness checks on assertion retraction (!) and preventer-disarm
 - Correct selection of active facet during dataflow recomputations
 - Repair silly omission in turn-assert/dataflow!
2021-06-16 21:44:07 +02:00
Tony Garnock-Jones ab9168a5ea Better facet printing 2021-06-15 14:49:34 +02:00
Tony Garnock-Jones 44bee78044 stop-actor-system 2021-06-15 14:26:19 +02:00
Tony Garnock-Jones 3fe5d3a343 Check for EOF even when there are no credits 2021-06-15 14:03:26 +02:00
Tony Garnock-Jones 2b18bb5b36 Fix ordering of credit issue 2021-06-15 13:58:26 +02:00
Tony Garnock-Jones cf99f2e2b3 Extra engine debug 2021-06-15 12:46:17 +02:00
Tony Garnock-Jones a73b6a9f4a Whole-packet flow credit 2021-06-15 12:46:09 +02:00
Tony Garnock-Jones 9451f9886f Whole-packet flow credit 2021-06-15 12:46:09 +02:00
Tony Garnock-Jones b64b111a45 Split out assert-control 2021-06-15 12:44:13 +02:00
Tony Garnock-Jones 210e983c8d Redo actor-group linking style 2021-06-15 12:43:27 +02:00
Tony Garnock-Jones 0b1e9874d1 Treat #:message separately from #:asserted.
While in principle messages are "instantaneous" assertions, it invites
confusion to treat them as such in context of `(object)` because
assertions by default spawn nested facets, so it's too easy to
accidentally wrap a message handler in an unwanted facet. Being
explicit about messages means you never get an unwanted facet wrapper.
2021-06-15 12:41:46 +02:00
Tony Garnock-Jones d23e264756 escape-pod 2021-06-15 12:38:13 +02:00
Tony Garnock-Jones 6c5e6b713e Print (DEAD) on a dead facet 2021-06-15 12:37:59 +02:00
Tony Garnock-Jones f6cb595709 Add ConnectionPeer assertions; rename TcpOutbound -> TcpRemote and TcpInbound -> TcpLocal 2021-06-15 12:37:14 +02:00
Tony Garnock-Jones 6c9926cb11 Add ConnectionPeer assertions; rename TcpOutbound -> TcpRemote and TcpInbound -> TcpLocal 2021-06-15 12:37:14 +02:00
Tony Garnock-Jones a0a963f1e2 Provide event-expanders 2021-06-14 19:23:20 +02:00
Tony Garnock-Jones 00ed26fb60 More indentation configurations 2021-06-14 19:23:12 +02:00
Tony Garnock-Jones 4a0e6e0519 actor-group; bug fixes 2021-06-13 07:55:50 +02:00
Tony Garnock-Jones 4dc40da056 Batch outbound actions per-actor, not per-facet; continue to retain ordering within a batch group 2021-06-12 22:16:59 +02:00
Tony Garnock-Jones afe36c630d Refactor/repair tcp.prs and tcp.rkt 2021-06-11 15:29:12 +02:00
Tony Garnock-Jones 6546e335ef Refactor/repair tcp.prs and tcp.rkt 2021-06-11 15:29:12 +02:00
Tony Garnock-Jones 5850c5b06d Credit-based flow control on tcp driver; line mode 2021-06-11 14:18:53 +02:00
Tony Garnock-Jones d304d1e87d Credit-based flow control on tcp driver; line mode 2021-06-11 14:18:53 +02:00
Tony Garnock-Jones 5e1518c2bb Avoid caching turn past a user action (which causes problems if we suspend/resume across turns) 2021-06-11 09:57:35 +02:00
Tony Garnock-Jones 4970d0fd9e Tweak error message 2021-06-11 09:56:35 +02:00
Tony Garnock-Jones b2c591777e Avoid potential (?) for wrong early termination of engine 2021-06-11 09:55:48 +02:00
Tony Garnock-Jones 26ca865b87 More sensible representation of facet ancestry 2021-06-11 09:54:53 +02:00
Tony Garnock-Jones 0ba6bac01b Clean up relay logging 2021-06-10 16:46:28 +02:00
Tony Garnock-Jones b409063ff2 Handle EPIPE in tcp driver 2021-06-10 16:46:20 +02:00
Tony Garnock-Jones 6ea074948a Launchers from previous incarnation 2021-06-10 16:46:02 +02:00
Tony Garnock-Jones 247fd1b2c0 Introduce `object` and `spawn/link` 2021-06-10 16:21:30 +02:00
Tony Garnock-Jones b5c57381fa Simplify during* 2021-06-10 14:41:57 +02:00
Tony Garnock-Jones 2f4525b031 Split out tcp-client.rkt and tcp-echo-server.rkt 2021-06-10 13:35:26 +02:00
Tony Garnock-Jones b0d0eb3a11 drivers/racket-event.rkt 2021-06-10 13:34:18 +02:00
Tony Garnock-Jones 11eb0bcd6f drivers/racket-event.rkt 2021-06-10 13:34:18 +02:00
Tony Garnock-Jones 1ca04c66b0 Detect situation with empty spawn body 2021-06-10 13:33:34 +02:00
Tony Garnock-Jones 21d09f81e5 ActiveSocket-close now gets a string, not an embedded exn 2021-06-10 13:33:16 +02:00
Tony Garnock-Jones 752bc91991 ActiveSocket-close now gets a string, not an embedded exn 2021-06-10 13:33:16 +02:00
Tony Garnock-Jones 3984a2c22a Correct generation of patterns for literal embedded-values 2021-06-10 13:32:39 +02:00
Tony Garnock-Jones 7790923e65 Split out timer-demo.rkt 2021-06-10 13:30:30 +02:00
Tony Garnock-Jones bd65204760 entity/stop-on-retract 2021-06-10 13:29:19 +02:00
Tony Garnock-Jones 37ca805969 Ambient current-turn 2021-06-10 11:42:07 +02:00
Tony Garnock-Jones 9aa33210b0 Use tcp driver in tcp-server 2021-06-10 10:53:30 +02:00
Tony Garnock-Jones 45e8c29976 TCP client driver, and provides 2021-06-10 10:42:59 +02:00
Tony Garnock-Jones 8b5e74048e Beginnings of a TCP driver 2021-06-10 10:00:43 +02:00
Tony Garnock-Jones 336811c51e Beginnings of a TCP driver 2021-06-10 10:00:43 +02:00
Tony Garnock-Jones 5ab375bc26 Conditional assertion 2021-06-10 10:00:22 +02:00
Tony Garnock-Jones 201f5433e1 Port timer driver from older syndicate/rkt implementation 2021-06-09 23:08:06 +02:00
Tony Garnock-Jones 82648dc0da Port timer driver from older syndicate/rkt implementation 2021-06-09 23:08:06 +02:00
Tony Garnock-Jones ee5a5d9f5f Cosmetic, more or less 2021-06-09 23:07:18 +02:00
Tony Garnock-Jones de18aa2112 Add debug output to facet-inert? 2021-06-09 23:07:03 +02:00
Tony Garnock-Jones b12fc5188d "Linking" during spawn; and during/spawn 2021-06-09 23:06:40 +02:00
Tony Garnock-Jones 5dec0afe39 syntax-classes.rkt 2021-06-09 23:05:51 +02:00
Tony Garnock-Jones 52362a9183 facet-on-end-of-turn! 2021-06-09 23:04:58 +02:00
Tony Garnock-Jones cce81dc104 Seldom any need for this chmod, so omit it in favour of manual fixup when required 2021-06-09 15:07:15 +02:00
Tony Garnock-Jones 8cbe2475e3 TAttenuate 2021-06-09 15:06:58 +02:00
Tony Garnock-Jones e8a2e00fa2 TAttenuate 2021-06-09 15:06:58 +02:00
Tony Garnock-Jones fff4b05036 Run packet writer in a turn to add proper error handling 2021-06-09 14:53:41 +02:00
Tony Garnock-Jones c40ba51a29 Oops! Omitted DBind case when extending index skeleton 2021-06-09 14:53:22 +02:00
Tony Garnock-Jones d0fb1cfa99 Various missing con/destructors 2021-06-09 14:53:08 +02:00
Tony Garnock-Jones eb3aa40541 Fix double-embedded problem; ~working tcp-server! 2021-06-08 18:01:27 +02:00
Tony Garnock-Jones 5c2bdb1e93 Don't silently swallow errors in linked-thread 2021-06-08 16:37:40 +02:00
Tony Garnock-Jones 2276d1a81e Allow deferred production of initial-ref 2021-06-08 16:35:07 +02:00
Tony Garnock-Jones 600a52c287 Fully expose the problem with missing-unwrapping-of-embedded 2021-06-08 16:34:51 +02:00
Tony Garnock-Jones 40c26f006e Remove :template in favour of ->preserve 2021-06-08 16:20:58 +02:00
Tony Garnock-Jones ef66c1d358 Further adaptation to recent Preserves changes 2021-06-08 16:09:59 +02:00
Tony Garnock-Jones 92eab82b1f Correct name of engine.rkt logger 2021-06-08 15:57:25 +02:00
Tony Garnock-Jones 19fc5f97bb Adapt to recent changes in preserves-schema 2021-06-08 15:39:55 +02:00
Tony Garnock-Jones 601d60adc3 Adapt to new ty-field records 2021-06-08 14:13:01 +02:00
Tony Garnock-Jones 468b6541f9 Yesterday's work on relay + TCP distribution 2021-06-08 09:33:56 +02:00
Tony Garnock-Jones 6f9ee4eb44 More emacs indentation config 2021-06-08 09:31:52 +02:00
Tony Garnock-Jones 8e866239a6 #:name for during* 2021-06-08 09:31:28 +02:00
Tony Garnock-Jones bed381dd5e Remove unwanted commented code 2021-06-08 09:30:38 +02:00
Tony Garnock-Jones b22ed84bdb Minor refactoring 2021-06-08 09:30:29 +02:00
Tony Garnock-Jones 5d1e266ea3 Improve error reporting on turn reuse 2021-06-08 09:30:04 +02:00
Tony Garnock-Jones 98486667f4 gen:custom-write for turn 2021-06-08 09:29:49 +02:00
Tony Garnock-Jones 5260370154 entity-data 2021-06-08 09:29:15 +02:00
Tony Garnock-Jones e7153b9c6a Truncate output of hmac-sha256 correctly 2021-06-08 09:28:48 +02:00
Tony Garnock-Jones c18a2b2652 turn-committed? 2021-06-08 09:28:14 +02:00
Tony Garnock-Jones eec5c59f84 Accommodate new preserves approach to (un)parsing embeddeds 2021-06-08 09:27:51 +02:00
Tony Garnock-Jones 3751c07de6 *dead-actor*, *dead-facet*, *dead-engine* 2021-06-08 09:24:25 +02:00
Tony Garnock-Jones 557a0fb499 actor-remove-exit-hook! 2021-06-08 09:23:23 +02:00
Tony Garnock-Jones 4c72ab11f4 Export actor-name and actor-engine 2021-06-08 09:22:50 +02:00
Tony Garnock-Jones da0d2b8e61 attenuate-entity-ref as well as attenuate-sturdy 2021-06-08 09:21:54 +02:00
Tony Garnock-Jones 1290e30c3d Merge branch 'main' into novy 2021-06-04 16:45:28 +02:00
Tony Garnock-Jones 2d07e46c67 Fix and add copyright notices 2021-06-04 16:20:14 +02:00
Tony Garnock-Jones 7be7c36537 Merge branch 'main' into novy 2021-06-04 16:19:41 +02:00
Tony Garnock-Jones e85760e6d6 syndicate/sturdy.rkt 2021-06-04 00:05:04 +02:00
Tony Garnock-Jones 0a887ec9e2 Add missing dependency from syndicate-examples to preserves. 2021-06-03 23:32:40 +02:00
Tony Garnock-Jones f1c3859a71 Put assertion-struct and message-struct back. 2021-06-03 23:32:22 +02:00
Tony Garnock-Jones 2a9cdfc5cc !dump-registered-preserves-patterns! 2021-06-03 23:23:48 +02:00
Tony Garnock-Jones 930f7eda00 Move box-protocol to a #lang preserves-schema module 2021-06-03 23:22:46 +02:00
Tony Garnock-Jones b49178146d Move box-protocol to a #lang preserves-schema module 2021-06-03 23:22:46 +02:00
Tony Garnock-Jones d554c4ba8e Move go.rkt and go2.rkt into the examples package 2021-06-03 22:54:36 +02:00
Tony Garnock-Jones 6a0bcb1246 Make box-and-client work better with raco test 2021-06-03 22:50:37 +02:00
Tony Garnock-Jones d648af920a Restore syndicate-examples package; port box-and-client.rkt 2021-06-03 22:48:12 +02:00
Tony Garnock-Jones 7b600c51df Emacs indentation support 2021-06-03 22:48:12 +02:00
Tony Garnock-Jones a23047c26b stop-when, stop-when-true, when retracted 2021-06-03 22:48:12 +02:00
Tony Garnock-Jones 50f6dfadc0 Pattern quasiquotation (!!!) 2021-06-03 22:48:12 +02:00
Tony Garnock-Jones 7bf0f17e8e Repair missing argument in call to struct-label-and-arity 2021-06-03 22:48:11 +02:00
Tony Garnock-Jones 12df86ee74 Hash-table patterns 2021-06-03 22:48:11 +02:00
Tony Garnock-Jones 507f137c25 Fix templates of union schemas 2021-06-03 22:48:11 +02:00
Tony Garnock-Jones 7ce9166a5d actor-system/dataspace 2021-06-03 22:48:11 +02:00
Tony Garnock-Jones 490f2d82db Provide :pattern and :template by default 2021-06-03 22:48:11 +02:00
Tony Garnock-Jones d6c29fc2e7 Immediate stop-facet continuation execution 2021-06-03 22:48:11 +02:00
Tony Garnock-Jones 22bd461cdc Entity names 2021-06-03 22:48:11 +02:00
Tony Garnock-Jones 63720f80ba Split out during*; new example go2.rkt 2021-06-03 17:02:20 +02:00
Tony Garnock-Jones 5d17a3bc58 Use actor names; extract reporting from box 2021-06-03 17:01:59 +02:00
Tony Garnock-Jones defb65cd30 Actor names; debug tracing of actors 2021-06-03 17:01:26 +02:00
Tony Garnock-Jones 2fa1b033eb Use :template in send!. 2021-06-03 16:07:25 +02:00
Tony Garnock-Jones 6b3988caf7 Repair during macro; use during in box/client example 2021-06-03 16:03:00 +02:00
Tony Garnock-Jones 4b1b2a9635 Proper skeleton-based dataspace 2021-06-03 15:59:17 +02:00
Tony Garnock-Jones a932fa1428 Pattern decomposition 2021-06-03 15:58:48 +02:00
Tony Garnock-Jones 6fe14e09a5 Pattern decomposition 2021-06-03 15:58:48 +02:00
Tony Garnock-Jones 044860a3b5 Useful custom-write for entities 2021-06-03 15:57:28 +02:00
Tony Garnock-Jones 40310a0eb3 Split out dataspace.rkt 2021-06-02 15:00:25 +02:00
Tony Garnock-Jones 7a9f52b97c Add missing layer in pattern generation 2021-06-02 13:41:30 +02:00
Tony Garnock-Jones b77fe3efbc Steps towards using :pattern/:template in syntax 2021-06-02 13:11:26 +02:00
Tony Garnock-Jones fe6430abfd Add :template 2021-06-02 12:50:21 +02:00
Tony Garnock-Jones ac01ce4dfe Work towards schema-to-pattern compiler 2021-06-02 12:37:36 +02:00
Tony Garnock-Jones 3412eabcff Update schemas for new embedded syntax; steps toward pattern support 2021-06-02 06:57:48 +02:00
Tony Garnock-Jones 5c97661c73 Update schemas for new embedded syntax; steps toward pattern support 2021-06-02 06:57:48 +02:00
Tony Garnock-Jones a2264b0c63 Merge branch 'main' into novy 2021-06-01 10:05:54 +02:00
Tony Garnock-Jones 37bd64bf05 First attempt at novy syntax 2021-06-01 10:04:53 +02:00
Tony Garnock-Jones 35e1d24fde Cope with nonexistent schemas/gen directory during setup 2021-06-01 10:02:41 +02:00
Tony Garnock-Jones 568f97c2f6 ref -> entity-ref 2021-06-01 10:01:10 +02:00
Tony Garnock-Jones d4af09e1b9 Main submodule in go.rkt 2021-05-31 13:07:37 +02:00
Tony Garnock-Jones a06b9d188a Integrate dataflow 2021-05-31 13:05:37 +02:00
Tony Garnock-Jones e5b87f5bb0 Cosmetic 2021-05-31 12:25:44 +02:00
Tony Garnock-Jones bcbc660ff1 Make turns atomic, rather than reply-turn-per-event 2021-05-31 12:06:44 +02:00
Tony Garnock-Jones caec6fc820 Daemon actors and go.rkt shutdown 2021-05-28 10:33:02 +02:00
Tony Garnock-Jones 3528391f12 Crude pseudo-dataspace, plus box-and-client 2021-05-28 09:57:11 +02:00
Tony Garnock-Jones 4eb43a158e Progress 2021-05-27 11:41:11 +02:00
Tony Garnock-Jones 21bb695ac8 First program! 2021-05-27 11:28:10 +02:00
Tony Garnock-Jones e47a37e3f0 First steps to an actual novy implementation 2021-05-27 10:36:35 +02:00
Tony Garnock-Jones d1a1c967f7 First steps to an actual novy implementation 2021-05-27 10:36:35 +02:00
Tony Garnock-Jones 08c4980025 Move the bulk of the existing implementation out of the way 2021-05-27 10:34:35 +02:00
259 changed files with 7136 additions and 13596 deletions

View File

@ -1,6 +1,6 @@
__ignored__ := $(shell ./setup.sh)
PACKAGES=syndicate syndicate-examples
PACKAGES=syndicate syndicate-examples syndicate-msd
COLLECTS=syndicate syndicate-examples
all: setup
@ -22,3 +22,13 @@ test: setup testonly
testonly:
raco test -p $(PACKAGES)
PROTOCOLS_BRANCH=main
pull-protocols:
git subtree pull -P syndicate/private/protocols \
-m 'Merge latest changes from the syndicate-protocols repository' \
git@git.syndicate-lang.org:syndicate-lang/syndicate-protocols \
$(PROTOCOLS_BRANCH)
fixcopyright:
-fixcopyright.rkt --preset-racket LGPL-3.0-or-later

View File

@ -1,11 +1,7 @@
# Second Racket implementation of Syndicate
# Third Racket implementation of Syndicate
## Quickstart
raco pkg install syndicate
or
git clone https://git.syndicate-lang.org/syndicate-lang/syndicate-rkt
cd syndicate-rkt
make link
@ -22,27 +18,31 @@ implementation of Syndicate, which includes
- a TCP echo server example, which listens for connections on port
5999 by default, in
[`syndicate-examples/echo.rkt`](syndicate-examples/echo.rkt).
[`syndicate-examples/tcp-echo-server.rkt`](syndicate-examples/tcp-echo-server.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
## New design, 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.
This implementation of Syndicate is based on the *Syndicated Actor
Model*, a design that takes the language-level constructs of facets,
capabilities denoting objects, and dataflow fields to heart. The
implementation integrates these ideas into a facet- and
assertion-oriented actor implementation and a capability-aware
dataspace implementation.
It gains a *significant* performance advantage by doing so.
It gains a *significant* performance advantage (10-30x speedup!) over
[2017-era dataspace implementations](https://git.syndicate-lang.org/syndicate-lang/syndicate-2017/src/branch/main/racket)
by representing patterns over assertions in a
[new way](syndicate/HOWITWORKS.md), and a smaller but not
insignificant advantage over
[2019-era implementations](https://git.syndicate-lang.org/syndicate-lang/syndicate-rkt/src/branch/fruit)
by switching to a simpler and more general actor implementation.
Programs seem to be about *20x faster* (compared to the
[previous implementation](https://git.syndicate-lang.org/syndicate-lang/syndicate-2017/src/branch/main/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
The dataspace 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.
@ -50,30 +50,28 @@ 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.
of the old implementation are not precisely preserved). The connection
to the surrounding Racket environment is also 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:
<!-- 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
<!-- 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.
<!-- 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. (If you're using Racket CS,
you'll need version 7.8 or later because of
[this issue](https://github.com/racket/racket/issues/3132).)
You will need Racket version 8.1 or later.
Once you have Racket installed, run
raco pkg install syndicate
<!-- raco pkg install syndicate -->
to install the package from the Racket package repository, or
<!-- to install the package from the Racket package repository, or -->
raco pkg install --link syndicate

View File

@ -1,144 +0,0 @@
#!/usr/bin/env racket
#lang racket
;;; SPDX-License-Identifier: LGPL-3.0-or-later
;;; SPDX-FileCopyrightText: Copyright © 2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
(require file/glob)
(require racket/date)
(define ((re p) i) (regexp-match p i))
(define ((re? p) i) (regexp-match? p i))
(define ((s p ins) i) (regexp-replace p i ins))
(define this-year (number->string (date-year (current-date))))
(define (get-git-config key)
(string-trim (with-output-to-string
(lambda () (system* "/usr/bin/env" "git" "config" "--get" key)))))
(define (is-tracked? f)
(call-with-output-file "/dev/null" #:exists 'append
(lambda (sink)
(parameterize ((current-error-port sink)
(current-output-port sink))
(system* "/usr/bin/env" "git" "ls-files" "--error-unmatch" f)))))
(define user-name (get-git-config "user.name"))
(define user-email (get-git-config "user.email"))
(define user (format "~a <~a>" user-name user-email))
(define (make-copyright who low [hi #f])
(if (and hi (not (string=? low hi)))
(format "Copyright © ~a-~a ~a" low hi who)
(format "Copyright © ~a ~a" low who)))
(define total-file-count 0)
(define total-changed-files 0)
(define dry-run? #f)
(define modify-untracked? #f)
(define (fix-files #:file-type-name file-type-name
#:file-pattern file-pattern
#:front-matter-re [front-matter-re #f]
#:leading-comment-re leading-comment-re
#:comment-prefix comment-prefix
#:file-filter [file-filter (lambda (x) #t)])
(define matched-files (filter file-filter (glob file-pattern)))
(define file-count (length matched-files))
(define changed-files 0)
(for [(file-number (in-naturals))
(f (in-list matched-files))]
(printf "~a [~a/~a] ~a ..." file-type-name file-number file-count f)
(flush-output)
(define all-lines (file->lines f))
(define-values (front-matter head tail)
(let*-values (((lines) all-lines)
((front-matter lines) (if front-matter-re
(splitf-at lines (re? front-matter-re))
(values '() lines)))
((head tail) (splitf-at lines (re? leading-comment-re))))
(values front-matter head tail)))
(let* ((head (map (s leading-comment-re "") head))
(head (map (lambda (l)
(match (regexp-match "^([^:]+): (.*)$" l)
[(list _ k v) (list k v)]
[#f (list #f l)]))
head))
(head (if (assoc "SPDX-FileCopyrightText" head)
head
(cons (list "SPDX-FileCopyrightText" (make-copyright user this-year)) head)))
(head (if (assoc "SPDX-License-Identifier" head)
head
(cons (list "SPDX-License-Identifier" "LGPL-3.0-or-later") head)))
(head (map (lambda (l)
(match l
[(list "SPDX-FileCopyrightText"
(and (regexp (regexp-quote user-name))
(regexp #px"(\\d{4})-\\d{4}" (list _ low))))
(list "SPDX-FileCopyrightText"
(make-copyright user low this-year))]
[(list "SPDX-FileCopyrightText"
(and (regexp (regexp-quote user-name))
(regexp #px"\\d{4}" (list low))))
(list "SPDX-FileCopyrightText"
(make-copyright user low this-year))]
[_ l]))
head))
(head (map (lambda (l)
(if (string=? (cadr l) "")
(string-trim comment-prefix)
(string-append comment-prefix
(match l
[(list #f v) v]
[(list k v) (format "~a: ~a" k v)]))))
head))
(new-lines `(,@front-matter
,@head
""
,@(dropf tail (lambda (l) (string=? (string-trim l) "")))))
(would-change-if-written? (not (equal? all-lines new-lines)))
(write-needed? (and would-change-if-written? (or modify-untracked? (is-tracked? f)))))
(when (and write-needed? (not dry-run?))
(call-with-atomic-output-file
f
(lambda (port _tmp-path)
(for [(l front-matter)] (displayln l port))
(for [(l head)] (displayln l port))
(newline port)
(for [(l (dropf tail (lambda (l) (string=? (string-trim l) ""))))] (displayln l port)))))
(if write-needed?
(begin (set! changed-files (+ changed-files 1))
(printf "\e[41mchanged\e[0m\n"))
(printf "\r\e[K"))))
(when (positive? changed-files)
(printf "~a [~a total files, ~a changed]\n" file-type-name file-count changed-files))
(set! total-file-count (+ total-file-count file-count))
(set! total-changed-files (+ total-changed-files changed-files)))
(command-line #:once-each
[("-n" "--dry-run") "Do not write back changes to files"
(set! dry-run? #t)]
[("--modify-untracked") "Modify files not tracked by git as well as those that are"
(set! modify-untracked? #t)])
(void (fix-files #:file-type-name "Racket"
#:file-pattern "**.rkt"
#:front-matter-re #px"^#"
#:leading-comment-re #px"^;+ *"
#:comment-prefix ";;; "))
(printf "fixcopyright: ~a files examined, ~a ~a\n"
total-file-count
total-changed-files
(if dry-run?
(if (zero? total-changed-files)
"changes are needed"
"files need to be updated")
(if (zero? total-changed-files)
"changes were needed"
"files were updated")))
(void (system "chmod a+x fixcopyright.rkt"))
(exit (if (positive? total-changed-files) 1 0))

View File

@ -1,4 +1,4 @@
#!/bin/sh
set -e
exec 1>&2
./fixcopyright.rkt -n
fixcopyright.rkt -n --preset-racket LGPL-3.0-or-later

View File

@ -1,5 +1,5 @@
;;; SPDX-License-Identifier: LGPL-3.0-or-later
;;; SPDX-FileCopyrightText: Copyright © 2010-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
;;; SPDX-FileCopyrightText: Copyright © 2010-2024 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
#lang racket/base

1
syndicate-examples/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/schemas/

View File

@ -1,5 +1,5 @@
;;; SPDX-License-Identifier: LGPL-3.0-or-later
;;; SPDX-FileCopyrightText: Copyright © 2010-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
;;; SPDX-FileCopyrightText: Copyright © 2010-2024 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
#lang syndicate
;; Simple mutable box and count-to-infinity box client.
@ -7,18 +7,24 @@
(message-struct set-box (new-value))
(assertion-struct box-state (value))
(spawn (field [current-value 0])
(assert (box-state (current-value)))
(stop-when-true (= (current-value) 10)
(log-info "box: terminating"))
(on (message (set-box $new-value))
(log-info "box: taking on new-value ~v" new-value)
(current-value new-value)))
(module+ main
(standard-actor-system/no-services (ds)
(spawn #:name 'box
(define-field current-value 0)
(at ds
(assert (box-state (current-value)))
(on (message (set-box $new-value))
(log-info "box: taking on new-value ~v" new-value)
(current-value new-value)))
(stop-on-true (= (current-value) 10)
(log-info "box: terminating")))
(spawn (stop-when (retracted (observe (set-box _)))
(log-info "client: box has gone"))
(on (asserted (box-state $v))
(log-info "client: learned that box's value is now ~v" v)
(send! (set-box (+ v 1))))
(on (retracted (box-state _))
(log-info "client: box state disappeared")))
(spawn #:name 'client
(at ds
(stop-on (retracted (Observe (:pattern (set-box ,_)) _))
(log-info "client: box has gone"))
(on (asserted (box-state $v))
(log-info "client: learned that box's value is now ~v" v)
(send! (set-box (+ v 1))))
(on (retracted (box-state _))
(log-info "client: box state disappeared"))))))

View File

@ -1,37 +0,0 @@
;;; SPDX-License-Identifier: LGPL-3.0-or-later
;;; SPDX-FileCopyrightText: Copyright © 2010-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
#lang syndicate
(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)
(define root-facet (current-facet))
(reassert-on (tcp-connection id (tcp-address "localhost" 5999))
(retracted (tcp-accepted id))
(asserted (tcp-rejected id _)))
(on (asserted (tcp-rejected id $reason))
(printf "*** ~a\n" (exn-message reason)))
(during (tcp-accepted id)
(on-start (printf "*** Connected.\n")
(issue-credit! tcp-in id))
(on (retracted (tcp-accepted id)) (printf "*** Remote EOF.\n"))
;; ^ Not on-stop, because the facet is stopped by local EOF too!
(on (message (tcp-in-line id $bs))
(write-bytes bs)
(newline)
(flush-output)
(issue-credit! tcp-in id))
(define stdin-evt (read-bytes-line-evt (current-input-port) 'any))
(on (message (inbound (external-event stdin-evt (list $line))))
(if (eof-object? line)
(stop-facet root-facet (printf "*** Local EOF. Terminating.\n"))
(send! (tcp-out id (bytes-append line #"\n")))))))

View File

@ -1,32 +0,0 @@
;;; SPDX-License-Identifier: LGPL-3.0-or-later
;;; SPDX-FileCopyrightText: Copyright © 2010-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
#lang syndicate
(require/activate syndicate/drivers/tcp)
(require racket/format)
(message-struct speak (who what))
(assertion-struct present (who))
(dataspace
(spawn #:name 'chat-server
(during/spawn (inbound (tcp-connection $id (tcp-listener 5999)))
#:name (list 'chat-connection id)
(assert (outbound (tcp-accepted id)))
(on-start (send! (outbound (credit (tcp-listener 5999) 1)))
(send! (outbound (credit tcp-in id 1))))
(let ((me (gensym 'user)))
(assert (present me))
(on (message (inbound (tcp-in-line id $bs)))
(match bs
[#"/quit" (stop-current-facet)]