Follow Slashdot stories on Twitter


Forgot your password?
What's the story with these ads on Slashdot? Check out our new blog post to find out. ×

Comment Monads! (Score 2) 536

Monads monads monads monads monads from Haskell.

Or "workflows" in F#. Related to, I think, "generators" in Scala?

Roughly (and I'm going to make up some C++/Java style syntax here), you write something like this:

workflow someExpressionMaybeAnObject
        int x = someassignment;
        some statement;

At the end of each line, you check the return value for errors, and use the handlers defined by the object up top, which could short-circuit the rest of evaluation.

These are actually a lot more general than error handling. For example, they generalize Python-style list comprehensions when used in a certain way.

In Haskell-land, there's a lot of interesting math about how they work, but you don't need it for error handling.

Moral: Learn a wider variety of languages!

Comment Re:Imagine that... (Score 1) 282

English isn't particularly more fault-tolerant than other languages. All languages are fault tolerant. It's why things like noun-verb agreement exist: they provide redundancy and error detection and correction.

English is so dominant on the Internet because England conquered the world and the US is enormously influential.

Comment Re:Regardless (Score 2, Informative) 742

When I was 10, I was making elaborate 3D models in a modeler called Form-Z, and, while I like to think I'm pretty smart, I don't think that it was that hard. Kids from like 8 to 12 have an incredible ability to hyperconcentrate on cool things like that.

When I was five, I was using a mouse to make drawings in KidPix. I don't think it is that unreasonable to expect a four year old to have a lot of fun with blender. And you are vastly underestimating them if you think they can't use a mouse.

Comment Re:Only 20 light years??? (Score 1) 575

Re: temperature, Wired article says "minus 24 degrees to 10 degrees above zero Fahrenheit" would be expected, except that it is almost certainly tidally locked, so one side is boiling with the other freezing. There would be a temperate zone in the middle.

Comment Re:Only 20 light years??? (Score 1) 575

Apparently this one was easier to find because the star was a red dwarf. This means that, because it is not as bright as the Sun, the habitable zone is much closer in and so the gravitational force between the star and the planet was larger. Moreover, the red dwarf is much less massive than the Sun. Together these two facts mean that the star wiggles a lot more do to gravitational effects than an Earthlike planet would cause a Sunlike star to, and so it was easier to find. Aliens on this planet trying to find planets around the Sun with the same techniques would be able find only Saturn and Jupiter.

So says my science writer friend.

As long as we're going to reinvent the wheel again, we might as well try making it round this time. - Mike Dennison