Oops, accidentally submitted the email before finishing writing. Have you tried `raco docs value-evt`?
On Fri, Apr 2, 2021 at 12:10 AM Sorawee Porncharoenwase < [email protected]> wrote: > `raco setup` does render the doc on my computer. I install Racket via git, > so for me, the doc is located at > `/path/to/racket/racket/doc/value-evt/index.html`. Yours might be in a > different location. > > So I think you just need to wait for the package server to build your > documentation. > > On Thu, Apr 1, 2021 at 11:37 PM Sage Gerard <[email protected]> wrote: > >> I compared the info.rkt files between your thread-with-id library and >> value-evt. One thing that stands out is the extra empty list in >> value-evt. I'm wondering if that hid defaults that would otherwise be >> provided. >> >> https://github.com/dstorrs/value-evt/blob/master/info.rkt >> https://github.com/dstorrs/thread-with-id/blob/master/info.rkt >> >> If that's not it, I'd have to take time after work to look more closely. >> >> On 4/1/21 12:31 PM, David Storrs wrote: >> > On Thu, Apr 1, 2021 at 12:18 PM Sage Gerard <[email protected]> >> wrote: >> >> Neat! Thanks for this. Did you make sure to list your scribble file in >> >> `scribblings` under info.rkt? >> >> >> > I did, yes. >> > >> > Although, now that you mention it, when I do raco setup value-evt it >> > does all the things, says "Building documentation" but the .html file >> > did not appear in the directory and it's not linked into my local doc >> > set. I hadn't noticed because I had previously created the file >> > directly using 'scribble value-evt.scrbl' What might I have done >> > wrong? >> > >> >> On 4/1/21 12:12 PM, David Storrs wrote: >> >>> Wraps an arbitrary value into a synchronizable event. The >> >>> synchronization result of the event is the original value, with two >> >>> exceptions: procedures sync to their return value and lists sync >> >>> recursively. Both of these values can be disabled via keywords. >> >>> >> >>> The package server is telling me that it needs documentation. That >> >>> confuses me since it has a .scrbl file and the .html was already >> >>> present in the repository. ISTR that the docs are only built once >> >>> every 24 hours, so presumably they will pop up at some point? >> >>> >> >>> Examples: >> >>> >> >>> ; value-evts are both evt? and value-evt?. They sync to their argument >> >>>> (define e (value-evt 9)) >> >>>> e >> >>> #<value-evt> >> >>>> (evt? e) >> >>> #t >> >>>> (value-evt? e) >> >>> #t >> >>>> (sync e) >> >>> 9 >> >>> ; >> >>> ; By default, syncing on a procedure syncs to the return value >> >>>> (define proc (lambda () (+ 2 2))) >> >>>> (sync (value-evt proc)) >> >>> 4 >> >>> ; >> >>> ; You can instead get the procedure itself back >> >>>> (sync (value-evt proc #:eval-proc? #f)) >> >>> #<procedure:proc> >> >>> ; >> >>> ; It's not a problem to specify #:eval-proc? on something that isn't >> a procedure >> >>>> (sync (value-evt "eval-proc? keyword is ignored for non-proc" >> #:eval-proc? #f)) >> >>> "eval-proc? keyword is ignored for non-proc" >> >>> ; >> >>> ; eventify always returns an evt >> >>> ; Things that are evts are unchanged >> >>>> (define ch (make-channel)) >> >>>> (evt? ch) >> >>> #t >> >>>> (eq? ch (eventify ch)) >> >>> #t >> >>> ; >> >>> ; Things that are not evts become value-evts >> >>>> (evt? 'bob) >> >>> #f >> >>>> (evt? (eventify 'bob)) >> >>> #t >> >>> ; >> >>> ; by default, value-evts containing a list sync recursively >> >>>> (let ([result-ch (make-channel)] >> >>> [arg-ch1 (make-channel)] >> >>> [arg-ch2 (make-channel)]) >> >>> (void (thread (λ () (channel-put result-ch (sync (value-evt >> (list >> >>> arg-ch1 arg-ch2))))))) >> >>> (channel-put arg-ch1 'arg1-ch-ok) >> >>> (channel-put arg-ch2 'arg2-ch-ok) >> >>> (sync result-ch)) >> >>> '(arg1-ch-ok arg2-ch-ok) >> >>> ; >> >>> ; You can ask for it to return the original list >> >>>> (let ([arg-ch1 (make-channel)] >> >>> [arg-ch2 (make-channel)]) >> >>> (sync (value-evt (list arg-ch1 arg-ch2) #:recurse-lists? #f))) >> >>> '(#<channel> #<channel>) >> >>> ; >> >>> ; all-evt is the same as value-evt but takes a rest argument >> >>> ; so you don't have to supply your own list >> >>>> (let ([result-ch (make-channel)] >> >>> [arg-ch1 (make-channel)] >> >>> [arg-ch2 (make-channel)]) >> >>> (define e (all-evt arg-ch1 arg-ch2)) >> >>> (printf "all-evt returns: ~v" e) >> >>> (void (thread (λ () (channel-put result-ch (sync e))))) >> >>> (channel-put arg-ch1 'arg1-ch-ok) >> >>> (channel-put arg-ch2 'arg2-ch-ok) >> >>> (sync result-ch)) >> >>> all-evt returns: #<value-evt> >> >>> '(arg1-ch-ok arg2-ch-ok) >> >>> >> >>> -- >> >>> You received this message because you are subscribed to the Google >> Groups "Racket Users" group. >> >>> To unsubscribe from this group and stop receiving emails from it, >> send an email to [email protected]. >> >>> To view this discussion on the web visit >> https://groups.google.com/d/msgid/racket-users/CAE8gKocr0FbpTKwgNcseNjjA_-64f4exQDkgfPPxxvFpR16pww%40mail.gmail.com >> . >> >> -- >> >> ~slg >> >> >> >> >> >> -- >> >> You received this message because you are subscribed to the Google >> Groups "Racket Users" group. >> >> To unsubscribe from this group and stop receiving emails from it, send >> an email to [email protected]. >> >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/racket-users/99793234-257c-d8e5-7454-a1d911d2ab66%40sagegerard.com >> . >> >> -- >> ~slg >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Racket Users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/racket-users/72ff4168-eaea-fd3d-a262-235cd5393389%40sagegerard.com >> . >> > -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/CADcuegt3bPNif%2BwScmyhrWV8_m44hrknMA3vRtkM0_seuEsS9w%40mail.gmail.com.

