Paolo Amoroso's Journal

books

I read the book Recursion via Pascal by Jeffrey S. Rohl, Cambridge University Press, 1984. I discovered this rare, little known gem by chance and, although it's available online, I also bought a cheap printed copy.

The book Recursion via Pascal.

What makes this short book so interesting? The preface opens with this sentence:

Recursion is the cinderella of programming techniques where languages such as Pascal are concerned.

Programming books usually devote little space to recursion, often to briefly introduce and dismiss it as hard to understand and inefficient.

As a Lisp enthusiast, recursion comes natural to me and is a natural fit for the language. A work entirely on recursion like this is the book I always wanted but didn't know existed.

Recursion via Pascal uses math throughout the text but the explanations are usually clear, and the elementary discrete mathematics with a few bits of calculus is not hard to follow. The snippets in Pascal are short and mostly easy to understand. This code can be ported or adapted with little effort.

What makes the book unique is the coverage of recursion techniques. For example the techniques for making recursion more efficient such as terminating recursive calls earlier, or implementing algorithms with auxiliary procedures that take fewer parameters. The book also gives guidance on when recursion is most appropriate and when it's not.

While most programming books don't say much on eliminating recursion other than remarking it's easy, Recursion via Pascal has a full chapter on this that actually explains what to do.

I'm glad to have such a handy reference work on recursion.

#books #pascal #development

Discuss... Email | Reply @amoroso@fosstodon.org

I shut down Free Python Books, the list of Python books that are free to read online or download I had been maintaining since 2019.

I archived the project's GitHub repo, which is now read-only and no longer accepts contributions. If you're interested you're welcome to fork the repo and maintain your copy.

When learning Python I came across many great free Python books, so I started keeping track of them. In early 2019 I shared my list on Reddit where it resonated with many. I later published the list on GitHub and it eventually gained over 4,500 stars, about 600 forks, and over 100 watchers.

In 2023 I rediscovered my love of Lisp and lost interest in Python, which I no longer use. Hence my decision to mothball the project.

Thanks to all who expressed appreciation or contributed, and to the Python community for producing so many great works.

#Python #books

Discuss... Email | Reply @amoroso@fosstodon.org

I got a cheap used copy of the book A Programmer's Guide to COMMON LISP by Deborah G. Tatar, Digital Press, 1987.

The book A Programmer's Guide to COMMON LISP by Deborah G.

Why did I read such an old book, published a few years after CLtL1 and well before ANSI finalized the Common Lisp standard?

I'm always looking for good Lisp books. Since Medley is my primary Lisp environment, I'm particularly interested in books published when the system was originally developed and used. These works are relevant because they cover a set of features close to the state of the Common Lisp implementation of Medley, and present a programming style typical of Lisp development in those years.

Two old reviews got me curious about A Programmer's Guide to COMMON LISP, one by Daniel Weinreb and the other by Richard Caruana.

Both reviews point out the book is different from most contemporary introductory Lisp books which focus on AI. Although Tatar's does contain some AI code, such as an interesting and complete toy expert system, the sample code spans a wider range of domains like a text formatter similar to nroff.

What sets A Programmer's Guide to COMMON LISP apart from other Lisp books is its environment independent discussion of the interactive Lisp programming process. Writing code in the editor, evaluating expressions from the editor, interacting with the REPL for testing expressions and exploring, and so on.

I've never seen the process expressed so clearly in any book, past of present. I'm familiar with it but the material is particulary helpful for complete beginners.

Although the short chapter on macros presents some interesting examples like a simplified version of defstruct, it doesn't discuss gensym and variable capture. This is unusual. But it's only one of a few issues and the book is a valuable addition to my Lisp library.

#CommonLisp #books #Lisp

Discuss... Email | Reply @amoroso@fosstodon.org

Forty years ago these days, in November of 1983, my book Saturno: nubi, anelli e lune was released by the small Italian publisher Italy Press. Early that year I had started writing this astronomy book about the planet Saturn.

The paperback book "Saturno: nubi, anelli e lune" (Saturn: clouds, rings, and moons) by Paolo Amoroso, Italy Press, 1983.

Such a traditional publishing deal, my first and only one, was a stroke of luck.

While most debut writers collect dozens or hundreds of rejections before landing a deal, I got mine easily at the first try. I was a kid almost old enough to sign a contract and, when I pitched the idea, the publisher agreed with no objections. What's even more remarkable is the publisher trusted not just one kid at his first book writing experience, but four.

