From 069fe15452aa33440aff5e770c169bd3612d7646 Mon Sep 17 00:00:00 2001 From: Derek Brown Date: Thu, 20 Nov 2014 13:46:42 -0500 Subject: Fix spelling and grammar --- lib/stdlib/doc/src/io_protocol.xml | 2 +- system/doc/design_principles/release_handling.xml | 4 +-- system/doc/efficiency_guide/tablesDatabases.xml | 2 +- system/doc/getting_started/conc_prog.xml | 30 +++++++++++------------ system/doc/getting_started/seq_prog.xml | 26 ++++++++++---------- system/doc/reference_manual/expressions.xml | 4 +-- system/doc/system_principles/create_target.xmlsrc | 6 ++--- system/doc/tutorial/c_portdriver.xmlsrc | 2 +- 8 files changed, 38 insertions(+), 38 deletions(-) diff --git a/lib/stdlib/doc/src/io_protocol.xml b/lib/stdlib/doc/src/io_protocol.xml index 9328704e11..0b76882da4 100644 --- a/lib/stdlib/doc/src/io_protocol.xml +++ b/lib/stdlib/doc/src/io_protocol.xml @@ -49,7 +49,7 @@ current I/O-protocol.

The original I/O-protocol was simple and flexible. Demands for spacial and execution time efficiency has triggered extensions to the protocol over the years, making the protocol larger and somewhat less easy to -implement than the original. It can certainly be argumented that the +implement than the original. It can certainly be argued that the current protocol is too complex, but this text describes how it looks today, not how it should have looked.

diff --git a/system/doc/design_principles/release_handling.xml b/system/doc/design_principles/release_handling.xml index ba8a88d1c2..9d1e2c8669 100644 --- a/system/doc/design_principles/release_handling.xml +++ b/system/doc/design_principles/release_handling.xml @@ -310,7 +310,7 @@ the following instruction is used:

{apply, {M, F, A}} -

The release handler will evalute apply(M, F, A).

+

The release handler will evaluate apply(M, F, A).

@@ -350,7 +350,7 @@ possible.

An info report is written when the upgrade is completed. To - programatically find out if the upgrade is complete, + programmatically find out if the upgrade is complete, call release_handler:which_releases(current) and check if it returns the expected (i.e. the new) release.

The new release version must be made permanent when the new diff --git a/system/doc/efficiency_guide/tablesDatabases.xml b/system/doc/efficiency_guide/tablesDatabases.xml index 5b0df76371..94c921fa1c 100644 --- a/system/doc/efficiency_guide/tablesDatabases.xml +++ b/system/doc/efficiency_guide/tablesDatabases.xml @@ -136,7 +136,7 @@ print_person(PersonId) -> io:format("No person with ID = ~p~n", [PersonID]) end. -%%% Internal functionss +%%% Internal functions print_name(PersonID) -> [Person] = ets:lookup(person, PersonId), io:format("No person ~p~n", [Person#person.name]). diff --git a/system/doc/getting_started/conc_prog.xml b/system/doc/getting_started/conc_prog.xml index e392287ff0..15feaa9044 100644 --- a/system/doc/getting_started/conc_prog.xml +++ b/system/doc/getting_started/conc_prog.xml @@ -352,8 +352,8 @@ pong ! {ping, self()}, on different computers. Before we do this, there are a few things we need to set up to get this to work. The distributed Erlang implementation provides a basic security mechanism to prevent - unauthorized access to an Erlang system on another computer - (*manual*). Erlang systems which talk to each other must have + unauthorized access to an Erlang system on another computer. + Erlang systems which talk to each other must have the same magic cookie. The easiest way to achieve this is by having a file called .erlang.cookie in your home directory on all machines which on which you are going to run @@ -363,7 +363,7 @@ pong ! {ping, self()}, you can safely ignore this and simply create a file called .erlang.cookie in the directory you get to after executing the command cd without any argument). - The .erlang.cookie file should contain on line with + The .erlang.cookie file should contain one line with the same atom. For example on Linux or Unix in the OS shell:

 $ cd
@@ -376,7 +376,7 @@ $ chmod 400 .erlang.cookie
Erlang systems, you must give it a name, eg:

 $ erl -sname my_name
-

We will see more details of this later (*manual*). If you want to +

We will see more details of this later. If you want to experiment with distributed Erlang, but you only have one computer to work on, you can start two separate Erlang systems on the same computer but give them different names. Each Erlang @@ -385,7 +385,7 @@ $ erl -sname my_name IP domain and we can use only the first component of the IP address, if we want to use nodes in different domains we use -name instead, but then all IP address must be given in - full (*manual*).

+ full.

Here is the ping pong example modified to run on two separate nodes:

@@ -538,9 +538,9 @@ ping finished

Before we start, let's note the following:

-

This example will just show the message passing logic no +

This example will just show the message passing logic- no attempt at all has been made to provide a nice graphical user - interface - this can of course also be done in Erlang - but + interface. This can, of course, also be done in Erlang - but that's another tutorial.

@@ -550,8 +550,8 @@ ping finished tutorial.

-

The first program we write will contain some inadequacies as - regards handling of nodes which disappear, we will correct +

The first program we write will contain some inadequacies + regarding the handling of nodes which disappear. We will correct these in a later version of the program.

@@ -734,11 +734,11 @@ await_result() -> copy the compiled code (messenger.beam) to the directory on each computer where you start Erlang. -

In the following example of use of this program, I have started +

In the following example of use of this program I have started nodes on four different computers, but if you don't have that - many machines available on your network, you could start up + many machines available on your network you could start up several nodes on the same machine.

-

We start up four Erlang nodes, messenger@super, c1@bilbo, +

We start up four Erlang nodes: messenger@super, c1@bilbo, c2@kosken, c3@gollum.

First we start up a the server at messenger@super:

@@ -780,19 +780,19 @@ ok
 receiver_not_found

But this fails as Fred has already logged off.

First let's look at some of the new concepts we have introduced.

-

There are two versions of the server_transfer function, +

There are two versions of the server_transfer function: one with four arguments (server_transfer/4) and one with five (server_transfer/5). These are regarded by Erlang as two separate functions.

Note how we write the server function so that it calls - itself, server(User_List) and thus creates a loop. + itself, via server(User_List), and thus creates a loop. The Erlang compiler is "clever" and optimizes the code so that this really is a sort of loop and not a proper function call. But this only works if there is no code after the call, otherwise the compiler will expect the call to return and make a proper function call. This would result in the process getting bigger and bigger for every loop.

-

We use functions in the lists module. This is a very +

We use functions from the lists module. This is a very useful module and a study of the manual page is recommended (erl -man lists). lists:keymember(Key,Position,Lists) looks through a list diff --git a/system/doc/getting_started/seq_prog.xml b/system/doc/getting_started/seq_prog.xml index fd49102263..be43e8d896 100644 --- a/system/doc/getting_started/seq_prog.xml +++ b/system/doc/getting_started/seq_prog.xml @@ -31,14 +31,14 @@

The Erlang Shell -

Most operating systems have a command interpreter or shell, Unix - and Linux have many, Windows has the Command Prompt. Erlang has +

Most operating systems have a command interpreter or shell- Unix + and Linux have many, while Windows has the Command Prompt. Erlang has its own shell where you can directly write bits of Erlang code and evaluate (run) them to see what happens (see shell(3)). Start the Erlang shell (in Linux or UNIX) by starting a shell or command interpreter in your operating system and typing - erl, you will see something like this.

+ erl. You will see something like this.

 % erl
 Erlang R15B (erts-5.9.1) [source] [smp:8:8] [rq:8] [async-threads:0] [hipe] [kernel-poll:false]
@@ -481,7 +481,7 @@ blue(#{blue := SV, alpha := SA}, #{blue := DV, alpha := DA}) ->
 > color:blend(C2,C1).
 #{alpha => 1.0,blue => 0.38,green => 0.52,red => 0.51}
 
-

This example warrant some explanation:

+

This example warrants some explanation:

-define(is_channel(V), (is_float(V) andalso V >= 0.0 andalso V =< 1.0)).

@@ -1152,13 +1152,13 @@ month_length(Year, Month) ->

Built In Functions (BIFs) -

Built in functions BIFs are functions which for some reason is +

Built in functions (BIFs) are functions which for some reason are built in to the Erlang virtual machine. BIFs often implement functionality that is impossible to implement in Erlang or is too inefficient to implement in Erlang. Some BIFs can be called - by use of the function name only but they are by default belonging - to the erlang module so for example the call to the BIF trunc - below is equivalent with a call to erlang:trunc.

+ by use of the function name only, but they by default belong + to the erlang module. So for example, the call to the BIF trunc + below is equivalent to a call to erlang:trunc.

As you can see, we first find out if a year is leap or not. If a year is divisible by 400, it is a leap year. To find this out we first divide the year by 400 and use the built in function @@ -1175,14 +1175,14 @@ trunc(5.01) = 5 2000 / 400 = 5.0 trunc(5.0) = 5 5 * 400 = 2000 -

so we have a leap year. The next two tests if the year is - divisible by 100 or 4 are done in the same way. The first - if returns leap or not_leap which lands up +

so we have a leap year. The next two tests, which check if the year is + divisible by 100 or 4, are done in the same way. The first + if returns leap or not_leap which ends up in the variable Leap. We use this variable in the guard for feb in the following case which tells us how long the month is.

-

This example showed the use of trunc, an easier way would - be to use the Erlang operator rem which gives the remainder +

This example showed the use of trunc. An easier way would + be to use the Erlang operator rem, which gives the remainder after division. For example:

 74> 2004 rem 400.
diff --git a/system/doc/reference_manual/expressions.xml b/system/doc/reference_manual/expressions.xml
index fa8f9b2e8f..62a344ad58 100644
--- a/system/doc/reference_manual/expressions.xml
+++ b/system/doc/reference_manual/expressions.xml
@@ -283,7 +283,7 @@ fun lists:append/2([1,2], [3,4])
 length([]) ->
     0;
 length([H|T]) ->
-    1 + length(T). %% Calls the local funtion length/1
+    1 + length(T). %% Calls the local function length/1
 
 f(X) when erlang:length(X) > 3 -> %% Calls erlang:length/1,
                                   %% which is allowed in guards
@@ -301,7 +301,7 @@ f(X) when erlang:length(X) > 3 -> %% Calls erlang:length/1,
 
 -import(mod,[length/1]).
 
-f(X) when erlang:length(X) > 33 -> %% Calls erlang:lenght/1,
+f(X) when erlang:length(X) > 33 -> %% Calls erlang:length/1,
                                    %% which is allowed in guards
 
     erlang:length(X);              %% Explicit call to erlang:length in body
diff --git a/system/doc/system_principles/create_target.xmlsrc b/system/doc/system_principles/create_target.xmlsrc
index b5f8d8ac4d..a8ee2d1245 100644
--- a/system/doc/system_principles/create_target.xmlsrc
+++ b/system/doc/system_principles/create_target.xmlsrc
@@ -91,7 +91,7 @@
   {pea, "1.0"}]}.
     

The listed applications are not only original Erlang/OTP applications but possibly also new applications that you have - written yourself (here examplified by the application + written yourself (here exemplified by the application pea).

Step 2. From the directory where the mysystem.rel file reside, start the Erlang/OTP system:

@@ -251,7 +251,7 @@ os> /usr/local/erl-target/bin/erl -boot /usr/local/erl-target/releases/FI target_system:create/1. In fact, if you create, in the current directory, not only the mysystem.rel file, but also a sys.config file, that latter file will be tacitly - put in the apropriate directory.

+ put in the appropriate directory.

@@ -408,7 +408,7 @@ heart: Tue Apr 1 12:15:11 2014: Executed "/usr/local/erl-target/bin/start /usr/ Erlang/OTP has Changed for more infomation about this.

- The node will be accessable via a new pipe: + The node will be accessible via a new pipe:

 os> /usr/local/erl-target/bin/to_erl /tmp/erlang.pipe.2
diff --git a/system/doc/tutorial/c_portdriver.xmlsrc b/system/doc/tutorial/c_portdriver.xmlsrc index 421ea63f33..2fd6fb0aac 100644 --- a/system/doc/tutorial/c_portdriver.xmlsrc +++ b/system/doc/tutorial/c_portdriver.xmlsrc @@ -35,7 +35,7 @@
Port Drivers -

A port driver is a linked in driver, that is accessible as a +

A port driver is a linked in driver that is accessible as a port from an Erlang program. It is a shared library (SO in Unix, DLL in Windows), with special entry points. The Erlang runtime calls these entry points, when the driver is started and when -- cgit v1.2.3