jQuery(document).ready(function($) {
var thefile = "portrait-of-the-artist-as-a-young-man-abbrev.txt";
// Load the text from text.txt and process the image when text is loaded
$("#textOutput").load(thefile, function(responseText) {
responseText = cleanText(responseText);
responseText = cleanText(responseText);
responseText = cleanText(responseText);
responseText = cleanText(responseText);
processImage(responseText);
});
});
function processImage(text) {
var canvas = document.createElement('canvas');
var context = canvas.getContext('2d');
var image = $('#sourceImage')[0];
image.onload = function() {
var width = image.width;
var height = image.height;
canvas.width = width;
canvas.height = height;
context.drawImage(image, 0, 0);
// Flip the image vertically
// context.translate(0, height);
// context.scale(1, -1);
// context.drawImage(image, 0, 0);
var imageData = context.getImageData(0, 0, width, height);
var data = imageData.data;
var max_repeat = 3;
var repeat_count = 0;
var index = 0;
// get the range
var maxfound = 0;
var minfound = 9999;
console.log('WxH ' + width + 'x' + height);
var temp_average = 0;
var tempcount = 0;
for (var y = 0; y < height; y++) {
for (var x = 0; x < width; x++) {
var i = (y * width + x) * 4;
var grey_value = (data[i] + data[i + 1] + data[i + 2]) / 3;
temp_average += grey_value;
if (maxfound < grey_value) {
maxfound = grey_value;
}
if (minfound > grey_value) {
minfound = grey_value;
}
tempcount ++;
}
}
// what if 10 weights?
var scaling = maxfound / 10;
console.log('tempcount');
console.log(tempcount);
console.log('temp_average');
console.log(temp_average);
console.log('maxfound: ' + maxfound);
console.log('maxfound: ' + maxfound);
console.log('scaling: ' + scaling);
var lastchar = '';
for (var y = 0; y < height; y++) {
console.log(index);
var span = '';
for (var x = 0; x < width; x++) {
var i = (y * width + x) * 4;
var character = text[index];
if (character == ' ') {character = '·';}
if (character == "\n") {character = '•';}
var grey_value = (data[i] + data[i + 1] + data[i + 2]) / 3;
var fontWeightClass = 255 - grey_value;
console.log('fontWeightClass: ' + fontWeightClass);
fontWeightClass = Math.round(fontWeightClass / scaling);
if (index < text.length) {
span += '' + character + '';
}
console.log('fontWeightClass: ' + fontWeightClass);
index++;
}
$('body').append('' + span + '
');
if (index >= text.length) {
//image.src = image.src;
break; // Stop if we run out of text
}
}
if (repeat_count > max_repeat) {return;}
};
image.src = image.src; // Trigger reload to ensure image is loaded after text
}
function cleanText(text) {
// Remove leading and trailing whitespace
text = text.trim();
// Replace multiple spaces with a single space
text = text.replace(/\s+/g, ' ');
// Replace multiple newlines with a single newline
text = text.replace(/\n{2,}/g, '\n');
return text;
}
A·PORTRAIT·OF·THE·ARTIST·AS·A·YOUNG·MAN,·CHAPTER·I·Once·upon·a·time·and·a·very·good·time·it·was·there·was·a·moocow·coming·down·along·the·road·and·this·moocow·th
at·was·coming·down·along·the·road·met·a·nicens·little·boy·named·baby·tuckoo....·His·father·told·him·that·story:·his·father·looked·at·him·through·a·glass:·he·had
·a·hairy·face.·He·was·baby·tuckoo.·The·moocow·came·down·the·road·where·Betty·Byrne·lived:·she·sold·lemon·platt.·O,·the·wild·rose·blossoms·On·the·little·green·pl
ace.·He·sang·that·song.·That·was·his·song.·O,·the·green·wothe·botheth.·When·you·wet·the·bed,·first·it·is·warm·then·it·gets·cold.·His·mother·put·on·the·oilsheet.
·That·had·the·queer·smell.·His·mother·had·a·nicer·smell·than·his·father.·She·played·on·the·piano·the·sailor’s·hornpipe·for·him·to·dance.·He·danced:·Tralala·lala
,·Tralala·tralaladdy,·Tralala·lala,·Tralala·lala.·Uncle·Charles·and·Dante·clapped.·They·were·older·than·his·father·and·mother·but·uncle·Charles·was·older·than·D
ante.·Dante·had·two·brushes·in·her·press.·The·brush·with·the·maroon·velvet·back·was·for·Michael·Davitt·and·the·brush·with·the·green·velvet·back·was·for·Parnell.
·Dante·gave·him·a·cachou·every·time·he·brought·her·a·piece·of·tissue·paper.·The·Vances·lived·in·number·seven.·They·had·a·different·father·and·mother.·They·were·
Eileen’s·father·and·mother.·When·they·were·grown·up·he·was·going·to·marry·Eileen.·He·hid·under·the·table.·His·mother·said:·—O,·Stephen·will·apologise.·Dante·sai
d:·—O,·if·not,·the·eagles·will·come·and·pull·out·his·eyes.—·Pull·out·his·eyes,·Apologise,·Apologise,·Pull·out·his·eyes.·Apologise,·Pull·out·his·eyes,·Pull·out·h
is·eyes,·Apologise.·The·wide·playgrounds·were·swarming·with·boys.·All·were·shouting·and·the·prefects·urged·them·on·with·strong·cries.·The·evening·air·was·pale·a
nd·chilly·and·after·every·charge·and·thud·of·the·footballers·the·greasy·leather·orb·flew·like·a·heavy·bird·through·the·grey·light.·He·kept·on·the·fringe·of·his·
line,·out·of·sight·of·his·prefect,·out·of·the·reach·of·the·rude·feet,·feigning·to·run·now·and·then.·He·felt·his·body·small·and·weak·amid·the·throng·of·the·playe
rs·and·his·eyes·were·weak·and·watery.·Rody·Kickham·was·not·like·that:·he·would·be·captain·of·the·third·line·all·the·fellows·said.·Rody·Kickham·was·a·decent·fell
ow·but·Nasty·Roche·was·a·stink.·Rody·Kickham·had·greaves·in·his·number·and·a·hamper·in·the·refectory.·Nasty·Roche·had·big·hands.·He·called·the·Friday·pudding·do
g-in-the-blanket.·And·one·day·he·had·asked:·—What·is·your·name?·Stephen·had·answered:·Stephen·Dedalus.·Then·Nasty·Roche·had·said:·—What·kind·of·a·name·is·that?·
And·when·Stephen·had·not·been·able·to·answer·Nasty·Roche·had·asked:·—What·is·your·father?·Stephen·had·answered:·—A·gentleman.·Then·Nasty·Roche·had·asked:·—Is·he
·a·magistrate?·He·crept·about·from·point·to·point·on·the·fringe·of·his·line,·making·little·runs·now·and·then.·But·his·hands·were·bluish·with·cold.·He·kept·his·h
ands·in·the·side·pockets·of·his·belted·grey·suit.·That·was·a·belt·round·his·pocket.·And·belt·was·also·to·give·a·fellow·a·belt.·One·day·a·fellow·said·to·Cantwell
:·—I’d·give·you·such·a·belt·in·a·second.·Cantwell·had·answered:·—Go·and·fight·your·match.·Give·Cecil·Thunder·a·belt.·I’d·like·to·see·you.·He’d·give·you·a·toe·in
·the·rump·for·yourself.·That·was·not·a·nice·expression.·His·mother·had·told·him·not·to·speak·with·the·rough·boys·in·the·college.·Nice·mother!·The·first·day·in·t
he·hall·of·the·castle·when·she·had·said·goodbye·she·had·put·up·her·veil·double·to·her·nose·to·kiss·him:·and·her·nose·and·eyes·were·red.·But·he·had·pretended·not
·to·see·that·she·was·going·to·cry.·She·was·a·nice·mother·but·she·was·not·so·nice·when·she·cried.·And·his·father·had·given·him·two·five-shilling·pieces·for·pocke
t·money.·And·his·father·had·told·him·if·he·wanted·anything·to·write·home·to·him·and,·whatever·he·did,·never·to·peach·on·a·fellow.·Then·at·the·door·of·the·castle
·the·rector·had·shaken·hands·with·his·father·and·mother,·his·soutane·fluttering·in·the·breeze,·and·the·car·had·driven·off·with·his·father·and·mother·on·it.·They
·had·cried·to·him·from·the·car,·waving·their·hands:·—Goodbye,·Stephen,·goodbye!·—Goodbye,·Stephen,·goodbye!·He·was·caught·in·the·whirl·of·a·scrimmage·and,·fearf
ul·of·the·flashing·eyes·and·muddy·boots,·bent·down·to·look·through·the·legs.·The·fellows·were·struggling·and·groaning·and·their·legs·were·rubbing·and·kicking·an
d·stamping.·Then·Jack·Lawton’s·yellow·boots·dodged·out·the·ball·and·all·the·other·boots·and·legs·ran·after.·He·ran·after·them·a·little·way·and·then·stopped.·It·
was·useless·to·run·on.·Soon·they·would·be·going·home·for·the·holidays.·After·supper·in·the·study·hall·he·would·change·the·number·pasted·up·inside·his·desk·from·
seventyseven·to·seventysix.·It·would·be·better·to·be·in·the·study·hall·than·out·there·in·the·cold.·The·sky·was·pale·and·cold·but·there·were·lights·in·the·castle
.·He·wondered·from·which·window·Hamilton·Rowan·had·thrown·his·hat·on·the·haha·and·had·there·been·flowerbeds·at·that·time·under·the·windows.·One·day·when·he·had·
been·called·to·the·castle·the·butler·had·shown·him·the·marks·of·the·soldiers’·slugs·in·the·wood·of·the·door·and·had·given·him·a·piece·of·shortbread·that·the·com
munity·ate.·It·was·nice·and·warm·to·see·the·lights·in·the·castle.·It·was·like·something·in·a·book.·Perhaps·Leicester·Abbey·was·like·that.·And·there·were·nice·se
ntences·in·Doctor·Cornwell’s·Spelling·Book.·They·were·like·poetry·but·they·were·only·sentences·to·learn·the·spelling·from.·Wolsey·died·in·Leicester·Abbey·Where·
the·abbots·buried·him.·Canker·is·a·disease·of·plants,·Cancer·one·of·animals.·It·would·be·nice·to·lie·on·the·hearthrug·before·the·fire,·leaning·his·head·upon·his
·hands,·and·think·on·those·sentences.·He·shivered·as·if·he·had·cold·slimy·water·next·his·skin.·That·was·mean·of·Wells·to·shoulder·him·into·the·square·ditch·beca
use·he·would·not·swop·his·little·snuffbox·for·Wells’s·seasoned·hacking·chestnut,·the·conqueror·of·forty.·How·cold·and·slimy·the·water·had·been!·A·fellow·had·onc
e·seen·a·big·rat·jump·into·the·scum.·Mother·was·sitting·at·the·fire·with·Dante·waiting·for·Brigid·to·bring·in·the·tea.·She·had·her·feet·on·the·fender·and·her·je
welly·slippers·were·so·hot·and·they·had·such·a·lovely·warm·smell!·Dante·knew·a·lot·of·things.·She·had·taught·him·where·the·Mozambique·Channel·was·and·what·was·t
he·longest·river·in·America·and·what·was·the·name·of·the·highest·mountain·in·the·moon.·Father·Arnall·knew·more·than·Dante·because·he·was·a·priest·but·both·his·f
ather·and·uncle·Charles·said·that·Dante·was·a·clever·woman·and·a·wellread·woman.·And·when·Dante·made·that·noise·after·dinner·and·then·put·up·her·hand·to·her·mou
th:·that·was·heartburn.·A·voice·cried·far·out·on·the·playground:·—All·in!·Then·other·voices·cried·from·the·lower·and·third·lines:·—All·in!·All·in!·The·players·c
losed·around,·flushed·and·muddy,·and·he·went·among·them,·glad·to·go·in.·Rody·Kickham·held·the·ball·by·its·greasy·lace.·A·fellow·asked·him·to·give·it·one·last:·b
ut·he·walked·on·without·even·answering·the·fellow.·Simon·Moonan·told·him·not·to·because·the·prefect·was·looking.·The·fellow·turned·to·Simon·Moonan·and·said:·—We
·all·know·why·you·speak.·You·are·McGlade’s·suck.·Suck·was·a·queer·word.·The·fellow·called·Simon·Moonan·that·name·because·Simon·Moonan·used·to·tie·the·prefect’s·
false·sleeves·behind·his·back·and·the·prefect·used·to·let·on·to·be·angry.·But·the·sound·was·ugly.·Once·he·had·washed·his·hands·in·the·lavatory·of·the·Wicklow·Ho
tel·and·his·father·pulled·the·stopper·up·by·the·chain·after·and·the·dirty·water·went·down·through·the·hole·in·the·basin.·And·when·it·had·all·gone·down·slowly·th
e·hole·in·the·basin·had·made·a·sound·like·that:·suck.·Only·louder.·To·remember·that·and·the·white·look·of·the·lavatory·made·him·feel·cold·and·then·hot.·There·we
re·two·cocks·that·you·turned·and·water·came·out:·cold·and·hot.·He·felt·cold·and·then·a·little·hot:·and·he·could·see·the·names·printed·on·the·cocks.·That·was·a·v
ery·queer·thing.·And·the·air·in·the·corridor·chilled·him·too.·It·was·queer·and·wettish.·But·soon·the·gas·would·be·lit·and·in·burning·it·made·a·light·noise·like·
a·little·song.·Always·the·same:·and·when·the·fellows·stopped·talking·in·the·playroom·you·could·hear·it.·It·was·the·hour·for·sums.·Father·Arnall·wrote·a·hard·sum
·on·the·board·and·then·said:·—Now·then,·who·will·win?·Go·ahead,·York!·Go·ahead,·Lancaster!·Stephen·tried·his·best·but·the·sum·was·too·hard·and·he·felt·confused.
·The·little·silk·badge·with·the·white·rose·on·it·that·was·pinned·on·the·breast·of·his·jacket·began·to·flutter.·He·was·no·good·at·sums·but·he·tried·his·best·so·t
hat·York·might·not·lose.·Father·Arnall’s·face·looked·very·black·but·he·was·not·in·a·wax:·he·was·laughing.·Then·Jack·Lawton·cracked·his·fingers·and·Father·Arnall
·looked·at·his·copybook·and·said:·—Right.·Bravo·Lancaster!·The·red·rose·wins.·Come·on·now,·York!·Forge·ahead!·Jack·Lawton·looked·over·from·his·side.·The·little·
silk·badge·with·the·red·rose·on·it·looked·very·rich·because·he·had·a·blue·sailor·top·on.·Stephen·felt·his·own·face·red·too,·thinking·of·all·the·bets·about·who·w
ould·get·first·place·in·elements,·Jack·Lawton·or·he.·Some·weeks·Jack·Lawton·got·the·card·for·first·and·some·weeks·he·got·the·card·for·first.·His·white·silk·badg
e·fluttered·and·fluttered·as·he·worked·at·the·next·sum·and·heard·Father·Arnall’s·voice.·Then·all·his·eagerness·passed·away·and·he·felt·his·face·quite·cool.·He·t
hought·his·face·must·be·white·because·it·felt·so·cool.·He·could·not·get·out·the·answer·for·the·sum·but·it·did·not·matter.·White·roses·and·red·roses:·those·were·
beautiful·colours·to·think·of.·And·the·cards·for·first·place·and·second·place·and·third·place·were·beautiful·colours·too:·pink·and·cream·and·lavender.·Lavender·
and·cream·and·pink·roses·were·beautiful·to·think·of.·Perhaps·a·wild·rose·might·be·like·those·colours·and·he·remembered·the·song·about·the·wild·rose·blossoms·on·
the·little·green·place.·But·you·could·not·have·a·green·rose.·But·perhaps·somewhere·in·the·world·you·could.·The·bell·rang·and·then·the·classes·began·to·file·out·
of·the·rooms·and·along·the·corridors·towards·the·refectory.·He·sat·looking·at·the·two·prints·of·butter·on·his·plate·but·could·not·eat·the·damp·bread.·The·tablec
loth·was·damp·and·limp.·But·he·drank·off·the·hot·weak·tea·which·the·clumsy·scullion,·girt·with·a·white·apron,·poured·into·his·cup.·He·wondered·whether·the·scull
ion’s·apron·was·damp·too·or·whether·all·white·things·were·cold·and·damp.·Nasty·Roche·and·Saurin·drank·cocoa·that·their·people·sent·them·in·tins.·They·said·they·
could·not·drink·the·tea;·that·it·was·hogwash.·Their·fathers·were·magistrates,·the·fellows·said.·All·the·boys·seemed·to·him·very·strange.·They·had·all·fathers·an
d·mothers·and·different·clothes·and·voices.·He·longed·to·be·at·home·and·lay·his·head·on·his·mother’s·lap.·But·he·could·not:·and·so·he·longed·for·the·play·and·st
udy·and·prayers·to·be·over·and·to·be·in·bed.·He·drank·another·cup·of·hot·tea·and·Fleming·said:·—What’s·up?·Have·you·a·pain·or·what’s·up·with·you?·—I·don’t·know,
·Stephen·said.·—Sick·in·your·breadbasket,·Fleming·said,·because·your·face·looks·white.·It·will·go·away.·—O·yes,·Stephen·said.·But·he·was·not·sick·there.·He·thou
ght·that·he·was·sick·in·his·heart·if·you·could·be·sick·in·that·place.·Fleming·was·very·decent·to·ask·him.·He·wanted·to·cry.·He·leaned·his·elbows·on·the·table·an
d·shut·and·opened·the·flaps·of·his·ears.·Then·he·heard·the·noise·of·the·refectory·every·time·he·opened·the·flaps·of·his·ears.·It·made·a·roar·like·a·train·at·nig
ht.·And·when·he·closed·the·flaps·the·roar·was·shut·off·like·a·train·going·into·a·tunnel.·That·night·at·Dalkey·the·train·had·roared·like·that·and·then,·when·it·w
ent·into·the·tunnel,·the·roar·stopped.·He·closed·his·eyes·and·the·train·went·on,·roaring·and·then·stopping;·roaring·again,·stopping.·It·was·nice·to·hear·it·roar
·and·stop·and·then·roar·out·of·the·tunnel·again·and·then·stop.·Then·the·higher·line·fellows·began·to·come·down·along·the·matting·in·the·middle·of·the·refectory,
·Paddy·Rath·and·Jimmy·Magee·and·the·Spaniard·who·was·allowed·to·smoke·cigars·and·the·little·Portuguese·who·wore·the·woolly·cap.·And·then·the·lower·line·tables·a
nd·the·tables·of·the·third·line.·And·every·single·fellow·had·a·different·way·of·walking.·He·sat·in·a·corner·of·the·playroom·pretending·to·watch·a·game·of·domino
s·and·once·or·twice·he·was·able·to·hear·for·an·instant·the·little·song·of·the·gas.·The·prefect·was·at·the·door·with·some·boys·and·Simon·Moonan·was·knotting·his·
false·sleeves.·He·was·telling·them·something·about·Tullabeg.·Then·he·went·away·from·the·door·and·Wells·came·over·to·Stephen·and·said:·—Tell·us,·Dedalus,·do·you·
kiss·your·mother·before·you·go·to·bed?·Stephen·answered:·—I·do.·Wells·turned·to·the·other·fellows·and·said:·—O,·I·say,·here’s·a·fellow·says·he·kisses·his·mother
·every·night·before·he·goes·to·bed.·The·other·fellows·stopped·their·game·and·turned·round,·laughing.·Stephen·blushed·under·their·eyes·and·said:·—I·do·not.·Wells
·said:·—O,·I·say,·here’s·a·fellow·says·he·doesn’t·kiss·his·mother·before·he·goes·to·bed.·They·all·laughed·again.·Stephen·tried·to·laugh·with·them.·He·felt·his·w
hole·body·hot·and·confused·in·a·moment.·What·was·the·right·answer·to·the·question?·He·had·given·two·and·still·Wells·laughed.·But·Wells·must·know·the·right·answe
r·for·he·was·in·third·of·grammar.·He·tried·to·think·of·Wells’s·mother·but·he·did·not·dare·to·raise·his·eyes·to·Wells’s·face.·He·did·not·like·Wells’s·face.·It·wa
s·Wells·who·had·shouldered·him·into·the·square·ditch·the·day·before·because·he·would·not·swop·his·little·snuffbox·for·Wells’s·seasoned·hacking·chestnut,·the·con
queror·of·forty.·It·was·a·mean·thing·to·do;·all·the·fellows·said·it·was.·And·how·cold·and·slimy·the·water·had·been!·And·a·fellow·had·once·seen·a·big·rat·jump·pl
op·into·the·scum.·The·cold·slime·of·the·ditch·covered·his·whole·body;·and,·when·the·bell·rang·for·study·and·the·lines·filed·out·of·the·playrooms,·he·felt·the·co
ld·air·of·the·corridor·and·staircase·inside·his·clothes.·He·still·tried·to·think·what·was·the·right·answer.·Was·it·right·to·kiss·his·mother·or·wrong·to·kiss·his
·mother?·What·did·that·mean,·to·kiss?·You·put·your·face·up·like·that·to·say·goodnight·and·then·his·mother·put·her·face·down.·That·was·to·kiss.·His·mother·put·he
r·lips·on·his·cheek;·her·lips·were·soft·and·they·wetted·his·cheek;·and·they·made·a·tiny·little·noise:·kiss.·Why·did·people·do·that·with·their·two·faces?·Sitting
·in·the·study·hall·he·opened·the·lid·of·his·desk·and·changed·the·number·pasted·up·inside·from·seventyseven·to·seventysix.·But·the·Christmas·vacation·was·very·fa
r·away:·but·one·time·it·would·come·because·the·earth·moved·round·always.·There·was·a·picture·of·the·earth·on·the·first·page·of·his·geography:·a·big·ball·in·the·
middle·of·clouds.·Fleming·had·a·box·of·crayons·and·one·night·during·free·study·he·had·coloured·the·earth·green·and·the·clouds·maroon.·That·was·like·the·two·brus
hes·in·Dante’s·press,·the·brush·with·the·green·velvet·back·for·Parnell·and·the·brush·with·the·maroon·velvet·back·for·Michael·Davitt.·But·he·had·not·told·Fleming
·to·colour·them·those·colours.·Fleming·had·done·it·himself.·He·opened·the·geography·to·study·the·lesson;·but·he·could·not·learn·the·names·of·places·in·America.·
Still·they·were·all·different·places·that·had·different·names.·They·were·all·in·different·countries·and·the·countries·were·in·continents·and·the·continents·were
·in·the·world·and·the·world·was·in·the·universe.·He·turned·to·the·flyleaf·of·the·geography·and·read·what·he·had·written·there:·himself,·his·name·and·where·he·wa
s.·Stephen·Dedalus·Class·of·Elements·Clongowes·Wood·College·Sallins·County·Kildare·Ireland·Europe·The·World·The·Universe·That·was·in·his·writing:·and·Fleming·on
e·night·for·a·cod·had·written·on·the·opposite·page:·Stephen·Dedalus·is·my·name,·Ireland·is·my·nation.·Clongowes·is·my·dwellingplace·And·heaven·my·expectation.·H
e·read·the·verses·backwards·but·then·they·were·not·poetry.·Then·he·read·the·flyleaf·from·the·bottom·to·the·top·till·he·came·to·his·own·name.·That·was·he:·and·he
·read·down·the·page·again.·What·was·after·the·universe?·Nothing.·But·was·there·anything·round·the·universe·to·show·where·it·stopped·before·the·nothing·place·beg
an?·It·could·not·be·a·wall·but·there·could·be·a·thin·thin·line·there·all·round·everything.·It·was·very·big·to·think·about·everything·and·everywhere.·Only·God·co
uld·do·that.·He·tried·to·think·what·a·big·thought·that·must·be·but·he·could·only·think·of·God.·God·was·God’s·name·just·as·his·name·was·Stephen.·Dieu·was·the·Fre
nch·for·God·and·that·was·God’s·name·too;·and·when·anyone·prayed·to·God·and·said·Dieu·then·God·knew·at·once·that·it·was·a·French·person·that·was·praying.·But·tho
ugh·there·were·different·names·for·God·in·all·the·different·languages·in·the·world·and·God·understood·what·all·the·people·who·prayed·said·in·their·different·lan
guages·still·God·remained·always·the·same·God·and·God’s·real·name·was·God.·It·made·him·very·tired·to·think·that·way.·It·made·him·feel·his·head·very·big.·He·turn
ed·over·the·flyleaf·and·looked·wearily·at·the·green·round·earth·in·the·middle·of·the·maroon·clouds.·He·wondered·which·was·right,·to·be·for·the·green·or·for·the·
maroon,·because·Dante·had·ripped·the·green·velvet·back·off·the·brush·that·was·for·Parnell·one·day·with·her·scissors·and·had·told·him·that·Parnell·was·a·bad·man.
·He·wondered·if·they·were·arguing·at·home·about·that.·That·was·called·politics.·There·were·two·sides·in·it:·Dante·was·on·one·side·and·his·father·and·Mr·Casey·we
re·on·the·other·side·but·his·mother·and·uncle·Charles·were·on·no·side.·Every·day·there·was·something·in·the·paper·about·it.·It·pained·him·that·he·did·not·know·w
ell·what·politics·meant·and·that·he·did·not·know·where·the·universe·ended.·He·felt·small·and·weak.·When·would·he·be·like·the·fellows·in·poetry·and·rhetoric?·The
y·had·big·voices·and·big·boots·and·they·studied·trigonometry.·That·was·very·far·away.·First·came·the·vacation·and·then·the·next·term·and·then·vacation·again·and
·then·again·another·term·and·then·again·the·vacation.·It·was·like·a·train·going·in·and·out·of·tunnels·and·that·was·like·the·noise·of·the·boys·eating·in·the·refe
ctory·when·you·opened·and·closed·the·flaps·of·the·ears.·Term,·vacation;·tunnel,·out;·noise,·stop.·How·far·away·it·was!·It·was·better·to·go·to·bed·to·sleep.·Only
·prayers·in·the·chapel·and·then·bed.·He·shivered·and·yawned.·It·would·be·lovely·in·bed·after·the·sheets·got·a·bit·hot.·First·they·were·so·cold·to·get·into.·He·s
hivered·to·think·how·cold·they·were·first.·But·then·they·got·hot·and·then·he·could·sleep.·It·was·lovely·to·be·tired.·He·yawned·again.·Night·prayers·and·then·bed
:·he·shivered·and·wanted·to·yawn.·It·would·be·lovely·in·a·few·minutes.·He·felt·a·warm·glow·creeping·up·from·the·cold·shivering·sheets,·warmer·and·warmer·till·he
·felt·warm·all·over,·ever·so·warm·and·yet·he·shivered·a·little·and·still·wanted·to·yawn.·The·bell·rang·for·night·prayers·and·he·filed·out·of·the·study·hall·afte
r·the·others·and·down·the·staircase·and·along·the·corridors·to·the·chapel.·The·corridors·were·darkly·lit·and·the·chapel·was·darkly·lit.·Soon·all·would·be·dark·a
nd·sleeping.·There·was·cold·night·air·in·the·chapel·and·the·marbles·were·the·colour·the·sea·was·at·night.·The·sea·was·cold·day·and·night:·but·it·was·colder·at·n
ight.·It·was·cold·and·dark·under·the·seawall·beside·his·father’s·house.·But·the·kettle·would·be·on·the·hob·to·make·punch.·The·prefect·of·the·chapel·prayed·above
·his·head·and·his·memory·knew·the·responses:·O·Lord,·open·our·lips·And·our·mouths·shall·announce·Thy·praise.·Incline·unto·our·aid,·O·God!·O·Lord,·make·haste·to·
help·us!·There·was·a·cold·night·smell·in·the·chapel.·But·it·was·a·holy·smell.·It·was·not·like·the·smell·of·the·old·peasants·who·knelt·at·the·back·of·the·chapel·
at·Sunday·mass.·That·was·a·smell·of·air·and·rain·and·turf·and·corduroy.·But·they·were·very·holy·peasants.·They·breathed·behind·him·on·his·neck·and·sighed·as·the
y·prayed.·They·lived·in·Clane,·a·fellow·said:·there·were·little·cottages·there·and·he·had·seen·a·woman·standing·at·the·halfdoor·of·a·cottage·with·a·child·in·her
·arms,·as·the·cars·had·come·past·from·Sallins.·It·would·be·lovely·to·sleep·for·one·night·in·that·cottage·before·the·fire·of·smoking·turf,·in·the·dark·lit·by·the
·fire,·in·the·warm·dark,·breathing·the·smell·of·the·peasants,·air·and·rain·and·turf·and·corduroy.·But,·O,·the·road·there·between·the·trees·was·dark!·You·would·b
e·lost·in·the·dark.·It·made·him·afraid·to·think·of·how·it·was.·He·heard·the·voice·of·the·prefect·of·the·chapel·saying·the·last·prayer.·He·prayed·it·too·against·
the·dark·outside·under·the·trees.·Visit,·we·beseech·Thee,·O·Lord,·this·habitation·and·drive·away·from·it·all·the·snares·of·the·enemy.·May·Thy·holy·angels·dwell·
herein·to·preserve·us·in·peace·and·may·Thy·blessing·be·always·upon·us·through·Christ·our·Lord.·Amen.·His·fingers·trembled·as·he·undressed·himself·in·the·dormito
ry.·He·told·his·fingers·to·hurry·up.·He·had·to·undress·and·then·kneel·and·say·his·own·prayers·and·be·in·bed·before·the·gas·was·lowered·so·that·he·might·not·go·t
o·hell·when·he·died.·He·rolled·his·stockings·off·and·put·on·his·nightshirt·quickly·and·knelt·trembling·at·his·bedside·and·repeated·his·prayers·quickly,·fearing·
that·the·gas·would·go·down.·He·felt·his·shoulders·shaking·as·he·murmured:·God·bless·my·father·and·my·mother·and·spare·them·to·me!·God·bless·my·little·brothers·a
nd·sisters·and·spare·them·to·me!·God·bless·Dante·and·uncle·Charles·and·spare·them·to·me!·He·blessed·himself·and·climbed·quickly·into·bed·and,·tucking·the·end·of
·the·nightshirt·under·his·feet,·curled·himself·together·under·the·cold·white·sheets,·shaking·and·trembling.·But·he·would·not·go·to·hell·when·he·died;·and·the·sh
aking·would·stop.·A·voice·bade·the·boys·in·the·dormitory·goodnight.·He·peered·out·for·an·instant·over·the·coverlet·and·saw·the·yellow·curtains·round·and·before·
his·bed·that·shut·him·off·on·all·sides.·The·light·was·lowered·quietly.·The·prefect’s·shoes·went·away.·Where?·Down·the·staircase·and·along·the·corridors·or·to·hi
s·room·at·the·end?·He·saw·the·dark.·Was·it·true·about·the·black·dog·that·walked·there·at·night·with·eyes·as·big·as·carriagelamps?·They·said·it·was·the·ghost·of·
a·murderer.·A·long·shiver·of·fear·flowed·over·his·body.·He·saw·the·dark·entrance·hall·of·the·castle.·Old·servants·in·old·dress·were·in·the·ironingroom·above·the
·staircase.·It·was·long·ago.·The·old·servants·were·quiet.·There·was·a·fire·there·but·the·hall·was·still·dark.·A·figure·came·up·the·staircase·from·the·hall.·He·w
ore·the·white·cloak·of·a·marshal;·his·face·was·pale·and·strange;·he·held·his·hand·pressed·to·his·side.·He·looked·out·of·strange·eyes·at·the·old·servants.·They·l
ooked·at·him·and·saw·their·master’s·face·and·cloak·and·knew·that·he·had·received·his·deathwound.·But·only·the·dark·was·where·they·looked:·only·dark·silent·air.·
Their·master·had·received·his·deathwound·on·the·battlefield·of·Prague·far·away·over·the·sea.·He·was·standing·on·the·field;·his·hand·was·pressed·to·his·side;·his
·face·was·pale·and·strange·and·he·wore·the·white·cloak·of·a·marshal.·O·how·cold·and·strange·it·was·to·think·of·that!·All·the·dark·was·cold·and·strange.·There·we
re·pale·strange·faces·there,·great·eyes·like·carriagelamps.·They·were·the·ghosts·of·murderers,·the·figures·of·marshals·who·had·received·their·deathwound·on·batt
lefields·far·away·over·the·sea.·What·did·they·wish·to·say·that·their·faces·were·so·strange?·Visit,·we·beseech·Thee,·O·Lord,·this·habitation·and·drive·away·from·
it·all...·Going·home·for·the·holidays!·That·would·be·lovely:·the·fellows·had·told·him.·Getting·up·on·the·cars·in·the·early·wintry·morning·outside·the·door·of·th
e·castle.·The·cars·were·rolling·on·the·gravel.·Cheers·for·the·rector!·Hurray!·Hurray!·Hurray!·The·cars·drove·past·the·chapel·and·all·caps·were·raised.·They·drov
e·merrily·along·the·country·roads.·The·drivers·pointed·with·their·whips·to·Bodenstown.·The·fellows·cheered.·They·passed·the·farmhouse·of·the·Jolly·Farmer.·Cheer
·after·cheer·after·cheer.·Through·Clane·they·drove,·cheering·and·cheered.·The·peasant·women·stood·at·the·halfdoors,·the·men·stood·here·and·there.·The·lovely·sme
ll·there·was·in·the·wintry·air:·the·smell·of·Clane:·rain·and·wintry·air·and·turf·smouldering·and·corduroy.·The·train·was·full·of·fellows:·a·long·long·chocolate·
train·with·cream·facings.·The·guards·went·to·and·fro·opening,·closing,·locking,·unlocking·the·doors.·They·were·men·in·dark·blue·and·silver;·they·had·silvery·whi
stles·and·their·keys·made·a·quick·music:·click,·click:·click,·click.·And·the·train·raced·on·over·the·flat·lands·and·past·the·Hill·of·Allen.·The·telegraph·poles·
were·passing,·passing.·The·train·went·on·and·on.·It·knew.·There·were·lanterns·in·the·hall·of·his·father’s·house·and·ropes·of·green·branches.·There·were·holly·an
d·ivy·round·the·pierglass·and·holly·and·ivy,·green·and·red,·twined·round·the·chandeliers.·There·were·red·holly·and·green·ivy·round·the·old·portraits·on·the·wall
s.·Holly·and·ivy·for·him·and·for·Christmas.·Lovely...·All·the·people.·Welcome·home,·Stephen!·Noises·of·welcome.·His·mother·kissed·him.·Was·that·right?·His·fathe
r·was·a·marshal·now:·higher·than·a·magistrate.·Welcome·home,·Stephen!·Noises...·There·was·a·noise·of·curtainrings·running·back·along·the·rods,·of·water·being·sp
lashed·in·the·basins.·There·was·a·noise·of·rising·and·dressing·and·washing·in·the·dormitory:·a·noise·of·clapping·of·hands·as·the·prefect·went·up·and·down·tellin
g·the·fellows·to·look·sharp.·A·pale·sunlight·showed·the·yellow·curtains·drawn·back,·the·tossed·beds.·His·bed·was·very·hot·and·his·face·and·body·were·very·hot.·H
e·got·up·and·sat·on·the·side·of·his·bed.·He·was·weak.·He·tried·to·pull·on·his·stocking.·It·had·a·horrid·rough·feel.·The·sunlight·was·queer·and·cold.·Fleming·sai
d:·—Are·you·not·well?·He·did·not·know;·and·Fleming·said:·—Get·back·into·bed.·I’ll·tell·McGlade·you’re·not·well.·—He’s·sick.·—Who·is?·—Tell·McGlade.·—Get·back·in
to·bed.·—Is·he·sick?·A·fellow·held·his·arms·while·he·loosened·the·stocking·clinging·to·his·foot·and·climbed·back·into·the·hot·bed.·He·crouched·down·between·the·
sheets,·glad·of·their·tepid·glow.·He·heard·the·fellows·talk·among·themselves·about·him·as·they·dressed·for·mass.·It·was·a·mean·thing·to·do,·to·shoulder·him·into
·the·square·ditch,·they·were·saying.·Then·their·voices·ceased;·they·had·gone.·A·voice·at·his·bed·said:·—Dedalus,·don’t·spy·on·us,·sure·you·won’t?·Wells’s·face·w
as·there.·He·looked·at·it·and·saw·that·Wells·was·afraid.·—I·didn’t·mean·to.·Sure·you·won’t?·His·father·had·told·him,·whatever·he·did,·never·to·peach·on·a·fellow
.·He·shook·his·head·and·answered·no·and·felt·glad.·Wells·said:·—I·didn’t·mean·to,·honour·bright.·It·was·only·for·cod.·I’m·sorry.·The·face·and·the·voice·went·awa
y.·Sorry·because·he·was·afraid.·Afraid·that·it·was·some·disease.·Canker·was·a·disease·of·plants·and·cancer·one·of·animals:·or·another·different.·That·was·a·long
·time·ago·then·out·on·the·playgrounds·in·the·evening·light,·creeping·from·point·to·point·on·the·fringe·of·his·line,·a·heavy·bird·flying·low·through·the·grey·lig
ht.·Leicester·Abbey·lit·up.·Wolsey·died·there.·The·abbots·buried·him·themselves.·It·was·not·Wells’s·face,·it·was·the·prefect’s.·He·was·not·foxing.·No,·no:·he·wa
s·sick·really.·He·was·not·foxing.·And·he·felt·the·prefect’s·hand·on·his·forehead;·and·he·felt·his·forehead·warm·and·damp·against·the·prefect’s·cold·damp·hand.·T
hat·was·the·way·a·rat·felt,·slimy·and·damp·and·cold.·Every·rat·had·two·eyes·to·look·out·of.·Sleek·slimy·coats,·little·little·feet·tucked·up·to·jump,·black·slimy
·eyes·to·look·out·of.·They·could·understand·how·to·jump.·But·the·minds·of·rats·could·not·understand·trigonometry.·When·they·were·dead·they·lay·on·their·sides.·T
heir·coats·dried·then.·They·were·only·dead·things.·The·prefect·was·there·again·and·it·was·his·voice·that·was·saying·that·he·was·to·get·up,·that·Father·Minister·
had·said·he·was·to·get·up·and·dress·and·go·to·the·infirmary.·And·while·he·was·dressing·himself·as·quickly·as·he·could·the·prefect·said:·—We·must·pack·off·to·Bro
ther·Michael·because·we·have·the·collywobbles!·He·was·very·decent·to·say·that.·That·was·all·to·make·him·laugh.·But·he·could·not·laugh·because·his·cheeks·and·lip
s·were·all·shivery:·and·then·the·prefect·had·to·laugh·by·himself.·The·prefect·cried:·—Quick·march!·Hayfoot!·Strawfoot!·They·went·together·down·the·staircase·and
·along·the·corridor·and·past·the·bath.·As·he·passed·the·door·he·remembered·with·a·vague·fear·the·warm·turfcoloured·bogwater,·the·warm·moist·air,·the·noise·of·pl
unges,·the·smell·of·the·towels,·like·medicine.·Brother·Michael·was·standing·at·the·door·of·the·infirmary·and·from·the·door·of·the·dark·cabinet·on·his·right·came
·a·smell·like·medicine.·That·came·from·the·bottles·on·the·shelves.·The·prefect·spoke·to·Brother·Michael·and·Brother·Michael·answered·and·called·the·prefect·sir.
·He·had·reddish·hair·mixed·with·grey·and·a·queer·look.·It·was·queer·that·he·would·always·be·a·brother.·It·was·queer·too·that·you·could·not·call·him·sir·because·
he·was·a·brother·and·had·a·different·kind·of·look.·Was·he·not·holy·enough·or·why·could·he·not·catch·up·on·the·others?·There·were·two·beds·in·the·room·and·in·one
·bed·there·was·a·fellow:·and·when·they·went·in·he·called·out:·—Hello!·It’s·young·Dedalus!·What’s·up?·—The·sky·is·up,·Brother·Michael·said.·He·was·a·fellow·out·o
f·the·third·of·grammar·and,·while·Stephen·was·undressing,·he·asked·Brother·Michael·to·bring·him·a·round·of·buttered·toast.·—Ah,·do!·he·said.·—Butter·you·up!·sai
d·Brother·Michael.·You’ll·get·your·walking·papers·in·the·morning·when·the·doctor·comes.·—Will·I?·the·fellow·said.·I’m·not·well·yet.·Brother·Michael·repeated:·—Y
ou’ll·get·your·walking·papers.·I·tell·you.·He·bent·down·to·rake·the·fire.·He·had·a·long·back·like·the·long·back·of·a·tramhorse.·He·shook·the·poker·gravely·and·n
odded·his·head·at·the·fellow·out·of·third·of·grammar.·Then·Brother·Michael·went·away·and·after·a·while·the·fellow·out·of·third·of·grammar·turned·in·towards·the·
wall·and·fell·asleep.·That·was·the·infirmary.·He·was·sick·then.·Had·they·written·home·to·tell·his·mother·and·father?·But·it·would·be·quicker·for·one·of·the·prie
sts·to·go·himself·to·tell·them.·Or·he·would·write·a·letter·for·the·priest·to·bring.·Dear·Mother,·I·am·sick.·I·want·to·go·home.·Please·come·and·take·me·home.·I·a
m·in·the·infirmary.·Your·fond·son,·Stephen·How·far·away·they·were!·There·was·cold·sunlight·outside·the·window.·He·wondered·if·he·would·die.·You·could·die·just·t
he·same·on·a·sunny·day.·He·might·die·before·his·mother·came.·Then·he·would·have·a·dead·mass·in·the·chapel·like·the·way·the·fellows·had·told·him·it·was·when·Litt
le·had·died.·All·the·fellows·would·be·at·the·mass,·dressed·in·black,·all·with·sad·faces.·Wells·too·would·be·there·but·no·fellow·would·look·at·him.·The·rector·wo
uld·be·there·in·a·cope·of·black·and·gold·and·there·would·be·tall·yellow·candles·on·the·altar·and·round·the·catafalque.·And·they·would·carry·the·coffin·out·of·th
e·chapel·slowly·and·he·would·be·buried·in·the·little·graveyard·of·the·community·off·the·main·avenue·of·limes.·And·Wells·would·be·sorry·then·for·what·he·had·done
.·And·the·bell·would·toll·slowly.·He·could·hear·the·tolling.·He·said·over·to·himself·the·song·that·Brigid·had·taught·him.·Dingdong!·The·castle·bell!·Farewell,·m
y·mother!·Bury·me·in·the·old·churchyard·Beside·my·eldest·brother.·My·coffin·shall·be·black,·Six·angels·at·my·back,·Two·to·sing·and·two·to·pray·And·two·to·carry·
my·soul·away.·How·beautiful·and·sad·that·was!·How·beautiful·the·words·were·where·they·said·Bury·me·in·the·old·churchyard!·A·tremor·passed·over·his·body.·How·sad
·and·how·beautiful!·He·wanted·to·cry·quietly·but·not·for·himself:·for·the·words,·so·beautiful·and·sad,·like·music.·The·bell!·The·bell!·Farewell!·O·farewell!·The
·cold·sunlight·was·weaker·and·Brother·Michael·was·standing·at·his·bedside·with·a·bowl·of·beeftea.·He·was·glad·for·his·mouth·was·hot·and·dry.·He·could·hear·them·
playing·in·the·playgrounds.·And·the·day·was·going·on·in·the·college·just·as·if·he·were·there.·Then·Brother·Michael·was·going·away·and·the·fellow·out·of·the·thir
d·of·grammar·told·him·to·be·sure·and·come·back·and·tell·him·all·the·news·in·the·paper.·He·told·Stephen·that·his·name·was·Athy·and·that·his·father·kept·a·lot·of·
racehorses·that·were·spiffing·jumpers·and·that·his·father·would·give·a·good·tip·to·Brother·Michael·any·time·he·wanted·it·because·Brother·Michael·was·very·decent
·and·always·told·him·the·news·out·of·the·paper·they·got·every·day·up·in·the·castle.·There·was·every·kind·of·news·in·the·paper:·accidents,·shipwrecks,·sports·and
·politics.·—Now·it·is·all·about·politics·in·the·papers,·he·said.·Do·your·people·talk·about·that·too?·—Yes,·Stephen·said.·—Mine·too,·he·said.·Then·he·thought·for
·a·moment·and·said:·—You·have·a·queer·name,·Dedalus,·and·I·have·a·queer·name·too,·Athy.·My·name·is·the·name·of·a·town.·Your·name·is·like·Latin.·Then·he·asked:·—
Are·you·good·at·riddles?·Stephen·answered:·—Not·very·good.·Then·he·said:·—Can·you·answer·me·this·one?·Why·is·the·county·of·Kildare·like·the·leg·of·a·fellow’s·br
eeches?·Stephen·thought·what·could·be·the·answer·and·then·said:·—I·give·it·up.·—Because·there·is·a·thigh·in·it,·he·said.·Do·you·see·the·joke?·Athy·is·the·town·i
n·the·county·Kildare·and·a·thigh·is·the·other·thigh.·—Oh,·I·see,·Stephen·said.·—That’s·an·old·riddle,·he·said....·—James·Joyce.·Trieste,·1914.