Along with three friends of similar age we pitched the idea of a series of astronomy books. I picked the one on Saturn and my friends did the others.

The book proved a success as the print run of 4,000 copies was distributed throughout Italy and sold well. It earned me roughly one fifth of what top science writers were paid for for similar work at the time.

#publishing #books #astronomy

Discuss... Email | Reply @amoroso@fosstodon.org

The short ebooks on Intel 8086 Assembly programming Oscar Toledo self published are some of the best 8086 resources I've seen.

After introducing the 8086 instruction set and Assembly, Programming Boot Sector Games describes the source code of several games each of which fits into the boot sector of a PC, 512 bytes. The sequel, More Boot Sector Games, covers more games.

The introduction to 8086 insructions in the first book is short and to the point. It's enough to code fairly advanced programs without overwhelming with information as processor manuals and full length books typically do. But Oscar also shares his considerable experience and insight by discussing many 8086 tricks, idioms, practical advice, and optimization techniques.

The books cover not only games but also other interesting 8086 programs such as a BASIC interpreter and a tiny operating system.

Since some of the code is dense and advanced, reading it once may not be enough for a full understanding. But a great feature of these programs is they fit into 512 bytes, so there's an upper bound to complexity which rereading the code and the text helps overcome.

The only downside of the books is they are password-protected PDF files. It's an annoyance when opening them in ereading apps but is easy to overcome.

#assembly #books

Discuss... Email | Reply @amoroso@fosstodon.org

As a hobby programmer, my greatest skill gap is achieving good software design. There's very little useful literature on problem decomposition and the main way of learning design seems a byproduct of writing lots of code.

I hope discovering and reading A Philosophy of Software Design, a book by John Ousterhout of Tcl fame, will make a difference.

The book starts by defining complexity in software and explaining its effects on the evolution and growth of systems. Along with this it defines the module, a unit of system decomposition that helps reason about design issues. The remainder of the book provides some key red flags to spot complexity, and presents principles and coding practices that improve design while controlling complexity.

Although general, these principles are precise enough to be applicable and effective. The principles and the red flags gently funnel a system along a path through the design space that progressively shapes the system to reduce complexity.

The strength of A Philosophy of Software Design is the guidance it provides helps achieve good design even without highly structured processes or step by step instructions. Ousterhout acknowledges with humility the vastity of the endeavour and doesn't promise silver bullets or instant solutions.

Another thing I like is the few code samples are surprisingly short, clear, and effective at making a point. Although the code is in Java and C++, the material applies to any language.

#books #development

Discuss... Email | Reply @amoroso@fosstodon.org

I'm reading the book Writing An Interpreter In Go by Thorsten Ball, which I got along with the sequel Writing A Compiler In Go.

I have always been fascinated by compilers and seeked good learning resources. These books bridge the gap between short tutorials that teach how to write an arithmetic expression parser, and 900 page compiler tomes packed with math.

I don't know Go, but Ball designed the books and sample code so that no knowledge of the language is required other than a general programming background. All I know about Go comes from reading the Wikipedia entry and a short reference. Yet the code of Writing An Interpreter In Go is easy to understand, reads as pseudocode, and is arranged in short blocks rarely spanning more than a page.

I really love Writing An Interpreter In Go.

The book presents the material in a smooth and clear progression and anticipates the questions the reader may have. For example, whenever I wonder why some code does or doesn't do something, the next paragraph acknowledges and addresses the hurdle.

I hope Ball's books will help me rewrite the assembler of my Suite8080 suite of Intel 8080 Assembly tools, finally replacing the ad hoc syntacting analysis mess with a true and extensible parser.

#development #books

Discuss... Email | Reply @amoroso@fosstodon.org

You know what I envied of those influencers with millions of followers? The magic of tweeting a question and getting valuable answers and advice from knowledgeable people.

I'm no celebrity, but on Mastodon I'm getting the same experience with orders of magnitude fewer followers.

As a retrocomputing enthusiast, it's a lot of fun to explore and program my V20-MBC homebrew Nec V20 computer. But CP/M-86, one of the operating systems the V20-MBC runs, was eclipsed by MS-DOS back in the day, leaving little surviving documentation and literature. Especially about CP/M-86 development.

