Remotes - the new, exciting alternative to Externals.

Glen Bojsza gbojsza at gmail.com
Sat Jul 9 18:10:09 EDT 2005


This is what I think would make a great Rev Scripting Conference series.



On 7/9/05, Jon <jbondy at sover.net> wrote:
> Well done, Alex!
> 
> :)
> 
> Jon
> 
> 
> Alex Tweedly wrote:
> 
> >
> > I've been playing with writing externals for Revolution lately. It's
> > been interesting. I'm very glad to know I can do it, and should I ever
> > need to, I will. But I can't say it's been a lot of fun. Writing C
> > code is frustrating and not very productive in the best of
> > circumstances (e.g. supported by a symbolic debugger, protected
> > processes, etc.) In the circumstance of running an external with Rev's
> > IDE (where many errors cause immediate termination of the IDE, with no
> > diagnostic info provided at all, far less any chance to debug), it is
> > very unproductive. So while it's good to know that externals are
> > possible for me, I also know that they are to be avoided if reasonable
> > alternatives exist.
> >
> > So I started looking for alternatives .....
> >
> > Reasons to write externals in the first place.
> > 1. to get access to hardware or other facilities not otherwise available
> > 2. to get higher performance (e.g. matrix ops, image processing, etc.)
> > 3. to take advantage of existing library packages
> > 4. other significant but less common reasons
> >
> > As described above, I don't like C (far less C++). The language I do
> > like (assuming Transcript isn't an option) is Python.
> >
> > Python is, in many ways, similar to Transcript. They're both scripting
> > language, dynamic types (or typeless), associative arrays, etc. -
> > that's largely why I like them both.  But they're also quite
> > different, and complementary, in many ways. So, without falling into
> > the trap of becoming a comparison between the two languages, I believe
> > that a number of the reasons for writing an external would equally
> > apply to using Python.
> >
> > Of course, it would be difficult to write an actual external in
> > Python. But I realized that one of the strengths of both Python and
> > Transcript is that they have good, simple socket facilities. So I
> > decided to try "Remotes" - socket-based Python add-ons to Transcript.
> >
> > I wrote a small (30 lines) Python server which accepts "commands" over
> > a TCP socket, and returns its result over the same TCP connection
> > (see the end of the email for the source code of the Python program).
> > The "commands" are in fact snippets of Python code; so I can develop
> > the Transcript stack and just change the snippets of Python to be sent
> > and executed, without even restarting the server. So the whole process
> > is as dynamic as Rev usually is.
> >
> > <snip>
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



More information about the use-livecode mailing list