orfeaskar
2019-6-16 11:12:19

@orfeaskar has joined the channel


orfeaskar
2019-6-16 11:17:17

hello! happy to be here


soegaard2
2019-6-16 11:17:55

Hi


orfeaskar
2019-6-16 11:21:41

I have a somewhat vague question: is there a project related to modal logic and behavior driven testing?


soegaard2
2019-6-16 11:23:07

Don’t know.


soegaard2
2019-6-16 11:28:08

Searching for “modal” on http://pkgs.racket-lang.org\|pkgs.racket-lang.org gives no results.


soegaard2
2019-6-16 11:28:16

Here are the result for “logic”:



soegaard2
2019-6-16 11:29:19

I think MiniKanren, Datalog and Parenlog are the the most “logic” related.


soegaard2
2019-6-16 11:29:36

But I don’t know whether they are suitable for modal logic.


orfeaskar
2019-6-16 11:33:52

minikanren seems interesting


orfeaskar
2019-6-16 11:33:59

cannot find this datalog you mention


orfeaskar
2019-6-16 11:34:02

thanks



orfeaskar
2019-6-16 11:36:10

datalog may be useful for behavior testing


orfeaskar
2019-6-16 11:36:39

if you define some sort of test case database


soegaard2
2019-6-16 11:37:44

The MiniKanren website has lots of useful resources:


soegaard2
2019-6-16 11:37:45

soegaard2
2019-6-16 11:37:56

Including links to papers and screen casts.


soegaard2
2019-6-16 11:45:37

@orfeaskar What exactly is “behavior testing” and what makes it different from, say, the way rackunit tests?



orfeaskar
2019-6-16 11:46:51

well it’s a current trend in system-level testing. Basically you have some workflows in your business that go through all kinds of systems


orfeaskar
2019-6-16 11:47:23

such as a customer requesting a package that has to be bundled together


orfeaskar
2019-6-16 11:47:57

and the end result is not in terms of just output of the workflow but also in terms of side-effects


orfeaskar
2019-6-16 11:48:38

you want to deliver the package but in a specific manner


orfeaskar
2019-6-16 11:49:43

orfeaskar
2019-6-16 11:49:59

this is one implementation, in Ruby I think


soegaard2
2019-6-16 11:50:13

thanks for the explanation


orfeaskar
2019-6-16 11:50:31

i hope it was helpful


orfeaskar
2019-6-16 12:02:42

for example, it may be that your package needs to be authorized by an identity server


orfeaskar
2019-6-16 12:03:11

a behavior test would be that the package will eventually be authorized if it is valid


orfeaskar
2019-6-16 12:03:52

but it will be necessarily the case so


orfeaskar
2019-6-16 12:33:21

i will try to do it myself, after all this is the point of racket - extensibility


sorawee
2019-6-16 19:03:50

@mflatt where do tests for struct/define-struct/struct-copy locate?


mflatt
2019-6-16 19:04:39

“pkgs/racket-test-core/tests/racket/struct.rktl”


sorawee
2019-6-16 19:05:11

Thanks! I was looking at pkgs/racket-test, so I couldn’t find it


sorawee
2019-6-16 19:20:20

@mflatt there’re struct-copy1 and struct-copy2. What do these mean? https://github.com/racket/racket/blob/master/pkgs/racket-test-core/tests/racket/struct.rktl#L1055


sorawee
2019-6-16 19:20:47

If I add a new one, should I name it struct-copy3?


mflatt
2019-6-16 19:21:52

A test in the core test suite is either (test <expected> <proc-expr> <arg-expr> ...) or (test <expected> <non-proc-label-expr> <expr>). So 'struct-copy1 and 'struct-copy2 are just labels for the test.


sorawee
2019-6-16 19:22:12

Right, but shouldn’t the labels be all different?


sorawee
2019-6-16 19:22:19

I see a lot of struct-copy2


mflatt
2019-6-16 19:22:59

The labels just need to be distinct enough that a failure can be racked back to a test.


mflatt
2019-6-16 19:23:38

So, probably the expected result or surrounding tests can distinguish 'struct-copy2 tests. Or it has been good enough so far, at least.


sorawee
2019-6-16 19:23:48

I see. Thanks


sorawee
2019-6-16 19:27:59

Sorry for a lot of questions. This should be the last one. Can I use (module xxx racket/base ...) in the test file (.rktl), and if not, what should I do instead?


mflatt
2019-6-16 19:58:54

Yes, you can write a module form. Pick a long name for the module so that it’s unlikely to conflict with any other module declaration in the tests.


pavpanchekha
2019-6-16 20:46:28

I’ve got an unusual packaging question


pavpanchekha
2019-6-16 20:46:44

I maintain a Racket package (herbie) and I’d like to have a plugin system of sorts for it


pavpanchekha
2019-6-16 20:47:13

So that you could install another package (like softposit-rkt) and it could somehow notify the herbie package that it should load special support for it


lexi.lambda
2019-6-16 20:50:09

@pavpanchekha You could probably use setup/getinfo to communicate information via info.rkt files. https://docs.racket-lang.org/raco/getinfo.html


pavpanchekha
2019-6-16 20:51:11

Could you give a little more detail on how I’d set it up?


lexi.lambda
2019-6-16 20:51:36

It’s how DrRacket’s plugin system works, for example: it looks for info.rkt keys named drracket-tools, drracket-tool-names, drracket-tool-icons, and drracket-tool-urls, as documented here. https://docs.racket-lang.org/tools/implementing-tools.html


lexi.lambda
2019-6-16 20:52:34

Using setup/getinfo, you can choose your own key(s), like herbie-plugins or something like that, then call (find-relevant-directories 'herbie-plugins) to find info.rkt files that define that key.


pavpanchekha
2019-6-16 20:52:53

So I’d use find-relevant-directories to search for a herbie-plugin key or whatever, then use get-info to read out the name of the module to load, and then dynamic-require it?


pavpanchekha
2019-6-16 20:52:59

ha you beat me to it


lexi.lambda
2019-6-16 20:53:00

Right, exactly.


pavpanchekha
2019-6-16 20:53:05

Excellent, thank you so much


pavpanchekha
2019-6-16 20:53:09

This is fantastic!


lexi.lambda
2019-6-16 20:53:53

Good luck—I’ve never actually done anything like that, so I am mostly just guessing here. :)


pavpanchekha
2019-6-16 20:56:05

Well, one of the most important things you told me is that DrRacket has a plugin system, and I can always read its source code to understand how it works


lexi.lambda
2019-6-16 20:57:18

Yeah, that’s what I was mostly basing my suggestion off of, though I don’t know how complex the DrRacket code actually is that handles plugin loading.


pavpanchekha
2019-6-16 20:57:50

Awesome, well, thanks so much for the help!


ararslan
2019-6-16 21:45:45

@ararslan has joined the channel


samth
2019-6-17 01:55:00

@pavpanchekha you might also look at how raco commands work, which is a little simpler than DrRacket but works basically the same way


lexi.lambda
2019-6-17 02:12:41

Is there any way to ask Racket to make a gl-context<%> that uses OpenGL 3.3?


lexi.lambda
2019-6-17 02:16:46

Ah, nevermind, it’s the set-legacy? method of gl-config%.