Re: [racket-users] Reliably propagating received log messages to ports

2018-01-31 Thread George Neuner
On 1/31/2018 5:00 PM, Alexander McLin wrote: During the tool's start up period prior to calling the main function I set up a log receiver to receive messages at the desired level and place it inside a sync loop within its own thread. Each time a sync event is received, it is written out to

Re: [racket-users] Datalog Question

2018-01-31 Thread Jay McCarthy
Something like kevin(Y) :- foo(x, Y), Y != 3. kevin(Y)? On Wed, Jan 31, 2018 at 5:13 PM, Kevin Forchione wrote: > Can anyone tell me how I would use the datalog = and != tokens? The > documentation says they can separate terms, such as != . In the > program below, how

[racket-users] Datalog Question

2018-01-31 Thread Kevin Forchione
Can anyone tell me how I would use the datalog = and != tokens? The documentation says they can separate terms, such as != . In the program below, how would I create a query for foo(x, ?) where ? is not 3? #lang datalog foo(bil, 1). foo(bob, 3). foo(joe, 2). I imagine I’d have to create a

Re: [racket-users] Reliably propagating received log messages to ports

2018-01-31 Thread Robby Findler
I think the right approach here is to recognize that you have a more complex protocol than is currently reflected in your code and dive into Racket's evt support. In this particular case, I suggest you make a new channel that the loop in the thread also listens on, If yet another channel comes in

Re: [racket-users] Reliably propagating received log messages to ports

2018-01-31 Thread Vincent St-Amour
Does `with-intercepted-logging` do what you want? It should take care of the sychronization aspects, like `with-logging-to-port` does, while letting you do whatever you want with the message, e.g., sending them to different ports. Vincent On Wed, 31 Jan 2018 16:00:58 -0600, Alexander McLin

[racket-users] Reliably propagating received log messages to ports

2018-01-31 Thread Alexander McLin
So I am using Racket's logging facilities in a command-line tool I'm developing. I have various defined loggers in a sensible hierarchical configuration for use as needed. During the tool's start up period prior to calling the main function I set up a log receiver to receive messages at the

Re: [racket-users] Apparent Datalog error?

2018-01-31 Thread George Neuner
On 1/31/2018 2:51 PM, Matthias Felleisen wrote: > On Jan 31, 2018, at 2:15 PM, George Neuner wrote: > > > On 1/31/2018 2:10 PM, Sam Caldwell wrote: >> Your definition of `ancestor` is one or two steps of parentage: >> >> > ancestor(A, B) :- parent(A, B). >> >

Re: [racket-users] Apparent Datalog error?

2018-01-31 Thread Matthias Felleisen
> On Jan 31, 2018, at 2:15 PM, George Neuner wrote: > > > On 1/31/2018 2:10 PM, Sam Caldwell wrote: >> Your definition of `ancestor` is one or two steps of parentage: >> >> > ancestor(A, B) :- parent(A, B). >> > ancestor(A, B) :- >> parent(A, C), >> parent(C,

Re: [racket-users] Apparent Datalog error?

2018-01-31 Thread George Neuner
On 1/31/2018 2:10 PM, Sam Caldwell wrote: Your definition of `ancestor` is one or two steps of parentage: > ancestor(A, B) :- parent(A, B). > ancestor(A, B) :-   parent(A, C),   parent(C, B). I suspect you want one of those lines to appeal to the `ancestor` relation to allow longer

Re: [racket-users] Apparent Datalog error?

2018-01-31 Thread Sam Caldwell
Your definition of `ancestor` is one or two steps of parentage: > ancestor(A, B) :- parent(A, B). > ancestor(A, B) :- parent(A, C), parent(C, B). I suspect you want one of those lines to appeal to the `ancestor` relation to allow longer chains. - Sam Caldwell On Wed, Jan 31, 2018 at 1:53 PM,

[racket-users] Apparent Datalog error?

2018-01-31 Thread Kevin Forchione
Walking through the datalog tutorial I got the following transcript: Welcome to DrRacket, version 6.12 [3m]. Language: datalog, with debugging; memory limit: 512 MB. > parent(john, douglas). > parent(john, douglas)? parent(john, douglas). > parent(john, evlyn)? > parent(bob, john). > parent(A,

Re: [racket-users] How to integrate Racket with a .Net application?

2018-01-31 Thread Greg Hendershott
Another way is for two (OS) processes to "pipe" I/O to each other. The back-and-forth "protocol"? It could be as simple/ad-hoc vs. as formal/ceremonial as you prefer. It could be text line-oriented, or JSON, or s-expressions, or raw bytes. I might use this as a starting point, get some

[racket-users] Re: How to integrate Racket with a .Net application?

2018-01-31 Thread Alexander McLin
All three approaches you outlined are viable but web service is easiest to set up. >From what you described, it seems it would be a low-performance use for Racket and only simple data structures will be passed back and forth on an infrequent basis. Web service would be a good fit for that.

[racket-users] How to integrate Racket with a .Net application?

2018-01-31 Thread Daniel Brunner
Hello: We have an application on Windows that can be extended with .Net components (DLL). We mostly use C# for this purpose. Our idea now is to "embed" Racket into one of these components. After reading the documentation of the FFI and de C API I am unsure what may a good way to accomplish that.