text:
Introduction to Philosophical Logic/Prolegomena

What is logic?
Logic is the study of the consistency of beliefs. For beliefs to be consistent it must be possible for them to obtain at the same time. For example, it is illogical to believe that the sky is completely blue and that the sky is completely red because the sky being entirely blue is inconsistent with its being entirely red, i.e. it is not possible for the sky to be entirely red at the same time as its being entirely blue.

Logic is also a study of "logical consequence", i.e. what follows by necessity from something else. By studying inconsistency of beliefs, philosophers are able to study the validity of arguments, as will be shown later. Methods of finding whether certain arguments are valid is described later.

The symbolisation of these sentences, known as formalisation, simplifies and quickens this process. It also enables the philosopher to clarify ideas using an unambiguous language in which to represent thoughts. The sophistication of the language used enables greater insights into the significance of these thoughts (and a cursory analysis of more logical languages is described in Other Logics.

Aims of this book
This book aims to give the reader a basic understanding of logic and its relationship with philosophy, rather than a more mathematical approach to advanced logic. It is designed to provide the reader with a grasp of terms such as "valid", "consistency", "entailment", which often arise in philosophy, to help the reader comprehend the philosophical issues that use them. Philosophical debates of certain issues are not developed here, and are at most briefly mentioned. Certain assumptions are made; the reader is advised to consider them.

The final part of this book (Other Logics) is a development and extension of the principles described herein. It is designed to interest rather than fully inform the reader of these matters.


text:
Template:Test

{{documentation|content= {{Subst only}}

This template takes two optional parameters. The first is for a signature. The second is for linking to a page where the user has caused vandalism. {{tlxs|Test| ~ |Main page}}

Related Templates

 * Test2
 * TestAnon

}}

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

title: Template:Test


text:
User talk:205.188.116.74

Thanks for experimenting with Wikibooks. Your test worked, and has now been removed. Please use Sandbox for any other tests you want to do, since testing material in modules will normally be removed quickly. Please see the welcome page if you would like to learn more about contributing to our encyclopedia. Thanks. Gentgeen 23:33, 23 Sep 2004 (UTC)

title: User talk:205.188.116.74


text:
User talk:217.82.37.100

Thanks for experimenting with Wikibooks. Your test worked, and has now been removed. Please use Sandbox for any other tests you want to do, since testing material in modules will normally be removed quickly. Please see the welcome page if you would like to learn more about contributing to our project. Thanks. Gentgeen 23:36, 23 Sep 2004 (UTC)

title: User talk:217.82.37.100


text:
User:Mcornelius

See my Wikipedia User page

title: User:Mcornelius


text:
User talk:200.101.233.137

Hello, and welcome to Wikibooks! We're glad to have you here. Just wanted to let you know--the module you just uploaded titled Goshawk appears to be from a copyrighted source. Additionally, it appears to be a dictionary definition. Our sister project, Wiktionary is building a dictionary, if you wish to help I'd like to suggest you spend your time there. Best wishes, and ask at the Staff lounge if you have any questions. Yours, Gentgeen

title: User talk:200.101.233.137


text:
Talk:Tamil/Tamil Script

Why do we have a section on Carnatic Music here? It is totally unrelated to this topic. --61.95.211.98 06:53, 24 Sep 2004 (UTC)

Teaching step-by-step
I would really like to see lessons teaching how to read and write Tamil step-by-step. It's hard to learn from an overview of letters. Lack of examples is another problem, but even if there were examples afterwards the learning situation would be far from perfect because the student would still have to memorise all letters at once in order to be able to begin practising.

What I have found really useful when learning non-Latin alphabets is a "divide and conquer" method that introduces few letters at a time and offers example words for practise immediately after each letter / each set of letters. What's even better is if those example words are understandable without prior knowledge of the language, that is, international words. For example: names of countries, cities or famous people (if their name isn't significantly different in Tamil than in English), common personal names, Tamil words that have entered English, English words that are used in Tamil, words that both Tamil and English have derived from Greek or Latin... The advantage of using these words is that students will be able to quickly see their own progress and the whole learning process becomes as fascinating as solving a puzzle. See the "Read Write and Pronounce Greek" lessons in the Modern Greek Wikibook for an example, or this external page on Cyrillic.

If you'd like to try this approach for teaching how to write Tamil, I'd be glad to help you, even though I don't know Tamil. I'd like to learn it though and I can read quite a few other scripts. Just create a big list of suitable words on a planning page like Modern Greek/Writing lessons plan, answer me here and I'll try to find an optimal order for letters.

Thanks for your efforts to teach a language that is hard to find in European schools!

Junesun 17:16, 11 July 2006 (UTC)

P.S.: If there's somebody generally unsure about how to create good language lessons, I really recommend reading the following two pages about it: Authoring Foreign Language Textbooks and Authoring Foreign Language Textbooks/Bite-sized language lessons.

HELLO!!!

if you want to read and write in tamil ,.. i would suggest this tool if you are really very good at speaking tamil thisi came across through one of my class mates last week, it is http://quillpad.in/tamil you just need to type in english how you speak in tamil say you just need to type eppadi irukkirai? it will ocnvert into the tamil letters... this way you can post long blogs also peacefully and also learn to rean and write in no time

216 + 1 = 247 ??
The current Introduction seems to imply that 216 + 1 = 247. [[Special:Contributions/94.30.84.71|94.asd f

title: Talk:Tamil/Tamil Script


text:
User talk:69.145.198.130

Hello, welcome to Wikibooks! From the module you posted, it looks like you'd like to work on an encyclopedia article on the Beatles. May I suggest you check out the article The Beatles on our sister project Wikipedia? The purpose of Wikibooks is to build textbooks, teaching aids, and learning materials that are free and open content. If you'd like to help, please read some of our wikibooks and see what we're doing.

Thanks, Gentgeen 06:57, 24 Sep 2004 (UTC)

title: User talk:69.145.198.130


text:
Italian/Vocabulary/Basic Words and Phrases

=Basic Vocabulary=

Elements of conversation

 * Yes — Sì.
 * No — No.
 * Sure. — Certamente. Certo.
 * Really? — Davvero?

 * Excuse me — Mi scusi. (formal) Scusa. (informal)
 * I'm sorry. — Mi dispiace.
 * No problem. — Non c'è problema.

 * What is that? — Che cos'è?
 * Who is that? — Chi è?
 * That is ___. — È ___.

Greetings
See Italian/Vocabulary/Greetings and Introductions

Colours
See Italian/Vocabulary/Colors


text:
Italian/Grammar/Nouns

Gender
Italian nouns are either masculine or feminine.

As a general rule (with a few exceptions), male human beings are associated to masculine nouns; female human beings are associated to feminine nouns. Collective nouns, referring to a group of human beings of both genders, are usually masculine.

Examples: Attore (actor) is masculine. (è maschile) Attrice (actress) is feminine. (è femminile) Maestro (male teacher) is masculine. Maestra (female teacher) is feminine. Bambini (children, a group of little boys) is masculine Bambini (children, a mixed group of little boys and girls) is masculine Bambine (children, a group of little girls) is feminine

Exceptions (example): Persona (person - man or woman) is feminine

Animals and things may be masculine or feminine, but there is no clear rule for this association. When you learn a new word, you should learn whether it is masculine or feminine.

Examples: Pietra (stone) is feminine. Sasso (also stone) is masculine. Topo (mouse) is masculine. Volpe (fox) is feminine.

The basic rule is that masculine singular nouns end with -o, feminine singular nouns end with -a. Most words follow this form, but this is not always the case.

 * Masculine singular nouns can end in -a (rare)
 * Feminine singular nouns can end in -o (rare)
 * Both masculine and feminine nouns can end with -e
 * Nouns ending in -à are always feminine
 * Nouns ending in -è are always masculine
 * Nouns ending in -i and in -ù are usually feminine
 * Nouns ending in -ione are usually feminine
 * Nouns ending in -mma are usually Greek in origin and masculine

Examples Uomo (man) is masculine. Donna (woman) is feminine. Mano (hand) is feminine. Programma (program) is masculine. Cane (dog) is masculine. Pace (peace) is feminine. Città (town) is feminine. Crisi (crisis) is feminine. Virtù (virtue) is feminine.

Plural
In Italian, nouns are pluralized by a change in the last vowel.

In short:
 * Nouns ending with -a are pluralized with -e if feminine (most common) or with -i if masculine.
 * Nouns ending with -e or -o are pluralized with -i.
 * Nouns ending with a stressed vowel, with -i or -u or with a consonant are invariant, the plural is the same as the singular.

Every case:
 * Feminine in -a, plural in -e
 * Feminine in -e, plural in -i
 * Feminine in -o, plural in -i
 * Feminine in -ie, plural in -ie
 * Feminine in -i, plural also in -i
 * Masculine in -a, plural in -i
 * Masculine in -o, plural in -i (rarely, plural in -a; see Special Plurals below)
 * Masculine in -e, plural in -i

A basic example: [Il] ragazzo (boy) is masculine singular. - [I] ragazzi is the plural form. [La] ragazza (girl) is feminine singular. - [Le] ragazze is the plural form.

Other examples: [Il] programma (program, masculine). Plural: [i] programmi. [La] mano (hand, feminine). Plural: [le] mani. [Il] cane (dog, masculine). Plural: [i] cani. [La] canzone (song, feminine). Plural: [le] canzoni. [La] crisi (crisis, feminine). Plural: [le] crisi. [La] città (town, feminine). Plural: [le] città. [Il] caffè (coffee, masculine). Plural: [i] caffè. [La] virtù (virtue, feminine). Plural: [le] virtù. [Il] gas (gas). Plural: [i] gas.

Warning. In some cases, plural feminine forms can be mistaken for singular masculine forms.

Example of confusing forms. [Il] signore (mister) is masculine singular. - [I] signori is the plural form. [La] signora (mrs) is feminine singular. - [Le] signore is the plural form.

The problem here is that "signore" can refer to both one man or two (or more) women. This problem is usually solved by taking the article into account.

Special plurals
A number of masculine nouns ending in -o have special plurals ending in -a; these special plurals switch to feminine gender. They are a remnant of the old Latin neutral gender.

Examples of plurals in -a: [Il] braccio (arm, masculine). Plural: [le] braccia (feminine) [L'] uovo (egg, masculine). Plural: [le] uova (feminine)

Very few nouns have irregular plurals.

Irregular plurals (example): Uomo (man), plural: uomini

Some nouns are invariant (the plural is the same as the singular) even if they end in -a, -e or -o. These nouns are usually originated by a shortening of longer names.

 Invariant plurals i -a, -e or -o (example): [La] moto (short for motocicletta) (motorcycle). Plural: [le] moto

Nouns ending with i+vowel in some cases miss one i in the plural (a rule for masculine nouns).

Examples of plurals for nouns in -ia, -io: Camicia (shirt, fem.). Plural: camicie Doccia (shower, fem.). Plural: docce Arancia (orange, fem.). Plural: arance Inizio (start, masc.). Plural: inizi Negozio (shop, masc.). Plural: negozi Raggio (ray, masc.). Plural: raggi

Masculine nouns ending with -co, -go can have plurals ending with -chi, -ghi or -ci, -gi. Feminine nouns ending with -ca, -ga usually have plurals ending with -che, -ghe.

Examples of plurals for nouns in -co, -go, -ca, -ga: Amico (friend, masc.). Plural: amici Arco (arch, masc.). Plural: archi Lago (lake, masc.). Plural: laghi Medico (physician, masc.). Plural: medici Amica (friend, fem.). Plural: amiche Barca (boat, fem.). Plural: barche Targa (plate, fem.). Plural: targhe

Particular cases -cia and -gia Words ending with either -cia and -gia respect the following rule.

Plural ends with -cie/-gie if the final letter before the suffix(cia/gia) is a vowel Plural ends with -ce/-ge if the final letter before the suffix is a consonant

If the stress falls on the i, the i always remains so, for instance, -cia makes the plural with -cie.

Italienisch/ Substantiv Italiano/Sustantivos Italiano/Nome

title: Italian/Grammar/Nouns


text:
User:Mdolphin

I'm trying to learn enough Italian to post some useful information on Italian.

title: User:Mdolphin


text:
DirectX/Managed DirectX

Managed DirectX is a new technology introduced by Microsoft. It is a set of libraries - or as referred to in .NET _assemblies_ - to create applications that utilise DirectX. Each of the DLL's is used with a specific sub-system. The DLL's are as below.

title: DirectX/Managed DirectX


text:
User:82.43.185.179

The project wikibooks does not seem to be enjoying the same sort of growth that the original wikipedia did. There are probably a number of reasons for this. I shall give a few reasons I think are important and then follow up with some suggestions for the action that could be taken to remedy this.

1) Wikibooks requires a different logon to wikipedia. IMHO it would be better for the project if existing wikipedia developers could be automatically part of wikibooks. This would allow more free movement of labour from wikipedia to wikibooks. A strong motivating factor for people developing in wikipedia is the racking up of credit in the form of edited articles. Why not allow create a contributions page that gives credit to all material worked on in any wiki project?

2) Wikibooks is not interconnected in the same way that wikipedia is. There is a clear need for a different structure to the books as they are meant to be (at least eventually) printed and should therefore have a linear style. However, if links were made in such a way that they could deleted without interfering with the quality of the text then we could have the same interconnection that wikipedia has without that necessarily causing problems with the style of the books.

We need a way to designate sections as being developer areas (but within the actual text itself) We could produce a special heading "Developer's notes and links" which has a template (to ensure consistent usage. We need a special link type that represents a temporary link for development purposes. This would allow the developer links and comments necessary to speed up development. But at the same time would allow these links to be removed with ease when the wikibook is downloaded. (Of course links just to wikipedia should be fairly easy to remove automatically although it might help if they appeared in a different colour to remind developers that that material reffered to will not be available to the readers of printed versions. 3) Also links can be made from relevent pages of wikipedia to wikibooks. This should draw in much more labour to liven up wikibooks. This is one thing that I can implement on my own. So I shall start introducing a section on some selected wikipedia pages entitled "relevent wikibooks". I may also start links to wikibooks in the main text of some articles in wikipedia. However, without 2) we may find that people learn to ignore links to wikibooks as they are deadends.

title: User:82.43.185.179


text:
Introduction to Philosophical Logic/Consistency and Inconsistency

=Consistency and Inconsistency=

Logic is a study of the consistency of beliefs. A belief is part of a psychological state in which a person thinks, is under an impression or believes that the universe has some property. They are readily represented by sentences, a linguistic interpretation. Such sentences can then be evaluated for truth.

Truth
What is truth? What sort of thing could be considered true?

 * 1) Shut that door!
 * 2) Are you going to the party?
 * 3) Would that I were not hungry.
 * 4) A panda eats shoots and leaves.

Of the above sentences, only one, it seems, is capable of being assigned a truth value (considered true or false). The last sentence is true, but what of the others? The first is a command. It can be obeyed or disobeyed, but cannot be true (or false). The second is a question and again cannot be true or false. The third expresses a wish; it may be true that the person uttering it wishes he or she were not hungry, but it itself cannot be evaluated for truth. It shall be said that only declarative statements are evaluable for truth.

A test, perhaps, for determining if a sentence is declarative or not is to ask if the following question is a meaningful, grammatical question in English:

 * Is it true that P?

where P is the sentence being analysed.

 * 1) Is it true that shut that door?
 * 2) Is it true that are you going to the party?
 * 3) Is it true that would that I were hungry?

None of the above is meaningful English. These therefore fail the test.

So what is it for a declarative sentence to be true. There are many truth theories, each defining truth slightly differently. The definition of truth adopted in this book comes from the correspondence theory, which states that a sentence P is true if and only if the state of affairs designated by P obtains; "it is true that P" is true if P. Falsehood is similarly defined for a sentence: a sentence is false if the state of affairs it designates do not exist. Although this seems straightforward and platitudinous, there are complications, explanation of which roams outside the scope of this book. The reader is urged to investigate these!

For the sake of simplicity it will be assumed that all declarative sentences are true or false and so, if a sentence is true, its negation is false. The negation of a sentence P is any sentence that shares its meaning precisely with the sentence

it is not the case that P.

Definition of Consistency
Logic is concerned with the consistency of sets of sentences (used to represent beliefs) and with consistent outcomes to processing logical formulae containing operands and operatives. A set of sentences is said to be consistent if and only if there is at least one possible situation in which they are all true. So, the following set of sentences is consistent:

 * 1) Grass is green.
 * 2) It is not the case that the moon is green.
 * 3) Most humans have ten fingers.
 * 4) Grasshoppers have six legs and dogs have four.
 * 5) Earth is a cube.

Note that not all of the sentences are true (sentence 5). However, if the Earth were a cube, it need not be that any of the other sentences are false. There is a possible situation in which they are all true. In this way, logicians are not interested as such in the actual truth value of a sentence (whether it is in fact true or false), but more in a sentence's possible truth values.

Consider the following English sentences:

 * 1) The moon is entirely constituted from cheese.
 * 2) The moon is only partly constituted from cheese.

There is no possible situation in which 1 and 2 are both true, that is to say, it is impossible for them both to be true at the same moment. Such a pair of sentences are said to be inconsistent. A set of sentences is said to be inconsistent if there is no possible situation in which they are all true.

A set of sentences may consist of only one sentence. In which case, if there is a possible situation in which that sentence is true, the sentence is said to be consistent. If there is no such situation, the sentence is said to be inconsistent.

For example, "grass is green" and "snow is blue" are examples of consistent sentences (and the set containing them and only them is consistent). The sentences "grass is green" and "grass is blue" (when taken individually) are consistent sentences, but any set containing them both is inconsistent.

The sentence "2+2=5" is inconsistent. There is no situation in which it is true.

If two sentences cannot be both true and cannot be both false, they are said to be contradictory. For example, "Socrates was a philosopher" and "Socrates was not a philosopher" are contradictory statements.

If two sentences cannot be both true at the same time (form an inconsistent set), they are said to be contrary. For example, "I have exactly 10 fingers" and "I have exactly 9 fingers" are contrary (both statements cannot be true, but both could be false). All contradictory statements are contrary.

Logical Possibility and Necessity
What exactly is meant by possible where it is used above? The type of possibility being considered is logical. If something is considered logically possible, it could have been the case that it was true, regardless of whether it is actually true or not. So, it could have been true that Charles I was not beheaded, for example if he had evaded the executioner, or that the moon is made of cheese, if, for example, the universe was slightly different to how it actually is.

Necessity can be defined in terms of possibility. It is, for example, impossible that Charles I was both beheaded and not beheaded, i.e. it is not possible that he was beheaded and not beheaded. A statement about impossibility is a statement about necessity, i.e. the way things must be. To say something is impossible is to say that no possible situation exists where it is true. If no situation exists where it is true, it must be false - it is necessarily false and so its negation is necessarily true.

 * 1) It is not the case that P is possible.
 * 2) It must be the case that it is not the case that P is true.

The reader should strive to understand that 2 follows from 1 (and indeed that 1 follows from 2) before continuing. Some examples will clarify this (and extend the idea):

*It must be that two plus two does not make five.
 * 1) *It is not possible that two plus two makes five.

*It must be that four is the square of two.
 * 1) *It is not possible that four is not the square of two.

*According to the definition above, it could not be that a sentence were neither true nor false.
 * 1) *According to the definition above, it must be that a sentence is either true or false.

A sentence that describes a state of affairs that is not possible is said to be necessarily false. A sentence the negation of which describes a state of affairs that is not possible is said to be necessarily true.


text:
Introduction to Philosophical Logic/Arguments

Definition of an argument
An argument (in the context of logic) is defined as a set of premises and a conclusion where the conclusion and premises are separated by some trigger word, phrase or mark known as a turnstile.

For example:

1 I think; therefore I am.

There is only one premise in this argument, I think. The conclusion is I am and the turnstile is therefore (although the semi-colon may be thought of as part of the turnstile).

2 ''All men are mortal. Socrates was a man. So, Socrates was mortal.''

In this example there are two premises and the turnstile is so.

In English (and all other natural languages), the conclusion need not come at the end of an argument:

3 ''Pigs can fly. For pigs have wings and all winged animals can fly.''

4 I am a safe driver: I have never had an accident.

Here the turnstiles (for and :) seem to indicate where the premises come as opposed to where the conclusion comes. Other examples of turnstiles (indicating either conclusion or premises) are: so, thus, hence, since, because, it follows that, for the reason that, from this it can be seen that.

Sound arguments
A sound argument is an argument that satisfies three conditions. -True premises -Unambiguous premises -Valid logic

If one of these conditions is unsatisfied then the argument is unsound, though in the case of ambiguous premises, not necessarily so.

The first, second and fourth arguments (depending of course, on who "I" is - it is being assumed it is the author!) are all sound. Here are some more:

5 ''Grass is green. The sky is blue. Snow is white. Therefore coal is black.''

6 ''Grass is green. The sky is blue. Snow is white. Therefore pigs can fly.''

7 2+2=4; hence 2+2=4

8 2+2=4; hence 2+2=5

Note that it is not necessary that the truth value of the conclusion play a role in determining whether an argument is sound. This can be determined by considering the truth of the premises and the validity of the argument. However, if the conclusion is not true, the argument is not sound.

A sound argument always has consistent premises. This must be the case, since there is a possible situation (namely reality) in which they are all true.

Valid arguments
Of greater interest to the logician are valid arguments. A valid argument is an argument for which there is no possible situation in which the premises are all true and the conclusion is false.

Of the above arguments 2, 3 and 7 are valid. The reader should consider whether argument 1 is valid (read Meditations on First Philosophy by Descartes, chapters 1, 2).

It does not matter whether the premises or conclusion are actually true for an argument to be valid. All that matters is that the premises could not all be true and the conclusion false. Indeed, this means that an argument with inconsistent premises is always valid. There is no situation under which such an argument has all premises true and so there is no situation under which such an argument has all premises true and conclusion false. Hence it is valid. Similarly, an argument with a necessary conclusion can in no situation have all true premises and a false conclusion, since there is no situation in which the conclusion is false.

An argument with the single premise 'The conclusion is true.' is valid (regardless of the conclusion). An argument with the conclusion 'The premises are all true.' is also valid.

According to the definition of truth given previously, if the conclusion is false, its negation is true. Hence a valid argument can also be defined as an argument for which there is no possible situation under which the premises and the negation of the conclusion are all true. Hence, a valid argument is an argument such that the set of its premises and the negation of the conclusion is inconsistent. Such a set (the union of the set of premises and the set of the negation of the conclusion) is known as the counter-example set. It is called the counter-example set for the following reason: if a possible situation is found in which the members of this set are all true (and so the set is found to be consistent), this situation provides a counter-example to the arguments being valid, i.e. the existence of such a situation proves that the argument is not valid.

Counter-examples do not exist only for arguments, but also for statements:

Prime numbers are always odd		2 provides a counter-example (a number) to this statement. All animals have four legs			Human beings provide a counter-example (a type of animal). Years are 365 days long			Leap years provide a counter-example (a type of year). Years designated by a number divisible by four are leap years			The year 1900 provides a counter-example (a particular year). It always rains in England			A singularly sunny day in September (today, when written - a 								particular interval of time) provides a counter-example.

Counter-examples to declarative sentences refute their truth and are classes of things (thing being understood very broadly here) or particular things. Counter-examples to arguments refute their validity and are possible situations designated by sets of sentences (the counter-example set). Some clarification of the situation is often needed.

For example, take argument 4. It will be modified slightly as follows:

John has never had an accident; therefore, John is a safe driver.

It will be assumed here that accident means car accident and driver means motorist and safe means not liable to cause an accident. The counter-example set is:

John has never had an accident. John is not a safe driver.

Clarification by example: it may be that John has never driven in his life (and so never had an accident) because he is blind (and so cannot be considered a safe driver).

As mentioned, an inconsistent counter-example set implies that a conclusion is valid because it means that there is no situation under which the premises are all true and the conclusion is false (the negation of the conclusion is true).

Take argument 2; the counter-example set is:

All men are mortal. Socrates was a man. Socrates was not mortal.

These sentences cannot all be true at once. If Socrates was a man and he was not mortal, it could not be that all men are mortal. If all men are indeed mortal and Socrates was not mortal, he could not have been a man. If all men are mortal and Socrates was a man, he must have been mortal. Hence the counter-example set is inconsistent and the argument is valid.

Use a similar approach to show that arguments 3 and 7 are valid (and use it to consider argument 1). This method is known as reductio ad absurdum (which translates literally from Latin as "reduction to absurdity"). The negation of the conclusion is absurd given the truth of the premises and so the conclusion must be true.


text:
Introduction to Philosophical Logic/Formalisation/Propositional Calculus

=Propositional Calculus=

Natural languages, such as English, are flawed. One such flaw is ambiguity, another is that they are tedious to write out if they are long. However, sentences can be formalised into a symbolic, logical language that contains neither of these flaws (although, as the discerning reader will discover, natural languages have many advantages over these languages).

The first such language to be considered is the propositional calculus.


text:
Wikibooks:Programming languages bookshelf

Note: If you can't find what you're looking for here, check:
 * Computer programming for general topics.
 * Domain-specific languages bookshelf form Meta-Languages

= Alphabetically =

Ada – Bourne Shell Scripting

 * ActionScript —
 * Ada Language
 * Ada Programming (book information) (PDF)
 * Structured ~ Imperative ~ Procedural ~ Object oriented ~ Generic ~ Concurrent ~ Distributed ~ System ~ Embedded
 * Ada is a structured language with a Pascal like syntax which may make Ada a suitable teaching language. The Wikibook for Ada is the only Wikibook which has an entry for all Key concepts. Apart from academic use, Ada is professionally used in Air Traffic Control, Aviation (Commercial and Defense) , Rail Transportation, Communications (Satellites and Receivers) and Swiss banks - most of which are constantly on the lookout for good Ada programmers.
 * Ada Style Guide
 * This style guide is an update to the Ada 95 Quality and Style Guide to reflect the latest update to the language, commonly called Ada 2005. The purpose of this guide is to help computer professionals produce better Ada programs by identifying a set of stylistic guidelines that will directly impact the quality of their Ada programs.
 * AppleScript Programming
 * Assembly Languages
 * x86 Assembly
 * MIPS Assembly
 * 68000 Assembly
 * PowerPC Assembly
 * TI 83 Plus Assembly
 * 360 Assembly
 * 6502 Assembly
 * SPARC Assembly
 * Basic —
 * BlitzMax —
 * Business Basic
 * FutureBASIC
 * QBasic -
 * REALbasic
 * Visual Basic Classic -
 * Visual Basic is good for people who just want to make a program that works and has a GUI. Can only be used for Windows based systems however. Very good for Rapid Application Development but also perfectly usable for general purpose programming of many kinds.
 * Visual Basic .NET - object-oriented
 * While Visual Basic .NET retains most of the keywords that define the Visual Basic language its structure has been altered considerably. Within the .NET Framework it has become a powerful and flexible language now implementing true object-oriented design and threading amongst other enhancements.  While it is still largely limited to the Windows platform the Mono Project does support it on Linux.
 * DarkBASIC Programming
 * DarkBASIC is a powerful, direct X based programming language, developed so that everyday gamers can program their own games.
 * XBasic
 * XBLite
 * Bourne Shell Scripting -

C – FPI Script

 * C - - (|Index)  Structured ~ Imperative ~ Procedural
 * C is a system programming language and has a fairly simple syntax and a small set of keywords but with an extensive set of rules attached to those. It is also one of the most used languages. C is pretty much as low-level a programming language as you can get before assembly language. C was originally designed to program operating systems - specifically, it was designed to implement UNIX. It compiles to very small executables and it is used extensively in embedded systems with limited memory. C is the basis for, or has greatly influenced many modern programming languages such as Java, C#, PHP, and Python.

C++ is a general purpose, multi-paradigm mid-level programming language

 * C++ Programming - - Structured ~ Imperative ~ Procedural ~ Object oriented
 * C++ Programming As A Set Of Problems
 * Understanding C++
 * More C++ Idioms -

C#

 * C# Programming -
 * C# is a relatively new object-oriented programming language very similar to Java and is one of the four built-in languages for the .NET Framework by Microsoft. The Mono Project has also implemented much of .NET for other Operating Systems, such as Linux, BSD and OS X.  C# incorporates its features from C++, Java and also addresses their shortcomings.

 * Clojure
 * Concurrent Clean -
 * Common Lisp -
 * D - Structured ~ Object oriented ~ Functional (under development)
 * D is a programming language created by Walter Bright and available at Digital Mars. It's a C++ derivative with emphasis on execution efficiency, simple semantic models and safe features. D is a multi-paradigm language featuring garbage collection and contracts.  Support for functional programming is under development.  There is a comparison table available to show some of the features of D compared to well-established ones.

 * Learning to Program with D -
 * Delphi -
 * Eiffel - Object oriented ~ Design by contract
 * Eiffel is a pure real-world object-oriented language designed as such from the ground up in the early 1980s by Bertrand Meyer. It embodies several formal techniques, such as the use of assertions making them accessible to the programmer and designer in an integrated technique called design by contract, used to break down the functionality of software into cooperating modules (classes). The correct interaction of these modules is checked by the use of preconditions, postconditions, and class invariants, integrated with the exception handling mechanism. Eiffel incorporates an elegant design of multiple inheritance and generics.

 * Elm programming language
 * Elm is a strong-typed reactive functional programming language for declaratively creating graphical user interfaces. It compiles to Javascript so that programs can be shown in web browsers.

 * Erlang Programming -
 * Forth -
 * Fortran -
 * FPI Script -

Gambas – Lush

 * Gambas
 * Game Maker - (|Index) | Game Maker Programming/Tough Topics
 * Haskell - Functional
 * Icon
 * Io
 * Java Programming- - Object-Oriented ~ Concurrent
 * Java is an Object-Oriented Programming language, which can be used to teach the benefits of OO design and development, as well as advanced concepts as concurrent programming, exception handling and garbage collection (automatic memory management).

 * Java Tiger Certification
 * JavaScript -
 * Linoleum - A portable assembly
 * Lisp -
 * Lua Functional Programming
 * Lush

Mathematica – Perl

 * Mathematica -
 * MATLAB -
 * Maxima - CAS
 * MUMPS
 * mIRC Scripting -
 * Objective-C - Structured ~ Imperative ~ Procedural ~ Object oriented
 * Objective-C adds object-oriented features to C. The object-oriented model is based the SmallTalk model. Objective-C was developed by Brad Cox and was adopted by NeXT and so became the main language for programming MacOS and Cocoa.

 * OpenMP
 * PBASIC Programming
 * OpenGL
 * Oz
 * Pascal - structured programming
 * Initially, Pascal was a hypothetical language intended to teach students structured programming, and generations of students have "cut their teeth" on Pascal as an introductory language in undergraduate courses. Pascal was developed by Niklaus Wirth, who also developed Modula and Oberon as more real-world languages. Variants of Pascal are still widely used today, both in education and software development.

 * Performance Guide
 * The Performance Guide gives all developer, programmers and architects information to create performant application.

 * Perl -
 * Perl is an interpreted language. It is commonly used as a text manipulation, reporting, glue, and as a general programming language. Its availability on multiple computer platforms has led to its use as a cross-platform development tool. In the Unix environments it is often used as a substitute for shell scripting.

PHP – XForms

 * PHP -
 * PHP is a server side language that is used in the development of dynamic webpages. PHP syntax is very similar to C syntax. PHP usually uses the MySQL database server to load page information, although it can connect to other database servers like Oracle or Microsoft SQL Server. PHP was originally based on Perl.

 * Prolog -
 * Prolog is a language based on first-order predicate calculus - a system of expressing mathematical logic. In contrast to the more popular axiom of definitive programming, Prolog programs are declarative, which means that programmer declares a set of rules and facts and the user asks questions. It is the machine task to find a way of answering the question using the rules and facts. Learning Prolog will allow you to better understand computer assisted analysis of natural-language sentences and enhance your abilities as artificial-intelligence programmer.

 * Python Programming -
 * Python has a very clean and readable syntax and is run through an interpreter, which makes it easy to play with small examples, the downside of this dynamism being that Python programs typically require much more testing than in other languages. It is used for many real world, large scale projects such as MayaVi, Google, and Zope, and has been employed by organizations such as NASA for coordinating large banks of computers--a task Python has proven well-suited for.

 * Non-Programmer's Tutorial for Python 2.6 -
 * This book is a tutorial designed to be an introduction to the Python programming language. This guide is for someone with no programming experience, and because Python is considered to be a very good beginner's language, it may also serve as a general introduction to programming.

 * Non-Programmer's Tutorial for Python 3.0 -
 * This book is a tutorial designed to be an introduction to the Python 3.0 programming language. This guide is for someone with no programming experience, and because Python is considered to be a very good beginner's language, it may also serve as a general introduction to programming.  Python 3.0 and Python 2.x are different enough that the Non-Programmer's Tutorial for Python 2.6 has been converted to a new Python 3.0 tutorial.
 * A More Efficient Prime Number Generating Algorithm. Techniques and samples in Python.
 * An Introduction to Python For Undergraduate Engineers

 * Rebol Programming -
 * R Programming the open source statistical language
 * RPG
 * Ruby Programming - Object oriented
 * Ruby is a reflective, object-oriented programming language. It combines syntax inspired by Ada and Perl with Smalltalk-like object-oriented features, and also shares some features with Python, Lisp, Dylan and CLU. Ruby is a single-pass interpreted language. Ruby is said to follow the principle of least surprise (POLS), meaning that the language typically behaves intuitively or as the programmer assumes it should. Yukihiro Matsumoto, the developer of the Ruby language, noted that his primary design consideration was to make programmers happy by reducing the menial work they must do, following the principles of good user interface design. Currently, the Ruby on Rails framework has been getting much attention from the web development community for the ease and speed it provides in developing database-driven web applications.

 * SAS
 * Scriptol
 * Scheme
 * Scratch - Scratch is a graphical "block-based" programming language derived from Smalltalk, but oriented toward teaching children fundamental computer programming concepts.  The reference version of this language is written in Squeak, another derivative of Smalltalk.
 * Smalltalk -
 * Stata
 * Sway
 * Tcl - Tcl (Tool Command Language) is a dynamic programming/scripting language based on concepts of Lisp, C, and Unix shells. It can be used interactively, or by running scripts (programs). Traditionally procedural in style, it is very easy to use concepts of functional or object-oriented programming. Tcl is open source, BSD-licensed, and runs on most platforms.
 * TI-Basic 84 Programming -
 * TI-Basic 89 Programming
 * Vala Programming
 * Visual Basic Classic -
 * Visual Basic .NET -
 * XForms -

= Categorized by Paradigm =

A brief description of each language is provided in the alphabetical listing, if available.

Functional programming languages

 * Elm programming language
 * Erlang -
 * F# -
 * Haskell
 * Lisp -
 * Scheme
 * Sway

 * Description of "Functional programming" : in wikibooks, in wikipedia.

Imperative, procedural programming languages

 * Assembly Languages-
 * x86 Assembly -
 * MIPS Assembly -
 * Programming:68K assembly -
 * Programming:PowerPC assembly -
 * Basic -
 * DarkBASIC Programming
 * QBasic -
 * Visual Basic Classic -
 * Visual Basic .NET -
 * C - (|Index)
 * Forth
 * Fortran
 * Icon
 * MUMPS
 * Pascal -
 * Perl -
 * PHP
 * RPG

 * Description of "imperative programming": in wikibooks, in wikipedia.
 * Description of "procedural programming": in wikibooks, in wikipedia.

For more imperative and procedural programming languages look at Multi-paradigm languages

Logic programming languages

 * Prolog -

 * Description of "Logic programming": in wikipedia.

Multi-paradigm languages

 * Ada Programming
 * C++ Programming -  (|Index).
 * Common Lisp -
 * D Programming -
 * Delphi Programming -
 * Fortran -
 * Game Maker Programming - (|Index)
 * JavaScript -
 * Oz -
 * Objective-C Programming-
 * Pascal Programming -
 * Python Programming -
 * Non-Programmer's Tutorial for Python 2.6 -
 * Non-Programmer's Tutorial for Python 3.0 -
 * Sway
 * Tcl Programming -
 * Visual Basic Classic -

 * Description of "Multi-paradigm programming": in wikipedia.

Object-oriented programming languages

 * C# Programming -
 * Lisp (with help of CLOS)
 * Io
 * Java Programming - - (old text)
 * Python Programming -
 * Ruby Programming -
 * Smalltalk
 * Sway
 * Visual Basic .NET -
 * C & C++ X

 * Description of "Object-oriented programming": in wikibooks, in wikipedia.

For more Object-oriented programming languages look at Multi-paradigm languages

Design by Contract

 * D -
 * Eiffel

 * Description of "Design by Contract": in wikibooks, in wikipedia.

= Categorized by Operating System=

Almost all programming languages are operating system independent and even the languages named here are often ported to operating system foreign to them.

Macintosh

 * AppleScript Programming
 * Objective-C -
 * FutureBASIC
 * Programming Mac OSX with Cocoa for Beginners -
 * SuperCard

Microsoft Windows

 * C# Programming -
 * Game Maker -
 * Visual Basic Classic -
 * Visual Basic .NET -
 * DarkBASIC Programming

Unix Compatible Systems

 * Bourne Shell Scripting -
 * ANSI C with Unix

=References=

de:Regal:Programmierung


text:
User:Yath~enwikibooks/Python

' NOTE: This page is mostly obsolete and the reorganization has been accomplished. '

This is a scratch page for reorganizing Programming:Python. The book currently has two tables of contents. One of them may or may not represent a reasonable progression through the subject. At any rate, the book is in an amazing state of disarray; I'll try to evaluate and plan some reconstruction here.

These are just the pages that exist. There are also many red links.

''' This page has three sections. ''' One of them is an outline, so I won't be putting in headings and subheadings here (they would interfere with the outline). They are:

 * Analysis of old content
 * New section outline
 * Copy of old content

Potential outline

Introduction
This section is for lighthearted reading, and to prepare the reader for the next section (learning to program).

Learning to program in Python
This section presents a series of examples and exercises of increasing depth and complexity. It sort of follows the sequence of the "Python concepts" section, but tosses in bits from more advanced and less advanced sections. For example, when the sample programs seem to be playing with "flow control" (loops etc.) the os module might be imported and used for a simple function (from ahead) and triple-quoted multiline strings might pop in (from behind). This sort of stuff is done sparingly, because you don't want to overwhelm the reader. It is necessary, however, to keep people from becoming too bored. And it can usually be ignored, unless the reader gets too curious, in which case they can turn to the section on the os module and read up a bit.

Python concepts
This section is like a concept reference. Want something that's a step up from a list of flow control operators? Here it is. Every idiosyncracy of 'if-else-elif-unless' is clearly presented and explained. This would be inappropriate for the learning section. This is the place for completeness.

Operators
Math, concatenation. Perhaps backticks (number-to-string-conversion) belongs here. Remember to include a precedence table.

Standard modules
All or most standard modules, complete function lists, explained.

Function reference
Built-in functions explained.

COPY OF OLD CONTENT

Contents
 * Beginning Python
 * Python syntax and functions
 * Python features
 * Python and data (lists)
 * Code and interfaces in Python
 * Advanced Python

Beginning Python
 * Basic Concepts
 * Modules
 * Variables
 * Data Types
 * Simple Input and Output
 * Simple math
 * Program Flow
 * Procedures and Functions
 * Python classes and instances
 * Libraries
 * Further math in Python
 * Basics of Compilation
 * Exercises

In-depth Python ideas
 * String Manipulation
 * Programming Structure and Style
 * Python complex types
 * Error Catching
 * Operator Overloading
 * Standard libraries
 * Strings and Regular Expressions
 * Files and Directories
 * Storing Data and Objects
 * Networking
 * Standard Internet Protocols
 * Memory Management
 * Generators and the generator protocol

Python and beyond
 * A simple tutorial in Python
 * Python installation
 * Combining Languages
 * Commented Source Code Library

title: User:Yath~enwikibooks/Python


text:
Introduction to Economics

Economics is the social science of studying the production, distribution and consumption of goods and services and It is a complex social science that spans from mathematics to psychology. At its most basic, however, economics considers how a society provides for its needs. Its most basic need is survival; which requires food, clothing and shelter. Once those are covered, it can then look at more sophisticated commodities such as services, personal transport, entertainment, the list goes on. Today, this social science known as "Economics" tends to refer only to the type of economic thought which political economists refer to as Neoclassical Economics. It developed in the 18th century based on the idea that Economics can be analysed mathematically and scientifically.

What is Value?
A generally accepted notion of Value is the worth of goods and services as determined by markets. Thus an important part of Economics is the study of policies and activities for the generation and transfer of Value within markets in the form of goods and services. Often a measure for the worth of goods and services is units of currency such as the US Dollar, peso, etc... But, unlike the units of measurements in Physics such as Seconds for Time, there exists no absolute basis for standardizing the units for Value. Usually the value of a currency is related to the value of Gold, which in turn is valued by amount or number of goods and services that it can be exchanged for. Because the rate of production of gold in the world is slower than the rate of creation of goods and services, the relation between gold and currencies is not as strict as it used to be.

Thus, one of the most complicated and most often misunderstood parts of economy is the concept of value. One of the big problems is the large number of different types of values that seem to exist, such as exchange-value, surplus-value, use-value

The discussion of values all start with one simple question: What is something worth?

Today's most common answer is one of those answers that are so deceptively simple that it seems obvious when you know it. But then remember that it took economists more than a hundred years to figure it out: Something is worth whatever you think it is worth. In 1st century BC, Publilius Syrus wrote: "Something is only worth what someone is willing to pay for it".

This statement needs some explanation. Take as an example two companies that are thinking of buying a new copying machine. One company does not think they will use a copying machine that much, but the other knows it will copy a lot of papers. This second company will be prepared to pay more for a copying machine than the first one. They find different utility in the object.

The companies also have a choice of models. The first company knows that many of the papers will need to be copied on both sides. The second company knows that very few of the papers it copies will need double sided copying. Of course, the second company will not pay much more for this, while the first company will. In this example, we see that a buyer will be prepared to pay more for the increase in utility compared to alternative products.

But how does the seller value things? Well, in pretty much the same way. Of course, most sellers today do not intend to use the object he sells himself. The utility for the seller is not as an object of usage, but as a source of income. And here again it is marginal utility that comes in. For which price can you sell the object? If you put in some more work, can you get a higher price?

Here we also get into the resellers utility. Somebody who deals in trading will look at an object, and the utility for him is to be able to sell it again. How much work will it take, and what margins are possible?

So not only do the two different buyers have a different value on an object, the salesman puts his value on it, and the original manufacturer may have put yet another value on it. The value depends on the person who does the valuation, it is subjective.

So, how do all these subjective values turn into the price? To understand that, we must take a look at the place where things are bought and sold: /The market/.

The Market
A market is an often national but increasingly international legally, autonomous or semi-autonomous, defined place, system or arrangement. Where economic agents (producers, facilitators, sellers, buyers, investors and speculators, etc) come into close contact with each other for the purpose of economic transactions. Not only can it simply consist on a limited electronic marketplace such as eBay but in its broader sense markets are aggregated specific around their rules or intrinsic uniqueness. The things that congregates agents or product(s).

We can for instance refer to the wine market (that is specific without more context to all the things related to the national wine economy) but we can also specify the global Porto market (that is specific to a specific type of wine, national regarding the Porto brand) to congregate its global economic agents.

Setting a price
An object's Value, worth and utility is not something fixed, but instead a subjective property of the object. This subjectivity may be a bit surprising, it is easy to imagine that something must have an objective worth being bought and sold. However this is not the case, in fact, it's the opposite.

When somebody has an item to sell, he puts a value on this item, and will not sell under that value. Likewise, when somebody wants to buy something, he will put a value on the object, and will not pay more than this. If these valuations overlap, so that the buyer's valuation is higher than the seller's valuation, the object will be sold. If the seller's valuation is higher than the buyer's, the buyer will simply say "it's not worth it" or the seller will say "it's worth more than that" and no deal will be made.

Of course, you don't haggle about price every time you buy a candy bar, but you still agree on a price. It's just that the store owner has put up a sign with a price, and you can either accept it or reject it. Neither you nor him want to haggle about something that just costs eighty cents, because it's simply not worth the effort. So even though haggling is not a necessary part of the pricing, both the buyer and seller agrees on the price, and both think they are better off after the exchange. Think about this: If you would think you would be worse off after buying something, would you buy it? Of course not, so buying and selling is an act done by free will. (Unless of course somebody is pointing a gun at you, but then it's not buying and selling, but stealing.)

Now, we know that the price ends up somewhere between the seller's valuation of the item and the buyer's valuation of the item. The question of what the price of an item will be, therefore depends on these valuations. What, then will these valuations depend on?

If an object had an intrinsic, objective worth, and both seller and buyer were aware of it(and had the same preferences, or valuation), the buyer's and seller's valuation of the object would never overlap, and no deal would ever be cut, because the seller would never be willing to sell it at a price less than the objective worth [or else he would be in loss] and the buyer would never be willing to buy it at a cost higher than the objective worth [why would he?], and hence, nobody would ever sell or buy anything. The subjectiveness of value is necessary for things to be sold and bought at all.

Free and Regulated markets
The description above is of a free market, where anyone can buy and sell, and where price is set by buyer and seller alone. This is not always the case. Instead many markets are regulated.

While the national government may hold the ultimate control over national affairs, at least to some degree, depending on its level of political/economical independency, often it will delegate the power to private or non-governmental public authorities, even to supra national or international institutions to oversee the regulatory needs, internationally there may be also be other regulations due to treaties and accords.

A form of sanctioned bureaucratic approval is often necessary to limit either the people involved or the prices or both, or to make sure the action/function is not a danger to others. For example, not everyone is allowed to sell medicine, claim to be a doctor or drive a taxi. But it goes beyond public security, it can be generalized primarily as a way to protect special interest groups, more than the good of the general public. Regulated markets include for instance valuable metals, currency, weapons, technical functions (practice of medicine, drug production, prescription, sale) and even educational accreditation and technology. This regulations can take many shapes, for example the control of prices, movement/transfer, establishing of quality and quantity gradients and the freedom and requirements to practice a job/function.

Of course, it can be said today that all markets are regulated in some way. When the state sets up the rules for making the market function smoothly is not usually seen as making the market non-free, at best it is to exert control (protect, manage), preserve market (social-economic) stability and increase national competitiveness.

Money
Money is such an obvious and integral part of today's society, that it is sometimes difficult to imagine society without it. It's also a very abstract concept, and can be hard to grasp. It comes in many forms, from special types of sea-shells, to pigs, and via the paper and coin system to digital blips in a computer. But what is money, really?

As we have seen, people value things differently. But communicating this value to somebody else is a problem. The only way you can communicate this value is by comparing it with other things. But since all others, just like you, have subjective values, it becomes complex and confusing. This gets evident if we look at how value impacts on barter

The complexities of barter
When exchanging goods by barter, you need to find something you want more than something you have, while the person you barter with has to value the thing you have more than the thing you want. There are four individual valuations that must match.

An example might clear things up: If what you really want is some shoes, and the thing you have that you want to get rid of is a chair, you have to find a shoemaker that needs a chair, or you will not get any shoes. Say that the shoemaker instead needs a lamp. Then you can find somebody else that needs a chair, and has a lamp, barter that, and then go to the shoemaker.

Now, the big problem here is that when you are to value the lamp, it is no longer what you think of the lamp that is important. It's what the shoemaker thinks of the lamp. You need to guess its average value, so that you can be reasonably sure that the shoemaker will want it. The effect of this is that you pretty much need to know how people value almost everything, since you'll be forced into bartering almost everything.

This type of direct barter system may seem to some as not very efficient, but in fact may be extremely efficient if done in the proper context and with the needed infrastructures, especially in today technological world. The reason we don't do it like that ? Well, we can only state that it is not the general norm. There are plenty of communities that still use barter systems. Bartering is also the system that is adopted as soon as any other more complex system fails or loses trust. But due to the way trade evolved with the appearance of larger markets and adoption of currency the need of an increased level of economic control and taxation become evident to ruling classes and inevitable beyond the level of city states.

The essence of money
So in essence, money is a common value system. It quantifies the value of an object in a way that everyone understands, and it makes communicating with others simpler. Instead of weighing the values of the shoes against the lamp against the chair, you can set a number on it. You can say that your chair is worth five units, the lamp maker can value his lamp to three units and the shoemaker thinks his shoes are worth four units. We can now instantly and easily compare values. Trading suddenly got much easier.

But that's not all. With a common value system that is based on exchangeable entities, we can exchange these entities as payment. You can now go down with your chair to the market, sell the chair to the highest bidder, and then go with your money to the shoemaker, and buy a couple of shoes. The shoemaker in turn takes the money and goes to the lamp maker. No longer do you need to evaluate the average market value of the lamp, or cut three-way deals. All you need to do is find somebody that is willing to pay what you think your chair is worth, and find a pair of shoes that is cheap enough for you.

And it doesn't even end there! Money can be stored because it does not rot like wood or rust like steel. If you have a source of income that is seasonal you can keep the money you make during high-season and buy food with it during low season.

So money is simply a common value system based on exchangeable entities. But this simple concept makes life much less complicated in so many ways.

Supply and Demand
The principle of supply and demand is one of the best-known principles of economic theory. It was first posited by Jean-Baptiste Say, an 18th-century Classical Political Economist who suggested that demand and supply are interrelated. His theory was that the more people want something, the higher the demand is for it and the more they will value it. So if something is in low supply but in high demand the value is increased, as it will decrease if there is an abundance or a low demand for the that item. For example: There are 100 dolls and 400 people that want those dolls. Since there are more people than there are dolls, people will pay more money for them.

Alfred Marshall, a famous neoclassical economist, went further in the mid-20th century and developed a mathematical model of supply and demand. The two variables in this theory are price and quantity. The forces of demand and supply are prominent in determining the price of a commodity.

DEMAND- Is the amount of a good that will be bought at given prices over a period of time.

SUPPLY- Is the amount of a good that sellers are prepared to sell at a given price. MARKET SYSTEM/ PRICE MECHANISM- Is the automatic determination of prices and the allocation of resources by the operation of markets in the economy.

PRICE- Is the amount of money goods are exchanged for in a transaction.

Capital
Capitalism, as its name suggests, is based on the ownership of capital. What is capital? Basically, capital is anything that can be traded for something else. Any amount of money is capital, as it can be traded for a huge variety of things. Personal items are also capital because they can be sold; houses, cars, and other bizarre items fall under this category. The ability to work can also be considered capital, or labour-power.

Karl Marx first posited that perhaps there was something that separated capital into two broad categories. Some capital is bought, and then the value is fixed; this applies for an item of clothing or food, for instance. Some may lose value and depreciate; cars fall into this category. Some capital, however, can actually produce more capital which can then be sold; this, he argued, is real capital. For example, if you have a cookie-stamper and a van, some flour, butter, and other cookie ingredients, with that capital, you could produce cookies and ship them around in the van selling them for a profit, albeit small.

title: Introduction to Economics


text:
Python Programming/Interactive mode

Python has two basic modes: script and interactive. The normal mode is the mode where the scripted and finished  files are run in the Python interpreter. Interactive mode is a command line shell which gives immediate feedback for each statement, while running previously fed statements in active memory. As new lines are fed into the interpreter, the fed program is evaluated both in part and in whole.

Interactive mode is a good way to play around and try variations on syntax.

On macOS or linux, open a terminal and simply type "python". On Windows, bring up the command prompt and type "py", or start an interactive Python session by selecting "Python (command line)", "IDLE", or similar program from the task bar / app menu. IDLE is a GUI which includes both an interactive mode and options to edit and run files.

Python should print something like this:

$ python Python 3.0b3 (r30b3:66303, Sep 8 2008, 14:01:02) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>>

(If Python doesn't run, make sure it is installed and your path is set correctly. See Getting Python.)

The >>> is Python's way of telling you that you are in interactive mode. In interactive mode what you type is immediately run. Try typing 1+1 in. Python will respond with 2. Interactive mode allows you to test out and see what Python will do. If you ever feel the need to play with new Python statements, go into interactive mode and try them out.

A sample interactive session:

>>> 5 5 >>> print(5*7) 35 >>> "hello" * 2 'hellohello' >>> "hello".__class__

However, you need to be careful in the interactive environment to avoid confusion. For example, the following is a valid Python script:

If you try to enter this as written in the interactive environment, you might be surprised by the result:

>>> if 1: ...  print("True") ... print("Done") File " ", line 3 print("Done") ^ SyntaxError: invalid syntax

What the interpreter is saying is that the indentation of the second print was unexpected. You should have entered a blank line to end the first (i.e., "if") statement, before you started writing the next print statement. For example, you should have entered the statements as though they were written:

Which would have resulted in the following:

>>> if 1: ...  print("True") ... True >>> print("Done") Done >>>

Interactive mode
Instead of Python exiting when the program is finished, you can use the -i flag to start an interactive session. This can be very useful for debugging and prototyping.

python -i hello.py

For i in range(-1,-5,-1): print(i)

title: Python Programming/Interactive mode


text:
Talk:Python Programming/Basic Syntax

Here is some text rescued from another page about Python's syntax:

Python's syntax is somewhat similar to the C programming language. It uses the following flow. statement (parameters)

For example an if statement is notice the lack of a semicolon to end the statement, and the use of white space.

Yath 20:22, 24 Sep 2004 (UTC)

the last digit of \pi is wrong.

title: Talk:Python Programming/Basic Syntax


text:
Talk:Python Programming/Data Types

A page called "Programming:Python features" which was just a list of data types had the following text, which duplicates what's already on this page. Some of it may be useful in this page.

Data Containers

Python has four basic types of data:

String A sequence of alpha numeric characters which is immutable.

e.g. mystring="fourteen and five" (The letters to the left are the name of the string, quotes marks denote a string, and the letters and spaces within the quotes are elements of the string)

Python has a very flexible quoting syntax. Quotes can be either single quotes (tics) or double quotes (regular quotation marks) and either can contain the other as quoted text, as follows:

"Will's foot hurt"

'Ben said, "Would you look at that!"'

A string may also be prefaced with the character 'r' for 'raw', which means that escape characters will be taken as literals.

'This string contains \n a newline'

r'This string contains just a \n slash and an en'

Either quote may also be used tripled to contain any characters, including newlines, as below:

""" Most Python methods and objects

are commented in blocks surrounded by tripled quotes, like this.

"""

List

A sequence of elements, either strings, numbers or other objects.

e.g. mylist=[1,3,"four", Python.class] The square brackets denote a list, and the enclosed items are elements (of various types) within the list. Lists are mutable, i.e. they can be concatenated or added together, with the result being a list.

Dictionary

Dictionaries are arrays which are indexed more flexibly than simply with an integer. A dictionary contains pairs in the form (key, value). The keys in these key-value pairs can be most Python objects, with a few exceptions you don't need to worry about until you've got more of the language behind you. The values can be any Python object, as far as I know. Dictionaries are represented with curly braces - {}

A dictionary is declared like this:

person = {'name':'Phil', 'address':'1234 Blue Lane', 'spouse':anotherPerson}

The values are accessed in a number of ways, but the most common are:

aName = person['name'] (stores the value 'Phil' in aName)

person['shoesize']= 9 (stores the value 9 in the new key 'shoesize')

Tuple

A tuple is a sequence of values much like a list, except that it is immutable, like a string. Tuples are represented by parentheses, like this:

(1,2,3,'a',anObject)

A tuple can be a sequence of length one, but the literal form has a trailing comma so the interpreter can tell what you're doing:

(1,)

Yath 20:27, 24 Sep 2004 (UTC)

Right out?
Maybe somebody should clarify that. I don't think "right out" is a common phrase and it could be confusing.

Example of long integers

 * = $$111111111^2$$
 * = $$30!$$
 * = $$60!$$
 * = $$2^{128}$$

Please make some long integers within these examples! Preceding comment signature by an IP address: 2405:9800:BA30:C21A:BD93:B478:D224:4256 (discuss) 09:34, 18 August 2019 (UTC)

title: Talk:Python Programming/Data Types


text:
Python Programming/Creating Python Programs

Welcome to Python! This tutorial will show you how to start writing programs.

Python programs are nothing more than text files, and they may be edited with a standard text editor program. What text editor you use will probably depend on your operating system: any text editor can create Python programs. However, it is easier to use a text editor that includes Python syntax highlighting.

Hello, World
The very first program that beginning programmers usually write or learn is the "Hello, World!" program. This program simply outputs the phrase "Hello, World!" then terminates itself. Let's write "Hello, World!" in Python!

Open up your text editor and create a new file called  containing just this line (you can copy-paste if you want):

The below line is used for Python 3.x.x

You can also put the below line to pause the program at the end until you press anything.

This program uses the  function, which simply outputs its parameters to the terminal. By default,  appends a   character to its output, which simply moves the cursor to the next line.

Now that you've written your first program, let's run it in Python! This process differs slightly depending on your operating system.

Windows

 * Create a folder on your computer to use for your Python programs, such as, and save your   program in that folder.
 * In the Start menu, select "Run...", and type in . This will cause the Windows terminal to open.
 * Type  to change directory to your   folder, and hit Enter.
 * Type  to run your program!

If it didn't work, make sure your PATH contains the python directory. See Getting Python.

Mac

 * Create a folder on your computer to use for your Python programs. A good suggestion would be to name it  and place it in your Home folder (the one that contains folders for Documents, Movies, Music, Pictures, etc). Save your   program into it. Open the Applications folder, go into the Utilities folder, and open the Terminal program.
 * Type  to change directory to your   folder, and hit Enter.
 * Type  to run your program!

Linux

 * Create a folder on your computer to use for your Python programs, such as, and save your   program in that folder.
 * Open up the terminal program. In KDE, open the main menu and select "Run Command..." to open . In GNOME, open the main menu, open the Applications folder, open the Accessories folder, and select Terminal.
 * Type  to change directory to your   folder, and hit Enter.
 * Don't forget to make the script executable by chmod +x.
 * Type  to run your program!

Linux (advanced)

 * Create a folder on your computer to use for your Python programs, such as.

 * Open up your favorite text editor and create a new file called  containing just the following 2 lines (you can copy-paste if you want):

 * save your  program in the   folder.
 * Open up the terminal program. In KDE, open the main menu and select "Run Command..." to open Konsole. In GNOME, open the main menu, open the Applications folder, open the Accessories folder, and select Terminal.
 * Type  to change directory to your   folder, and hit Enter.
 * Type  to tell Linux that it is an executable program.
 * Type  to run your program!
 * In addition, you can also use  to make a symbolic link   to   under the name , then run it by simply executing.

Note that this mainly should be done for complete, compiled programs, if you have a script that you made and use frequently, then it might be a good idea to put it somewhere in your home directory and put a link to it in /usr/bin. If you want a playground, a good idea is to invoke  and then put scripts in there. To make ~/.local/bin content executable the same way /usr/bin does type  (you can add this line to your shell rc file, for example ~/.bashrc).

Result
The program should print: Hello, world! Congratulations! You're well on your way to becoming a Python programmer.

Exercises

 * 1) Modify the  program to say hello to someone from your family or your friends (or to Ada Lovelace).
 * 2) Change the program so that after the greeting, it asks, "How did you get here?".
 * 3) Re-write the original program to use two  statements: one for "Hello" and one for "world". The program should still only print out on one line.

