danidiaz

Joined 14 years ago

Karma
628
Submissions
278
Member since
Dec 22
productivedetour.blogspot.com
View on Hacker News

Recent submissions

Comment · 2 years ago
Comment · 2 years ago
Comment · 2 years ago
I would also recommend the site "Science Fiction Ruminations": https://sciencefictionruminations.com/

Lots of thoughtful sf book reviews with a heavy (but not exclusive) focus on the New Wave.

Comment · 3 years ago
Comment · 3 years ago
https://qntm.org/mmacevedo

> However, even for these tasks, its performance has dropped measurably since the early 2060s and is now considered subpar compared to more recent uploads. This is primarily attributed to MMAcevedo's lack of understanding of the technological, social and political changes which have occurred in modern society since its creation in 2031. This phenomenon has also been observed in other uploads created after MMAcevedo, and is now referred to as context drift.

Comment · 3 years ago
> Purifying an (unnecessarily-) IO function into an ordinary function is a good exercise.

Agree! And I would add that you can "purify" a monadic function without having to rewrite it in non-monadic style. You can make it polymorphic over all monads and relegate the "impurity" to monadic functions that you pass as arguments/dependencies. A trivial example:

  twice :: IO ()
  twice = do
      putStrLn "foo"
      putStrLn "foo"
  
  twice' :: forall m. m () -> m ()
  twice' action = do 
      action
      action
This is not that different to having a Spring bean that doesn't perform any effect directly—say, a direct invocation to "Instant.now()"—but instead receives a "Clock" object through dependency injection.

Haskell lets you express the idea of "program logic that only has effects through its dependencies" by being polymorphic over all monads.

Comment · 3 years ago
Comment · 3 years ago
Comment · 3 years ago

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton