adambard / adambard/learnxinyminutes-docs

[Racket / rkt] Running the script fails

Open
#4,508 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Markdown
Stars
12.3k
Forks
3.7k
Avg merge
13h 10m
Merged PRs (30d)
6

Description

When running:

`racket learnracket.rkt`

with Racket v8.6 on Ubuntu (the current "latest" version), it stops with the following error:

```
learnracket.rkt:678:8: module: identifier already defined
at: out-port
in: (define-values (out-port) (open-output-file "/tmp/tmp.txt" #:exists (quote append)))
location...:
learnracket.rkt:678:8
```

Changing "out-port" to "out-port2" in lines 678 to 681 seems to fix the error but I am a total Racket beginner so I am not sure if that's indeed the correct fix.

Contributor guide

Open the contributing guide

Research direction

Run `racket learnracket.rkt` with Racket v8.6 on Ubuntu and inspect `learnracket.rkt` lines 678-681, where the `out-port` definition reports a duplicate identifier. The work is done when the script runs without this error and the output-file behavior remains correct.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.