=/ rng ~(. og eny) :: random number generator
=/ unread=(list [key=@ item])
%+ murn (tap:i-orm items)
|= [k=@ =item]
?.(done.item ~ `[k item]) :: list of unread items
=/ val (rad:rng (lent unread)) :: gets a random number between 0 and the length of the list generated on the next line
=/ randomitem=[@ item] (snag val unread)
:^ ~ ~ %cue-update
!> ^- update
[now %cue [randomitem ~]]
you can more easily identify where these issues stem from by assigning types to your faces, like I'm doing here: =/ unread=(list [key=@ item])
https://github.com/mallus-fabres/cue/blob/1f58ba44506e31505ee2d1f85b0f31e7a2ba1a5b/app/cue.hoon#L123-L130 can do something like this:
you can more easily identify where these issues stem from by assigning types to your faces, like I'm doing here:
=/ unread=(list [key=@ item])