# Questions & Answers

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

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

**Page:** 34

---

## [Difference between \`fail\` and \`fail-check\`?](https://racket.discourse.group/t/difference-between-fail-and-fail-check/506)

<div class="topic-metadata">

**Author:** [@sschwarzer](https://racket.discourse.group/u/sschwarzer)\
**Replies:** 5\
**Last updated:** [January 2, 2022, 11:20pm UTC](https://racket.discourse.group/t/difference-between-fail-and-fail-check/506 "2022-01-02T23:20:51Z")

</div>

Happy New Year everyone! :slight\_smile: The rackunit documentation describes two functions: fail fail-check From the descriptions both functions seem very similar, - so similar that I'm not sure when I should use wh…

---

## [Get creation date from a file function missing?](https://racket.discourse.group/t/get-creation-date-from-a-file-function-missing/487)

<div class="topic-metadata">

**Author:** [@kurinoku](https://racket.discourse.group/u/kurinoku)\
**Replies:** 3\
**Last updated:** [December 29, 2021, 10:50pm UTC](https://racket.discourse.group/t/get-creation-date-from-a-file-function-missing/487 "2021-12-29T22:50:37Z")

</div>

The procedure file-or-directory-modify-seconds exists, yet I can't seem to find a similar function for the creation date.

---

## [Where does raco stores collections on macOS?](https://racket.discourse.group/t/where-does-raco-stores-collections-on-macos/495)

<div class="topic-metadata">

**Author:** [@dannypsnl](https://racket.discourse.group/u/dannypsnl)\
**Replies:** 8\
**Last updated:** [December 31, 2021, 8:43pm UTC](https://racket.discourse.group/t/where-does-raco-stores-collections-on-macos/495 "2021-12-31T20:43:22Z")

</div>

I just found when I type raco install --auto xxx, it says missing xxx/yyy in /home/Library/Racket/8.3/collects /Applications/Racket v8.3/collects/ but end up I found xxx/yyy is existed in /home/Library/Racket/8.3/pkgs…

---

## [Rackcheck question: How to name a property?](https://racket.discourse.group/t/rackcheck-question-how-to-name-a-property/484)

<div class="topic-metadata">

**Author:** [@danprager](https://racket.discourse.group/u/danprager)\
**Replies:** 6\
**Last updated:** [December 31, 2021, 7:41am UTC](https://racket.discourse.group/t/rackcheck-question-how-to-name-a-property/484 "2021-12-31T07:41:06Z")

</div>

I've just started using @bogdan's nice property-testing package rackcheck (includes shrinking!), and I can't figure out the syntax for adding a name to a property. I'd like to give a name to my property ahead of adding …

---

## [Racket Error:arity mismatch;](https://racket.discourse.group/t/racket-error-arity-mismatch/498)

<div class="topic-metadata">

**Author:** [@osman44](https://racket.discourse.group/u/osman44)\
**Replies:** 5\
**Last updated:** [December 30, 2021, 10:49pm UTC](https://racket.discourse.group/t/racket-error-arity-mismatch/498 "2021-12-30T22:49:11Z")

</div>

I am trying to create a function in which takes two aruguments in my case i want the function to return true only when both arguements are true and false otherwise.So in my function i want it to ask the user to "whats th…

---

## [Error in syntax-parse](https://racket.discourse.group/t/error-in-syntax-parse/494)

<div class="topic-metadata">

**Author:** [@damien\_mattei](https://racket.discourse.group/u/damien_mattei)\
**Replies:** 4\
**Last updated:** [December 30, 2021, 3:51pm UTC](https://racket.discourse.group/t/error-in-syntax-parse/494 "2021-12-30T15:51:59Z")

</div>

hello, i have this error in this code: #lang racket (require syntax/parse) (require syntax/strip-context) (define (emit-interaction stx) (syntax-parse stx #:context '|error while parsing interaction| \[(\_ expr-o…

---

## [Storing code for later evaluation at runtime](https://racket.discourse.group/t/storing-code-for-later-evaluation-at-runtime/485)

<div class="topic-metadata">

**Author:** [@rscho](https://racket.discourse.group/u/rscho)\
**Replies:** 2\
**Last updated:** [December 30, 2021, 5:51am UTC](https://racket.discourse.group/t/storing-code-for-later-evaluation-at-runtime/485 "2021-12-30T05:51:40Z")

</div>

Hi, I'm constructing a struct/dc contract through a macro. The real contract specs would only be known at struct instantiation time late into execution, and I need to store the original contract and modify it according…

---

## [\[Feature Request\] Tag Contract and Tag Type](https://racket.discourse.group/t/feature-request-tag-contract-and-tag-type/427)

<div class="topic-metadata">

**Author:** [@NoahStoryM](https://racket.discourse.group/u/NoahStoryM)\
**Replies:** 2\
**Last updated:** [December 28, 2021, 11:46am UTC](https://racket.discourse.group/t/feature-request-tag-contract-and-tag-type/427 "2021-12-28T11:46:11Z")

</div>

Hello everyone, I want to share some thoughts I encountered when using Typed Racket. I don't have too deep theoretical foundation and knowledge accumulation, so it may be a little naive. :slight\_smile: Recently, I want …

---

## [Get redex traces result as picture?](https://racket.discourse.group/t/get-redex-traces-result-as-picture/458)

<div class="topic-metadata">

**Author:** [@dannypsnl](https://racket.discourse.group/u/dannypsnl)\
**Replies:** 8\
**Last updated:** [December 26, 2021, 1:22pm UTC](https://racket.discourse.group/t/get-redex-traces-result-as-picture/458 "2021-12-26T13:22:07Z")

</div>

traces function in redex given a nice GUI result, but what if I want to put it into scribble manual? How can I do that?

---

## [Reader module for reading multiple lines](https://racket.discourse.group/t/reader-module-for-reading-multiple-lines/476)

<div class="topic-metadata">

**Author:** [@damien\_mattei](https://racket.discourse.group/u/damien_mattei)\
**Replies:** 1\
**Last updated:** [December 25, 2021, 11:00pm UTC](https://racket.discourse.group/t/reader-module-for-reading-multiple-lines/476 "2021-12-25T23:00:49Z")

</div>

hello, i want to modify the reader (read file) to be able read difinitions , modify them to generate racket code and evaluate expressions . starting from this code: https://docs.racket-lang.org/guide/hash-lang\_reade…

---

## [Different sorts of little languages](https://racket.discourse.group/t/different-sorts-of-little-languages/467)

<div class="topic-metadata">

**Author:** [@spdegabrielle](https://racket.discourse.group/u/spdegabrielle)\
**Replies:** 4\
**Last updated:** [December 24, 2021, 10:29pm UTC](https://racket.discourse.group/t/different-sorts-of-little-languages/467 "2021-12-24T22:29:59Z")

</div>

I'm trying to get my head around languages in general and I've come across some jargon around DSL's that I'm not clear on. So I have questions and hopefully you have answers and perhaps examples? external DSL I think …

---

## [How to get link to library provided form](https://racket.discourse.group/t/how-to-get-link-to-library-provided-form/464)

<div class="topic-metadata">

**Author:** [@dannypsnl](https://racket.discourse.group/u/dannypsnl)\
**Replies:** 5\
**Last updated:** [December 24, 2021, 4:02pm UTC](https://racket.discourse.group/t/how-to-get-link-to-library-provided-form/464 "2021-12-24T16:02:03Z")

</div>

I always have a problem that if I write a docs.scrbl have #lang scribble/manual @require\[(for-label racket/base nanopass)\] @title{test} @racketblock\[ (require nanopass) (define-language L0 (term…

---

## [Scribble/srcdoc's for-doc with submod issue](https://racket.discourse.group/t/scribble-srcdocs-for-doc-with-submod-issue/459)

<div class="topic-metadata">

**Author:** [@dominik.pantucek](https://racket.discourse.group/u/dominik.pantucek)\
**Replies:** 1\
**Last updated:** [December 23, 2021, 5:35pm UTC](https://racket.discourse.group/t/scribble-srcdocs-for-doc-with-submod-issue/459 "2021-12-23T17:35:33Z")

</div>

Using scribble/srcdoc with at-exp reader allows you to write module documentation within the provide form ensuring all the provided symbols are somehow (preferably properly) documented. In certain situations, you want to…

---

## [Example of a lang lexer that returns a non-zero backup distance?](https://racket.discourse.group/t/example-of-a-lang-lexer-that-returns-a-non-zero-backup-distance/437)

<div class="topic-metadata">

**Author:** [@greghendershott](https://racket.discourse.group/u/greghendershott)\
**Replies:** 6\
**Last updated:** [December 23, 2021, 5:06pm UTC](https://racket.discourse.group/t/example-of-a-lang-lexer-that-returns-a-non-zero-backup-distance/437 "2021-12-23T17:06:56Z")

</div>

A lang's module lexer can return a backup distance. I would like to test my handling of that. But so far (with e.g. langs racket, rhombus, and scribble/manual) I'm always seeing a backup distance of zero. What's an ex…

---

## [Type Checker: Inference for polymorphic keyword functions not supported](https://racket.discourse.group/t/type-checker-inference-for-polymorphic-keyword-functions-not-supported/145)

<div class="topic-metadata">

**Author:** [@scolobb](https://racket.discourse.group/u/scolobb)\
**Replies:** 6\
**Last updated:** [December 21, 2021, 1:20pm UTC](https://racket.discourse.group/t/type-checker-inference-for-polymorphic-keyword-functions-not-supported/145 "2021-12-21T13:20:40Z")

</div>

Hi, I want to do a union of two hash tables mapping symbols to numbers, summing up the values for duplicate keys. Here's what I write: #lang typed/racket (require racket/hash) (define h1 : (Immutable-HashTable Symbo…

---

## [Simpler cross-compiling for multiple platforms](https://racket.discourse.group/t/simpler-cross-compiling-for-multiple-platforms/456)

<div class="topic-metadata">

**Author:** [@sschwarzer](https://racket.discourse.group/u/sschwarzer)\
**Replies:** 3\
**Last updated:** [December 20, 2021, 9:47pm UTC](https://racket.discourse.group/t/simpler-cross-compiling-for-multiple-platforms/456 "2021-12-20T21:47:36Z")

</div>

For a project of mine I use the following Makefile code to create binaries for different platforms: VERSION=$(shell cat VERSION) TARGET ?= x86\_64-linux NICE\_TARGET ?= ${TARGET} VM ?= cs # Both options are allowed for P…

---

## [Trimming tables of contents in #lang scribble/manual](https://racket.discourse.group/t/trimming-tables-of-contents-in-lang-scribble-manual/450)

<div class="topic-metadata">

**Author:** [@plragde](https://racket.discourse.group/u/plragde)\
**Replies:** 2\
**Last updated:** [December 20, 2021, 3:49am UTC](https://racket.discourse.group/t/trimming-tables-of-contents-in-lang-scribble-manual/450 "2021-12-20T03:49:18Z")

</div>

I have a Scribble document whose top-level file uses #:style '(toc multipage), followed by several applications of @include-section. On one of the subpages rendered separately, I have many instances of @section, @subsect…

---

## [Contract translation for use in an external system](https://racket.discourse.group/t/contract-translation-for-use-in-an-external-system/444)

<div class="topic-metadata">

**Author:** [@rscho](https://racket.discourse.group/u/rscho)\
**Replies:** 0\
**Last updated:** [December 19, 2021, 3:22pm UTC](https://racket.discourse.group/t/contract-translation-for-use-in-an-external-system/444 "2021-12-19T15:22:01Z")

</div>

Hi, I'd like to mirror Racket contracts on the SQLite side for a proof-of-concept dataframe library. Any type can be inserted in any column in SQLite, although types can optionally be enforced at runtime through trigger…

---

## [How to conditional \`require\`](https://racket.discourse.group/t/how-to-conditional-require/435)

<div class="topic-metadata">

**Author:** [@dannypsnl](https://racket.discourse.group/u/dannypsnl)\
**Replies:** 3\
**Last updated:** [December 19, 2021, 2:45pm UTC](https://racket.discourse.group/t/how-to-conditional-require/435 "2021-12-19T14:45:22Z")

</div>

The purpose is I want to build a set of low-level LLVM bindings like llvm 12 llvm 13 llvm 14 And provides a high-level package to choose them dynamically(by detecting LLVM version on the system), does that possible wi…

---

## [Making my function more elegant](https://racket.discourse.group/t/making-my-function-more-elegant/417)

<div class="topic-metadata">

**Author:** [@robertpostill](https://racket.discourse.group/u/robertpostill)\
**Replies:** 10\
**Last updated:** [December 16, 2021, 7:06am UTC](https://racket.discourse.group/t/making-my-function-more-elegant/417 "2021-12-16T07:06:25Z")

</div>

I'm making a function that calculates whether or not a number is valid. Specifically whether or not an Australian Tax File Number (TFN) is valid (see Clearwater Software for an explanation of what's happening). Now the…

---

## [Anyone knows how to insert a line graph in a pollen document?](https://racket.discourse.group/t/anyone-knows-how-to-insert-a-line-graph-in-a-pollen-document/419)

<div class="topic-metadata">

**Author:** [@agarzia](https://racket.discourse.group/u/agarzia)\
**Replies:** 2\
**Last updated:** [December 15, 2021, 7:59pm UTC](https://racket.discourse.group/t/anyone-knows-how-to-insert-a-line-graph-in-a-pollen-document/419 "2021-12-15T19:59:29Z")

</div>

I use Pollen to make my website. I'm now trying to create more complex documents that require me to add some line graphs. I know that one can insert runtime generated images inside scribble documents but I haven't seen a…

---

## [How to compare \`hash\` correctly](https://racket.discourse.group/t/how-to-compare-hash-correctly/412)

<div class="topic-metadata">

**Author:** [@dannypsnl](https://racket.discourse.group/u/dannypsnl)\
**Replies:** 7\
**Last updated:** [December 14, 2021, 10:46pm UTC](https://racket.discourse.group/t/how-to-compare-hash-correctly/412 "2021-12-14T22:46:06Z")

</div>

I'm trying to generate yaml from Racket, once it has been done, I want to check it has the same value as the original reference yaml. (require yaml) (define origin (file-\>yaml "origin.yml")) (define new ...) (equal? ne…

---

## [How can I set environment variables in racket-mode?](https://racket.discourse.group/t/how-can-i-set-environment-variables-in-racket-mode/406)

<div class="topic-metadata">

**Author:** [@dstorrs](https://racket.discourse.group/u/dstorrs)\
**Replies:** 7\
**Last updated:** [December 13, 2021, 7:07pm UTC](https://racket.discourse.group/t/how-can-i-set-environment-variables-in-racket-mode/406 "2021-12-13T19:07:03Z")

</div>

I'd like to have the racket-mode repl show logging. I've browsed through the docs and don't see anything like that...can anyone offer a pointer?

---

## [How to add new escape sequence?](https://racket.discourse.group/t/how-to-add-new-escape-sequence/418)

<div class="topic-metadata">

**Author:** [@dannypsnl](https://racket.discourse.group/u/dannypsnl)\
**Replies:** 2\
**Last updated:** [December 13, 2021, 1:07pm UTC](https://racket.discourse.group/t/how-to-add-new-escape-sequence/418 "2021-12-13T13:07:36Z")

</div>

If we read a string like "\\()", we will get read: unknown escape sequence \`\\(\` in string can we change this behavior?

---

## [\`and/or\` accept values that are not boolean](https://racket.discourse.group/t/and-or-accept-values-that-are-not-boolean/407)

<div class="topic-metadata">

**Author:** [@dannypsnl](https://racket.discourse.group/u/dannypsnl)\
**Replies:** 4\
**Last updated:** [December 11, 2021, 2:34pm UTC](https://racket.discourse.group/t/and-or-accept-values-that-are-not-boolean/407 "2021-12-11T14:34:52Z")

</div>

For example, we can write down (and #t 1 0) ; 0 (and 1 #t 0) ; 0 (and 1 0 #t) ; #t (or 0 #t #f) ; 0 (or #t 0 #f) ; #t (or #t #f 0) ; #t I think these are two questions why they accept non-boolean? how should I interp…

---

## [Reader module affect by using \`require\`?](https://racket.discourse.group/t/reader-module-affect-by-using-require/401)

<div class="topic-metadata">

**Author:** [@dannypsnl](https://racket.discourse.group/u/dannypsnl)\
**Replies:** 6\
**Last updated:** [December 11, 2021, 1:07pm UTC](https://racket.discourse.group/t/reader-module-affect-by-using-require/401 "2021-12-11T13:07:07Z")

</div>

We can define a reader module language by ; literal/main.rkt (module reader racket (provide (rename-out \[literal-read read\] \[literal-read-syntax read-syntax\])) (define (literal-read in) ...) …

---

## [Is it possible to identify a procedure at expansion time?](https://racket.discourse.group/t/is-it-possible-to-identify-a-procedure-at-expansion-time/340)

<div class="topic-metadata">

**Author:** [@dstorrs](https://racket.discourse.group/u/dstorrs)\
**Replies:** 3\
**Last updated:** [December 11, 2021, 12:24am UTC](https://racket.discourse.group/t/is-it-possible-to-identify-a-procedure-at-expansion-time/340 "2021-12-11T00:24:18Z")

</div>

When writing macros, is it possible to identify procedures at expansion time? I think the answer is no, but I thought I'd check. In my try-catch module, the 'catch' clause expands out into a with-handlers clause. In o…

---

## [Plot with subscripts, superscripts, and more general latex in labels](https://racket.discourse.group/t/plot-with-subscripts-superscripts-and-more-general-latex-in-labels/373)

<div class="topic-metadata">

**Author:** [@marc](https://racket.discourse.group/u/marc)\
**Replies:** 6\
**Last updated:** [December 8, 2021, 10:54am UTC](https://racket.discourse.group/t/plot-with-subscripts-superscripts-and-more-general-latex-in-labels/373 "2021-12-08T10:54:09Z")

</div>

I use plot to create some mathematical graphs that go into papers otherwise written in Latex. For the graph I used today, all I needed was subscripts and a bar over letters. In Latex, it would be $s\_q$ and $\\bar{e}\_{x}$. …

---

## [Operator (re)definition and order of operations](https://racket.discourse.group/t/operator-re-definition-and-order-of-operations/368)

<div class="topic-metadata">

**Author:** [@decuser](https://racket.discourse.group/u/decuser)\
**Replies:** 14\
**Last updated:** [December 8, 2021, 4:10am UTC](https://racket.discourse.group/t/operator-re-definition-and-order-of-operations/368 "2021-12-08T04:10:30Z")

</div>

Given: #lang racket (\* (+ 2 (\* 4 6)) (+ 3 5 7)) (define + (\* 2 3)) + Why does dr racket complain about the combination starting at line 2, that: +: undefined; cannot reference an identifier before its definitio…

---

## [How can I test a procedure to determine a procedure was the result](https://racket.discourse.group/t/how-can-i-test-a-procedure-to-determine-a-procedure-was-the-result/367)

<div class="topic-metadata">

**Author:** [@decuser](https://racket.discourse.group/u/decuser)\
**Replies:** 5\
**Last updated:** [December 8, 2021, 2:59am UTC](https://racket.discourse.group/t/how-can-i-test-a-procedure-to-determine-a-procedure-was-the-result/367 "2021-12-08T02:59:12Z")

</div>

That is if I type: + #\<procedure:+\> is the value of the evaluation. If I then: (check-expect '#\<procedure:+\> +) it's bad syntax '#\<' or if I type (check-expect #\<procedure:+\> +) it's the same.

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

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