Date: Fri, 18 Jun 1999 9:15 PM +0200 Subject: [SUL] Impressive Speed! From : Barry Wainwright, barry.wainwright@btinternet.com Putting smile through it's paces, I wrote a little script that did a 'real world' task, finding all the prime numbers below 10,000 (such a script has a variety of loops, tests, calculations and coercions). Timings for the script are shown below: +------------+-----------------------------------------+ | | Time taken in 'Ticks' | | |Environment +-------------------------------+ Average | | | Run 1 | Run 2 | Run 3 | Run 4 | | +------------+-------+-------+-------+-------+---------+ | Smile | | | | | | | (v1.6) | 2674 | 2675 | 2669 | 2687 | 45 secs | +------------+-------+-------+-------+-------+---------+ | Apple's | | | | | | |AppleScript | 4491 | 4090 | 4046 | 4044 | 69 secs | | Editor | | | | | | +------------+-------+-------+-------+-------+---------+ | OSA Menu | | | | | | | (v1.2b11) | 4383 | 4525 | 4795 | 4586 | 76 secs | +------------+-------+-------+-------+-------+---------+ |Stand alone | | | | | | |Application | 4483 |Crashed|Crashed|Crashed| n/a | +------------+-------+-------+-------+-------+---------+ Almost 70% faster than OSA! Nice one. I haven't looked into why the applet crashed. Probably a memory problem, but I upped the memory allocation to 8mb and it still gave type 2 errors until I restarted the Mac every time I tried a second run. To: Recipients of MACSCRPT digests Date: Fri, 18 Jun 1999 00:30:26 +0200 From: cooc Subject: The choice of script editor question... First thanks to all who posted on this topic, helping me to find an editor for my needs. I now played more than five minutes with Smile/Script Debugger and Scripter (it was ten minutes ;). The following is _my personal_ opinion/experience. I don't wanna make a editor-war, but my experience might be useful for other peoples or the vendors. - Smile 1.6 seems to be a powerful tool, but for people who already perfectly know what they do in AS and how it all works. I didn't come in full touch with it. If I want that, I think I have to spend a lot of time to build my own script editor (I'm glad if anyone is willing to send me a "expanded/customized version" of smile to see what's possible with it). For example I tried to change Smile's behavior on compiling (it selects all (which seems on large scripts slower than Script Editor to me), compiles and scroll the line you just edit to the top of the window, so I have to scroll often after compile). That makes me really GRRRR. :) After a while I found how to use the "Empty Button". I think I can give it a function like "scroll selection to middle", but there is nothing in the dictionary. But even if I find the trick to do that I have to push a button after compiling my script (which would very similar to click in the scrollbar). In summary I feel that Smile is very complex and hard to explore if you not belong to the cream of scripters. It has no variable-tracing. The dictionary looks very "b/w" and has no hierarchy [v1.6.1 now has pop up menu hierarchy]. - Script Debugger 1.0.5 Demo In my eyes between Smile and Scripter. More functions out of the box, and extendible with own scripts. Nice graphical dictionary were you can see relations between objects. Variable tracing in handlers is not possible, which means in my case I have no variable tracing. The most of my scripts have a run/open handler and from there I call nearly everything via handlers. - Scripter 2.0.2 Demo One advantage for me is that I can better plan a script, writing first a construction of the whole script with all planned handlers/functions and build it line for line including debugging/variable tracing. In contrast, in Script Debugger I have to write the functions to the root level of the script (or in separate windows) for debugging and putting it later in handlers. And that means also that I probably have to rewrite/customize/turn off calls/parameters sometimes. Testing handlers in Scripter seems to be easy because I can call them directly with the parameters I wish. No need to copy them in other windows and so on.. Another good thing is, that I don't have to trace explicit the variables. If there's a problem, Scripter stops and I can drag the variable in question to the observe window to check what's going wrong. The various dictionary types of Scripter are very useful. In my opinion even better as the graphic "map" in SD because I can navigate better in it (the large finder dictionary is a good example for this). Relations between objects are also visible. So far it was possible I tried all editors with real scripts, not only small snippets. Scripter's Demo has unfortunately a stupid 100-lines-of-code-limitation but my pure _feeling_ while working was even though best in Scripter. What's not good/missing: - trace not in handlers with calls like "set bla to convertToHTML(theText) - limited to 32K of code, like Apple's Script Editor - since Scripter offers its features "out of the box", support/changes from Main Event is probably needed when new System- or AS-Versions come out. That seems to be not so good in the past. I will (although it has this limitations) go for Scripter because the other editors have more limitations and/or features that seems not so interesting/useful for me. Hope that helps me cris :-)