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) 405

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) 154

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.

Submission + - Blind your ISP with Tor (linuxjournal.com)

emil writes: ISPs and wireless carriers are preparing to sell your internet usage history with the passage of S J Res 34. It is both ironic and unconscionable that regulators and carriers view subscriber telephone records as highly-privileged, but network traffic as theirs to take.

The Tor Project presents an effective countermeasure to blind their analytics. We cover Tor's theory of network operation, and provide detailed installation instructions for Android and desktop Linux.

Use of the Tor network will bring a unique set of bandwidth, latency, and security penalties. With the latest rule changes, this has become a price that we must pay.

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.

Slashdot Top Deals

Real Users find the one combination of bizarre input values that shuts down the system for days.