Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×

Comment Re:"Callable closure" - closure != anonymous funct (Score 1) 175

Technically, the anonymous function is just the literal in code, and it's only "anonymous" because the programmer didn't give it a name—the compiler will sometimes assign it a generated name, but it will sometimes do something else (eg. reuse code from elsewhere in the program, roll the function into the caller, etc.). It becomes a closure when that function is combined with a scope.

So higher level function would return a closure value, which would be the function bound to the values in scope. Those aren't the same thing as anonymous functions. For example, they could all be reusing the same anonymous function—that function might be compiled into one location in the assembly or bytecode (if it's .NET bytecode, for example, it might have a generated name like "b__0"), and then called from within scope.

A composed function would generate another literal function valuelike if you have two functions F and G and compose them into lambda(i) => F(i) + G(i), then that lambda would return an anonymous function. But if you assign it to a variable and call it, then it's bound to a scope and becomes a closure.

Make sense?

Comment "Callable closure" - closure != anonymous function (Score 1) 175

Minor apologies for being a bit pedantic, but just in case anyone's confused by the possible misuse of the term "closure" in the summary...

From the Wikipedia entry on closures:

The term closure is often mistakenly used to mean anonymous function. This is probably because many programmers learn about both concepts at the same time, in the form of small helper functions that are anonymous closures. An anonymous function is a function literal without a name, while a closure is an instance of a function, a value, whose non-local variables have been bound either to values or to storage locations (depending on the language; see the lexical environment section below).

Submission + - New Horizons spacecraft reveals new faces of Pluto

__roo writes: The surface of Pluto is becoming better resolved as NASA’s New Horizons spacecraft speeds closer to its July flight through the Pluto system. A series of new images obtained by the spacecraft’s telescopic Long Range Reconnaissance Imager (LORRI) during May 29-June 2 show Pluto is a complex world with very bright and very dark terrain (sharpened from the raw, unprocessed pictures), yielding the best views ever obtained of the Pluto system. You can follow the path of the spacecraft in real time with a visualization of the actual trajectory data, using NASA’s Eyes on Pluto.

Comment History of origami (Score 4, Informative) 27

Origami is the Japanese art of paper folding created by Akira Yoshizawa, which can be used to create beautiful birds, frogs and other small sculptures.

According to that page, Akira Yoshizawa was born in 1911. Origami dates back to at least 1797, when the first known origami book was published (see the history of Origami).

Comment Brings back early memories running at 300 baud (Score 1) 51

My dad ran the epidemiology department for the American Cancer Society when I was a pre-teen and teenager in the '80s. I grew up dialing into their VAX 11/780 with a 300 baud acoustic coupler modem. At first I used a DECwriter terminal, which didn't have a screen—all the output was noisily printed to 132-column tractor feed. Eventually my folks brought home a VT180, around the same time that we upgraded to a 1200 baud modem. I'll never forget playing Crystal Caverns, and creating ASCII "animations" as a kid that scrolled up the screen.

Also, it means that as a 9-year-old kid, FORTRAN 77 was my first programming language. I think in some cultures that qualifies as child abuse.

Submission + - Scientist fools millions into thinking chocolate helps weight loss (io9.com)

__roo writes: Did you know chocolate helps you lose weight? You can read all about this great news for chocoholics in the Daily Star, Daily Express, Irish Examiner, and TV shows in Texas and Australia, and even the front page of Bild, Europe's largest daily newspaper. The problem is that it's not true. A researcher who previously worked with Science to do a sting operation on fee-charging open access journals ran a real—but obviously flawed—study rigged to generate false positives, paid €600 to get it published in a fee-charging open access journal, set up a website for a fake institute, and issued press releases to feed the ever-hungry pool of nutrition journalists. The doctor who ran the trial had the idea to use chocolate, because it's a favorite of the "whole food" fanatics. "Bitter chocolate tastes bad, therefore it must be good for you. It’s like a religion."

Comment Excellent news (Score 5, Informative) 89

This is great news. For those who haven't been following it, white nose syndrome is an emergent disease affecting bats. It's caused by a fungus that grows on the skin of the animals, and has been killing millions of bats across many parts of the eastern United States (map). A decontamination protocol has been established for researchers and cavers who come into contact with the animals. This is the first really optimistic piece of news about the disease that I've seen.

