# Questions & Answers

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

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

**Page:** 4

---

## [Close a %frame programatically](https://racket.discourse.group/t/close-a-frame-programatically/4019)

<div class="topic-metadata">

**Author:** [@hendrikboom3](https://racket.discourse.group/u/hendrikboom3)\
**Replies:** 1\
**Last updated:** [November 22, 2025, 4:11pm UTC](https://racket.discourse.group/t/close-a-frame-programatically/4019 "2025-11-22T16:11:00Z")

</div>

How do I close a top-level %frame? Of course I can click on the close button the OS provides me at the top right corner. But what if the program I am running wants to initiate the close without user involvement? And t…

---

## [I cannot use SLLGEN on Racket 8.18: “collection not found: sllgen”](https://racket.discourse.group/t/i-cannot-use-sllgen-on-racket-8-18-collection-not-found-sllgen/4016)

<div class="topic-metadata">

**Author:** [@d1n0](https://racket.discourse.group/u/d1n0)\
**Replies:** 1\
**Last updated:** [November 20, 2025, 3:39pm UTC](https://racket.discourse.group/t/i-cannot-use-sllgen-on-racket-8-18-collection-not-found-sllgen/4016 "2025-11-20T15:39:29Z")

</div>

I'm trying to use SLLGEN in Racket 8.18, but it doesn't exist as a collection. require sllgen fails. raco pkg install fails due to SSL errors. What's the correct/current way to get SLLGEN in modern Racket?

---

## [Transparent Syntax Extensions](https://racket.discourse.group/t/transparent-syntax-extensions/4007)

<div class="topic-metadata">

**Author:** [@selfofly](https://racket.discourse.group/u/selfofly)\
**Replies:** 18\
**Last updated:** [November 20, 2025, 7:25am UTC](https://racket.discourse.group/t/transparent-syntax-extensions/4007 "2025-11-20T07:25:01Z")

</div>

Hello everyone! My question is: is there a way in Racket to implement transparent syntax extensions from inside the language? What I mean is I’d like to be able to (somehow) define a new syntax object of arbitrary form…

---

## [Cond-expand in Racket](https://racket.discourse.group/t/cond-expand-in-racket/4000)

<div class="topic-metadata">

**Author:** [@damien\_mattei](https://racket.discourse.group/u/damien_mattei)\
**Replies:** 9\
**Last updated:** [November 14, 2025, 6:48pm UTC](https://racket.discourse.group/t/cond-expand-in-racket/4000 "2025-11-14T18:48:49Z")

</div>

Hi, i have some code, not written by me, i want to port to Racket and it uses cond-expand (see SRFI 0) to adapt to each scheme implementation,for example Chicken or Guile had a feature guile that exists when guile compi…

---

## [Racket and DuckDB](https://racket.discourse.group/t/racket-and-duckdb/4003)

<div class="topic-metadata">

**Author:** [@jw\_gpc](https://racket.discourse.group/u/jw_gpc)\
**Replies:** 2\
**Last updated:** [November 13, 2025, 10:59am UTC](https://racket.discourse.group/t/racket-and-duckdb/4003 "2025-11-13T10:59:21Z")

</div>

Hello! I was wondering if anyone is using DuckDB with Racket. I know the db library works with SQLite, but I was interesting in trying out testing out DuckDB instead, and I haven't been able to find any references onli…

---

## [Source code of rec from SRFI 31](https://racket.discourse.group/t/source-code-of-rec-from-srfi-31/3997)

<div class="topic-metadata">

**Author:** [@damien\_mattei](https://racket.discourse.group/u/damien_mattei)\
**Replies:** 9\
**Last updated:** [November 7, 2025, 1:50pm UTC](https://racket.discourse.group/t/source-code-of-rec-from-srfi-31/3997 "2025-11-07T13:50:28Z")

</div>

Hi, i searched a moment before asking in racket mailing list. There is a definition of rec in the official SRFI 31 that i recopy here: (define-syntax rec (syntax-rules () ((rec (NAME . VARIABLES) . BODY) …

---

## [Postgres and Custom Types](https://racket.discourse.group/t/postgres-and-custom-types/3996)

<div class="topic-metadata">

**Author:** [@bakgatviooldoos](https://racket.discourse.group/u/bakgatviooldoos)\
**Replies:** 3\
**Last updated:** [November 4, 2025, 5:32pm UTC](https://racket.discourse.group/t/postgres-and-custom-types/3996 "2025-11-04T17:32:09Z")

</div>

Hi, Racket Discourse. I am messing around with embeddings, and I need some help getting a custom type to work. Using the pg\_vector extension to Postgres (running version 17), I can send an embedding vector to the datab…

---

## [Waiting for click with gui-easy](https://racket.discourse.group/t/waiting-for-click-with-gui-easy/3992)

<div class="topic-metadata">

**Author:** [@hendrikboom3](https://racket.discourse.group/u/hendrikboom3)\
**Replies:** 1\
**Last updated:** [October 29, 2025, 4:30pm UTC](https://racket.discourse.group/t/waiting-for-click-with-gui-easy/3992 "2025-10-29T16:30:57Z")

</div>

I'm using gui-easy ( gui-easy: Declarative GUIs ) to put up a menu that contains several buttons. The buttons contain functions that do what must be done when the button is clicked? Putting up the menu works. But afte…

---

## [Timing compile time phase](https://racket.discourse.group/t/timing-compile-time-phase/3991)

<div class="topic-metadata">

**Author:** [@sora22](https://racket.discourse.group/u/sora22)\
**Replies:** 1\
**Last updated:** [October 29, 2025, 1:54pm UTC](https://racket.discourse.group/t/timing-compile-time-phase/3991 "2025-10-29T13:54:53Z")

</div>

Is there anyone aware of a way to benchmark compile time phases? I haven’t found any in my searches online

---

## [Changing arrows using syntax properties?](https://racket.discourse.group/t/changing-arrows-using-syntax-properties/3990)

<div class="topic-metadata">

**Author:** [@sora22](https://racket.discourse.group/u/sora22)\
**Replies:** 1\
**Last updated:** [October 28, 2025, 9:45pm UTC](https://racket.discourse.group/t/changing-arrows-using-syntax-properties/3990 "2025-10-28T21:45:48Z")

</div>

I am currently trying to fix the binding arrows? I'm not actually sure what they're formally called, with some macros I am writing so they only point to the identifiers actually being referenced. Currently they are also …

---

## [Using syntax/loc with ellipsis](https://racket.discourse.group/t/using-syntax-loc-with-ellipsis/3935)

<div class="topic-metadata">

**Author:** [@sora22](https://racket.discourse.group/u/sora22)\
**Replies:** 7\
**Last updated:** [October 28, 2025, 6:56pm UTC](https://racket.discourse.group/t/using-syntax-loc-with-ellipsis/3935 "2025-10-28T18:56:53Z")

</div>

I'm currently writing a macro where I need to use syntax/loc in combination with an ellipsis, the following code is akin to the problem I'm having: #lang racket/base (require (for-syntax racket/base …

---

## [DSL coloring question](https://racket.discourse.group/t/dsl-coloring-question/3970)

<div class="topic-metadata">

**Author:** [@ToddOBryan](https://racket.discourse.group/u/ToddOBryan)\
**Replies:** 7\
**Last updated:** [October 28, 2025, 4:29pm UTC](https://racket.discourse.group/t/dsl-coloring-question/3970 "2025-10-28T16:29:45Z")

</div>

I'm trying to create a DSL (for AP Comp Sci Principles' Pseudocode) and would like a few more categories for the syntax colorer. Are those permanently fixed such that they can't be changed? If so, is there a way to load …

---

## [Require in htdp/bsl](https://racket.discourse.group/t/require-in-htdp-bsl/3988)

<div class="topic-metadata">

**Author:** [@ToddOBryan](https://racket.discourse.group/u/ToddOBryan)\
**Replies:** 4\
**Last updated:** [October 28, 2025, 4:28pm UTC](https://racket.discourse.group/t/require-in-htdp-bsl/3988 "2025-10-28T16:28:24Z")

</div>

How could I allow students to use read and display in BSL? I've tried (require (only-in racket/base read)) but get an error saying that the module has to be a string or a lib or planet form. I know why they're not prov…

---

## [How to implement parallel-or?](https://racket.discourse.group/t/how-to-implement-parallel-or/3987)

<div class="topic-metadata">

**Author:** [@ohqo](https://racket.discourse.group/u/ohqo)\
**Replies:** 3\
**Last updated:** [October 27, 2025, 11:42pm UTC](https://racket.discourse.group/t/how-to-implement-parallel-or/3987 "2025-10-27T23:42:20Z")

</div>

The parallel-or operation allows you to run two computations in parallel and either immediately returns true if one of the computations halts with true or returns false if both computations halt with false. I couldn't f…

---

## [FFI Callback stdio](https://racket.discourse.group/t/ffi-callback-stdio/3984)

<div class="topic-metadata">

**Author:** [@ThePuzzlemaker](https://racket.discourse.group/u/ThePuzzlemaker)\
**Replies:** 1\
**Last updated:** [October 27, 2025, 12:14pm UTC](https://racket.discourse.group/t/ffi-callback-stdio/3984 "2025-10-27T12:14:12Z")

</div>

How can I do I/O to stdin/out/err in an FFI callback? Is it simply impossible (as the docs would lead me to believe, at least for the CS backend)? I don't care about if anything on the current OS thread blocks during th…

---

## [How to use subprocess](https://racket.discourse.group/t/how-to-use-subprocess/3982)

<div class="topic-metadata">

**Author:** [@AndreMayers](https://racket.discourse.group/u/AndreMayers)\
**Replies:** 4\
**Last updated:** [October 25, 2025, 5:48pm UTC](https://racket.discourse.group/t/how-to-use-subprocess/3982 "2025-10-25T17:48:37Z")

</div>

In the following code, st-out is always #f. Why? I tried several variants of the following code. (set st-in (open the output file "out-file.txt")) (set st-out (open input file "in-file.txt" )) (define-values (newp…

---

## [Gathering macro-time information](https://racket.discourse.group/t/gathering-macro-time-information/3981)

<div class="topic-metadata">

**Author:** [@hendrikboom3](https://racket.discourse.group/u/hendrikboom3)\
**Replies:** 2\
**Last updated:** [October 25, 2025, 3:58am UTC](https://racket.discourse.group/t/gathering-macro-time-information/3981 "2025-10-25T03:58:26Z")

</div>

Context: Now I am implementing in Racket a few of the control structures of Ink, a notation for writing text adventure games. (If you are interested, see Writing web-based interactive fiction with ink ) I have the fol…

---

## [Providing new forms to shplait](https://racket.discourse.group/t/providing-new-forms-to-shplait/3978)

<div class="topic-metadata">

**Author:** [@kimmyg](https://racket.discourse.group/u/kimmyg)\
**Replies:** 1\
**Last updated:** [October 22, 2025, 4:31pm UTC](https://racket.discourse.group/t/providing-new-forms-to-shplait/3978 "2025-10-22T16:31:51Z")

</div>

I would like a single module to provide both a new datatype and new expression form to importing shplait modules. The expression form is defined as a macro but AFAICT isn’t expressible using shplait’s restricted macros. …

---

## [Execute thrice only](https://racket.discourse.group/t/execute-thrice-only/3974)

<div class="topic-metadata">

**Author:** [@hendrikboom3](https://racket.discourse.group/u/hendrikboom3)\
**Replies:** 4\
**Last updated:** [October 19, 2025, 12:55am UTC](https://racket.discourse.group/t/execute-thrice-only/3974 "2025-10-19T00:55:27Z")

</div>

Let's say I want a particular piece of code to execute at most three times within the execution of a larger program. The obvious code is something like (define globalcounter 3) and where I have the piece of code I wra…

---

## [Providing name only to sub-module?](https://racket.discourse.group/t/providing-name-only-to-sub-module/3918)

<div class="topic-metadata">

**Author:** [@pcn](https://racket.discourse.group/u/pcn)\
**Replies:** 11\
**Last updated:** [October 12, 2025, 12:06am UTC](https://racket.discourse.group/t/providing-name-only-to-sub-module/3918 "2025-10-12T00:06:45Z")

</div>

Context: Inspired by Lean's #guard commands, I'd like to implement "static unit tests" in Racket, where tests give the same interactive feedback as types. An example would look something like below: (define (factorial …

---

## [Return from a lambda](https://racket.discourse.group/t/return-from-a-lambda/3960)

<div class="topic-metadata">

**Author:** [@damien\_mattei](https://racket.discourse.group/u/damien_mattei)\
**Replies:** 11\
**Last updated:** [October 8, 2025, 8:46am UTC](https://racket.discourse.group/t/return-from-a-lambda/3960 "2025-10-08T08:46:19Z")

</div>

Hi, i have some functions def that allow returning early from function defined. But i have a few difficulties to pass from the version 'define to the version 'lambda. 'def is defined this way (code shortened): (modul…

---

## [How to get the cool v8.18.0.15-2025-09-17-47ef361823 version?](https://racket.discourse.group/t/how-to-get-the-cool-v8-18-0-15-2025-09-17-47ef361823-version/3949)

<div class="topic-metadata">

**Author:** [@shhyou](https://racket.discourse.group/u/shhyou)\
**Replies:** 1\
**Last updated:** [October 1, 2025, 7:56am UTC](https://racket.discourse.group/t/how-to-get-the-cool-v8-18-0-15-2025-09-17-47ef361823-version/3949 "2025-10-01T07:56:00Z")

</div>

Only recently I noticed that building Racket from Git HEAD gave the cool commit-sha version. I suppose this has be added to Racket for a long time, but I still don't get the commit-sha versions when building the git clon…

---

## [What's the idiomatic way of using untyped collections/data structures in typed code?](https://racket.discourse.group/t/whats-the-idiomatic-way-of-using-untyped-collections-data-structures-in-typed-code/3958)

<div class="topic-metadata">

**Author:** [@ohqo](https://racket.discourse.group/u/ohqo)\
**Replies:** 7\
**Last updated:** [September 27, 2025, 5:53pm UTC](https://racket.discourse.group/t/whats-the-idiomatic-way-of-using-untyped-collections-data-structures-in-typed-code/3958 "2025-09-27T17:53:56Z")

</div>

The data-lib library has many useful data structures that are missing from the typed racket standard library. Following the documentation on interacting with untyped code, I was able to use the #:opaque type to import th…

---

## [Can typed racket be used to decrease memory usage?](https://racket.discourse.group/t/can-typed-racket-be-used-to-decrease-memory-usage/3946)

<div class="topic-metadata">

**Author:** [@sora22](https://racket.discourse.group/u/sora22)\
**Replies:** 3\
**Last updated:** [September 23, 2025, 3:24pm UTC](https://racket.discourse.group/t/can-typed-racket-be-used-to-decrease-memory-usage/3946 "2025-09-23T15:24:02Z")

</div>

I'm trying to reduce the memory usage of a tool I'm helping to develop, and was wondering if typed racket could help me? The example I had in mind was a vector of type (Mutable-Vectorof Byte). Does typed racket only guar…

---

## [Resolving/expanding syntax object in context of specific module](https://racket.discourse.group/t/resolving-expanding-syntax-object-in-context-of-specific-module/3954)

<div class="topic-metadata">

**Author:** [@kimmyg](https://racket.discourse.group/u/kimmyg)\
**Replies:** 2\
**Last updated:** [September 23, 2025, 1:31am UTC](https://racket.discourse.group/t/resolving-expanding-syntax-object-in-context-of-specific-module/3954 "2025-09-23T01:31:24Z")

</div>

I am defining a macro in a rhombus module that produces legal shplait syntax and is intended to be accessed by a module written in shplait. What is the most direct and/or preferred way to associate the shplait language …

---

## [Can Racket's arrays have arrays as elements?](https://racket.discourse.group/t/can-rackets-arrays-have-arrays-as-elements/3952)

<div class="topic-metadata">

**Author:** [@Gambiteer](https://racket.discourse.group/u/Gambiteer)\
**Replies:** 2\
**Last updated:** [September 22, 2025, 5:00pm UTC](https://racket.discourse.group/t/can-rackets-arrays-have-arrays-as-elements/3952 "2025-09-22T17:00:43Z")

</div>

I looked through the math/array documentation, and it wasn't clear to me whether Racket's arrays can have arrays as elements. This question arose in my mind because if arrays can have arrays as elements, I am a bit conf…

---

## [Type matching in typed Racket](https://racket.discourse.group/t/type-matching-in-typed-racket/3941)

<div class="topic-metadata">

**Author:** [@hendrikboom3](https://racket.discourse.group/u/hendrikboom3)\
**Replies:** 1\
**Last updated:** [September 16, 2025, 8:18pm UTC](https://racket.discourse.group/t/type-matching-in-typed-racket/3941 "2025-09-16T20:18:56Z")

</div>

Trying to use match in type Racket, I wonder if there is a match pattern that can test the type of a value? If I have define a type Frummich, is there a math pattern I can use to tell whether value being matched is in …

---

## [Why is scheduling this future from a thread slower than scheduling it from the main thread?](https://racket.discourse.group/t/why-is-scheduling-this-future-from-a-thread-slower-than-scheduling-it-from-the-main-thread/3940)

<div class="topic-metadata">

**Author:** [@jrkalyan](https://racket.discourse.group/u/jrkalyan)\
**Replies:** 2\
**Last updated:** [September 16, 2025, 5:37pm UTC](https://racket.discourse.group/t/why-is-scheduling-this-future-from-a-thread-slower-than-scheduling-it-from-the-main-thread/3940 "2025-09-16T17:37:19Z")

</div>

I'm interested in having a synchronization event available for work started in parallel via a future, so that I can combine it with other synchronization events. The first thing I tried was using a new green thread that …

---

## [Hide #:id something in the left panel column in scribble](https://racket.discourse.group/t/hide-id-something-in-the-left-panel-column-in-scribble/3937)

<div class="topic-metadata">

**Author:** [@damien\_mattei](https://racket.discourse.group/u/damien_mattei)\
**Replies:** 4\
**Last updated:** [September 11, 2025, 8:18am UTC](https://racket.discourse.group/t/hide-id-something-in-the-left-panel-column-in-scribble/3937 "2025-09-11T08:18:17Z")

</div>

hi, another question in documenting infix in the prefix world of scribble :slightly\_smiling\_face: @defform\[#:id \\: {T\[begin : end\]}\]{ Slicing of vectors or strings. } @codeblock|{ {"elephant"\[2 : 5\]} "eph" }| @deffor…

---

## [How to serialize/deserialize text editors and structures including text editors](https://racket.discourse.group/t/how-to-serialize-deserialize-text-editors-and-structures-including-text-editors/3605)

<div class="topic-metadata">

**Author:** [@eric-badouel](https://racket.discourse.group/u/eric-badouel)\
**Replies:** 7\
**Last updated:** [September 9, 2025, 2:11am UTC](https://racket.discourse.group/t/how-to-serialize-deserialize-text-editors-and-structures-including-text-editors/3605 "2025-09-09T02:11:30Z")

</div>

I'm trying to develop a program to manipulate and edit a zipper whose nodes are text editors (objects in the text% class). More precisely, a node is an instance of a class derived from text%, which can include additional…

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

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