racket / racket/htdp

`port-writes-special?` ⊂"running under Dr Racket"

Open
#234 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

test engine
Dominant language
Racket
Stars
112
Forks
73
Avg merge
9h 41m
Merged PRs (30d)
1

Description

The assumption here seems to be that, is if the output port can write "specials", then we're running under Dr Racket:

https://github.com/racket/htdp/blob/aef9ae1c8e4c1e256edde5ab842d20d558202ee2/htdp-lib/htdp/bsl/runtime.rkt#L112-L136

However that's not necessarily true. Racket Mode presents an output port that accepts write-special. Therefore it ends up getting these number-markup structs. It had been surprised by these, ergo https://github.com/greghendershott/racket-mode/issues/732.

I merged an accommodation for that, today. But generally, it seems like port-writes-special? isn't a sufficient test for "port that knows how to handle number-markup structs, and will end up in a snip in the DrRacket GUI"? I don't know enough to propose a better test, but I wanted to ask.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading htdp-lib/htdp/bsl/runtime.rkt at lines 112-136 and reproducing the behavior with the output port described in the issue. Determine how DrRacket-compatible ports are distinguished from other ports that accept write-special; done means the runtime no longer sends number-markup values to incompatible consumers, with the behavior covered by a regression test if the repository has a relevant test entry point.

Written by the indexing model from the issue text.

Assessment

Domain
desktop
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.