So the Open Library listing of the book CP/M-86 Assembly Language Programming by Jon Lindsay (Brady Communications Co., 1986) caught my attention. Sadly, the text isn't available. I decided to try to track down the book, starting by asking for help on comp.os.cpm.

Without expecting much, I also posted a toot to my Mastodon account in case anyone had useful clues on the book. What happened next blew my mind.

Within a day the post was boosted over a hundred times, got some fifty stars, and received dozens of valuable replies. The replies contributed promising leads, tagged others who might know something, suggested workarounds or other lines of inquiry, and started a few interesting side conversations. Everyone went out of their way to assist.

I was speechless, breathless. Literally. I didn't even know how to adequately thank the many who chimed in.

This isn't possible on Twitter, where the algorithms boost celebrities and influencers and bury everyone else.

You may think this overwhelming support has something to do with my 1.1K Mastodon followers. But I've been having a similar experience since joining Mastodon ten months ago. I'd say the critical mass is somewhere between a few dozen and a couple hundred followers.

I want to give back. I want to give others the opportunity of a similar positive experience, which is within reach of everyone in the Fediverse. Boosts proved crucial to amplify my quest for help, so I'm boosting more toots for a chance to reach someone who may be interested or willing to help.

People are the ultimate algorithm.

#fediverse #retrocomputing #books

Discuss... Email | Reply @amoroso@fosstodon.org

I'm collecting and reading more Pascal programming books than I ever did.

My Z80-MBC2 and V20-MBC come with Turbo Pascal for CP/M preinstalled. Using the environment is making me rediscover Turbo Pascal and realize it's great for creating small CP/M tools and programs.

To take advantage of Turbo Pascal I have been gathering old books and other Pascal learning resources that cover the CP/M version I use, selecting only the best and most interesting.

All of them are available online, for example at the Open Library or Bitsavers.org. But these works are too precious and may disappear, not to mention the high prices of rare retrocomputing books. I want backups, so I bought used copies of some of these. Here's what my Pascal programming retro bookshelf looks like:

Pascal programming books.

These are the Pascal books and resources I reference most often, along with notes on what they cover or why I like them:

#pascal #retrocomputing #books

Discuss... Email | Reply @amoroso@fosstodon.org

I was a heavy user of shareware software but my experience was like a story with missing clues and no ending. Reading Shareware Heroes: The renegades who redefined gaming at the dawn of the internet by Richard Moss filled the gaps, completed the story, and gave a sense of resolution.

Android tablet with the cover of the of the Shareware Heroes ebook open in a reading app.

I encountered shareware via the Amiga Fish disk collection, and later MS-DOS productivity software and utilities such as the PC-Write word processor and the CompuShow image viewer.

As an Italian student I loved the affordable programs and the wide selection of shareware, much wider than the fewer and expensive packages by traditional American software houses local retailers carried. I assumed everyone else loved shareware, so I always found puzzling this distribution model was little known even among computer geeks. Equally puzzling was why shareware seemed to have faded since the late 1990s.

Later I realized my narrow focus on productivity software and programming tools made me miss major events, hits, and market players of gaming shareware, which I never was into.

There were other things I didn't know or understand at the time, such as why some shareware never made it to Europe. And, not having owned a Mac until well into the Internet era, I wasn't aware of the role of Mac shareware. Finally, I always wondered about the business side of shareware.

Thanks to accurate and extensive research based on original sources and interviews, Shareware Heroes puts the pieces together and presents a complete, coherent history of shareware from the early days to the Internet era. It paints the big picture, discusses shareware in the context of the computer industry, traces the evolution of shareware business models, and ties the past with the present from early shareware titles to the contemporary indie scene.

Although I'm less focused on gaming, the book has a lot of material also on the application software and utilities at the roots of shareware. But I found the coverage of gaming equally interesting even if I'm a non gamer. For example, I realized the key role of Apogee and id in both the evolution of gaming and software business models.

Interestingly, Shareware Heroes indirectly provides some historical context on the dispute between Epic Games, Apple, and Google over app store fees. Founder Tim Sweeney has always been highly competitive since the early days of Epic Games, for example in his rivarly with Apogee and id.

Sweeney is a tough leader, Apple and Google should have seen it coming. Their executives may want to read Shareware Heroes.

#retrocomputing #books

Discuss... Email | Reply @amoroso@fosstodon.org