Zoom Logo

Essential Effects - Singapore Scala Programmers - Shared screen with speaker view
Olav Groendal
17:49
You certainly may! :D
Raymond
18:39
hello everyone
Karthik Ravikanti
20:26
Hello!
Karthik Ravikanti
41:24
Scala novice here. How come the println doesn’t run when we construct the MyIO? Is it like a macro?
Raymond
41:28
been using cats effect for a while and the hard part is on educating fellow developers that these functions have side effects but they don’t run till you pass them into the IO interpreter.
Karthik Ravikanti
42:08
Ah, that makes sense
Karthik Ravikanti
42:13
it should take alambda
Raymond
42:56
sorry I’m getting ahead of myself there ;)
joydeepbanikroy
43:14
It’s we are writing a definition of what we want to do and then do it later
renghen
43:29
it does not run because it is a thunk
William Haw
46:01
Isn’t a thunk a partially evaluated result?
renghen
46:35
it is evaluated when invoke, lazily
Jason Yeo
47:25
A thunk is just a lambda
renghen
47:41
yes
Karthik Ravikanti
48:15
A nullary lambda, perhaps?
renghen
49:51
in kotlin you would write it like (unsafe : () ->A,) in scala it is so common that that the syntax is adjusted so that it looks like unsafe: => A
Karthik Ravikanti
50:44
I like how the guts of IO are exposed here as opposed Haskell’s blackbox IO
renghen
59:07
if a future is in an IO, does it have the behavior of an IO or that of a future ?
sean kwak
01:00:16
I am actually outside due to some circumstance. I need to leave for some reason. sorry, see you everyone 👋😅 thank you for this awesome session, Adam 😄😍
Karthik Ravikanti
01:06:33
“It’s always traverse”
Olav Groendal
01:06:44
haha - yes that is always the anwer
Olav Groendal
01:08:04
I have a question - about the error failues of parMapN - should it not run them all and return all the errors? When I see MapN I just think of the MapN from the Validate Applicative in cats
Jason Yeo
01:08:25
question: Are we using a thread pool in the background when we use the par* functions?
renghen
01:08:42
there are 3 thread pools
Karthik Ravikanti
01:10:19
IOApp sounds like “executor” in Rust
Karthik Ravikanti
01:10:37
Except there it’s only for async
Karthik Ravikanti
01:10:52
Futures, I mean
Olav Groendal
01:12:10
I guess that makes sense, but I just expected there to be a version that is like Either[Nel[Error], A ]
Olav Groendal
01:12:47
Thanks - makes sense
Felix Ho
01:39:18
do I still need parMapN when I use blocker, as the job encapsulated in blocker is run in separate thread anyway ?
Herdy Handoko
01:41:51
I believe it's different use cases, AFAIK parMapN will run on the current context, whereas blocker will context switch to the blocker context.
Felix Ho
01:42:31
Thanks Adam and Herdy! :) I will do experiment
Jason Yeo
01:42:48
Could you talk a little bit more about this abstract F[_] that I always see in cats effect code bases. If it’s abstract how do I think about how it’s executed?
renghen
01:43:16
great book - buy it
Raymond
01:43:20
very awesome !
Karthik Ravikanti
01:43:35
Loved it
Cheng Xu
01:44:02
Thanks Adam! Great talk.
Olav Groendal
01:44:23
I have a question on transitioning to cats effects. If you have a large app that uses cats and akka-http for networking and slick for database access. That use other monads like DBIO. How would you start the transitioning.
Olav Groendal
01:44:36
And also - thanks for a great talk.
Karthik Ravikanti
01:45:58
What additional books do you recommend for someone who’s completely new to Scala?
renghen
01:47:07
https://www.manning.com/books/functional-programming-in-scala
renghen
01:47:20
that book is a bible
Olav Groendal
01:47:33
I second renghen - it is a great great book
Jason Yeo
01:47:38
Example of such a codebase: https://github.com/gvolpe/advanced-http4s/blob/master/src/main/scala/com/github/gvolpe/http4s/server/endpoints/FileHttpEndpoint.scala
renghen
01:48:55
https://www.amazon.com/Functional-Programming-Simplified-Alvin-Alexander-ebook/dp/B076J7CJKY
renghen
01:49:01
also another good book
Karthik Ravikanti
01:54:08
Thanks for the recess!
Karthik Ravikanti
01:54:12
reccos*
Kai Ming
01:54:36
Thanks Adam! It's a great talk.
Jason Yeo
01:54:51
https://underscore.io/books/essential-scala/
Raymond
01:54:53
thanks Adam for the presentation :) I gotta go for a meeting ! c u on the internet
Adam Rosien
01:54:59
creativescala.org for beginners
Jason Yeo
01:55:09
Tons of other books here too https://underscore.io/books/
Felix Ho
01:55:44
Thank you so much Adam! Great talk!
renghen
01:56:48
doobie
renghen
01:56:53
quill
Felix Ho
01:57:27
Is essentialeffects.dev book for unsafe Scala programmer transitioning to cats effect ?
Karthik Ravikanti
01:58:45
Do these techniques work with Scala Native?
Jason Yeo
01:59:27
I doubt the executor stuff works in Scala native. It depends on the jvm executors iiuc.
Karthik Ravikanti
02:00:42
Thanks
Olav Groendal
02:00:52
Thanks for a great talk
Jason Yeo
02:01:07
awesome stuff! thanks for the talk and for answering our questions!
renghen
02:01:15
great talk