Commit Graph

687 Commits

Author SHA1 Message Date
Tony Garnock-Jones 09dfaf7d0e Migrate ip, port-allocator, udp and tcp to syndicate/actor 2016-07-21 16:50:30 -04:00
Tony Garnock-Jones 04f1c56a5a Migrate main.rkt to syndicate/actor 2016-07-21 16:50:30 -04:00
Tony Garnock-Jones ec2996e931 Migrate fetchurl.rkt to syndicate/actor 2016-07-21 16:50:30 -04:00
Tony Garnock-Jones b444bccb80 Migrate demo-config.rkt to syndicate/actor 2016-07-21 16:50:30 -04:00
Tony Garnock-Jones fb5b6e80b8 Translate Ethernet and ARP to incremental/actor style 2016-07-21 16:50:30 -04:00
Tony Garnock-Jones 4357424e78 Switch to non-boxed, persistent impl of fields 2016-07-21 16:50:16 -04:00
Tony Garnock-Jones 970baf7a36 Forbid multiple uses of a suspend-script continuation 2016-07-21 15:14:03 -04:00
Tony Garnock-Jones bffc3757cb Remove unused #:substate arg from add-facet!. 2016-07-21 15:00:58 -04:00
Tony Garnock-Jones 573ca4d6e5 Handle exceptions better in syndicate/threaded 2016-07-20 23:02:42 -04:00
Tony Garnock-Jones ccdaceb30c Add syndicate/threaded. 2016-07-20 22:13:43 -04:00
Tony Garnock-Jones 3569426048 Support specification of the form to use to create an actor in during/actor 2016-07-20 22:05:14 -04:00
Tony Garnock-Jones 9b5a399383 Route targeted-events via actor paths 2016-07-20 19:30:49 -04:00
Tony Garnock-Jones 815b139e5c Split out keeping track of actor paths to hierarchy.rkt 2016-07-20 18:54:31 -04:00
Tony Garnock-Jones a01480fe05 Anticipate the pid a process is *about* to be allocated. 2016-07-20 18:42:35 -04:00
Sam Caldwell c76480f701 Allow giving two contracts in field macro 2016-07-20 16:51:41 -04:00
Sam Caldwell 01ad7c72f6 Allow field/c to have different in and out contracts
This can be used to temporarily disallow writing to the field, or
allowing the field to be initially #f but never set to #f.
2016-07-20 16:34:21 -04:00
Sam Caldwell 3b9e483076 Re-kerjigger field macro to allow using #f as a contract 2016-07-20 16:14:12 -04:00
Sam Caldwell e20f87adba Implement field/c using a struct rather than make-contract
Asumu suggested that using a struct with the contract property is
generally preferred.
2016-07-19 17:49:45 -04:00
Sam Caldwell 9cf12a381e wrap contracts given to field with `field\c` 2016-07-18 15:20:38 -04:00
Sam Caldwell 0fb5fa52f4 allow field/c to blame positive party 2016-07-18 15:17:17 -04:00
Tony Garnock-Jones a046bd0f23 Experimental begin/dataflow and define/dataflow facilities 2016-07-17 12:51:57 -04:00
Tony Garnock-Jones 21f05e110a Do not provide "sleep" from the #langs 2016-07-17 12:51:57 -04:00
Tony Garnock-Jones 0a0feee01b Support optional priority in on-event 2016-07-17 00:29:52 -04:00
Tony Garnock-Jones 1334bd3abb Split out query-set* etc; add query-value etc 2016-07-17 00:11:19 -04:00
Tony Garnock-Jones d36ccbb0c2 New web driver 2016-07-16 16:20:57 -04:00
Tony Garnock-Jones 4f570fcd18 Support current-ground-dataspace for syndicate-gl. 2016-07-16 16:15:19 -04:00
Tony Garnock-Jones 4496258d0e Support current-ground-dataspace for big-bang and friends 2016-07-16 16:07:34 -04:00
Tony Garnock-Jones b6c679afa6 Support `module+` in Syndicate #langs. Closes #2.
Adding `#'module+` explicitly to the stop-list for local-expand stops
the infinite recursion (problem 1 in the issue description). The code
goes on to treat it like `#'module` and `#'module+`, namely as a
non-action-producing form.

Problem 2 in the issue description is interesting. I haven't done
anything in particular to address the production of unbounded `X` ->
`(begin X)` expansions, but it seems not currently to be a problem;
and, weirdly (?), submodules in a `#lang syndicate` or `#lang
syndicate/actor` module do not seem to inherit the `#%module-begin` of
their container! That is, `(module+ main)`, `(module+ test)` etc. all
seem to have a `racket/base` `#%module-begin`, though I've not looked
very far into this.

