# Questions & Answers

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

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

**Page:** 10

---

## [Cpointer -\> flvector?](https://racket.discourse.group/t/cpointer-flvector/3348)

<div class="topic-metadata">

**Author:** [@Laurent.O](https://racket.discourse.group/u/Laurent.O)\
**Replies:** 5\
**Last updated:** [November 23, 2024, 7:59am UTC](https://racket.discourse.group/t/cpointer-flvector/3348 "2024-11-23T07:59:12Z")

</div>

Once I have a pointer to a memory block from the ffi (allocated in a shared memory space), is there a way to turn it into a standard racket flvector? I see there's a flvector-\>cpointer, but not the converse.

---

## [In macro, is object a macro or a procedure?](https://racket.discourse.group/t/in-macro-is-object-a-macro-or-a-procedure/3323)

<div class="topic-metadata">

**Author:** [@Laurent.O](https://racket.discourse.group/u/Laurent.O)\
**Replies:** 11\
**Last updated:** [November 22, 2024, 3:40pm UTC](https://racket.discourse.group/t/in-macro-is-object-a-macro-or-a-procedure/3323 "2024-11-22T15:40:19Z")

</div>

Hi all, In the following example, a syntax error is raised because of (apply op args) can't work when op is a macro like and. How can I force the macro to go through the second branch when apply doesn't apply? #lang r…

---

## [How to \`dynamic-require\` from the enclosing module?](https://racket.discourse.group/t/how-to-dynamic-require-from-the-enclosing-module/3345)

<div class="topic-metadata">

**Author:** [@Laurent.O](https://racket.discourse.group/u/Laurent.O)\
**Replies:** 3\
**Last updated:** [November 21, 2024, 3:52pm UTC](https://racket.discourse.group/t/how-to-dynamic-require-from-the-enclosing-module/3345 "2024-11-21T15:52:58Z")

</div>

I'm trying to obtain a function from a symbol within a submodule, something like: # lang racket (define (foo x) (list x)) (module+ my-mod (dynamic-require \<something\> 'foo)) This can be done with some syntax magic …

---

## [R6RS error in syntax parsing](https://racket.discourse.group/t/r6rs-error-in-syntax-parsing/3344)

<div class="topic-metadata">

**Author:** [@damien\_mattei](https://racket.discourse.group/u/damien_mattei)\
**Replies:** 0\
**Last updated:** [November 21, 2024, 11:10am UTC](https://racket.discourse.group/t/r6rs-error-in-syntax-parsing/3344 "2024-11-21T11:10:56Z")

</div>

hello, i have a code in two versions, Racket and R6RS. The R6RS has a bug i donot understand , even if i can make works the Racket and R6RS with different versions, this version is buggy in R6RS, so i trace all the inte…

---

## [Scrollbar problems on Windows](https://racket.discourse.group/t/scrollbar-problems-on-windows/3314)

<div class="topic-metadata">

**Author:** [@jjsimpso](https://racket.discourse.group/u/jjsimpso)\
**Replies:** 4\
**Last updated:** [November 21, 2024, 12:04am UTC](https://racket.discourse.group/t/scrollbar-problems-on-windows/3314 "2024-11-21T00:04:29Z")

</div>

In my GUI application, I have a number of scrollbar-related problems in Windows that I don't see on Linux. My app has a custom canvas% with manual scrollbars. The main problem occurs when scrolling a very large virtual …

---

## [Racket's macro, module and contract system](https://racket.discourse.group/t/rackets-macro-module-and-contract-system/3337)

<div class="topic-metadata">

**Author:** [@Rugged](https://racket.discourse.group/u/Rugged)\
**Replies:** 4\
**Last updated:** [November 20, 2024, 2:13pm UTC](https://racket.discourse.group/t/rackets-macro-module-and-contract-system/3337 "2024-11-20T14:13:33Z")

</div>

Is there a document or a paper detailing the implementation of Racket's macro and module system? Also, I need a document detailing the contract system (contracts) in Racket. Thanks

---

## [What are the changes made to chez scheme to accommodate Racket?](https://racket.discourse.group/t/what-are-the-changes-made-to-chez-scheme-to-accommodate-racket/3331)

<div class="topic-metadata">

**Author:** [@Rugged](https://racket.discourse.group/u/Rugged)\
**Replies:** 4\
**Last updated:** [November 19, 2024, 4:50am UTC](https://racket.discourse.group/t/what-are-the-changes-made-to-chez-scheme-to-accommodate-racket/3331 "2024-11-19T04:50:22Z")

</div>

I want an overview and git logs for the changes? How can I access them? Thanks

---

## [Getting stderr and stdout from a sub-process or command](https://racket.discourse.group/t/getting-stderr-and-stdout-from-a-sub-process-or-command/3281)

<div class="topic-metadata">

**Author:** [@damien\_mattei](https://racket.discourse.group/u/damien_mattei)\
**Replies:** 7\
**Last updated:** [November 18, 2024, 7:59pm UTC](https://racket.discourse.group/t/getting-stderr-and-stdout-from-a-sub-process-or-command/3281 "2024-11-18T19:59:57Z")

</div>

hello, i can not find a solution for getting separately stdout and stderr using subprocess or command in racket. with subprocess i get nothing and command i find this solution on the internet: https://www.reddit.com/r…

---

## [How can I properly thread serve/servlet?](https://racket.discourse.group/t/how-can-i-properly-thread-serve-servlet/3326)

<div class="topic-metadata">

**Author:** [@mfru](https://racket.discourse.group/u/mfru)\
**Replies:** 5\
**Last updated:** [November 16, 2024, 10:27pm UTC](https://racket.discourse.group/t/how-can-i-properly-thread-serve-servlet/3326 "2024-11-16T22:27:41Z")

</div>

Hi, I am working on a Racket web server. Having used Clojure in the past, I quite like being able to have convenience procedures for working within my code. Particularly, I want to implement a (start-server!) and a (st…

---

## [Rhombus how to make a macro defining macro](https://racket.discourse.group/t/rhombus-how-to-make-a-macro-defining-macro/3315)

<div class="topic-metadata">

**Author:** [@Hazematman](https://racket.discourse.group/u/Hazematman)\
**Replies:** 1\
**Last updated:** [November 13, 2024, 10:13pm UTC](https://racket.discourse.group/t/rhombus-how-to-make-a-macro-defining-macro/3315 "2024-11-13T22:13:40Z")

</div>

I'm trying to figure out how I could write a macro datatype that creates an annotation macro so I could have code like: typedef FuncArg: (Number || String) 10 :: FuncArg "Hi" :: FuncArg I'm new to Rhombus so I don't r…

---

## [How to use multiple file ports](https://racket.discourse.group/t/how-to-use-multiple-file-ports/3310)

<div class="topic-metadata">

**Author:** [@rvdalen](https://racket.discourse.group/u/rvdalen)\
**Replies:** 2\
**Last updated:** [November 12, 2024, 5:22am UTC](https://racket.discourse.group/t/how-to-use-multiple-file-ports/3310 "2024-11-12T05:22:02Z")

</div>

I am trying to open 1 file for reading and another for writing, and ensure that if something goes wrong I always try to close the input and output ports. I thought there would be a compact structure for this but the cod…

---

## [Any way to add let and let\* to Beginning Student language](https://racket.discourse.group/t/any-way-to-add-let-and-let-to-beginning-student-language/3299)

<div class="topic-metadata">

**Author:** [@ToddOBryan](https://racket.discourse.group/u/ToddOBryan)\
**Replies:** 4\
**Last updated:** [November 9, 2024, 1:29am UTC](https://racket.discourse.group/t/any-way-to-add-let-and-let-to-beginning-student-language/3299 "2024-11-09T01:29:57Z")

</div>

I like to teach DRY (Don't Repeat Yourself) fairly early, and some of my students have already asked for a way to name values inside functions. Is there a fairly easy way to allow students to use let and let\* inside the…

---

## [Tcp connect failing since upgrade to 8.15 on termux](https://racket.discourse.group/t/tcp-connect-failing-since-upgrade-to-8-15-on-termux/3298)

<div class="topic-metadata">

**Author:** [@Zeb](https://racket.discourse.group/u/Zeb)\
**Replies:** 6\
**Last updated:** [November 8, 2024, 5:32pm UTC](https://racket.discourse.group/t/tcp-connect-failing-since-upgrade-to-8-15-on-termux/3298 "2024-11-08T17:32:06Z")

</div>

I ran into this error when running raco pkg migrate 8.14. Can someone help me figure out what's going on? I can visit the host through a browser on my device. I don't have a VPN or proxy or anything. I'm on termux on And…

---

## [How to attach contract on generic function?](https://racket.discourse.group/t/how-to-attach-contract-on-generic-function/3297)

<div class="topic-metadata">

**Author:** [@Andy](https://racket.discourse.group/u/Andy)\
**Replies:** 3\
**Last updated:** [November 6, 2024, 4:07pm UTC](https://racket.discourse.group/t/how-to-attach-contract-on-generic-function/3297 "2024-11-06T16:07:57Z")

</div>

Hello! I'm trying to use contract with generic functions. However, the code doesn't work as expected: #lang racket (require racket/generic) (define-generics g (g-func g)) (struct s () #:methods gen:g \[(define/cont…

---

## [Identifying all functions used by a function](https://racket.discourse.group/t/identifying-all-functions-used-by-a-function/3293)

<div class="topic-metadata">

**Author:** [@jgarvin](https://racket.discourse.group/u/jgarvin)\
**Replies:** 6\
**Last updated:** [November 4, 2024, 10:50pm UTC](https://racket.discourse.group/t/identifying-all-functions-used-by-a-function/3293 "2024-11-04T22:50:17Z")

</div>

Given a function f I would like to be able to extract all the functions that it touches (either by calling directly or just passing as an argument to another function), recursively, without running f. In other words I wa…

---

## [Origin of the term “phase”](https://racket.discourse.group/t/origin-of-the-term-phase/3287)

<div class="topic-metadata">

**Author:** [@LiberalArtist](https://racket.discourse.group/u/LiberalArtist)\
**Replies:** 6\
**Last updated:** [November 4, 2024, 7:22am UTC](https://racket.discourse.group/t/origin-of-the-term-phase/3287 "2024-11-04T07:22:18Z")

</div>

Did “Composable and Compilable Macros: You Want it When?” coin the term “phase”? The term is introduced in the first subsection of the introduction: The conventional solution is to decorate "loadP.scm" and similar fil…

---

## [\`call-with-values\` vs. \`call-in-continuation\`](https://racket.discourse.group/t/call-with-values-vs-call-in-continuation/3285)

<div class="topic-metadata">

**Author:** [@NoahStoryM](https://racket.discourse.group/u/NoahStoryM)\
**Replies:** 0\
**Last updated:** [November 1, 2024, 3:05am UTC](https://racket.discourse.group/t/call-with-values-vs-call-in-continuation/3285 "2024-11-01T03:05:27Z")

</div>

Recently, while using call-with-values to invoke a continuation, I encountered unexpected high-performance costs. After further investigation, I found that call-in-continuation was actually the correct function to use …

---

## [How do I associate mangled identifiers with the original syntax?](https://racket.discourse.group/t/how-do-i-associate-mangled-identifiers-with-the-original-syntax/3267)

<div class="topic-metadata">

**Author:** [@bakgatviooldoos](https://racket.discourse.group/u/bakgatviooldoos)\
**Replies:** 3\
**Last updated:** [October 31, 2024, 9:19pm UTC](https://racket.discourse.group/t/how-do-i-associate-mangled-identifiers-with-the-original-syntax/3267 "2024-10-31T21:19:43Z")

</div>

Hi, Racket Discourse. I am busy working on a macro that, among other things, expands into a struct with certain fields being made up of concatenations via . of the original syntax. As an example, we have this little de…

---

## [Does the Package Server always download the entire repository?](https://racket.discourse.group/t/does-the-package-server-always-download-the-entire-repository/3268)

<div class="topic-metadata">

**Author:** [@default.kramer](https://racket.discourse.group/u/default.kramer)\
**Replies:** 4\
**Last updated:** [October 30, 2024, 9:00pm UTC](https://racket.discourse.group/t/does-the-package-server-always-download-the-entire-repository/3268 "2024-10-30T21:00:56Z")

</div>

I have a package configured using the "Path within repository" option. I thought this would cause the package server to download only that part of the repository. The path is https://github.com/default-kramer/HermitsHere…

---

## [Diagrams in a Scribble document](https://racket.discourse.group/t/diagrams-in-a-scribble-document/3280)

<div class="topic-metadata">

**Author:** [@hendrikboom3](https://racket.discourse.group/u/hendrikboom3)\
**Replies:** 2\
**Last updated:** [October 29, 2024, 8:21pm UTC](https://racket.discourse.group/t/diagrams-in-a-scribble-document/3280 "2024-10-29T20:21:45Z")

</div>

I's like to have diagrams in a Scribble document. Now diagrams are build from lines, geometrical objects. and text. The text in the diagrams should have the same typography as the rest if the Scribble text. Now there …

---

## [Let's make sense of macro\*-generated \`define-runtime-path\`](https://racket.discourse.group/t/lets-make-sense-of-macro-generated-define-runtime-path/3279)

<div class="topic-metadata">

**Author:** [@benknoble](https://racket.discourse.group/u/benknoble)\
**Replies:** 0\
**Last updated:** [October 29, 2024, 5:55pm UTC](https://racket.discourse.group/t/lets-make-sense-of-macro-generated-define-runtime-path/3279 "2024-10-29T17:55:46Z")

</div>

This is one for the macrology experts—I'm hoping to cement my understanding of this behavior beyond "it works and I don't need to touch it" because I may indeed need to modify it some day! PS On "macro\*-generated" in th…

---

## [Is there a better way to manage getting the right user-console-bin-dir on PATH for running shells when upgrading Racket?](https://racket.discourse.group/t/is-there-a-better-way-to-manage-getting-the-right-user-console-bin-dir-on-path-for-running-shells-when-upgrading-racket/3203)

<div class="topic-metadata">

**Author:** [@benknoble](https://racket.discourse.group/u/benknoble)\
**Replies:** 3\
**Last updated:** [October 26, 2024, 5:21pm UTC](https://racket.discourse.group/t/is-there-a-better-way-to-manage-getting-the-right-user-console-bin-dir-on-path-for-running-shells-when-upgrading-racket/3203 "2024-10-26T17:21:10Z")

</div>

Context Continuing the conversation from (fourteenth racketcon) about releases and managing Racket versions: When I install a new Racket version, I do the following: brew upgrade --cask racket (after brew update) r…

---

## [How to implement generic method implementation separate from struct definition](https://racket.discourse.group/t/how-to-implement-generic-method-implementation-separate-from-struct-definition/2894)

<div class="topic-metadata">

**Author:** [@rvdalen](https://racket.discourse.group/u/rvdalen)\
**Replies:** 6\
**Last updated:** [October 23, 2024, 4:49am UTC](https://racket.discourse.group/t/how-to-implement-generic-method-implementation-separate-from-struct-definition/2894 "2024-10-23T04:49:55Z")

</div>

I'm wondering if it is possible to do the following: Define a struct in 1 file: ---\[ data.rkt \]--- (struct person (name age)) Define an interface in a separate file: ---\[ greetable.rkt \]--- (define-generics greet…

---

## [How to make top-level depend on module-begin's success?](https://racket.discourse.group/t/how-to-make-top-level-depend-on-module-begins-success/3232)

<div class="topic-metadata">

**Author:** [@JoeyEremondi](https://racket.discourse.group/u/JoeyEremondi)\
**Replies:** 5\
**Last updated:** [October 22, 2024, 3:13pm UTC](https://racket.discourse.group/t/how-to-make-top-level-depend-on-module-begins-success/3232 "2024-10-22T15:13:01Z")

</div>

Does anyone understand the interaction between #%module-begin and #%top-interaction in Racket? E.g. if I do: #lang racket (if x y) ;; syntax error, missing else case And hit "Run" in Dr. Racket, it gives a syntax error…

---

## [How to set --no-docs as default behavior for raco pkg install and remove](https://racket.discourse.group/t/how-to-set-no-docs-as-default-behavior-for-raco-pkg-install-and-remove/3246)

<div class="topic-metadata">

**Author:** [@Zeb](https://racket.discourse.group/u/Zeb)\
**Replies:** 0\
**Last updated:** [October 21, 2024, 4:50pm UTC](https://racket.discourse.group/t/how-to-set-no-docs-as-default-behavior-for-raco-pkg-install-and-remove/3246 "2024-10-21T16:50:55Z")

</div>

how to set --no-docs as default behavior for raco pkg install and remove

---

## [How can I improve my knitting?](https://racket.discourse.group/t/how-can-i-improve-my-knitting/3239)

<div class="topic-metadata">

**Author:** [@bakgatviooldoos](https://racket.discourse.group/u/bakgatviooldoos)\
**Replies:** 8\
**Last updated:** [October 21, 2024, 4:32pm UTC](https://racket.discourse.group/t/how-can-i-improve-my-knitting/3239 "2024-10-21T16:32:36Z")

</div>

Hi, Racket Discourse. I have been messing around with the following little syntax, called knitting, which is basically a thin wrapper around @lexi.lambda's threading, which she recently updated. The excitement got me t…

---

## [Graphing a syntax classes](https://racket.discourse.group/t/graphing-a-syntax-classes/2213)

<div class="topic-metadata">

**Author:** [@corpix](https://racket.discourse.group/u/corpix)\
**Replies:** 2\
**Last updated:** [October 21, 2024, 10:13am UTC](https://racket.discourse.group/t/graphing-a-syntax-classes/2213 "2024-10-21T10:13:58Z")

</div>

Hey, Racket community! I am writing a DSL for ClickHouse database and made some amount of syntax classes already. After some amount I feel it becomes difficult to hold everything in my head, so I have started to look is…

---

## [Contracts from definitions window implied to the interactions window?](https://racket.discourse.group/t/contracts-from-definitions-window-implied-to-the-interactions-window/3240)

<div class="topic-metadata">

**Author:** [@joskoot](https://racket.discourse.group/u/joskoot)\
**Replies:** 3\
**Last updated:** [October 20, 2024, 7:38pm UTC](https://racket.discourse.group/t/contracts-from-definitions-window-implied-to-the-interactions-window/3240 "2024-10-20T19:38:58Z")

</div>

When opening DrRacket with a file that provides contracted procedures, the contracts are not checked when calling a procedure in the interactions window. A simple solution is: (define my-module base-module source ...) …

---

## [Quick one: When to syntax-parameterize?](https://racket.discourse.group/t/quick-one-when-to-syntax-parameterize/3241)

<div class="topic-metadata">

**Author:** [@bakgatviooldoos](https://racket.discourse.group/u/bakgatviooldoos)\
**Replies:** 0\
**Last updated:** [October 19, 2024, 9:47pm UTC](https://racket.discourse.group/t/quick-one-when-to-syntax-parameterize/3241 "2024-10-19T21:47:26Z")

</div>

Hi, Racket Discourse. I have a macro that controls its internal state via a syntax-parameter which the user toggles via a mnemonic phrase in the macro-body to either on or off over the course of its expansion. Now, thi…

---

## [Memory overflow](https://racket.discourse.group/t/memory-overflow/3226)

<div class="topic-metadata">

**Author:** [@joskoot](https://racket.discourse.group/u/joskoot)\
**Replies:** 5\
**Last updated:** [October 19, 2024, 8:29pm UTC](https://racket.discourse.group/t/memory-overflow/3226 "2024-10-19T20:29:51Z")

</div>

From the docs: exn:fail:out-of-memory Raised for an error due to insufficient memory, in cases where sufficient memory is at least available for raising the exception. How can sufficient memory be available when the m…

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

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