# Questions & Answers

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

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

**Page:** 31

---

## [When would I use boxes?](https://racket.discourse.group/t/when-would-i-use-boxes/813)

<div class="topic-metadata">

**Author:** [@rmuller](https://racket.discourse.group/u/rmuller)\
**Replies:** 9\
**Last updated:** [March 21, 2022, 3:36pm UTC](https://racket.discourse.group/t/when-would-i-use-boxes/813 "2022-03-21T15:36:37Z")

</div>

I'm enjoying the time I'm spending learning Racket and Scheme. One thing that has puzzled me is the topic of boxes. The guide says that "A box is like a single-element vector". Okay, but why would I want to use a box rat…

---

## [Futures in 8.4 cs and 8.4 bc](https://racket.discourse.group/t/futures-in-8-4-cs-and-8-4-bc/809)

<div class="topic-metadata">

**Author:** [@joskoot](https://racket.discourse.group/u/joskoot)\
**Replies:** 7\
**Last updated:** [March 20, 2022, 2:52pm UTC](https://racket.discourse.group/t/futures-in-8-4-cs-and-8-4-bc/809 "2022-03-20T14:52:48Z")

</div>

Hi I have a program using futures. It runs very well with DrRacket 8.4 cs. With DrRacket 8.4 bc it seems to use one processor only. Is this a known problem? If not I can send the source code (about 500 lines) Detai…

---

## [Huge values of exact numbers](https://racket.discourse.group/t/huge-values-of-exact-numbers/805)

<div class="topic-metadata">

**Author:** [@dstorrs](https://racket.discourse.group/u/dstorrs)\
**Replies:** 1\
**Last updated:** [March 17, 2022, 7:29pm UTC](https://racket.discourse.group/t/huge-values-of-exact-numbers/805 "2022-03-17T19:29:27Z")

</div>

While reading through section 4.3 Numbers of the Reference, I noticed this: The precision and size of exact numbers is limited only by available memory (and the precision of operations that can produce irrational numbe…

---

## [How to deal with \`let/cc\` in typed racket?](https://racket.discourse.group/t/how-to-deal-with-let-cc-in-typed-racket/795)

<div class="topic-metadata">

**Author:** [@dannypsnl](https://racket.discourse.group/u/dannypsnl)\
**Replies:** 3\
**Last updated:** [March 16, 2022, 2:29am UTC](https://racket.discourse.group/t/how-to-deal-with-let-cc-in-typed-racket/795 "2022-03-16T02:29:11Z")

</div>

(: foo : -\> Integer) (define (foo) (let/cc r (r 1))) The above program will report Type Checker: Cannot apply expression of type Any, since it is not a function type in: (r 1) How to let type checker knows the t…

---

## [Logging to a single file from multiple loggers](https://racket.discourse.group/t/logging-to-a-single-file-from-multiple-loggers/781)

<div class="topic-metadata">

**Author:** [@dstorrs](https://racket.discourse.group/u/dstorrs)\
**Replies:** 11\
**Last updated:** [March 15, 2022, 7:40pm UTC](https://racket.discourse.group/t/logging-to-a-single-file-from-multiple-loggers/781 "2022-03-15T19:40:54Z")

</div>

I feel dumb having to ask this, but here we go. Various files in my CLI application define loggers -- there's a (define-logger users) in the users.rkt file, and a (define-logger files) in files.rkt and so on. I'd like …

---

## [How can i nest an expression to use resulting function only once?](https://racket.discourse.group/t/how-can-i-nest-an-expression-to-use-resulting-function-only-once/791)

<div class="topic-metadata">

**Author:** [@osman44](https://racket.discourse.group/u/osman44)\
**Replies:** 1\
**Last updated:** [March 13, 2022, 11:45pm UTC](https://racket.discourse.group/t/how-can-i-nest-an-expression-to-use-resulting-function-only-once/791 "2022-03-13T23:45:11Z")

</div>

I am trying to nest this already designed function ,so the function place-image is only used once,however,i have tried different ways but i keep getting errors,this is the closest i could get to but it returns an error d…

---

## [How do I add types to these wrapped function in Typed Racket?](https://racket.discourse.group/t/how-do-i-add-types-to-these-wrapped-function-in-typed-racket/783)

<div class="topic-metadata">

**Author:** [@Decabytes](https://racket.discourse.group/u/Decabytes)\
**Replies:** 0\
**Last updated:** [March 11, 2022, 4:19am UTC](https://racket.discourse.group/t/how-do-i-add-types-to-these-wrapped-function-in-typed-racket/783 "2022-03-11T04:19:20Z")

</div>

I was adding types to a library and I ran into some ctypes I'm unsure how to annotate. They are (\_fun -\> \_pointer) (\_fun -\> \_double) Does the pointer get wrapped as a integer, and the double a float? What if I need to …

---

## [How can i use (modulo x y) function to create loop](https://racket.discourse.group/t/how-can-i-use-modulo-x-y-function-to-create-loop/788)

<div class="topic-metadata">

**Author:** [@osman44](https://racket.discourse.group/u/osman44)\
**Replies:** 0\
**Last updated:** [March 12, 2022, 12:26pm UTC](https://racket.discourse.group/t/how-can-i-use-modulo-x-y-function-to-create-loop/788 "2022-03-12T12:26:44Z")

</div>

does anyone know how i can write a function for big-bang which basically loops an animation.for my task i have an animation of a car which currently goes from left to right but ends when it touches the right hand side,ho…

---

## [Using \`'nonatomic\` foreign memory](https://racket.discourse.group/t/using-nonatomic-foreign-memory/787)

<div class="topic-metadata">

**Author:** [@LiberalArtist](https://racket.discourse.group/u/LiberalArtist)\
**Replies:** 4\
**Last updated:** [March 11, 2022, 7:53pm UTC](https://racket.discourse.group/t/using-nonatomic-foreign-memory/787 "2022-03-11T19:53:15Z")

</div>

Consider this C type definition: typedef struct git\_strarray { char \*\*strings; size\_t count; } git\_strarray; This called to mind the support added in https://github.com/racket/racket/commit/87196e0144226b44fd4c00fcca…

---

## [How can i specify end of big bang](https://racket.discourse.group/t/how-can-i-specify-end-of-big-bang/786)

<div class="topic-metadata">

**Author:** [@osman44](https://racket.discourse.group/u/osman44)\
**Replies:** 5\
**Last updated:** [March 11, 2022, 5:34pm UTC](https://racket.discourse.group/t/how-can-i-specify-end-of-big-bang/786 "2022-03-11T17:34:10Z")

</div>

hi all i am working through the hdtp book,currenyly creating a simple animation which a moves car from left to right at a rate of three pixles per clock tick.i am not sure but i have tried to but not sure how to piece it…

---

## [Is it good style to use \`#:when\` instead of \`?\` in match expression?](https://racket.discourse.group/t/is-it-good-style-to-use-when-instead-of-in-match-expression/779)

<div class="topic-metadata">

**Author:** [@NoahStoryM](https://racket.discourse.group/u/NoahStoryM)\
**Replies:** 4\
**Last updated:** [March 11, 2022, 2:59am UTC](https://racket.discourse.group/t/is-it-good-style-to-use-when-instead-of-in-match-expression/779 "2022-03-11T02:59:51Z")

</div>

Hi everyone, this question originally came to me while working with Typed Racket. The current Typed Racket seems not to support match very well, so in many cases, ? cannot be used to mark type through predicate. For exam…

---

## [How to know identifier refer to?](https://racket.discourse.group/t/how-to-know-identifier-refer-to/780)

<div class="topic-metadata">

**Author:** [@dannypsnl](https://racket.discourse.group/u/dannypsnl)\
**Replies:** 1\
**Last updated:** [March 10, 2022, 7:18am UTC](https://racket.discourse.group/t/how-to-know-identifier-refer-to/780 "2022-03-10T07:18:24Z")

</div>

For example, if I write down (my-macro foo) (define foo 1) (my-macro2 foo) How can I let my-macro and my-macro2 know they are referring to the same foo?

---

## [Raising exceptions in mocks](https://racket.discourse.group/t/raising-exceptions-in-mocks/775)

<div class="topic-metadata">

**Author:** [@robertpostill](https://racket.discourse.group/u/robertpostill)\
**Replies:** 2\
**Last updated:** [March 9, 2022, 12:02am UTC](https://racket.discourse.group/t/raising-exceptions-in-mocks/775 "2022-03-09T00:02:25Z")

</div>

I have a function that reads JSON from a file: (define (extract-directives filename #:file-input \[with-input-from-file with-input-from-file\]) (define ignore (with-handlers (\[exn:fail:filesystem? (lambda (exn) (ignore …

---

## [Replicating the type of \`apply\`](https://racket.discourse.group/t/replicating-the-type-of-apply/770)

<div class="topic-metadata">

**Author:** [@scolobb](https://racket.discourse.group/u/scolobb)\
**Replies:** 3\
**Last updated:** [March 7, 2022, 10:27pm UTC](https://racket.discourse.group/t/replicating-the-type-of-apply/770 "2022-03-07T22:27:59Z")

</div>

Hello, I am trying to replicate the type of apply: tmp.rkt\> apply - : (All (a b) (-\> (-\> a \* b) (Listof a) b)) #\<procedure:apply\> So, I define my own function: (: my-apply (All (a b) (-\> (-\> a \* b) (Listof a) b))) (d…

---

## [Logging, custodians and larger applications](https://racket.discourse.group/t/logging-custodians-and-larger-applications/766)

<div class="topic-metadata">

**Author:** [@robertpostill](https://racket.discourse.group/u/robertpostill)\
**Replies:** 2\
**Last updated:** [March 7, 2022, 4:21pm UTC](https://racket.discourse.group/t/logging-custodians-and-larger-applications/766 "2022-03-07T16:21:00Z")

</div>

I have a racket CLI application that used to be a single file and now spans multiple files. I added logging to that app based on what I'd learnt (see Logging With Racket // Grinning Cat). So in my main.rkt I have the f…

---

## [Confused on excerise on htdp](https://racket.discourse.group/t/confused-on-excerise-on-htdp/768)

<div class="topic-metadata">

**Author:** [@osman44](https://racket.discourse.group/u/osman44)\
**Replies:** 3\
**Last updated:** [March 6, 2022, 10:43am UTC](https://racket.discourse.group/t/confused-on-excerise-on-htdp/768 "2022-03-06T10:43:08Z")

</div>

i am struggling to understand this question Exercise 15. Define ==\>. The function consumes two Boolean values, call them sunny and friday. Its answer is #true if sunny is false or friday is true. Note Logicians call thi…

---

## [Having issues with cond](https://racket.discourse.group/t/having-issues-with-cond/765)

<div class="topic-metadata">

**Author:** [@osman44](https://racket.discourse.group/u/osman44)\
**Replies:** 3\
**Last updated:** [March 4, 2022, 6:12pm UTC](https://racket.discourse.group/t/having-issues-with-cond/765 "2022-03-04T18:12:50Z")

</div>

i am working through the htdp book online and i came across and excerise which asks me to Then create an expression that converts the value of in to a non-negative number. For a String, it determines how long the Strin…

---

## [Function call: error](https://racket.discourse.group/t/function-call-error/759)

<div class="topic-metadata">

**Author:** [@osman44](https://racket.discourse.group/u/osman44)\
**Replies:** 5\
**Last updated:** [March 4, 2022, 5:29pm UTC](https://racket.discourse.group/t/function-call-error/759 "2022-03-04T17:29:44Z")

</div>

i am following this tutorial from the I Fixed-Size Data and i copied and pasted this code (define current-color "amber") (define next-color (if (string=? "green" current-color) next-color "yellow" )) and when i run…

---

## [How to use LIKE statement query-exec/list/value?](https://racket.discourse.group/t/how-to-use-like-statement-query-exec-list-value/763)

<div class="topic-metadata">

**Author:** [@Hanson](https://racket.discourse.group/u/Hanson)\
**Replies:** 3\
**Last updated:** [March 4, 2022, 2:36pm UTC](https://racket.discourse.group/t/how-to-use-like-statement-query-exec-list-value/763 "2022-03-04T14:36:29Z")

</div>

How to use LIKE statement query-exec/list/value? If it's like (query-list db "SELECT \* FROM Table WHERE name LIKE '%?%'" name) then '?' cannot be parsed. if format the statement by other function then there's a sql inj…

---

## [Bundling external libraries with Raco Distribute](https://racket.discourse.group/t/bundling-external-libraries-with-raco-distribute/632)

<div class="topic-metadata">

**Author:** [@Dexter](https://racket.discourse.group/u/Dexter)\
**Replies:** 12\
**Last updated:** [March 4, 2022, 11:11am UTC](https://racket.discourse.group/t/bundling-external-libraries-with-raco-distribute/632 "2022-03-04T11:11:31Z")

</div>

Hi there, I apologize in advance for beating a dead horse, but I still haven't found a solution to this problem: Say I require Gregor for a program I'd like to distribute to the world in binary form (say, Invoicer). I …

---

## [What's the most reasonable way to do something seasonal in racket](https://racket.discourse.group/t/whats-the-most-reasonable-way-to-do-something-seasonal-in-racket/746)

<div class="topic-metadata">

**Author:** [@Hanson](https://racket.discourse.group/u/Hanson)\
**Replies:** 4\
**Last updated:** [March 3, 2022, 11:25am UTC](https://racket.discourse.group/t/whats-the-most-reasonable-way-to-do-something-seasonal-in-racket/746 "2022-03-03T11:25:17Z")

</div>

For example, check if a connection is still alive every 1 hour and reconnect if is not.

---

## [Simple overview of how packages/dependencies work in Racket?](https://racket.discourse.group/t/simple-overview-of-how-packages-dependencies-work-in-racket/741)

<div class="topic-metadata">

**Author:** [@ananth](https://racket.discourse.group/u/ananth)\
**Replies:** 9\
**Last updated:** [March 2, 2022, 11:27pm UTC](https://racket.discourse.group/t/simple-overview-of-how-packages-dependencies-work-in-racket/741 "2022-03-02T23:27:01Z")

</div>

I'm trying to get a grasp of how packages / library dependencies work in racket. I'm going through documentation, however a few pieces are still puzzling. Let's say I'm trying to develop two different racket projects, e…

---

## [Help printing picts for a wordle clone](https://racket.discourse.group/t/help-printing-picts-for-a-wordle-clone/744)

<div class="topic-metadata">

**Author:** [@rmuller](https://racket.discourse.group/u/rmuller)\
**Replies:** 5\
**Last updated:** [March 2, 2022, 4:47pm UTC](https://racket.discourse.group/t/help-printing-picts-for-a-wordle-clone/744 "2022-03-02T16:47:21Z")

</div>

I'm writing a wordle clone in racket. I'm using the pict module to draw colored rectangles around letters. (define (letter char (color "green")) (cc-superimpose (colorize (filled-rectangle 40 50) color) (text (s…

---

## [What's the reason of page expire in web server and how to change its behavior?](https://racket.discourse.group/t/whats-the-reason-of-page-expire-in-web-server-and-how-to-change-its-behavior/754)

<div class="topic-metadata">

**Author:** [@Hanson](https://racket.discourse.group/u/Hanson)\
**Replies:** 1\
**Last updated:** [March 1, 2022, 3:23pm UTC](https://racket.discourse.group/t/whats-the-reason-of-page-expire-in-web-server-and-how-to-change-its-behavior/754 "2022-03-01T15:23:47Z")

</div>

This message often confuse my user: Sorry, this page has expired. Please go back. Why is this happening and how to avoid it if possible?

---

## [Db auto reconnect](https://racket.discourse.group/t/db-auto-reconnect/745)

<div class="topic-metadata">

**Author:** [@Hanson](https://racket.discourse.group/u/Hanson)\
**Replies:** 1\
**Last updated:** [February 28, 2022, 1:36pm UTC](https://racket.discourse.group/t/db-auto-reconnect/745 "2022-02-28T13:36:57Z")

</div>

Mysql db has some parameters like auto reconnect = true and where to apply this in racket? I use the db pakage

---

## [Need an example of URL based dispatch in web-server](https://racket.discourse.group/t/need-an-example-of-url-based-dispatch-in-web-server/701)

<div class="topic-metadata">

**Author:** [@Hanson](https://racket.discourse.group/u/Hanson)\
**Replies:** 2\
**Last updated:** [February 28, 2022, 7:44am UTC](https://racket.discourse.group/t/need-an-example-of-url-based-dispatch-in-web-server/701 "2022-02-28T07:44:34Z")

</div>

Need an example of URL based dispatch in web-server. For exampel, I want to link www.forexample.com/admin to (define (admin request) ......)

---

## [Replace this page with your favorite index page - how](https://racket.discourse.group/t/replace-this-page-with-your-favorite-index-page-how/735)

<div class="topic-metadata">

**Author:** [@Don](https://racket.discourse.group/u/Don)\
**Replies:** 1\
**Last updated:** [February 26, 2022, 7:35pm UTC](https://racket.discourse.group/t/replace-this-page-with-your-favorite-index-page-how/735 "2022-02-26T19:35:23Z")

</div>

The Racket Web Server makes use of a default index.html file that contains the following 2 lines: Welcome to the Racket Web server! : Please replace this page with your favorite index page. Since relplacing the fi…

---

## [Discussion of Racket's LOP abilities in r/ProgrammingLanguages](https://racket.discourse.group/t/discussion-of-rackets-lop-abilities-in-r-programminglanguages/689)

<div class="topic-metadata">

**Author:** [@Decabytes](https://racket.discourse.group/u/Decabytes)\
**Replies:** 13\
**Last updated:** [February 26, 2022, 8:07am UTC](https://racket.discourse.group/t/discussion-of-rackets-lop-abilities-in-r-programminglanguages/689 "2022-02-26T08:07:13Z")

</div>

Full Disclosure I created the post but it got more traction than I was expecting. I think some of the grievances about syntax definitely lend more credibility to the Rhombus project. I'd be curious to see what those peop…

---

## [Add a -c "clean" flag to raco make?](https://racket.discourse.group/t/add-a-c-clean-flag-to-raco-make/178)

<div class="topic-metadata">

**Author:** [@badkins](https://racket.discourse.group/u/badkins)\
**Replies:** 10\
**Last updated:** [February 25, 2022, 2:25am UTC](https://racket.discourse.group/t/add-a-c-clean-flag-to-raco-make/178 "2022-02-25T02:25:18Z")

</div>

Does it make sense to add a -c "clean" flag to raco make ? I just got bit by a confusing issue where a file was happily referencing some exported symbols from another file that had been deleted. I realize I can write my…

---

## [How to start contributing to Typed Racket?](https://racket.discourse.group/t/how-to-start-contributing-to-typed-racket/720)

<div class="topic-metadata">

**Author:** [@scolobb](https://racket.discourse.group/u/scolobb)\
**Replies:** 2\
**Last updated:** [February 23, 2022, 10:25pm UTC](https://racket.discourse.group/t/how-to-start-contributing-to-typed-racket/720 "2022-02-23T22:25:01Z")

</div>

Hi, TL;DR: How to start contributing to Typed Racket? Full disclosure I am working on a library to support my research. I am quite fond of types and of Typed Racket, and I would like to write as much of Typed Racket a…

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

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