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

Top Mobile Game Discounts
Every day, we pick out a curated list of the best mobile discounts on the App Store and post them here. This list won't be comprehensive, but it every game on it is recommended. Feel free to check out the coverage we did on them in the links... | Read more »
Price of Glory unleashes its 1.4 Alpha u...
As much as we all probably dislike Maths as a subject, we do have to hand it to geometry for giving us the good old Hexgrid, home of some of the best strategy games. One such example, Price of Glory, has dropped its 1.4 Alpha update, stocked full... | Read more »
The SLC 2025 kicks off this month to cro...
Ever since the Solo Leveling: Arise Championship 2025 was announced, I have been looking forward to it. The promotional clip they released a month or two back showed crowds going absolutely nuts for the previous competitions, so imagine the... | Read more »
Dive into some early Magicpunk fun as Cr...
Excellent news for fans of steampunk and magic; the Precursor Test for Magicpunk MMORPG Crystal of Atlan opens today. This rather fancy way of saying beta test will remain open until March 5th and is available for PC - boo - and Android devices -... | Read more »
Prepare to get your mind melted as Evang...
If you are a fan of sci-fi shooters and incredibly weird, mind-bending anime series, then you are in for a treat, as Goddess of Victory: Nikke is gearing up for its second collaboration with Evangelion. We were also treated to an upcoming... | Read more »
Square Enix gives with one hand and slap...
We have something of a mixed bag coming over from Square Enix HQ today. Two of their mobile games are revelling in life with new events keeping them alive, whilst another has been thrown onto the ever-growing discard pile Square is building. I... | Read more »
Let the world burn as you have some fest...
It is time to leave the world burning once again as you take a much-needed break from that whole “hero” lark and enjoy some celebrations in Genshin Impact. Version 5.4, Moonlight Amidst Dreams, will see you in Inazuma to attend the Mikawa Flower... | Read more »
Full Moon Over the Abyssal Sea lands on...
Aether Gazer has announced its latest major update, and it is one of the loveliest event names I have ever heard. Full Moon Over the Abyssal Sea is an amazing name, and it comes loaded with two side stories, a new S-grade Modifier, and some fancy... | Read more »
Open your own eatery for all the forest...
Very important question; when you read the title Zoo Restaurant, do you also immediately think of running a restaurant in which you cook Zoo animals as the course? I will just assume yes. Anyway, come June 23rd we will all be able to start up our... | Read more »
Crystal of Atlan opens registration for...
Nuverse was prominently featured in the last month for all the wrong reasons with the USA TikTok debacle, but now it is putting all that behind it and preparing for the Crystal of Atlan beta test. Taking place between February 18th and March 5th,... | Read more »

Price Scanner via MacPrices.net

AT&T is offering a 65% discount on the ne...
AT&T is offering the new iPhone 16e for up to 65% off their monthly finance fee with 36-months of service. No trade-in is required. Discount is applied via monthly bill credits over the 36 month... Read more
Use this code to get a free iPhone 13 at Visi...
For a limited time, use code SWEETDEAL to get a free 128GB iPhone 13 Visible, Verizon’s low-cost wireless cell service, Visible. Deal is valid when you purchase the Visible+ annual plan. Free... Read more
M4 Mac minis on sale for $50-$80 off MSRP at...
B&H Photo has M4 Mac minis in stock and on sale right now for $50 to $80 off Apple’s MSRP, each including free 1-2 day shipping to most US addresses: – M4 Mac mini (16GB/256GB): $549, $50 off... Read more
Buy an iPhone 16 at Boost Mobile and get one...
Boost Mobile, an MVNO using AT&T and T-Mobile’s networks, is offering one year of free Unlimited service with the purchase of any iPhone 16. Purchase the iPhone at standard MSRP, and then choose... Read more
Get an iPhone 15 for only $299 at Boost Mobil...
Boost Mobile, an MVNO using AT&T and T-Mobile’s networks, is offering the 128GB iPhone 15 for $299.99 including service with their Unlimited Premium plan (50GB of premium data, $60/month), or $20... Read more
Unreal Mobile is offering $100 off any new iP...
Unreal Mobile, an MVNO using AT&T and T-Mobile’s networks, is offering a $100 discount on any new iPhone with service. This includes new iPhone 16 models as well as iPhone 15, 14, 13, and SE... Read more
Apple drops prices on clearance iPhone 14 mod...
With today’s introduction of the new iPhone 16e, Apple has discontinued the iPhone 14, 14 Pro, and SE. In response, Apple has dropped prices on unlocked, Certified Refurbished, iPhone 14 models to a... Read more
B&H has 16-inch M4 Max MacBook Pros on sa...
B&H Photo is offering a $360-$410 discount on new 16-inch MacBook Pros with M4 Max CPUs right now. B&H offers free 1-2 day shipping to most US addresses: – 16″ M4 Max MacBook Pro (36GB/1TB/... Read more
Amazon is offering a $100 discount on the M4...
Amazon has the M4 Pro Mac mini discounted $100 off MSRP right now. Shipping is free. Their price is the lowest currently available for this popular mini: – Mac mini M4 Pro (24GB/512GB): $1299, $100... Read more
B&H continues to offer $150-$220 discount...
B&H Photo has 14-inch M4 MacBook Pros on sale for $150-$220 off MSRP. B&H offers free 1-2 day shipping to most US addresses: – 14″ M4 MacBook Pro (16GB/512GB): $1449, $150 off MSRP – 14″ M4... Read more

Jobs Board

All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.