# Questions & Answers

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

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

**Page:** 5

---

## [On macOS how to exit the racket executable](https://racket.discourse.group/t/on-macos-how-to-exit-the-racket-executable/3936)

<div class="topic-metadata">

**Author:** [@racket.raider](https://racket.discourse.group/u/racket.raider)\
**Replies:** 1\
**Last updated:** [September 7, 2025, 7:32pm UTC](https://racket.discourse.group/t/on-macos-how-to-exit-the-racket-executable/3936 "2025-09-07T19:32:41Z")

</div>

On macOS using Emacs, how do I exit the racket executable launched by empty-scene without killing the REPL or force quitting the executable and cause the {racket-back-end-/} exited abnormally with code 1. Closing the win…

---

## [Bug in pict3d leads to crash in DrRacket](https://racket.discourse.group/t/bug-in-pict3d-leads-to-crash-in-drracket/3897)

<div class="topic-metadata">

**Author:** [@GunpowderGuy](https://racket.discourse.group/u/GunpowderGuy)\
**Replies:** 15\
**Last updated:** [September 6, 2025, 10:06pm UTC](https://racket.discourse.group/t/bug-in-pict3d-leads-to-crash-in-drracket/3897 "2025-09-06T22:06:24Z")

</div>

There has been a bug with pict3d for some time now. Already posted the problem a couple of times on the racket discord. Hopefully someone here can fix it

---

## [Style question: alternatives to threading?](https://racket.discourse.group/t/style-question-alternatives-to-threading/3929)

<div class="topic-metadata">

**Author:** [@jamesgeddes](https://racket.discourse.group/u/jamesgeddes)\
**Replies:** 4\
**Last updated:** [September 6, 2025, 7:54am UTC](https://racket.discourse.group/t/style-question-alternatives-to-threading/3929 "2025-09-06T07:54:31Z")

</div>

Sometimes I have an expression like (f (g (h x))), except that the f, g, and h represent operations that are a little too short to bother giving names to (or even introducing lambdas) but a little too long to mash togeth…

---

## [Char\*\* and ffi - returning allocated string](https://racket.discourse.group/t/char-and-ffi-returning-allocated-string/3928)

<div class="topic-metadata">

**Author:** [@hnmdijkema](https://racket.discourse.group/u/hnmdijkema)\
**Replies:** 7\
**Last updated:** [September 3, 2025, 1:42pm UTC](https://racket.discourse.group/t/char-and-ffi-returning-allocated-string/3928 "2025-09-03T13:42:36Z")

</div>

Hello, I’ve got to integratie a c function that allocaties a string and writes the adres of the allocates memory to the variable, eg inC Void f(char \*\*s) Char \*v; f(&v); V contains the allocated string I can t seem…

---

## [Syntax Classes and Module Boundaries](https://racket.discourse.group/t/syntax-classes-and-module-boundaries/3574)

<div class="topic-metadata">

**Author:** [@bakgatviooldoos](https://racket.discourse.group/u/bakgatviooldoos)\
**Replies:** 4\
**Last updated:** [August 29, 2025, 4:12pm UTC](https://racket.discourse.group/t/syntax-classes-and-module-boundaries/3574 "2025-08-29T16:12:09Z")

</div>

Hi, Racket Discourse. I am trying to split up some syntax-classes across different modules, to allow for more easily composable bits and bobs. The syntax-classes create temporary identifiers which are used as aliases f…

---

## [The doc make the packages fail to build](https://racket.discourse.group/t/the-doc-make-the-packages-fail-to-build/3925)

<div class="topic-metadata">

**Author:** [@damien\_mattei](https://racket.discourse.group/u/damien_mattei)\
**Replies:** 5\
**Last updated:** [August 28, 2025, 9:35am UTC](https://racket.discourse.group/t/the-doc-make-the-packages-fail-to-build/3925 "2025-08-28T09:35:25Z")

</div>

Hello, this is not real errors but now i set : @defmodule\[SRFI-105 #:reader\]{ This reader package provides the SRFI-105 Curly Infix reader/parser. } @defmodule\[Scheme+\]{ This package provides the Scheme+ language de…

---

## [Documentation with scribble for infix syntax](https://racket.discourse.group/t/documentation-with-scribble-for-infix-syntax/3924)

<div class="topic-metadata">

**Author:** [@damien\_mattei](https://racket.discourse.group/u/damien_mattei)\
**Replies:** 4\
**Last updated:** [August 26, 2025, 9:17pm UTC](https://racket.discourse.group/t/documentation-with-scribble-for-infix-syntax/3924 "2025-08-26T21:17:15Z")

</div>

Hi, scribble seems to be done only for prefix notation, if i do that: @defform\[{name \<- value}\]{ Assign to the variable @racket\[name\] the value @racket\[value\]. } scribble will assume name to be the macro name instead …

---

## [Date-\>seconds and time-zone-offsets](https://racket.discourse.group/t/date-seconds-and-time-zone-offsets/3923)

<div class="topic-metadata">

**Author:** [@hnmdijkema](https://racket.discourse.group/u/hnmdijkema)\
**Replies:** 5\
**Last updated:** [August 26, 2025, 5:42pm UTC](https://racket.discourse.group/t/date-seconds-and-time-zone-offsets/3923 "2025-08-26T17:42:48Z")

</div>

I hope someone can clarify this. I'm experimenting with racket dates and timezone info. I did following: Welcome to DrRacket, version 8.18 \[cs\]. Language: racket/base \[custom\]. \> (define s (current-seconds)) \> (define …

---

## [Should changing a style% update derived style%'s?](https://racket.discourse.group/t/should-changing-a-style-update-derived-style-s/3904)

<div class="topic-metadata">

**Author:** [@jjsimpso](https://racket.discourse.group/u/jjsimpso)\
**Replies:** 3\
**Last updated:** [August 20, 2025, 8:45pm UTC](https://racket.discourse.group/t/should-changing-a-style-update-derived-style-s/3904 "2025-08-20T20:45:01Z")

</div>

I have some code to increase the font size in my application: (define (change-canvas-font-size canvas amount) (define standard (send (send canvas get-style-list) find-named-style "Standard")) (when standard …

---

## [Racket threads and callbacks to another thread](https://racket.discourse.group/t/racket-threads-and-callbacks-to-another-thread/3905)

<div class="topic-metadata">

**Author:** [@hnmdijkema](https://racket.discourse.group/u/hnmdijkema)\
**Replies:** 8\
**Last updated:** [August 19, 2025, 12:22pm UTC](https://racket.discourse.group/t/racket-threads-and-callbacks-to-another-thread/3905 "2025-08-19T12:22:20Z")

</div>

I'm wondering how the Gui of racket works. There must be some thread that processes events from the widget set (wxwidgets afaik). However, callbacks of e.g. buttons are processed in the main (repl) thread. How is this…

---

## [Question on Racket Guide 5.2 statement](https://racket.discourse.group/t/question-on-racket-guide-5-2-statement/3903)

<div class="topic-metadata">

**Author:** [@Dashman](https://racket.discourse.group/u/Dashman)\
**Replies:** 3\
**Last updated:** [August 16, 2025, 10:34pm UTC](https://racket.discourse.group/t/question-on-racket-guide-5-2-statement/3903 "2025-08-16T22:34:06Z")

</div>

"The struct-copy form clones a structure and optionally updates specified fields in the clone. This process is sometimes called a functional update, because the result is a structure with updated field values. but the or…

---

## [Differences between for/fold and explicit car/cdr recursion?](https://racket.discourse.group/t/differences-between-for-fold-and-explicit-car-cdr-recursion/3891)

<div class="topic-metadata">

**Author:** [@ddrake](https://racket.discourse.group/u/ddrake)\
**Replies:** 14\
**Last updated:** [August 13, 2025, 9:10pm UTC](https://racket.discourse.group/t/differences-between-for-fold-and-explicit-car-cdr-recursion/3891 "2025-08-13T21:10:45Z")

</div>

I solved one of the katas on codewars: it's called "are they the same?". The key thing is deciding if two lists have equal elements. My solution used for/fold; one of the other solutions used first and rest and explicit…

---

## [Racket FFI and cstruct bit-fields](https://racket.discourse.group/t/racket-ffi-and-cstruct-bit-fields/3898)

<div class="topic-metadata">

**Author:** [@hnmdijkema](https://racket.discourse.group/u/hnmdijkema)\
**Replies:** 1\
**Last updated:** [August 13, 2025, 1:22am UTC](https://racket.discourse.group/t/racket-ffi-and-cstruct-bit-fields/3898 "2025-08-13T01:22:35Z")

</div>

Hello, Does anyone have experience with the racket FFI and bit fields in C structures? I'm encountering one here: typedef struct { FLAC\_\_uint64 offset; FLAC\_\_byte number; char isrc\[13\]; uint32\_t type:1…

---

## [Uploaded package has documentation but not generated on https://pkgd.racket-lang.org/pkgn/](https://racket.discourse.group/t/uploaded-package-has-documentation-but-not-generated-on-https-pkgd-racket-lang-org-pkgn/3890)

<div class="topic-metadata">

**Author:** [@hnmdijkema](https://racket.discourse.group/u/hnmdijkema)\
**Replies:** 8\
**Last updated:** [August 12, 2025, 4:39pm UTC](https://racket.discourse.group/t/uploaded-package-has-documentation-but-not-generated-on-https-pkgd-racket-lang-org-pkgn/3890 "2025-08-12T16:39:21Z")

</div>

Hi, I've created a package 'ellipsis-msg' and uploaded it to Racket Package Index. It has the same setup as 'columns-pane', but somehow the documentation is generated for 'columns-pane', but not for 'ellipsis-msg'. St…

---

## [Does Racket have a way of defining a constant or immutable variable?](https://racket.discourse.group/t/does-racket-have-a-way-of-defining-a-constant-or-immutable-variable/3874)

<div class="topic-metadata">

**Author:** [@Dashman](https://racket.discourse.group/u/Dashman)\
**Replies:** 19\
**Last updated:** [August 7, 2025, 10:15pm UTC](https://racket.discourse.group/t/does-racket-have-a-way-of-defining-a-constant-or-immutable-variable/3874 "2025-08-07T22:15:06Z")

</div>

I don't see anything in the index about a constant variable declaration.

---

## [Layout does not automatically adjust. What can I do?](https://racket.discourse.group/t/layout-does-not-automatically-adjust-what-can-i-do/3887)

<div class="topic-metadata">

**Author:** [@hnmdijkema](https://racket.discourse.group/u/hnmdijkema)\
**Replies:** 1\
**Last updated:** [August 6, 2025, 9:00pm UTC](https://racket.discourse.group/t/layout-does-not-automatically-adjust-what-can-i-do/3887 "2025-08-06T21:00:32Z")

</div>

Hi, I've got following code (as a spike): (require racket/gui) (define win (new frame% \[label "Hi there!"\])) (define grid-group (new group-box-panel% \[label "My group"\] \[parent win\] \[horiz-margin 10\] \[vert-margin 10\])…

---

## [Module and namespace: how to use module-\>namespace](https://racket.discourse.group/t/module-and-namespace-how-to-use-module-namespace/3881)

<div class="topic-metadata">

**Author:** [@lylgithub2021](https://racket.discourse.group/u/lylgithub2021)\
**Replies:** 3\
**Last updated:** [July 30, 2025, 12:39pm UTC](https://racket.discourse.group/t/module-and-namespace-how-to-use-module-namespace/3881 "2025-07-30T12:39:53Z")

</div>

\#lang racket (module m racket/base (provide x) (define x 11)) (require 'm) (define ns (module-\>namespace ''m)) (eval 'x ns) error meassage is given when running the above code: module-\>namespace: unknown module i…

---

## [String format does not work](https://racket.discourse.group/t/string-format-does-not-work/3871)

<div class="topic-metadata">

**Author:** [@lylgithub2021](https://racket.discourse.group/u/lylgithub2021)\
**Replies:** 9\
**Last updated:** [July 29, 2025, 9:42am UTC](https://racket.discourse.group/t/string-format-does-not-work/3871 "2025-07-29T09:42:56Z")

</div>

\#lang racket (printf "width1: |~6d|~6d|\\n" 12 345) Why dose it cause error message " printf: ill-formed pattern string explanation: tag ~6 not allowed; arguments were: 12 345"? Ps: on Drracket v8.17

---

## [Different rendering when using image-snip and pict](https://racket.discourse.group/t/different-rendering-when-using-image-snip-and-pict/3878)

<div class="topic-metadata">

**Author:** [@spdegabrielle](https://racket.discourse.group/u/spdegabrielle)\
**Replies:** 1\
**Last updated:** [July 27, 2025, 10:11pm UTC](https://racket.discourse.group/t/different-rendering-when-using-image-snip-and-pict/3878 "2025-07-27T22:11:09Z")

</div>

Hi, I'm getting different rendering when I use image-snip% compared to pict's dc. I think the difference is the rendering is assuming a different resolution display but I am not entirely sure. I've included a simple d…

---

## [Macro expansion: evaluating a pattern variable that could be a number or a function](https://racket.discourse.group/t/macro-expansion-evaluating-a-pattern-variable-that-could-be-a-number-or-a-function/3862)

<div class="topic-metadata">

**Author:** [@ddrake](https://racket.discourse.group/u/ddrake)\
**Replies:** 14\
**Last updated:** [July 24, 2025, 7:36pm UTC](https://racket.discourse.group/t/macro-expansion-evaluating-a-pattern-variable-that-could-be-a-number-or-a-function/3862 "2025-07-24T19:36:10Z")

</div>

This is related to my struggles with getting a new #lang to work. I've discovered a bug in my code, but I am not sure how to modify my macro to make it work as expected. The key parts of my macro and supporting code are…

---

## [Visible notes in Scribble bibliography](https://racket.discourse.group/t/visible-notes-in-scribble-bibliography/3868)

<div class="topic-metadata">

**Author:** [@Fare](https://racket.discourse.group/u/Fare)\
**Replies:** 2\
**Last updated:** [July 23, 2025, 4:24pm UTC](https://racket.discourse.group/t/visible-notes-in-scribble-bibliography/3868 "2025-07-23T16:24:44Z")

</div>

I would like to include some reader-visible notes in the foo.bib bibliography for an article written using Scribble's LaTeX / PDF backend. How do I do that? I might require some lower-level LaTeX hacking.

---

## [Confused about setup for reader and expander for simple DSL](https://racket.discourse.group/t/confused-about-setup-for-reader-and-expander-for-simple-dsl/3859)

<div class="topic-metadata">

**Author:** [@ddrake](https://racket.discourse.group/u/ddrake)\
**Replies:** 14\
**Last updated:** [July 19, 2025, 11:11pm UTC](https://racket.discourse.group/t/confused-about-setup-for-reader-and-expander-for-simple-dsl/3859 "2025-07-19T23:11:13Z")

</div>

I'm working on the Beautiful Racket "wires" DSL without looking at his solution, or using the various br libraries -- I want to get things working using standard Racket and not rely on BR's syntactic sugar / setup. I ha…

---

## [Pattern matching k or more items](https://racket.discourse.group/t/pattern-matching-k-or-more-items/3860)

<div class="topic-metadata">

**Author:** [@jeh](https://racket.discourse.group/u/jeh)\
**Replies:** 3\
**Last updated:** [July 19, 2025, 7:58pm UTC](https://racket.discourse.group/t/pattern-matching-k-or-more-items/3860 "2025-07-19T19:58:03Z")

</div>

Given a pattern like (match '(1 2 3 4) \[(list 1 a ..3) a\] \[\_ 'else\]) in the above must the ..k form be a literal non-negative integer? Can k not be an identifier bound to a non-negative identifier?

---

## [Are temporary parameters a silly idea?](https://racket.discourse.group/t/are-temporary-parameters-a-silly-idea/3420)

<div class="topic-metadata">

**Author:** [@bakgatviooldoos](https://racket.discourse.group/u/bakgatviooldoos)\
**Replies:** 3\
**Last updated:** [July 18, 2025, 11:09pm UTC](https://racket.discourse.group/t/are-temporary-parameters-a-silly-idea/3420 "2025-07-18T23:09:06Z")

</div>

Hi, Racket Discourse. I am experimenting with ways of exposing mutable variables to programmers within the body of procedures which themselves build-up objects (by which I am implying, that it is difficult to percolate …

---

## [How to introduce new bindings without using \`define-\*\`?](https://racket.discourse.group/t/how-to-introduce-new-bindings-without-using-define/3856)

<div class="topic-metadata">

**Author:** [@bakgatviooldoos](https://racket.discourse.group/u/bakgatviooldoos)\
**Replies:** 2\
**Last updated:** [July 18, 2025, 5:13pm UTC](https://racket.discourse.group/t/how-to-introduce-new-bindings-without-using-define/3856 "2025-07-18T17:13:16Z")

</div>

Hi, Racket Discourse. I am curious about how one introduces a new binding into a definition context--if I am using these terms correctly. I am looking at defining out-parameters in Racket, but my method of introducing …

---

## [Scribble and plot/pict doesn't know about pi?](https://racket.discourse.group/t/scribble-and-plot-pict-doesnt-know-about-pi/3850)

<div class="topic-metadata">

**Author:** [@ddrake](https://racket.discourse.group/u/ddrake)\
**Replies:** 2\
**Last updated:** [July 12, 2025, 7:47pm UTC](https://racket.discourse.group/t/scribble-and-plot-pict-doesnt-know-about-pi/3850 "2025-07-12T19:47:16Z")

</div>

I'm experimenting with Scribble and wanted to see about including function plots. Something like this: #lang scribble/base @(require scribble/manual) @(require plot/pict) @title{Plots in Scribble} The sine function: …

---

## [Defining new special formatting escapes](https://racket.discourse.group/t/defining-new-special-formatting-escapes/3844)

<div class="topic-metadata">

**Author:** [@hendrikboom3](https://racket.discourse.group/u/hendrikboom3)\
**Replies:** 2\
**Last updated:** [July 11, 2025, 8:29pm UTC](https://racket.discourse.group/t/defining-new-special-formatting-escapes/3844 "2025-07-11T20:29:16Z")

</div>

Is it possible to define new special formatting escapes without rewriting fprintf and friends from scratch? I know it's possible to redefine how particular structures are printed, displayed, or written by adding a metho…

---

## [Get version from info.rkt](https://racket.discourse.group/t/get-version-from-info-rkt/3843)

<div class="topic-metadata">

**Author:** [@damien\_mattei](https://racket.discourse.group/u/damien_mattei)\
**Replies:** 6\
**Last updated:** [July 10, 2025, 10:13pm UTC](https://racket.discourse.group/t/get-version-from-info-rkt/3843 "2025-07-10T22:13:19Z")

</div>

hello, i have an info.rkt file in my package, that contains the version number, how can i retrieve it from my code?. #lang info .... (define version "10.3") ..... i can require the info.rkt file but the definition are…

---

## [Using \`check-equal?\` with minor variations in expected data?](https://racket.discourse.group/t/using-check-equal-with-minor-variations-in-expected-data/3840)

<div class="topic-metadata">

**Author:** [@greghendershott](https://racket.discourse.group/u/greghendershott)\
**Replies:** 8\
**Last updated:** [July 9, 2025, 4:21pm UTC](https://racket.discourse.group/t/using-check-equal-with-minor-variations-in-expected-data/3840 "2025-07-09T16:21:56Z")

</div>

I have a test, where the expected results are slightly different when run under an older version of something. I needed to adapt the test to deal with both older and newer expected values. So I (not proudly) changed the…

---

## [DrRacket sometimes saves files in a binary format](https://racket.discourse.group/t/drracket-sometimes-saves-files-in-a-binary-format/3841)

<div class="topic-metadata">

**Author:** [@shawnw](https://racket.discourse.group/u/shawnw)\
**Replies:** 3\
**Last updated:** [July 8, 2025, 11:56am UTC](https://racket.discourse.group/t/drracket-sometimes-saves-files-in-a-binary-format/3841 "2025-07-08T11:56:44Z")

</div>

Once in a while when opening a Racket source file in emacs or other tools, it ends up being, not plain text, but something that registers as binary, though it appears mostly plain text. They start with: #reader(lib"read…

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

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