Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×

Comment Re:Freak your colleagues out with "no loop" code.. (Score 1) 382

Actually, R is an imperative language. You can loop just fine, as well as modify variables (state) and everything else you'd expect from a normal language. (Though functions are first-class objects and all that)

The reason you don't is that it's like SQL in that its statements can work on whole tables at a time. For example, applying mean() to a table gives you an array with the mean value of every column (and the array positions are named after the column names).

If you want to get the rows of an array (x) with 0 on column 1, you do x[x[,1]==0]. basically, x[,1] gives you a one column table with the appropriate column, x[,1]==0 gives you a vector of true,false values, which you can use to index into the array again.

You can do things like by(x,x[,1]==0,nrow), which gives you how many rows have 0 and how many don't on column 1. by(x,x[,1]==0,mean) gives you the per-column mean of the rows which have 0 on column 1 and the same for those that don't

Anyway, you get the idea. You can loop just like can use cursors in SQL, but your code will be slower and less readable if you do.

Comment Re:Reality check people (Score 1) 951

Actually, they can already be reprogrammed wirelessly, but not via wifi or bluetooth, nor at any reasonable range.

Since only doctors have to change the settings, it is profitable for the pacemaker companies to make pacemakers require a special handheld programmer using a special low-power protocol and built by the same company. Vendor lock-in of doctors and all that.

Comment Re:Missing Options (Score 1) 233

Replanting is great, but does that newly planted tree use as much CO2 as the 100 year old one cut down? Trees take a while to regrow... so saying they're being replanting is a bit disingenuous.

Yes. That's whee the carbon in the new wood comes from. Same amount as the old tree used when growing up.

Besides, you don't burn the tree to make paper. The carbon in the old one is still sequestered.

Comment Re:Combatants (Score 2, Interesting) 951

While insighful, I'm not sure "enemy" combatant applies. After all, most of the world isn't an enemy of Gaza or Israel. There is probably some classification like that (Unlawful combatant?), though I doubt whether there even are legal consequences your country is not involved in the war. It's even less clear if you reside on a country that has a mutual defense kind of agreement with of one of these countries.

Yes, joining on such a botnet is stupid. Yes, joining such a botnet in wartime would be stupid, possibly in a legal way. Yes, joining it while in one country would be even more stupid if your country were to lose and you get caught by the occupying army. Yes, joining while in the target country would be supremely stupid.

But it would be interesting to hear a lawyer weigh in on this

Comment Re:Reality check people (Score 1) 951

What if they were to penetrate the network of a hospital? Of a police station?

Oh, noes!! They could stop all of people's pace makers! And turn on all the police cars and drive crash them into walls!!!

Err, no. This isn't Terminator 3, you know. And no medical device that I know of is normally networked. You can't trip the power breakers either.

The best they could do is take down their web site, or erase admission records and such. annoying, yes. Big monetary loss, yes. At a level matching the rest of the war? Not really.

Who knows, maybe someday there will be international treaties not to hack hospitals, like the Geneva convention protects doctors. Just to shut you up.

Comment Re:USB Charging? (Score 1) 135

You probably had the module preinstalled? Or did you do a clean install?

My blackberry (8320) will not charge on my Ubuntu laptop. It won't charge on Windows before installing the drivers either. I found bpowerd for linux before this article, but I haven't got around to installing it, since the binaries are only for 7.10 and 8.04 and I usually charge from a wall socket anyway.

Comment Re:VR Lab (Score 2, Interesting) 170

Since you seem to be knowledgeable about the subject:

Do you know of any VR Goggle with a wide field of view? Everything I see has at most 40 degrees field of view, which would be like looking through a tunnel. I can get a wider field of view by standing near my monitor (Which I do).

For things to be inmersive I would want the display to include my peripheral vision, even if only with very low resolution on the sides. I don't want to feel like I'm wearing swimming goggles.

My personal use for it (together with head/eye tracking) would be to write a window manager where I can hang windows all around me, and where I can switch windows by looking at them. Compiz already renders to the screen with OpenGL from intermediate buffers, extending it to a wider canvas shouldn't be that hard. It's basically being inside the spinning cube (or ring, really). But the low resolution, tunnel vision and now your comfort argument make it an unattractive proposition.

