laurent.orseau
2022-4-21 09:18:22

All tests pass on my machine. Could it be a different configuration of drdr?

These tests are about persistent scripts. Apparently all other tests pass, so it’s kind of surprising that these in particular don’t.


laurent.orseau
2022-4-21 09:29:09

When I run with raco test --drdr it also works fine btw


laurent.orseau
2022-4-21 13:01:49

Oh I see it’s racobc. Does this mean that the racocs tests all pass then?



laurent.orseau
2022-4-21 13:14:21

Ah. Then is there a standard procedure to be able to reproduce the failures on my machine? (I’m not running the very latest version, maybe I should start with that)


samth
2022-4-21 13:15:33

That would be the first thing I’d try


samth
2022-4-21 13:15:56

But in general there are a lot of reasons it might behave differently


samth
2022-4-21 13:18:05

Concurrency, different OS, different versions of other software, etc


hj93
2022-4-21 23:03:25

hello, how is match , in Racket, implemented? That is, how to implement pattern matching? I like how clean it is.


samdphillips
2022-4-21 23:06:58

This is a good intro to how it works: https://www.youtube.com/watch?v=IikGK8XP5_Q


hj93
2022-4-21 23:16:16

thanks



dan.ml.901
2022-4-21 23:51:40

Is it possible to match on a promise?


samdphillips
2022-4-22 00:19:05

Probably like: (match a-thing [(app force <match-the-content>) ...])


samdphillips
2022-4-22 00:19:58

If you wanted to be extra safe it would be: [(? promise? (app force ...)) ...]


samdphillips
2022-4-22 00:21:21

Oh, I guess force works on any value though so you probably don’t need that second one.


dan.ml.901
2022-4-22 00:37:51

So, like: [(? promise? <value>) …] ?


samdphillips
2022-4-22 00:39:16

No, the app one is what you want.


dan.ml.901
2022-4-22 00:40:31

Right, so this will match any a that is a raw value or a promise:


dan.ml.901
2022-4-22 00:40:33

(match a [(app force v) v])


samdphillips
2022-4-22 00:41:01

Yes


dan.ml.901
2022-4-22 00:42:06

but I’ll need the 2nd one if I need to differentiate between a promise and a raw value


soegaard2
2022-4-22 06:24:43

There is an example in Dybvig’s book on implementing pattern matching: https://www.scheme.com/tspl4/examples.html#./examples:h10