Forgot your password?
typodupeerror

Comment: Re:Functional languages and recursion (Score 1) 267

by chico_the_chihuahua (#31052620) Attached to: An Interview With F# Creator Don Syme

Probably because it's easier to express, recognise and optimise tail-recursion under the functional paradigm than the imperative space, especially true for the close-to-metal languages like C/C++.

Funnily enough though, I may be wrong about this, but I don't believe that the IL has very good at tail recursive performance, so proper tail recursion is only used after some stack usage heuristic has been breached....
 

Comment: Re:Looks interesting as replacement for Python (Score 2, Interesting) 267

by chico_the_chihuahua (#31051874) Attached to: An Interview With F# Creator Don Syme

Your example includes some distractions like bigint literals (0I and 1I), and uses pattern matching, which doesn't exist in Python.

You have to learn the language to be effective, the wikipedia article was showing the F#-onic way of writing it - it's perfectly possible to rewrite this in a more imperative form as:

let rec factorial n = if n=0I then 1I else n*factorial (n-1I)

but pattern matching is a key part of the language. The compiler can detect whether all possible pattern states have been caught, which it can't do with if/then/else statements.

Comment: Re:Looks interesting as replacement for Python (Score 1) 267

by chico_the_chihuahua (#31051760) Attached to: An Interview With F# Creator Don Syme

As the other posters commented, it's not dynamically typed (but it is very generic), and the #light syntax is indentation sensitive (fortunately, tabs are banned, which was the initial bane of my Haskell writing days).

But, I do suspect that IronPython is not a featured language of VS2010 for precisely the reason you say. M$ probably want F# to gain some traction before officially adding IronPython to VS (if they ever do, that is). Python does have some great ideas inspired by functional languages, but it's in no way a functional programming language. Python doesn't impose any type constraints, but I think that F# takes the approach that a lot of functionality can be expressed with generics, and others must be strongly typed - but the language tries it's best to infer those types for you, so you can usually rely on this, unless things get ambiguous.

I really like the pipe operator for making a flow of data more explicit:
List.fold reduceFunc (List.map someFunc fooList)
vs
fooList |> List.map someFunc |> List.fold reduceFunc

Also, there's some interesting implications about what type information is visible in the first example and second (hint: someFunc and reduceFunc know nothing about the data types in the first example).

Comment: Re:Surprising? (Score 3, Interesting) 214

by chico_the_chihuahua (#30714166) Attached to: Prions Evolve Despite Having No DNA

I agree - it is important to get away from the concept of evolution as being life-based, and recognise that evolution is an emergent property of a system.

For the prion example, the key is to remember that incorrectly folded proteins accumulate and cause the prion disease - the proteins themselves are not the disease, but the accumulation is. If one folding configuration is more likely to cause other proteins to fold incorrectly, then it is natural to assume that this configuration will become eventually dominant, until a more effective configuration arises. Also, the accumulation of protein causes a feedback loop, increasing the likelihood of further malign folding. Presumably, the folding is sometimes imperfect, so this is the source of the all important mutations causing variety. Without the accumulation, I would presume that the configuration of folding has a benign effect.

So, folding configurations that increase the rate of malign folds or increase the rate of accumulation would be more successful in this feedback loop. Does this really justify the tag 'evolutionary'? It just seems that the natural progression of the disease causes what appears to be a natural selection process, but it's not clear at what point we should distinguish between a feedback loop and an evolutionary process, if indeed they are actually one and the same thing...

Comment: Re:Surprising? (Score 1) 214

by chico_the_chihuahua (#30713758) Attached to: Prions Evolve Despite Having No DNA

Evolution is an emergent property of a system - I'd be careful to distinguish how you would build a model to describe the system that can evolve (as you have here), and what actually happens in empirical settings.

It could be argued that Darwin only 'discovered' evolution in the Galapagos Islands, as the classical theory of natural selection is particularly pronounced in the flora and fauna there, and why other pioneers such as Mendel didn't make the same intellectual leap (especially since he was actually examining the very mechanisms of genetic evolution).

Comment: Re:The Second, If Not Both (Score 1) 466

by chico_the_chihuahua (#30671432) Attached to: Which Math For Programmers?

Not often or even never, but you still have to understand the maths, even if you're not the one originating it.

I work as a desk-aligned quant developer, and although I'm not a mathematician, I still have the gist of what the models are capable of pricing and why. Even back-office aligned IT staff who look after the databases and infrastructure should at least be aware of what concepts like delta, vega, rho, etc., are - just to know what data to check might have be wrong/changed when a support request floats your way. You'd be surprised how often someone inputs a percentage field a factor of 100 out...

Idle

Hand Written Clock 86

Posted by samzenpus
from the up-to-the-minute dept.
a3buster writes "This clock does not actually have a man inside, but a flatscreen that plays a 24-hour loop of this video by the artist watching his own clock somewhere and painstakingly erasing and re-writing each minute. This video was taken at Design Miami during Art Basel Miami Beach 2009."

Comment: Re:As Is True Of Game Theory (Score 1) 4

by chico_the_chihuahua (#30424890) Attached to: Bacterial dilemma and game theory
ah yes - I agree, the Greeks were used to dealing with a world where much is not understood, so it's necessary to develop a structure of thinking where mystery and a lack of knowledge have a place. As you say, the modern mindset is that everything must be explainable, so it often is.

To recall another Greek idea that's very applicable today - 'hubris'. Is science about 'knowing' or 'seeming'? I think that people have forgotten that science is a description of the world that may well get asymptotically close to being the 'truth', but it is ultimately not the thing itself - just a description.

Comment: Re:As Is True Of Game Theory (Score 1) 4

by chico_the_chihuahua (#30422768) Attached to: Bacterial dilemma and game theory
oooh - got to be so careful with using Game Theory for modelling real world phenomena...

Try reading Elinor Ostrom's work on Common Pool Resources (i.e., fisheries, forests, etc.) - she won the Nobel prize in Economics for it. She has a nice turn of phrase - 'using models as metaphor'. The constraints imposed to describe scenarios in game theory can be totally irrelevant in empirical settings, such as assumptions about perfect knowledge, zero cost of policing/enforcing game rules, etc. But, policy makers often use game theory models as a basis of deciding what policies to choose - sometimes with disastrous consequences.

Also, for humans, theoretical modellers often take little consideration about norms of behaviour that contribute to decision making, but have no measurable 'value' (such as shame or guilt in taking rationally advantageous positions to the detriment of other members of society), i.e., think of the Prisoners' Dilemma, but add a little social norm I like to call the 'shower payoff' for the defect strategy... :D

I think evolutionary biology is particularly guilty of trying to use game theory to explain everything. I don't have a problem with evolution theory itself, but I do have a problem with trying to draw new conclusions about human behaviour on the basis of your game theory modelling assumptions. I think that's one of the reasons why there is a lot of cynicism about human behaviour.

Comment: As Is True Of Game Theory (Score 1) 4

by mindbrane (#30422342) Attached to: Bacterial dilemma and game theory
I`ve bumped up against Game Theory a few times but lately I`ve begun to wonder if Game Theory or, more to the point, adoption of Game Theory as an overriding theory governing everything from financial investments to social relationships is beginning to reflect something akin to the bacterium`s dilemma of facing a dichotomy of two possible survival strategies, or, in our case going with Game Theory as an overriding theory or going against it because it`s the choice of all others. Game Theory has become a sink hole and aspects of all disciplines seem to sliding into it. I`ve decided to take it out for another spin and try to see whats what and what ain`t. I`m torn between blaming Game Theory and the Auction Model as the culprits for the recent economic melt down but I`m not sure it wasn`t the strategies inherent in MS excels fantasy sports teams spreadsheets.
Science

+ - Bacterial dilemma and game theory-> 4

Submitted by dumuzi
dumuzi (1497471) writes "Scientists studying how bacteria under stress collectively weigh and initiate different survival strategies say they have gained new insights into how humans make strategic decisions that affect their health, wealth and the fate of others in society. The authors of the new study are theoretical physicists and chemists at the University of California, San Diego's Center for Theoretical Biological Physics.
In nature, bacteria live in large colonies whose numbers may reach up to 100 times the number of people on earth. Many bacteria respond to extreme stress — such as starvation, poisoning and irradiation — by creating spores". Alternately the bacteria may "choose" to enter a state called competence where they are able to absorb the nutrients from their newly deceased comrades.
"Each bacterium in the colony communicates via chemical messages and performs a sophisticated decision making process using a specialized network of genes and proteins. Modeling this complex interplay of genes and proteins by the bacteria enabled the scientists to assess the pros and cons of different choices in game theory."
"It pays for the individual cell to take the risk and escape into competence only if it notices that the majority of the cells decide to sporulate," explained Onuchic. "But if this is the case, it should not take this chance because most of the other cells might reach the same conclusion and escape from sporulation."

Link to Original Source

Comment: And what about muscle gain? (Score 1) 978

by chico_the_chihuahua (#30030536) Attached to: Why Doesn't Exercise Lead To Weight Loss?
It looks like the study focussed on weight loss as a measure of exercise benefit - but we may gain weight from other exercise-induced adaptions, such as increased muscle mass. From the abstract:

Despite attaining lower than predicted weight reduction, these individuals experienced significant increases in aerobic capacity (6.3 ±6.0ml.kg-1.min-1; P<0.01), decreased systolic (-6.00 ±11.5mmHg; P<0.05) and diastolic blood pressure (-3.9 ±5.8mmHg; P<0.01), waist circumference (-3.7 ±2.7cm; P<0.01) and resting heart rate (-4.8±8.9bpm, p<0.001).

The reduced waist line should be an indicator of fat loss, I think people are confusing weight loss with fat loss. The take-home story should be to not rely on weight loss as an indicator of benefit from exercise - not that exercise doesn't reduce fat mass.

Real Programmers don't write in PL/I. PL/I is for programmers who can't decide whether to write in COBOL or FORTRAN.

Working...