Friday, August 24, 2018

F# and Javascript interoperability

Interop is a hugely important part of a programming language's value proposition. For example, F# would be far less interesting for web programming if it didn't integrate so nicely with amazing Javascript libraries like Pixi and React.

Because it does integrate nicely, you can use amazing algorithms for AI/etc. in F#, and you can attach it to amazing UI (thanks to Javascript interop + WebGL via Pixi) as well as to amazing UI on a desktop machine (thanks to WPF/UWP/Windows). And you're using the SAME F# code for both use cases, which is great if you want to e.g. do the same sanity checking/validation of user inputs on both client-side (for usability) and server-side (for system integrity), without duplicating code.

F# is amazing, but good interop with Javascript makes it twice as amazing.

~B.C.

--
If I esteem mankind to be in error, shall I bear them down? No. I will lift them up, and in their own way too, if I cannot persuade them my way is better; and I will not seek to compel any man to believe as I do, only by the force of reasoning, for truth will cut its own way.

"Thou shalt love thy wife with all thy heart, and shalt cleave unto her and none else."

Tuesday, August 14, 2018

Machiavelli, on the three types of intellects

[T]here are three classes of intellects: one which comprehends by itself; another which appreciates what others comprehend; and a third which neither comprehends by itself nor by the showing of others; the first is the most excellent, the second is also excellent, but the third is useless. -Niccolo Machiavelli

I mostly have the second class of intelligence--I'm good at following ideas that other people have already come up with. In a few areas I have the first class and am able to generate good ideas before other people do. I hope I do not fall into the third class very often or in very many areas.

-Max

--
If I esteem mankind to be in error, shall I bear them down? No. I will lift them up, and in their own way too, if I cannot persuade them my way is better; and I will not seek to compel any man to believe as I do, only by the force of reasoning, for truth will cut its own way.

"Thou shalt love thy wife with all thy heart, and shalt cleave unto her and none else."

True genius

I'll end the argument right now. Here's a quote from Eugene Wigner, a Nobel-prize winning physicist who was friends with both Einstein and Von Neumann:

"I have known a great many intelligent people in my life. I knew Planck, von Laue and Heisenberg. Paul Dirac was my brother in law; Leo Szilard and Edward Teller have been among my closest friends; and Albert Einstein was a good friend, too. But none of them had a mind as quick and acute as Jansci [John] von Neumann. I have often remarked this in the presence of those men and no one ever disputed.

But Einstein's understanding was deeper even than von Neumann's. His mind was both more penetrating and more original than von Neumann's. And that is a very remarkable statement. Einstein took an extraordinary pleasure in invention. Two of his greatest inventions are the Special and General Theories of Relativity; and for all of Jansci's brilliance, he never produced anything as original."

——————————————————————————————————————————————

In terms of precocious, "gee whiz he can calculate Pi to the 23,000th decimal place in his head!" Johnny was unmatched. Nobody - [with] the exception of Ramanujan, whose talents in mathematics were unparalleled - could match Johnny's eidetic gifts. But that raises an interesting question about what we mean by "intelligence."

If we ranked geniuses by IQ tests then I doubt any man of the last 120 years, perhaps with the exception of Poincare, would beat John Von Neumann (or perhaps some janitor working nights at MIT would win, these things are hard to predict and, more importantly, meaningless). But is intelligence simply the summation of an IQ test? Truly "smart" people know the answer is no. You can be more brilliant and creative than somebody with a higher IQ than you. Such metrics are too simplistic to capture the totality of what we mean when we say "intelligence." Creativity is intelligence. Abstract, conceptual thinking is intelligence. Mathematical deduction is intelligence, but so is literary deduction.

I've noticed the same thing. IQ matters. It matters tremendously, and those with higher IQs will have easier and more successful lives than they would with lower IQs. But something extra is required for true genius, and some people have it and some people don't. I sometimes think of IQ as being how well-greased your brain is--how quickly you can learn and how fast you can answer questions--but for true genius you apparently need to be good at thinking of the right questions to ask your brain.

-Max

--
If I esteem mankind to be in error, shall I bear them down? No. I will lift them up, and in their own way too, if I cannot persuade them my way is better; and I will not seek to compel any man to believe as I do, only by the force of reasoning, for truth will cut its own way.

"Thou shalt love thy wife with all thy heart, and shalt cleave unto her and none else."