# \#question

**URL:** https://racket.discourse.group/tag/question/2.md?page=1

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

**Page:** 2

---

## [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

---

## [Handin with racket instead of teaching languages:](https://racket.discourse.group/t/handin-with-racket-instead-of-teaching-languages/3854)

<div class="topic-metadata">

**Author:** [@jestarray](https://racket.discourse.group/u/jestarray)\
**Replies:** 1\
**Last updated:** [July 16, 2025, 10:29am UTC](https://racket.discourse.group/t/handin-with-racket-instead-of-teaching-languages/3854 "2025-07-16T10:29:08Z")

</div>

(check: :language 'racket :requires '() :eval? #t :output (string-append (symbol-\>string ASSIGNMENT-NAME) ".rkt") :create-text? #t :textualize? #f ;;raises exception for submissio…

---

## [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: …

---

## [A function that recursively copies files and directories](https://racket.discourse.group/t/a-function-that-recursively-copies-files-and-directories/3829)

<div class="topic-metadata">

**Author:** [@indrjo](https://racket.discourse.group/u/indrjo)\
**Replies:** 3\
**Last updated:** [July 7, 2025, 6:20pm UTC](https://racket.discourse.group/t/a-function-that-recursively-copies-files-and-directories/3829 "2025-07-07T18:20:17Z")

</div>

I know there is the function copy-directory/files, but I want a function that while descending directories performs some tasks before copying (see actions-on-dir). Here is the code I have written so far. #lang racket (…

---

## [Performance difference - why?](https://racket.discourse.group/t/performance-difference-why/3839)

<div class="topic-metadata">

**Author:** [@hnmdijkema](https://racket.discourse.group/u/hnmdijkema)\
**Replies:** 4\
**Last updated:** [July 7, 2025, 2:30pm UTC](https://racket.discourse.group/t/performance-difference-why/3839 "2025-07-07T14:30:05Z")

</div>

I'm testing with an OO framework, and try to understand the performance difference between two implementations of a caller construct. I've narrowed the problem down to two simple tests: Test1 where I create some simple …

---

## [Default non-keyword paraeters in type Racket](https://racket.discourse.group/t/default-non-keyword-paraeters-in-type-racket/3833)

<div class="topic-metadata">

**Author:** [@hendrikboom3](https://racket.discourse.group/u/hendrikboom3)\
**Replies:** 1\
**Last updated:** [July 4, 2025, 9:14am UTC](https://racket.discourse.group/t/default-non-keyword-paraeters-in-type-racket/3833 "2025-07-04T09:14:21Z")

</div>

How do you do an optional function parameter in Typed Racket? I want the paraneter NOT to be keyword parameter. I'm used to writing things like (define (foo a \[b d\]) ( ... and when i ask for the value of b, and I'v…

---

## [Racket docker M1 Rosetta](https://racket.discourse.group/t/racket-docker-m1-rosetta/2947)

<div class="topic-metadata">

**Author:** [@jasonhemann](https://racket.discourse.group/u/jasonhemann)\
**Replies:** 7\
**Last updated:** [July 3, 2025, 11:00am UTC](https://racket.discourse.group/t/racket-docker-m1-rosetta/2947 "2025-07-03T11:00:36Z")

</div>

Thanks in advance. I'm having trouble w/racket specifically under docker emulating x86\_64. AFAIK everything else seems to be working fine. I saw @awiersdorf started a related discussion a while back. I'm seeing differ…

---

## [Getting started with typed Racket and path-related types](https://racket.discourse.group/t/getting-started-with-typed-racket-and-path-related-types/3804)

<div class="topic-metadata">

**Author:** [@ddrake](https://racket.discourse.group/u/ddrake)\
**Replies:** 11\
**Last updated:** [June 24, 2025, 9:33pm UTC](https://racket.discourse.group/t/getting-started-with-typed-racket-and-path-related-types/3804 "2025-06-24T21:33:59Z")

</div>

I'm having trouble with typed Racket. I have code that works perfectly as "#lang racket", but when I swap that to typed/racket, I get a couple errors, and I haven't been able to convince the typechecker that things will …

---

## [\`~describe\` vs. \`#:role\` in \`syntax-parse\`](https://racket.discourse.group/t/describe-vs-role-in-syntax-parse/3795)

<div class="topic-metadata">

**Author:** [@LiberalArtist](https://racket.discourse.group/u/LiberalArtist)\
**Replies:** 4\
**Last updated:** [June 21, 2025, 2:45am UTC](https://racket.discourse.group/t/describe-vs-role-in-syntax-parse/3795 "2025-06-21T02:45:30Z")

</div>

How should we choose between ~describe descriptions and #:role for error information with syntax-parse? Consider this macro, inspired by a discussion on Discord: #lang racket (require (for-syntax syntax/parse)) (defi…

---

## [Question about unconstrained-domain-\> in the Racket guide](https://racket.discourse.group/t/question-about-unconstrained-domain-in-the-racket-guide/3786)

<div class="topic-metadata">

**Author:** [@chiroptical](https://racket.discourse.group/u/chiroptical)\
**Replies:** 10\
**Last updated:** [June 16, 2025, 7:58pm UTC](https://racket.discourse.group/t/question-about-unconstrained-domain-in-the-racket-guide/3786 "2025-06-16T19:58:52Z")

</div>

Hey! I am currently working my way through the Racket guide and I am struggling a bit to grok unconstrained-domain-\> in the example 7.3 Contracts on Functions in General. I'll paste the example here and work through my …

---

## [Guessing Game Error](https://racket.discourse.group/t/guessing-game-error/3784)

<div class="topic-metadata">

**Author:** [@avrame](https://racket.discourse.group/u/avrame)\
**Replies:** 2\
**Last updated:** [June 10, 2025, 10:32pm UTC](https://racket.discourse.group/t/guessing-game-error/3784 "2025-06-10T22:32:55Z")

</div>

I read through most of the Racket Guide and decided to write a simple guessing game to test my understanding of Racket. It works for the most part, but once the user guesses the correct answer, I get this error message: a…

---

## [Rhombus: Which way we should import packages](https://racket.discourse.group/t/rhombus-which-way-we-should-import-packages/3767)

<div class="topic-metadata">

**Author:** [@corbasai](https://racket.discourse.group/u/corbasai)\
**Replies:** 2\
**Last updated:** [June 3, 2025, 5:28am UTC](https://racket.discourse.group/t/rhombus-which-way-we-should-import-packages/3767 "2025-06-03T05:28:38Z")

</div>

Rhombus: Which way should we import packages like SXML? I was trying so import: lib("sxml/sxml.rkt") as sxml and fail, - no such file or directory ' ~/.local/share/racket/8.17/pkgs/sxml/sxml/sxml.rkt'

---

## [Why is contract-out struct immutable?](https://racket.discourse.group/t/why-is-contract-out-struct-immutable/3755)

<div class="topic-metadata">

**Author:** [@mike](https://racket.discourse.group/u/mike)\
**Replies:** 2\
**Last updated:** [May 22, 2025, 6:18am UTC](https://racket.discourse.group/t/why-is-contract-out-struct-immutable/3755 "2025-05-22T06:18:29Z")

</div>

It seems struct in contract-out does not support the #:mutable option. Why is that? This is especially strange as struct/contract does support it. This is regrettable, as changing one into the other is super-tedious. I…

---

## [What're Differences Between \`typed/racket/unsafe\` and \`typed/racket/optional\`?](https://racket.discourse.group/t/whatre-differences-between-typed-racket-unsafe-and-typed-racket-optional/3746)

<div class="topic-metadata">

**Author:** [@NoahStoryM](https://racket.discourse.group/u/NoahStoryM)\
**Replies:** 1\
**Last updated:** [May 16, 2025, 12:50pm UTC](https://racket.discourse.group/t/whatre-differences-between-typed-racket-unsafe-and-typed-racket-optional/3746 "2025-05-16T12:50:39Z")

</div>

I'm writing a module that adds types to identifiers imported from untyped code, and I want to avoid contract generation. I see two approaches: Using typed/racket/unsafe: (require typed/racket/unsafe) Using typed/rack…

---

## [Rhombus Documentation](https://racket.discourse.group/t/rhombus-documentation/3740)

<div class="topic-metadata">

**Author:** [@ShalokShalom](https://racket.discourse.group/u/ShalokShalom)\
**Replies:** 3\
**Last updated:** [May 12, 2025, 2:53pm UTC](https://racket.discourse.group/t/rhombus-documentation/3740 "2025-05-12T14:53:32Z")

</div>

Hi wonderful people :waving\_hand: Does the documentation generator need a dedicated Racket --\> Rhombus translation in the background, or can it create the existing documentation with the present tools? Considering that…

---

## [Why are contracts not procedures?](https://racket.discourse.group/t/why-are-contracts-not-procedures/3727)

<div class="topic-metadata">

**Author:** [@joskoot](https://racket.discourse.group/u/joskoot)\
**Replies:** 2\
**Last updated:** [May 7, 2025, 7:13am UTC](https://racket.discourse.group/t/why-are-contracts-not-procedures/3727 "2025-05-07T07:13:14Z")

</div>

We have: (procedure? (-\> any/c any/c)) ; -\> #f (contract? (-\> any/c any/c)) ; -\> #t (contract? (λ (x) #t)) ; -\> #t Every procedure satisfying contract (-\> any/c any(c) is accepted as a contract, but the reverse is not …

---

## [Can Typed Racket Treat Types as Runtime Values?](https://racket.discourse.group/t/can-typed-racket-treat-types-as-runtime-values/3696)

<div class="topic-metadata">

**Author:** [@NoahStoryM](https://racket.discourse.group/u/NoahStoryM)\
**Replies:** 0\
**Last updated:** [April 20, 2025, 4:34am UTC](https://racket.discourse.group/t/can-typed-racket-treat-types-as-runtime-values/3696 "2025-04-20T04:34:05Z")

</div>

I want to refine types without relying on predicates, so I attempted to implement ⊔, ann\* and type-case. Here are usage examples of these operators: (: flexible-length (→ (⊔ String (Listof Any)) Index)) (define (flexibl…

---

## [Exporting a struct invariant contract](https://racket.discourse.group/t/exporting-a-struct-invariant-contract/3694)

<div class="topic-metadata">

**Author:** [@KevinW](https://racket.discourse.group/u/KevinW)\
**Replies:** 2\
**Last updated:** [April 18, 2025, 10:23pm UTC](https://racket.discourse.group/t/exporting-a-struct-invariant-contract/3694 "2025-04-18T22:23:45Z")

</div>

Hi, I'm trying to create a struct with a contract that involves a relationship between two fields. The struct needs to be exported. It seems like what I need is an "invariant contract" as in struct/dc: 8.1 Data-structur…

---

## [Creating real static "standalone executables"](https://racket.discourse.group/t/creating-real-static-standalone-executables/3678)

<div class="topic-metadata">

**Author:** [@ungsams](https://racket.discourse.group/u/ungsams)\
**Replies:** 8\
**Last updated:** [April 13, 2025, 6:15pm UTC](https://racket.discourse.group/t/creating-real-static-standalone-executables/3678 "2025-04-13T18:15:33Z")

</div>

Hello everyone, I am new to racket and had a couple of questions about distributing programs in general and if it was really possible to distribute a "single" executable. So far I also had problems with raco distribute …

---

## [Single Percision Float on Chez-Scheme impl](https://racket.discourse.group/t/single-percision-float-on-chez-scheme-impl/3687)

<div class="topic-metadata">

**Author:** [@xiaoyu2006](https://racket.discourse.group/u/xiaoyu2006)\
**Replies:** 1\
**Last updated:** [April 13, 2025, 9:58am UTC](https://racket.discourse.group/t/single-percision-float-on-chez-scheme-impl/3687 "2025-04-13T09:58:14Z")

</div>

A part of my Racket program requires calculating single-precision float number that follows IEEE 754. However my Racket tells me (single-flonum-available?) ; =\> #f. How can I bypass this? I imagine I can have such api (…

---

## [Mocking system effectively](https://racket.discourse.group/t/mocking-system-effectively/3643)

<div class="topic-metadata">

**Author:** [@robertpostill](https://racket.discourse.group/u/robertpostill)\
**Replies:** 7\
**Last updated:** [March 26, 2025, 9:47am UTC](https://racket.discourse.group/t/mocking-system-effectively/3643 "2025-03-26T09:47:07Z")

</div>

I'm trying to mock a side-effect-riddled process. Part of this is to wrap a call to ifconfig. The code I'm wrapping looks like this: (define (get-mac-address #:ifconfig-invoker \[system system\]) (define mac-address-r…

---

## [Some small improvements to signatures](https://racket.discourse.group/t/some-small-improvements-to-signatures/3619)

<div class="topic-metadata">

**Author:** [@ToddOBryan](https://racket.discourse.group/u/ToddOBryan)\
**Replies:** 7\
**Last updated:** [March 23, 2025, 12:09am UTC](https://racket.discourse.group/t/some-small-improvements-to-signatures/3619 "2025-03-23T00:09:49Z")

</div>

I noticed that in the latest version of the docs for BSL, signatures get a mention. Thank you! There are a couple of small pain points before I can use them, however. Could we provide a link to the list of Signatures…

---

## [Best way to integrate "schemesh" written in Chez Scheme, into Racket ecosystem?](https://racket.discourse.group/t/best-way-to-integrate-schemesh-written-in-chez-scheme-into-racket-ecosystem/3629)

<div class="topic-metadata">

**Author:** [@Cosmos721](https://racket.discourse.group/u/Cosmos721)\
**Replies:** 8\
**Last updated:** [March 22, 2025, 8:43am UTC](https://racket.discourse.group/t/best-way-to-integrate-schemesh-written-in-chez-scheme-into-racket-ecosystem/3629 "2025-03-22T08:43:55Z")

</div>

I would like to extend my program schemesh, currently written in Chez Scheme, and integrate it within Racket ecosystem. A little background to explain the question: schemesh is a Unix shell scriptable in Chez Scheme. …

---

## [Broken record-update behaviour in SRFI-57](https://racket.discourse.group/t/broken-record-update-behaviour-in-srfi-57/3613)

<div class="topic-metadata">

**Author:** [@dguthrie](https://racket.discourse.group/u/dguthrie)\
**Replies:** 0\
**Last updated:** [March 9, 2025, 12:09pm UTC](https://racket.discourse.group/t/broken-record-update-behaviour-in-srfi-57/3613 "2025-03-09T12:09:03Z")

</div>

I'm trying to use SRFI 57 (the extended record types). According to the documentation, SRFI 57 is supported and indeed it appears to be built in to Racket. This is with #lang racket and (require srfi/57) as preamble. SR…

---

## [Fail to build 8.16 with Nix for docs failure](https://racket.discourse.group/t/fail-to-build-8-16-with-nix-for-docs-failure/3609)

<div class="topic-metadata">

**Author:** [@rczb](https://racket.discourse.group/u/rczb)\
**Replies:** 3\
**Last updated:** [March 9, 2025, 6:50am UTC](https://racket.discourse.group/t/fail-to-build-8-16-with-nix-for-docs-failure/3609 "2025-03-09T06:50:36Z")

</div>

Hello everyone, I am the maintainer of racket\[-minimal\] packages of Nixpkgs. Recently when I performed the routine of upgrading Racket from 8.15 to 8.16, certain error occurred: raco setup: --- building documentation --…

---

## [Time and time-apply on windows 11 Pro](https://racket.discourse.group/t/time-and-time-apply-on-windows-11-pro/3333)

<div class="topic-metadata">

**Author:** [@joskoot](https://racket.discourse.group/u/joskoot)\
**Replies:** 3\
**Last updated:** [March 3, 2025, 12:14pm UTC](https://racket.discourse.group/t/time-and-time-apply-on-windows-11-pro/3333 "2025-03-03T12:14:42Z")

</div>

Possibly my question is not a problem of Racket, but as discourse is a very nice site, I ask my question first here. With windows 11 Pro on a 12th Gen Intel(R) Core(TM)i3-1215U processor, procedure time-apply and syntax…

---

## [Macro expander/Module system - build-module-name](https://racket.discourse.group/t/macro-expander-module-system-build-module-name/3559)

<div class="topic-metadata">

**Author:** [@mendelsshop](https://racket.discourse.group/u/mendelsshop)\
**Replies:** 1\
**Last updated:** [February 16, 2025, 3:27pm UTC](https://racket.discourse.group/t/macro-expander-module-system-build-module-name/3559 "2025-02-16T15:27:59Z")

</div>

I am implementing a macro expander for a language I am writing. I was looking at https://github.com/mflatt/expander (in the demi branch), in module-path.rkt. There is a function build-module-name: ;; Build a submodule …

---

## [Prolog to Racklog - Trouble using %rel and %which](https://racket.discourse.group/t/prolog-to-racklog-trouble-using-rel-and-which/3544)

<div class="topic-metadata">

**Author:** [@lannydpittman](https://racket.discourse.group/u/lannydpittman)\
**Replies:** 1\
**Last updated:** [February 6, 2025, 4:30pm UTC](https://racket.discourse.group/t/prolog-to-racklog-trouble-using-rel-and-which/3544 "2025-02-06T16:30:01Z")

</div>

This problem has really stumped me. I don't understand the correct method to build a simple Prolog rule in Racklog, for example, pairing two people up by company: % Prolog (runs in SWISH) company(art ,apple). company(bo…

---

## [The use of #: in the program listing below](https://racket.discourse.group/t/the-use-of-in-the-program-listing-below/3505)

<div class="topic-metadata">

**Author:** [@munroec](https://racket.discourse.group/u/munroec)\
**Replies:** 12\
**Last updated:** [January 24, 2025, 3:02pm UTC](https://racket.discourse.group/t/the-use-of-in-the-program-listing-below/3505 "2025-01-24T15:02:25Z")

</div>

I'm less than a week into learning DrRacket and one of my books on Racket had a brief routine to plot 2 cycles of a sine wave. It didn't run as written in the book but it was fairly easy to get it to run in DrRacket how…

---

## [Something Like Pipe Forward In Racket?](https://racket.discourse.group/t/something-like-pipe-forward-in-racket/3492)

<div class="topic-metadata">

**Author:** [@OldDutchCap](https://racket.discourse.group/u/OldDutchCap)\
**Replies:** 14\
**Last updated:** [January 16, 2025, 3:58am UTC](https://racket.discourse.group/t/something-like-pipe-forward-in-racket/3492 "2025-01-16T03:58:22Z")

</div>

Is there anything in Racket like the pipe forward operator (|\>) that I've seen in Haskell, F# and Elixir? For those unfamiliar with this operator it simply passes the output of one function as the input to the next. So…

[Previous page](https://racket.discourse.group/tag/question/2.md?match_all_tags=true&tags%5B%5D=question)

[Next page](https://racket.discourse.group/tag/question/2.md?match_all_tags=true&page=2&tags%5B%5D=question)
