|
From: Bruce S. <Bru...@nc...> - 2007-11-03 14:25:11
|
What started as a private conversation grew into a significant discussion with several people about making an native-mode version of VPython for the Macintosh, one that wouldn't require installing X11 and fink. This discussion is likely to be of general interest, so with permission of the others (or at least no objections!) I'm posting the notes here. ------------------------------------- VPython on the Mac is an increasingly burning issue, and I'm delighted to hear of your interest. I'm seeing a growing use of Macs in physics departments, and great frustration with trying to install VPython on them, despite Martin Costabel's yeoman efforts with his packaging of Visual for fink. Usually the installation works quickly and easily, but only too often it fails at one of the many links in the long chain along the way: install X11, install Xcode, install fink, look for visual-24 and it's not there for some reason, try reinstalling everything....it can be a nightmare, and the people trying to do this often don't have high software skills. Moreover, every time Apple updates the operating system, even in the last significant figure, something in this chain is liable to break. And although Martin has made a stab at it, I believe it's the case that he has not yet successfully compiled and run the beta version on a Mac. Many of the users I've interacted with have no interest in the Unix side of OSX and really don't want to install X11/Xcode/fink just to get VPython. It would be WONDERFUL to have a native-mode installer with no dependence on X11. I see two plausible approaches: 1) Currently the Visual C++ code is mostly platform-independent, with a small number of Microsoft Windows-specific files to create a window, hand that window to OpenGL, and handle mouse and keyboard events. Someone with Mac expertise might be able to write comparable Mac code rather quickly. 2) Jonathan Brandmeyer originally tried in the beta version of Visual to cover both Linux and Microsoft Windows with very little MS Windows-specific code. He gave up on that because at the time it was extremely difficult to install the gtk2 and gtkmm files on Windows (gtkmm is a "wrapper" that lets C++ code get at the C-based gtk2 GUI machinery). So he wrote additional Windows-specific code. There has been a change, in that I recently was able very easily to install gtk2 and gtkmm on my Windows machine and compile and run small sample gtkmm tutorials that make windows and buttons etc. I'm currently learning more about this environment in the hopes of reducing the amount of Windows-specific code in Visual and in the hopes that this might as a side effect cure some of the severe bugs in the beta version for Windows. I won't be able to devote the concentrated attention this work requires until next summer, but I'll keep poking at it in the interim. There are now new gtk2/gtkmm packages for the Mac, which talk to Aqua instead of to X11. Unfortunately, they are currently labeled BEWARE! HERE BE DRAGONS! But one could try. It would be excellent if most of Visual were platform-dependent, with only a few odd-ball files specific to Windows and Mac. (For example, even in Brandmeyer's original beta version, there were a few Windows-specific files for getting the time, etc.) Bruce Sherwood David Derbes wrote: > Hi, Christopher. > > This is David Derbes, a high school physics teacher. > > About a billion years ago I used to write biggish (3.5 to 5K lines) programs in Think Pascal as part of my job. As you probably know Think went away and I never got involved with XCode although from time to time I think about it. I've got other fish to fry these days. > > However, I am quite interested in using Visual Python as a teaching tool. Unfortunately there is at present no native Cocoa version. > > Do you know if anyone is working on this? I think Bruce Sherwood (bas...@un...) may be, and also Dethe Elza (de...@bl...); I've corresponded briefly with Dethe (and am cc'ing him and Bruce); it may be that Leopard offers a better framework for porting the visual parts of VPython. > > Best wishes, > David Derbes > |