TweetFollow Us on Twitter

Dec 86 Letters
Volume Number:2
Issue Number:12
Column Tag:Letters

Letters

Response to Question on Neon

Chris Noe

Kriya Systems

Yes, Neon excels at prototyping! The Forth "environment" is natural for incremental function construction, while providing MacApp-like support long before MacApp was ever heard of. The object-oriented approach is what the Mac is all about.

Pierre has come across a persistent problem with Neon version 1.5: if you have any material on the Clipboard when starting Neon from the Finder, it will produce a bomb box. This happens because the nucleus and dictionary are kept as separate pieces, and must be "docked" at an exact offset. Having anything on the Clipboard wedges a small but deadly datum between the two pieces, rendering the dictionary useless. Neon version 2.0, now available, corrects this problem by using an improved launch technique. In addition, version 2.0 is Mac Plus compatible, supporting HFS & all the new ROM routines and providing an integrated decompiler. Also, applications compiled under 2.0 install as a one piece file and are Switcher compatible. Many of the things we have done with 2.0 have been a direct result of our users' wish lists.

You Made Our Month

Anthony Urrico

North Kingstown, RI

I am delighted to see that the Best of MacTutor is now available. I have been receiving MacTutor for six months now and I find it to be an indispensible resource when it comes to the Macintosh. Even reading the articles based on languages that I am not familiar with provides useful insights into the inner workings of the Mac. I especially like the articles that demonstrate the use of various Mac programming techniques through the development of small applications. This type of article is particularly enlightening, for it provides both a technical discussion of the relevant concepts as well as meaningful program examples that demonstrate the use of these concepts. I hope to see more of this type of article as well as more articles using Modula-2, since Modula-2 (MacMeth from the Modula corporation) is my language of choice.

Although I am not an "expert" programmer (yet), in the course of my graduate work I have read many computer journals, and none provides the reader with more practical information about programming than MacTutor. I take my hat off to you and your staff.

ZBasic is Bug Free

Howard Craft

Washington, D.C

As described by some of your other readers, I have lived through the frustrations of the series of bug-fixes of ZBasic. Last week I received version 3.2. The bugs are gone! As far as my programs are concerned (each is about 120K of code), there are no more system bombs, no more freezes, and what works on the Mac Plus works on the Mac 512K. Hurray, the Gariepy's of Zedcor have produced what I consider to be the ultimate development package for the Mac! With each new beta version, they have added new features until there is no longer a need to understand very much about Inside Macintosh. I am free to pursue MY ideas, not the inner workings of the Macintosh ROM. I have one request to make of Zedcor, however. Do the same for the IIGS, the ST and MS-DOS running under Windows and I'll be ecstatic. Then I can stop worrying about how I'm ever going to convert my thousands of lines of code into C so that I can create programs with the elegance and sophistication that I can now write for the Mac using ZBasic.

Chairman of Zedcor Speaks

Michael A. Gariepy

Ontario, CA

Quite a number of changes, fixes and enhancements have been made to ZBasic. INKEY$ may be accomplished during event trapping with DIALOG(16). In many respects, this is much more useful than INKEY$ since it will hold up to 64 keys in the queue.

Compile time errors may be edited with the Macintosh type Editor now. After the error shows up on the screen, just press Command E to put the cursor directly on the offending line for editing. The line editor does not have to be used at all if you don't want, since we include two Macintosh type editors along with the regular editor. In addition, version 3.02E is being worked on, which will have a completely rewritten EDIT WINDOW.

ZBasic has only been on the market since May 1, 1986. First releases invariably have glitches, since 50 or 60 beta testers just don't find the problems, or give us the feedback, that 10,000 plus users will.

Byron G. Zollars

Belmont MA

Yours is the best Mac magazine I've ever seen. Keep up the good technical articles that have made your magazine stand out from the "business-oriented" Mac journals. Please find enclosed an order for all the back issues that I missed by not subscribing soon enough. I can't wait to digest them.

Back to Resume Procedures

Jim Matthews

Honolulu, HI

