future

Why you should know Monix alvin June 15, 2018 - 10:42am

In this short blog post I will try, in 10 minutes or less, to present what Monix library is and convince you that it is good to know it.

Formerly known as Monifu, Monix is a library for asynchronous programming in Scala and Scala.js

What’s Important Now (WIN) alvin March 21, 2018 - 12:26pm

I know, it’s a little corny, but instead of writing out a “To-Do List” — which implies hard labor and/or something I force myself to do — these days I write “WIN” on the top of my index cards. WIN stands for, “What’s Important Now”, and I find that this change in wording changes my attitude towards the things that need to be done. Rather than thinking, “Ugh, okay, what do I have to do next,” I now think of these tasks as important to me, my future, and my success.

He just reset our karmic destiny

“I have no idea who that guy was, but I know that he just reset our karmic destiny.”

(A quote from the book, Love Everyone, that makes me wonder how many times our karmic destiny is reset and we don’t notice it.)

“Life is like a dream”

When you hear mindfulness people say something like, “Life is like a dream,” one thing they mean is that more than 99.99% of the stuff going on in our minds are thoughts about the past and the future. (Past happiness or regrets, and future hopes and concerns.) Because the only thing that’s real in the present moment is what’s actually happening in *only this moment*, anything that’s outside of this moment is in a strict sense no longer real.

Along this line of thinking I like Eckhart Tolle’s two quotes, “The present moment is all you ever have” — you know that to be true for sure if you’ve ever lost consciousness, not knowing if you’d ever open your eyes again — and, “The whole essence of Zen consists in walking along the razor’s edge of Now.”

Industrial robot costs to drop 65%

According to ARK Invest, the cost of industrial robots will drop 65% by 2025. As they write, “Combined with advances in machine learning and computer vision, this drop in costs should cause an inflection point in the demand for robots as they infiltrate new industries with more provocative use cases.” (Image from the ARK Invest website.)

Looking at some differences between Scalaz Task and Scala Future

Table of Contents1 - The Scala Future example2 - The Scalaz Task example3 - What happens when you call the Future twice?4 - What happens when you call the Task twice?5 - Is one approach correct?6 - Source code

Some time ago I was searching for something and came across this Reddit thread about this tweet from Timothy Perrett, who leads Scala teams at Verizon:

“The fact that #scala Future is not lazy just blows my mind. After years of using Scalaz Task, Future is now totally unusable.”

The last part of that tweet is a bit of hyperbole to me, as I’ve been using the Scala Future for a long time myself, and I’ve had no problems using it. That being said, the examples at the top of the Reddit page were interesting, so I decided to try to understand the differences.