lexi.lambda
2017-8-22 17:04:06

leif
2017-8-22 17:41:20

@mflatt cool, thanks.


leif
2017-8-22 17:41:30

BTW, does anyone know of a good way to write tests for DrRacket plugins?


leif
2017-8-22 17:41:49

About all I have so far is to keep as many of the smarts as possible out of the plugin, and then just not test the plugin.


samth
2017-8-22 18:22:01

@leif There’s extensive infrastructrue for testing DrRacket


leif
2017-8-22 18:37:14

@samth Perhaps I’m looking in the wrong place. Because I’m not seeing anything about that in the DrRacket plugin’s manual: http://docs.racket-lang.org/tools/index.html?q=drracket%3Atool%40


leif
2017-8-22 18:37:38

Like, I see stuff about making drracket tools for debugging


leif
2017-8-22 18:37:55

And elsewhere I can see tests for the drracket plugin infrastructure.


leif
2017-8-22 18:38:06

But I don’t see anything about writing tests for DrRacket plugins.


notjack
2017-8-22 19:28:45

what’s up with the acmart package? it has a version exception pointing to scribble-lib?


leif
2017-8-22 20:16:44

@notjack Ya, @fahree and I had a package going on the catalog. Then DVH added a collection to scribble-lib for scribble/acmart, thus conflicting with the existing package (and also being incompatible too. :disappointed: ), so we cleaned it up to make it inline with the existing package (and scribble conventions).


leif
2017-8-22 20:17:12

But we wanted to leave the acm package up there because it was still useful in old versions of racket.


leif
2017-8-22 20:17:58

Although I am glad DVH merged it into scribble-lib. And to be fair, he did ask if anyone else had done it first. But I didn’t find out about it until it was too late. :slightly_smiling_face:


notjack
2017-8-22 20:18:22

@leif the build server does not seem happy with this arrangement :p


leif
2017-8-22 20:18:27

Although I guess the other moral of the story is…check the package server before putting something int he main distro?


leif
2017-8-22 20:19:14

leif
2017-8-22 20:19:43

Hmm…I guess we could just have acmart be a completely empty package.


leif
2017-8-22 20:19:52

(In everything but racket 6.8)


notjack
2017-8-22 20:20:21

version exception pointing to totally different package seems like it could have lots of strange consequences


notjack
2017-8-22 20:20:32

empty package does seem better to me


notjack
2017-8-22 20:21:03

(I gotta write stuff like this down for a future doc about good racket package practices)


leif
2017-8-22 20:22:09

While I agree, I do kind of think that this could also just be resolved by having a cleaner package system.


leif
2017-8-22 20:22:33

(magically cleaner…. I don’t want to put myself on a burning steak….err.design it. :wink: )


notjack
2017-8-22 20:22:57

no disagreement here


notjack
2017-8-22 20:23:35

the specific case where package A depends on B and provides module X, then a new version of B also provides X, seems worth taking a look at though


notjack
2017-8-22 20:24:35

I could see that coming up a lot both by accident and as a result of people deciding that X really belongs in the core and moving it into B from A by choice


leif
2017-8-22 20:28:28

Yup


leif
2017-8-22 20:28:43

So, right now the best I got is we should use c like conventions…


leif
2017-8-22 20:28:58

that is, only provide collections with a unique identifier.


leif
2017-8-22 20:29:26

Kind of a sad idea given how nice things like…ya know…scope, is.


leif
2017-8-22 20:29:36

But….again….its what we got, and I don’t have a better idea.


leif
2017-8-22 20:29:43

(Nor want to spend the energy to come up with one right now.)


notjack
2017-8-22 20:30:32

1) versioning packages and 2) extending the “version exception” idea to packages other than “main-distribution” seems like a decent way to do it


leif
2017-8-22 21:12:40

That solves a lot of problems, but not all of them.


leif
2017-8-22 21:13:15

Because a package can have multiple collections, and the collections are cross cutting through multiple packages, it also should have a unique collection name.


samth
2017-8-22 22:12:12

I don’t think you need to use a unique identifier


samth
2017-8-22 22:12:25

Racket is small enough that just “avoid conflicts” seems like enough at the moment


lexi.lambda
2017-8-22 22:31:09

Haskell is much bigger, and it mostly avoids conflicts despite the hierarchal namespace. However, GHC has a much nicer story around collisions (it knows about some low-level notion of packages, so you can alias or hide packages as necessary, and you can also specify the package when importing if absolutely necessary).


lexi.lambda
2017-8-22 22:37:28

@mflatt @robby In my language, . is a valid identifier. Is there any way to get @racket[\|.\|] to typeset the . without the vertical bars? Or will I need to either make a custom version of the racket/racketblock/etc. forms or use unsyntax to escape to @racketidfont{.}? It would be nice to not have to reimplement the whole universe of typesetting functions, including the scribble/example forms.


robby
2017-8-22 22:47:35

Reimplementing the entire universe does sound daunting.


robby
2017-8-22 22:48:15

racketidfont sounds like a good start.


robby
2017-8-22 22:48:36

Sorry I don’t have a better answer


leif
2017-8-22 22:57:18

@robby Don’t worry. Matthew will have a re-implementation by monday. :stuck_out_tongue:


lexi.lambda
2017-8-22 23:09:37

racketidfont works okay, but it doesn’t work with scribble/example without eval:alts, which is unfortunate.


mflatt
2017-8-22 23:40:24

@lexi.lambda Does something like this help? #lang scribble/manual @(require scribble/racket (for-syntax racket/base)) @(let-syntax ([\|.\| (make-element-id-transformer (lambda (stx) #'(racketidfont ".")))]) @scheme[\|.\|])


lexi.lambda
2017-8-23 00:02:12

@mflatt That gets me a lot closer, thanks! The issue with that is the resulting . is not hyperlinked to the definition of .. I’m looking at the to-element docs, but it doesn’t seem to have a way to use a different element for the content but keep the hyperlink.


lexi.lambda
2017-8-23 00:02:59

It seems there’s probably a more indirect way to get the link target and generate the necessary link element, but I don’t know what it is.


mflatt
2017-8-23 00:06:08

racketlink?


lexi.lambda
2017-8-23 00:08:15

Aha! That should work; I was looking in the wrong section of the docs.


lexi.lambda
2017-8-23 00:11:54

Yes, that works. Thanks for your help.


lexi.lambda
2017-8-23 00:22:33

@mflatt Relatedly, is there any way to override how @defthing[\|.\| ....] renders .? Or do I just need to roll my own definition form for defining .?


mflatt
2017-8-23 01:19:55

I don’t see a good way to adjust defthing