Thanks for the follow-up re: resume procedures. You can test a resume procedure by making your program crash (dereference an odd address, call non-existent traps, mess up the stack pointer, or just call SysError) without any means of recovering, such as a debugger or one of the public domain "crash-saver" programs. In Lightspeed Pascal I assume that Lightsbug would regularly trap system errors, so you'd have to "Build Application" and run the program standalone. The fact that debuggers and sophisticated development systems like LSP catch system errors is one reason that developers can get along without resume procedures, but most users aren't so well prepared.

There's a good discussion of resume procedures on page 362 of Scott Knaster's How to Write Macintosh Software. Knaster argues that the resume procedure should try to save important data and then reset the machine, since the system heap might be screwed up in a way that could come back to haunt the user if it just exited to the finder. I disagree. For every time that a program might mess up so badly as to wipe out a disk, a hundred ramdisks could be saved by a resume procedure that just quits to the finder. But it is something to think about before saving a crashed system.

He Likes It

Charles H. Rutledge Jr.

Findlay, OH

Please send your author's kit containing information for submitting articles to MacTutor. While I have your attention I might as well mention that your magazine is great great great great!!! Thanks for the only magazine (except MacUser) of the twenty or so I see each month that I read from cover to cover!

On Mac Languages and Speed

Robert B. Basham

Portland, OR

Mike Morton's October article on timing code segments addresses a concern familiar to anyone who works with languages other than assembly. Due to my own concerns about program speed with Neon, I have made extensive use of a timing technique similar to Mike's. After timing almost every word in the application I am working on, I have reached some tentative conclusions about program speed and Macintosh languages:

1) The Sieve benchmark greatly exaggerates any user-apparent speed differences between languages.

2) Modifications in basic algorithms and language-specific techniques can have far more effect on program speed than overall language speed.

3) A user-apparent improvement in speed usually requires anywhere from a 4- to 10-fold increase in speed. In other words, a screen redraw that seems slow to most users will still seem slow if its speed is only doubled (much less improved by only 30% or so). But an exception to this is when you are trying to dodge the vertical retrace while drawing on the screen. In this instance very small differences in speed can determine whether or not the image will be flicker-free.

4) In screen-oriented programs, almost all of the program's time is spent in toolbox calls, which are, of course, independent of the program language.

5) Efficiency bottlenecks other than toolbox calls are often confined to very small code segments. By effectively identifying such bottlenecks and coding them in assembly, supposedly slow languages can rival the fastest compiled language in terms of speed.

