Recent submissions

Comment · 8 years ago
And this is why they need human brains in The Matrix
Comment · 8 years ago
A type-class or just a callback type, vs pattern-matching, yeah.
Comment · 8 years ago
There's a huge advantage to not everything being async/await. Knowing exactly when you yield control can give you atomicity and more determinism for free.
Comment · 8 years ago
Then what you have is not "anything". You have an expression problem:

Either each element has some "handler" that does the right thing for that data type.

Or you have a set of cases that each data can be, and you handle them all.

Neither is just "any type". And static types are very suitable to describe either.

Comment · 8 years ago
Everything is of course possible, but at what cost?

In my experience, with large projects, you get to pick 2:

Dynamic typing Development velocity Reliability

I've seen multiple large projects grind to a near halt in their development speed, and I've seen some retain development speed, but unreliably crash after various changes.

UT coverage is expensive. System tests don't catch everything. Either you fear changes, and the system rots, or you work very slowly with coverage for everything.

Comment · 8 years ago
When do you have lists of lists of elements of any type?

What can you even do given such a value?

Comment · 8 years ago
That's great for functions you just wrote. It's not as great for functions you change in a large code base.
Comment · 8 years ago
Rust is a great systems language.

When I write applications, I don't need a systems language, and Haskell is easier to use.

Also, Rust is a great imperative language, it's not as great as a functional language, and you can't reap the benefits of pure functional programming.

Comment · 8 years ago
An average US citizen contributes far more to pollution than the average African or Asian.
Comment · 8 years ago
Comment · 8 years ago
Haskell has reasonable implementations of row types as well.
Comment · 8 years ago
Life on Earth started within a few hundred million years, not 2 billion years.
Comment · 8 years ago
I suspect the problem is mentoring. It took me months to get basic Haskell.

The people I mentored, though, could clarify any misunderstanding and get explanations from multiple viewpoints from me -- after years of experience with these abstractions. With such mentoring, you don't have to go through all the confusion phases.

Comment · 8 years ago
Haskell record syntax with lenses is workable:

  import Control.Lens

  data MyRecord = MyRecord { _a :: Int, _b :: MyRecord }
  makeLenses ''MyRecord
Then you can use it nested like:

  over (b . b . a) (+5) myRecord
Comment · 8 years ago
I've mentored programmers in Haskell and they were also productive within a few weeks.

I'm pretty sure I could get a student to write useful Haskell code in that time span with just mentoring and existing documentation material.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton