100% found this document useful (3 votes)
10 views

Learning Swift Building Apps for macOS iOS and Beyond 3rd Edition Jonathon Manning instant download

The document provides a download link for the book 'Learning Swift: Building Apps for macOS, iOS, and Beyond, 3rd Edition' by Jonathon Manning and others, along with additional resources for learning Swift and iOS development. It includes details about the book's content, structure, and various chapters focused on Swift programming and app development. The document also lists several other related titles available for download.

Uploaded by

pozasmabita
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (3 votes)
10 views

Learning Swift Building Apps for macOS iOS and Beyond 3rd Edition Jonathon Manning instant download

The document provides a download link for the book 'Learning Swift: Building Apps for macOS, iOS, and Beyond, 3rd Edition' by Jonathon Manning and others, along with additional resources for learning Swift and iOS development. It includes details about the book's content, structure, and various chapters focused on Swift programming and app development. The document also lists several other related titles available for download.

Uploaded by

pozasmabita
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 61

Learning Swift Building Apps for macOS iOS and

Beyond 3rd Edition Jonathon Manning pdf download

https://ebookfinal.com/download/learning-swift-building-apps-for-
macos-ios-and-beyond-3rd-edition-jonathon-manning/

Explore and download more ebooks or textbooks


at ebookfinal.com
We believe these products will be a great fit for you. Click
the link to download now, or visit ebookfinal
to discover even more!

iOS 8 Swift Programming Cookbook Solutions Examples for


iOS Apps 1st Edition Nahavandipoor

https://ebookfinal.com/download/ios-8-swift-programming-cookbook-
solutions-examples-for-ios-apps-1st-edition-nahavandipoor/

Learning iOS UI Development Implement complex iOS user


interfaces with ease using Swift 1st Edition D'Areglia

https://ebookfinal.com/download/learning-ios-ui-development-implement-
complex-ios-user-interfaces-with-ease-using-swift-1st-edition-
dareglia/

Beyond Boundaries The Manning Marable Reader 1st Edition


Manning Marable

https://ebookfinal.com/download/beyond-boundaries-the-manning-marable-
reader-1st-edition-manning-marable/

Core Data by Tutorials iOS 8 and Swift Edition Aaron


Douglas

https://ebookfinal.com/download/core-data-by-tutorials-ios-8-and-
swift-edition-aaron-douglas/
Core Data in Swift Data Storage and Management for iOS and
OS X Marcus S. Zarra

https://ebookfinal.com/download/core-data-in-swift-data-storage-and-
management-for-ios-and-os-x-marcus-s-zarra/

Pro iOS Apps Performance Optimization 1st Edition Khang Vo


(Auth.)

https://ebookfinal.com/download/pro-ios-apps-performance-
optimization-1st-edition-khang-vo-auth/

Test Driven IOS Development with Swift 4 Third Edition


Dominik Hauser

https://ebookfinal.com/download/test-driven-ios-development-with-
swift-4-third-edition-dominik-hauser/

iOS 5 Programming Cookbook Solutions Examples for iPhone


iPad and iPod touch Apps 1st Edition Vandad Nahavandipoor

https://ebookfinal.com/download/ios-5-programming-cookbook-solutions-
examples-for-iphone-ipad-and-ipod-touch-apps-1st-edition-vandad-
nahavandipoor/

Beginning iOS Apps with Facebook and Twitter APIs for


iPhone iPad and iPod touch 1st Edition Chris Dannen

https://ebookfinal.com/download/beginning-ios-apps-with-facebook-and-
twitter-apis-for-iphone-ipad-and-ipod-touch-1st-edition-chris-dannen/
Learning Swift Building Apps for macOS iOS and
Beyond 3rd Edition Jonathon Manning Digital Instant
Download
Author(s): Jonathon Manning, Paris Buttfield-Addison, Tim Nugent
ISBN(s): 9781491987575, 149198757X
Edition: 3
File Details: PDF, 16.18 MB
Year: 2018
Language: english
3 r ve r s
d Sw
Co

Ed if
iti t 4
on +
Learning
Swift
BUILDING APPS FOR macOS, iOS, AND BEYOND

Jonathon Manning,
Paris Buttfield-Addison & Tim Nugent
THIRD EDITION

Learning Swift
Building Apps for macOS, iOS, and Beyond

Jon Manning, Paris Buttfield-Addison, Tim Nugent

Beijing Boston Farnham Sebastopol Tokyo