Most peculiar on this front is that if the `#,@(reverse final-forms)`
precedes the `(module+ syndicate-main ...)`, and the module being
processed includes, say, a `(module+ main)`, then for some reason the
resulting `main` submodule *is* treated as having a `syndicate/lang`
`#%module-begin` (thus causing problems as suggested in the issue
description)! I *really* don't understand why that might be, and
haven't spent very much time investigating after I noticed that so
long as the `main`-required `syndicate-main` submodule preceded all
other submodule declarations, things seemed to work out.

This whole approach is still a bit dicey: for example, the following
will erroneously treat `(foo quux)` as an expression yielding actions,
rather than a struct declaration:

    #lang syndicate
    (define-syntax-rule (foo x) (struct x ()))
    (foo quux)
2016-07-16 15:49:03 -04:00
Sam Caldwell 75cec37038 Support for defining fields with contracts 2016-07-15 18:53:25 -04:00
Sam Caldwell e1f42d5d4f First pass at field/c
Logic mostly dupicated from parameter/c
2016-07-15 15:45:08 -04:00
Tony Garnock-Jones 22f5c47d30 Collect actor.rkt pending-actions during module compilation 2016-07-15 09:50:29 -04:00
Tony Garnock-Jones cb473a8847 Make rising-edge check at patch-compute-time.
This makes rising-edge checks happen only when *fields* change, rather
than every turn. It also means that if a script causes a relevant
field change, the rising-edge check will definitely be performed
before the end of the turn.

A potential downside is that a rising-edge check could schedule a
script which triggers the same rising-edge check, causing an infinite
loop in `run-scripts!`.
2016-07-15 09:47:48 -04:00
Tony Garnock-Jones 0ac24a5755 Support #:on-add, #:on-remove in queries 2016-07-13 17:20:57 -04:00
Tony Garnock-Jones 024cb6d707 Promote {define/,}query-{set,hash,hash-set} to actor.rkt 2016-07-13 16:59:55 -04:00
Tony Garnock-Jones 95fe020ed1 Factor out support/hash.rkt 2016-07-13 16:53:07 -04:00
Tony Garnock-Jones fe272ab514 define/query-set, -hash, -hash-set 2016-07-13 16:37:58 -04:00
Tony Garnock-Jones 6c3295c96d Rename track -> query 2016-07-13 16:35:55 -04:00
Tony Garnock-Jones 53efb1fcd4 Refine script priorities for use by track-set and friends 2016-07-13 16:34:16 -04:00
Tony Garnock-Jones be80ac038f Split effect.rkt out into a package of its own, github.com/tonyg/racket-effects 2016-07-13 13:25:47 -04:00
Tony Garnock-Jones a466fcdf23 track-set.rkt 2016-07-12 21:17:07 -04:00
Tony Garnock-Jones cf82b794e5 Abort to prompt-tag when invoking a suspended continuation. 2016-07-12 17:42:54 -04:00
Tony Garnock-Jones 1a6199f9ee Allow naming of `during/actor`s 2016-07-12 16:32:54 -04:00
Tony Garnock-Jones 34b504326f Remove react/independent; counter to Syndicate design. See Journal 5 for details. 2016-07-12 15:33:31 -04:00
Tony Garnock-Jones 7989bc4931 Add `flush!` utility to actor.rkt 2016-07-12 15:18:06 -04:00
Tony Garnock-Jones 0b06bcf1c4 Introduce syndicate module *activation*.
Make #lang syndicate module-begin gather boot actions into a
syndicate-main submodule, and for each such module, add a main
submodule that calls run-ground with the syndicate-main boot actions.

This lets us write syndicate *libraries* that comprise both
data-structures, functions, and Syndicate services.
2016-07-12 15:05:56 -04:00
Tony Garnock-Jones e8d33d4135 Move from syndicate-monolithic to syndicate/monolithic, in prep for refactoring 2016-07-12 13:55:59 -04:00
Tony Garnock-Jones 2afa0fce15 #lang syndicate/monolithic, integrated with incremental 2016-07-12 13:45:32 -04:00
Tony Garnock-Jones 7c11a438e4 Change compute-patch to deal with trie-sets rather than -maps 2016-07-12 13:43:01 -04:00
Tony Garnock-Jones 118c163193 Done 2016-07-11 12:27:15 -04:00
Tony Garnock-Jones 6fae78c7c6 Cosmetic 2016-07-11 12:23:05 -04:00