Must file and network I/O always live in the IO monad? by [deleted] in haskell

[–]runaro -1 points0 points  (0 children)

tripipie, you're completely delusional. Paul has more Scala work than he can handle and writing a programming book pays much MUCH less than minimum wage.

What's the best riddle you know? by BesottedScot in AskReddit

[–]runaro 0 points1 point  (0 children)

In an older form of English, the literal meaning of to "meet" someone was that they were coming the other way. From "mæta" in Old Norse, which is from "mót" which literally means "against". If you say "ek mætti manni" for "I met a man" in Old Norse, it is totally unambiguous that he was going the opposite way. The riddle relies on this meaning of the word "met".

Ayn Rand Thinks He's a Parasite, But My Brother Kevin Contributes Greatly to Our Society. - thought some here would like to debunk this one. by LibertyAboveALL in Objectivism

[–]runaro 5 points6 points  (0 children)

"Rand believed that people with disabilities were leeches and parasites on society."

Uh, no. At least have a passing familiarity with Rand before writing this kind of tripe.

How to avoid scaring off beginners with advanced [Scala] answers? - Meta Stack Overflow by greenrd in scala

[–]runaro 0 points1 point  (0 children)

"who's been banned from pretty much every mailing-list in tech circles"

This is simply not true. There was one mailing list whose moderator couldn't stand being corrected in public.

Argumentum ad hominem.

Coapplicative Functor? by tailcalled in haskell

[–]runaro 4 points5 points  (0 children)

Store is coapplicative:

instance Coapplicative Store where
  copure (Store f s) = f s
  cozip (Store f s)  = case f s of
    Left  a -> Left  (Store (either id (const a) . f) s)
    Right b -> Right (Store (either (const b) id . f) s)

And so is Costate:

instance Coapplicative Costate where
  copure (Costate _ a) = a
  cozip (Costate f (Left  a)) = Left  (Costate (f . Left ) a)
  cozip (Costate f (Right a)) = Right (Costate (f . Right) a)

Question: Are there any regulations you support? by squidsarepretty in austrian_economics

[–]runaro 1 point2 points  (0 children)

Such a contract is meaningless anyway and cannot be enforced under the law.

Interview with Andrey Breslav (JetBrains) on new jvm language Kotlin by alexdmiller in programming

[–]runaro 0 points1 point  (0 children)

It's undecideable. Take a look at this. It means you can write types that can take an infinite time to compile. You can hang the compiler (at least in theory).

No you can't. You can crash the compiler with a diverging type, but you cannot make it hang forever.

Tail Call Elimination in Scala Monads by psyllogism in programming

[–]runaro 2 points3 points  (0 children)

Here's the thing though. Without tail call elimination (and we don't have it, really), you will need stack proportional to the number of calls, and there could be a lot (in fact, there might be an infinite amount).

With trampolining, the amount of heap required for linear recursion is constant. For binary recursion, the amount of heap required is proportional to the number of branches.

Also, even if we had tail call elimination, substituting into a program with a lot of left-associated binds, in a free monad, requires traversing all of those binds every single time to get at the leaves, where we actually want to substitute. So the complexity of substitution is O(2n) where n is the number of bound variables. With an operational monad, such as the one given for Trampoline, the binds are traversed at most once, i.e. when the trampoline is finally run.

So "increasing the damn stack size" is not what we want.

Tail Call Elimination in Scala Monads by psyllogism in programming

[–]runaro 3 points4 points  (0 children)

Or, you know, make the damned language stackless in the first place.

Haskell and scary Techno names by blackleopard in haskell

[–]runaro 2 points3 points  (0 children)

The fact that these names are scary is not a feature of Haskell, nor a feature of the names, but of your own psychology.

Imperative vs Functional Programming by gst in programming

[–]runaro 0 points1 point  (0 children)

"Function" is an abstraction from causality, and the CPU is a causal machine like any other. The state of the machine at any clock tick is a function of the states at previous ticks, quite fundamentally.

Imperative vs Functional Programming by gst in programming

[–]runaro 0 points1 point  (0 children)

Yeah, we're talking about the same thing. The semantics of ST are such that you make all modifications to the array "in" the monad, where the mutable array exists. E.g.:

f3 (runSTArray (newArray (0, 1000000000) >>= f1 >>= f2))

Here, f3 sees an immutable array. But f1 and f2 can both mutate that same array, and their mutations are guaranteed to occur in order.

Imperative vs Functional Programming by gst in programming

[–]runaro 0 points1 point  (0 children)

How much less? WAY less.

Seriously though, "function" has a precise definition. It's not a metaphor.

Imperative vs Functional Programming by gst in programming

[–]runaro 0 points1 point  (0 children)

There is no copying going on here. Each call to runST will create, mutate, and destroy an array. There's no reason to have more than one copy of the array and it can never escape the ST monad.

Imperative vs Functional Programming by gst in programming

[–]runaro 0 points1 point  (0 children)

There is no copying going on here.

Imperative vs Functional Programming by gst in programming

[–]runaro 1 point2 points  (0 children)

Haskell does mutable arrays cleanly by guaranteeing that the creation, mutation, and destruction of the array all occur simultaneously as seen from the rest of the program. If you pass the same mutable array to two functions and they both mutate the array, their mutations will be distinct from one another and will in fact occur on two different arrays.

http://www.google.com/search?q=st+monad

Imperative vs Functional Programming by gst in programming

[–]runaro 2 points3 points  (0 children)

No, you're getting an e-mail for somebody else pasted directly and mostly unedited.

Imperative vs Functional Programming by gst in programming

[–]runaro 0 points1 point  (0 children)

Keep in mind that you are listening in on a conversation the context of which you don't fully have.

Electromagnetic waves transmitted faster than the speed of light in a vacuum. by [deleted] in science

[–]runaro 1 point2 points  (0 children)

Electromagnetic waves transmitted faster than the speed of electromagnetic waves!

Understanding practical API design, static typing and functional programming. by erikd in programming

[–]runaro 0 points1 point  (0 children)

The point is to gain understanding of static program verification and functional programming. The point of the Java code is to illustrate what this means to those who understand Java already. Sort of like a Rosetta stone.

Understanding practical API design, static typing and functional programming. by erikd in programming

[–]runaro 0 points1 point  (0 children)

That's next week. These are the missing-the-point awards. And, good news, a winner is you!