sergej
2017-7-3 15:19:38

@sergej has joined the channel


sergej
2017-7-3 15:21:52

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


sergej
2017-7-3 15:27:12

but I’ve started yesterday


haroldcarr
2017-7-3 21:54:26

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?


haroldcarr
2017-7-3 22:10:43

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.


zenspider
2017-7-3 22:22:30

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


zenspider
2017-7-3 22:22:46

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


haroldcarr
2017-7-3 22:23:45

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).


haroldcarr
2017-7-3 22:24:15

BTW: this is CONSTRUCTIVE criticism - REDEX is great!


robby
2017-7-3 22:58:01

@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.


robby
2017-7-3 22:58:26

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


robby
2017-7-3 22:58:57

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


haroldcarr
2017-7-3 22:59:47

Understood.


haroldcarr
2017-7-3 23:00:33

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


haroldcarr
2017-7-3 23:00:45

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


robby
2017-7-3 23:00:51

Also: in is defined?



robby
2017-7-3 23:01:06

Perhaps more code would be helpful.


robby
2017-7-3 23:01:14

Do you have a small example?


haroldcarr
2017-7-3 23:03:51

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


robby
2017-7-3 23:04:17

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


haroldcarr
2017-7-3 23:04:17

robby
2017-7-3 23:04:31

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


robby
2017-7-3 23:04:37

perhaps we should switch to email?


robby
2017-7-3 23:05:11

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:


haroldcarr
2017-7-3 23:05:25

ok


haroldcarr
2017-7-3 23:11:40

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