Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×

Comment Re:Recursion practicalities (Score 1) 252

This is kind of nonsense.

In most current compilers for ALGOL derived imperative programming languages (such as C, Java, C#, Pascal...), it's true, because, TRADITION! But it's not true of the underlying hardware, and it's not true of any compiler which implements its stack as a linked list. In principle there is no reason at all why you should not allocate all your available store to stack. There's also no reason why you cannot dynamically implement your stack in your heap.

These are all language (and run-time) design choices, and just because the people who specified ALGOL in 1958 - when I was three, goddammit - were working on machines which were (by modern standards) desperately poor of both mill and store, doesn't mean that we need to continue to copy the design choices they made then.

Comment Re:What do you expect? (Score 1) 252

That's a particularly stupid response, even for Slashdot. Since all iteration can be implemented as recursion, why ever use iteration?

Because some problems are more clearly expressed as iteration and some as recursion.

Try, for example, to describe in normal everyday language a route planning algorithm using iteration. Here it is using recursion:

  1. Go from here to a junction.
  2. Am I at my destination? If so, then stop.
  3. Am I closer to my destination than I was at the previous junction? If so, then recurse.
  4. Otherwise backtrack to the previous junction and choose the next branch from there.

Comment Re:Still ARM11, still a crappy CPU (Score 5, Insightful) 355

The point of a Raspberry Pi isn't to replace an Intel i7 clocked at 3GHz, it's to replace a 6502 clocked at 2MHz: to provide kids with a system to hack on. You don't need shedloads of performance to develop great software, and, indeed, the less resource you have, the more inclined you are to code tightly and efficiently. As a learning tool, less really can be more.

Comment I went into management in my thirties... (Score 1) 376

... and now at fifty nine I'm back cutting code. I prefer it, and I'm better at it.

Management suits some people, but the problem with our business culture is that if someone is really good in a technical area they get promoted into management, which means you lose your best technical people and gain a lot of second-rate managers.

Comment Re:Apparently "backers" don't understand the term (Score 2) 473

I was one of the original Kickstarter funders.

I threw my money into the pot because I got so much fun and game play out of the original Elite. Basically I thought David Braben and his team had already earned it. Am I disappointed that there's no single player offline? Yes, I am. My home internet connection has a long ping time (it's via satellite) so multiplayer combat was never going to work for me. It may be, for that reason, the game won't work at all - FOR ME. But I'm not making a fuss.

Basically if you back a kickstarter you're taking a risk. This kickstarter has enabled an amazing game to be built, and lots of people will get a huge amount of fun out of it; as far as I'm concerned, my money's well spent.

Comment Re:$4649 as configured? (Score 1) 138

I have an 8 core i7 on my home-brewed home machine, and I have to say this: neither the Windows nor the Linux scheduler efficiently load balances across eight cores, and furthermore writing my own custom software which efficiently load balances across eight cores isn't easy. I can load up all eight cores, sure, by spawning huge numbers of threads, and have computations complete faster than they would on a single core - but of the order of three times faster, not of the order or eight times faster. Spawning just eight threads just causes them to run in series on one core, taking longer than one thread, which kind of spoils the point.

So, even for your fantasy gaming rig, with present-generation operating systems you're not going to get a useful return on your investment from the extra cores. Sorry.

Comment Re:Great (Score 1) 163

Actually, modern full scale combat is going a long way towards reducing the number of people who will be killed in conflict. The point of ground warfare is to take and dominate ground and systems like this make it happen more quickly and efficiently. That's a good thing.

No, it's reducing the number of combatants killed in conflict. The amount of 'collateral damage' (aka civilian deaths) continues to increase exponentially.

Comment Re:Bad example, interesting points. (Score 1) 240

Clojure is designed to be be compatible - not backwards compatible, but intercalling compatible, with Java. The consequence is that a Clojure program can crash out of stack when it still has masses of heap. Why? Well, the JVM was designed for small embedded devices which would run small programs, which weren't expected to do a lot of recursion; and were low power with limited memory so allocating stack as a vector was seen as an efficiency win. The fact that most of the time we don't run Java on small embedded low power limited memory systems is beside the point: Java is designed to work in those circumstances, and therefore it allocates stack as a vector of fixed (limited) size. When it hits the top of that stack it's stuck, and falls over hard.

Clojure doesn't need to be like that. Even running on the JVM, it would be possible to implement a separate Clojure spaghetti stack in heap space. But the design decision was to make Java interoperability easy at the expense of limiting recursion depth. Similarly Clojure does not automatically fail over from storing integers as java Integers to storing them as bignums, as many much older Lisps are able to do. It easily could have, but it doesn't. Again, I think this is for interoperability with Java; otherwise it looks like a really odd decision.

Easy Java interop is not a bad thing. It's a good thing. It allows access to a wealth of pre-existing Java libraries. But it's a choice, and one should not blind oneself to the fact that other choices could have been made - and would have had significant merits.

Comment Re:as the birds go (Score 1) 610

No. Birds can perch safely on high voltage wires - and you'll frequently see them do so. The reason is obvious. They aren't connected to the ground; there's no potential difference across their bodies. High voltage wires - provided wires carrying different phases are further apart than the wingspan of the bird - pose no threat to birds.

Slashdot Top Deals

Happiness is twin floppies.

Working...