Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test results don't appear in stepper in #lang htdp/bsl #154

Closed
jbclements opened this issue Jul 16, 2021 · 14 comments
Closed

test results don't appear in stepper in #lang htdp/bsl #154

jbclements opened this issue Jul 16, 2021 · 14 comments
Labels
stepper test engine topics related to the test engine

Comments

@jbclements
Copy link
Contributor

In the #lang-based teaching languages, test results don't appear in a box; instead, they get sent to stdout. This is pretty terrible, but it's not a regression; it was present in 8.1 as well.

How to reproduce:

  1. start drracket from the command-line
  2. enter this program:
#lang htdp/bsl

(check-expect (+ 3 4) 9)
  1. Click the "step" button, see no dialog. Check command line, see output.
@samth
Copy link
Member

samth commented Jul 16, 2021

Is this a regression from 8.0? We would expect that to be the version previously used by teachers, I would guess.

@rfindler
Copy link
Member

rfindler commented Jul 16, 2021 via email

@jbclements
Copy link
Contributor Author

jbclements commented Jul 16, 2021 via email

@mfelleisen
Copy link
Contributor

mfelleisen commented Jul 16, 2021 via email

@mikesperber
Copy link
Member

To fix this problem, I need to set the output port to the REPL's value port.

Unfortunately, there doesn't seem to be a REPL. Is there any way to make one? (@rfindler, @jbclements)

(This would also fix the minor issue that display & friends print to stdout from the stepper.)

@rfindler
Copy link
Member

rfindler commented Jul 16, 2021 via email

@jbclements
Copy link
Contributor Author

Taking a step (ha ha) back: "display and friends" don't appear to me to be defined in any of the htdp teaching languages, which is why there's currently no mechanism for the stepper to collect stdout. Mike, is that not the case in your teaching languages?

Yes, this is definitely something that can be done, and is part of moving the stepper forward towards htdp/asl (shimmering like a mirage in the infinite distance, alas). I don't think it's conceptually hard, but it definitely involves changing some pretty fundamental structures: specifically, a "step" will have to include the current contents of stdout.

@mikesperber
Copy link
Member

Well, I can (require racket).

@jbclements I'm aiming for a lower-hanging fruit: Just instantiate a regular REPL that is connected to the regular DrRacket interactions pane, and have the output go there, as it would outside the stepper. Is that more easily doable?

@jbclements
Copy link
Contributor Author

Frankly, I have no idea: in my mind, the actual DrRacket Defs & Interactions window are something I know nothing about, and the stepper's only interaction is to fetch the text from the interactions window. I worry that trying to interact with the interactions window could create all kinds of weird new problems; race conditions etc. No?

@rfindler
Copy link
Member

rfindler commented Jul 17, 2021 via email

@mikesperber
Copy link
Member

I agree with John on this point. The stepper should just run the program and capture its output (on each step). Robby

Do you have an idea where it would be displayed?

@rfindler
Copy link
Member

rfindler commented Jul 24, 2021 via email

@shhyou shhyou added the test engine topics related to the test engine label Oct 19, 2024
@shhyou
Copy link
Collaborator

shhyou commented Oct 19, 2024

@jbclements Is it correct that #223 is a duplicate of this and #224 fixed this issue?

@jbclements
Copy link
Contributor Author

Agreed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stepper test engine topics related to the test engine
Projects
None yet
Development

No branches or pull requests

6 participants