Introducing Vala Programming 1st Edition Michael Lauer 2024 Scribd Download

Download as pdf or txt
Download as pdf or txt
You are on page 1of 62

Download the full version of the textbook now at textbookfull.

com

Introducing Vala Programming 1st Edition


Michael Lauer

https://textbookfull.com/product/introducing-vala-
programming-1st-edition-michael-lauer/

Explore and download more textbook at https://textbookfull.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

Introducing Vala Programming: A Language and Techniques to


Boost Productivity Michael Lauer

https://textbookfull.com/product/introducing-vala-programming-a-
language-and-techniques-to-boost-productivity-michael-lauer/

textbookfull.com

Introducing Vala Programming A Language and Techniques to


Boost Productivity 1st Edition Michael Lauer

https://textbookfull.com/product/introducing-vala-programming-a-
language-and-techniques-to-boost-productivity-1st-edition-michael-
lauer/
textbookfull.com

Introducing Erlang Getting Started in Functional


Programming Simon St. Laurent

https://textbookfull.com/product/introducing-erlang-getting-started-
in-functional-programming-simon-st-laurent/

textbookfull.com

Embracing Industry 4 0 Selected Articles from MUCET 2019


Mohd Azraai Mohd Razman

https://textbookfull.com/product/embracing-industry-4-0-selected-
articles-from-mucet-2019-mohd-azraai-mohd-razman/

textbookfull.com
Architecture Society and Ritual in Viking Age Scandinavia
Doors Dwellings and Domestic Space Marianne Hem Eriksen

https://textbookfull.com/product/architecture-society-and-ritual-in-
viking-age-scandinavia-doors-dwellings-and-domestic-space-marianne-
hem-eriksen/
textbookfull.com

How to Raise Chickens Everything You Need to Know Updated


Revised Third Edition Christine Heinrichs

https://textbookfull.com/product/how-to-raise-chickens-everything-you-
need-to-know-updated-revised-third-edition-christine-heinrichs/

textbookfull.com

The Possessive Investment in Whiteness How White People


Profit from Identity Politics George Lipsitz

https://textbookfull.com/product/the-possessive-investment-in-
whiteness-how-white-people-profit-from-identity-politics-george-
lipsitz/
textbookfull.com

Cognition 6th Edition Scott Sinnett

https://textbookfull.com/product/cognition-6th-edition-scott-sinnett/

textbookfull.com

Justice and natural resources an egalitarian theory First


Edition Armstrong

https://textbookfull.com/product/justice-and-natural-resources-an-
egalitarian-theory-first-edition-armstrong/

textbookfull.com
Easy Weekend Cooking: Delicious Weekend Recipes (2nd
Edition) Booksumo Press

https://textbookfull.com/product/easy-weekend-cooking-delicious-
weekend-recipes-2nd-edition-booksumo-press/

textbookfull.com
Michael Lauer

Introducing Vala Programming


A Language and Techniques to Boost Productivity
Michael Lauer
Neu-Isenburg, Hessen, Germany

Any source code or other supplementary material referenced by the


author in this book is available to readers on GitHub via the book’s
product page, located at www.​apress.​com/​9781484253793 . For more
detailed information, please visit http://​www.​apress.​com/​source-code
.

ISBN 978-1-4842-5379-3 e-ISBN 978-1-4842-5380-9


https://doi.org/10.1007/978-1-4842-5380-9

© Michael Lauer 2019

This work is subject to copyright. All rights are reserved by the


Publisher, whether the whole or part of the material is concerned,
specifically the rights of translation, reprinting, reuse of illustrations,
recitation, broadcasting, reproduction on microfilms or in any other
physical way, and transmission or information storage and retrieval,
electronic adaptation, computer software, or by similar or dissimilar
methodology now known or hereafter developed.

Trademarked names, logos, and images may appear in this book. Rather
than use a trademark symbol with every occurrence of a trademarked
name, logo, or image we use the names, logos, and images only in an
editorial fashion and to the benefit of the trademark owner, with no
intention of infringement of the trademark. The use in this publication
of trade names, trademarks, service marks, and similar terms, even if
they are not identified as such, is not to be taken as an expression of
opinion as to whether or not they are subject to proprietary rights.

While the advice and information in this book are believed to be true
and accurate at the date of publication, neither the authors nor the
editors nor the publisher can accept any legal responsibility for any
errors or omissions that may be made. The publisher makes no
warranty, express or implied, with respect to the material contained
herein.

Distributed to the book trade worldwide by Springer Science+Business


Media New York, 233 Spring Street, 6th Floor, New York, NY 10013.
Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-
[email protected], or visit www.springeronline.com. Apress Media,
LLC is a California LLC and the sole member (owner) is Springer
Science + Business Media Finance Inc (SSBM Finance Inc). SSBM
Finance Inc is a Delaware corporation.
For my wonderful family: Klothilde, Hans, Gaby, Sabine, and Lara-Marie.
Table of Contents
Chapter 1:​Introduction
Why Vala?​
A Brief Take on History
A Personal Note
Audience
Overview
Typographical Conventions
Source Code
Chapter 2:​Getting Started
Installing
FreeBSD
macOS
Windows
Verifying the Correct Installation
Hello World
Behind the Curtain
Hello Object-World
Hello GUI-World
Summary
Chapter 3:​Syntax and Semantics
Basic Rules
Files
Scopes
Identifiers
Namespaces
Variables
Constants
Enumerations
The Type System
Simple Types
Strings
Arrays
Multidimensional​Arrays
Structures
Classes
Interfaces
Delegates
Type Conversions
Operators
Unary
Binary
Ternary
Special Purpose Operators
Control Flow
Conditional Clauses
Loops
Calls
Methods
Named Methods
Anonymous Methods
Closures
Attributes
Memory Management
Parameter Passing
Reference Types vs.​Closures
Structured Error Handling
Method Contracts
Summary
Chapter 4:​Object-Oriented Programming
Concepts
Classes
Visibility
Inheritance
Construction
Destruction
Member Variables
Class Constants
Enumerations
Methods
Abstract Classes
Polymorphism
Signals
Properties
Interfaces
OOP and the Type System
Run-Time Type Information (RTTI)
Dynamic Type Casting
Generics
Classes vs.​Structures
Summary
Chapter 5:​Networking
Sockets
Sockets in posix.​vapi
Example:​NTP Client
JSON
Example:​JSON Parser
GIO
Example:​HTTP Client with GIO
libsoup
Example:​HTTP Client with libsoup
Summary
Chapter 6:​UI Programming with GTK+
Event-Driven Systems
GTK+
Example:​Streaming Radio Client
Overview
User Interface
Architecture
Summary
Chapter 7:​DBus
Introduction
Concepts
DBus in Vala
DBus Interface
Example:​DBus Server
Example:​DBus Client
Summary
Chapter 8:​Linux
Introduction
linux.​vapi
File Notification
Example:​inotifyWatcher
Summary
Chapter 9:​External Libraries
Bindings
Example:​Binding libxmp
Step 1
Step 2
Step 3
Step 4
Step 5
Example:​Binding a GObject-Based Library
Obtaining the GIR File
Generating the VAPI
Customizing the VAPI
Example:​Using libgusb
Summary
Afterword
Congratulations
Visit https://textbookfull.com
now to explore a rich
collection of eBooks, textbook
and enjoy exciting offers!
Contribute
Closing
Index
About the Author
Michael “Mickey” Lauer
is a freelance software architect and
author living in Neu-Isenburg, Germany.
He is a free-software-enthusiast who
enjoys solving problems with mobile and
distributed systems. Learn more on his
personal web site: www.vanille.de .
© Michael Lauer 2019
M. Lauer, Introducing Vala Programming
https://doi.org/10.1007/978-1-4842-5380-9_1

1. Introduction
Michael Lauer1

(1) Neu-Isenburg, Hessen, Germany

In the beginning, the Universe was created. This has made a lot of
people very angry and been widely regarded as a bad move.
—Douglas Adams, The Hitchhiker’s Guide to the Galaxy

This chapter explains why Vala is a good idea and how you could
benefit from a massively increased productivity, if you use it. It talks a
bit about the history of Vala and mentions the author’s personal
involvement. Structure, audience, and typographic conventions are
presented.

Why Vala?
Throughout the last decades, software development has been subject to
a gradual but significant shift in priorities. Whereas in former times the
run-time performance of a program was the most important aspect,
these days, the build-time performance —the time required to transfer a
problem description into a running program—is becoming more and
more relevant. The build-time performance not only depends on the
initial effort for writing a program but also includes the time required
for debugging and maintenance, which is usually significantly higher
compared to the initial writing.
The figure below shows some of the more common languages with
respect to their run-time and build-time efficiency.
Figure 1-1 Build-Time vs. Run-Time Efficiency
One of the main factors that play into the run-time and build-time
performance of a program written in a certain programming language
is the language’s level of abstraction . Low-level programming languages
support a direct mapping of instructions to machine code (the native
language to the CPU). This results in a speedy run-time performance
but generally requires a higher implementation effort. Examples for
languages with a low level of abstraction are C and Assembler, they
belong to the oldest programming languages.
The widespread use of computer programs in almost every aspect
of human life has lead to an increasing complexity of software systems.
In light of the rapid advances in processing power,1 this complexity can
be handled by creating higher levels of abstractions in programming
languages. High-level programming languages allow to formulate
algorithms in a more natural way, reducing the time to solve a problem
and making it easier to read, understand, debug, and maintain.
Considering that the programming costs are often a major factor when
creating a new software system, this allows for significant economic
advantages. Examples for languages with a high level of abstraction are
Python and Ruby—also called scripting languages or sometimes 4GLs
(fourth-generation languages).
A high level of abstraction comes with a more complex translation
of a program’s source code into machine code—instructions can no
longer be directly mapped, but even simple statements can lead to tens,
hundreds, or even thousands of generated machine code instructions.
Writing compilers for such languages is a complex task. A way to
simplify this is to use the interpreter concept, where a program no
longer gets directly translated into machine code but into an
intermediate representation,2 sometimes called bytecode, which then
gets executed by a special program—an interpreter or a virtual machine
(VM).
Compared to a “real” CPU, a virtual machine, such as the JAVA virtual
machine (JVM), provides an execution environment at a much higher
level—on the expense of a slower run-time and increased memory
requirements.3
This situation gets tightened with the vast success of today’s mobile
platforms, such as “smartphones,” “tablets,” or “smart home” gadgets
for the Internet of Things (IOT). In contrast to stationary systems,
mobile systems come with severe resource constraints. Battery
efficiency is very important. On the other hand though, any recent
(networked) GUI application contains an intrinsic level of complexity
that is best handled by employing a programming language with a
sufficiently high abstraction level.
For a programming language, run-time performance and build-time
performance are often conflicting demands. It is very hard to optimize
for both, so usually you have to decide on one.
The programming language Vala has been created to get the “best of
both worlds”: Vala combines the high-level build-time performance of
scripting languages with the run-time performance of low-level
programming languages.
Vala provides modern language features, such as
Object-oriented programming (OOP) with interfaces, (abstract)
classes, and polymorphism
Type inference
Structured exception handling
Lambda functions and closures
Asynchronous coroutines
Automatic memory handling based on reference counting and
ownership rules
Loose coupling with signals
Interfaces and delegates
Pre- and postconditions
And more
Vala implements these language features by relying on the glib
library created by the GNOME project. Thus, the availability of that
library on your chosen platform is a prerequisite for everything but the
most trivial Vala program.4
The syntax of Vala is inspired by C# and should look very familiar to
everyone with previous experience in any imperative language. While
Vala is not an interpreted language, it is not directly compiled into
machine code either. The Vala compiler generates an intermediate
representation, which, in this case, is ANSI-C.5
This has several advantages:
1. Vala uses the C compiler (these days usually gcc or clang), which
is a widespread and excellently maintained compiler available for
many platforms.

2. The generated C code can be shipped and compiled even on


systems where Vala itself might not be available.

3. Libraries written in Vala feature a C-API6 and can be used


everywhere where C libraries can be used.
4. C-Libraries are very easy to integrate in Vala.

Of course, there are also some disadvantages:


1. Compiling a Vala program invokes two compilers and hence takes
longer than compiling a program “directly” written in C.

2. When the generated C code—for whatever reason—cannot be


compiled, the developer will see a C compiler error which makes it
hard to track back to the incorrect part of the originating Vala
program.
3. Debugging Vala programs can sometimes be hard, if the debugger
lacks support for Vala and you have to step into the generated C
code.

While the first disadvantage is intrinsic to the current


implementation of Vala (and is unlikely to change any time soon), the
latter ones are more a matter of the immature state of the tooling—
hence are likely to become less relevant in the future.
Vala is completely free and open source. The compiler is available
under the GNU Lesser General Public License (LGPL) and supports the
most common operating systems, such as Linux, macOS, BSD, and
Windows. This license does not affect programs created with the Vala
compiler—for your own programs, you’re free to select any license that
fits your project.

A Brief Take on History


Vala was created in 2006 by the Swiss computer science students Jürg
Billeter and Raffaele Sandrini, who were rooted in the GNOME
community and dreamed of a higher level alternative for developing UI
applications in C. They did like the syntax and semantics of C# but did
not want to use Mono.7 After bootstrapping the initial project with C,
only one year later (with release 0.1.0 in July 2007), the Vala compiler
was self-hosted, that is, written in Vala itself.
In parallel to working on compiler stability and more language
features, enhancing the functionality using bindings to other C-based
libraries became an important task.
The period between 2008 and 2010 was most probably the “golden
years” for Vala. As more and more (GNOME) community projects
adopted Vala, it gained many users, some of them which also became
contributors to the language itself. Development was quick, and some
of the larger features, such as support for DBus, closures, and
asynchronous methods, were implemented.
This was the time when the word of Vala leaked outside of the
GNOME community and got attention by commercial vendors, who
recognized the immense potential for saving time and money when
writing Vala instead of C-based programs. Some of those vendors then
started funding the Vala project—most notably Nokia, who were using
Vala as part of their Maemo (later MeeGo) SDK for mobile devices.
In February 2011 though, Nokia and Microsoft jointly announced a
major business partnership between the two companies, which
eventually resulted in Nokia adopting Windows Phone as the primary
platform for its future smartphones, thus replacing both Symbian and
MeeGo. This led to Nokia cancelling most of the funding for GNOME
projects, including Vala. In subsequent events, Jü rg Billeter dropped out
as the lead developer, and over the next couple of years, Vala lost a lot of
traction.
For many months, the sole contributions happened in the bindings
to other libraries, whereas the core stayed pretty much unchanged. The
remaining Vala users got more and more annoyed about long-standing
unresolved issues, such as when non-compilable C code is generated for
a seemingly valid Vala program.
2015 was probably the worst year, as there were very little commits
to the Vala source repository and almost no traffic on the mailing list.
Many developers claimed that Vala was dead.
For some reason though, this changed in early 2016, when a small
group of people started to tackle unresolved issues with the strong goal
of releasing a stable version 1.0 in the “near” future. This in turn
motivated further developers to “come back” and help—and at the time
of writing this (August 2019), the commit ratio has reached a healthy
state again. Both the Vala contributors and users have regained faith
that the long-awaited 1.0 will eventually see the light of day.

A Personal Note
My first encounter with Vala was on the Linux-fair OpenExpo 2007 in
Zurich/Oerlikon, Switzerland, where I met its father Jü rg Billeter and
some of the first contributors. Having very recently worked on C and
GObject-based applications, I was immediately attracted by the
language’s syntax and goals and promised myself to use it as soon as
possible in one of my projects.
Three months later, I rewrote a graphical terminal emulator for the
Openmoko smartphone platform using Vala and was very satisfied with
how it turned out. Here’s an excerpt of my blog post (taken from here)
as of December 2007:
I just rewrote the openmoko-terminal2 application (a lightweight
terminal for the Openmoko environment using Vte) in Vala. [...]
In my opinion, Vala is nothing more and nothing less than the future of
application coding for the GNOME platform. Vala combines a nice high-
level syntax (modeled after C# and Java) using GObject as the object
model and compiles straight away to plain ’ole C. Yes, that means no
runtime libraries, no bloat, no performance drawbacks.
Vala removes the need of typing run time typecasts and endless
function names and adds compile-time type checking. This will boost
your coding-efficiency a lot. Vala has an enormous potential for the C-
dominated GNOME platform and I hope people will realize that and be
giving Vala a chance. [...]
After having gained a bit more experience with Vala, it became my
language of choice for the second reference implementation of the
freesmartphone.​org special interest middleware. Although its
development has stalled since 2011, it is still one of the largest projects
ever written in Vala. during its development, I contributed a lot to Vala,
in particular to asynchronous closures, DBus, and bindings to Posix and
Linux low-level system and networking facilities, since all of these were
strong requirements for the middleware I wrote.
Since I loved the language so much, I had the idea of spreading the
word by the means of publishing an introductory book on Vala in 2008
—more than ten years ago. Back then though I wanted to wait for “a
while” to synchronize the publishing with the release of Vala 1.0—
which I had expected for 2009 or 2010 at the latest. I really didn’t think
that it would take over a decade for this to happen, but I’m glad that
Vala is still “alive and kicking,” and given its ups and downs in the past
ten years, this book is more important than ever.

Audience
This book is for developers with basic programming experience,
preferably for those who already wrote programs using the GNOME
libraries—either in C or using higher level languages with bindings. It is
not an introduction into programming or algorithms.
Those coming from C#, Java, or Mono will feel right at home with
the syntax and hopefully fall in love with the run-time performance and
wide access to external libraries.
In principle though, anyone who is developing for Windows, macOS,
or Unix-like platforms and wants to increase his or her productivity
with Vala should find something useful in this book.

Overview
The remaining chapters are structured as follows:
Chapter 2 : Getting Started gets you from installing Vala to writing
the first example program.
Chapter 3 : Syntax and Semantics discusses the basic set of rules
for the Vala programming language.
Chapter 4 : Object-Oriented Programming shows how to write
interfaces and classes, and introduces the signal concept for the loose
binding of components.
Chapter 5 : Networking presents network communication using
Vala—from plain sockets to HTTP.
Chapter 6 : IPC with DBus details how to communicate with other
processes on your local machine.
Chapter 7 : UI with GTK+ concentrates on writing event-driven
applications with graphical user interfaces.
Chapter 8 : Linux Programming explains how to use Linux-specific
system APIs.
Chapter 9 : Bindings shows how to use external C code by writing
Vala bindings.

Typographical Conventions
The following typographical conventions are used in this book:
Italics introduces new terms.
Visit https://textbookfull.com
now to explore a rich
collection of eBooks, textbook
and enjoy exciting offers!
Constant width indicates a piece of code, a tool or library, or file
name.
Lines starting with a $ refer to a shell command-line prompt.
Longer code examples are often contained in constant width code
blocks such as

c# void doSomething() { // empty }

When presenting code snippets, they are usually prepended by the


rough idea and motivation for why the snippet is necessary and
followed by a detailed discussion of the individual statements.

Source Code
While it can be instructive to follow the presented snippets by typing
them into an editor, you can also just copy and paste the relevant bits or
refer to the repository accompanying this book. The source code
presented in this book is available via the Download Source Code
button located at www.apress.com/9781484253793 , or from
https://github.com/mickeyl/introduction-to-vala .

Footnotes
1 Moore’s law of doubling the transistor density in integrated circuits approximately
every two years has been valid for five decades. By now, physical boundaries make it
almost impossible for it to continue, which is why the development has shifted
toward massive parallelization instead of ever-growing clock rates.

2 Many compilers are using a similar scheme, e.g., gcc and clang are separated into
a frontend and a backend. The frontend is generating architecture independent code;
the platform-specific backend creates the resulting machine code.

3 Although just-in-time compilation (JIT) techniques can help here, the general
statement still holds.
4 In March 2018, the so-called “POSIX profile”—a way to create Vala programs that
do not depend on glib—has been reintroduced to Vala.

5 This may sound slightly familiar to the older ones among us: The first compiler for
the C++ programming language was called cfront and generated ANSI-C as well.
Objective-C did start its career as a frontend for C as well.

6 And also a C-ABI (Application Binary Interface), which may be even more important
for some use cases.

7 The major reasons for that likely being Mono’s reliance on a VM and its
nonexistent interoperability with arbitrary C-libraries.
© Michael Lauer 2019
M. Lauer, Introducing Vala Programming
https://doi.org/10.1007/978-1-4842-5380-9_2

2. Getting Started
Michael Lauer1

(1) Neu-Isenburg, Hessen, Germany

Thank you for making a simple door very happy.


—Douglas Adams, The Hitchhiker’s Guide to the Galaxy

In the sense of the tradition founded by Kernighan and Ritchie,1 we


start with the obligatory “Hello World” program—a minimal example
that not only provides a first look at the syntax but also discusses the
Vala way from the source code to the executable binary. We also take a
glance behind the curtain to see how Vala operates in the background
and translates your program into C.

Installing
Before being able to use Vala, you need to install it on your computer, of
course. The actual source for the Vala compiler depends on your
operating system. If you’re on a variant of BSD or a Linux distribution,
you will usually want to use the distribution’s package manager to
install Vala. Make sure that you have at least Vala version 0.46.0—which
is the current development version at the time of writing. Note that
there’s also a long term support branch (currently at version 0.40.x)
available, if you’re on a more conservative setup. If your installer does
not provide a suitable package, please head over to the Vala home page
to download the desired source package for manual compiling and
installing.
FreeBSD
On FreeBSD, Vala is available from FreshPorts. To install the port:

1 $ cd /usr/ports/lang/vala/ && make install


clean

To add the package:

1 $ pkg install vala

macOS
On macOS, you can use the Homebrew package manager to install Vala
using

1 $ brew install vala

Windows
On Windows, packages are provided by the MSYS2 project. Begin with
the MSYS2 installer and use pacman -S package to install the
required packages. Depending on the processor architecture (64-bit vs.
32-bit), there are different packages.
For 64-bit Windows, the package architecture is given as x86_64.
To install packages for 32-bit Windows, change x86_64 to i686.
To install Vala on 64-bit Windows:

1 $ pacman -S mingw-w64-x86_64-gcc
2 $ pacman -S mingw-w64-x86_64-pkg-config
3 $ pacman -S mingw-w64-x86_64-vala

Verifying the Correct Installation


To verify that you have a working Vala installation, please issue vala
on the command line. You should see a prompt similar to

1 $ vala
2 No source file specified.
Let’s write our first Vala program now.

Hello World
Launch your preferred text editor or IDE2 and type in the following
lines:

1 // helloWorld.vala
2
3 int main( string[] args )
4 {
5 stdout.printf( "Hello World!\n" );
6 return 0;
7 }

Save this in a file called helloWorld.vala , and then move over


to a command-line prompt to issue vala helloWorld.vala. If you
typed everything correctly, you should see

1 $ vala helloWorld.vala
2 Hello World!

Let’s briefly discuss this first program:

1 // helloWorld.vala

The double slash // introduces a one-line comment in Vala that


continues until the end of line. Another valid form for a comment is the
inline-comment, for example, /* inline comment */. This kind of
comment may span multiple lines.

1 int main( string[] args )

This starts a function definition. Functions in Vala can return at


most one value—in this case an int eger—and accept an arbitrary
number of parameters—in this case an array of strings. To denote an
array with unspecified length, you append square brackets [] after the
Random documents with unrelated
content Scribd suggests to you:
two lords were the greatest barons, and most renowned for their prowess
and other feats of arms.
CHAPTER XV.

King Edward’s First Expedition against the Scots.

W HEN the English king and all his host had seen the smoke of the fires
which the Scots had made, the alarm was immediately sounded, and
every one ordered to dislodge and to follow his banners: they all,
therefore, withdrew to the fields, armed for immediate combat. Three
battalions of infantry were formed; each battalion having two wings,
composed of five hundred men at arms, who were to remain on horseback.
It was said that there were eight thousand men at arms, knights and
esquires, and thirty thousand men armed and equipped, half of whom were
mounted on small hackneys: the other half were countrymen on foot, sent
by the towns and paid by them. There were also twenty-four thousand
archers on foot, besides all the crew of followers of the army. Thus being
drawn up, they marched in battle array after the Scots, towards the place
whence the smoke came, until it was night. The army halted in a wood, by
the side of a small river, to rest themselves, and to wait for their baggage
and provisions.
And all that day the Scots had burnt and wasted and pillaged the country
about within five miles of the English host, but the Englishmen could not
overtake them. They could not approach near to the Scots, who went
wasting the country before them.
At daybreak the next morning every one was armed, and with banners
displayed marched in good order over mountains and through valleys, but
could never approach the Scots; for there were so many marshes and
dangerous places, that it was ordered, under pain of death, that no one
should quit his banner except the marshals. When it drew toward night, the
cavalry, and those who attended the baggage, more especially the infantry,
were so fatigued that they could march no farther.
The king then ordered the marshals to encamp the army there for the
night, in order that they might consider what was to be done the next day.
The army lay in a wood upon the banks of a small river, and the king was
lodged in a poor monastery hard by. When each had chosen a spot of
ground to encamp himself on, the lords retired apart, to consider what
would be the best method to force the Scots, considering the situation of the
country in which they were. It appeared to them that the Scots were
sheering off to their own country, burning and pillaging as they went, and
that it would be impossible to fight with them in these mountains without a
manifest disadvantage, supposing they should overtake them, which they
could not; but, as they must repass the Tyne, it was determined in full
council, that, if they were to get themselves ready about midnight, and
hasten their march next day, they might cut off the passage of the river, and
force them to fight at a disadvantage, or remain shut up prisoners in
England.
After this resolution had been entered into, each retired to his quarters, to
eat and drink what he could find there; and they desired their companions to
be silent, in order that the trumpets might be heard: at the first sounding of
which, the horses were to be saddled and made ready; at the second, every
one was to arm himself without delay; and, at the third, to mount their
horses immediately, and join their banners. Each was to take only one loaf
of bread with him, slung behind him, after the manner of hunters. All
unnecessary arms, harness, and baggage were ordered to be left behind, as
they thought they should, for a certainty, give battle the next day, whatever
might be the consequences. As it had been ordered, so was it executed; and
all were mounted and ready about midnight. Some had but little rest,
notwithstanding they had labored hard the day before. Day began to appear,
as the battalions were assembled at their different posts. The banner-bearers
then hastened on, over heaths, mountains, valleys, rocks, and many
dangerous places, without meeting any level country. On the summits of the
mountains, and in the valleys, were large marshes and bogs, and of such
extent that it is a miracle many were not lost in them; for each galloped
forward without waiting for either commander or companion. Those who
fell into them found difficulty in getting any one to help them. Many
banners remained there; and several baggage and sumpter horses never
came out again.
In the course of the day there were frequent cries of alarm, as if the
foremost ranks were engaged with the enemy; which those behind believing
to be true, they hurried forward as fast as possible, over rocks and
mountains, sword in hand, with their helmets and shields prepared for
fighting, without waiting for father, brother, or friend. When they had
hastened about half a league toward the place from which the noise came,
they found themselves disappointed, as the cries proceeded from some
herds of deer or other wild beasts, which abounded in these heaths and
desert places, and which fled before the banners, pursued by the shouts of
the army, which made them imagine it was something else.
In this manner the young King of England, agreeably to the advice of his
council, rode all that day over mountains and deserts, without keeping to
any fixed road, or finding any town. About vespers, and sorely fatigued,
they reached the Tyne, which the Scots had already crossed, though the
English supposed they had it still to repass. Accordingly they went over the
ford, but with great difficulty, owing to the large stones that were in the
river.
When they had passed over, each took up his lodging on its banks, as he
could; and at this time the sun was set. There were few among them that
had any hatchets, wedges, or other instruments, to cut down trees to make
themselves huts; many of them had lost their companions, and even the foot
had remained behind, not knowing what road to ask for. They were forced
to lie this night on the banks of the river in their armor, and at the same time
hold their horses by their bridles, for there was not any place where they
could tie them. Thus the horses had nothing to eat, neither oats nor any
forage; and the men had only their loaf that was tied behind them, which
was wetted by the sweat of the horses. They had no other beverage but the
water of the river, except some great lords who had bottles among their
baggage; nor had they any fire or light, not having any thing to make them
of, except some few lords who had some torches which they had brought on
sumpter-horses. In such a melancholy manner did they pass the night,
without taking the saddles from off the horses, or disarming themselves.
And when the long-expected day appeared, when they hoped to find some
comfort for themselves and horses, or to fight the Scots, which they very
much wished for, to get out of their disagreeable situation, it began to rain,
and continued all the day, insomuch that the river was so increased by noon
that no one could pass over, nor could any one be sent to know where they
were, or to get forage and litter for their horses, or bread and wine for their
own sustenance: they were therefore obliged to fast another night. The
horses had nothing to subsist on but the leaves of the trees, and grass. They
cut down with their swords young trees, and tied their horses to them. They
also cut down brushwood to make huts for themselves.
Having continued a whole week without hearing any tidings of the
Scots, who they imagined must pass that way, or very near it, on their return
home, great murmurs arose in the army; and many laid the fault on those
who had given such advice, adding that it was done in order to betray the
king and his host. Upon which, the lords of council ordered the army to
make ready to march, and cross the river seven leagues higher up, where the
ford was better; and it was proclaimed, that every one was to be in readiness
to march the next day, and to follow his banners. There was another
proclamation made, that whoever chose to take pains and find out where the
Scots were, and should bring certain intelligence of it to the king, the
messenger of such news should have one hundred pounds a year in land,
and be made a knight by the king himself. When this was made known
among the host, many knights and esquires, to the number of fifteen or
sixteen, eager to gain such rewards, passed the river with much danger,
ascended the mountains, and then separated, each taking different routes.
The next day the army dislodged; marched tolerably well, considering
that they were but ill clothed; and exerted themselves so much, that they
repassed the river, though with much danger from its being swollen by the
rains. Many were well washed, and many drowned. When they had crossed
over, they remained there for that night, finding plenty of forage in the
fields near to a small village, which the Scots had burnt as they passed. The
next day they marched over hill and dale till about noon, when they came to
some burnt villages, and some fields where there were corn and hay, so that
the host remained there for that night. The third day they marched in the
same manner; but many were ignorant where they were going, nor had they
any intelligence of the enemy.
They continued their route the fourth day in this order; when, about three
o’clock, an esquire, galloping up hastily to the king, said, “Sire, I bring you
news of the Scots: they are three leagues from this place, lodged on a
mountain, where they have been this week, waiting for you. They knew no
more where you were than you did of them: and you may depend on this as
true; for I approached so near to them, that I was taken, and led a prisoner
to their army, before their chiefs. I informed them where you were, and that
you were seeking them to give them battle. The lords gave me up my
ransom, and my liberty, when I informed them that you had promised a
hundred pounds a year to whoever should first bring intelligence of them,
upon condition that he rested not until he brought you this information; and
I now tell you that you will find them in the place I have mentioned, as
eager to meet you in battle as yourself can be.” As soon as the king heard
this news he ordered his army to be prepared, and turned his horses to feed
in the fields, near to a monastery of white monks, which had been burnt,
and which was called in King Arthur’s time Blanche Land. Then the king
confessed himself, and each made his preparations according to his
abilities. The king ordered plenty of masses to be said, to housel such as
were devoutly inclined. He assigned a hundred pounds’ value of land,
yearly, to the esquire, according to his promise, and made him a knight with
his own hands, in the presence of the whole army. When they had taken
some repose, and breakfasted, the trumpets sounded; and, all being
mounted, the banners advanced as the young knight led them on; but each
battalion marched by itself in regular array, over hill and dale, keeping their
ranks according to order. Thus they continued marching, when about twelve
o’clock they came within sight of the Scots army.
As soon as the Scots perceived them, they issued forth from their huts on
foot, and formed three good battalions upon the descent of the mountain on
which they lodged. A strong, rapid river ran at the foot of this mountain,
which was so full of large rocks and stones, that it was dangerous to pass it
in haste. If the English had passed this river, there was not room between it
and the mountain for them to draw up their line of battle. The Scots had
formed their two first battalions on the two sides of the mountain, and on
the declivity of the rock, which was not easy to climb to attack them: but
they themselves were posted so as to annoy them with stones, if they
crossed the river; which, if the English effected, they would not be able to
return.
When the English lords perceived the disposition of the Scots, they
ordered their men to dismount, take off their spurs, and form three
battalions as before. Many new knights were made; and, when the
battalions were formed, some of the chief lords brought the young king on
horseback along the lines, to encourage the men. The king spoke most
graciously to all, and besought them to take every pains to do him honor
and preserve their own. He ordered, under pain of death, that no one should
advance before the banners of the marshals, or move without orders.
Shortly afterwards the battalions were commanded to advance toward the
enemy in slow time, keeping their ranks. This was done; and each battalion
moved on a considerable space, and came to the ascent of the mountain
where the Scots were posted. This manœuvre was intended in order to see
whether the enemy would retire, or make any movement; but neither one
nor other was to be perceived, and the armies were so near each other that
they could see the arms on their fields. The army was ordered to halt to
consider what was to be done; and some companions were mounted to
skirmish with the enemy, and to examine the passage of the river and their
appearance more clearly. They sent heralds to make an offer of retiring on
the morrow, if they would pass the river, and fight upon the plain; or, if the
Scots would not consent to this, that they would do the same.
When the Scots received this proposal, the chiefs retired to counsel, and
returned for answer by the heralds, that they would do neither the one nor
the other; that the king and his barons saw that they were in his kingdom,
and had burnt and pillaged wherever they had passed; and that, if it
displeased the king, he might come and amend it, for they would tarry there
as long as it pleased them. When the council of the King of England heard
the answer, he ordered it to be proclaimed, that each should take up his
quarters where he was, without quitting the ground or his arms: they
therefore lay that night very uncomfortably upon the hard ground, among
rocks and stones, with their armor on, nor could they get any stakes for the
purpose of tying their horses, or procure either litter, or forage, or any
bushes to make fires.
The Scots, seeing the English thus take up their quarters, ordered part of
the army to remain where the battalions had been drawn up; and the
remainder retired to their huts, where they made marvellously great fires,
and about midnight such a blasting and noise with their horns, that it
seemed as if all the great devils from hell had been come there. Thus were
they lodged this night, which was the night of the feast of St. Peter, the
beginning of August, 1327, until the next day, when the lords heard mass;
afterwards every one armed himself, and the battalions were formed as on
the preceding day. When the Scots saw this, they came and lodged
themselves on the same ground they had done before; and the two armies
remained thus drawn up until noon, when the Scots made no movement to
come toward the English, nor did these on their part make any advances, for
they dared not to attempt it with so great disadvantage. Several companions
passed the river on horseback, as did some of the foot, to skirmish with the
Scots, who also quitted their battalions to meet them; and many on each
side were killed, wounded, and taken prisoners. In the afternoon the lords
ordered every one to retire to their quarters, as it seemed to them that they
were drawn up to no purpose. In this manner they remained for three days.
The Scots, on their side, never quitted the mountain; but there were
continued skirmishes on both sides, and many killed and taken prisoners. In
the evenings they made large fires, and great noises with their horns and
with shouting. The intention of the English lords was to keep the Scots
besieged there; for, as they could not well fight with them, they hoped to
starve them. They knew from the prisoners that they had neither bread,
wine, salt, nor other provision, except cattle, of which they had plenty, that
they had seized in the country: of these they might eat, indeed, without
bread, which would not be very palatable. But they had some little flour to
make such cakes as have been before mentioned, and which some of the
English use on their inroads beyond the borders.
The fourth day, in the morning, the English looked for the Scots on the
mountain, but saw none of them, for they found they had decamped secretly
at midnight. Scouts of horse and of foot were immediately despatched
through the mountains to know what was become of them. They found
them, about four o’clock, posted upon another mountain, much stronger
than that they had left, upon the same river, near a large wood, to be more
concealed, and in order more privately to advance or retreat at pleasure.
As soon as this was known, the English had orders to dislodge, and to
march in battle array toward the place where the enemy was posted; and
they encamped on a mountain opposite. They formed their battalions, and
seemed as if they meant to advance to them. The Scots no sooner perceived
this, than they sallied out of their quarters, and came and posted themselves
by the side of the river, directly in front; but they were unwilling to advance
or come nearer. The English could not attack them in such a situation
without great disadvantage and loss. They remained full eighteen days in
this situation upon this mountain, whence the lords sent frequent heralds to
the Scots, to offer to give them full place of plain ground to draw up their
battalions, or else they would accept the same from them; but they would
not agree to either of these proposals.
The two armies had little comfort during the time they remained in this
position. The first night that the English were posted on this second
mountain, the Lord James Douglas took with him about two hundred men at
arms, and at midnight crossed the river, at such a distance from the camp
that he was not noticed, and fell upon the English army most valiantly,
shouting, “Douglas forever! Ye shall die, ye thieves of England!” He and
his companions killed more than three hundred; and he galloped up to the
king’s tent, and cut two or three of its cords, crying, at the same time,
“Douglas! Douglas forever!” when he set off; and in his retreat he lost some
of his followers, but not many: he returned to his friends on the mountain.
Nothing more of the sort was attempted from that time; but the English in
future kept a strong and attentive guard, for they were fearful of another
attack from the Scots, and had placed sentinels and scouts to give notice of
the smallest movement of the enemy; the chief lords also slept in their
armor. There were frequent skirmishes, and many lives lost on both sides.
The twenty-fourth day from the time they had received intelligence of the
enemy, a Scots knight was taken prisoner, who, sore against his will, gave
an account to the lords of the state of the enemy. He was so closely
examined, that he owned his lords had given orders that morning for every
one to be armed by vespers, and follow the banner of Lord James Douglas;
that it was to be kept secret; but he was not for a certainty acquainted with
their intentions further. Upon this the English lords held a council; and they
judged, from the information of the Scots knight, that the enemy might
perhaps come in full force at night to attack them on both sides at once, and
from their sufferings by famine, which they could endure no longer, make it
a very bloody and doubtful combat. The English formed into three
battalions, and posted themselves before their quarters, on three separate
spots of ground. They made large fires, in order to see better, and left their
pages in their quarters to take care of their horses. They remained under
arms all the night, and each was placed under his own standard or banner.
Toward daybreak two Scots trumpeters fell in with one of the patrols,
who took them, and brought them before the lords of the council, to whom
they said, “My lords, why do you watch here? You are losing your time; for
we swear, by our heads, that the Scots are on their march home since
midnight, and are now four or five leagues off, and they left us behind, that
we might give you the information.” The English said that it would be in
vain to follow them, as they could never overtake them; but, fearing deceit,
the lords ordered the trumpeters to close confinement, and did not alter the
position of the battalions until four o’clock. When they saw that the Scots
were really gone, they gave permission for each to retire to his quarters, and
the lords held a council to consider what was to be done. Some of the
English, however, mounted their horses, passed the river, and went to the
mountain which the Scots had quitted, and found more than five hundred
large cattle, which the enemy had killed, as they were too heavy to carry
with them, and too slow to follow them, and they wished not to let them fall
into the hands of the English alive. They found there, also, more than three
hundred caldrons, made of leather with the hair on the outside, which were
hung on the fires full of water and meat, ready for boiling. There were also
upward of a thousand spits with meat on them, prepared for roasting; and
more than ten thousand pairs of old worn-out shoes, made of undressed
leather, which the Scots had left there. There were found five poor English
prisoners, whom the Scots had bound naked to the trees, and some of them
had their legs broken. They untied them, and sent them away, and then
returned to the army, just as they were setting out on their march to
England, by orders from the king and council.
They followed all that day the banners of the marshals, and halted at an
early hour in a beautiful meadow, where there was plenty of forage for their
horses; and much need was there of it, for they were so weakened by
famine, that they could scarce move. The next day they decamped betimes,
and took up their quarters still earlier, at a large monastery within two
leagues of Durham. The king lay there that night, and the army in the fields
around it, where they found plenty of grass, pulse, and corn. They remained
there quiet the next day; but the king and lords went to see the church of
Durham. The king paid his homage to the church and the bishopric, which
he had not before done, and gave largesses to the citizens.
They found there all their carriages and baggage, which they had left in a
wood thirty-two days before at midnight, as has been related. The
inhabitants of Durham, finding them there, had brought them away at their
own cost, and placed them in empty barns. Each carriage had a little flag
attached to it, that it might be known. The lords were much pleased at
finding them again.
The king and nobles reposed two days at Durham, and the army in its
environs, for there would not have been sufficient room to lodge them in
that city. They had all their horses well shod, and set out on their march
toward York. They made such haste, that in three days they arrived there,
and found the queen mother, who received the king and nobles with great
joy, as did all the ladies of the court and city. The king disbanded the army,
and gave permission for every one to return to his home, and made many
acknowledgments to the earls, barons, and knights for the services they had
rendered him by their advice and prowess. The knights made out their
accounts for horses which had been ruined or lost, or had died, and gave
them in to the council; and also a statement of their own expenses, which
Sir John de Hainault took upon him as his own debt toward his followers,
for the king and his ministers could not immediately collect such a sum as
their horses amounted to; but he gave them sufficient for their own
expenses, and to carry them back to their own country.
When the Hainaulters had received their demand for horses, they
purchased small hackneys to ride more at their ease, and sent their
carriages, sumpter-horses, trunks, and servants on board of two ships, which
the king had provided for them, and which landed them at Sluys, in
Flanders. They took leave of the king, queen, the earls of Kent and
Lancaster, and of all the barons, who paid them many honors; and the king
had them escorted by twelve knights and two hundred men at arms, for fear
of the archers, of whom they were not well assured, as they must pass
through the bishopric of Lincoln. Sir John and all his company set out,
escorted as above, and by easy journeys came to Dover, where they
embarked on board vessels ready provided for them. The Hainaulters
arrived at Wissan, where they tarried two days in order to deck out their
horses and the remains of their armor; during which time Sir John de
Hainault and some other knights went on a pilgrimage to Our Lady of
Boulogne. They returned together to Hainault, when they separated, and
each went to his own house: but Sir John went to his brother, who was at
that time at Valenciennes; he was received by him with great joy, as he was
much beloved by him. The Lord of Beaumont then related to him all the
above-mentioned history.
CHAPTER XVI.

King Edward marries the Lady Philippa of Hainault.

S HORTLY afterwards, the king, queen, the Earl of Kent, his uncle, Earl
Henry of Lancaster, the Earl of Mortimer, and all the barons who were
of the council, sent a bishop, two knights bannerets, and two able clerks,
to Sir John de Hainault, to beg of him to be the means that the young king,
their lord, should marry; and that the Count of Hainault and Holland would
send over one of his daughters, for he would love her more dearly, on his
account, than any other lady. The count said he gave many thanks to the
king, queen, and the lords by whose counsel they were sent thither to do
him so much honor; and that he most willingly complied with their request,
if the pope and the holy Church of Rome would agree.
They immediately despatched two of the knights and the clerks to the
pope at Avignon, to entreat his consent; for without the pope’s dispensation
it could not be done, on account of their near relationship; being in the third
degree connected, for their two mothers were cousins-german, being the
children of two brothers. As soon as they came to Avignon their business
was done, for the pope and the college gave their consent most benignantly.
When these gentlemen were returned to Valenciennes from Avignon,
with all their bulls, this marriage was directly settled and consented to on
each side; and immediate preparations were made for the dress and
equipage of such a lady, who was to be Queen of England.
She was then married, by virtue of a procuration which the King of
England had sent thither, and went on board a ship at Wissan, and landed at
Dover with all her suite. Her uncle, Sir John de Hainault, conducted her to
London, where she was crowned; and there were great crowds of the
nobility, and feastings, tournaments, and sumptuous entertainments every
day, which lasted for three weeks.
CHAPTER XVII.

Douglas is killed fighting for the Heart of King Robert.

A FTER the Scots had in the night quitted the mountain where the young
King Edward and the nobles of England had held them besieged, as
you have before heard, they marched twenty-two miles without halting,
and crossed the Tyne pretty near to Carlisle, where by the orders of the
chiefs all disbanded and went to their own homes. Shortly afterwards some
of the lords and barons so earnestly solicited the King of England, that a
truce was agreed on between the two kings for three years.
During this truce it happened that King Robert of Scotland, who had
been a very valiant knight, waxed old, and was attacked with so severe an
illness that he saw his end was approaching: he therefore summoned
together all the chiefs and barons in whom he most confided, and, after
having told them that he should never get the better of this sickness, he
commanded them upon their honor and loyalty to keep faithfully the
kingdom for his son David, to crown him king when he was of a proper age,
and to marry him with a lady suitable to his station.
He after that called to him the gallant Lord James Douglas, and said to
him, in presence of the others,—
“My dear friend Lord James Douglas, you know that I have had much to
do, and have suffered many troubles, to support the rights of my crown. At
the time that I was most occupied I made a vow, the non-accomplishment of
which gives me much uneasiness: I vowed, that, if I could finish my wars in
such a manner that I might have quiet to govern peaceably, I would go and
make war against the enemies of our Lord Jesus Christ. To this point my
heart has always leaned; but our Lord gave me so much to do in my
lifetime, and this last expedition has delayed me so long, followed by this
heavy sickness, that, since my body cannot accomplish what my heart
wishes, I will send my heart in the stead of my body to accomplish my vow.
“I will that as soon as I shall be dead you take my heart from my body,
and have it well embalmed; you will also take as much money from my
treasury as will appear to you sufficient to perform your journey, as well as
for all those whom you may choose to take with you in your train: you will
then deposit your charge at the Holy Sepulchre of our Lord, where he was
buried, since my body cannot go there. You will not be sparing of expense;
and, wherever you pass, you will let it be known that you bear the heart of
King Robert of Scotland, which you are carrying beyond seas by his
command, since his body cannot go thither.”
All those present began bewailing bitterly; and, when the Lord James
could speak, he said, “Gallant and noble king, I return you a hundred
thousand thanks for the high honor you do me, and for the valuable and
dear treasure with which you intrust me; and I will most willingly do all
that you command me, with the utmost loyalty in my power. Never doubt it,
however I may feel unworthy of such a high distinction.”
The king replied, “Gallant knight, I thank you. You promise it me, then?”
“Certainly, sir; most willingly,” answered the knight. He then gave his
promise upon his knighthood.
The king said, “Thanks be to God! For I shall now die in peace, since I
know that the most valiant and accomplished knight of my kingdom will
perform that for me which I am unable to do for myself.”
Soon afterwards the valiant Robert Bruce, King of Scotland, departed
this life. His heart was embalmed, and his body buried in the monastery of
Dunfermline.
Early in the spring the Lord James Douglas, having made provision of
every thing that was proper for his expedition, embarked at the port of
Montrose, and sailed directly for Sluys in Flanders, in order to learn if any
one were going beyond the sea to Jerusalem, that he might join companies.
He remained there twelve days, and would not set his foot on shore, but
staid the whole time on board, where he kept a magnificent table, with
music of trumpets and drums, as if he had been the King of Scotland. His
company consisted of one knight banneret, and seven others, of the most
valiant knights of Scotland, without counting the rest of his household. His
plate was of gold and silver, consisting of pots, basins, porringers, cups,
bottles, barrels, and other such things. He had likewise twenty-six young
and gallant esquires of the best families in Scotland to wait on him; and all
those who came to visit him were handsomely served with two sorts of
wine, and two sorts of spices,—I mean those of a certain rank. At last, after
staying at Sluys twelve days, he heard that Alphonso, King of Spain, was
waging war against the Saracen King of Grenada. He considered that, if he
should go thither, he should employ his time and journey according to the
late king’s wishes; and, when he should have finished there, he would
proceed farther, to complete that with which he was charged. He made sail
therefore toward Spain, and landed first at Valencia; thence he went straight
to the King of Spain, who was with his army on the frontiers, very near the
Saracen King of Grenada.
Lord James Douglas throwing the Heart of Bruce among the
Saracens.
It happened, soon after the arrival of the Lord James Douglas, that the
King of Spain issued forth into the fields, to make his approaches nearer the
enemy: the King of Grenada did the same, and each king could easily
distinguish the other’s banners; and they both began to set their armies in
array. The Lord James placed himself and his company on one side, to
make better work and a more powerful effort. When he perceived that the
battalions on each side were fully arranged, and that of the King of Spain in
motion, he imagined they were about to begin the onset; and, as he always
wished to be among the first rather than last on such occasions, he and all
his company struck their spurs into their horses, until they were in the midst
of the King of Grenada’s battalion, and made a furious attack on the
Saracens. He thought that he should be supported by the Spaniards; but in
this he was mistaken, for not one that day followed his example. The gallant
knight and all his companions were surrounded by the enemy: they
performed prodigies of valor, but these were of no avail, as they were all
killed.[3] It was a great misfortune that they were not assisted by the
Spaniards.
About this time many of the nobles and others, desirous of a settled
peace between the Scots and English, proposed a marriage between the
young King of Scotland and the sister of the King of England. This
marriage was concluded and solemnized at Berwick, with great feasts and
rejoicings on both sides.
CHAPTER XVIII.

Philip of Valois crowned King of France.

C HARLES, King of France, died without heirs male. The twelve peers
and barons of France assembled at Paris without delay, and gave the
kingdom with one consent to Philip of Valois. They passed by the
Queen of England, and the king her son, although she was cousin-german to
the king last deceased; for they said that the kingdom of France was of such
great nobleness that it ought not to fall by succession to a female. They
crowned the Lord Philip King of France, at Rheims, the Trinity Sunday
following.
CHAPTER XIX.
King Edward is advised by his Council to make War against King
Philip of France. He effects great Alliances in Germany, and is made
Vicar of the Empire.
The Lord Robert d’Artois[4] was in England very near the king’s person,
whom he was continually advising to make war upon the King of France,
for wrongfully withholding his inheritance. The king saw clearly that it was
impossible for him, and all the force he could bring from his own country,
to subdue such a great kingdom as that of France, if he did not obtain
powerful friends and assistance in the empire, and in other parts, by means
of his money.
The King of England, when the winter was over, embarked,
accompanied by many earls, barons, and knights, and came to the city of
Antwerp, which at that time was held for the Duke of Brabant. He sent to
the Duke of Brabant, his cousin, his brother-in-law the Duke of Gueldres, to
the Marquis of Juliers, the Lord John of Hainault, and to all those from
whom he expected support and assistance, that he should be happy to have
some conversation with them.
When all the lords of the empire were assembled in the city of Halle,
they had long deliberations together, and said to the King of England, “Dear
sir, there is an ordinance of a very old date, sealed, that no king of France
should take and keep possession of any thing that belongs to the empire.
Now, King Philip has gotten possession of the castles of Crevecœur in
Cambresis, and of Arleux in Artois, as well as the city of Cambray; for
which the emperor has good grounds to challenge him through us,—if you
will have the goodness to obtain his consent, in order to save our honor.”
The King of England replied that he would cheerfully conform himself to
their advice.
It was then determined that the Marquis of Juliers should go to the
emperor, and with him knights and counsellors from the king, and some
from the Duke of Gueldres; but the Duke of Brabant would not send any: he
lent, however, his castle of Louvain to the king for his residence.
The Marquis of Juliers and his company returned from the emperor
about All Saints’ Day; and, when he sent to inform the king of this, he
congratulated him on the good success of his mission. The king wrote him
for answer that he should come to him on the feast of St. Martin, and
demanded of the Duke of Brabant to name the place where he wished this
conference to be holden; who replied, at Arques, near to his own country.
Upon this the king gave notice of it, that all his allies might be there.
The town-hall of Arques was hung with rich and fine cloths, like to the
presence-chamber of the king. His Majesty was seated five feet higher than
the rest of the company, and had on his head a rich crown of gold. The
letters from the emperor to the king were publicly read, by which the King
of England was constituted and established his vicar and lieutenant, and full
powers granted to him to do all the acts of law and justice to every one, in
his name, and also to coin money in gold and silver.
On this occasion an ancient statute was renewed and confirmed, which
had been made in former times at the court of the emperor. It directed that
any one meaning to hurt or annoy another should send him a sufficient
defiance three days before he committed any hostile act; and that whoever
should act otherwise should be degraded as an evil-doer. When all this was
completed, the lords took their leave, and gave each other their mutual
promises to be fully equipped, without delay, three weeks after the feast of
St. John, to sit down before the city of Cambray; which of right belonged to
the emperor, but had turned to the French.
CHAPTER XX.

King Edward and his Allies send Challenges to the King of France.

W INTER was now over, and the summer come, when, the feast of St.
John the Baptist approaching, the lords of England and Germany
made preparations for undertaking their intended expedition. The
King of France also made his preparations to meet them; for he was well
acquainted with part of what they intended, though he had not yet received
any challenge. King Edward collected his stores in England, where he made
his armaments ready; and, as soon as St. John’s Day was passed,
transported them across the sea to Vilvorde, whither he went himself. He
made all his people, on their arrival, take houses in the town; and, when this
was full, he lodged them in tents and pavilions in the fine meadows along
the side of the river. He remained thus from Magdalen Day until the feast of
Our Lady in September, expecting week after week the arrival of the lords
of the empire, especially the Duke of Brabant, for whom all the others were
waiting. When the King of England saw that they came not, he caused them
to be summoned to be at the city of Mechlin on St. Giles’s Day, according
to their promises, and give reasons for their delays.
The lords of Germany, in obedience to the summons, came to Mechlin,
where, after many debates, they agreed that the king should be enabled to
march in a fortnight, when they would be quite ready; and, that their cause
might have a better appearance, they determined to send challenges to King
Philip. These challenges were written and sealed by all except the Duke
John of Brabant, who said he would do his part at the proper time and place.
They were given in charge to the Bishop of Lincoln, who carried them to
Paris, and performed his errand so justly and well that he was blamed by no
one. He had a passport granted him to return to his lord, who, as said
before, was at Mechlin.
CHAPTER XXI.

King Edward creates Sir Henry of Flanders a Knight, and


afterwards marches into Picardy.

A S soon as the King of England had passed the Scheld, and had entered
the kingdom of France, he called to him the Lord Henry of Flanders,
who was but a young esquire, and knighted him; at the same time
giving him two hundred pounds sterling a year, properly secured in
England. The king was lodged in the abbey of Mont St. Martin, where he
remained two days. His troops were scattered round about in the country.
The Duke of Brabant was quartered at the monastery of Vaucelles. When
the King of France, who was at Compiègne, heard this news, he increased
his forces everywhere, and sent the Earl of Eu and Guines, his constable,
with a large body of men at arms, to St. Quentin, to guard that town and the
frontiers against his enemies. He sent the Lords of Coucy and of Ham to
their castles, and a great number of men at arms to Guise, Ribemont,
Bouchain, and the neighboring fortresses on the borders of his kingdom;
and came himself to Peronne, in the Vermandois. During the time the King
of England was at the abbey of Mont St. Martin, his people overran the
country as far as Bapaume, and very near to Peronne and St. Quentin: they
found it rich and plentiful, for there had not been any wars in those parts.
Sir Henry of Flanders, to do credit to his newly acquired knighthood,
and to obtain honor, made one of a party of knights, who were conducted by
Sir John de Hainault. There were among them the Lords of Fauquemont,
Bergues, Vaudresen, Lens, and many others, to the number of five hundred
combatants. They had a design upon a town in the neighborhood, called
Hennecourt, whither the greater number of the inhabitants of the country
had retired, who, confiding in the strength of this fortress, had carried with
them all their movables. Sir Arnold of Bacqueghen and Sir William du
Dunor had already been there, but had done nothing; upon which all these
lords had collected together, and were desirous of going thither to do their
utmost to conquer it. There was an abbot at that time in Hennecourt, of
great courage and understanding, who ordered barriers to be made of
woodwork around the town, and likewise to be placed across the street, so
that there was not more than half a foot from one post to another: he then
collected armed men, provided stones, quicklime, and such like instruments
of annoyance, to guard them. As soon as the lords above mentioned came
there, the abbot posted his people between the barriers and the gate, and
flung the gate open. The lords dismounted, and approached the barriers,
which were very strong, sword in hand; and great strokes were given to
those within, who defended themselves very valiantly. Sir Abbot did not
spare himself; but, having a good leathern jerkin on, dealt about his blows
manfully, and received as good in his turn. Many a gallant action was
performed; and those within the barriers flung upon the assailants stones,
logs, and pots full of lime, to annoy them.
It chanced that Sir Henry of Flanders, who was one of the foremost, with
his sword attached to his wrist, laid about him at a great rate: he came too
near the abbot, who caught hold of his sword, and drew him to the barriers
with so much force, that his arm was dragged through the grating, for he
could not quit his sword with honor. The abbot continued pulling; and, had
the grating been wide enough, he would have had him through, for his
shoulder had passed, and he kept his hold, to the knight’s great discomfort.
On the other side, his brother knights were endeavoring to draw him out of
his hands; and this lasted so long that Sir Henry was sorely hurt: he was,
however, at last rescued, but his sword remained with the abbot. And at the
time I was writing this book, as I passed through that town, the monks
showed me this sword, which was kept there, much ornamented. It was
there that I learnt all the truth of this assault. Hennecourt was very
vigorously attacked that day; and it lasted until vespers. Many of the
assailants were killed or wounded. Sir John of Hainault lost a knight from
Holland, called Sir Herman, who bore for arms a fess componé gules, and
in chief, three buckles azure. When the Flemings, Hainaulters, English, and
Germans, who were there, saw the courage of those within the town, and
that, instead of gaining any advantage, they were beaten down and
wounded, they retreated in the evening, carrying with them to their quarters
the wounded and bruised.
On the next morning the king departed from Mont St. Martin, and
ordered, under pain of death, that no damage should be done to the abbey,
which was observed. They then entered the Vermandois, and at an early
hour took up their lodgings on Mont St. Quentin. They were in a regular
order of battle, and those of St. Quentin might have encountered them had
they chosen it; but they had no desire to issue out of the town. The scouts of
the army went up to the barriers, and skirmished with those who were there.
The Constable of France and Sir Charles le Blois drew up their people in
order of battle before the barriers; and when the Englishmen, among whom
were the Earl of Suffolk, the Earl of Northampton, Sir Reginald Cobham,
and many others, saw the manner in which it was done, they retreated to the
main army of the king, which remained encamped on the hill until four
o’clock the next morning. A council was then held, to consider whether they
should march straight into France, or draw toward Tierache, keeping near
the borders of Hainault. By the advice of the Duke of Brabant, the latter
plan was followed, as from that country they drew all their provision; and
they resolved, that if King Philip should follow them with his army, as they
supposed he would, they would wait for him in the plains, and give him
battle without fail. They then set out from Mont St. Quentin, ranged in a
regular order, in three battalions. The marshals and the Germans led the
van, the King of England the centre, and the Duke of Brabant the rear. They
advanced not more than three or four leagues a day, halting early, but
burning and pillaging all the country they passed through.
We must now speak of the expedition of Sir John of Hainault, who had
with him full five hundred fighting men. He came first to Guise, which he
burnt, and destroyed the mills. In the fortress was the Lady Jane, his
daughter, wife of Lewis, Earl of Blois. She begged of her father to spare the
lands and heritage of his son-in-law; but in vain, for Sir John would not
depart until he had completed the purpose of his expedition. He then
returned to the king, who was lodged in the abbey of Sarnaques, while his
people overran the country. The Lord of Fauquemont led sixscore German
lances to Lonnion, in Tierache, a large level town; the inhabitants of which
had almost all retired with what they could carry off into the woods, and
there had fortified their position by cutting down large trees. The Germans
followed them, and, being joined by Sir Arnold Bacqueghen and his
company, they attacked the people of Lonnion in the wood, who defended
themselves as well as they could; but they were overpowered and obliged to
flee. There were about forty killed and wounded, and all they brought there
plundered. Thus was this country ruined without any hindrance; and the
English acted as they thought proper.
When the King of England had halted in the champaign country of
Tierache, he was informed that the King of France was within two leagues
of him, and eager to give him battle. He therefore summoned the chiefs of
his army, and demanded of them the best method of preserving his honor, as
his intention was to accept the combat. The lords looked at each other, and
requested the Duke of Brabant to give his opinion. The duke replied, that he
was for fighting, as they could not depart honorably without it; and he
advised that a herald should be sent to the King of France, to offer him
battle, and to fix the day. A herald who belonged to the Duke of Gueldres,
and spoke French well, had this commission. After being informed what he
was to say, he rode to the French army, and, coming to the king and his
counsellors, told them that the King of England, having halted in the plains,
demanded and required the combat of one army against the other. To this
King Philip answered willingly, and appointed the Friday following for the
day, this being Wednesday. The herald returned back, well clothed with
handsome furred mantles, which the king and lords of France had given him
for the sake of the news he had brought, and related the good cheer he had
received. The day being thus fixed, information of it was given to the
captains of either army, and every one made his preparations accordingly.
On the Thursday morning, two knights belonging to the Earl of Hainault,
the Lords of Faguinelles and Tupegny, mounted their steeds; and these two,
leaving their own army, set out to view that of the English. They rode on for
some time boldly along the line of the English army; when it chanced that
the horse of the Lord of Faguinelles took fright, ran off in spite of all the
efforts of his master, and carried him, whether he would or no, to the
quarters of the enemy. He fell into the hands of the Germans, who, soon
perceiving he did not belong to their party, surrounded him and his horse,
and took him prisoner. He remained prisoner to five or six German
gentlemen, who immediately ransomed him. When they found out that he
was a Hainaulter, they asked him whether he knew Sir John of Hainault; he
replied, Yes, and begged of them, for the love of God, to carry him to him,
because he was sure he would be security for his ransom. The Germans
were delighted at this, and carried him to Sir John, who pledged himself for
his ransom. The Lord of Faguinelles thereupon returned to the army of
Hainault, to his earl and other lords. His steed was returned to him through
the entreaties of the Lord of Beaumont. Thus passed that day without any
other thing occurring worthy of being recorded.
CHAPTER XXII.

The Two Kings retire from Vironfosse without giving Battle.

I T was a matter of much wonder, how two such fine armies could separate
without fighting. But the French were of contrary opinions among
themselves. Some said it would be a great shame, and very blameable, if
the king did not give battle when he saw his enemies so near him, and
drawn up in his own kingdom in battle array: others said it would exhibit a
singular instance of madness to fight, as they were not certain that some
treachery was not intended; besides, if fortune should be unfavorable, the
king would run a great risk of losing his kingdom, and, if he should conquer
his enemies, he would not be the nearer to gain possession of England or of
the land of the allies. Thus the day passed until near twelve o’clock in
disputes and debates. About noon a hare was started in the plain, and ran
among the French army, who began to make a great shouting and noise,
which caused those in rear to imagine the combat was begun in front; and
many put on their helmets, and made ready their swords. Several new
knights were made, especially by the Earl of Hainault, who knighted
fourteen; and they were after called knights of the hare.
In this situation the two armies remained all Friday. In the midst of the
debates of the council of the King of France, letters were brought from
Robert, King of Sicily, addressed to him and his council. This King Robert
was, as they said, a very great astrologer, and full of deep science; he had
often cast the nativities of the kings of France and England, and had found
by his astrology and the influence of the stars, that, if the King of France
fought with the King of England in person, he would surely be defeated; in
consequence of which he, as a wise king, and much fearing the danger and
peril of his cousin the King of France, had sent, long before, letters most
earnestly to request King Philip and his council never to give battle to the
English when King Edward should be there in person. These doubts, and
this letter from the King of Sicily, made many of the lords of France sore
disheartened, of which the king was informed, who nevertheless was very
eager for the combat; but he was so strongly dissuaded from it, that the day
passed quietly, and each man retired to his quarters.
When the Earl of Hainault saw that there was no likelihood of a battle,
he departed with all his people, and returned to Quesnoy. The next day the
Germans and Brabanters took their leave, and returned to their homes. The
King of England went to Brabant with the duke, his cousin. Thus ended this
great expedition, and every man returned to his own house.
When the king’s vessel was ready, he embarked with a numerous
attendance at Antwerp, and sailed for London, where he arrived about St.
Andrew’s Day, and was joyfully received by his subjects, who were anxious
for his return. Great complaints were made to him of the ravages which the
Normans, Picards, and Spaniards had committed at Southampton; upon
which he answered, that, whenever it came to his turn, he would make them
pay dearly for it—and he kept his word before the end of that year.
CHAPTER XXIII.

The Sea-Fight between the King of England and the French, Before
Sluys.

T HE King of England embarked for Flanders, in order to go to Hainault


to assist his brother-in-law in his war against France. He and his whole
navy sailed from the Thames, the day before the eve of St. John the
Baptist, 1340, and made straight for Sluys. Sir Hugh Quiriel, Sir Peter
Bahucet, and Barbenoire, were at that time lying between Blanckenburgh
and Sluys with upward of one hundred and twenty large vessels, without
counting others: these were manned with about forty thousand men,
Genoese and Picards, including mariners. By the orders of the King of
France, they were there at anchor, waiting the return of the King of
England, to dispute his passage.
When the king’s fleet was almost got to Sluys, they saw so many masts
standing before it, that they looked like a wood. The king asked the
commander of his ship what they could be; who answered, that he imagined
they must be that armament of Normans, which the King of France kept at
sea, and which had so frequently done him much damage, had burnt his
good town of Southampton, and taken his large ship the “Christopher.” The
king replied, “I have for a long time wished to meet with them, and now,
please God and St. George, we will fight them; for, in truth, they have done
me so much mischief, that I will be revenged on them if it be possible.” The
king drew up all his vessels, placing the strongest in the front, and on the
wings his archers. Between every two vessels with archers there was one of
men at arms. He stationed some detached vessels as a reserve, full of
archers, to assist and help such as might be damaged. There were in this
fleet a great many ladies from England, countesses, baronesses, and
knights’ and gentlemen’s wives, who were going to attend on the queen at
Ghent: these the king had guarded most carefully by three hundred men at
arms and five hundred archers. When the King of England and his marshals
had properly divided the fleet, they hoisted their sails to have the wind on
their quarter, as the sun shone full in their faces, which they considered
might be of disadvantage to them, and stretched out a little, so that at last
they got the wind as they wished. The Normans, who saw them tack, could
not help wondering why they did so, and said they took good care to turn
about, for they were afraid of meddling with them. They perceived,
however, by his banner, that the king was on board, which gave them great
joy, as they were eager to fight with him: so they put their vessels in proper
order, for they were expert and gallant men on the seas. They filled the
“Christopher,” the large ship which they had taken the year before from the
English, with trumpets and other warlike instruments, and ordered her to
fall upon the English. The battle then began very fiercely; archers and
crossbow-men shot with all their might at each other, and the men at arms
engaged hand to hand. In order to be more successful, they had large
grapnels, and iron hooks with chains, which they flung from ship to ship, to
moor them to each other. There were many valiant deeds performed, many
prisoners made, and many rescues. The “Christopher,” which led the van,
was recaptured by the English, and all in her taken or killed. There were
then great shouts and cries, and the English manned her again with archers,
and sent her to fight against the Genoese.
This battle was very murderous and horrible. Combats at sea are more
destructive and obstinate than upon the land, for it is not possible to retreat
or flee: every one must abide his fortune, and exert his prowess and valor.
Sir Hugh Quiriel and his companions were bold and determined men, had
done much mischief to the English at sea, and destroyed many of their
ships. This combat, therefore, lasted from early in the morning until noon;
and the English were hard pressed, for their enemies were four to one, and
the greater part men who had been used to the sea. The king, who was in the
flower of his youth, showed himself on that day a gallant knight, as did the
Earls of Derby, Pembroke, Hereford, Huntingdon, Northampton, and
Gloucester; the Lord Reginald Cobham, Lord Felton, Lord Bradestan, Sir
Richard Stafford, the Lord Percy, Sir Walter Manny, Sir Henry de Flanders,
Sir John Beauchamp, Sir John Chandos, the Lord Delaware, Lucie Lord
Malton, and the Lord Robert d’Artois, now called Earl of Richmond. I
cannot remember all the names of those who behaved so valiantly in the
combat; but they did so well, that, with some assistance from Bruges and
those parts of the country, the French were completely defeated, and all the
Normans and the others killed or drowned, so that not one of them escaped.
This was soon known all over Flanders; and, when it came to the two
armies before Thin-l’Evêque, the Hainaulters were as much rejoiced as their
enemies were dismayed.
After the king had gained this victory, which was on the eve of St. John’s
Day, he remained all that night on board of his ship before Sluys; and there
were great noises with trumpets, and all kinds of other instruments. The
Flemings came to wait on him, having heard of his arrival, and what deeds
he had performed. The king inquired of the citizens of Bruges after Jacob
von Artaveld; and they told him he was gone to the aid of the Earl of
Hainault with upward of sixty thousand men, against the Duke of
Normandy. On the morrow, which was Midsummer Day, the king and his
fleet entered the port. As soon as they were landed, the king, attended by
crowds of knights, set out on foot on a pilgrimage to Our Lady of
Ardembourg, where he heard mass, and dined. He then mounted his horse,
and went that day to Ghent, where the queen was, who received him with
great joy and kindness. The army and baggage, with the attendants of the
king, followed him by degrees to the same place.
The king had sent notice of his arrival to the lords that were before Thin-
l’Evêque, opposing the French; who, as soon as they heard of it, and of his
victory over the Normans, broke up their camp. The Earl of Hainault
disbanded all his troops, except the principal lords, whom he carried with
him to Valenciennes, and treated most nobly, especially the Duke of
Brabant, and Jacob von Artaveld. Jacob von Artaveld, in the full market-
place, explained the right King Edward had to the crown of France, to all
those lords that chose to hear him, and of what importance it was to the
three countries,—that is to say, Flanders, Brabant, and Hainault,—when
closely united. He spoke so clearly, and with so much eloquence, that he
was praised by all, who agreed that he was worthy to exercise the dignity of
Earl of Flanders. These lords then took their leave, and agreed to meet in
eight days’ time at Ghent, to see the king. A day of conference was then
appointed to be held at Vilvorde.
It was then determined that the King of England should move about
Magdalen-tide, and lay siege to the city of Tournay; and all the lords present
promised to be there, as well as all the forces from the principal towns.
They then set off for their homes, to get ready, and prepare themselves
properly for the business.

You might also like