70 likes | 266 Views
Journal of the Plague Day. Administrivia. P2M2 due today P2Rollout due next Thurs (Oct 26) Spec v. 1.0 out today (check class web site) Next Thurs (Oct 26): Quiz 2 Threads and synchronization Also next Thurs: P3 starts (!) Have your groups ready. Design Exercise: TextMuncher. TextMuncher.
E N D
Administrivia • P2M2 due today • P2Rollout due next Thurs (Oct 26) • Spec v. 1.0 out today (check class web site) • Next Thurs (Oct 26): Quiz 2 • Threads and synchronization • Also next Thurs: P3 starts (!) • Have your groups ready...
TextMuncher • Reads in file of (Unicode) text • Performs an arbitrary combination of the following: • Upper case every word • Replace multiple whitespace w/ single space • Translate individual words to Chinese • Change vowels, “o” → “0” ; “e” → “3”; “i” → “1” • Replace the words: • “computer” → “black box” • “student” → “godlike leet haxor of doom” • Do all of the above to every third word • Order of operations matters!
Example: Upper case, then leet-ify vowels turning and turning in the widening gyre the falcon cannot hear the falconer; things fall apart; the centre cannot hold; mere anarchy is loosed upon the world, the blood-dimmed tide is loosed, and everywhere the ceremony of innocence is drowned; Turnlng And Turnlng ln Th3 Wld3nlng Gyr3 Th3 Falc0n Cann0t H3ar Th3 Falc0n3r; Thlngs Fall Apart; Th3 C3ntr3 Cann0t H0ld; M3r3 Anarchy ls L00s3d Up0n Th3 W0rld, Th3 Bl00d-Dlmm3d Tld3 ls L00s3d, And 3v3rywh3r3 Th3 C3r3m0ny 0f lnn0c3nc3 ls Dr0wn3d;
Example Word substitute, then leet-ify vowels The quick young student jumped over the lazy old computer. Th3 qulck y0ung g0dllk3 l33t hax0r 0f d00m jump3d 0v3r th3 lazy 0ld black b0x.
Example Leet-ify vowels, then substitute words The quick young student jumped over the lazy old computer. Th3 qulck y0ung stud3nt jump3d 0v3r th3 lazy 0ld c0mput3r.