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

Summon your guild and prepare for war in...
Netmarble is making some pretty big moves with their latest update for Seven Knights Idle Adventure, with a bunch of interesting additions. Two new heroes enter the battle, there are events and bosses abound, and perhaps most interesting, a huge... | Read more »
Make the passage of time your plaything...
While some of us are still waiting for a chance to get our hands on Ash Prime - yes, don’t remind me I could currently buy him this month I’m barely hanging on - Digital Extremes has announced its next anticipated Prime Form for Warframe. Starting... | Read more »
If you can find it and fit through the d...
The holy trinity of amazing company names have come together, to release their equally amazing and adorable mobile game, Hamster Inn. Published by HyperBeard Games, and co-developed by Mum Not Proud and Little Sasquatch Studios, it's time to... | Read more »
Amikin Survival opens for pre-orders on...
Join me on the wonderful trip down the inspiration rabbit hole; much as Palworld seemingly “borrowed” many aspects from the hit Pokemon franchise, it is time for the heavily armed animal survival to also spawn some illegitimate children as Helio... | Read more »
PUBG Mobile teams up with global phenome...
Since launching in 2019, SpyxFamily has exploded to damn near catastrophic popularity, so it was only a matter of time before a mobile game snapped up a collaboration. Enter PUBG Mobile. Until May 12th, players will be able to collect a host of... | Read more »
Embark into the frozen tundra of certain...
Chucklefish, developers of hit action-adventure sandbox game Starbound and owner of one of the cutest logos in gaming, has released their roguelike deck-builder Wildfrost. Created alongside developers Gaziter and Deadpan Games, Wildfrost will... | Read more »
MoreFun Studios has announced Season 4,...
Tension has escalated in the ever-volatile world of Arena Breakout, as your old pal Randall Fisher and bosses Fred and Perrero continue to lob insults and explosives at each other, bringing us to a new phase of warfare. Season 4, Into The Fog of... | Read more »
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 below... | Read more »
Marvel Future Fight celebrates nine year...
Announced alongside an advertising image I can only assume was aimed squarely at myself with the prominent Deadpool and Odin featured on it, Netmarble has revealed their celebrations for the 9th anniversary of Marvel Future Fight. The Countdown... | Read more »
HoYoFair 2024 prepares to showcase over...
To say Genshin Impact took the world by storm when it was released would be an understatement. However, I think the most surprising part of the launch was just how much further it went than gaming. There have been concerts, art shows, massive... | Read more »

Price Scanner via MacPrices.net

Amazon is offering a $100 discount on every M...
Amazon is offering a $100 instant discount on each configuration of Apple’s new 13″ M3 MacBook Air, in Midnight, this weekend. These are the lowest prices currently available for new 13″ M3 MacBook... Read more
You can save $300-$480 on a 14-inch M3 Pro/Ma...
Apple has 14″ M3 Pro and M3 Max MacBook Pros in stock today and available, Certified Refurbished, starting at $1699 and ranging up to $480 off MSRP. Each model features a new outer case, shipping is... Read more
24-inch M1 iMacs available at Apple starting...
Apple has clearance M1 iMacs available in their Certified Refurbished store starting at $1049 and ranging up to $300 off original MSRP. Each iMac is in like-new condition and comes with Apple’s... Read more
Walmart continues to offer $699 13-inch M1 Ma...
Walmart continues to offer new Apple 13″ M1 MacBook Airs (8GB RAM, 256GB SSD) online for $699, $300 off original MSRP, in Space Gray, Silver, and Gold colors. These are new MacBook for sale by... Read more
B&H has 13-inch M2 MacBook Airs with 16GB...
B&H Photo has 13″ MacBook Airs with M2 CPUs, 16GB of memory, and 256GB of storage in stock and on sale for $1099, $100 off Apple’s MSRP for this configuration. Free 1-2 day delivery is available... Read more
14-inch M3 MacBook Pro with 16GB of RAM avail...
Apple has the 14″ M3 MacBook Pro with 16GB of RAM and 1TB of storage, Certified Refurbished, available for $300 off MSRP. Each MacBook Pro features a new outer case, shipping is free, and an Apple 1-... Read more
Apple M2 Mac minis on sale for up to $150 off...
Amazon has Apple’s M2-powered Mac minis in stock and on sale for $100-$150 off MSRP, each including free delivery: – Mac mini M2/256GB SSD: $499, save $100 – Mac mini M2/512GB SSD: $699, save $100 –... Read more
Amazon is offering a $200 discount on 14-inch...
Amazon has 14-inch M3 MacBook Pros in stock and on sale for $200 off MSRP. Shipping is free. Note that Amazon’s stock tends to come and go: – 14″ M3 MacBook Pro (8GB RAM/512GB SSD): $1399.99, $200... Read more
Sunday Sale: 13-inch M3 MacBook Air for $999,...
Several Apple retailers have the new 13″ MacBook Air with an M3 CPU in stock and on sale today for only $999 in Midnight. These are the lowest prices currently available for new 13″ M3 MacBook Airs... Read more
Multiple Apple retailers are offering 13-inch...
Several Apple retailers have 13″ MacBook Airs with M2 CPUs in stock and on sale this weekend starting at only $849 in Space Gray, Silver, Starlight, and Midnight colors. These are the lowest prices... Read more

Jobs Board

Relationship Banker - *Apple* Valley Financ...
Relationship Banker - Apple Valley Financial Center APPLE VALLEY, Minnesota **Job Description:** At Bank of America, we are guided by a common purpose to help Read more
IN6728 Optometrist- *Apple* Valley, CA- Tar...
Date: Apr 9, 2024 Brand: Target Optical Location: Apple Valley, CA, US, 92308 **Requisition ID:** 824398 At Target Optical, we help people see and look great - and Read more
Medical Assistant - Orthopedics *Apple* Hil...
Medical Assistant - Orthopedics Apple Hill York Location: WellSpan Medical Group, York, PA Schedule: Full Time Sign-On Bonus Eligible Remote/Hybrid Regular Apply Now Read more
*Apple* Systems Administrator - JAMF - Activ...
…**Public Trust/Other Required:** None **Job Family:** Systems Administration **Skills:** Apple Platforms,Computer Servers,Jamf Pro **Experience:** 3 + years of Read more
Liquor Stock Clerk - S. *Apple* St. - Idaho...
Liquor Stock Clerk - S. Apple St. Boise Posting Begin Date: 2023/10/10 Posting End Date: 2024/10/14 Category: Retail Sub Category: Customer Service Work Type: Part Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.