Comment Re:Just wrong.... (Score 1) 844

It's not that the act of programming itself is a religion. It's that people's choice of programming language sometimes becomes a religion for them.

Have you never met anyone who thought you were an idiot because you don't agree that $LANGUAGE is the best thing out there? You'll have people spend all day arguing that C lets you stay close to the machine and program more efficiently (as if that mattered), that java lets you run the program on any architecture (as if recompiling was impossible), that haskell lets you pass functions around and apply them (as if there were no function pointers), that the C++ STL and destructors save so much time and bugs (As if other languages didn't have container libraries nowadays), that CPAN saves you inmense amounts of work (as if no libraries existed for other languages).

Programming is just like religion in that you cannot prove that one is better than the other and in fact your choice is often a matter of which you learned first and which you like better.

If you're willing to spend hours arguing about your views on programming then it's a religion for you. Sorry

Disclaimer: I prefer C++ but can code in anything you throw at me. I'll look at each project before I decide on a language, and often depends on who will be maintaining it. I also hold a similar view on atheism, it can be a religion or not depending on how much time you're willing to argue about it. Since you view the comparison with a religion as an insult, this might apply to you. Sorry.

It's funny.  Laugh.

If Programming Languages Were Religions 844

bshell writes "With Christmas around the corner I know we are all thinking about religion, or at least maybe wondering why this one religion dominates the rest for these few weeks. A fellow named Rodrigo Braz Monteiro (amz) posted this list comparing each programming language to a religion. Guaranteed to make you chuckle and generate a good long thread here on slashdot. Great way to pass the time as work winds down this week and we relate to our own programming faiths during this very special time of year. Merry PHPmas." Fortunately Pastafarianism is referenced.
Businesses

Spaceport America Gets FAA License 61

DynaSoar writes "Spaceport America received an early and double holiday gift this week: first, the expected (positive) FAA environmental impact report, and second, the hoped-for but not immediately expected 'launch site operator's license.' With this license, and with the previously accomplished creation of a tax district, two of three pieces are in place as required by the New Mexico legislature to receive its funding package. The third, a lease with a space services tenant to use the facility, may come this week also, in the form of a contract with Virgin Galactic. While timing is impossible to predict, the contract is a virtual certainty. The New Mexico Spaceport Authority fully expects it, and so has projected late 2010 for completion of hangar and terminal facilities. Virgin Galactic also seems confident, as they have already screened and submitted their first 100 customers (called the Virgin Galactic Founders) to their contracted medical and training supervisor. They are busy screening their second 100 'spaceflight participants' (NASA and RKA having decided that only those who can tack 'career' on the front of it deserve to be called 'astronauts')."
Government

Submission + - SPAM: US IT Industry Losing Its Edge

narramissic writes: "According to a new study sponsored by the Business Software Alliance (BSA), the U.S. still has the world's best environment for a competitive IT industry — but the gap is closing. The study ranked 66 nations in 6 weighted categories: overall business environment, IT infrastructure, human capital, legal environment, R&D environment and support for IT industry development. Rounding out the top 5 were Taiwan, the U.K., Sweden, and Denmark — all of which moved up in the rankings from 2007, with Taiwan jumping from number 6 to number 2. Somewhat surprisingly, India ranked 48th, held back by its spotty IT infrastructure and a lack of a strong R&D environment. Russia, and China ranked 49th and 50th respectively."
Link to Original Source
PC Games (Games)

Submission + - Blizzard Taking It To Gold Sellers and Buyers

Samalie writes: It appears Blizzard may finally be taking a fatal shot at IGE, providers of WoW Gold & Powerleveling.

The State of Florida has issued a subponea demanding pretty much everything IGE has on their own operations, as well as account/player names for everyone they've ever sold gold or services to.

Looks like the lamighty banstick may be coming out at Blizzard....but estimates are that upwards of 25% of their monthly paying customers have at one time bought gold. Will Blizzard really chop out 1/4 of their subscriber base?

Read the subponea here, and the full article here.

Slashdot Top Deals

The game of life is a game of boomerangs. Our thoughts, deeds and words return to us sooner or later with astounding accuracy.

Working...