These are chat archives for dry-rb/chat

10th
Sep 2018
MarkT
@paradisaeidae
Sep 10 2018 05:54
Hi all, just try to run the example: https://dry-rb.org/gems/dry-monads/1.0/task/
I'm pretty new to the monads, so the result is probably a big clue: pull.call.inspect => "Task(?)"
Shoul I be able to run this as is?
MarkT
@paradisaeidae
Sep 10 2018 06:17
(?) denotes an unfinished computation....
MarkT
@paradisaeidae
Sep 10 2018 07:00
So I'm trying to have a simple example run: https://govirtual.com.au/Riviera/Monads/Gelated.rb
Is the issue that it's running in the main thread?
This is for a talk at Sydney-Ruby-Roro tomorrow evening. I have the slides pretty much done.
Figure I'll have this as the example to run. Hopefully!
Nikita Shilnikov
@flash-gordon
Sep 10 2018 07:56
@paradisaeidae tasks are started automatically, on a separate thread pool by default. You need to wait for it to finish in the main thread if you want to see the output
task.wait(secs)
there's also value!, look it up
Piotr Solnica
@solnic
Sep 10 2018 08:18
@pablocrivella definitely the former, gems should not pollute global namespace except adding their own module
MarkT
@paradisaeidae
Sep 10 2018 08:45
@flash-gordon : Thnx!