Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!


Forgot your password?
DEAL: For $25 - Add A Second Phone Number To Your Smartphone for life! Use promo code SLASHDOT25. Also, Slashdot's Facebook page has a chat bot now. Message it for stories and more. Check out the new SourceForge HTML5 Internet speed test! ×

Comment I couldn't get past "how do you write a game"? (Score 5, Interesting) 407

When I was learning about functional programming in college, I got about as far as learning about the avoidance of side effects, at which point I started asking myself, "how would one write a video game in an FP language if you're not supposed to e.g. update the player's on-screen position in response to a keystroke"? The answer I got was to either generate an entire new game-state for each update (which seemed unwieldy), or work around the problem using monads, which admittedly I never really understood. I went back to procedural programming since that looked like the more straightforward way to implement the kinds of programs I wanted to write.

My question now is, do people ever actually write video games using functional programming? And if so, how would an FP-based arcade-style video game realistically handle things like updating the state of the player and the monsters at 60fps, as the game progresses?

Comment Re:Well there's your problem (Score 1) 106

Considering his smarts, it sure seems dumb for Musk to reinvent the wheel, especially for something the end user has no control over whether it works or not. As I have said many times before, there's a reason mechanical light switches are still around. They work every time.

Have you seen the doors on the Model X? Elon Musk is the new Rube Goldberg. ;)

Comment Re:What are the benefits over electric? (Score 4, Informative) 158

Why Hydrogen?

Hydrogen is a way of storing power that doesn't require a heavy, expensive, short-lived battery pack.

Of course, this was a much better argument back in the bad old days when batteries had horrible energy density, were insanely expensive, and didn't last very long.

Now that battery technology has improved quite a bit, batteries only somewhat suck and are only expensive instead of insanely expensive -- so the advantages of hydrogen over battery storage are smaller.

I expect that in the future batteries will continue to get better, and people will stop talking about hydrogen because there won't be any advantage anymore.

Comment Re:Star Wars (Score 1) 1222

That `ring' from the Death Star explosion has always bothered me. To this day I keep thinking they should have made that a spherical blast effect.

I always assumed it was due to the way the exploding nuclear (or whatever it was) core was armored -- everywhere except around the middle, so that's where most of the energy came out.

Well, that, and because it looked cool :)

Comment Code 46 (2003) (Score 1) 1222

I'll nominate "Code 46"; it was beautifully filmed and acted, and was science fiction but it wasn't about stuff blowing up or constantly rubbing CGI in your face, so to me it felt like it could be a story that might actually happen 40-50 years from now rather than a fantasy play-set with robots and spaceships.

I'd link to the trailer, but the trailer is awful; it's better to just watch the movie directly.

Comment Re:Known problem (Score 1) 389

No, we can explain our software projects to other developers just fine. It's usually not worth the time/aggravation it takes to try to explain it to anyone else.

You understand the program well, because you wrote it. Eventually, though, you'll retire (or move on to another job) and responsibility for the program will be handed over to Joey the Talented Ex-Intern, who knows enough to be able to recompile the program, and knows how to grep for keywords to find (what is probably) the right file to change in order to modify a particular minor behavior from time to time. But Joey doesn't really understand the design, and nobody else at the company knows anything about it at all...

(or at least that is how it seems to work in my industry... ymmv :))

Comment It's the CPU-flavors thing all over again (Score 4, Insightful) 92

Anyone remember the article from a year or two ago, when it was discovered that Apple was sourcing CPUs for its phones from two different manufacturers, and the phones containing CPUs from one source performed marginally better than the phones contain CPUs from the other source?

There was a big to-do, with people trying to figure out which iPhones were "the good ones", and people who had received (or thought they had received) the slower version were complaining and debating whether they ought to return their "inferior" iPhone in order to get one of the "better" ones.

Of course it turned out the difference wasn't really noticeable unless you were specifically benchmarking for it, but the fact that it was detectable at all produced a big (well, medium-sized) scandal and a headache for Apple.

Given that, I'm not at all surprised that Apple now aims for uniform performance across all units of a given model, rather than for best-possible-performance on any given OEM chipset. Uniformity makes everyone happy, whereas an optimal performance will go unnoticed by the people who have it and the people who don't will be pissed off.

Comment Re:Hey GM, how about that EV1? (Score 1) 289

To be fair, the reason GM only leased the vehicles was likely the same reason you can only lease a Fuel Cell-powered car today -- because if they were going to sell them, they'd either have to sell them at a big loss, or price them so high that nobody would buy one. Neither is a good option. It's a dilemma you face when the technology you're trying to sell costs you more to build than people are willing to pay you for it.

Comment Re:"Voluntary" - Sarcastic, imaginary (Score 4, Insightful) 132

How would you like a regulation having passed that made every website use HTML 3.2, Perl and Oracle 8.

This would be a good argument against the government mandating that every ISP use only 100 megabit Ethernet, or DSL lines only.

But, speaking of straw-man arguments, that is not what net neutrality is about. Net neutrality is about preventing ISPs from leveraging their near-monopoly position as last-mile gatekeepers in order to price their non-ISP competitors out of the Internet-content market.

Net neutrality laws do not specify what technologies an ISP may or may not use; it only specifies that an ISP may not privilege some content above others by charging different content-providers different rates for the same number of kilobytes of content.

If you think that's an unreasonable restriction, feel free to describe why. If you think the ISPs can be trusted not to abuse their monopoly position in short order when given the opportunity to do so, explain why you think so.

Slashdot Top Deals

You should never bet against anything in science at odds of more than about 10^12 to 1. -- Ernest Rutherford