This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-02-27
Channels
- # announcements (2)
- # asami (5)
- # beginners (22)
- # biff (2)
- # cider (1)
- # clara (3)
- # clojure (17)
- # clojure-europe (7)
- # clojurescript (29)
- # core-async (2)
- # datahike (1)
- # fulcro (11)
- # gratitude (2)
- # integrant (2)
- # lsp (6)
- # music (2)
- # observability (1)
- # off-topic (36)
- # polylith (4)
- # quil (2)
- # reagent (15)
- # tools-deps (36)
- # xtdb (16)
Thanks, will do. Didn’t realise there was a #gratitude
There is also, if you are interested, the #nextjournal channel where the authors and users of clerk hang out.
I'm trying to think of a name/idiom for a queue-like thing where the jobs/items are indexed by a unique key; if a job with the same key gets added to the queue it ejects any existing items on the queue with the same key, otherwise it just gets added normally. Should this even be considered a queue? Is there a better data structure / software concept that maps on to what I'm describing?
not quite what I'm thinking of - heaps don't necessarily respect insertion order in determining priority for the queue, but what I'm describing is determined by order of insertion unless the uniqueness constraint is broken
Sounds close to an insertion ordered map. Although I think you might prefer a different behavior when adding a key that already exists
LinkedHashSet is close-ish
doesn't java have some new coll coming for this?
ordered-map would work as long as you don't mind doing a remove+add every time you want to add an element
Why would this be necessary?
check out the last two examples of the section I linked
if I understand the desired structure well enough it seems like they're going to have to remove and add again to stick it at the end of the ordered map
Ah okay, I misread the example, thanks.
it's easy to do 💜