March 19, 2010
There is Brilliance in this Language
Worth a watch. (mp4 wmv other)
Posted by David at March 19, 2010 07:01 AM
Perhaps a binary-coded decimal system such as IEEE-754 "decimal64" might have been a better choice. What do you think?
Hm? What happened to Python being the right first programming language?
I've also used your articles about teaching Anthony to use Python to learn a bit about it, but never got into it much.
Python is the best learning language! It is far more readable and accessible than other languages. And it's used by professionals - it is real.
But after some time on python, my son got to the point where he wanted to show off his programs to his friends. When I had to explain that his friends would have to install python to run his programs, and that they couldn't just play with them on the web like you can do with any Flash game, he was disenchanted.
Even for a kid, Distribution is King.
Shakeing windows with moveTo(), escaping buttons and other pranks!
IEEE 754-2008 decimal floating point numbers make a lot more sense for general-purpose computing than IEEE 754-1985 binary floating point. In fact, William Kahan (the discrete math expert brought in to help Intel design the x87 floating point unit) initially suggested a decimal format, but by the time he was consulted, Intel's design was already too far along for such a radical change. Kahan's x87 work formed the basis for the IEEE 754-1985 floating point standard.
Yes, there are some advantages in binary floating point if you're doing large scale fluid dynamics, particle physics, or other hard-core numerical simulations. However, binary floating point has left the world with too many subtly wrong calculations involving money. I appreciate the elegance of IEEE 754-1985, and I can encode and decode simple cases in my head, but I've also seen too many programmers (and non-programmers writing spreadsheets) make rounding mistakes that they wouldn't have made using IEEE 754-2008 decimal numbers.
I really wish Microsoft had switched to decimal floating point for the .xlsx spreadsheet file format (and gotten the 1900-is-a-leap-year monkey off their back). Old spreadsheets would have worked just as they always did, and new spreadsheets would have been less dangerous for the unwary. Those who really knew what they were doing could always have saved in the legacy format to get the binary floating point behavior.
David: py2exe and p2app allow packaging up Python applications as (somewhat large) single Windows binaries or single OS X applications, including the Python virtual machine and any Python libraries used by the app. That way, it's not necessary for the user to install Python in order to run your son's Python program. The cost is distribution size.