Submission + - NASA's CubeSat initiative helps testing of Solar Sails

__roo writes: With help from NASA, a small research satellite to test technology for in-space solar propulsion launched into space Wednesday aboard an Atlas V rocket from Cape Canaveral Air Force Station, Florida, as part of the agency’s CubeSat Launch Initiative. The Planetary Society’s LightSail satellite is a technology demonstration for using solar propulsion on nanosatellites. LightSail consists of three CubeSats (approximately four inch cubes) bundled together.

Comment Private sector's no better, probably worse (Score 4, Insightful) 150

People will trade their passwords for a candy bar.

Plus, public sector workers at least have some job security. I've worked in the private sector for 20+ years, there's a reason it's called "at-will" employment. Sticking your neck out to report a breach won't win you any friends, doesn't gain you anything, and if it get someone who's politically savvy in trouble it could blow back on you. Safer and easier to keep quiet and keep your job.

I wish it weren't like that—and to be fair, the best teams I've worked with weren't (and aren't!) like that. But way too many offices run that way, and politics and sleaziness beats honesty and ethics nine times out of ten.

Submission + - Satellites make a load of difference to bridge safety (esa.int)

__roo writes: In an effort to detect crumbling infrastructure before it causes damage and costs lives, the European Space Agency is working with the UK’s University of Nottingham to monitor the movements of large structures as they happen using satellite navigation sensors. The team uses highly sensitive satnav receivers that transmit real-time data to detect movements as small as 1 cm combined with historical Earth observation satellite data. By placing sensors at key locations on the Forth Road Bridge in Scotland, they detected stressed structural members and unexpected deformations.

Comment No wonder it's not working for you! (Score 1) 507

I'm seeing posts from people saying things like, "Agile isn't working for my team, I just spent my whole daily standup reading this thread" or, "I get a lot of work done during my retrospectives". Of course agile sucks for these people! Agile will get limited—but still useful—results when the team has this attitude.

But if they have a different mindset where they actually try during the daily standup or retrospective, it works so much better.

Look, every really good developer I've worked with has had good opinions and ideas about how the project should be run. When they spend the entire standup or retrospective looking at on their phones, the team doesn't get the benefit of those opinions and ideas. But when they use the meeting to actually share those ideas, and maybe even engage in a good discussion (or even argue for them!) with the rest of the team, the whole project benefits. But that only works if they care about doing a good job with the standup or the retrospective the way they care about doing a good job with their code.

I'm plugging my book, Learning Agile, now. I hope you don't mod me down too much for that. But I think we did a pretty good job arguing this point in the first few pages the first chapter. You can read the first chapter for free [PDF].

Comment What goes around -- it will be you one day (Score 1) 429

A friend of mine was managing a programming team. They interviewed a really good developer in his early 40s, and one of her team members said he was too old. He thought the guy couldn't possibly be up to date on recent technology. She hired him anyway, and he did really good work.

That was well over ten years ago. The guy who raised the objection is now older than the candidate he wanted to reject. I wonder if he's gone on any interviews lately (or found newfangled technology impossible to keep up with).

Comment Useful for barometric migraines (Score 1) 79

I know several people who get barometric migraines, or migraine headaches that are triggered when the pressure changes suddenly (usually when it drops). Some of them have told me that migraine medications like rizatriptan and sumatriptan can be effective, but often come with unpleasant side-effects like a racing pulse or grogginess.

This leads to a dilemma: do you take the medication and deal with the side effects, or do you try to ride out the headache? It's especially frustrating for people who get headaches that aren't always migraines, because the migraine medication doesn't necessarily work on a normal, non-migraine headache.

This is where a personal barometric pressure monitor that's been with you for the last few hours can be very helpful. If you are trying to decide whether or not to take migraine medication, you can consult your phone and see if you personally experienced a large pressure drop prior to the onset of the migraine. If so, that helps with the decision of whether or not to take the medicine.

Slashdot Top Deals

Software production is assumed to be a line function, but it is run like a staff function. -- Paul Licker

Working...