tfb
2017-8-18 10:51:45

I have a Typed Racket question, if anyone could help I’d appreciate it. I’d like to have a pattern matcher with exhaustion checking, like in ML, so I can be confident that I’m not omitting any cases. Does anyone know of such a pattern-matching macro?


tfb
2017-8-18 10:53:07

If not, would anyone have pointers for how to get to the type information I’d need, from a macro, so I could make a go at writing something to scratch my own itch?


leif
2017-8-18 13:17:36

@notjack Fair. It just seems to me that having a separate test-dep list and doc-dep would make sense.


leif
2017-8-18 13:18:22

Because I could be installing in a context where I don’t care about installing the tests. And right now (as far as I can tell), the only way to do that is to make multiple packages.


leif
2017-8-18 13:18:47

The whole foo foo-lib foo-doc foo-test foo-extra thing.


leif
2017-8-18 13:19:13

(Which I guess makes sense for some dependency resolution, but still feels clunky to me in this simple case.)


abmclin
2017-8-18 13:28:37

Thank you for the technical terms I can now look up!


pnwamk
2017-8-18 14:19:34

@tfb match is the most commonly used pattern matcher in Racket — unfortunately Typed Racket cannot reason about its coverage, since it can expand into quite complex core forms. there was recently a discussion (https://github.com/racket/typed-racket/issues/594) about getting some straightforward coverage checking working. if you’re interested in tinkering with your own approach solution, I threw together something along that line a while ago (https://github.com/pnwamk/datatype), but it’s definitely not a polished, drop in solution (i.e. it works but is limited and does not work with arbitrary types, you have to define them similar to defining an algebraic datatype in a standard statically typed functional language)


pnwamk
2017-8-18 14:26:01

there may be some other approaches people have put together as well, I’m just not familiar with what they are off the top of my head


leif
2017-8-18 15:01:08

@florence @stamourv @robby Have you had font issues with your submission?


leif
2017-8-18 15:01:19

I seem to have tracked it down to \renewcommand{\rmdefault}{ptm}


leif
2017-8-18 15:01:29

Which really messes up the lower case g.


robby
2017-8-18 15:02:47

That command chooses a font


robby
2017-8-18 15:02:59

Like the whole font, I believe


leif
2017-8-18 15:04:08

Yup. But scribble/acmart seems to put it in there.


leif
2017-8-18 15:04:21

At least as far as I can (currently) tell


leif
2017-8-18 15:04:31

Would it makes sense to remove that?


robby
2017-8-18 16:39:52

@leif scribble/acmart should not generate Tex code like that I agree. That should be in the cls file.


robby
2017-8-18 16:40:45

But I am confused. If that had any effect it should have set the font to the standard latex roman font. And I don’t see that in our paper


robby
2017-8-18 16:45:10

Maybe it just messed up the state in some more subtle way?


notjack
2017-8-18 17:06:57

I think binary installs from the build server let you skip installing build deps


leif
2017-8-18 17:24:43

That….is a very good point. :confused:


leif
2017-8-18 17:25:56

Like, it certainly does look different than the standard computer modern font. But there are also similarities to times. SO I honestly have no idea.


leif
2017-8-18 17:26:28

Sure, that makes sense.


leif
2017-8-18 17:26:48

But I can still see a case where I want to build the docs, but I don’t want to run the tests.


robby
2017-8-18 17:26:50

Removal of that line seems wise


leif
2017-8-18 17:26:58

Or I want to run the tests, but don’t care about building the docs.


leif
2017-8-18 17:27:52

Ya, that’s the only way I was able to get rid of it. Unfortunately the line is in the main scribble.tex style file. So its not just as simple as removing it from acmart. :disappointed:


notjack
2017-8-18 17:39:02

You can get the pre-built docs without tests currently (—binary vs —binary-lib) but yeah, there’s no way to get runnable tests without building docs


notjack
2017-8-18 17:39:27

Maybe a different kind of installation that was like --binary but included compiled test modules?


notjack
2017-8-18 17:39:45

building docs without running tests could just be running raco setup right?


leif
2017-8-18 18:14:23

‘You can get the pre-built docs without tests’ Yes, but say I don’t want the pre-built docs, I want to build them myself.


leif
2017-8-18 18:15:22

Say I’m making my own language that has its own theme for docs. And I’m using that library. I want to provide the docs for the library in the new format, which means getting the source, but I don’t care about building the tests.


leif
2017-8-18 18:15:25

If that makes any sense anyway.


leif
2017-8-18 18:16:05

Oh ya, building docs without building tests is easy, same as building tests without docs.


leif
2017-8-18 18:16:13

The problem is just with dependency resolution.


leif
2017-8-18 18:16:16

As the two are tied together.


notjack
2017-8-18 18:51:50

How does making scribble docs with custom themes work anyway?


leif
2017-8-18 20:05:18

Uhh…depends on what you want to change.


leif
2017-8-18 20:05:28

The easiest thing is to just change the css file.


leif
2017-8-18 20:05:37

(Which honestly wouldn’t really require getting the source.)


leif
2017-8-18 20:05:59

The other way is to take the doc structure scribble files provide, and munge it the way you want.


leif
2017-8-18 20:06:07

IIRC, frog does the former.


notjack
2017-8-18 20:11:09

What about if you want only docs for certain packages to look different? Like say we wanted all docs for Typed Racket packages (including libraries people wrote providing things for TR) to have a different visual theme of some sort


notjack
2017-8-18 20:11:09

reply_broadcast messages not yet supported


leif
2017-8-18 21:09:16

That’s easy if you have the source. Just change the style the doc uses.


leif
2017-8-18 21:09:25

(AKA, point the doc to its own css file.)


notjack
2017-8-18 21:10:29

ah so you’re referring to changing all docs globally for some set of packages to use a new style as a consumer of those packages, not an author of them? like how the http://docs.racket-lang.org\|docs.racket-lang.org sets the logo for all docs?


notjack
2017-8-18 21:10:43

I didn’t catch that, my bad