# \#today-i-learnt

**URL:** https://racket.discourse.group/tag/today-i-learnt/105.md

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

---

## [TIL how to convert hex triplet to \`racket/draw\` color](https://racket.discourse.group/t/til-how-to-convert-hex-triplet-to-racket-draw-color/3979)

<div class="topic-metadata">

**Author:** [@spdegabrielle](https://racket.discourse.group/u/spdegabrielle)\
**Replies:** 0\
**Last updated:** [October 21, 2025, 1:11pm UTC](https://racket.discourse.group/t/til-how-to-convert-hex-triplet-to-racket-draw-color/3979 "2025-10-21T13:11:45Z")

</div>

TIL how to convert a hex triplet to racket/draw color ;; Convert hex triplet to \`racket/draw\` color ;; hex-triplet-\>color% : hex -\> colour% (define (hex-triplet-\>color% x) (define-values \[r g b\] (values (arithmeti…

---

## [TIL: Partial application and currying aren't the same](https://racket.discourse.group/t/til-partial-application-and-currying-arent-the-same/1082)

<div class="topic-metadata">

**Author:** [@sschwarzer](https://racket.discourse.group/u/sschwarzer)\
**Replies:** 4\
**Last updated:** [November 1, 2024, 9:00am UTC](https://racket.discourse.group/t/til-partial-application-and-currying-arent-the-same/1082 "2024-11-01T09:00:24Z")

</div>

Up to yesterday, I thought that currying was the same as partial function application. They're not, as I learned from some web research (e.g. 1, 2, 3). But the concepts are similar, probably that's where the misunderstan…

---

## [Ubuntu Linux + Racket 8.10 snap + Emacs racket-mode](https://racket.discourse.group/t/ubuntu-linux-racket-8-10-snap-emacs-racket-mode/2263)

<div class="topic-metadata">

**Author:** [@alexh](https://racket.discourse.group/u/alexh)\
**Replies:** 16\
**Last updated:** [December 1, 2023, 10:33pm UTC](https://racket.discourse.group/t/ubuntu-linux-racket-8-10-snap-emacs-racket-mode/2263 "2023-12-01T22:33:38Z")

</div>

I spent some time figuring out this behavior and I thought it might be useful to others: On an Ubuntu Linux machine, I installed Racket 8.10 as a snap, and everything was working fine, except racket-mode in Emacs. The …

---

## [\[TIL\] hash-ref is very fast on hasheq](https://racket.discourse.group/t/til-hash-ref-is-very-fast-on-hasheq/1397)

<div class="topic-metadata">

**Author:** [@Laurent.O](https://racket.discourse.group/u/Laurent.O)\
**Replies:** 5\
**Last updated:** [October 17, 2022, 7:14pm UTC](https://racket.discourse.group/t/til-hash-ref-is-very-fast-on-hasheq/1397 "2022-10-17T19:14:12Z")

</div>

Not a question per se, just a positive remark: I was wondering whether hash-ref was fast for fixed large sets of fixnums, or if a custom binary search could do better. Answer: It's plenty fast: it can answer 1 000 000 qu…

---

## [Function and macro to define unique values](https://racket.discourse.group/t/function-and-macro-to-define-unique-values/1097)

<div class="topic-metadata">

**Author:** [@sschwarzer](https://racket.discourse.group/u/sschwarzer)\
**Replies:** 9\
**Last updated:** [June 27, 2022, 5:29am UTC](https://racket.discourse.group/t/function-and-macro-to-define-unique-values/1097 "2022-06-27T05:29:33Z")

</div>

I've seen the idiom (struct unique-value ()) to create unique values, for example as default arguments in a function to check with (eq? argument unique-value) if anything was passed for the argument. Since I have only…

---

## [TIL: Inherited fields in structure subtypes are accessed with the accessor from the supertype](https://racket.discourse.group/t/til-inherited-fields-in-structure-subtypes-are-accessed-with-the-accessor-from-the-supertype/965)

<div class="topic-metadata">

**Author:** [@jamesgeddes](https://racket.discourse.group/u/jamesgeddes)\
**Replies:** 7\
**Last updated:** [May 5, 2022, 4:39pm UTC](https://racket.discourse.group/t/til-inherited-fields-in-structure-subtypes-are-accessed-with-the-accessor-from-the-supertype/965 "2022-05-05T16:39:47Z")

</div>

I thought you'd get at all fields in the subtype with accessors derived from the name of the subtype. No -- for supertype fields you use the supertype accessors. For example, if: A position is a pair of numbers: (stru…

---

## [TIL: numbers don't always print the same way](https://racket.discourse.group/t/til-numbers-dont-always-print-the-same-way/955)

<div class="topic-metadata">

**Author:** [@Laurent.O](https://racket.discourse.group/u/Laurent.O)\
**Replies:** 4\
**Last updated:** [May 3, 2022, 4:33pm UTC](https://racket.discourse.group/t/til-numbers-dont-always-print-the-same-way/955 "2022-05-03T16:33:39Z")

</div>

(merely trying out a today-i-learnt tag) Numbers may not print the same depending on the underlying formatter, even for base Racket. For example: \> (~r 1234567890123456789.123) "1234567890123456768" \> 12345678901234567…
