greg
2017-3-1 14:30:45

@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).


greg
2017-3-1 14:33:20

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-provided 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.


mwb
2017-3-1 18:16:01

@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.


stchang
2017-3-1 18:54:50

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


stchang
2017-3-1 18:55:51

the connection pool feature is still experimental


stchang
2017-3-1 18:56:04

(and the docs are for the experimental branch)


stchang
2017-3-1 18:57:09

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


stchang
2017-3-1 18:57:32

though the pasterack site continues to rely on the package


stchang
2017-3-1 18:58:07

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


stchang
2017-3-1 18:58:51

not sure if he is on slack


mwb
2017-3-1 19:01:44

@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.


stchang
2017-3-1 19:02:34

cool, thanks for the info


stchang
2017-3-1 19:03:12

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


stchang
2017-3-1 19:04:10

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


stchang
2017-3-1 19:04:17

and then got interrupted


stchang
2017-3-1 19:04:25

and so those features never got merged into master


stchang
2017-3-1 19:05:04

(trying to find the issue thread)


stchang
2017-3-1 19:12:40

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


stchang
2017-3-1 19:13:40

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


stchang
2017-3-1 19:13:48

that’s why i never merged to master


stchang
2017-3-1 19:14:08

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


stchang
2017-3-1 19:17:56

depending on your application, I would try using master first


stchang
2017-3-1 19:18:24

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


mwb
2017-3-1 19:22:09

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.


stchang
2017-3-1 19:23:25

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


stchang
2017-3-1 19:23:33

so it might be ok


stchang
2017-3-1 19:24:20

@mwb, hmm, taking a look now


stchang
2017-3-1 19:25:07

it looks like the kw is #:rconn


stchang
2017-3-1 19:25:12

and not #:host


stchang
2017-3-1 19:26:47

did you want connect instead?


stchang
2017-3-1 19:28:38

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


mwb
2017-3-1 19:36:58

I did not see connect, somehow. That works!


mwb
2017-3-1 19:38:21

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


stchang
2017-3-1 19:39:41

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


stchang
2017-3-1 19:39:48

ping again if you run into problems


mwb
2017-3-1 19:45:23

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


stchang
2017-3-1 19:50:03

nice!


notjack
2017-3-1 20:41:11

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.


greg
2017-3-1 21:26:47

notjack
2017-3-1 21:31:02

@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.


greg
2017-3-1 21:43:15

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


greg
2017-3-1 21:45:59

(In XML I’d think of blah blah blah as one thing not three. I’d worry about parsing things like blah 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.)


notjack
2017-3-1 21:46:15

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


notjack
2017-3-1 21:46:30

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


notjack
2017-3-1 21:46:52

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


notjack
2017-3-1 21:47:46
#lang my-template
<body attr=something-bound-by-my-template>
  Some text. Other text. Some text referring to @thing-bound-by-my-template
</body>

notjack
2017-3-1 21:48:03

basically providing two ways to escape instead of just one