[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multimedia in DrScheme



<a bunch of other interesting comments snipped>

> 2) even if it did, I expect it to be proprietary at the implementation
> level (likely producing another Java situation where people reimplement
> it with different code on different platforms, leading to a host of
> compatability issues).

Even worse, they could sue anyone who tries to implement it under some
bastardization of the DMCA.

> To bring this back around to DrScheme before getting too Off-Topic, the
> issue is being able to leverage off of work by other open source
> developers. For example, Squeak developers are doing lots of work to get
> sockets to work across all platforms -- yet witness the recent issue
> with DrScheme sockets under Linux.

It's fixed, btw. Apparently the semantics of zero-byte transfers on
nonblocking sockets changed with the new TCP/IP stack. If anyone wants
the patch I'd be happy to send it.

That was just a bug, albeit a strange one. MzScheme's sockets do work on
Windows, Unix, and MacOS.

> And obviously Perl, Python, and TCl
> programmers all are writing socket code for numerous platforms.

Tcl socket programming is presently a bit simplistic, without the aid of
dynamically linked extensions. Which is a shame; Tcl is cool :)

> If all
> that effort could be pooled, what wonders we might see. Think on the
> story of the "Tower of Babel" where people were made to speak different
> languages so the tower could never touch the heavens. I'm not suggesting
> everyone program in Scheme -- just that to the extent possible, open
> languages could share many facilities -- especially ones related to
> cross platform bitmaps, sound, networking, file access, FFI, plugin
> architecture, native widgets, installation, documentation viewers, maybe
> some memory management, OS interface calls for processes, and so forth.
> Note this is also different from saying everyone should just use Linux.
> Obviously there may be some performance issues if one has to add another
> layer isolating language and runtime libraries, and various language
> implementations have their own expectations about threading, garbage
> collection, memory allocation, and so forth.

I agree that portable interfaces are a Good Thing, but a lot of this is
language specific (Squeak and Scheme deal with GC differently, for
instance).
Nonetheless:
-SDL provides high-performance multimedia IO on most platforms (Windows,
Linux, *BSD, BeOS, MacOS, IRIX).
-The Boehm GC exists for most platforms. I believe this is what MzScheme
uses.
-wxWindows provides portable windowing support. Some people seem to
dislike wx, but GTK+ and Tk are also available. All are fairly stable at
this point.
-File IO is more or less portable across platforms with the standard C
library. There are annoying differences in filename formats, though.
(Why did Mr. Gates have to use the \ instead of the /? Argh!! :)
-Sockets are a pain. They're never too difficult on any given platform,
but they're not portable (it's easier to port a Unix socket app to a
Palm Pilot than to MacOS). It would be nice to have a portable network
programming toolkit.

> I wonder what wxWindows would look like if it had been designed to serve
> as a "Common Language Runtime" for Scheme, Python, etc. instead of a
> windowing library orginally for C/C++.  SDL (Simple DirectMedia Layer)
> is a similar effort, and bindings exist for several languages (not yet
> Scheme that I saw):
>   http://www.devolution.com/~slouken/projects/SDL/
> If one was going to add multimedia (and emulated widgets) to MzScheme
> and not use wxWindows as MrEd does, SDL would be an interesting choice.

I'm currently working on SDL bindings for Scheme. No estimated time of
arrival, but hopefully I'll have time to finish soon.

-John