Solutions


text:
Algorithm Implementation/Sorting/Merge sort

Merge Sort
You start with an unordered sequence. You create N empty queues. You loop over every item to be sorted. On each loop iteration, you look at the last element in the key. You move that item into the end of the queue which corresponds to that element. When you are finished looping you concatenate all the queues together into another sequence. You then reapply the procedure described but look at the second last element in the key. You keep doing this until you have looped over every key. When you complete this process the resulting sequence will be sorted as described above.

Key Comparing
Keys are compared in the following way: Let ka be the key of the one item, called item A, let kb be the key of the other item, called item B. Let ka(i) be the ith entry in the key ka, where the first entry is at index 0. Let i = 0. If the keys are less than i elements long then the keys are equal. If ka(i) < kb(i), then item A is ordered before item B. If ka(i) > kb(i), then item B is ordered before item A. If ka(i) = kb(i), then add one to i, and return the line under "Let i = 0."

Time Cost
Let ni be the number of items in the sequence to be sorted. N is number of integers that each key element can take. Let nk be the number of keys in each item.

The total time to sort the sequence is thus O(nk(ni + N)).

Common Lisp
Naive implementation, translation of pseudocode found at Wikipedia.

Simpler Implementation in a somewhat more functional style.

C++
A recursive implementation using the C++14 standard library.

Haskell
sort :: Ord a => [a] -> [a] sort []        =  [] sort [x]       =  [x] sort xs        =  merge (sort ys) (sort zs) where (ys,zs) = splitAt (length xs `div` 2) xs    merge [] y=y merge x []=x merge (x:xs) (y:ys) | x<=y = x:merge xs (y:ys) | otherwise = y:merge (x:xs) ys

A slightly more efficient version only traverses the input list once to split (note that  takes linear time in Haskell):

Prolog
This is an ISO-Prolog compatible implementation of merge sort.

Python
A "standard" mergesort:

An alternative method, using a recursive algorithm to perform the merging in place (except for the O(log n) overhead to trace the recursion) in O(n log n) time:

JavaScript
Separate into two functions:

OCaml
Using a functor to create modules that specialize sorting lists of a given type with a particular comparison function:

Implementazioni di algoritmi/Merge sort


text:
Data Structures/Singly Linked Lists

Singly Linked Lists are a type of data structure. A linked list provides an alternative to an array-based structure.

A linked list, in its simplest form, in a collection of nodes that collectively form linear sequence.

In a singly linked list, each node stores a reference to an object that is an element of the sequence, as well as a reference to the next node of the list. It does not store any pointer or reference to the previous node.

To store a single linked list, only the reference or pointer to the first node in that list must be stored. The last node in a single linked list points to nothing.

See also Linked Lists.

title: Data Structures/Singly Linked Lists


text:
Python Programming/Creating Python programs/Solutions

< Back to Problems

1. Modify the hello.py program to say hello to a historical political leader (or to Ada Lovelace).

This is just a matter of replacing world with a different name, for example:

2. Change the program so that after the greeting, it asks, "How did you get here?".

This can be accomplished by adding a second print statement:

3. ''Re-write the original program to use two print statements: one for "Hello" and one for "world". The program should still only print out on one line.''

This can be accomplished by passing the end parameter in the first print statement, and telling it to finish the output with a space (Python 3):

When using Python 2.6 and up, you can use the ',' operator to prevent print from inserting a newline at the end.The ',' instead inserts a space at the end of the string to be printed. When using print as a function, the comma is placed outside the parentheses (Python 2.7.5).


text:
Australian History/Early Explorers

‹ Return to the Contents ‹ Back to First Settlers

Prior to the arrival in Australia of Captain James Cook, Australia has been the focus both of European mythology, as Terra Australis. Similarly, contrary to popular mythology, a number of non-Indigenous explorers have travelled to Australia prior to Captain Cook's 'discovery' of the continent.

Terra Australis
The term "Terra Australis" was first introduced by Aristotle. Aristotle's ideas were later expanded by Ptolemy, a Greek cartographer from the first century AD, who believed that the Indian Ocean was enclosed on the south by land. When, during the Renaissance, Ptolemy became the main source of information for European cartographers, the land started to appear on their maps. Although voyages of discovery sometimes did reduce the area where the continent could be found, cartographers kept drawing it on their maps and scientists argued for its existence with such arguments as that there should be a large landmass in the south as a counterweight against the known landmasses in the Northern Hemisphere. Usually the land was shown as a continent around the South Pole, but much larger than the actual Antarctica, spreading far north in particular in the Pacific Ocean area. New Zealand, discovered by Abel Tasman in 1642, was by some regarded as a part of the continent as well as Africa and Australia.

The idea of Terra Australis was finally corrected by James Cook. On his first voyage he circumnavigated New Zealand, showing it could not be part of a large continent. On his second voyage he circumnavigated the globe at a very high southern latitude, at some places even crossing the south polar circle, showing that any possible southern continent must lie well within the cold polar areas, and not in regions with a temperate climate as had been thought before.

Marco Polo and Cristóvão de Mendonça
In about 1300, Marco Polo made reference to the reputed existence of a vast southern continent, although there is no evidence that he had specific knowledge of Australia. Some writers have suggested that maps compiled in Europe from the late 1400s show parts of the Australian coastline. Some believe that Australia was sighted by a Portuguese expedition led by Cristóvão de Mendonça in about 1522. A number of relics and remains have been interpreted as evidence that the Portuguese reached Australia in the early to mid 1500s, 200 years before Cook. These clues include the Mahogany Ship, an alleged Portuguese caravel that was shipwrecked six miles west of Warrnambool, Victoria (although its remains have never been found); a stone house at Bittangabee Bay; the so-called Dieppe map, a secret map drawn by the Portuguese; a cannon and five keys found near Geelong. Most historians do not accept these relics as proof that the Portuguese discovered Australia.

