pocmatos
2019-6-7 08:58:03

Perfect, it’s working. Thanks.


samth
2019-6-7 13:33:09

@notjack because sandboxes exist already, eval is set up nicely, the linklet level is not designed for this


soegaard2
2019-6-7 14:07:40

Any ideas to why I am getting this error?


soegaard2
2019-6-7 14:07:48

sorawee
2019-6-7 14:20:21

Have you installed it?


soegaard2
2019-6-7 14:20:37

I installed the Full Racket v7.3.


sorawee
2019-6-7 14:21:09

This is a package by @lexi.lambda I think


sorawee
2019-6-7 14:21:12

collections-lib



sorawee
2019-6-7 14:21:58

So it’s not included in the base package


soegaard2
2019-6-7 14:22:10

soegaard2
2019-6-7 14:23:14

Modules like data/gvector and data/bit-vector work fine.


soegaard2
2019-6-7 14:24:21
mbp:~ soegaard$ ls "/Applications/Racket v7.3/collects/data/"
bit-vector.rkt	compiled	integer-set.rkt	private		queue.rkt

steveh2009
2019-6-7 14:24:42

If I have data coming into my Racket app through a socket, need to build them up into messages, queued to be responded to by the app, Do you think the best way to go is to put each message into a struct and then put’em an async channel? Thanks for the advice.


steveh2009
2019-6-7 14:25:19

…put them on an async channel.


soegaard2
2019-6-7 14:26:09

@steveh2009 That sounds about right.


soegaard2
2019-6-7 14:30:21

@sorawee You were right. It was collections-lib.


soegaard2
2019-6-7 14:31:06

And it even says to the the right side in the docs: https://docs.racket-lang.org/collections/index.html?q=collection


soegaard2
2019-6-7 14:31:33

Still a bit confused about how one can make modules that appear under data/


soegaard2
2019-6-7 14:34:27

Okay - got it now. There is a search path. lexi-lambda just used the same name (so the collection and the packages are stored in two different locations).


samth
2019-6-7 14:40:29

@mbutterick you can’t


greg
2019-6-7 14:40:41

@steveh2009 This might be more detail than you need or want to care about, but: Keep in mind that an async-channel has a buffer. (make-async-channel) defaults to “the buffer can grow until you run out of memory”. Maybe that’s OK, especially for a first version where you care about getting other things to work. Instead, you can give make-async-channel a maximum number of elements. In case you need “back pressure”. (“Thank you, socket, but I can’t keep up so I’m going to start NACK-ing or dropping packets.”)


greg
2019-6-7 14:42:12

(Or, “I’m going to block and not read more, yet, so, some lower layer is going to nack or drop”)


greg
2019-6-7 14:43:36

recently spent some time implementing the moral equivalent of QUIC in Racket, so has a lot of this on the brain


sorawee
2019-6-7 14:46:12

@mbutterick it seems void can be serialized (https://docs.racket-lang.org/reference/serialization.html), so I think adding a serialization as a middle step would solve the problem?


samth
2019-6-7 14:47:06

@sorawee yes, you can use serialization but that won’t make file->value (which is just a wrapper around read) work


samth
2019-6-7 14:48:00

Right, (void) is not readable. As @sorawee suggests, serialize is probably a good choice, depending on what else you need to write.


samth
2019-6-7 14:50:03

another option is the racket/fasl library


steveh2009
2019-6-7 15:32:59

@greg The library I’m thinking of porting is Interactive Brokers trading API. Probably have to dump the responsibility of not consuming messages on the client app side because a real-time trading app can’t afford to have any messages dropped.


steveh2009
2019-6-7 15:35:28

or delayed


pocmatos
2019-6-7 15:39:36

@steveh2009 I could definitely make use of such a library! :slightly_smiling_face: Do let me know if you get around to it. Good luck.



greg
2019-6-7 16:35:54

> The TWS is designed to accept up to fifty messages per second coming from the client side…. On the other hand, there are no limits on the amount of messages the TWS can send to the client application. ¯_(ツ)_/¯


greg
2019-6-7 16:36:57

I guess that explains Apache Kafka’s name :grin:


greg
2019-6-7 16:42:46

Anyway you said “socket” and for some reason I heard “UDP”. If you’re reading from TCP, then you’ll read as fast as you can and the buffering and retries is ultimately up to them.


steveh2009
2019-6-7 17:02:17

@pocmatos Will do. I wanted something that can run on Windows, Linux and Mac, be able to code in a LISP (b/c fun is more important at my age), give end-user multiple script language options, and have a well integrated graphics API to work with. AND have excellent docs and community for a LISP noob like me to reference. Well, Racket is pretty much it.