(Note: Source code for my Neon timing word is available on GEnie as file #171 in the MacPro RoundTable).

More on Mac Languages and Speed

Richard Ward

Des Plaines, IL

Reading Mike Morton's Advanced Mac'ing article made me curious to try to time out a few ROM routines of my own. I tested SetPt, SetRect, AddPt, and EqualRect in both LightSpeed Pascal and TML Pascal v2.0. Results are as follows:

This set of timings was done with the loop counter set at 100,000. Base time for the empty FOR loop statement was 8.3 µsec for LSP and 9.5 µsec for TML.

The times for LSP and TML are nearly identical in every case except for the "roll your own routine" where the compiler has to set up a procedure call. Here, LSP is about 10-20% faster than TML. Comparing the SetPt times to the times Mr. Morton indicates for LISA Pascal shows LISA Pascal about 35% faster than either TML or LSP in the "In-line time" comparison. It would be interesting to see some timings for other types of ROM calls besides QuickDraw.

What is probably the most important benchmark though, is the turnaround time. This is 8 seconds for LightSpeed and 59 seconds for TML (on a 512E with a Warp Nine 20-meg HD). I really enjoy reading MacTutor. Keep up the good work!

Correction on QUED™

Jim Lewak

Paragon Courseware

One of MacTutor's readers in the August issue got some misinformation about our Editor QUED™. The maximum file size it can edit is memory size, not 32K.

The following features will be included in next year's 2.0 version: user-programmable macros, wild card Search/Replace (regular expression), multiple clipboards and multiple Undos. We'll need to raise the price for 2.0, but registered owners may upgrade at the price difference.

In the November MacUser, Steve Bobker refers to QUED™ 1.3 as the best Editor on the market. We have heard of excellent reviews in other publications and have received nothing but praise from its many users.

All About C

Rollo Silver

San Cristobal, NM

Here's perhaps the most poignant bug I've been bitten by in more than 30 years programming, man & boy:

#define b *SS  /* top of (my) stack */
#define a SS[-1] /* next to top */
...
(several lines of code involving lots of a's and b's)
return a/b;

This bug is a black widow, and it took me many days to recover from the bite, praying hard for the souls of Kernighan & Ritchie. The last line expands to:

return SS[-1]/*SS;

The "/b" is turned into the beginning of a comment (!!) and the compiler barfs about a missing semicolon, or some such red herring. Most UNIX C compilers have a "-P" option, or "-E" in Berkeley 4.2 UNIX C: "Run only the macro preprocessor on the named C programs, and send the result to the standard output", which quickly unmasks this kind of horror show, but most Mac C compilers I've used lack it. I swore to myself years ago that I'd always put #definientia in parens!

By the way, my candidates for what's most egregiously missing in Mac C systems are:

1) A symbolic debugger, capable of handling names for variables allocated on the stack.

2) A lint (the next version of Lightspeed C is supposed to have a construct which will help catch inconsistencies between the formal parameter specs in a function definition and the actual parameters given in a call).

3) A preprocessor-only option in C (Consulair C has it)

4) A full-featured grep

5) 32-bit ints (Aztec C68K, Lightspeed C have 16-bit ints).

The lack of 32-bit ints creates more problems than one might think. I know you can hide long/short/int choices in typdefs - but there are still problems:

a) Switch statements can't handle quantities > 32767.

b) You can't have static arrays with > 32767 elements.

c) You need a special, non-portable "mlalloc" or "lmalloc" to allocate dynamic arrays with >32767 elements.

d) I get lots of system bombs due to stack misalignment bugs (mea culpa).

e) I'm constantly (pun intended) forgetting to put the "L" after numerical constants that are (in some contexts!) too long, e.g., 100000, and having them silently reduced mod 32768.

f) Library functions like write are restricted to writing at most 32767 chars.

g) Finally, the worst possible screw (K&R, sec. 7.4, page 189): "If two pointers to objects of the same type are subtracted, the result is converted to an int representing the number of objects separating the pointed-to objects...". I know I can do something like

((long)p - (long)q)>>2

if p and q are e.g. pointers to ints too far apart, but...shit! How do we get from the PDP-11 world, with its 16-bit address space, to the 6800x0 world, with its 24/32 bit contiguous address space (leaving segmentation to Intel)? Since this is an impossible restriction for the Mac, both Aztec and Lightspeed depart from the K&R specification to make the following kind of thing work:

int *p,*q
p = 0;
q = p+75000;
printf("q-p=%ld\n",q-p);

except that a properly structured program incorporating that fragment and compiled by Aztec C68K (version 1.06h) prints "620265475", unless the second arg of printf is explicitly cast to long: (long)(q-p).

[At MIT in the 60's, a hacker was a programmer who had great love for programming and produced code admirable for its elegance, speed or compactness. Since then, the term has been redefined to mean a kind of electronic burglar or vandal. Sigh.]

More On Lisp

Stephen Miner

Mountain View, CA

I have enjoyed reading your magazine for the past year and look forward to another year of informative articles. Despite your overall quality, I have to admit disappointment at your recent lack of articles on Lisp programming. I was originally attracted to your publication because of its column on Lisp, and I'd like to see more coverage of Lisp in the future.

But instead of just complaining, I've decided that I should try to contribute something to help promote Lisp on the Macintosh, so please send me an author's kit.

Reactions to MPW vs IBM

Roger Voss

Huntsville, AL

Other than perhaps working on Sun Microsystems workstations, I know from the range of my experiences with software development systems and programming languages that I can state quite unequivocally: Apple's Macintosh Programmer's Workshop (MPW) environment is the best, bar none, software development system that currently exists (notice I didn't was say commercially available) on any industry-popular microcomputer.

If only the rest of the programming community knew of the productivity, ease of use, sheer power of the integrated script language, etc., of the multi-window MPW Shell/Editor. The MPW Shell embodies the great ease, simplicity, and beauty of Macintosh text processing combined with the power of a Unix-like shell. I have seen or used the great editors and command shells touted for MS-DOS and a lot of Unix systems, but none so far have approached being as impressive and highly productive as the MPW Shell/Editor.

Then there is the flagship language of this environment, MPW Object Pascal (the word object denoting that this is a hybrid object programming language with such characteristics inherited from Smalltalk). MPW Pascal is highly modular and separately compilable, a la Modula-2 and Ada. It also has a mixture of C-like abilities added to it. The fact that this language is object-oriented makes it currently the most modern and of course the best production programming language around. MPW also has a GreenHill C compiler with it that is fast and supports all the latest popular C extensions. I like it a lot. What is really tremendous is that it's simplicity itself to link Object Pascal, procedural Pascal, procedural C, and the 680x0 assembly language routines together into the same program while under the MPW environment. Object programming lends by far the best approach for constructing complex software projects that need to be easily extensible and maintainable. My own software consists mainly of separately compilable Object Pascal Units (Brad Cox "Software ICs"). But then C will do a few things here and there that make it highly desirable. About 5 to 10% of my code is in GreenHill C. Then every so often I need to add just a smattering of some arcane assembly language manipulation. I should add, though, that the MPW assembler is a mind blower. It, too, can be used to do stand alone object-programming and interfacing to the MPW Macintosh MacApp object library.

Instead of C++, check out the latest Objective C from Productivity Products International (PPI). This is the firm that has both Brad Cox and Kurt Schmucker. They are designing a new version of Objective C that will have all the wonderful things of C++ but will not have its stupid limitation in regard to selling procompiled Software ICs.

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

Latest Forum Discussions

See All

Tokkun Studio unveils alpha trailer for...
We are back on the MMORPG news train, and this time it comes from the sort of international developers Tokkun Studio. They are based in France and Japan, so it counts. Anyway, semantics aside, they have released an alpha trailer for the upcoming... | Read more »
Win a host of exclusive in-game Honor of...
To celebrate its latest Jujutsu Kaisen crossover event, Honor of Kings is offering a bounty of login and achievement rewards kicking off the holiday season early. [Read more] | Read more »
Miraibo GO comes out swinging hard as it...
Having just launched what feels like yesterday, Dreamcube Studio is wasting no time adding events to their open-world survival Miraibo GO. Abyssal Souls arrives relatively in time for the spooky season and brings with it horrifying new partners to... | Read more »
Ditch the heavy binders and high price t...
As fun as the real-world equivalent and the very old Game Boy version are, the Pokemon Trading Card games have historically been received poorly on mobile. It is a very strange and confusing trend, but one that The Pokemon Company is determined to... | Read more »
Peace amongst mobile gamers is now shatt...
Some of the crazy folk tales from gaming have undoubtedly come from the EVE universe. Stories of spying, betrayal, and epic battles have entered history, and now the franchise expands as CCP Games launches EVE Galaxy Conquest, a free-to-play 4x... | Read more »
Lord of Nazarick, the turn-based RPG bas...
Crunchyroll and A PLUS JAPAN have just confirmed that Lord of Nazarick, their turn-based RPG based on the popular OVERLORD anime, is now available for iOS and Android. Starting today at 2PM CET, fans can download the game from Google Play and the... | Read more »
Digital Extremes' recent Devstream...
If you are anything like me you are impatiently waiting for Warframe: 1999 whilst simultaneously cursing the fact Excalibur Prime is permanently Vault locked. To keep us fed during our wait, Digital Extremes hosted a Double Devstream to dish out a... | Read more »
The Frozen Canvas adds a splash of colou...
It is time to grab your gloves and layer up, as Torchlight: Infinite is diving into the frozen tundra in its sixth season. The Frozen Canvas is a colourful new update that brings a stylish flair to the Netherrealm and puts creativity in the... | Read more »
Back When AOL WAS the Internet – The Tou...
In Episode 606 of The TouchArcade Show we kick things off talking about my plans for this weekend, which has resulted in this week’s show being a bit shorter than normal. We also go over some more updates on our Patreon situation, which has been... | Read more »
Creative Assembly's latest mobile p...
The Total War series has been slowly trickling onto mobile, which is a fantastic thing because most, if not all, of them are incredibly great fun. Creative Assembly's latest to get the Feral Interactive treatment into portable form is Total War:... | Read more »

Price Scanner via MacPrices.net

Early Black Friday Deal: Apple’s newly upgrad...
Amazon has Apple 13″ MacBook Airs with M2 CPUs and 16GB of RAM on early Black Friday sale for $200 off MSRP, only $799. Their prices are the lowest currently available for these newly upgraded 13″ M2... Read more
13-inch 8GB M2 MacBook Airs for $749, $250 of...
Best Buy has Apple 13″ MacBook Airs with M2 CPUs and 8GB of RAM in stock and on sale on their online store for $250 off MSRP. Prices start at $749. Their prices are the lowest currently available for... Read more
Amazon is offering an early Black Friday $100...
Amazon is offering early Black Friday discounts on Apple’s new 2024 WiFi iPad minis ranging up to $100 off MSRP, each with free shipping. These are the lowest prices available for new minis anywhere... Read more
Price Drop! Clearance 14-inch M3 MacBook Pros...
Best Buy is offering a $500 discount on clearance 14″ M3 MacBook Pros on their online store this week with prices available starting at only $1099. Prices valid for online orders only, in-store... Read more
Apple AirPods Pro with USB-C on early Black F...
A couple of Apple retailers are offering $70 (28%) discounts on Apple’s AirPods Pro with USB-C (and hearing aid capabilities) this weekend. These are early AirPods Black Friday discounts if you’re... Read more
Price drop! 13-inch M3 MacBook Airs now avail...
With yesterday’s across-the-board MacBook Air upgrade to 16GB of RAM standard, Apple has dropped prices on clearance 13″ 8GB M3 MacBook Airs, Certified Refurbished, to a new low starting at only $829... Read more
Price drop! Apple 15-inch M3 MacBook Airs now...
With yesterday’s release of 15-inch M3 MacBook Airs with 16GB of RAM standard, Apple has dropped prices on clearance Certified Refurbished 15″ 8GB M3 MacBook Airs to a new low starting at only $999.... Read more
Apple has clearance 15-inch M2 MacBook Airs a...
Apple has clearance, Certified Refurbished, 15″ M2 MacBook Airs now available starting at $929 and ranging up to $410 off original MSRP. These are the cheapest 15″ MacBook Airs for sale today at... Read more
Apple drops prices on 13-inch M2 MacBook Airs...
Apple has dropped prices on 13″ M2 MacBook Airs to a new low of only $749 in their Certified Refurbished store. These are the cheapest M2-powered MacBooks for sale at Apple. Apple’s one-year warranty... Read more
Clearance 13-inch M1 MacBook Airs available a...
Apple has clearance 13″ M1 MacBook Airs, Certified Refurbished, now available for $679 for 8-Core CPU/7-Core GPU/256GB models. Apple’s one-year warranty is included, shipping is free, and each... Read more

Jobs Board

Seasonal Cashier - *Apple* Blossom Mall - J...
Seasonal Cashier - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
Seasonal Fine Jewelry Commission Associate -...
…Fine Jewelry Commission Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) Read more
Seasonal Operations Associate - *Apple* Blo...
Seasonal Operations Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Read more
Hair Stylist - *Apple* Blossom Mall - JCPen...
Hair Stylist - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Blossom Read more
Cashier - *Apple* Blossom Mall - JCPenney (...
Cashier - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Blossom Mall Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.