Binot Paulmyer
The French navigator Binot Paulmyer claimed to have landed at Australia in 1503, after being blown off course. However later investigators concluded it was more likely he was in Madagascar. French authorities again made such a claim in 1531.

Luis Vaez de Torres
Luis Vaez de Torres was the first of the 17th century Portuguese maritime explorers. A Portuguese expedition commanded by de Torres and piloted by Pedro Fernandez de Quiros set out for Australia in 1605. They sailed from east to west along the southern coast of Papua, and sighted the islands of Torres Strait. When de Quiros landed on the New Hebrides, he named the island group "Austrialia del Espiritu Santo", translated as "South Land of the Holy Spirit".

The first undisputed sighting of Australia by a European was made in 1606. The Dutch vessel Duyfken, captained by Willem Jansz, explored perhaps 350km of western side of Cape York, in the Gulf of Carpentaria. The Dutch made one landing, but were promptly attacked by Aboriginals and subsequently abandoned further exploration.

Dirk Hartog
In 1616 Dirk Hartog landed on what is now called Dirk Hartog Island, off the coast of Western Australia, and left behind an inscription on a pewter plate. (This plate may now be seen in the Rijksmuseum in Amsterdam.) The Dutch named the western half of the continent New Holland, but made no attempt to colonise it. Further voyages by Dutch ships explored the north coast of Australia between 1623 and 1636, giving Arnhem Land its present-day name.

Abel Tasman
In 1642, Abel Tasman sailed on a famous voyage from Batavia (now Jakarta), to Papua New Guinea, Fiji, New Zealand and, on November 24, sighted Tasmania. He named it Van Diemen's Land, after Anthony van Diemen, the Dutch East India Company's Governor General at Batavia, who had commissioned his voyage. Tasman claimed Van Diemen's Land for the Netherlands.

The discovery that sailing east from the Cape of Good Hope until land was sighted, and then sailing north along the west coast of Australia was a much quicker route than around the coast of the Indian Ocean made Dutch landfalls on the west coast inevitable. Most of these landfalls were unplanned. The most famous and bloodiest result was the mutiny and murder that followed the wreck of the Batavia.

William Dampier
William Dampier first explored the north-west coast of Australia in 1688, in the Cygnet, a small trading vessel. He made another voyage in 1699, before returning to England. The first Englishman to see Australia, he was able to describe some of the flora and fauna of Australia, being the first to report Australia's peculiar large hopping animals.

title: Australian History/Early Explorers


text:
User:Ebel~enwikibooks

I am known as Ebelular on Wikipedia. Ebel was already taken in Wikipedia.

My Wikipedia userpage there is here

title: User:Ebel~enwikibooks


text:
Introduction to Philosophical Logic/Complex sentences and sentence functors

The reductio ad absurdum method can be extended to complex sentences. A complex sentence is a sentence made up of smaller sentences, for example "Sarah can swim but she cannot dive" is made up of the declarative sentences "Sarah can swim" and "She cannot dive", linked by the conjunction "but". Such words and phrases that link other declarative sentences are sentence functors. A functor is the part of a language that stands for a function. For instance "y=sin(x)" is a statement (in a particular mathematical notation) about the function sine and "sin" is the functor that stands for this function in that statement. Function is not defined here. If you are unsure of its meaning, please refer to Wikipedia.

A 'sentence function' takes declarative sentences as input and yields declarative sentences as output. Sentence functors stand for such functions. A sentence functor is then a string of words and sentence variables that becomes a declarative sentence if each sentence variable is replaced by a declarative sentence (here "string" just means a series of symbols). This is true for English, French, Spanish, German, Greek, Latin and so on, but all words and declarative sentences must be in the same language.

The composition of sentences
Sentences comprise parts known as constituents. A constituent will be defined as a string of symbols that is meaningful by itself. This definition may be regarded as slightly empty and the meaning of constituent is probably best understood intuitively and by example. The following are constituents of the sentence "The cat sat on the mat":

the

cat

the cat

sat on the mat

on the mat

the cat sat on the mat

All of the above are meaningful in themselves. Words are meaningful by themselves and so all individual words are constituents of any sentence that contains them (words can be considered atomic parts of language, that is they cannot be broken down further into other constituents - inflections, prefixes and suffixes are ignored here). The meaning of each constituent shown is the same as its meaning as a part of the sentence. The meaning of the constituent must be the same as it meaning in the sentence of which it is part, otherwise (although a string identical to the constituent may appear in the sentence) it is not a constituent of the sentence. For example, consider the sentence "the man who wrote on the blackboard was old".

The string "the blackboard was old" is meaningful, however its meaning is no part of the sentence above, which is asserting that the man, not the blackboard, was old. Hence, "the blackboard was old" is not a constituent of that sentence. Similarly, and perhaps less clearly, "the man" is not a constituent of the sentence. The meaning of "the man" is not the meaning conveyed in the sentence. Were "the man" to be a constituent, it would suggest that a particular man had already been identified. However, this is not the case since the restriction "who wrote on the blackboard" is needed. So, "the man" is not a constituent, but "the man who wrote on the blackboard" is.

Ambiguity
An ambiguous sentence is one that has more than one meaning. Crudely speaking, there are two types of ambiguity: structural and lexical. A lexical ambiguity arises where one word (or perhaps a phrase) has more than one meaning; for example "fast" in the sentences "He drove very fast" and "He was fast asleep". A structural ambiguity arises in a constituent because it is unclear what that constituent's constituents are. To clarify this, the notion of scope is introduced.

The scope of a constituent is defined as the smallest constituent containing that constituent and something else besides. So, in the above example, the scope of "blackboard" is "the blackboard"; the scope of the first "the" is "the man who wrote on the blackboard".

Consider the sentence "He told me to be careful this evening". Was this warning discussed in this sentence issued this evening or was it about this evening? It is unclear exactly what the constituents of this sentence are: it is unclear what the scope of "this evening" is. Is the scope of "this evening" "to be careful this evening", or is it the whole sentence "He told me to be careful this evening"? It can be seen that a new language might be devised to clear up such ambiguities: "He told me [to be careful this evening]"; "[He told me to be careful this evening]". Propositional calculus is an entirely unambiguous language, using a bracketing system as shown here. This will be seen in the next part of the book.

Sentence functors
To repeat the definition given earlier, sentence functors are strings of words and sentence variables such that if all the sentence variables are replaced by any declarative sentences, the whole becomes a declarative sentence. To fully understand this definition, it is necessary to know what a sentence variable is. A sentence variable is something (usually represented by the Greek letters psi, phi or chi) that can be assigned as its value any declarative sentence.

One example of a sentence functor was discussed in the section on consistency: it is not the case that phi

Other examples of a sentence functors are:

phi and psi I know that phi It is obvious that phi Either phi, or psi and chi

The following are not English sentence functors (consider whether the string obtained by replacing the sentence variable with a declarative sentence is in itself a declarative sentence):

Mary and phi Is it true that phi? phi is true		(but "phi" is true is a sentence functor) Whomever phi should stand up for themselves

The last example forms a declarative sentence when phi is replaced by some declarative sentences (for example, if replaced with "Jack is bullying"), but not all (e.g. "the sky is blue"), so it is not a sentence functor.

The number of places of a sentence functor is the number of different sentence variables it contains.

Either phi, or psi and chi is a 3-place sentence functor. Either phi or psi is a 2-place sentence functor. Either it is the case that psi or it is not the case that psi is a 1-place sentence functor.

An n-place sentence functor is satisfied by certain ordered n-tuplets of declarative sentences. An ordered n-tuplet of declarative sentences is a list of n different declarative sentences in a particular order. In particular, those ordered n-tuplets of declarative sentences that satisfy an n-place sentence functor yield a true declarative sentence when they, in order, replace the sentence variables of a sentence functor.

The ordered pair (grass is green, snow is black) satisfies it is the case that phi, but not that psi; whereas the ordered pair (snow is black, grass is green) does not.

A sentence is a sentence functor with no sentence variables, i.e. a sentence is a 0-place sentence functor.

Truth tables
When determining what sentences satisfy what sentence functors, the logician is interested in their truth value (rather than the actual meaning or sense). This information can be summarised in the form of a truth table.

A truth table stipulates all combinations of truth for a given set of sentences and what the truth value of a sentence functor is for each combination.

Consider the sentence functor phi and psi. The truth table for this sentence functor is drawn up as follows:

Notice that the letters P and Q are used rather than phi and psi. Sentence variables cannot bear truth values. P and Q instantiate actual sentences, the truth values of which are considered below these letters in the table: 'T' stands for when that sentence is true and 'F' stands for when it is false. Note also that "P and Q" is a sentence, not a 2-place sentence functor (sentence functors with at least one sentence variable cannot bear truth values). To know what the value of the declarative sentence yielded by replacing the sentence variables of the sentence functor with sentences of various truth values, the row (known as a structure) containing the desired truth values is selected and the letter in that row below the complex sentence taken.

In the above example, the sentence "P and Q" is true when P is true and Q is true but false for any other values of P and Q (so when P is true but Q is false, "P and Q" is false).

Consider the truth table of the sentence functor Hume knew that phi.

The structure where P is false is false for "Hume knew that P", for it is not possible to know something that is false. However, the structure where P is true has the symbol "-" in it (this will be referred to as a blank). This symbol does not mean that the sentence is neither true nor false in this structure. It means that there are true sentences that satisfy this functor and there are sentences that do not satisfy this functor. For example, Hume knew that his (Hume's) first name was David. However, he did not know that Russell was (or rather would be from Hume's perspective) a 20th century philosopher.