Learning Swift
by Jonathon Manning, Paris Buttfield-Addison, and Tim Nugent
Copyright © 2018 Secret Lab. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are
also available for most titles (http://oreilly.com/safari). For more information, contact our corporate/insti‐
tutional sales department: 800-998-9938 or corporate@oreilly.com.

Editor: Rachel Roumeliotis Indexer: Ellen Troutman-Zaig


Production Editor: Melanie Yarbrough Interior Designer: David Futato
Copyeditor: Rachel Head Cover Designer: Karen Montgomery
Proofreader: Kim Cofer Illustrator: Rebecca Demarest

March 2018: Third Edition

Revision History for the Third Edition


2018-03-26: First Release

See http://oreilly.com/catalog/errata.csp?isbn=9781491987575 for release details.

The O’Reilly logo is a registered trademark of O’Reilly Media, Inc. Learning Swift, the cover image, and
related trade dress are trademarks of O’Reilly Media, Inc.
While the publisher and the authors have used good faith efforts to ensure that the information and
instructions contained in this work are accurate, the publisher and the authors disclaim all responsibility
for errors or omissions, including without limitation responsibility for damages resulting from the use of
or reliance on this work. Use of the information and instructions contained in this work is at your own
risk. If any code samples or other technology this work contains or describes is subject to open source
licenses or the intellectual property rights of others, it is your responsibility to ensure that your use
thereof complies with such licenses and/or rights.

978-1-491-98757-5
[LSI]
Table of Contents

Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix

Part I. Welcome to Swift


1. Getting Started. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Xcode 3
Getting Xcode 4
Creating Your First Project 4
Working with the Xcode Interface 6
The Editor 6
The Toolbar 8
The Navigator 10
Utilities 11
The Debug Area 13
Running Your Code 13
The iOS Simulator 14
Running on a Device 15
Distributing Your Apps 16
The Interface Builder 16
Interfaces in iOS 18
Conclusion 19

2. The Swift Programming Language. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21


The Swift Language 22
Swift 3 Versus 4 24
Playgrounds and Swift 24
Comments 26

iii
Imports 27
Variables 27
Operators 30
Collections 31
Arrays 31
Tuples 32
Dictionaries 33
Control Flow 34
Loops 35
Switches 36
Types 39
Working with Strings 39
Sets 42
Enumerations 44
Type Safety and Conversion 46
Optionals 48
Type Casting 51
Functions and Closures 53
Using Functions as Variables 56
Closures 57
Convenience Features 59
The defer Keyword 59
The guard Keyword 60
Making Your Code Swifty 60
Conclusion 61

3. Object-Oriented Development in Swift. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63


Classes and Objects 63
Initialization and Deinitialization 64
Properties 66
Inheritance 69
Protocols 70
Extensions 72
Access Control 75
Operator Overloading and Custom Operators 78
Subscripts 80
Generics 81
Structures 82
Error Handling 84
Memory Management 87
Design Patterns in Swift 91
Model–View–Controller 92

iv | Table of Contents
Delegation 93
Swift Libraries 96
Structuring an App 97
Swift Package Manager 101
Conclusion 107

Part II. Building Selfiegram


4. Setting Up Our App. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Designing Selfiegram 112
Creating the Project 115
The Structure 118
Renaming the Views 120

5. Building the Model Object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123


The Selfie Object 123
The SelfieStore 127
Testing the SelfieStore 130
Filling Out the Method Stubs 136

6. Building the Selfie List UI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145


Creating the Selfie List 145
Improving the Selfie List 151

7. Adding and Deleting Selfies. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155


Deleting Selfies 155
Taking New Selfies 157

8. Viewing and Editing Selfies. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165


The Selfie Viewer 165
Connecting the Code and the UI 167
Editing a Selfie 172

9. Adding Location Info to the Selfies. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175


Updating the Model 175
Testing Our New Model 178
Showing a Selfie’s Location 179
Expanding the Map 183
Determining Locations 186
Configuring the App to Support Location 186
Talking to the Location Hardware 188

Table of Contents | v
10. Building a Settings View. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
Building the Settings UI 193
Connecting the Settings into Our Hierarchy 195
Hooking Up the Settings 196
Implementing the Settings 197

11. Reminders and Notifications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201


Adding a Reminder to the Settings 201
Creating a Notification 203

Part III. Polishing Selfiegram


12. Theming and Sharing Selfiegram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
Custom Fonts 214
Making the Theme 217
Sharing Selfies 221
Sharing from the Detail View Controller 222
Sharing from the List View Controller 224

13. Custom Views and View Controllers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227


A Camera View 228
The Camera View Controller 231
Building the UI 231
Connecting the UI 234
Talking to the Camera 234
Calling the Capture View Controller 240

14. Image Overlays. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245


Creating the Overlay Model 245
Testing the Overlay Manager 252
Writing the Tests 252
Returning Available Overlays 255
Downloading Overlay Information 256
Downloading Overlay Images 258

15. Overlay UI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263


Building the UI 263
Hooking Up the UI 266
Creating the Overlay View 266
Presenting the Overlays 268
Initial Setup 268

vi | Table of Contents
Drawing Eyebrows 271
Vision and Image Detection 274
Connecting It into the App 279

16. Localization and Internationalization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283


Internationalization 284
Generating the String Table 286
Localization 287
Translating the Strings 290
Testing Locales 290
Pseudolanguages 292
Previewing Localizations 294
Conclusion 296

Part IV. Beyond Developing Selfiegram


17. Debugging. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
The Debugger 299
Breakpoints 300
Inspecting Code 304
Controlling Program Flow 307
Performance 309
Instruments 310

18. UI Tests. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313


UI Testing Classes 313
Writing UI Tests 314
A Basic Test 314
Recording UI Actions 315
Checking if Elements Exist 318
Handling UI Interruptions 319

19. Automating Chores with Fastlane. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321


The Fastlane Tools 322
Installing Fastlane 323
Installing via Homebrew 324
Installing via RubyGems 324
Installing via Direct Download 324
Setting Up a Project 324
Doing a Build 325
Configuring a Fastfile 327

Table of Contents | vii


20. Using Fastlane’s Tools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329
Code Signing with match 329
The Problem That Match Solves 329
match’s Solution 332
Generating Screenshots Using snapshot 333
Using Boarding to Add Testers to TestFlight 337
Managing Your App’s Presence on the App Store Using deliver 339
Getting the Metadata 340
Submitting New Metadata 340
Looking Further 341

Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343

viii | Table of Contents


Preface

Welcome to Learning Swift! This book will help you put the Swift programming lan‐
guage into practice by walking you through the development of a complete applica‐
tion for iOS that features a wide array of features, including camera access, working
with the filesystem, face detection, and the iOS graphics system. Along the way, we’ll
also introduce you to new and advanced topics in the Swift programming language.
Swift is a pretty amazing modern language, taking the best from other newer lan‐
guages without reinventing the wheel. Swift is easy to write, easy to read, and hard to
make big mistakes in.
Our philosophy is that the best way to learn Swift is to build apps using it! To build
apps, though, you need a great framework, and Apple has one of the best ones for
building high-quality, featureful software: Cocoa Touch. This book could quite easily
be titled Learning Cocoa Touch with Swift, or something similar, because the frame‐
works are just as important as the language itself. At the time of writing, Swift is cur‐
rently at version 4, and has a bright future ahead of it.

Resources Used in This Book


We recommend following along with the book by writing code yourself as you pro‐
gress through each chapter. If you get stuck, or just want to archive a copy of the
code, you can find what you need via our website.

Audience and Approach


This book is solely focused on Swift 4 and does not cover the use of Objective-C. We
might mention it occasionally, but we don’t expect you to know how to use it. We first
cover the basics of the Swift 4 language, and then move on to teach as much of the
language as we can, as well as the use of Cocoa Touch, through the construction of
Selfiegram, a photo-taking app for iOS.

ix
This book’s approach differs from that of other programming books that you may
have encountered. As we’ve mentioned, we believe that the best way to learn Swift is
to build something using it. We assume that you’re a reasonably capable programmer,
but we don’t assume you’ve ever developed for iOS or used Swift or Objective-C
before. We also assume that you’re fairly comfortable navigating macOS and iOS as a
user.

Organization of This Book


In this book, we’ll be talking about Cocoa Touch, the framework used for developing
iOS applications. Along the way, we’ll also be covering Swift, including its syntax and
features.
In Part I, Welcome to Swift, we begin with a look at the tools used for programming
with Swift, as well as the Apple Developer Program. Then we move on to the basics of
the Swift programming language and structuring a program for Apple’s platforms, as
well as common design patterns.
In Part II, Building Selfiegram, we start building Selfiegram, the iOS photo-taking
application that’s the focus of the book. In this part, we’ll build the foundational fea‐
tures, like the ability to take photos and store them on disk.
In Part III, Polishing Selfiegram, we add a number of particularly interesting features,
including a custom camera view, face detection, network access, and theming the app.
In Part IV, Beyond Developing Selfiegram, we discuss a number of features and tools
that can help you in your further development work, including Xcode’s debugging
and profiling tools, as well as third-party tools that can make your life easier.

Conventions Used in This Book


The following typographical conventions are used in this book:
Italic
Indicates new terms, URLs, email addresses, filenames, and file extensions.
Constant width
Used for program listings, as well as within paragraphs to refer to program ele‐
ments such as variable or function names, databases, data types, environment
variables, statements, and keywords. Also used for commands and command-
line output.

x | Preface
This element signifies a tip or suggestion.

This element signifies a general note.

This element indicates a warning or caution.

Using Code Examples


Supplemental material (code examples, exercises, errata, etc.) is available for down‐
load at our website.
This book is here to help you get your job done. In general, if example code is offered
with this book, you may use it in your programs and documentation. You do not
need to contact us for permission unless you’re reproducing a significant portion of
the code. For example, writing a program that uses several chunks of code from this
book does not require permission. Selling or distributing a CD-ROM of examples
from O’Reilly books does require permission. Answering a question by citing this
book and quoting example code does not require permission. Incorporating a signifi‐
cant amount of example code from this book into your product’s documentation does
require permission.
We appreciate, but do not require, attribution. An attribution usually includes the
title, author, publisher, and ISBN. For example: “Learning Swift, 3rd Edition, by Jona‐
thon Manning, Paris Buttfield-Addison, and Tim Nugent (O’Reilly). Copyright 2018
Secret Lab, 978-1-491-98757-5.”
If you feel your use of code examples falls outside fair use or the permission given
above, feel free to contact us at permissions@oreilly.com.

Preface | xi
O’Reilly Safari
Safari (formerly Safari Books Online) is a membership-based
training and reference platform for enterprise, government,
educators, and individuals.

Members have access to thousands of books, training videos, Learning Paths, interac‐
tive tutorials, and curated playlists from over 250 publishers, including O’Reilly
Media, Harvard Business Review, Prentice Hall Professional, Addison-Wesley Profes‐
sional, Microsoft Press, Sams, Que, Peachpit Press, Adobe, Focal Press, Cisco Press,
John Wiley & Sons, Syngress, Morgan Kaufmann, IBM Redbooks, Packt, Adobe
Press, FT Press, Apress, Manning, New Riders, McGraw-Hill, Jones & Bartlett, and
Course Technology, among others.
For more information, please visit http://oreilly.com/safari.

How to Contact Us
Please address comments and questions concerning this book to the publisher:

O’Reilly Media, Inc.


1005 Gravenstein Highway North
Sebastopol, CA 95472
800-998-9938 (in the United States or Canada)
707-829-0515 (international or local)
707-829-0104 (fax)

We have a web page for this book, where we list errata, examples, and any additional
information. You can access this page at http://bit.ly/learning-swift-3e.
To comment or ask technical questions about this book, send email to bookques‐
tions@oreilly.com.
For more information about our books, courses, conferences, and news, see our web‐
site at http://www.oreilly.com.
Find us on Facebook: http://facebook.com/oreilly
Follow us on Twitter: http://twitter.com/oreillymedia
Watch us on YouTube: http://www.youtube.com/oreillymedia

xii | Preface
Acknowledgments
Jon thanks his mother, father, and the rest of his crazily extended family for their tre‐
mendous support.
Paris thanks his mother, without whom he wouldn’t be doing anything nearly as
interesting, let alone writing books.
Tim thanks his parents and family for putting up with his rather lackluster approach
to life.
We’d all like to thank Rachel Roumeliotis, whose skill and advice were invaluable to
completing the book. Likewise, all the O’Reilly Media staff we’ve interacted with over
the course of writing the book have been the absolute gurus of their fields.
A huge thank you to Tony Gray and the Apple University Consortium (AUC) for the
monumental boost they gave us and others listed on this page. We wouldn’t be writ‐
ing this book if it weren’t for them. And now you’re writing books, too, Tony—sorry
about that!
Thanks also to Neal Goldstein, who deserves full credit and/or blame for getting us
into the whole book-writing racket.
We’re thankful for the support of the goons at MacLab (who know who they are and
continue to stand watch for Admiral Dolphin’s inevitable apotheosis), as well as pro‐
fessor Christopher Lueg, Dr. Leonie Ellis, and the rest of the staff at the University of
Tasmania for putting up with us. “Apologies” to Mark Pesce. He knows why.
Additional thanks to Mars G., Dave J., Rex S., Nic W., Andrew B., Jess L., and every‐
one else who inspires us and helps us. And very special thanks to Steve Jobs, without
whom this book (and many others like it) would not have reason to exist.
Thanks also to our tech reviewers, with special thanks to Chris Devers and Nik Saers
for their thoroughness and professionalism.
Finally, thank you very much for buying our book—we appreciate it! And if you have
any feedback, please let us know. You can email us at lab@secretlab.com.au and find us
on Twitter at @thesecretlab.

Preface | xiii
PART I
Welcome to Swift
CHAPTER 1
Getting Started

Welcome to Learning Swift! In this book, we’ll take you from knowing nothing about
the Swift programming language to building a full-featured app for iOS 11. Along the
way, we’ll explore the libraries, frameworks, and features available to you as a devel‐
oper of software for iPhones and iPads. We’ll be covering practical solutions to com‐
mon problems, as well as the details of the Swift language itself.
We’ll begin with some important setup work that needs to be done before you can
start using the developer tools. In particular, we’ll take a look at the Apple Developer
Program, and how to get your account set up so that you can build your app on a
device.

This book assumes that you’ve got access to two things: a Mac and
an iOS device of some kind (that is, an iPhone or iPad).
The Mac is mandatory; without it, you can’t run Xcode, which is
the tool for writing your code, designing your interfaces, and build‐
ing and running your code. Your Mac will need to be capable of
running Xcode 9.2 or newer, which means that it needs to run
macOS 10.12 or higher.
The iOS device is not absolutely mandatory, but you won’t be able
to follow all of the book without it, because the app that we’re mak‐
ing in this book makes use of hardware features that aren’t present
in the iOS simulator. The device you use needs to be able to run
iOS 11 or later.

Xcode
Xcode is the development environment used for all development work done on Apple
platforms. As you work through this book, you’ll be spending most of your time

3
inside Xcode. With that in mind, we’ll be spending the rest of this chapter getting a
copy of Xcode, setting it up, and getting familiar with the interface.

Getting Xcode
Xcode is available via the App Store. To get a copy, search the App Store for Xcode or
go to Apple’s developer downloads page, find Xcode, and click the Download button.

If you prefer not to use the App Store, you can download it directly
via Apple’s Downloads for Apple Developers page. This page lists
all versions of Xcode, so be sure to get the most recent one.

Once it’s installed, go ahead and launch it. You’ll be greeted by the welcome screen
seen in Figure 1-1.

Figure 1-1. The Welcome to Xcode screen

Creating Your First Project


Since we want to take a tour of Xcode, we’ll start by creating an empty project (we’ll
repeat this step in Chapter 4, when we start building this book’s main app):

1. Click “Create a new Xcode project.” The template chooser (seen in Figure 1-2)
will appear.

4 | Chapter 1: Getting Started


Discovering Diverse Content Through
Random Scribd Documents
The Project Gutenberg eBook of The Book of
the Thousand Nights and a Night — Volume 03
part 2 [Supplement]
This ebook is for the use of anyone anywhere in the United
States and most other parts of the world at no cost and with
almost no restrictions whatsoever. You may copy it, give it away
or re-use it under the terms of the Project Gutenberg License
included with this ebook or online at www.gutenberg.org. If you
are not located in the United States, you will have to check the
laws of the country where you are located before using this
eBook.

Title: The Book of the Thousand Nights and a Night — Volume


03 part 2 [Supplement]

Translator: Sir Richard Francis Burton

Release date: April 29, 2020 [eBook #61974]


Most recently updated: October 17, 2024

Language: English

Credits: Produced by Richard Tonsing, Richard Hulse, and the


Online
Distributed Proofreading Team at
https://www.pgdp.net (This
file was produced from images generously made
available
by The Internet Archive)

*** START OF THE PROJECT GUTENBERG EBOOK THE BOOK OF


THE THOUSAND NIGHTS AND A NIGHT — VOLUME 03 PART 2
[SUPPLEMENT] ***
THE CALIPH’S NIGHT ADVENTURE.
upplemental TO THE
BOOK OF THE ights
Thousand Nights and a Night
WITH NOTES ANTHROPOLOGICAL AND
EXPLANATORY
VOLUME III. Part 2.

BY

RICHARD F. BURTON

PRINTED BY THE BURTON CLUB FOR PRIVATE SUBSCRIBERS ONLY


Shammar Edition

Limited to one thousand numbered


sets, of which this is

Number ____
THE CALIPH’S NIGHT ADVENTURE.

I have heard, O auspicious King, that the Caliph Harun al-Rashid was
one night wakeful exceedingly and when he rose in the morning
restlessness gat hold of him. Wherefore all about him were troubled
for that “Folk aye follow Prince’s fashion;” they rejoice exceedingly
with his joy and are sorrowful with his sorrows albeit they know not
the cause why they are so affected. Presently the Commander of the
Faithful sent for Masrúr the Eunuch, and when he came to him cried,
“Fetch me my Wazir, Ja’afar the Barmaki, without stay or delay.”
Accordingly, he went out and returned with the Minister who, finding
him alone, which was indeed rare, and seeing as he drew near that
he was in a melancholic humour, never even raising his eyes,
stopped till his lord would vouchsafe to look upon him. At last the
Prince of True Believers cast his glance upon Ja’afar, but forthright
turned away his head and sat motionless as before. The Wazir
descrying naught in the Caliph’s aspect that concerned him
personally, strengthened his purpose and bespake him on this wise,
“O Commander of the Faithful, wilt thine Highness deign suffer me
to ask whence cometh this sadness?” and the Caliph answered, with
a clearer brow, “Verily, O Wazir, these moods have of late become
troublesome to me, nor are they to be moved save by hearing
strange tales and verses; and, if thou come not hither on a pressing
affair, thou wilt gladden me by relating somewhat to dispel my
sadness.” Replied the Wazir, “O Commander of the Faithful, my office
compelleth me to stand on thy service, and I would fain remind thee
that this is the day appointed for informing thyself of the good
governance of thy capital and its environs; and this matter shall,
Inshallah, divert thy mind and dispel its gloom.” The Caliph
answered, “Thou dost well to remind me, for that I had wholly
forgotten it; so fare forth and change thy vestments while I do the
same with mine.” Presently the twain donned habits of stranger
merchants and issued out by a private postern of the palace-garden,
which led them into the fields. After they had skirted the city, they
reached the Euphrates’ bank at some distance from the gate
opening on that side, without having observed aught of disorder;
then they crossed the river in the first ferry-boat they found, and,
making a second round on the further side, they passed over the
bridge that joined the two halves of Baghdad-town. At the bridge-
foot they met with a blind old man who asked alms of them; and the
Caliph turned about and crossed his palm with a dinar, whereupon
the beggar caught hold of his hand, and held him fast, saying, “O
beneficent man, whoso thou ever may be, whom Allah hath inspired
to bestow an alms upon me, refuse not the favour I crave of thee,
which is, to strike me a buffet upon the ear, for that I deserve such
punishment and a greater still.” After these words he quitted his hold
of the Caliph’s hand that it might smite him, yet for fear lest the
stranger pass on without so doing he grasped him fast by his long
robe.——And as the morn began to dawn Shahrazad held her peace
till

The end of the Six Hundred and Fifth Night.


Then said she:——I have heard, O auspicious King, that the Caliph,
surprised by the blind man’s words and deeds said, “I may not grant
thy request nor will I minish the merit of my charity, by treating thee
as thou wouldst have me entreat thee.” Saying these words, he
strove to get away from the blind man, but he who after his long
experience expected this refusal of his benefactor, did his utmost to
keep hold of him, and cried, “O my lord, forgive my audacity and my
persistency; and I implore thee either give me a cuff on the ear, or
take back thine alms, for I may not receive it save on that condition,
without falsing a solemn oath I have sworn before the face of Allah;
and, if thou knew the reason, thou wouldst accord with me that the
penalty is light indeed.” Then the Caliph not caring to be delayed any
longer, yielded to the blind man’s importunity, and gave him a slight
cuff: whereupon he loosed him forthright and thanked him and
blessed him. When the Caliph and his Wazir had walked some way
from the blind man, the former exclaimed, “This blind beggar must
assuredly have some right good cause for behaving himself in such
manner to all who give him alms, and I would fain know it. Do thou
return to him and tell him who I am, and bid him fail not to appear
at my palace about mid-afternoon prayer-time that I may converse
with him, and hear whatso he hath to say.” Hereupon Ja’afar went
back and bestowed alms on the blind man giving him another cuff
on the ear and apprised him of the Caliph’s command, and returned
forthright to his lord. Presently, when the twain reached the town,
they found in a square a vast crowd of folk gazing at a handsome
youth and a well-shaped, who was mounted on a mare which he
rode at fullest speed round the open space, spurring and whipping
the beast so cruelly that she was covered with sweat and blood.
Seeing this the Caliph, amazed at the youth’s brutality, stopped to
ask the bystanders an they knew why he tortured and tormented the
mare on such wise; but he could learn naught save that for some
while past, every day at the same time, he had entreated her after
the same fashion. Hereat as they walked along, the Caliph bid his
Wazir especially notice the place and order the young man to come
without failing on the next day, at the hour appointed for the blind
man. But ere the Caliph reached his palace, he saw in a street,
which he had not passed through for many months, a newly-built
mansion, which seemed to him the palace of some great lord of the
land. He asked the Wazir an he knew its owner; and Ja’afar
answered he did not but would make inquiry. So he consulted a
neighbour who told him that the house-owner was one Khwájah
Hasan surnamed Al-Habbál from his handicraft, rope-making; that
he himself had seen the man at work in the days of his poverty, that
he knew not how Fate and Fortune had befriended him, yet that the
same Khwájah had gotten such exceeding wealth that he had been
enabled to pay honourably and sumptuously all the expenses he had
incurred when building his palace. Then the Wazir returned to the
Caliph, and gave him a full account of whatso he had heard, whereat
cried the Prince of True Believers, “I must see this Khwajah Hasan
al-Habbal: do thou therefore, O Wazir, go and tell him to come to my
palace, at the same hour thou hast appointed for the other twain.”
The Minister did his lord’s bidding and the next day, after mid-
afternoon prayers, the Caliph retired to his own apartment and
Ja’afar introduced the three persons whereof we have been speaking
and presented them to the Caliph. All prostrated themselves at his
feet and when they rose up, the Commander of the Faithful asked
his name of the blind man, who answered he was hight Baba
Abdullah. “O Servant of Allah,” cried the Caliph, “thy manner of
asking alms yesterday seemed so strange to me that, had it not
been for certain considerations, I should not have granted thy
petition; nay, I would have prevented thy giving further offence to
the folk. And now I have bidden thee hither that I may know from
thyself what impelled thee to swear that rash oath whereof thou
toldest me, that I may better judge whether thou have done well or
ill, and if I should suffer thee to persist in a practice which
meseemeth must set so pernicious an example. Tell me openly how
such mad thought entered into thy head, and conceal not aught, for
I will know the truth and the full truth.”——And as the morn began
to dawn Shahrazad held her peace till

The end of the Six Hundred and Sixth Night.


Then said she:——I have heard, O auspicious King, that Baba
Abdullah terrified by these words, cast himself a second time at the
Caliph’s feet with his face prone to the ground, and when he rose
again, said, “O Commander of the Faithful, I crave pardon of thy
Highness for my audacity, in that I dared require, and well-nigh
compelled thee to do a thing which verily seemeth contrary to sound
sense. I acknowledge mine offence; but as I knew not thy Highness
at that time, I implore thy clemency, and I pray thou wilt consider
my ignorance of thine exalted degree. And now as to the
extravagance of my action, I readily admit that it must be strange to
the sons of Adam; but in the eye of Allah ’tis but a slight penance
wherewith I have charged myself for an enormous crime of which I
am guilty, and wherefor, an all the people in the world were each
and every to give me a cuff on the ear ’twould not be sufficient
atonement. Thy Highness shall judge of it thyself, when I, in telling
my tale according to thy commandment, will inform thee of what
was my offence.” And here he began to relate
THE STORY OF THE BLIND MAN, BABA
ABDULLAH.[1]
O my lord the Caliph, I, the humblest of thy slaves, was born in
Baghdad, where my father and mother, presently dying within a few
days of each other, left me a fortune large enough to last me
throughout my lifetime. But I knew not its value and soon I had
squandered it in luxury and loose living and I cared naught for thrift
or for increasing my store. But when little was left to me of my
substance, I repented of my evil courses and toiled and laboured
hard by day and night to increase my remaining stock of money. It is
truly said, “After waste cometh knowledge of worth.” Thus little by
little I got together fourscore camels, which I let on hire to
merchants, and thus I made goodly gain each time I found occasion:
moreover I was wont to engage myself together with my beasts and
on this wise I journeyed over all the dominions and domains of thy
Highness. Brief, I hoped ere long to reap an abundant crop of gold
by the hiring out of my baggage animals.——And as the morn began
to dawn Shahrazad held her peace till

The end of the Six Hundred and Seventh Night.


Then said she:——I have heard, O auspicious King, that Baba
Abdullah continued his tale in these words:—Once I had carried
merchants’ stuffs to Bassorah for shipping Indiawards and I was
returning to Baghdad with my beasts unladen. Now as I fared
homewards I chanced pass across a plain of excellent pasturage
lying fallow and far from any village, and there unsaddled the camels
which I hobbled and tethered together that they might crop the
luxuriant herbs and thorns and yet not fare astray. Presently
appeared a Darwaysh who was travelling afoot for Bassorah, and he
took seat beside me to enjoy ease after unease; whereat I asked
him whence he wayfared and whither he was wending. He also
asked me the same question and when we had told each to other
our own tales, we produced our provisions and brake our fast
together, talking of various matters as we ate. Quoth the Darwaysh,
“I know a spot hard by which enholdeth a hoard and its wealth is so
wonder-great that shouldst thou load upon thy fourscore camels the
heaviest burthens of golden coins and costly gems from that
treasure there will appear no minishing thereof.” Hearing these
words I rejoiced with exceeding joy and gathering from his mien and
demeanour that he did not deceive me, I arose forthright and falling
upon his neck, exclaimed, “O Hallow of Allah, who carest naught for
this world’s goods and hast renounced all mundane lusts and
luxuries, assuredly thou hast full knowledge of this treasure, for
naught remaineth hidden from holy men as thou art. I pray thee tell
me where it may be found that I may load my fourscore beasts with
bales of Ashrafis and jewels: I wot full well that thou hast no greed
for the wealth of this world, but take, I pray thee, one of these my
fourscore camels as recompense and reward for the favour.” Thus
spake I with my tongue but in my heart I sorely grieved to think that
I must part with a single camel-load of coins and gems; withal I
reflected that the other three-score and nineteen camel-loads would
contain riches to my heart’s content. Accordingly, as I wavered in
mind, at one moment consenting and at the next instant repenting,
the Darwaysh noting my greed and covetise and avarice, replied,
“Not so, O my brother: one camel doth not suffice me that I should
shew thee all this hoard. On a single condition only will I tell thee of
the place; to wit, that we twain lead the animals thither and lade
them with the treasure, then shalt thou give me one half thereof and
take the other half to thyself. With forty camels’ load of costly ores
and minerals for sure thou canst buy thousands more of camels.”
Then, seeing that refusal was impossible, I cried “So be it! I agree to
thy proposal and I will do as thou desirest;” for in my heart I had
conned the matter over and well I wist that forty camel-loads of gold
and gems would suffice me and many generations of my
descendants; and I feared lest an I gainsay him I should repent for
ever and ever having let so great a treasure slip out of hand.
Accordingly, giving full consent to all he said, I got together every
one of my beasts and set me a-wayfaring along with the Fakír.[2]
After travelling over some short distance we came upon a gorge
between two craggy mountain-walls towering high in crescent form
and the pass was exceeding narrow so that the animals were forced
to pace in single file, but further on it flared out and we could thread
it without difficulty into the broad Wady below. No human being was
anywhere to be seen or heard in this wild land, so we were
undisturbed and easy in our minds nor feared aught. Then quoth the
Darwaysh, “Leave here the camels and come with me.”——And as
the morn began to dawn Shahrazad held her peace till

The end of the Six Hundred and Eighth Night.


Then said she:——I have heard, O auspicious King, that the blind
man Baba Abdullah pursued his tale on this wise:—I did as the
Darwaysh had bidden me; and, nakhing[3] all the camels, I followed
in wake of him. After walking a short way from the halting-place he
produced a flint and steel and struck fire therewith and lit some
sticks he had gotten together; then, throwing a handful of strong-
smelling incense upon the flames, he muttered words of incantation
which I could by no means understand. At once a cloud of smoke
arose, and spireing upwards veiled the mountains; and presently, the
vapour clearing away, we saw a huge rock with pathway leading to
its perpendicular face. Here the precipice showed an open door,
wherethrough appeared in the bowels of the mountain a splendid
palace, the workmanship of the Jinns, for no man had power to build
aught like it. In due time, after sore toil, we entered therein and
found an endless treasure, ranged in mounds with the utmost
ordinance and regularity. Seeing a heap of Ashrafis I pounced upon
it as a vulture swoopeth upon her quarry, the carrion, and fell to
filling the sacks with golden coin to my heart’s content. The bags
were big, but I was constrained to stuff them only in proportion to
the strength of my beasts. The Darwaysh, too, busied himself in like
manner, but he charged his sacks with gems and jewels only,
counselling me the while to do as he did. So I cast aside the ducats
and filled my bags with naught save the most precious of the
stonery. When we had wrought our best, we set the well-stuffed
sacks upon the camels’ backs and we made ready to depart; but,
before we left the treasure-house wherein stood ranged thousands
of golden vessels, exquisite in shape and workmanship, the
Darwaysh went into a hidden chamber and brought from out a
silvern casket a little golden box full of some unguent, which he
showed to me, and then he placed it in his pocket. Presently, he
again threw incense upon the fire and recited his incantations and
conjurations, whereat the door closed and the rock became as
before. We then divided the camels, he taking one half and I the
other; and, passing through the strait and gloomy gorge in single
file, we came out upon the open plain. Here our way parted, he
wending in the direction of Bassorah and I Baghdad-wards; and
when about to leave him I showered thanks upon the Darwaysh who
had obtained me all this wealth and riches worth a thousand
thousand of gold coins; and farewelled him with deep emotions of
gratitude; after which we embraced and wended our several ways.
But hardly had I bidden adieu to the Fakir and had gone some little
distance from him with my file of camels than the Shaytan tempted
me with greed of gain so that I said to myself, “The Darwaysh is
alone in the world, without friends or kinsman, and is wholly
estranged from matters mundane. What will these camel-loads of
filthy lucre advantage him? Moreover, engrossed by the care of the
camels, not to speak of the deceitfulness of riches, he may neglect
his prayer and worship: therefore it behoveth me to take back from
him some few of my beasts.” With this resolve I made the camels
halt and tying up their forelegs ran back after the holy man and
called out his name. He heard my loud shouts and awaited me
forthright; and, as soon as I approached him I said, “When I had
quitted thee a thought came into my mind; to wit, that thou art a
recluse who keepest thyself aloof from earthly things, pure in heart
and busied only with orison and devotion. Now care of all these
camels will cause thee only toil and moil and trouble and waste of
precious time: ’twere better then to give them back and not run the
risk of these discomforts and dangers.” The Darwaysh replied, “O my
son, thou speakest sooth. The tending of all these animals will bring
me naught save ache of head, so do thou take of them as many as
thou listest. I thought not of the burthen and pother till thou
drewest my attention thereto; but now I am forewarned thereof; so
may Almighty Allah keep thee in His holy keeping!” Accordingly, I
took ten camels of him and was about to gang my gait when
suddenly it struck me, “This Fakir was unconcerned at giving up ten
camels, so ’twere better I ask more of him.” Thereupon I drew
nearer to him and said, “Thou canst hardly manage thirty camels; do
give me, I pray thee, other ten.” Said he, “O my son, do whatso thou
wishest! Take thee other ten camels; twenty will suffice me.” I did
his bidding and driving off the twenty added them to my forty. Then
the spirit of concupiscence possessed me, and I bethought me more
and more to get yet other ten camels from his share; so I retraced
my steps for the third time and asked him for another ten, and of
these, as also the remaining ten, I wheedled him. The Darwaysh
gladly gave up the last of his camels, and, shaking out his skirts,[4]
made ready to depart; but still my accursed greed stuck to me.
Albeit I had got the fourscore beasts laden with Ashrafis and jewels,
and I might have gone home happy and content, with wealth for
fourscore generations, Satan tempted me still more, and urged me
also to take the box of ointment, which I supposed to contain
something more precious than rubies.——And as the morn began to
dawn Shahrazad held her peace till

The end of the Six Hundred and Ninth Night.


Then said she:——I have heard, O auspicious King, that Baba
Abdullah continued his tale in these words:—So when I had again
farewelled and embraced him I paused awhile and said, “What wilt
thou do with the little box of salve thou hast taken to thy portion? I
pray thee give me that also.” The Fakir would by no means part with
it, whereupon I lusted the more to possess it, and resolved in my
mind that, should the holy man give it up of his free will, then well
and good, but if not I would force it from him. Seeing my intent he
drew the box from out his breast-pocket[5] and handed it to me
saying, “O my son, an thou wouldst have this box of ointment, then
freely do I give it to thee; but first it behoveth thee to learn the
virtue of the unguent it containeth.” Hearing these words I said,
“Forasmuch as thou hast shown me all this favour, I beseech thee
tell me of this ointment and what of properties it possesseth.” Quoth
he, “The wonders of this ointment are passing strange and rare. An
thou close thy left eye and rub upon the lid the smallest bit of the
salve then all the treasures of the world now concealed from thy
gaze will come to sight; but an thou rub aught thereof upon thy
right eye thou shalt straightway become stone-blind of both.”
Thereat I bethought me of putting this wondrous unguent to the test
and placing in his hand the box I said, “I see thou understandest
this matter right well; so now I pray thee apply somewhat of the
ointment with thine own hand to my left eyelid.” The Darwaysh
thereupon closed my left eye and with his finger rubbed a little of
the unguent over the lid; and when I opened it and looked around I
saw the hidden hoards of the earth in countless quantities even as
the Fakir had told me I should see them. Then closing my right
eyelid, I bade him apply some of the salve to that eye also. Said he,
“O my son, I have forewarned thee that if I rub it upon thy right
eyelid thou shalt become stone-blind of both. Put far from thee this
foolish thought: why shouldst thou bring this evil to no purpose on
thyself?” He spake sooth indeed, but by reason of my accursed ill-
fate I would not heed his words and considered in my mind, “If
applying the salve to the left eyelid hath produced such effect,
assuredly far more wondrous still shall be the result when rubbed on
the right eye. This fellow doth play me false and keepeth back from
me the truth of the matter.” When I had thus determined in my mind
I laughed and said to the holy man, “Thou art deceiving me to the
intent that I should not advantage myself by the secret, for that
rubbing the unguent upon the right eyelid hath some greater virtue
than applying it to the left eye, and thou wouldst withhold the
matter from me. It can never be that the same ointment hath
qualities so contrary and virtues so diverse.” Replied the other, “Allah
Almighty is my witness that the marvels of the ointment be none
other save these whereof I bespake thee; O dear my friend, have
faith in me, for naught hath been told thee save what is sober
sooth.” Still would I not believe his words, thinking that he
dissembled with me and kept secret from me the main virtue of the
unguent. Wherefore filled with this foolish thought I pressed him
sore and begged that he rub the ointment upon my right eyelid; but
he still refused and said, “Thou seest how much of favour I have
shown to thee: wherefore should I now do thee so dire an evil?
Know for a surety that it would bring thee life-long grief and misery;
and I beseech thee, by Allah the Almighty, abandon this thy purpose
and believe my words.” But the more he refused so much the more
did I persist; and in fine I made oath and sware by Allah, saying, “O
Darwaysh, what things soever I have asked of thee thou gavest
freely unto me and now remaineth only this request for me to make.
Allah upon thee, gainsay me not and grant me this last of thy boons:
and whatever shall betide me I will not hold thee responsible
therefor. Let Destiny decide for good or for evil.” When the holy man
saw that his denial was of no avail and that I irked him with
exceeding persistence, he put the smallest bit of ointment on my
right lid and, as I opened wide my eyes, lo and behold! both were
stone-blind: naught could I see for the black darkness before them
and ever since that day have I been sightless and helpless as thou
foundest me. When I knew that I was blinded, I exclaimed, “O
Darwaysh of ill-omen, what thou didst foretell hath come to pass;”
and I fell to cursing him and saying, “O would to Heaven thou hadst
never brought me to the hoard or hadst given me such wealth. What
now avail me all this gold and jewels? Take back thy forty camels
and make me whole again.” Replied he, “What evil have I done to
thee? I showed thee favours more than any man hath ever dealt to
another. Thou wouldst not heed my rede, but didst harden thy heart
and lustest to obtain this wealth and to pry into the hidden treasures
of the earth. Thou wouldst not be content with what thou hadst and
thou didst misdoubt my words thinking that I would play thee false.
Thy case is beyond all hope, for never more wilt thou regain thy
sight; no, never.” Then said I with tears and lamentations, “O Fakir,
take back thy fourscore camels laden with gold and precious stones
and wend thy way: I absolve thee from all blame, natheless I
beseech thee by Allah Almighty to restore my sight an thou art able.”
He answered not a word, but leaving me in miserable plight
presently took the load to Bassorah, driving before him the fourscore
camels laden with wealth. I cried aloud and besought him to lead
me with him away from the life-destroying wilderness, or to put me
on the path of some caravan, but he regarded not my cries and
abandoned me there.——And as the morn began to dawn Shahrazad
held her peace till

The end of the Six Hundred and Tenth Night.


Then said she:——“I have heard, O auspicious king, that Baba
Abdullah the blind man resumed his story, saying:—So when the
Darwaysh departed from me, I had well-nigh died of grief and wrath
at the loss of my sight and of my riches, and from the pangs of
thirst[6] and hunger. Next day by good fortune a caravan from
Bassorah passed that way; and, seeing me in such a grievous
condition, the merchants had compassion on me and made me
travel with them to Baghdad. Naught could I do save beg my bread
in order to keep myself alive; so I became a mendicant and made
this vow to Allah Almighty that, as a punishment for this my unlucky
greed and cursed covetise, I would require a cuff upon my ear from
everyone who might take pity on my case and give an alms. On this
wise it was that yesterday I pursued thee with such pertinacity.”
When the blind man made an end of his story the Caliph said, “O
Baba Abdullah! thine offence was grievous; may Allah have mercy on
thee therefor. It now remaineth to thee to tell thy case to devotees
and anchorites that they may offer up their potent prayers in thy
behalf. Take no thought for thy daily wants: I have determined that
for thy living thou shalt have a dole of four dirhams a day from my
royal treasury according to thy need as long as thou mayest live. But
see that thou go no more to ask for alms about my city.” So Baba
Abdullah returned thanks to the Prince of True Believers, saying, “I
will do according to thy bidding.” Now when the Caliph Harun al-
Rashid had heard the story of Baba Abdullah and the Darwaysh, he
turned to and addressed the young man whom he had seen riding at
fullest speed upon the mare and savagely lashing and ill-treating her.
“What is thy name?” quoth he, and quoth the youth, bowing his
brow groundwards, “My name, O Commander of the Faithful, is Sídí
Nu’umán.”[7] Then said the Caliph, “Hearken now, O Sidi Nu’uman!
Ofttimes have I watched the horsemen exercise their horses, and I
myself have often done likewise, but never saw I any who rode so
mercilessly as thou didst ride thy mare, for thou didst ply both whip
and shovel-iron in cruellest fashion. The folk all stood to gaze with
wonderment, but chiefly I, who was constrained against my wish to
stop and ask the cause of the bystanders. None, however, could
make clear the matter, and all men said that thou art wont each day
to ride the mare in this most brutal fashion, whereat my mind
marvelled all the more. I now would ask of thee the cause of this thy
ruthless savagery, and see that thou tell me every whit and leave not
aught unsaid.” Sidi Nu’uman, hearing the order of the Commander of
the Faithful, became aware he was fully bent upon hearing the
whole matter and would on no wise suffer him to depart until all was
explained. So the colour of his countenance changed and he stood
speechless like a statue through fear and trepidation; whereat said
the Prince of True Believers, “O Sidi Nu’uman, fear naught but tell
me all thy tale. Regard me in the light of one of thy friends and
speak without reserve, and explain to me the matter fully as thou
wouldst do hadst thou been speaking to thy familiars. Moreover, an
thou art afraid of any matter which thou shalt confide to me and if
thou dread my indignation, I grant thee immunity and a free
pardon.” At these comforting words of the Caliph, Sidi Nu’uman took
courage, and with clasped hands replied, “I trust I have not in this
matter done aught contrary to thy Highness’s law and custom, and
therefore will I willingly obey thy bidding and relate to thee all my
tale. If I have offended in anything then am I worthy of thy
punishment. ’Tis true that I have daily exercised the mare and
ridden her at speed around the hippodrome as thou sawest me do;
and I lashed and gored her with all my might. Thou hadst
compassion on the mare and didst deem me cruel-hearted to entreat
her thus, but when thou shalt have heard all my adventure thou wilt
admit, Inshallah—God willing—that this be only a trifling penalty for
her offence, and that not she but I deserve thy pity and pardon!
With thy permission I will now begin my story.”——And as the morn
began to dawn Shahrazad held her peace till

The end of the Six Hundred and Eleventh


Night.
Then said she:——I have heard, O auspicious King, that the Caliph
Harun al-Rashid accorded the youth permission to speak and that
the rider of the mare began in these words the
HISTORY OF SIDI NU’UMAN.

O lord of beneficence and benevolence, my parents were possessed


of wealth and riches sufficient to provide their son when they died
with ample means for a life-long livelihood so that he might pass his
days like a Grandee of the land in ease and joyance and delight. I—
their only child—had nor care nor trouble about any matter until one
day of the days, when in the prime of manhood, I was a-minded to
take unto me a wife, a woman winsome and comely to look upon,
that we might live together in mutual love and double blessedness.
But Allah Almighty willed not that a model helpmate become mine;
nay, Destiny wedded me to grief and the direst misery. I married a
maid who in outward form and features was a model of beauty and
loveliness without, however, one single gracious gift of mind or soul;
and on the very second day after the wedding her evil nature began
to manifest itself. Thou art well aware, O Prince of True Believers,
that by Moslem custom none may look upon the face of his
betrothed before the marriage-contract, nor after wedlock can he
complain should his bride prove a shrew or a fright: he must needs
dwell with her in such content as he may and be thankful for his
fate, be it fair or unfair. When I saw first the face of my bride and
learnt that it was passing comely, I joyed with exceeding joy and
gave thanks to Almighty Allah that He had bestowed on me so
charming a mate. That night I slept with her in joy and love-delight;
but next day when the noon-meal was spread for me and her I
found her not at table and sent to summon her; and after some
delay, she came and sat her down. I dissembled my annoyance and
forbore for this late-coming to find fault with her; which I soon had
ample reason to do. It so happened that amongst the many dishes
which were served up to us was a fine pilaff,[8] of which I, according
to the custom in our city, began to eat with a spoon; but she, in lieu
of it pulled out an ear-pick from her pocket and therewith, fell to
picking up the rice and ate it grain by grain. Seeing this strange
conduct I was sore amazed and fuming inwardly said in sweet tones,
“O my Aminah,[9] what be this way of eating? hast thou learnt it of
thy people or art thou counting grains of rice purposing to make a
hearty meal hereafter? Thou hast eaten but ten or twenty during all
this time. Or haply thou art practising thrift? if so I would have thee
know that Allah Almighty hath given me abundant store and fear not
on that account; but do thou, O my dearling, as all do and eat as
thou seest thy husband eat.” I fondly thought that she would
assuredly vouchsafe some words of thanks, but never a syllable
spake she and ceased not picking up grain after grain: nay more, in
order to provoke me to greater displeasure, she paused for a long
time between each. Now when the next course of cakes came on
she idly brake some bread and tossed a crumb or two into her
mouth; in fact she ate less than would satisfy the stomach of a
sparrow. I marvelled much to see her so obstinate and selfwilled but
I said to myself, in mine innocence, “May be she hath not been
accustomed to eat with men, and especially she may be too shame-
faced to eat heartily in presence of her husband: she will in time do
whatso do other folk.” I thought also that perchance she hath
already broken her fast and lost appetite, or haply it hath been her
habit to eat alone. So I said nothing and after dinner went out to
smell the air and play the Jaríd[10] and thought no more of the
matter. When, however, we two sat again at meat my bride ate after
the same fashion as before; nay, she would ever persist in her
perversity; whereat I was sore troubled in mind, and marvelled how
without food she kept herself alive. One night it chanced that
deeming me fast asleep she rose up in stealth from my side, I being
wide awake: when I saw her step cautiously from the bed as one
fearing lest she might disturb me. I wondered with exceeding
wonder why she should arise from sleep to leave me thus and
methought I would look into the matter. Wherefore I still feigned
sleep and snored but watched her as I lay, and presently saw her
dress herself and leave the room; I then sprang off the bed and
throwing on my robe and slinging my sword across my shoulder
looked out of the window to spy whither she went. Presently she
crossed the courtyard and opening the street-door fared forth; and I
also ran out through the entrance which she had left unlocked; then
followed her by the light of the moon until she entered a cemetery
hard by our home.——And as the morn began to dawn Shahrazad
held her peace till

The end of the Six Hundred and Twelfth Night.


Then said she:——I have heard O auspicious King, that Sidi Nu’uman
continued his story saying:—But when I beheld Aminah my bride
enter the cemetery, I stood without and close to the wall over which
I peered so that I could espy her well but she could not discover me.
Then what did I behold but Aminah sitting with a Ghúl![11] Thy
Highness wotteth well that Ghuls be of the race of devils; to wit,
they are unclean spirits which inhabit ruins and which terrify solitary
wayfarers and at times seizing them feed upon their flesh; and if by
day they find not any traveller to eat they go by night to the
graveyards and dig out and devour dead bodies. So I was sore
amazed and terrified to see my wife thus seated with a Ghul. Then
the twain dug up from the grave a corpse which had been newly
buried, and the Ghul and my wife Aminah tore off pieces of the flesh
which she ate making merry the while and chatting with her
companion; but inasmuch as I stood at some distance I could not
hear what it was they said. At this sight I trembled with exceeding
fear. And when they had made an end of eating they cast the bones
into the pit and thereover heaped up the earth e’en as it was before.
Leaving them thus engaged in their foul and fulsome work, I
hastened home; and, allowing the street-door to remain half-open as
my bride had done, I reached my room, and throwing myself upon
our bed feigned sleep. Presently Aminah came and doffing her dress
calmly lay beside me, and I knew by her manner that she had not
seen me at all, nor guessed that I had followed her to the cemetery.
This gave me great relief of mind, withal I loathed to bed beside a
cannibal and a corpse-eater; howbeit I lay still despite extreme
misliking till the Muezzin’s call for dawn-prayers, when getting up I
busied myself with the Wuzú-ablution and set forth mosque-wards.
Then having said my prayers and fulfilled my ceremonial duties,[12] I
strolled about the gardens, and during this walk having turned over
the matter in my mind, determined that it behoved me to remove
my bride from such ill companionship, and wean her from the habit
of devouring dead bodies. With these thoughts I came back home at
dinner-time, when Aminah on seeing me return bade the servants
serve up the noontide-meal and we twain sat at table; but as before
she fell to picking up the rice grain by grain. Thereat said I to her, “O
my wife, it irketh me much to see thee picking up each grain of rice
like a hen. If this dish suit not thy taste see there are, by Allah’s
grace and the Almighty’s favour, all kinds of meats before us. Do
thou eat of that which pleaseth thee most; each day the table is
bespread with dishes of different kinds and if these please thee not,
thou hast only to order whatsoever food thy soul desireth. Yet I
would ask of thee one question: Is there no meat upon the table as
rich and toothsome as man’s flesh, that thou refusest every dish
they set before thee?” Ere I had finished speaking my wife became
assured that I was aware of her night adventure: she suddenly
waxed wroth with exceeding wrath, her face flushed red as fire, her
eyeballs started out from their sockets and she foamed at the mouth
with ungovernable fury. Seeing her in this mood I was terrified and
my sense and reason fled by reason of my affright; but presently in
the madness of her passion she took up a tasse of water which
stood beside her and dipping her fingers in the contents muttered
some words which I could not understand; then sprinkling some
drops over me, cried, “Accursed that thou art! for this thine
insolence and betrayal do thou be straightway turned into a dog.” At
once I became transmewed and she, picking up a staff began to
ribroast me right mercilessly and well-nigh killed me. I ran about
from room to room but she pursued me with the stick, and tunded
and belaboured me with might and main, till she was clean
exhausted. She then threw the street-door half open and, as I made
for it to save my life, attempted violently to close it, so as to squeeze
my soul out of my body; but I saw her design and baffled it, leaving
behind me, however, the tip of my tail; and piteously yelping hereat
I escaped further basting and thought myself lucky to get away from
her without broken bones. When I stood in the street still whining
and ailing, the dogs of the quarter seeing a stranger, at once came
rushing at me barking and biting;[13] and I with tail between my legs
tore along the market-place and ran into the shop of one who sold
sheeps’ and goats’ heads and trotters; and there crouching low hid
me in a dark corner.——And as the morn began to dawn Shahrazad
held her peace till

The end of the Sixth Hundred and Thirteenth


Night.
Then said she:——I have heard, O auspicious King, that Sidi
Nu’uman continued his story as follows:—The shopkeeper, despite
his scruples of conscience which caused him to hold all dogs impure,
[14]
had ruth upon my sorry plight and drove away the yelling and
grinning curs that would have followed me into his shop; and I,
escaping this danger of doom, passed all the night hid in my corner.
Early next morning the butcher sallied forth to buy his usual wares,
sheeps’ heads and hooves; and, coming back with a large supply, he
began to lay them out for sale within the shop when I, seeing that a
whole pack of dogs had gathered about the place attracted by the
smell of flesh, also joined them. The owner noticed me among the
ragged tykes and said to himself, “This dog hath tasted naught since
yesterday when it ran yelping hungrily and hid within my shop.” He
then threw me a fair sized piece of meat, but I refused it and went
up to him and wagged my tail to the end that he might know my
wish to stay with him and be protected by his stall: he, however,
thought that I had eaten my sufficiency, and, picking up a staff
frightened me and chased me away. So when I saw how the butcher
heeded not my case, I trotted off and wandering to and fro presently
came to a bakery and stood before the door wherethrough I espied
the baker at breakfast. Albeit I made no sign as though I wanted
aught of food, he threw me a bittock of bread; and I, in lieu of
snapping it up and greedily swallowing it, as is the fashion with all
dogs, the gentle and simple of them, approached him with it and
gazed in his face and wagged my tail by way of thanks. He was
pleased by this my well-bred behaviour and smiled at me; whereat I,
albeit not one whit anhungered, but merely to humour him, fell to
eating the bread, little by little slowly and leisurely, to testify my
respect. He was yet more satisfied with my manners and wished to
keep me in his shop; and I, noting his intent, sat by the door and
looked wistfully at him, whereby he knew that I desired naught of
him save his protection. He then caressed me and took charge of me
and kept me to guard his store, but I would not enter his house till
after he had led the way; he also showed me where to lie o’nights
and fed me well at every meal and entreated me right hospitably. I
likewise would watch his every movement and always lay down or
rose up even as he bade me; and whenas he left his lodging or
walked anywhither he took me with him. If ever when I lay asleep
he went outside and found me not, he would stand still in the street
and call to me crying, “Bakht! Bakht!”[15] an auspicious name he had
given to me; and straightway on hearing him I would rush about and
frisk before the door; and when he set out to taste the air I paced
beside him now running on ahead, now following at his heels and
ever and anon looking up in his face. Thus some time passed during
which I lived with him in all comfort; till one day of the days it so
chanced that a woman came to the bakery to buy her bread and
gave the owner several dirhams to its price, whereof one was bad
coin whilst the others were good. My master tested all the silvers
and, finding out the false bit, returned it demanding a true dirham in
exchange; but the woman wrangled and would not take it back and
swore that it was sound. Quoth the baker, “The dirham is beyond all
doubt a worthless: see yonder dog of mine, he is but a beast, yet
mark me he will tell thee whether it be true or false silver.” So he
called me by my name, “Bakht! Bakht!” whereat I sprang up and ran
towards him and he, throwing all the moneys upon the ground
before me, cried, “Here look these dirhams over and if there be a
false coin among them separate it from all the others.” I inspected
the silvers each by each and found the counterfeit: then, putting it
on one side and all the others on another, I placed my paw upon the
false silver and wagging what remained of my tail looked up at my
master’s face. The baker was delighted with my sagacity, and the
woman also, marvelling with excessive marvel at what had
happened, took back her bad dirham and paid another in exchange.
But when the buyer fared forth, my master called together his
neighbours and gossips and related to them this matter; so they
threw down on the ground before me coins both good and bad, in
order that they might test me and see with their own eyes an I were
as clever as my master had said I was. Many times in succession I
picked out the false coin from amongst the true and placed my paw
upon them without once failing; so all went away astounded and
related the case to each and every one they saw and thus the bruit
of me spread abroad throughout the city. That livelong day I spent in
testing dirhams fair and foul.——And as the morn began to dawn
Shahrazad held her peace till

The end of the Sixth Hundred and Fourteenth


Night.
Then said she:——I have heard, O auspicious King, that Sidi
Nu’uman continued his story saying:—From that day forwards the
baker honoured me yet more highly, and all his friends and familiars
laughed and said, “Forsooth thou hast in this dog a mighty good
Shroff.”[16] And some envied my master his luck in having me within
the shop, and tried ofttimes to entice me away, but the baker kept
me with him nor would he ever allow me to leave his side; for the
fame of me brought him a host of customers from every quarter of
the town, even the farthest. Not many days after there came
another woman to buy loaves at our shop and paid the baker six
dirhams whereof one was worthless. My master passed them over to
me for test and trial, and straightway I picked out the false one, and
placing paw thereon looked up in the woman’s face. Hereat she
waxed confused and confessed that it was miscoined and praised me
for that I had found it out; then, going forth the same woman made
signs to me that I should follow her unbeknown to the baker. Now I
had not ceased praying Allah that somehow He would restore me to
my human form and hoped that some good follower of the Almighty
would take note of this my sorry condition and vouchsafe me
succour. So as the woman turned several times and looked at me, I
was persuaded in my mind that she had knowledge of my case; I
therefore kept my eyes upon her; which seeing she came back ere
she had stepped many paces, and beckoned me to accompany her. I
understood her signal and sneaking out of the presence of the baker,
who was busy heating his oven, followed in her wake. Pleased
beyond all measure to see me obey her, she went straightway home
with me, and entering she locked the door and led me into a room
where sat a fair maid in embroidered dress whom I judged by her
favour to be the good woman’s daughter. The damsel was well
skilled in arts magical; so the mother said to her, “O my daughter,
here is a dog which telleth bad dirhams from good dirhams. When
first I heard the marvel I bethought me that the beastie must be a
man whom some base wretch and cruel-hearted had turned into a
dog. Methought that to-day I would see this animal and test it when
buying loaves at the booth of yonder baker and behold, it hath
acquitted itself after the fairest of fashions and hath stood the test
and trial. Look well, O my daughter, at this dog and see whether it
be indeed an animal or a man transformed into a beast by
gramarye.” The young lady, who had veiled her face,[17] hereupon
considered me attentively and presently cried, “O my mother, ’tis
even as thou sayest, and this I will prove to thee forthright.” Then
rising from her seat she took a basin of water and dipping hand
therein sprinkled some drops upon me saying, “An thou wert born a
dog then do thou abide a dog, but an thou wert born a man then, by
virtue of this water, resume thy human favour and figure.”
Immediately I was transformed from the shape of a dog to human
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookfinal.com

You might also like