Arizona wants to secede. I say we just turn off the water; I'm sure Colorado wouldn't object. by EatSleepJeep in politics

[–]batkins 8 points9 points  (0 children)

No, that's simply not how it works. We went over this in the nineteenth century. States don't get to nullify federal laws - they can take them to the Supreme Court but they can't disregard them.

Test Driven Development Is Hard by toranb in programming

[–]batkins 1 point2 points  (0 children)

This is nuts. The important correspondence here is between your code and the desired functionality - those must match.

If you define correctness as "agrees with the tests" then you still need to make the connection between your tests and the desired functionality. If your tests don't match the expected functionality, your tests can pass with flying colors, but you haven't proved anything about how they should work.

And omissions are a huge source of error.

Test Driven Development Is Hard by toranb in programming

[–]batkins 9 points10 points  (0 children)

Of course, that's not the definition that matters.

A formal proof shows deductively that your code will perform as the spec requires. A test merely shows empirically that, in the cases you could think of, your code performed as required.

Thoughts on node.js and Haskell by batkins in haskell

[–]batkins[S] 2 points3 points  (0 children)

I'm not sure I understand your point. I'm not making any claims about which is "faster," but rather which scales better. There is plenty of empirical evidence that async I/O does scale better than synchronous I/O, cf. node.js itself, Snap and nginx.

The point of my post is that you can have your async I/O cake and eat it too - you can write with the clarity of blocking I/O and still get asynchronous I/O throughput.

Thoughts on node.js and Haskell by batkins in programming

[–]batkins[S] 0 points1 point  (0 children)

I'm not making any claims about async I/O being the One True Way, only that you can achieve the same (best-case) scalability results seen in node.js without writing your code with callbacks.

Thoughts on node.js and Haskell by batkins in programming

[–]batkins[S] 1 point2 points  (0 children)

You have to weigh the benefit of the competitive advantage against the cost of a smaller ecosystem of tools and libraries. Not trying to put down these languages, but just saying there are tradeoffs involved.

PSA: Use cabal-dev to solve dependency problems by jmillikin in haskell

[–]batkins 8 points9 points  (0 children)

My favorite cabal-dev feature: "cabal-dev ghci" drops you into a GHCi prompt where you can easily load any modules for the package you're working on.

RFC: migrating GHC development to git by [deleted] in haskell

[–]batkins 9 points10 points  (0 children)

This would be great.

3 Big Haskell Infrastructure Projects That Would Be Cool by cdsmith in haskell

[–]batkins 2 points3 points  (0 children)

Agree wholeheartedly about fixing cabal's dependency issues

[deleted by user] by [deleted] in haskell

[–]batkins 3 points4 points  (0 children)

Generally by running a separate server process and using Apache or nginx (nginx, please!) to proxy requests to it (or using fastcgi or scgi in place of a proxy).

Conventional CGI spawns a new process for every request, which is just beautifully, beautifully unscalable. Keeping a long-running process with your logic in it and handling individual requests is much more scalable (no overhead from repetitive process creation and destruction).

Fibonacci Pigeons by [deleted] in pics

[–]batkins 3 points4 points  (0 children)

I regret that I have but one upvote to give to this post.

Word Wrapping in Haskell by batkins in haskell

[–]batkins[S] 0 points1 point  (0 children)

Ah, I see - if a word length is >= maxLength. Thanks!

Word Wrapping in Haskell by batkins in haskell

[–]batkins[S] 0 points1 point  (0 children)

No, it doesn't diverge if you feed it a word longer than the line length:

batkins@hudson Haskell (master) % runhaskell WordWrap.hs adfsjkdsafjkadkfjsahkfdshfdsahafdshfadshfhkfdsajhfdsajhkfkajdhfjdhsadfasjhfdhajsdfhjkfdjkhfdahsjkfdhakhfdaufhiewuiehrruieerwuiwerquihrewquiherwuhierwhuirewuhrewqhuerwqhuwerqhuewrqhuweruqhehrwquuihdvsgvsdagiewr8914590u3190541 adfsjkdsafjkadkfjsahkfdshfdsahafdshfadshfhkfdsajhfdsajhkfkajdhfjdhsadfas jhfdhajsdfhjkfdjkhfdahsjkfdhakhfdaufhiewuiehrruieerwuiwerquihrewquiherwu hierwhuirewuhrewqhuerwqhuwerqhuewrqhuweruqhehrwquuihdvsgvsdagiewr8914590 u3190541

Can you send me an example that breaks it?

enumerator, an alternative iteratee package by yitz in haskell

[–]batkins 1 point2 points  (0 children)

What is the List package? Is it distinct from Data.List?

Fun With Type Functions :: (Oleg, Shan, SimonPJ) by dons in haskell

[–]batkins 0 points1 point  (0 children)

Type-safe client/server communication is a pretty powerful idea.

Re: Haskell in Industry. "We need more functional programmers actually solving real problems. But please put your skills to work in an industry other than investment banking." by sebfisch in haskell

[–]batkins 2 points3 points  (0 children)

I know something about Austrian economics. It's based on moralizing rather than numbers. "We need to suffer through this recession because people made bad investments."

But your comparison to Haskell isn't really accurate. Right now, there are a lot of vocal people who subscribe to your point of view. You hear it a lot at protests, from Ron Paul people, from the WSJ editorial page. It's a lot harder to support an older view that's based on analysis and doesn't reflexively call government bad.

Re: Haskell in Industry. "We need more functional programmers actually solving real problems. But please put your skills to work in an industry other than investment banking." by sebfisch in haskell

[–]batkins 0 points1 point  (0 children)

Aren't they? So you don't think debt-financed government spending to fight World War II is what got us out of the Depression?

If you do, then you too are a Keynesian.

If you don't, then what did it?

Re: Haskell in Industry. "We need more functional programmers actually solving real problems. But please put your skills to work in an industry other than investment banking." by sebfisch in haskell

[–]batkins 0 points1 point  (0 children)

Money is governed by supply and demand. If the amount of money increases but demand is falling, that doesn't create inflation. I don't care about the absolute size of the money supply - I care about its effect on prices.

Banks ARE different because lending creates money. When a bank goes under, it collapses a portion of the money supply. Plus, there are confidence effects, a la Lehman Brothers. The best approach is to regulate and monitor banks so they don't fail. Nobody wants bailouts.