Peter N Lewis, Macintosh Shareware Author
Peter N Lewis keeps a large archive of excellent source-code demos that he has written or modified at Stairways FTP site (look for files that have "source" in their name). Some of the source code is in Assembly, but most of it is in Pascal. Peter is one of many Pascal advocates on the Macintosh choosing to program in Pascal over C or C++. He is best known for his internet shareware products, including his award winning FTP client, Anarchie. The following is an excerpt from a 1995 TidBITS interview with Peter regarding his decision to stick with Pascal (provided with permission from Adam Engst, TidBITS editor):
Adam: You and Quinn are known for being major Pascal supporters in a development world that has largely gone over to C and C++. You even had anti-C t-shirts at the last few World-Wide Developer's Conferences. Without getting too technical, why do you continue to stick with Pascal, and does that cause problems at times?
Peter: The normal C argument goes like this: "Everyone else is using C, so therefore it must be good." Every Mac user should recognize that statement in a slightly different form, "Everyone else is using PCs, so therefore they must be good."
Basically, I continue to use Pascal because I'm more productive in it. I consider using Pascal to be a strategic advantage, doubly so when compared to C++. I've been reading a C++ book recently (know thy enemy), and every time I turn the page I see new ways to make tiny errors that are catastrophic and impossible to debug. I'm amazed that anyone can produce a working C++ program.
Copyright © 1995 TidBITS
The following are source code archives provided by Peter N Lewis, now hosted on Pascal Central:
Code for an Open Transport server that accepts URLs via UDP packets and code for an Internet Config override that catches all URLs and sends a UDP packet with the information.
Code for a simple example project using PNL-Libraries.sit. Basically, it's NetPresenz Setup with the actual code stripped out and just the framework remaining.
Lots and lots of code. Some of it is rough. Some is old. Lots is in currently shipping applications. Here is a list of some of the things in there:
- Mounting AFP Volumes
- Calculate MacBinary and BinHex CRCs
- Very fast text search engine (using Boyer-Moore)
- JGNE filter handling code
- Code to preserve A5 and handle completions
- Stub Gestalt code - implement the gestalt in your application instead of a seperate project.
- Stub LDEF code - ditto for LDEFs
- Stub CDEF code - ditto for CDEFs
- Menu Sharing Pascal interface
- More Finder Events Pascal interface
- ODB Engine Pascal interface
- Regular expression code with Pascal interface
- SmartScroll Pascal interface
- LZRW1KH compression code (doesnt work under PPC for some reason)
- Lots of TCP/IP code for handling MacTCP/OT transparently.
- High level object oriented event driven TCP code
- Lots AppleEvent utility routines
- Some good Assertion handling code
- Various data types like associative arrays, handle files, handle arrays, collections, references, string lists.
- Barcode printing routines
- Base 64 decoding routines
- BinHex en/decoding routines
- MacBinary detection routines
- Buffered file IO
- Low level procedure calling code
- Movable Modal code
- Cleaver alerts based on TEXT resources
- CString utility routines
- IP string utilitiy routines
- Database/History handling routines
- Desktop database code
- Dialog handling code
- Emergency notification code (good for when you decide you cant launch)
- Password entering code
- Displaying error strings code
- Expire code (for expiring betas)
- Event handling utility routines (eg EventHasOptionKey)
- File ID routines
- File system utility routines
- Object oriented framework for handling windows, events, menus, list windows, etc.
- Code for faceless/foreground initialization based on SIZE bit.
- Async File System and AFP utility code
- Code for getting the zone list
- Grow zone handling and reporting code
- Internet Config utility routines
- Interrupt Safe debugging code
- List manager utility routines
- Low level routines
- Code to disable Force Quit
- Notification code
- Play asyncronous sounds
- Process Manager utility routines
- Progress bar routines (including barber pole)
- Profiling code
- Region utility routines
- Required Event support routines
- Resource Manager utility routines
- Code to restart the Mac
- Code to recursively scan a folder
- SIVC code
- Simple sorting code
- StandardGetFolder code
- Code to handle starting up lots of interdependent units in the right order
- STR# utility routines
- String utility routines
- Thread Manager utility routines
- Test editing code
- Time Manager utility routines
- Traceroute code
- Idle time tracking code
- Mac/ISO 8859-1 translation code
- Version resource utility routines
- Window Manager utility routines