
@mwb rackunit
provides a require/expose
— but I don’t think you should use it except for tests (or maybe as a fragile bandaid until you can add the provide
).

Incidentally I’ve never had to use require/expose
even for tests. Racket’s test submodules (e.g. (module+ test ___)
) mean tests can be inside the module that has the non-provide
d thing you want to test. At the same time, because they’re in their own submodule, they need not be loaded at non-test runtime — or even distributed at all.

@greg, thanks again. It doesn’t sounds like those work-arounds are worth doing. I’ll continue to use the gh-pages
branch going forward and, as you said, maybe @stchang will see this conversation and can comment on the state of the package. I use Github but never collaboratively so I don’t know the etiquette for addressing it there.

@mwb @greg the master branch is the one to use

the connection pool feature is still experimental

(and the docs are for the experimental branch)

In general, the package has not been updated in a while. For example, I’m not sure if it works with more recent versions of redis

though the pasterack site continues to rely on the package

and at some point, Marc Burns was using it in production

not sure if he is on slack

@stchang thanks! The package is working for me with redis_version:3.2.8
which is the current stable branch (or at least pretty close). I will try it with the 4.0 Beta version when I get a chance.

cool, thanks for the info

to summarize the state of the package, the cleanup branch is most recent

m4burns was merging in extra features he added but we had some issues with cleaning up connections before returning them to the pool

and then got interrupted

and so those features never got merged into master

(trying to find the issue thread)

ok here is the issue we were stalled on: https://github.com/stchang/redis/pull/11

specifically, if you use pubsub in MULTI mode, then I’m not convinced each connection gets reset properly before being returned to the pool

that’s why i never merged to master

but from what I can recall, m4burns was using the cleanup branch for his startup with no issues

depending on your application, I would try using master first

and if you run into performance issues, you can try switching to the cleanup branch and use the connection pool

Thanks @stchang I’m trying to use redis on a non-default host (not 127.0.0.1) and when using the master
branch I find that the #:host
parameter in the GET
(for example) and send-cmd
functions would not work. Returning this error: application: procedure does not expect an argument with given keyword
procedure: send-cmd
given keyword: #:host
arguments…:
However, I CAN use those on the gh-pages
branch.

oh one more comment. even though I think there might theoretically be a connection cleanup issue with our code when using pubsub+MULTI, I’m not a redis expert and I dont remember being able to create an actual counter example. Also, I looked at some other clients and they dont seem to handle that scenario specially

so it might be ok

@mwb, hmm, taking a look now

it looks like the kw is #:rconn

and not #:host

did you want connect
instead?

so you could do (send-cmd #:rconn (connect #:host "your-new-ip") ...)

I did not see connect
, somehow. That works!

@stchang I’m ok going forward with that syntax in the master branch. Thanks so much for your help here.

@mwb it’s my fault for not getting the docs in shape

ping again if you run into problems

@stchang, just an update. I ran some simple commands in master
against a 4.0 Beta version of Redis and there were no issues.

nice!

What do folks think of a meta-lang like at-exp that converts xml-style tags to function calls? So <func kw1=foo kw2=bar>blah blah blah</func>
would read as (func blah blah blah #:kw1 foo #:kw2 bar)
. I’m thinking of using it as a syntax component for simple template langs, meant for people not used to s-exps. Or for porting loosely-specified xml/html templating languages to racket #langs.

@notjack Seems neat. Maybe read to an x-expression? https://docs.racket-lang.org/xml/#%28def._%28%28lib._xml%2Fprivate%2Fxexpr-core..rkt%29._xexpr~3f%29%29

@greg I wouldn’t want to read it as literal data, so I can add it to #langs and have the tags be actual functions. For instance a #lang html/strict could not let you use custom tags or something like that.

OK. Also I guess you said “xml-style” not XML.

(In XML I’d think of blah blah blah
as one thing not three. I’d worry about parsing things like blah&nbsp;blah
— is that 1 2 or 3 things? I’d want to reuse XML parsing someone else has sweated to get right. But all that’s probably moot — you have a special purpose.)

Yeah, if I’m giving people a way to write specialized templates I’d want them to be bindings not data so I can add things like typechecking

I’m not sure how I want text to fit in

I’m thinking of mixing this with scribble’s at-reader so that outside angle brackets it reads with the same rules as scribble/manual

#lang my-template
<body attr=something-bound-by-my-template>
Some text. Other text. Some text referring to @thing-bound-by-my-template
</body>

basically providing two ways to escape instead of just one