News for hackers. Stuff that matters.
Re:Calling Purgatory from Heaven: Binding to Rust in Haskell by carlmr on Wednesday April 05, 2023 @02:19AM (#35450074)
Calling Rust purgatory on HN and getting away with it. What a time to be alive.

Although i guess that makes C++ hell, which is appropriate.

Re:Calling Purgatory from Heaven: Binding to Rust in Haskell by bradwood on Wednesday April 05, 2023 @02:24AM (#35450112)
I'll take Rust over Haskell all day long. Even though Haskell does rock.
Re:Calling Purgatory from Heaven: Binding to Rust in Haskell by 1attice on Wednesday April 05, 2023 @02:35AM (#35450181)
This is because you keep state. You are fallen.
Re:Calling Purgatory from Heaven: Binding to Rust in Haskell by danielheath on Wednesday April 05, 2023 @03:41AM (#35450670)
“Church vs state”, an century-old conflict.
Re:Calling Purgatory from Heaven: Binding to Rust in Haskell by eurasiantiger on Wednesday April 05, 2023 @04:24AM (#35451012)
Start hopping on rails, enjoy life and see everything going by for the circus it is
Re:Calling Purgatory from Heaven: Binding to Rust in Haskell by codetrotter on Wednesday April 05, 2023 @04:40AM (#35451123)
> Start hopping on rails, enjoy life and see everything going by for the circus it is

I thought this might be a quote from the movie Trainspotting (1996). Seems to have a similar spirit to some of the things from that movie.

Re:Calling Purgatory from Heaven: Binding to Rust in Haskell by ARandomerDude on Wednesday April 05, 2023 @10:38AM (#35455031)
I made a lot of money off of Rails but finally switched to Clojure because of the gem pain.

So many gems are C or system wrappers and require very specific versions of Ruby and whatever underlying libraries are called. That's fine on brand new dev projects, but it leads to a lot of unexpected web searches when it's time to ship code or return to a project you haven't touched in 6 months.

Pinning your gems helps with some of this but every time it popped up I thought ugh...here we go again. Eventually that pain made me look for a better way.

One of the oft-undersold features of Clojure is the culture is more careful with breaking changes.

Re:Calling Purgatory from Heaven: Binding to Rust in Haskell by cultofmetatron on Wednesday April 05, 2023 @01:15PM (#35457399)
jump to elixir. enjoy life and get great runtime perf too!
Re:Calling Purgatory from Heaven: Binding to Rust in Haskell by ekidd on Wednesday April 05, 2023 @09:44AM (#35454041)
> This is because you keep state. You are fallen.

The Rust philosophy is that there is nothing wrong with mutating state, as long as nobody can ever see you do it. :-)

Re:Calling Purgatory from Heaven: Binding to Rust in Haskell by Tarq0n on Wednesday April 05, 2023 @10:06AM (#35454472)
So Catholicism.
Re:Calling Purgatory from Heaven: Binding to Rust in Haskell by recfab on Wednesday April 05, 2023 @11:50AM (#35456162)
"Forgive me Borrow Checker, for I have sinned"
Re:Calling Purgatory from Heaven: Binding to Rust in Haskell by Gordonjcp on Wednesday April 05, 2023 @04:26AM (#35451025)
I don't really get what's so good about Haskell.
Re:Calling Purgatory from Heaven: Binding to Rust in Haskell by ParetoOptimal on Wednesday April 05, 2023 @05:16AM (#35451400)
local reasoning everywhere via lazy evaluation.

Principled abstractions enabling unparalleled composition.

Usable effects libraries like effectful.

Easy concurrency and parallelism.

Fearless refactoring.

stm.

Re:Calling Purgatory from Heaven: Binding to Rust in Haskell by kreetx on Wednesday April 05, 2023 @05:22AM (#35451443)
I wouldn't plug effectful here - MTL and few others are usable as well, or not using an effect library at all.
Re:Calling Purgatory from Heaven: Binding to Rust in Haskell by ParetoOptimal on Wednesday April 05, 2023 @09:16AM (#35453620)
I'm unconvinced that suboptimal versions of Haskell such as mtl with it's n+1 instances or very strict interpretations of simple Haskell have the ability to meaningfully move the popularity needle of Haskell forward.

With that view it makes since to highlight either "Haskell v2", my ideal flavor of Haskell without reservation, or some mix of the two.

There's a time I wouldn't have mentioned effectul for exactly the reasons you allude to, but... I suppose I along with reasons cited, I no longer care that much in a way.

Re:Calling Purgatory from Heaven: Binding to Rust in Haskell by kreetx on Wednesday April 05, 2023 @02:36PM (#35458586)
Already ADTs do it for me when comparing to other popular languages :)
Re:Calling Purgatory from Heaven: Binding to Rust in Haskell by didroe on Wednesday April 05, 2023 @07:30AM (#35452346)
> local reasoning everywhere via lazy evaluation

Doesn't lazy evaluation mean memory/complexity issues could manifest far away from the problematic code?

Re:Calling Purgatory from Heaven: Binding to Rust in Haskell by whateveracct on Wednesday April 05, 2023 @09:02AM (#35453428)
occasionally but usually not

the reasoning is about correctness and program behavior

Haskell is still the only mainstream language that truly delivers on "understand the part without needing to consider the whole." Others can with work and discipline. With Haskell, you usually have to work hard to get in that level of quagmire (and I've seen and fixed plenty of quagmires. I've seen people complain about code too and just be wrong when I got my hands dirty for like an afternoon.)

Re:Calling Purgatory from Heaven: Binding to Rust in Haskell by ParetoOptimal on Wednesday April 05, 2023 @09:18AM (#35453647)
Pithy answer: In theory, but very often doesn't matter in practice.

I think the sibling response has a good answer FYI.

Re:Calling Purgatory from Heaven: Binding to Rust in Haskell by Gordonjcp on Wednesday April 05, 2023 @12:06PM (#35456409)
I mean this sounds like a lot of buzzwords, which is usually the answer I get when I ask why I should use Haskell.

What would it do to make my life easier?

Re:Calling Purgatory from Heaven: Binding to Rust in Haskell by ParetoOptimal on Wednesday April 05, 2023 @01:57PM (#35458040)
> I mean this sounds like a lot of buzzwords, which is usually the answer I get when I ask why I should use Haskell.

That's what makes it a hard sell I guess?

> What would it do to make my life easier?

It gives those advantages which I'll explain more in a moment everywhere, meaning you can depend on those things in your and others code.

Similar to how it's difficult to explain why it's insanely useful that emacs is plain text everywhere.

Now let's see if I can demonstrate how just one of these could make your life easier... Local reasoning.

A good definition:

> Local reasoning is a property of some code wherein the correctness of the code can be inferred locally under specified assumptions, without considering prior application state or all possible inputs.

Give me a second to think up a good example. Have a desired language or code example in mind that doesn't use local reasoning?

Re:Calling Purgatory from Heaven: Binding to Rust in Haskell by Gordonjcp on Wednesday April 05, 2023 @05:18PM (#35460494)
I'm not sure I know what local reasoning is.

Most of the code I write needs to take in a chunk of floating point data a few thousand points long, do a lot of maths on it, and emit it back out again, as quickly as possible, over and over.

Re:Calling Purgatory from Heaven: Binding to Rust in Haskell by MrBuddyCasino on Wednesday April 05, 2023 @05:19AM (#35451416)
What is there not to get? You see, a monad is just a monoid in the category of endofunctors,
Re:Calling Purgatory from Heaven: Binding to Rust in Haskell by bradwood on Wednesday April 05, 2023 @04:56PM (#35460267)
It's cos it's all up in that category theory bro.
Re:Calling Purgatory from Heaven: Binding to Rust in Haskell by swexbe on Wednesday April 05, 2023 @07:48AM (#35452492)
As always, depends on what you're writing :)
Re:Calling Purgatory from Heaven: Binding to Rust in Haskell by Ygg2 on Wednesday April 05, 2023 @02:31AM (#35450156)
What is assembly then?
Re:Calling Purgatory from Heaven: Binding to Rust in Haskell by 1attice on Wednesday April 05, 2023 @02:36AM (#35450187)
"The Earth was without form and void and darkness was upon the face of the deep"
Re:Calling Purgatory from Heaven: Binding to Rust in Haskell by actionfromafar on Wednesday April 05, 2023 @10:13AM (#35454578)
"The Earth was without form and void and darkness was upon the face of the heep"
Re:Calling Purgatory from Heaven: Binding to Rust in Haskell by 1attice on Wednesday April 05, 2023 @01:49PM (#35457907)
I'm torn between appreciating your wit and lamenting my own missed opportunity :P

Beautifully done.

Re:Calling Purgatory from Heaven: Binding to Rust in Haskell by lionkor on Wednesday April 05, 2023 @02:48AM (#35450269)
Based
Re:Calling Purgatory from Heaven: Binding to Rust in Haskell by codetrotter on Wednesday April 05, 2023 @04:41AM (#35451134)
Based in facts? Based in fiction?

No, just based.

Re:Calling Purgatory from Heaven: Binding to Rust in Haskell by quickthrower2 on Wednesday April 05, 2023 @06:05AM (#35451729)
Based in 64
Re:Calling Purgatory from Heaven: Binding to Rust in Haskell by mech422 on Wednesday April 05, 2023 @08:31AM (#35452999)
Heh - my first chuckle of the morning :-)
Re:Calling Purgatory from Heaven: Binding to Rust in Haskell by baq on Wednesday April 05, 2023 @02:48AM (#35450271)
That’s what both heaven and hell are actually written in by a dude in pajamas.
Re:Calling Purgatory from Heaven: Binding to Rust in Haskell by biomcgary on Wednesday April 05, 2023 @02:13PM (#35458283)
Obligatory XKCD: https://xkcd.com/378/
Re:Calling Purgatory from Heaven: Binding to Rust in Haskell by hyperno on Wednesday April 05, 2023 @02:49AM (#35450277)
What dwells beyond the darkness.
Re:Calling Purgatory from Heaven: Binding to Rust in Haskell by bradwood on Wednesday April 05, 2023 @04:58PM (#35460285)
Java
Re:Calling Purgatory from Heaven: Binding to Rust in Haskell by lallysingh on Wednesday April 05, 2023 @10:48AM (#35455181)
Unproductive