# Questions & Answers

**URL:** https://racket.discourse.group/c/questions/6.md?page=14

[Latest](https://racket.discourse.group/latest.md) · [Categories](https://racket.discourse.group/categories.md) · [Tags](https://racket.discourse.group/tags.md)

**Page:** 15

---

## [Hexadecimal notation in scribble interaction](https://racket.discourse.group/t/hexadecimal-notation-in-scribble-interaction/2816)

<div class="topic-metadata">

**Author:** [@joskoot](https://racket.discourse.group/u/joskoot)\
**Replies:** 1\
**Last updated:** [March 21, 2024, 4:10pm UTC](https://racket.discourse.group/t/hexadecimal-notation-in-scribble-interaction/2816 "2024-03-21T16:10:53Z")

</div>

\#lang scribble/manual @(require scribble/eval) @interaction\[(+ #xA #xA)\] Renders Is there a simple way to retain the hexadecimal notation?

---

## [Dealing with functions which may return values of different types](https://racket.discourse.group/t/dealing-with-functions-which-may-return-values-of-different-types/2815)

<div class="topic-metadata">

**Author:** [@Tyrn](https://racket.discourse.group/u/Tyrn)\
**Replies:** 5\
**Last updated:** [March 21, 2024, 10:58am UTC](https://racket.discourse.group/t/dealing-with-functions-which-may-return-values-of-different-types/2815 "2024-03-21T10:58:31Z")

</div>

Hi, I mean such functions like regexp-match. Here's a fragment of my code: ... (let (\[o-neal (regexp-match #px".\*?'(\[^'\]{1})" str)\]) (if (not (equal? o-neal #f)) (list-ref o-neal 0) ... It works, but I'd…

---

## [Typed Racket guidelines](https://racket.discourse.group/t/typed-racket-guidelines/2805)

<div class="topic-metadata">

**Author:** [@Tyrn](https://racket.discourse.group/u/Tyrn)\
**Replies:** 9\
**Last updated:** [March 20, 2024, 8:34pm UTC](https://racket.discourse.group/t/typed-racket-guidelines/2805 "2024-03-20T20:34:09Z")

</div>

Hi, Frankly, the question should be "Typed Racket: is it safe to use?". I sensibly asked the similar question about the Lazy Racket, and the unanimous answer was "forget it". Well, not exactly, but unless the general la…

---

## [How can I programmatically expand the "let" family of functions?](https://racket.discourse.group/t/how-can-i-programmatically-expand-the-let-family-of-functions/2811)

<div class="topic-metadata">

**Author:** [@JShoes1415](https://racket.discourse.group/u/JShoes1415)\
**Replies:** 11\
**Last updated:** [March 20, 2024, 6:29pm UTC](https://racket.discourse.group/t/how-can-i-programmatically-expand-the-let-family-of-functions/2811 "2024-03-20T18:29:21Z")

</div>

Hello! I am using Racket in a course at my university and I've found it quite enjoyable. I am working on an assignment where the use of let and let\* is limited so as to encourage good functional style. While I understan…

---

## [How to import a srfi in r6rs](https://racket.discourse.group/t/how-to-import-a-srfi-in-r6rs/2813)

<div class="topic-metadata">

**Author:** [@damien\_mattei](https://racket.discourse.group/u/damien_mattei)\
**Replies:** 2\
**Last updated:** [March 20, 2024, 3:03pm UTC](https://racket.discourse.group/t/how-to-import-a-srfi-in-r6rs/2813 "2024-03-20T15:03:27Z")

</div>

hello, i try to import the SRFI 43 in a module and i want to do it the way r6rs allow it, i tried: #!r6rs (import (srfi (43)) (rnrs lists (6)) (rnrs base (6)) (rnrs io simple (6))) (display (find even? '(3 1 4 1 5…

---

## [Nested split-map-join, preferred style](https://racket.discourse.group/t/nested-split-map-join-preferred-style/2809)

<div class="topic-metadata">

**Author:** [@Tyrn](https://racket.discourse.group/u/Tyrn)\
**Replies:** 5\
**Last updated:** [March 20, 2024, 6:10am UTC](https://racket.discourse.group/t/nested-split-map-join-preferred-style/2809 "2024-03-20T06:10:05Z")

</div>

Hi, This is a small and clean example: a function to make a string of initials out of a string of \[co\]authors. Coauthors consist of a sequence of authors separated by comma Authors consist of a sequence of barrels (do…

---

## [Robocode Style Competitive Educational Game in Racket](https://racket.discourse.group/t/robocode-style-competitive-educational-game-in-racket/2808)

<div class="topic-metadata">

**Author:** [@markshead](https://racket.discourse.group/u/markshead)\
**Replies:** 4\
**Last updated:** [March 19, 2024, 10:30pm UTC](https://racket.discourse.group/t/robocode-style-competitive-educational-game-in-racket/2808 "2024-03-19T22:30:15Z")

</div>

Has anyone run across anything like https://robocode.sourceforge.io/ but in Racket?

---

## [Cannot modify a constant](https://racket.discourse.group/t/cannot-modify-a-constant/2802)

<div class="topic-metadata">

**Author:** [@damien\_mattei](https://racket.discourse.group/u/damien_mattei)\
**Replies:** 2\
**Last updated:** [March 17, 2024, 11:24pm UTC](https://racket.discourse.group/t/cannot-modify-a-constant/2802 "2024-03-17T23:24:10Z")

</div>

hello, i find a little bug in one of my code. It is not easy to debug because it use a personal reader/parser,and a modified REPL for Racket . (based on this very interesting book: https://beautifulracket.com/) i have…

---

## [Idiomatic way of handling lists and/or tuples](https://racket.discourse.group/t/idiomatic-way-of-handling-lists-and-or-tuples/2800)

<div class="topic-metadata">

**Author:** [@Tyrn](https://racket.discourse.group/u/Tyrn)\
**Replies:** 6\
**Last updated:** [March 17, 2024, 6:42pm UTC](https://racket.discourse.group/t/idiomatic-way-of-handling-lists-and-or-tuples/2800 "2024-03-17T18:42:09Z")

</div>

Hi, Here's my unit test, or the first attempt at it: #lang racket/base (require rackunit "smallin.rkt") (define initials-block (list '("ron reagan-smith" "R.R-S.") '("Nell Guinn" "N.G.") '("ben lazar" "BL.…

---

## [Printf string representation as a list element](https://racket.discourse.group/t/printf-string-representation-as-a-list-element/2801)

<div class="topic-metadata">

**Author:** [@Tyrn](https://racket.discourse.group/u/Tyrn)\
**Replies:** 1\
**Last updated:** [March 17, 2024, 6:16pm UTC](https://racket.discourse.group/t/printf-string-representation-as-a-list-element/2801 "2024-03-17T18:16:11Z")

</div>

Hi, I can see this in REPL: "in-test.rkt"\> (define lst (list "alfa" 42)) "in-test.rkt"\> lst '("alfa" 42) "in-test.rkt"\> (printf "~a\\n" lst) (alfa 42) I should much prefer it being quoted in the last line. Is there a w…

---

## [Lazy Racket guidelines](https://racket.discourse.group/t/lazy-racket-guidelines/2792)

<div class="topic-metadata">

**Author:** [@Tyrn](https://racket.discourse.group/u/Tyrn)\
**Replies:** 3\
**Last updated:** [March 17, 2024, 4:07pm UTC](https://racket.discourse.group/t/lazy-racket-guidelines/2792 "2024-03-17T16:07:03Z")

</div>

Hi, I've seen just the docs, not much else on the Web. It says that I can use #lang lazy on per module basis. Does it mean that I can conveniently put all the laziness I need in my app in a separate file and get away wi…

---

## [DrRacket indentation issue](https://racket.discourse.group/t/drracket-indentation-issue/2777)

<div class="topic-metadata">

**Author:** [@matteo-daddio](https://racket.discourse.group/u/matteo-daddio)\
**Replies:** 5\
**Last updated:** [March 17, 2024, 3:45pm UTC](https://racket.discourse.group/t/drracket-indentation-issue/2777 "2024-03-17T15:45:10Z")

</div>

Hello, I've created an alias for lambda: (define-syntax procedure (syntax-rules () \[(procedure (arg ...) expr1 expr ...) (lambda (arg ...) expr1 expr ...)\])) but, when I use it, the indentation changes: (l…

---

## [Walking a file tree as a study in recursive generators](https://racket.discourse.group/t/walking-a-file-tree-as-a-study-in-recursive-generators/2787)

<div class="topic-metadata">

**Author:** [@Tyrn](https://racket.discourse.group/u/Tyrn)\
**Replies:** 14\
**Last updated:** [March 17, 2024, 10:38am UTC](https://racket.discourse.group/t/walking-a-file-tree-as-a-study-in-recursive-generators/2787 "2024-03-17T10:38:16Z")

</div>

Hi, I want to learn a Racket way of writing recursive generators. Speaking of the programming languages in general, it's either yield or flatMap approach, depending on the language. Walking the file tree, MWE, Python: …

---

## [: \`read' access denied for](https://racket.discourse.group/t/read-access-denied-for/1834)

<div class="topic-metadata">

**Author:** [@bsassoli](https://racket.discourse.group/u/bsassoli)\
**Replies:** 15\
**Last updated:** [March 16, 2024, 10:04pm UTC](https://racket.discourse.group/t/read-access-denied-for/1834 "2024-03-16T22:04:42Z")

</div>

Hi! Newish to Racket and I hope this is appropriate. I am going thought the material in Berkeley's CS61A and I am running into the following error when I run their autograder locally as in racket -tm grader.rkt -- hw1-…

---

## [Examples of 2htdp/universe programs with a server](https://racket.discourse.group/t/examples-of-2htdp-universe-programs-with-a-server/2794)

<div class="topic-metadata">

**Author:** [@maueroats](https://racket.discourse.group/u/maueroats)\
**Replies:** 1\
**Last updated:** [March 16, 2024, 1:16pm UTC](https://racket.discourse.group/t/examples-of-2htdp-universe-programs-with-a-server/2794 "2024-03-16T13:16:31Z")

</div>

The Universe teachpack comes with a server and a way for big-bang clients to communicate with the server. I know that Marco Morazan's book includes material teaching how to use this system. I am also aware that the off…

---

## [Is there a way to outline certain pen strokes used when drawing a \`pict\`?](https://racket.discourse.group/t/is-there-a-way-to-outline-certain-pen-strokes-used-when-drawing-a-pict/2761)

<div class="topic-metadata">

**Author:** [@benknoble](https://racket.discourse.group/u/benknoble)\
**Replies:** 4\
**Last updated:** [March 15, 2024, 2:38pm UTC](https://racket.discourse.group/t/is-there-a-way-to-outline-certain-pen-strokes-used-when-drawing-a-pict/2761 "2024-03-15T14:38:37Z")

</div>

I have some picts that I'm hoping to make useful on both light and dark backgrounds. One way I envisioned to do so was to outline black pen strokes with white strokes, so that on either kind of background one of the stro…

---

## [Enumerated stream](https://racket.discourse.group/t/enumerated-stream/2790)

<div class="topic-metadata">

**Author:** [@Tyrn](https://racket.discourse.group/u/Tyrn)\
**Replies:** 4\
**Last updated:** [March 14, 2024, 11:38pm UTC](https://racket.discourse.group/t/enumerated-stream/2790 "2024-03-14T23:38:31Z")

</div>

Hi, Suppose I have something like this: (define reds (stream-cons "red" reds)) (stream-for-each displayln reds)) The output will be red red red ... What's the Racket way to make it 1 red 2 red 3 red ... ?

---

## [Issues running a net/rfc6455 web-socket server on Windows](https://racket.discourse.group/t/issues-running-a-net-rfc6455-web-socket-server-on-windows/2729)

<div class="topic-metadata">

**Author:** [@tnelson](https://racket.discourse.group/u/tnelson)\
**Replies:** 5\
**Last updated:** [March 12, 2024, 5:54pm UTC](https://racket.discourse.group/t/issues-running-a-net-rfc6455-web-socket-server-on-windows/2729 "2024-03-12T17:54:05Z")

</div>

Hi, I'm having trouble getting a web-socket server (via Racket's net/rfc6455 package) to work properly in Windows. Concretely, if I run the server in DrRacket or via WSL or git bash, everything works fine. However, if I…

---

## [\`raco exe ++lang\`?](https://racket.discourse.group/t/raco-exe-lang/2780)

<div class="topic-metadata">

**Author:** [@Antigen-11](https://racket.discourse.group/u/Antigen-11)\
**Replies:** 0\
**Last updated:** [March 12, 2024, 2:31am UTC](https://racket.discourse.group/t/raco-exe-lang/2780 "2024-03-12T02:31:58Z")

</div>

Suppose I have a program which dynamic-requires source files using a #lang language whose reader does not implement a get-info function that supports the 'module-language key. For instance, #lang racket (require racket…

---

## [How can I insert an image file into a Scribble document?](https://racket.discourse.group/t/how-can-i-insert-an-image-file-into-a-scribble-document/2779)

<div class="topic-metadata">

**Author:** [@spdegabrielle](https://racket.discourse.group/u/spdegabrielle)\
**Replies:** 0\
**Last updated:** [March 11, 2024, 2:53pm UTC](https://racket.discourse.group/t/how-can-i-insert-an-image-file-into-a-scribble-document/2779 "2024-03-11T14:53:50Z")

</div>

Someone recently asked how can I insert a png image file into a Scribble document? The scribble manual gives a nice example of using a pict you create yourself: @; ---------------------------------------- @section\[#…

---

## [Is there a set(e)uid function, or equivalent?](https://racket.discourse.group/t/is-there-a-set-e-uid-function-or-equivalent/2766)

<div class="topic-metadata">

**Author:** [@nxg](https://racket.discourse.group/u/nxg)\
**Replies:** 7\
**Last updated:** [March 9, 2024, 11:08am UTC](https://racket.discourse.group/t/is-there-a-set-e-uid-function-or-equivalent/2766 "2024-03-09T11:08:01Z")

</div>

Is there a way of changing (unix) user? I can see getpid in the racket/os package, and if a setuid-a-like function exists, I'd expect to find it nearby, but I can't find it there or under any other search string I can t…

---

## [Bug in flomat / block-diagonal?](https://racket.discourse.group/t/bug-in-flomat-block-diagonal/2767)

<div class="topic-metadata">

**Author:** [@timjervis](https://racket.discourse.group/u/timjervis)\
**Replies:** 4\
**Last updated:** [March 7, 2024, 11:55pm UTC](https://racket.discourse.group/t/bug-in-flomat-block-diagonal/2767 "2024-03-07T23:55:29Z")

</div>

Hi everyone, When I use flomat's block-diagonal function, I'm getting random instances of NaN in the result: #lang racket (require flomat) (define m (block-diagonal (eye 100) (eye 100))) (for\* (\[r (in-range (nrows…

---

## [Displaying the Editor of a Snip in Another Editor Canvas](https://racket.discourse.group/t/displaying-the-editor-of-a-snip-in-another-editor-canvas/2764)

<div class="topic-metadata">

**Author:** [@bakgatviooldoos](https://racket.discourse.group/u/bakgatviooldoos)\
**Replies:** 0\
**Last updated:** [March 5, 2024, 4:56pm UTC](https://racket.discourse.group/t/displaying-the-editor-of-a-snip-in-another-editor-canvas/2764 "2024-03-05T16:56:03Z")

</div>

Hi, Racket Discourse. I am busy playing around with editor-snips and I want to understand the interaction between editors, snips and displays. The particular case I am trying to understand, is getting the editor of an …

---

## [Terminal gets ruined after using charterm](https://racket.discourse.group/t/terminal-gets-ruined-after-using-charterm/2760)

<div class="topic-metadata">

**Author:** [@mskoh52](https://racket.discourse.group/u/mskoh52)\
**Replies:** 3\
**Last updated:** [March 3, 2024, 9:08pm UTC](https://racket.discourse.group/t/terminal-gets-ruined-after-using-charterm/2760 "2024-03-03T21:08:12Z")

</div>

I'm trying to use charterm to build a roguelike. I'm using iTerm2 with zsh on a mac. After exiting my racket program, terminal outputs every new line indented starting at the end of the previous line, like this: $ ls -1…

---

## [Evaluating file at runtime in Racket](https://racket.discourse.group/t/evaluating-file-at-runtime-in-racket/2718)

<div class="topic-metadata">

**Author:** [@xiaoyu2006](https://racket.discourse.group/u/xiaoyu2006)\
**Replies:** 2\
**Last updated:** [March 3, 2024, 1:19pm UTC](https://racket.discourse.group/t/evaluating-file-at-runtime-in-racket/2718 "2024-03-03T13:19:03Z")

</div>

This is originally a Stack Overflow post however issue A in the comment of the answer still persists. Thanks for any help in advance! =====Copy & Paste of the Stack Overflow Question===== I am making an application usi…

---

## [Quick Question: Fixing Bugs](https://racket.discourse.group/t/quick-question-fixing-bugs/2756)

<div class="topic-metadata">

**Author:** [@bakgatviooldoos](https://racket.discourse.group/u/bakgatviooldoos)\
**Replies:** 5\
**Last updated:** [March 2, 2024, 2:12pm UTC](https://racket.discourse.group/t/quick-question-fixing-bugs/2756 "2024-03-02T14:12:08Z")

</div>

Hi, Racket Discourse. I found a bug in the code for the append-editor-font-menu-items procedure from racket/gui. The functionality for making fonts smaller by one size is missing a negative sign. Compare the increment, …

---

## [Only-in in a require statement](https://racket.discourse.group/t/only-in-in-a-require-statement/2751)

<div class="topic-metadata">

**Author:** [@matteo-daddio](https://racket.discourse.group/u/matteo-daddio)\
**Replies:** 1\
**Last updated:** [February 29, 2024, 7:56pm UTC](https://racket.discourse.group/t/only-in-in-a-require-statement/2751 "2024-02-29T19:56:17Z")

</div>

Hello, using only-in in a require statement can improve the memory footprint? It’s a good practice? Matteo

---

## [Compatibility of typed/racket and SRFI-42](https://racket.discourse.group/t/compatibility-of-typed-racket-and-srfi-42/2741)

<div class="topic-metadata">

**Author:** [@damien\_mattei](https://racket.discourse.group/u/damien_mattei)\
**Replies:** 31\
**Last updated:** [February 29, 2024, 1:55pm UTC](https://racket.discourse.group/t/compatibility-of-typed-racket-and-srfi-42/2741 "2024-02-29T13:55:04Z")

</div>

hello, both typed/racket and SRFI-42 "Eager comprehension" use the symbol : . This cause a simple program to fails, example: is there a way to use SRFI 42 with typed Racket ? Regards, Damien

---

## [Unit test delayed forever](https://racket.discourse.group/t/unit-test-delayed-forever/2752)

<div class="topic-metadata">

**Author:** [@hendrikboom3](https://racket.discourse.group/u/hendrikboom3)\
**Replies:** 2\
**Last updated:** [February 28, 2024, 11:08pm UTC](https://racket.discourse.group/t/unit-test-delayed-forever/2752 "2024-02-28T23:08:19Z")

</div>

I have a program that, when run, builds some data structures, prints some diagnostic output, and then wait for an incoming http request on post 8080. I decided to try to use the Racket test facility to do the diagnostic…

---

## [Simple Login / Logout examples using web-server](https://racket.discourse.group/t/simple-login-logout-examples-using-web-server/2721)

<div class="topic-metadata">

**Author:** [@markshead](https://racket.discourse.group/u/markshead)\
**Replies:** 1\
**Last updated:** [February 27, 2024, 12:33pm UTC](https://racket.discourse.group/t/simple-login-logout-examples-using-web-server/2721 "2024-02-27T12:33:13Z")

</div>

I've been looking for simple examples of login and logout that user Racket's web-server. I've looked at Racket Stories and Koto. Are there any other simple examples I should look at? It doesn't have to be production leve…

[Previous page](https://racket.discourse.group/c/questions/6.md?page=13)

[Next page](https://racket.discourse.group/c/questions/6.md?page=15)
