Skip to content
Prev 536 / 1236 Next

[R-gui] [Rd] R GUI considerations (was: R, Wine, and multi-threadedness)

And I so wanted to stay out of this particular discussion, I hope  
you're proud of what you've done. *cracks knuckles* Right, lets get  
to it then.
On Oct 19, 2005, at 3:43 PM, Jeffrey J. Hallman wrote:

            
There is in fact such a toolkit. I'll give you a hint, its name ends  
in "step" and its heavily used under a different name by a company  
named after a fruit. It works quite well from R, doesn't require  
another language and frankly the binding between it and R was  
actually pretty pleasant as these things go. By my count it took 2727  
lines of C and 411 lines of R to bind, a good half of which are  
technically unnecessary. Right now it probably doesn't run under  
Windows and Linux/BSD/Solaris/Your Favorite POSIX Compliant UNIX at  
the present time, but thats mostly because I don't care rather than  
because it can't.
This is only a problem because people seem to insist on using R's  
object system in a way that is not actually very compatible with R's.  
To misquote Robert at DSC, "their primary complaint about R is that  
its not Java." If you think about it for a moment, R's environment is  
actually quite well suited to GUI tasks because, well, because it has  
environments. Imagine drawing into a window (you're a plotting tool  
or something). Really, you're a function executing in an environment  
(oh ho!) that has access to certain system resources, in this case a  
canvas of a certain physical and logical dimension. Responding to  
events could take on a similar structure---you're really executing in  
an Event environment that has certain bound symbols. Obviously you  
get to keep your lexical environment so event handlers that need to  
share state can in the usual way. Its not particularly difficult and  
doesn't even need to involve objects in any real way, except as  
little stubby things with attributes you can modify or poll.
How is this different than releasing any piece of software?
Did you just use the words "cross platform" and "VisualWorks  
Smallktalk" in the same email? Have you ever used VisualWorks on  
something other than Win32? I'd rather use Squeak. At least then I  
know it'll have an equally childish interface on every platform.
Contrary to popular belief the speed of R's interpreter is rarely the  
limiting factor to R's speed. People treating R like C is typically  
the limiting factor. You have vector operations, USE THEM.
But not portable across Smalltalks. Whoops. Oh, and there's still a  
helluva lot of Fortran code out there that nobody wants to port.
Because I spend all my time writing web shopping carts in R?
As it happens, I've thought about it. At length. To the point of  
having images that actual test out the idea of implementing these  
libraries whilst my simulations run in the background (we can discuss  
the effects on my degree progress at a later date). Smalltalk has  
some very clever features. I'm a particular fan of the notion that  
"breakpoint" and "exception" aren't different things for example.  
Unfortunately its also turns out that these "basic math packages"  
are, in fact, quite difficult to do well especially when multiple  
platforms are involved. For example, it took GSL 5 years to get to a  
'1.0' release and its still using CBLAS, an even older piece of code,  
to do most of its vector and matrix operations.

Assuming you manage to pull that off (see you in 2010!) I'm still not  
convinced it would work as most Smalltalks (Squeak especially) take  
on a self-contained nature, meaning that they Don't Play Well With  
Others. The only time *I* really use a GUI is when I'm preparing a  
presentation or a paper in which case I need to be table to talk to  
all manner of different pieces of software, something which is  
generally ignored Smalltalk. At least with the current R GUIs I can,  
you know, cut and paste. Sure, you can get Smalltalks to do this sort  
of thing too, VisualWorks can do a fair amount though how well varies  
widely with platform (hey! Just like R). Even better, the  
programmatic interfaces vary from platform to platform and Smalltalk  
to Smalltalk. I could continue, but I'm getting hungry---suffice it  
to say that Smalltalk isn't some sort of panacea despite being a very  
nice language, too much James Robertson for you.

So, you've got a lot of work (implementing a robust scientific  
library) ahead of you for dubious gains (a rich GUI, maybe a better  
programming language and a whole raft of new problems). It seems like  
the better idea would be to pull a Java and shameless hijack the  
interesting bits from Smalltalk rather than go the other direction.

Oh, and since you suggested googling yourself,

I gotta go with Alan Z on this one, a<-1 is ambiguous is the worst  
possible way, := would probably be a better choice. Looks less like  
the APL symbol, but who cares?
---
Byron Ellis (ellis at stat.harvard.edu)
"Oook" -- The Librarian