# Questions & Answers

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

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

**Page:** 24

---

## [Is \`(unsafe-struct\*-ref s -1)\` a stable way to get type descriptors in Racket?](https://racket.discourse.group/t/is-unsafe-struct-ref-s-1-a-stable-way-to-get-type-descriptors-in-racket/1646)

<div class="topic-metadata">

**Author:** [@MartianMoorGrove](https://racket.discourse.group/u/MartianMoorGrove)\
**Replies:** 6\
**Last updated:** [January 20, 2023, 12:59am UTC](https://racket.discourse.group/t/is-unsafe-struct-ref-s-1-a-stable-way-to-get-type-descriptors-in-racket/1646 "2023-01-20T00:59:37Z")

</div>

By stable I mean that the location of struct type descriptors within struct instances is, within reason, a permanent feature of the language. Obviously on it's own that code is both unsafe and useless on impersonators, …

---

## [Does anyone know of a working implementation of the ActivityPub protocol in Racket?](https://racket.discourse.group/t/does-anyone-know-of-a-working-implementation-of-the-activitypub-protocol-in-racket/1571)

<div class="topic-metadata">

**Author:** [@spdegabrielle](https://racket.discourse.group/u/spdegabrielle)\
**Replies:** 7\
**Last updated:** [January 18, 2023, 2:20pm UTC](https://racket.discourse.group/t/does-anyone-know-of-a-working-implementation-of-the-activitypub-protocol-in-racket/1571 "2023-01-18T14:20:27Z")

</div>

Does anyone know of a working implementation of the ActivityPub protocol in Racket? s.

---

## [Macro Output Spliced into Context](https://racket.discourse.group/t/macro-output-spliced-into-context/1641)

<div class="topic-metadata">

**Author:** [@Liam.Gaudy](https://racket.discourse.group/u/Liam.Gaudy)\
**Replies:** 9\
**Last updated:** [January 17, 2023, 5:13pm UTC](https://racket.discourse.group/t/macro-output-spliced-into-context/1641 "2023-01-17T17:13:07Z")

</div>

I was just about to give up on doing the below, when I thought it might be fun for a more experienced person to offer advice. I have this repetitive cond for a comparator, with my thanks to @notjack for writing such impo…

---

## [Set input text box scroll position? (gui-easy)](https://racket.discourse.group/t/set-input-text-box-scroll-position-gui-easy/1638)

<div class="topic-metadata">

**Author:** [@joeld](https://racket.discourse.group/u/joeld)\
**Replies:** 5\
**Last updated:** [January 16, 2023, 4:39pm UTC](https://racket.discourse.group/t/set-input-text-box-scroll-position-gui-easy/1638 "2023-01-16T16:39:52Z")

</div>

I’m creating my first GUI app, and I want to use input (from gui-easy) to display the output of a long-running command in "real time" (i.e. not waiting until the command is finished). When the output has more lines than …

---

## [Snippets in DrRacket?](https://racket.discourse.group/t/snippets-in-drracket/1633)

<div class="topic-metadata">

**Author:** [@Panadestein](https://racket.discourse.group/u/Panadestein)\
**Replies:** 2\
**Last updated:** [January 11, 2023, 6:40pm UTC](https://racket.discourse.group/t/snippets-in-drracket/1633 "2023-01-11T18:40:36Z")

</div>

Maybe I am missing something in the DrRacket workflow, but I find this to be a very useful feature in any text editor. I have been googling for a while, and I haven't found an answer for this. With snippets, I mean code…

---

## [Why is plot slower with unicode symbols in ticks?](https://racket.discourse.group/t/why-is-plot-slower-with-unicode-symbols-in-ticks/1611)

<div class="topic-metadata">

**Author:** [@benknoble](https://racket.discourse.group/u/benknoble)\
**Replies:** 25\
**Last updated:** [January 10, 2023, 3:44pm UTC](https://racket.discourse.group/t/why-is-plot-slower-with-unicode-symbols-in-ticks/1611 "2023-01-10T15:44:52Z")

</div>

I have some plot code for dice statistics (unfinished). It seems from some observations that using unicode characters in the y-axis ticks makes the plot nearly unresponsive. Conversely, using ASCII-only characters has no…

---

## [Places parallelism -- how to return ASAP after 1st answer](https://racket.discourse.group/t/places-parallelism-how-to-return-asap-after-1st-answer/1626)

<div class="topic-metadata">

**Author:** [@rscho](https://racket.discourse.group/u/rscho)\
**Replies:** 3\
**Last updated:** [January 9, 2023, 2:36pm UTC](https://racket.discourse.group/t/places-parallelism-how-to-return-asap-after-1st-answer/1626 "2023-01-09T14:36:27Z")

</div>

Hi, Taking the example program for places from the docs: (let (\[pls (for/list (\[i (in-range 2)\]) (dynamic-place "place-worker.rkt" 'place-main))\]) (for (\[i (in-range 2)\] \[p pls\]) (place-…

---

## [Usage of code-examples in scribble](https://racket.discourse.group/t/usage-of-code-examples-in-scribble/1628)

<div class="topic-metadata">

**Author:** [@Panadestein](https://racket.discourse.group/u/Panadestein)\
**Replies:** 4\
**Last updated:** [January 9, 2023, 12:13am UTC](https://racket.discourse.group/t/usage-of-code-examples-in-scribble/1628 "2023-01-09T00:13:56Z")

</div>

Hello everyone, I have been recently working on SICP with Chez Scheme. I was using Emacs with org-mode to organize my solutions using literate programming, and then exporting them to HTML. Then I read about Racket, DrR…

---

## [Using brag as a submodule](https://racket.discourse.group/t/using-brag-as-a-submodule/1622)

<div class="topic-metadata">

**Author:** [@bremner](https://racket.discourse.group/u/bremner)\
**Replies:** 0\
**Last updated:** [January 5, 2023, 11:24pm UTC](https://racket.discourse.group/t/using-brag-as-a-submodule/1622 "2023-01-05T23:24:48Z")

</div>

When I was using ragg in class, I could use something like (module grammar1 ragg/sexp/lang dog: sentence+ sentence: BARK+ "." ) (require (prefix-in grammar1: (submod "." grammar1))) to embed a brag grammar inside e.g…

---

## [Scaling x vs y axes in 2d plots using plot package (aka aspect ratio ?)](https://racket.discourse.group/t/scaling-x-vs-y-axes-in-2d-plots-using-plot-package-aka-aspect-ratio/1585)

<div class="topic-metadata">

**Author:** [@tbhanson](https://racket.discourse.group/u/tbhanson)\
**Replies:** 3\
**Last updated:** [December 31, 2022, 4:16pm UTC](https://racket.discourse.group/t/scaling-x-vs-y-axes-in-2d-plots-using-plot-package-aka-aspect-ratio/1585 "2022-12-31T16:16:44Z")

</div>

hi, I'm trying out the powerful plotting functions described in 1 Introduction I have a question starting at the first example: (plot (function sin (- pi) pi #:label "y = sin(x)")) By default evidently, the plottin…

---

## [Cond different in definitions and interactions of DrRacket](https://racket.discourse.group/t/cond-different-in-definitions-and-interactions-of-drracket/1586)

<div class="topic-metadata">

**Author:** [@joskoot](https://racket.discourse.group/u/joskoot)\
**Replies:** 2\
**Last updated:** [December 31, 2022, 9:41am UTC](https://racket.discourse.group/t/cond-different-in-definitions-and-interactions-of-drracket/1586 "2022-12-31T09:41:38Z")

</div>

DrRacket version 7.8 (both CS and BC), Windows 10. In definitions window: (not running it, background expansion enabled) or (back-ground expansion disabled and running it): (cond (#t 'monkey) (is this ignored?)) --\> …

---

## [Failed to match syntax-case for some literal names if using read-syntax](https://racket.discourse.group/t/failed-to-match-syntax-case-for-some-literal-names-if-using-read-syntax/1583)

<div class="topic-metadata">

**Author:** [@corpix](https://racket.discourse.group/u/corpix)\
**Replies:** 1\
**Last updated:** [December 28, 2022, 1:54am UTC](https://racket.discourse.group/t/failed-to-match-syntax-case-for-some-literal-names-if-using-read-syntax/1583 "2022-12-28T01:54:20Z")

</div>

Hi. Can't understand why I can't match some literal-id's with syntax-case. Here is a successful match example: \> (let ((stx #'(load 'hello))) (syntax-case stx (load) ((load expr) (syntax expr)))) #\<syntax::73…

---

## [Error 'unbound identifier' while read-syntax on expand phase](https://racket.discourse.group/t/error-unbound-identifier-while-read-syntax-on-expand-phase/1582)

<div class="topic-metadata">

**Author:** [@corpix](https://racket.discourse.group/u/corpix)\
**Replies:** 1\
**Last updated:** [December 27, 2022, 11:16pm UTC](https://racket.discourse.group/t/error-unbound-identifier-while-read-syntax-on-expand-phase/1582 "2022-12-27T23:16:21Z")

</div>

Hi! I have a problem which I could not wrap my head around... There is an error 'unbound identifier' in transform stage when I try to load some configuration with 'read-syntax'. This works at runtime stage. What I try …

---

## [Revocation in Racklog](https://racket.discourse.group/t/revocation-in-racklog/1535)

<div class="topic-metadata">

**Author:** [@hendrikboom3](https://racket.discourse.group/u/hendrikboom3)\
**Replies:** 7\
**Last updated:** [December 24, 2022, 12:44pm UTC](https://racket.discourse.group/t/revocation-in-racklog/1535 "2022-12-24T12:44:42Z")

</div>

It's been suggested I look into something like Racklog to store the state data base of a text adventure game. But I see a problem. Actions in the game can change the state of the world. Racklog has operations like (…

---

## [Work with MS COM objects (e.g. Word)](https://racket.discourse.group/t/work-with-ms-com-objects-e-g-word/1573)

<div class="topic-metadata">

**Author:** [@burque505](https://racket.discourse.group/u/burque505)\
**Replies:** 4\
**Last updated:** [December 23, 2022, 6:19pm UTC](https://racket.discourse.group/t/work-with-ms-com-objects-e-g-word/1573 "2022-12-23T18:19:52Z")

</div>

Thanks in advance for all help. I am in my first few minutes using Racket 8.7 on Win10 Pro 64-bit. I want to work with Microsoft COM objects using Racket. Using ChatGPT I asked how to work with MS COM objects in Racket.…

---

## [No static type checking of 'in-list' form used in 'for'?](https://racket.discourse.group/t/no-static-type-checking-of-in-list-form-used-in-for/1548)

<div class="topic-metadata">

**Author:** [@jbclements](https://racket.discourse.group/u/jbclements)\
**Replies:** 2\
**Last updated:** [December 22, 2022, 10:15pm UTC](https://racket.discourse.group/t/no-static-type-checking-of-in-list-form-used-in-for/1548 "2022-12-22T22:15:09Z")

</div>

I was surprised by this program's type-checking behavior: #lang typed/racket (define definitely-not-a-list string-length) ;; this doesn't type-check: #;(in-list definitely-not-a-list) ;; and neither does this #;(for/…

---

## [Trouble running RacketScript outside of playground](https://racket.discourse.group/t/trouble-running-racketscript-outside-of-playground/1537)

<div class="topic-metadata">

**Author:** [@Eggb3rt](https://racket.discourse.group/u/Eggb3rt)\
**Replies:** 3\
**Last updated:** [December 22, 2022, 2:31pm UTC](https://racket.discourse.group/t/trouble-running-racketscript-outside-of-playground/1537 "2022-12-22T14:31:07Z")

</div>

Hi, all. I'm trying to port a project I made to RacketScript. While everything in the playground works great I'm unable to run the JS outside the playground. Here's a minimal example: #lang racket (require racketscript…

---

## [Package building seems stop working](https://racket.discourse.group/t/package-building-seems-stop-working/1568)

<div class="topic-metadata">

**Author:** [@simmone](https://racket.discourse.group/u/simmone)\
**Replies:** 2\
**Last updated:** [December 22, 2022, 6:44am UTC](https://racket.discourse.group/t/package-building-seems-stop-working/1568 "2022-12-22T06:44:47Z")

</div>

I updated a package, build failed, I fix it and update github. But I found this package is not rebuild any more. I click out the fails link, I found the build time is December 15, today is 22, something wrong?

---

## [findMethodByExample in Racket?](https://racket.discourse.group/t/findmethodbyexample-in-racket/1019)

<div class="topic-metadata">

**Author:** [@rscho](https://racket.discourse.group/u/rscho)\
**Replies:** 13\
**Last updated:** [December 20, 2022, 8:58pm UTC](https://racket.discourse.group/t/findmethodbyexample-in-racket/1019 "2022-12-20T20:58:16Z")

</div>

I've been looking at the findMethodByExample feature from Smalltalk, that does just what it says. I've also been wondering about a Racket implementation. Because I recently witnessed some criticism about Racket's discove…

---

## [Beginner: A good base case for recursion?](https://racket.discourse.group/t/beginner-a-good-base-case-for-recursion/1560)

<div class="topic-metadata">

**Author:** [@late\_bloomer](https://racket.discourse.group/u/late_bloomer)\
**Replies:** 13\
**Last updated:** [December 20, 2022, 5:16pm UTC](https://racket.discourse.group/t/beginner-a-good-base-case-for-recursion/1560 "2022-12-20T17:16:33Z")

</div>

Hi there! I'm having trouble figuring out what would constitute a good stopping condition in this exercise where a function consumes a ListOfSchools and produces a School... When such functions deal with numbers, I hav…

---

## [New package: bitwise-ops](https://racket.discourse.group/t/new-package-bitwise-ops/1557)

<div class="topic-metadata">

**Author:** [@dstorrs](https://racket.discourse.group/u/dstorrs)\
**Replies:** 2\
**Last updated:** [December 14, 2022, 7:38pm UTC](https://racket.discourse.group/t/new-package-bitwise-ops/1557 "2022-12-14T19:38:57Z")

</div>

A moment ago, I uploaded the 'bitwise-ops' package. It's a very small module that simply aliases the Racket bitwise functions to use the symbolic names from other languages. \<\< arithmetic-shift (i.e. left shift) \>\> …

---

## [Json Beautifier](https://racket.discourse.group/t/json-beautifier/1541)

<div class="topic-metadata">

**Author:** [@greg](https://racket.discourse.group/u/greg)\
**Replies:** 7\
**Last updated:** [December 12, 2022, 4:51am UTC](https://racket.discourse.group/t/json-beautifier/1541 "2022-12-12T04:51:51Z")

</div>

Is there a way to "beautify" or format a json string in racket? E.g. from { "name":"She-Ra","title":"The Princess of Power"} to { "name": "She-Ra", "title": "The Princess of Power" } ?

---

## [Translate, compile, evaluate, interpret](https://racket.discourse.group/t/translate-compile-evaluate-interpret/1549)

<div class="topic-metadata">

**Author:** [@joskoot](https://racket.discourse.group/u/joskoot)\
**Replies:** 5\
**Last updated:** [December 11, 2022, 12:24pm UTC](https://racket.discourse.group/t/translate-compile-evaluate-interpret/1549 "2022-12-11T12:24:01Z")

</div>

In documentation and text books the words 'translate', 'compile', 'evaluate' and 'interpret' are abundant, but they have subtly distinct meanings. Is there somewhere an article describing the subtle differences?

---

## [Dr Racket. Keybinding to Alt+F](https://racket.discourse.group/t/dr-racket-keybinding-to-alt-f/1544)

<div class="topic-metadata">

**Author:** [@tehkonst](https://racket.discourse.group/u/tehkonst)\
**Replies:** 2\
**Last updated:** [December 9, 2022, 1:40am UTC](https://racket.discourse.group/t/dr-racket-keybinding-to-alt-f/1544 "2022-12-09T01:40:13Z")

</div>

Can I suppress the menu keyboard shortcuts with the alt key in DrRacket on linux and make my own keybinding to alt+f alt+s etc?

---

## [Pipes in Symbols](https://racket.discourse.group/t/pipes-in-symbols/1540)

<div class="topic-metadata">

**Author:** [@greg](https://racket.discourse.group/u/greg)\
**Replies:** 4\
**Last updated:** [December 7, 2022, 2:53pm UTC](https://racket.discourse.group/t/pipes-in-symbols/1540 "2022-12-07T14:53:22Z")

</div>

The pipe sign (|) is sometimes used to enclose symbols. Is there more information about when one might want or need to do this? The only example I could come up with is the empty symbol ('||) which as far as I can tell c…

---

## [Turtle graphics](https://racket.discourse.group/t/turtle-graphics/1523)

<div class="topic-metadata">

**Author:** [@Lambda17](https://racket.discourse.group/u/Lambda17)\
**Replies:** 11\
**Last updated:** [December 5, 2022, 3:32pm UTC](https://racket.discourse.group/t/turtle-graphics/1523 "2022-12-05T15:32:07Z")

</div>

Hi. Sorry, I am a complete beginner on programming and racket, but keen to learn and help my son learn at the same time. I am interested in combining turtle graphics with 2htdp/image and 2htdp/universe. Any clues how to …

---

## [Separating webserver/app code and site templates](https://racket.discourse.group/t/separating-webserver-app-code-and-site-templates/1529)

<div class="topic-metadata">

**Author:** [@steveivy](https://racket.discourse.group/u/steveivy)\
**Replies:** 5\
**Last updated:** [December 5, 2022, 12:01am UTC](https://racket.discourse.group/t/separating-webserver-app-code-and-site-templates/1529 "2022-12-05T00:01:40Z")

</div>

\[Background - I'm porting my golang blog app to racket, and figuring it out as I go\] I've been working through the web-server-lib docs and learning to use include-template. In my existing app, the installation of the bl…

---

## [Matching regexp in case statement?](https://racket.discourse.group/t/matching-regexp-in-case-statement/1525)

<div class="topic-metadata">

**Author:** [@steveivy](https://racket.discourse.group/u/steveivy)\
**Replies:** 6\
**Last updated:** [December 2, 2022, 6:46pm UTC](https://racket.discourse.group/t/matching-regexp-in-case-statement/1525 "2022-12-02T18:46:49Z")

</div>

Hello, As per usual, I'm learning racket by implementing pieces of my blog software over. I have 20+ years of blog posts (and tweets, over 11k in total) that have been migrated over to Markdown at various points, which …

---

## [Raco test with errortrace](https://racket.discourse.group/t/raco-test-with-errortrace/1505)

<div class="topic-metadata">

**Author:** [@tehkonst](https://racket.discourse.group/u/tehkonst)\
**Replies:** 2\
**Last updated:** [November 23, 2022, 3:42am UTC](https://racket.discourse.group/t/raco-test-with-errortrace/1505 "2022-11-23T03:42:47Z")

</div>

In docs: 13 raco test: Run tests , a flag --errortrace is mentioned. --errortrace — Dynamically loads errortrace before running the tests. Note that already-compiled files will not include the tracing information. Bu…

---

## [Syntax-case via defmacro](https://racket.discourse.group/t/syntax-case-via-defmacro/1502)

<div class="topic-metadata">

**Author:** [@ben\_greenman](https://racket.discourse.group/u/ben_greenman)\
**Replies:** 1\
**Last updated:** [November 21, 2022, 8:36pm UTC](https://racket.discourse.group/t/syntax-case-via-defmacro/1502 "2022-11-21T20:36:32Z")

</div>

Does anyone know where to find an implementation of syntax-case or syntax-rules in Common Lisp, using just defmacro ?

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

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