
@sergej has joined the channel

@zenspider I’m also not a student. I think I’ll be doing the homework on the plane to SLC :slightly_smiling_face:

but I’ve started yesterday

I thought that going through the long tutorial https://plt.eecs.northwestern.edu/snapshots/current/doc/redex/redex2015.html would be useful. However the tests for the subtract
and subtract1
functions fail. I imagine because of changes to redex since 2015. Robby (or anyone) can you provide some guidance or pointers?

NEVER MIND. The problem was that the metafunction in
was not defined in the tutorial (I assumed it was built in). And the tests just fail - they say nothing about an undefined function. Once I added the in
definition, all is well.

that still seems like a bug (in the tutorial at least) to me

I had a lot of problems with one of the official tutorials as well

I agree: the tutorial should include the in
function (and it would be nice if undefined functions were flagged instead of tests just failing but not saying why).

BTW: this is CONSTRUCTIVE criticism - REDEX is great!

@haroldcarr I think the issue is that when you write (term (in …)) and in
is not bound as a metafunction, you get the literal in
.

This is definitely something that makes Redex more “convenient”, but also makes errors like this harder to detect.

There is also mf-apply
which you could use in your own models (and maybe I should add to the tutorial)

Understood.

I have a new problem: I am trying the SD
metafunction. The test crashes with:

../../../../../../../../Applications/Racket v6.9/share/pkgs/redex-lib/redex/private/reduction-semantics.rkt:1478:55: sd/a: no clauses matched for (sd/a x ())

Also: in
is defined?


Perhaps more code would be helpful.

Do you have a small example?

On in
- the tutorial only shows (require redex)
so wasn’t expecting to need common
.

It would be helpful if you could make these comments a little more precise.

On the SD
problem: I am using the SD
verbatim from: https://plt.eecs.northwestern.edu/snapshots/current/doc/redex/redex2015.html#%28part._.Developing_a_.Language_2%29

I don’t know code what you’re actually trying.

perhaps we should switch to email?

I’ll try to keep up here but sometimes conversations benefit from a moment of reflections so there’s less jumping to conclusions and less piling on. :disappointed:

ok

FWIW: I gave up on Amb for now because I needed more context. I gave up on Long Tutorial for now because of breakage. I think I am going to now try: https://github.com/racket/redex/tree/master/redex-examples/redex/examples