Not shy at all...

Alex Tweedly alex at tweedly.net
Sun Jun 6 14:42:05 EDT 2004


At 09:55 06/06/2004 -0700, Bob Nelson wrote:

>...so let's dive in with both feet.

I'll do the same, and probably land myself right in trouble :)

I've only just started investigating Revolution, with no previous 
experience with Hypercard or AnythingCard - so these are comments that need 
to be treated accordingly.

>So I've got a little script that does a moderately simple thing:  Grab a web
>page, bring it back, strip useless data out of it (right now, I've just got
>it stripping out the extra returns and leading spaces per line) and the next
>step will be to kill the HTML on the page so I can mine the data...

Stripping HTML can become tricky - I'd look around and see if there is a 
user-contributed script / library to deal with the heavy lifting ...

>My layout and code are fairly simple:

>Two fields and two buttons so I can work through the example - the first
>field is the 'holder' of the remote URL which has been retrieved
>(Imported_Raw) and the second field will be the restructured output when I'm
>done.
>
>Here's the code, for those who want to dive deeper...

I'll leave specific comments to those who know better, but doing all the 
manipulation in the same field looks inefficient - put the processed 
sections into a separate (results) field (and don't display it until done).

>Here's what I noticed about execution:
>
>5.  Looking through all the examples I can find, as well as documentation, I
>noted that there aren't many examples related to text manipulation - and
>importing/exporting text, etc., in/out of your stack.  I'm sure I missed
>something on this front, as I'm sure people would be doing this all the
>time...  Can anyone point me in a direction?

 From an outsider's point of view, the lack of a regular expression package 
in Revolution looks like it will make this (the real problem, not the 
simple first step) a harder problem than it need have been. One of the 
things that attracted me to Revolution was a statement along the lines 
of  "text processing like you've never seen" - but I haven't found anything 
to justify that claim yet. The built-in tokenizing is neat, but hardly 
revolutionary, and the apparent lack of RE looks like a big missing 
feature. (Please tell me it's in there and I just missed it in the docs ....)

Although Revolution looks great for some things, I'd have said that a 
text-processing problem with minimal user interaction doesn't look like the 
sweet-spot for Revolution.

I did a simple Python attempt at your simple problem - prompt for URL, read 
URL in, strip blank lines and leading spaces.  Didn't bother with a 
progress bar - the processing takes less than a second anyway (for 210K 
lines -> 145K lines).

>Finally, I'm impressed with the professional layout of the product - this
>could well be the perfect 'update' (I'm sure they don't like to hear that at
>Rev!) to HyperCard.  I'm looking forward to a book, like The Complete
>HyperCard Handbook, that lays out the functionality of Revolution as an
>awesome reference book.

-- Alex Tweedly.
-------------- next part --------------

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.699 / Virus Database: 456 - Release Date: 04/06/2004


More information about the use-livecode mailing list