# Questions & Answers

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

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

**Page:** 17

---

## [Redex- rendering multiple where clauses on separate lines](https://racket.discourse.group/t/redex-rendering-multiple-where-clauses-on-separate-lines/2630)

<div class="topic-metadata">

**Author:** [@oflatt](https://racket.discourse.group/u/oflatt)\
**Replies:** 6\
**Last updated:** [January 1, 2024, 8:57pm UTC](https://racket.discourse.group/t/redex-rendering-multiple-where-clauses-on-separate-lines/2630 "2024-01-01T20:57:39Z")

</div>

I'm writing a semantics for egglog and struggling to get good output from render-reduction-relation. I often use many where clauses to bind intermediate values, and these are all rendered in-line: Is there a way to …

---

## ['undefined tag' when building package scribble](https://racket.discourse.group/t/undefined-tag-when-building-package-scribble/2624)

<div class="topic-metadata">

**Author:** [@houpt](https://racket.discourse.group/u/houpt)\
**Replies:** 2\
**Last updated:** [December 31, 2023, 5:55pm UTC](https://racket.discourse.group/t/undefined-tag-when-building-package-scribble/2624 "2023-12-31T17:55:43Z")

</div>

Long time, first time. I've posted my first package('circular-layout') to pkgs.racket-lang.org, and the process was very easy -- except I get some cross-reference errors when the documentation is built by 'raco pkg ins…

---

## [Implementing generic interface method outside of interface definition](https://racket.discourse.group/t/implementing-generic-interface-method-outside-of-interface-definition/2621)

<div class="topic-metadata">

**Author:** [@rvdalen](https://racket.discourse.group/u/rvdalen)\
**Replies:** 0\
**Last updated:** [December 27, 2023, 8:59am UTC](https://racket.discourse.group/t/implementing-generic-interface-method-outside-of-interface-definition/2621 "2023-12-27T08:59:56Z")

</div>

Hi Racketeers, I am learning Racket and busy working through Generic Interfaces. I was wondering if it is possible to provide an implementation for a generic interface outside of the (struct) form definition. For exam…

---

## [Debugging using Racket mode in Emacs](https://racket.discourse.group/t/debugging-using-racket-mode-in-emacs/2606)

<div class="topic-metadata">

**Author:** [@sameertj](https://racket.discourse.group/u/sameertj)\
**Replies:** 1\
**Last updated:** [December 20, 2023, 2:02am UTC](https://racket.discourse.group/t/debugging-using-racket-mode-in-emacs/2606 "2023-12-20T02:02:12Z")

</div>

Can one use the debug option in Racket Mode in Emacs to step through functions? I have been going through the documentation but struggling to get it to work. If it works is there some site or video that explains the pro…

---

## [(System "command") problem](https://racket.discourse.group/t/system-command-problem/2540)

<div class="topic-metadata">

**Author:** [@matteo-daddio](https://racket.discourse.group/u/matteo-daddio)\
**Replies:** 5\
**Last updated:** [December 16, 2023, 2:58pm UTC](https://racket.discourse.group/t/system-command-problem/2540 "2023-12-16T14:58:17Z")

</div>

Hello, I'm working on Kubuntu and i'm trying to use rclone for backups. I wrote a simple script with racket/system: #!/snap/bin/racket #lang racket/base (require racket/system) (newline) (displayln " The command \\…

---

## [Optional Scribble Sections; General Macro for Inclusion / Exclusion of Code](https://racket.discourse.group/t/optional-scribble-sections-general-macro-for-inclusion-exclusion-of-code/2329)

<div class="topic-metadata">

**Author:** [@bakgatviooldoos](https://racket.discourse.group/u/bakgatviooldoos)\
**Replies:** 6\
**Last updated:** [December 14, 2023, 7:57am UTC](https://racket.discourse.group/t/optional-scribble-sections-general-macro-for-inclusion-exclusion-of-code/2329 "2023-12-14T07:57:14Z")

</div>

Hi, Racket Discourse. I am wondering whether there is an "obvious" way to include or exclude certain pieces of code based on some form of "check". In particular, I want to exclude and include certain sections in a Scrib…

---

## [Program Expansion w/out DrRacket](https://racket.discourse.group/t/program-expansion-w-out-drracket/2595)

<div class="topic-metadata">

**Author:** [@abhillman](https://racket.discourse.group/u/abhillman)\
**Replies:** 3\
**Last updated:** [December 12, 2023, 9:04pm UTC](https://racket.discourse.group/t/program-expansion-w-out-drracket/2595 "2023-12-12T21:04:53Z")

</div>

Is there an easy way to perform a program expansion without the use of DrRacket?

---

## [Representing Propositional Logic Expressions in Racket](https://racket.discourse.group/t/representing-propositional-logic-expressions-in-racket/2569)

<div class="topic-metadata">

**Author:** [@xabush](https://racket.discourse.group/u/xabush)\
**Replies:** 18\
**Last updated:** [December 12, 2023, 11:04am UTC](https://racket.discourse.group/t/representing-propositional-logic-expressions-in-racket/2569 "2023-12-12T11:04:00Z")

</div>

I'm reading chapter 7 of Russell & Norvig's "Artificial Intelligence: A Modern Approach" textbook that is about designing Logical Agents using propositional logic. The code for the algorithms in the chapter are availabl…

---

## [Subclassing racket/gui editor%](https://racket.discourse.group/t/subclassing-racket-gui-editor/1058)

<div class="topic-metadata">

**Author:** [@jjsimpso](https://racket.discourse.group/u/jjsimpso)\
**Replies:** 7\
**Last updated:** [December 11, 2023, 7:08pm UTC](https://racket.discourse.group/t/subclassing-racket-gui-editor/1058 "2023-12-11T19:08:34Z")

</div>

I want to create a version of the text% editor that can reflow text around images. This is for a simple HTML renderer. I'm looking for advice on how to approach this because it seems like the implementation of racket/gui…

---

## [Is there a way to show preview images in the terminal in the same way the Drracket IDE does?](https://racket.discourse.group/t/is-there-a-way-to-show-preview-images-in-the-terminal-in-the-same-way-the-drracket-ide-does/2588)

<div class="topic-metadata">

**Author:** [@Catoflado](https://racket.discourse.group/u/Catoflado)\
**Replies:** 1\
**Last updated:** [December 10, 2023, 3:32pm UTC](https://racket.discourse.group/t/is-there-a-way-to-show-preview-images-in-the-terminal-in-the-same-way-the-drracket-ide-does/2588 "2023-12-10T15:32:37Z")

</div>

For exemple, if I write: #lang racket (require 2htdp/image) (circle 20 "solid" "blue") In Drracket, it will preview a bitmap circle in the REPL. But using the terminal (with Neovim texteditor) it shows: (object:ima…

---

## [Help with FFI errors (for #lang clingo integration)](https://racket.discourse.group/t/help-with-ffi-errors-for-lang-clingo-integration/2585)

<div class="topic-metadata">

**Author:** [@kiranandcode](https://racket.discourse.group/u/kiranandcode)\
**Replies:** 7\
**Last updated:** [December 10, 2023, 2:56pm UTC](https://racket.discourse.group/t/help-with-ffi-errors-for-lang-clingo-integration/2585 "2023-12-10T14:56:56Z")

</div>

Heya!! This is a long shot, but I figured I'd post here to see if anyone could possibly provide some advice on an FFI integration that I'm currently building and running into some really mind-bending errors. The reposit…

---

## [Coerce #f and pointer in typed racket](https://racket.discourse.group/t/coerce-f-and-pointer-in-typed-racket/2580)

<div class="topic-metadata">

**Author:** [@mode89](https://racket.discourse.group/u/mode89)\
**Replies:** 4\
**Last updated:** [December 10, 2023, 3:19am UTC](https://racket.discourse.group/t/coerce-f-and-pointer-in-typed-racket/2580 "2023-12-10T03:19:50Z")

</div>

There is a function glfwCreateWindow. The last two arguments of this function are of type \_pointer. How to properly import and annotate this function in typed/racket? Here is what I'm doing right now: (require/typed ff…

---

## [Using a C++ library from Racket](https://racket.discourse.group/t/using-a-c-library-from-racket/2581)

<div class="topic-metadata">

**Author:** [@hendrikboom3](https://racket.discourse.group/u/hendrikboom3)\
**Replies:** 1\
**Last updated:** [December 10, 2023, 12:09am UTC](https://racket.discourse.group/t/using-a-c-library-from-racket/2581 "2023-12-10T00:09:20Z")

</div>

I would like to use an existing C++ library from a Racket program. The library is sufficiently complicated that the authors figured they needed C++ How should I go about that? Presumably using the ffi. Is there exist…

---

## [Methods for breaking up web-server files](https://racket.discourse.group/t/methods-for-breaking-up-web-server-files/2578)

<div class="topic-metadata">

**Author:** [@thrilway](https://racket.discourse.group/u/thrilway)\
**Replies:** 0\
**Last updated:** [December 8, 2023, 1:34am UTC](https://racket.discourse.group/t/methods-for-breaking-up-web-server-files/2578 "2023-12-08T01:34:20Z")

</div>

While writing a web-app, I've found my server.rkt file getting a bit unwieldy so I'm trying to break it up some. My first attempt was to put all the rendering functions in to a file separate from the file with the dispat…

---

## [How to get rid of white padding around point-label's text?](https://racket.discourse.group/t/how-to-get-rid-of-white-padding-around-point-labels-text/2577)

<div class="topic-metadata">

**Author:** [@nadeemabdulhamid](https://racket.discourse.group/u/nadeemabdulhamid)\
**Replies:** 1\
**Last updated:** [December 6, 2023, 10:44pm UTC](https://racket.discourse.group/t/how-to-get-rid-of-white-padding-around-point-labels-text/2577 "2023-12-06T22:44:57Z")

</div>

How do I stop plot from putting white padding around point-labels' text? Like in this example, the text isn't really legible because there's white padding around the yellow text: (require plot) (plot3d (list (point-labe…

---

## [Macro stepper and macros with endless recursion](https://racket.discourse.group/t/macro-stepper-and-macros-with-endless-recursion/2564)

<div class="topic-metadata">

**Author:** [@ceving](https://racket.discourse.group/u/ceving)\
**Replies:** 1\
**Last updated:** [December 1, 2023, 2:28pm UTC](https://racket.discourse.group/t/macro-stepper-and-macros-with-endless-recursion/2564 "2023-12-01T14:28:37Z")

</div>

Is it possible to step through macros with endless recursions in order to realize where the endless recursion occurs?

---

## [LLNCS out of date](https://racket.discourse.group/t/llncs-out-of-date/2558)

<div class="topic-metadata">

**Author:** [@Fare](https://racket.discourse.group/u/Fare)\
**Replies:** 3\
**Last updated:** [November 30, 2023, 9:12pm UTC](https://racket.discourse.group/t/llncs-out-of-date/2558 "2023-11-30T21:12:29Z")

</div>

I was trying to compile a package using scribble-llncs (using Racket 8.10) and it failed to download llncs.cls 2.20. Happily, I could Google my way to downloading llncs.cls 2.23, put it where expected and everything stil…

---

## [Lexer: what means "matches no string"?](https://racket.discourse.group/t/lexer-what-means-matches-no-string/2546)

<div class="topic-metadata">

**Author:** [@ceving](https://racket.discourse.group/u/ceving)\
**Replies:** 2\
**Last updated:** [November 28, 2023, 12:01am UTC](https://racket.discourse.group/t/lexer-what-means-matches-no-string/2546 "2023-11-28T00:01:41Z")

</div>

nothing A lexer abbreviation that matches no string. I am not sure if this means never or always. If "no string" is an empty string, this would match always. In that case I would like to know how to stop endless rec…

---

## [Lexer sub-group match](https://racket.discourse.group/t/lexer-sub-group-match/2544)

<div class="topic-metadata">

**Author:** [@ceving](https://racket.discourse.group/u/ceving)\
**Replies:** 1\
**Last updated:** [November 27, 2023, 6:34pm UTC](https://racket.discourse.group/t/lexer-sub-group-match/2544 "2023-11-27T18:34:36Z")

</div>

I have the following code in my lexer in order to parse hex-numbers of the format '#0f'. ((:seq #\\# (:+ (:or numeric (union-mixed "A" "B" "C" "D" "E" "F")))) (token-Hexdecimal (string-\>number (string-append (substring …

---

## [How to use union types?](https://racket.discourse.group/t/how-to-use-union-types/2537)

<div class="topic-metadata">

**Author:** [@Kalimehtar](https://racket.discourse.group/u/Kalimehtar)\
**Replies:** 5\
**Last updated:** [November 26, 2023, 6:00pm UTC](https://racket.discourse.group/t/how-to-use-union-types/2537 "2023-11-26T18:00:19Z")

</div>

If I try (: foo (-\> (U Positive-Exact-Rational Negative-Exact-Rational) Positive-Exact-Rational (U Positive-Exact-Rational Negative-Exact-Rational))) (define (foo a b) (\* a b)) I get type mismatch. But both …

---

## [New installltion of Drracket does not work](https://racket.discourse.group/t/new-installltion-of-drracket-does-not-work/2527)

<div class="topic-metadata">

**Author:** [@greadey](https://racket.discourse.group/u/greadey)\
**Replies:** 1\
**Last updated:** [November 26, 2023, 4:55am UTC](https://racket.discourse.group/t/new-installltion-of-drracket-does-not-work/2527 "2023-11-26T04:55:36Z")

</div>

I recently re-installed my OS (Freebsd). I did it by wiping everything and starting again. As usual I installed DRRacket. In the past it has just worked! Now it starts up in typed racket and no #lang line in the defs …

---

## [Typed racket identifier in Refined type (or define type to length of vector)](https://racket.discourse.group/t/typed-racket-identifier-in-refined-type-or-define-type-to-length-of-vector/2533)

<div class="topic-metadata">

**Author:** [@Hazematman](https://racket.discourse.group/u/Hazematman)\
**Replies:** 1\
**Last updated:** [November 26, 2023, 1:16am UTC](https://racket.discourse.group/t/typed-racket-identifier-in-refined-type-or-define-type-to-length-of-vector/2533 "2023-11-26T01:16:11Z")

</div>

Hello, I'm trying to figure out a way I can use an identifier in a refined type. If this is not possible my end goal is to have a the range of an integer be restricted by some identifier that I can use else where in my …

---

## [What does "No instance for id: 1" mean in the Racket webserver?](https://racket.discourse.group/t/what-does-no-instance-for-id-1-mean-in-the-racket-webserver/2529)

<div class="topic-metadata">

**Author:** [@hendrikboom3](https://racket.discourse.group/u/hendrikboom3)\
**Replies:** 4\
**Last updated:** [November 25, 2023, 10:18pm UTC](https://racket.discourse.group/t/what-does-no-instance-for-id-1-mean-in-the-racket-webserver/2529 "2023-11-25T22:18:10Z")

</div>

Over the past few years I've been getting deeper into the Racket ecosystem, and encountering more obscure problems. Today I seem to be misusing the Racket webserver and failing to understand a message. I'm using the Ra…

---

## [Hyperlinks inside a scribble single file](https://racket.discourse.group/t/hyperlinks-inside-a-scribble-single-file/2519)

<div class="topic-metadata">

**Author:** [@hrvoje064](https://racket.discourse.group/u/hrvoje064)\
**Replies:** 16\
**Last updated:** [November 25, 2023, 4:26pm UTC](https://racket.discourse.group/t/hyperlinks-inside-a-scribble-single-file/2519 "2023-11-25T16:26:43Z")

</div>

I have a problem with my scribble docs for math-quiz. It is a very simple (single) file (my first attempt at this), and contains just a few sections and subsections. Nothing fancy. This all works, except after I introdu…

---

## [Kerning Problem with Latin Modern Roman](https://racket.discourse.group/t/kerning-problem-with-latin-modern-roman/2525)

<div class="topic-metadata">

**Author:** [@ceving](https://racket.discourse.group/u/ceving)\
**Replies:** 4\
**Last updated:** [November 23, 2023, 9:56am UTC](https://racket.discourse.group/t/kerning-problem-with-latin-modern-roman/2525 "2023-11-23T09:56:49Z")

</div>

I have a kerning problem with the font "Latin Modern Roman" (maybe also with others). I wrote a program which draws "Hello, World!" (source at the bottom). Next I made a screenshot and imported the screenshot into Inksca…

---

## [Racket/gui canvas Hello World](https://racket.discourse.group/t/racket-gui-canvas-hello-world/2522)

<div class="topic-metadata">

**Author:** [@ceving](https://racket.discourse.group/u/ceving)\
**Replies:** 5\
**Last updated:** [November 21, 2023, 3:59pm UTC](https://racket.discourse.group/t/racket-gui-canvas-hello-world/2522 "2023-11-21T15:59:14Z")

</div>

Can anybody give me a simple hello-world example using the racket/gui canvas? Just a very minimal program opening a window with a canvas and drawing a text in the middle. I am a newbie and could not find something simila…

---

## [Error: no pattern variables before ellipsis in template](https://racket.discourse.group/t/error-no-pattern-variables-before-ellipsis-in-template/2520)

<div class="topic-metadata">

**Author:** [@ceving](https://racket.discourse.group/u/ceving)\
**Replies:** 3\
**Last updated:** [November 20, 2023, 4:05pm UTC](https://racket.discourse.group/t/error-no-pattern-variables-before-ellipsis-in-template/2520 "2023-11-20T16:05:42Z")

</div>

The following code throws the error: no pattern variables before ellipsis in template I do not understand why ::f\* is no pattern variable. Can anybody explain? #lang racket (define undefined (when #f #f)) (define …

---

## [Documentation feedback : Continuations](https://racket.discourse.group/t/documentation-feedback-continuations/2516)

<div class="topic-metadata">

**Author:** [@dehidehidehi](https://racket.discourse.group/u/dehidehidehi)\
**Replies:** 8\
**Last updated:** [November 18, 2023, 8:24pm UTC](https://racket.discourse.group/t/documentation-feedback-continuations/2516 "2023-11-18T20:24:32Z")

</div>

Good afternoon, There are a couple points I found difficult to follow in the Racket documentation about continuations; the difficulty is not about understanding continuations (even though that also is the case), but mai…

---

## [Vendoring racket packages](https://racket.discourse.group/t/vendoring-racket-packages/2478)

<div class="topic-metadata">

**Author:** [@db7](https://racket.discourse.group/u/db7)\
**Replies:** 8\
**Last updated:** [November 17, 2023, 8:29pm UTC](https://racket.discourse.group/t/vendoring-racket-packages/2478 "2023-11-17T20:29:06Z")

</div>

Hi, I'm looking for a practical way to "vendor" dependencies in a project. We are building a Docker container with Racket and some packages (eg, quickcheck). During the docker build process, we would need to download t…

---

## [Upgrade instructions](https://racket.discourse.group/t/upgrade-instructions/1655)

<div class="topic-metadata">

**Author:** [@hendrikboom3](https://racket.discourse.group/u/hendrikboom3)\
**Replies:** 3\
**Last updated:** [November 17, 2023, 9:09am UTC](https://racket.discourse.group/t/upgrade-instructions/1655 "2023-11-17T09:09:07Z")

</div>

The page Racket v8.7 contains links to https://download.racket-lang.org/ . At least for the Linux version that page explains how to install Racket 8.7. Perhaps it should also explain how to upgrade to 8.7 from a previou…

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

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