I remember learning in economics that some folks got a Nobel Prize about 50 years ago for a proof that free markets lead to optimal policies. I wonder if anyone has investigated the assumptions in the proof in the sense that I wonder if it's really just a local optimizer (finding the nearest peak) rather than finding the best global solution (the real top of the mountain).
All proofs about the real world, of necessity, rely on assumptions and approximations. Just wondering what they are here.
I also wonder, because it seems to me like capitalism works well but is short-sighted. I'd be curious if this intuitive feel could be worked out mathematically.
Note: I'm not an economics expert, so I don't know what's been researched on this subject before.
Friday, November 21, 2008
Wednesday, November 19, 2008
Wow, C++ for Flash
Looks like Adobe beats Sun to C++ support, at least in preview release form. They've got Vorbis ported already. ODE, anyone?
Seems like I was thinking about this subject just recently.
Seems like I was thinking about this subject just recently.
Monday, November 17, 2008
How to Supercharge Java
I think certain changes in strategic direction by Java could help it compete far better with .NET, Flash, and browsers. Here are my recommendations:
I know enough to understand that many folks inside and outside of Sun would scream a lot if some of these directions were taken. I also don't know what's best for Sun as a company, but gradually losing mind share for Java probably doesn't help them any. Not that I know the stats.
Just some thoughts here, and I could be wrong.
- Drop JavaFX and Swing (though I like Swing a lot in certain ways). Move to SWT.
- Drop NetBeans (despite the nice progress they've made). Centralize on Eclipse.
- Provide a C/C++ to JVM compiler and perhaps so2jar and dll2jar tools.
- Provide jar2swf and swf2jar tools, and contribute to an existing or new open-source Flash player (now that the spec is open, right?).
- Also support GWT big time.
I know enough to understand that many folks inside and outside of Sun would scream a lot if some of these directions were taken. I also don't know what's best for Sun as a company, but gradually losing mind share for Java probably doesn't help them any. Not that I know the stats.
Just some thoughts here, and I could be wrong.
Friday, November 14, 2008
Wiki Math and Language Consequences
I was thinking how cool it would be to have a Wikipedia but with actual usable algorithms instead of human-oriented text. As I thought about it, it dawned on me that MATLAB's one-function-per-file and 'this'-passed-as-first-param notions (generalized in other languages to full multimethods) are just the kinds of things you'd want in such a system.
Also, the idea of generic mathematical concepts (via interface implementation, duck typing, or static C++ templates) leads to wanting fewer versions of the same function, so namespacing issues might matter a bit less.
Still, I think namespacing matters some. Maybe the ability to apply multiple tags to functions would be nice instead of the draconian namespacing of common programming languages. But could you never have two versions of the same function with the same tag? Maybe just multiple matches based on specified desired tags would result in an error. Hmm.
And I was also thinking about how you could imply templates just by not specifying the types of the parameters (again, the static variation on duck typing).
In the end allow translation to C/C++/Java/C#/whatever based on conventions that work well for that language.
I think the math language itself in the wiki would need to look somewhat like MATLAB (and/or Python). And of course, rendering to nice typeset equations online (image or MathML or LaTeX) would be sweet.
If only I had a ton of additional time on my hands.
Also, the idea of generic mathematical concepts (via interface implementation, duck typing, or static C++ templates) leads to wanting fewer versions of the same function, so namespacing issues might matter a bit less.
Still, I think namespacing matters some. Maybe the ability to apply multiple tags to functions would be nice instead of the draconian namespacing of common programming languages. But could you never have two versions of the same function with the same tag? Maybe just multiple matches based on specified desired tags would result in an error. Hmm.
And I was also thinking about how you could imply templates just by not specifying the types of the parameters (again, the static variation on duck typing).
In the end allow translation to C/C++/Java/C#/whatever based on conventions that work well for that language.
I think the math language itself in the wiki would need to look somewhat like MATLAB (and/or Python). And of course, rendering to nice typeset equations online (image or MathML or LaTeX) would be sweet.
If only I had a ton of additional time on my hands.
C++ Templates as Duck Typing
Just remembered the relationship between duck typing and C++ compile-time templates. Writing it here as a note for future reference.
Thursday, November 13, 2008
Enough with Java Ports
Or rather, enough with requiring Java ports. Though I guess the encouragement of genetic diversity has its pros.
I also applaud Jython, JRuby, JBullet, and many more. I was once working on an ImageMagick and RMagick port for Java/JRuby. I didn't expend the time to make enough progress, though I believe it could work out well.
My concern is that the "Java apartheid" coupled with lack of direct support for running C/C++/DLLs directly on the JVM leads to too much wasted effort. And I get the point of how much easier it is to pick up and use a jar (wherever you are) vs. picking up and using native libraries.
There are some (HUGE!) gotchas, but I think it should be possible to run native code directly in Java. Two techniques:
I'm don't plan to work on this myself, but I think it's a right thing to be done. And meanwhile, I'm tempted to get back into coding C++. (Been a while.)
Actually, I double-dog-dare anyone to make a C++ to JavaScript compiler.
I also applaud Jython, JRuby, JBullet, and many more. I was once working on an ImageMagick and RMagick port for Java/JRuby. I didn't expend the time to make enough progress, though I believe it could work out well.
My concern is that the "Java apartheid" coupled with lack of direct support for running C/C++/DLLs directly on the JVM leads to too much wasted effort. And I get the point of how much easier it is to pick up and use a jar (wherever you are) vs. picking up and using native libraries.
There are some (HUGE!) gotchas, but I think it should be possible to run native code directly in Java. Two techniques:
- Use JPC as a base for running x86 DLLs (or Linux so files or whatever) as if they were JVM bytecode, or
- Compile C and C++ (and others in GCC) directly to JVM bytecode so that structs, classes, namespaces, and so on all map nicely and are directly available from other JVM languages (like Java even).
I'm don't plan to work on this myself, but I think it's a right thing to be done. And meanwhile, I'm tempted to get back into coding C++. (Been a while.)
Actually, I double-dog-dare anyone to make a C++ to JavaScript compiler.
Wednesday, November 12, 2008
Evil MATLAB Copy-On-Assign
Saying this kind of thing is really annoying:
Maybe I just need to learn the right idioms, but this kind of thing taken to much more complicated software is just killing me right now.
item = items{i};
item.whatever = 'something';
items{i} = item; % <-- The evil requirement.Maybe I just need to learn the right idioms, but this kind of thing taken to much more complicated software is just killing me right now.
Subscribe to:
Posts (Atom)