# Latest

**URL:** https://racket.discourse.group/latest.md?page=58

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

**Page:** 59

---

## [Qi macro: generalized sieve (partition)](https://racket.discourse.group/t/qi-macro-generalized-sieve-partition/882)

<div class="topic-metadata">

**Author:** [@benknoble](https://racket.discourse.group/u/benknoble)\
**Replies:** 7\
**Last updated:** [June 22, 2022, 1:28am UTC](https://racket.discourse.group/t/qi-macro-generalized-sieve-partition/882 "2022-06-22T01:28:24Z")

</div>

I have a few situations where I route one set of input values through multiple different filters and actions. A naïve version might look like (flow (-\< (~\> (pass cond?) action) (~\> (pass cond?) action) …)) In…

---

## [Can I create .eps (or tiff) images directly in Racket?](https://racket.discourse.group/t/can-i-create-eps-or-tiff-images-directly-in-racket/1084)

<div class="topic-metadata">

**Author:** [@marc](https://racket.discourse.group/u/marc)\
**Replies:** 8\
**Last updated:** [June 21, 2022, 9:25am UTC](https://racket.discourse.group/t/can-i-create-eps-or-tiff-images-directly-in-racket/1084 "2022-06-21T09:25:50Z")

</div>

I am using plot to save plots as .svg and .png, but need to get .eps or .tiff formats. I haven't found a function that exports to either of these in Racket -- only Neil's mediafiles deals with .tiff for metadata purpose…

---

## [Koyo - getting started](https://racket.discourse.group/t/koyo-getting-started/1088)

<div class="topic-metadata">

**Author:** [@robertpostill](https://racket.discourse.group/u/robertpostill)\
**Replies:** 4\
**Last updated:** [June 21, 2022, 6:21am UTC](https://racket.discourse.group/t/koyo-getting-started/1088 "2022-06-21T06:21:17Z")

</div>

I'm having a go at my first koyo project. So far I've got an app up and running with a raco koyo console using the default credentials. I'm now attempting to get koyo to use the .env file for configuration. In the doc…

---

## [Custom equality predicate - in struct/gen:equal+hash or extra function?](https://racket.discourse.group/t/custom-equality-predicate-in-struct-gen-equal-hash-or-extra-function/1086)

<div class="topic-metadata">

**Author:** [@sschwarzer](https://racket.discourse.group/u/sschwarzer)\
**Replies:** 1\
**Last updated:** [June 19, 2022, 1:58am UTC](https://racket.discourse.group/t/custom-equality-predicate-in-struct-gen-equal-hash-or-extra-function/1086 "2022-06-19T01:58:12Z")

</div>

Assuming you have a struct (struct foo (a b c) #:transparent) and you want a custom equality predicate. For example, two foo instances should be equal? if their corresponding a and b fields are equal?, regardless of …

---

## [How exactly do semaphores work, especially when combined with sync/timeout?](https://racket.discourse.group/t/how-exactly-do-semaphores-work-especially-when-combined-with-sync-timeout/1087)

<div class="topic-metadata">

**Author:** [@dstorrs](https://racket.discourse.group/u/dstorrs)\
**Replies:** 3\
**Last updated:** [June 17, 2022, 5:21pm UTC](https://racket.discourse.group/t/how-exactly-do-semaphores-work-especially-when-combined-with-sync-timeout/1087 "2022-06-17T17:21:37Z")

</div>

I was writing some code using semaphores and realized that I wasn't sure I completely understand them. Suppose I have something like this: (define sema (make-semaphore 1)) (define user-\>id (make-hash (list (cons 'alice…

---

## [Scribble-compatible image drawing libraries](https://racket.discourse.group/t/scribble-compatible-image-drawing-libraries/1081)

<div class="topic-metadata">

**Author:** [@sschwarzer](https://racket.discourse.group/u/sschwarzer)\
**Replies:** 5\
**Last updated:** [June 14, 2022, 5:39pm UTC](https://racket.discourse.group/t/scribble-compatible-image-drawing-libraries/1081 "2022-06-14T17:39:50Z")

</div>

I'd like to create images similar to the ones on this page (not the one on the top though :wink: ) and include them in a Scribble document. So these images would consist mostly of text, boxes, lines and arrows. The Scri…

---

## [What is an uninvokable procedure -- and how/why?](https://racket.discourse.group/t/what-is-an-uninvokable-procedure-and-how-why/1085)

<div class="topic-metadata">

**Author:** [@greghendershott](https://racket.discourse.group/u/greghendershott)\
**Replies:** 3\
**Last updated:** [June 16, 2022, 2:24pm UTC](https://racket.discourse.group/t/what-is-an-uninvokable-procedure-and-how-why/1085 "2022-06-16T14:24:36Z")

</div>

Reading TIL: Partial application and currying aren't the same made me look at the implementation of curry. A helper function it uses: ; arity-mask? -\> (or/c exact-nonnegative-integer? +inf.0 #f) ; ; Calculates th…

---

## [How can I export the struct definition but not the constructor?](https://racket.discourse.group/t/how-can-i-export-the-struct-definition-but-not-the-constructor/1069)

<div class="topic-metadata">

**Author:** [@dstorrs](https://racket.discourse.group/u/dstorrs)\
**Replies:** 3\
**Last updated:** [June 14, 2022, 4:13pm UTC](https://racket.discourse.group/t/how-can-i-export-the-struct-definition-but-not-the-constructor/1069 "2022-06-14T16:13:22Z")

</div>

The goal is to have a struct type defined in one file and other files can use the struct (via accessors and match) but cannot create instances of the struct. Is there a way to do this aside from using #:constructor-name …

---

## [Managing \`cast\` performance penalty](https://racket.discourse.group/t/managing-cast-performance-penalty/905)

<div class="topic-metadata">

**Author:** [@scolobb](https://racket.discourse.group/u/scolobb)\
**Replies:** 26\
**Last updated:** [June 14, 2022, 12:04am UTC](https://racket.discourse.group/t/managing-cast-performance-penalty/905 "2022-06-14T00:04:23Z")

</div>

Hi, After putting cast here and there in my Typed Racket code, I got curious to know how much it cost me in terms of runtime performance: #lang typed/racket (time (for (\[i (in-range 10000)\]) (+ 1 i))) (time (…

---

## [New module: rx-tx-async-channel](https://racket.discourse.group/t/new-module-rx-tx-async-channel/1078)

<div class="topic-metadata">

**Author:** [@dstorrs](https://racket.discourse.group/u/dstorrs)\
**Replies:** 0\
**Last updated:** [June 13, 2022, 10:23pm UTC](https://racket.discourse.group/t/new-module-rx-tx-async-channel/1078 "2022-06-13T22:23:07Z")

</div>

This was posted just now and it's still waiting for the docs to be built. Quoting the README: Racket library that defines a struct containing two async-channels in order to make bi-directional communication simple. R…

---

## [Question about syntax-local-lift-require](https://racket.discourse.group/t/question-about-syntax-local-lift-require/1073)

<div class="topic-metadata">

**Author:** [@symingz](https://racket.discourse.group/u/symingz)\
**Replies:** 6\
**Last updated:** [June 12, 2022, 7:56pm UTC](https://racket.discourse.group/t/question-about-syntax-local-lift-require/1073 "2022-06-12T19:56:29Z")

</div>

Hi, The documentation of syntax-local-lift-require says If raw-require-spec and stx are part of the input to a transformer, then typically syntax-local-introduce should be applied to each before passing them to syntax…

---

## [DrRacket suggestion: Add a hotkey to peel off the most immediate surrounding s-expression](https://racket.discourse.group/t/drracket-suggestion-add-a-hotkey-to-peel-off-the-most-immediate-surrounding-s-expression/1057)

<div class="topic-metadata">

**Author:** [@Jesse0x42](https://racket.discourse.group/u/Jesse0x42)\
**Replies:** 7\
**Last updated:** [June 10, 2022, 9:06pm UTC](https://racket.discourse.group/t/drracket-suggestion-add-a-hotkey-to-peel-off-the-most-immediate-surrounding-s-expression/1057 "2022-06-10T21:06:20Z")

</div>

DrRacket already makes it easy to delete or hide an entire s-expression (i.e. parentheses bounded expression). However, often you actually want to delete only the surrounding s-expression rather than the entire expressi…

---

## [What is direct parameter assignment useful for?](https://racket.discourse.group/t/what-is-direct-parameter-assignment-useful-for/1047)

<div class="topic-metadata">

**Author:** [@notjack](https://racket.discourse.group/u/notjack)\
**Replies:** 20\
**Last updated:** [June 8, 2022, 3:42pm UTC](https://racket.discourse.group/t/what-is-direct-parameter-assignment-useful-for/1047 "2022-06-08T15:42:08Z")

</div>

Parameters can be either parameterized or directly assigned to. The latter mutates a thread cell, while the former attaches a continuation mark. When is it useful to actually assign a parameter instead of using paramete…

---

## [Typed Racket and Flonums](https://racket.discourse.group/t/typed-racket-and-flonums/1067)

<div class="topic-metadata">

**Author:** [@alexh](https://racket.discourse.group/u/alexh)\
**Replies:** 1\
**Last updated:** [June 7, 2022, 11:13pm UTC](https://racket.discourse.group/t/typed-racket-and-flonums/1067 "2022-06-07T23:13:43Z")

</div>

Is Typed Racket able to replace functions such as +, sqrt and sin with their fl equivalents when all the arguments are Flonums? For example, is TR able to transform the code below: (: radians-\>chlen (-\> Flonum Flonum))…

---

## [Racket meet-up Saturday, 4 Jun 2022 at 18:00 UTC](https://racket.discourse.group/t/racket-meet-up-saturday-4-jun-2022-at-18-00-utc/1030)

<div class="topic-metadata">

**Author:** [@spdegabrielle](https://racket.discourse.group/u/spdegabrielle)\
**Replies:** 10\
**Last updated:** [June 7, 2022, 6:56pm UTC](https://racket.discourse.group/t/racket-meet-up-saturday-4-jun-2022-at-18-00-utc/1030 "2022-06-07T18:56:49Z")

</div>

Racket meet-up Saturday, 4 Jun 2022 at 18:00 UTC :racket: 2022-06-04T18:00:00Z (UTC) Online: https://gather.town/app/wH1EDG3McffLjrs0/racket-users When: First Saturday EVERY month at UTC: 18:00 Show and tell News & r…

---

## [Which is the best site to post a feature request for DrRacket?](https://racket.discourse.group/t/which-is-the-best-site-to-post-a-feature-request-for-drracket/1022)

<div class="topic-metadata">

**Author:** [@joskoot](https://racket.discourse.group/u/joskoot)\
**Replies:** 9\
**Last updated:** [June 6, 2022, 10:13pm UTC](https://racket.discourse.group/t/which-is-the-best-site-to-post-a-feature-request-for-drracket/1022 "2022-06-06T22:13:38Z")

</div>

The title says it all.

---

## [Info.rkt: whitelisting test files for raco test](https://racket.discourse.group/t/info-rkt-whitelisting-test-files-for-raco-test/1059)

<div class="topic-metadata">

**Author:** [@undltd](https://racket.discourse.group/u/undltd)\
**Replies:** 6\
**Last updated:** [June 5, 2022, 4:39pm UTC](https://racket.discourse.group/t/info-rkt-whitelisting-test-files-for-raco-test/1059 "2022-06-05T16:39:18Z")

</div>

I'd like to have raco test . only test specific file(s) in my package. Listing the files in test-include-paths in info.rkt doesn't seem to have the desired effect: raco test . runs all .rkt in the current directory (inc…

---

## [Prototyping a Self-Hosting Ecosystem](https://racket.discourse.group/t/prototyping-a-self-hosting-ecosystem/1033)

<div class="topic-metadata">

**Author:** [@slg](https://racket.discourse.group/u/slg)\
**Replies:** 2\
**Last updated:** [June 4, 2022, 5:45pm UTC](https://racket.discourse.group/t/prototyping-a-self-hosting-ecosystem/1033 "2022-06-04T17:45:04Z")

</div>

This wiki uses and contains the technology it documents. I made it using a new (smaller) design for Denxi, which allows for fun reflective code. (module cheating-quine racket/base (require "denxi.rkt") (define-enclo…

---

## [Info.rkt and multiple (custom?) licenses](https://racket.discourse.group/t/info-rkt-and-multiple-custom-licenses/1052)

<div class="topic-metadata">

**Author:** [@undltd](https://racket.discourse.group/u/undltd)\
**Replies:** 2\
**Last updated:** [June 3, 2022, 2:36pm UTC](https://racket.discourse.group/t/info-rkt-and-multiple-custom-licenses/1052 "2022-06-03T14:36:55Z")

</div>

I'm working on a very simple emoji lookup utility in Racket, and it looks like I'm going to include unicode.org's emoji-test.txt, which has its own license, distinct from the license of my code. I have two questions: H…

---

## [Type checking class instances](https://racket.discourse.group/t/type-checking-class-instances/1044)

<div class="topic-metadata">

**Author:** [@alexh](https://racket.discourse.group/u/alexh)\
**Replies:** 6\
**Last updated:** [June 3, 2022, 6:33am UTC](https://racket.discourse.group/t/type-checking-class-instances/1044 "2022-06-03T06:33:01Z")

</div>

I am trying to use Typed Racket with objects (class instances) and I am unable to get to type check a program where an object instance is created on demand. The program below illustrates what I am trying to do: #lang t…

---

## [Quite OK Image format encoder and decoder in Racket](https://racket.discourse.group/t/quite-ok-image-format-encoder-and-decoder-in-racket/1042)

<div class="topic-metadata">

**Author:** [@aumouvantsillage](https://racket.discourse.group/u/aumouvantsillage)\
**Replies:** 6\
**Last updated:** [June 2, 2022, 5:55pm UTC](https://racket.discourse.group/t/quite-ok-image-format-encoder-and-decoder-in-racket/1042 "2022-06-02T17:55:59Z")

</div>

The QOI (Quite OK Image) format is a new lossless image compression format that claims similar compression ratios as PNG with faster encoding and decoding. The QOI specification is very simple and easy to implement. As …

---

## [Is this macros pair possible?](https://racket.discourse.group/t/is-this-macros-pair-possible/1048)

<div class="topic-metadata">

**Author:** [@Kalimehtar](https://racket.discourse.group/u/Kalimehtar)\
**Replies:** 2\
**Last updated:** [June 2, 2022, 3:45pm UTC](https://racket.discourse.group/t/is-this-macros-pair-possible/1048 "2022-06-02T15:45:18Z")

</div>

I would like to make something like (my-if cond1 act1 ...) (my-else act2 ...) that should expand to (if cond1 (begin act1 ...) (begin act2 ...)) Is it possible?

---

## [Emacs support for Racket programming](https://racket.discourse.group/t/emacs-support-for-racket-programming/420)

<div class="topic-metadata">

**Author:** [@spdegabrielle](https://racket.discourse.group/u/spdegabrielle)\
**Replies:** 16\
**Last updated:** [June 1, 2022, 2:27pm UTC](https://racket.discourse.group/t/emacs-support-for-racket-programming/420 "2022-06-01T14:27:29Z")

</div>

Say I was going to try Racket with Emacs. There are quite a few options in the Racket Guide: 24.2 Emacs I'd appreciate it if you could tell me what you use and why it suits you? (I'm drafting a PR to update that page …

---

## [Documentation updated to v8.5](https://racket.discourse.group/t/documentation-updated-to-v8-5/993)

<div class="topic-metadata">

**Author:** [@samth](https://racket.discourse.group/u/samth)\
**Replies:** 1\
**Last updated:** [June 1, 2022, 8:29am UTC](https://racket.discourse.group/t/documentation-updated-to-v8-5/993 "2022-06-01T08:29:41Z")

</div>

The documentation on https://docs.racket-lang.org is now updated to version 8.5. This took significantly longer than intended. Hopefully that will be avoided in the future.

---

## [How do ephermerons and weak hashes work?](https://racket.discourse.group/t/how-do-ephermerons-and-weak-hashes-work/1036)

<div class="topic-metadata">

**Author:** [@dstorrs](https://racket.discourse.group/u/dstorrs)\
**Replies:** 11\
**Last updated:** [May 31, 2022, 10:26pm UTC](https://racket.discourse.group/t/how-do-ephermerons-and-weak-hashes-work/1036 "2022-05-31T22:26:37Z")

</div>

I apparently don't understand the concept of unreachability as it applies to the garbage collector. (define h1 (make-ephemeron-hash)) (define h2 (make-weak-hash)) (struct thing (val) #:transparent) (let () (hash-set…

---

## [Futures and garbage collection](https://racket.discourse.group/t/futures-and-garbage-collection/1045)

<div class="topic-metadata">

**Author:** [@Laurent.O](https://racket.discourse.group/u/Laurent.O)\
**Replies:** 6\
**Last updated:** [May 31, 2022, 4:45pm UTC](https://racket.discourse.group/t/futures-and-garbage-collection/1045 "2022-05-31T16:45:06Z")

</div>

Using futures (via the wonderfully simple for/async), I'm seeing a long sequence of numbers like these: cpu: 256599 real: 4585 gc: 3065 I'm quite happy with the speedup I already get, but it appears that the GC is tak…

---

## [Factor out parts of syntax templates](https://racket.discourse.group/t/factor-out-parts-of-syntax-templates/800)

<div class="topic-metadata">

**Author:** [@scolobb](https://racket.discourse.group/u/scolobb)\
**Replies:** 11\
**Last updated:** [May 31, 2022, 1:33pm UTC](https://racket.discourse.group/t/factor-out-parts-of-syntax-templates/800 "2022-05-31T13:33:11Z")

</div>

Hi, I have a couple macros which produce very similar syntaxes, with some changes. I would like to factor out parts of those templates to reduce code duplication. Essentially, I would like to do something like this: (…

---

## [Current-read-interaction returning eof](https://racket.discourse.group/t/current-read-interaction-returning-eof/1032)

<div class="topic-metadata">

**Author:** [@greghendershott](https://racket.discourse.group/u/greghendershott)\
**Replies:** 3\
**Last updated:** [May 30, 2022, 1:49am UTC](https://racket.discourse.group/t/current-read-interaction-returning-eof/1032 "2022-05-30T01:49:32Z")

</div>

current-read-interaction is documented as: (current-read-interaction) → (any/c input-port? -\> any) (current-read-interaction proc) → void? proc : (any/c input-port? -\> any) A parameter that determines the current re…

---

## [Is it possible to use channels as input/output ports?](https://racket.discourse.group/t/is-it-possible-to-use-channels-as-input-output-ports/1038)

<div class="topic-metadata">

**Author:** [@dstorrs](https://racket.discourse.group/u/dstorrs)\
**Replies:** 12\
**Last updated:** [May 29, 2022, 4:31am UTC](https://racket.discourse.group/t/is-it-possible-to-use-channels-as-input-output-ports/1038 "2022-05-29T04:31:42Z")

</div>

I've been playing around with the idea of having channels that can be used like ports -- for example, (print ch) would become (channel-put ch) and (read ch) would become (channel-get ch). I thought I might be able to ge…

---

## ["Getting It" (or, Making It "Click")](https://racket.discourse.group/t/getting-it-or-making-it-click/1024)

<div class="topic-metadata">

**Author:** [@bsilver](https://racket.discourse.group/u/bsilver)\
**Replies:** 6\
**Last updated:** [May 28, 2022, 11:01pm UTC](https://racket.discourse.group/t/getting-it-or-making-it-click/1024 "2022-05-28T23:01:44Z")

</div>

Does anyone know of a document/blog entry/etc. that compares programming in Racket to programming in a language like Go? I'm still trying to get the hang of how to think of the structure of applications in Racket and it'…

[Previous page](https://racket.discourse.group/latest.md?page=57)

[Next page](https://racket.discourse.group/latest.md?page=59)
