Become a fan of Slashdot on Facebook


Forgot your password?
Back for a limited time - Get 15% off sitewide on Slashdot Deals with coupon code "BLACKFRIDAY" (some exclusions apply)". ×

Comment Re:Generic Programming (Score 2) 42

Generic programming in many languages uses virtual dispatch as everything is an Object, in contrast to C++ templates' that create a class/function catered to the type requested. So, it isn't all bad.

With C++'s templates, the compiler often produces better code for generic vs non-generic( c++ std::sort vs c qsort). Generic is faster because the compiler can reason about the data type being sorted better and doesn't have to use a type erased comparison function(c's qsort uses a int(void*, void*) type function pointer. In C++ as long as your data type has less than, it works or you can pass a function like bool is_less( Type a, Type b)

The biggest bottleneck it seems is feeding today's cpu's. The STL's algorithms are a great aid to this. Thinking in terms of sorts, rotations, partitions, transforms...etc keeps the code small and clear. Also, it allows one to easily reason and improve upon the algorithm. Most of them can be parallelized without changing the observable behaviour(mostly). So dropping in a parallel version can be very easy. Following this chain of thought, one can easily account for things like false sharing in the algorithm and not in an ungodly for loop with 5 or 6 branches.

Comment So, make it hard (Score 1) 446

If everyone started connecting to many other random other services on the network all the time, you could effectively hide in the crowds. Just make sure that the connections last long enough to be meaningful. Something like a web spider that constantly probes at a specific data rate. Throw in some sophistication with regards to data transfer, repition of connnections, etc and you may be able to hide. Also, if enough people do it, it will cost the ISP much to store the information and make it irrelivant. The trick is to make your browsing look random, which can be difficult; also you would need to filter for stuff like child porn and other stuff you definitely do not want associated with yourself.

Comment Not that much (Score 2, Interesting) 272

You can do it "well" on a dual core with 4GB of ram. Even less, but with todays prices you can get a system for a couple hundred if you watch for sales. RAM is you biggest killer that you will notice. Then again, with quad cores with VM assistance going for under $200CDN, thats relatively cheap. If you're worried about HD performance a couple 500GB drives striped will give you over 100MB/s of read speed a relatively small investment.


New York City Street Lights To Go LED 303

eldavojohn writes "Wired has a short piece on NYC's new street light project. I don't think we need to belabor the many benefits that LEDs hold over traditional light bulbs, but the finishing touches are being addressed, and they will hopefully be put into place sometime next year. This design won a competition back in 2004, and OVI has been whittling down the prototypes. At $1.175 million, this sounds like a pretty cheap deal considering the DOE forked over $21 million to 13 R&D projects along the same lines."

Many people are unenthusiastic about their work.