pocmatos
2018-8-16 15:04:14

I am seeing an interesting behaviour in one of my raco test machines. This is specific to Windows. When I run raco test -x -p s10 I get a failure on windows: bv.rkt: raco test: non-zero exit: -1073741819 The interesting thing is that this does not happen on Linux, and it doesn’t happen on Windows either if I run raco test s10\bv.rkt. Any ideas of what the problem could be? (this is racket 6.12)


soegaard2
2018-8-16 18:39:26

It sounds like a “guard” as in syntax-case.


lexi.lambda
2018-8-16 18:41:37

It isn’t a guard, it’s more like an escape continuation.


lexi.lambda
2018-8-16 18:41:55

Guards are written as #:when condition in match.


lexi.lambda
2018-8-16 18:43:14

It’s useful when a later pattern might match, so an earlier, more specific pattern can bail out back to the pattern matcher and request it to continue as if the earlier pattern hadn’t actually matched. (I’ll write an example.)


lexi.lambda
2018-8-16 18:45:01
> (match '(1 2 3)
    [(list a b c)
     (=> continue)
     (when (= b 2)
       (continue))
     'one]
    [(list a b c)
     'two])
'two

lexi.lambda
2018-8-16 18:45:51

It’s usually not necessary, since you can normally get away with just using #:when, I think. But it might be useful if you need to bail out deep inside some nested computation on the RHS.


lexi.lambda
2018-8-16 19:44:56

Sure! Though there might be a better example than that.


samth
2018-8-16 20:11:19

@mbutterick @lexi.lambda it might be helpful to give an example that can’t be expressed as #:when


samth
2018-8-16 20:11:35

the => form uses continuations so it can bail out of anything


lexi.lambda
2018-8-16 20:26:44

Right. I saw some uses in TR that use it to write match-in-match, where failing from the inner match bails back to the outer match.


dthien
2018-8-17 05:01:26

Hello, I’m working on getting a package listed in the official racket package index. I believe I have everything set up correctly, but I can’t get the documentation link to show up on the website. The package is uploaded at https://pkgd.racket-lang.org/pkgn/package/softposit-rkt


dthien
2018-8-17 05:01:59

Any guidance on where I should look to update this?


notjack
2018-8-17 05:05:32

@dthien the docs are rendered by the package server when there’s a full build of all packages, which happens every night I think. Tomorrow you should see the docs online assuming everything about your package is setup correctly


dthien
2018-8-17 05:07:22

Cool, thanks for the info!


notjack
2018-8-17 05:08:28

happy to help! You’ll also have all your package’s tests run automatically too, btw


dthien
2018-8-17 05:29:59

Another question, my package relies on git submodules which don’t seem to work when building through the package manager. Is there a way to force the package manager to also download the submodules?


dthien
2018-8-17 05:57:11

Amendment to my previous question, git in general doesn’t seem to work with raco pkg install. In particular, there is no .git folder downloaded when you try to install a package.


dthien
2018-8-17 06:34:25

Found a workaround with git subtree, but using submodules would still be ideal