summary refs log tree commit diff stats
path: root/tests/async/tioselectors.nim.cfg
Commit message (Collapse)AuthorAgeFilesLines
* Forgot about newlines at the endcheatfate2016-06-231-1/+1
|
* Small version of ioselectors.nim, without code duplication and some renames.cheatfate2016-06-231-0/+1
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439
<HTML>
<HEAD>
<TITLE>Advanced Techniques contents</TITLE>
<link rel="shortcut icon" href="http://www.cs.berkeley.edu/~bh/csls2-tiny.png" type="image/png">
</HEAD>
<BODY>
<CITE>Computer Science Logo Style</CITE> volume 2:
<CITE>Advanced Techniques</CITE> 2/e Copyright (C) 1997 MIT
<H1><EM>Computer Science Logo Style</EM><BR>
Volume 2: <EM>Advanced Techniques</EM></H1>
<CITE>Brian Harvey<BR>University of California, Berkeley</CITE>

<P><TABLE width="100%"><TR>
<TD><IMG SRC="csls2.jpg">
<TD><TABLE>
<TR><TD align="right"><A HREF="v1-toc2.html">Volume 1: <CITE>Symbolic Computing</CITE></A>
<IMG SRC="csls1-tiny.jpg">
<TR><TD align="right"><A HREF="v3-toc2.html">Volume 3: <CITE>Beyond Programming</CITE></A>
<IMG SRC="csls3-tiny.jpg">
<TR><TD align="right"><A HREF="logo.html">Download Berkeley Logo (UCBLogo)</A>
<IMG SRC="ucblogo2-tiny.gif">
<TR><TD align="right"><A HREF="index.html">Brian's home page</A>
<IMG SRC="bh-tiny.jpg">
<TR><TD align="right">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="https://mitpress.mit.edu/books/computer-science-logo-style-second-edition-volume-2">MIT
Press web page for <CITE>Computer Science Logo Style</CITE></A>
<IMG SRC="mitp.jpg">
</TABLE></TABLE>

<HR>

<P>Below this short table of contents is an expanded table of contents
including sections within each chapter.  Click on the chapter name
to jump down.  You can also download the complete text of each chapter
in PDF format for elegant printing, or browse the HTML version.

<P><EM>Note:  These books are still in copyright, and in print.  They are
posted here for your personal use, not for resale or redistribution.
Thanks!</EM>

<p>
<a href="http://www.azoft.com/people/seremina/edu/v2-toc2-romanian.html">View
this
page in Romanian</a> courtesy of <a href="http://www.azoft.com/">azoft</a>.

<p><a href="
http://cupegraf.com/blog/pocitac-vedy-logo-styl-tom-2-pokrocile-techniky/">
Slovakian translation</a> courtesy of <a href="http://cupegraf.com">Gasper
Halipovich</a>

<UL>
<LI>Preface
(<A HREF="pdf/v2ch00.pdf">frontmatter in PDF</A>)
(<A HREF="v2ch0/preface.html">HTML</A>)
<LI>Acknowledgments
(<A HREF="v2ch0/ack.html">HTML</A>)
<LI>1.  <A HREF="v2-toc2.html#ch1">Data Files</A>
(<A HREF="pdf/v2ch01.pdf">PDF</A>)
(<A HREF="v2ch1/files.html">HTML</A>)
<LI>2.  <A HREF="v2-toc2.html#ch2">Example: Finding File Differences</A>
(<A HREF="pdf/v2ch02.pdf">PDF</A>)
(<A HREF="v2ch2/diff.html">HTML</A>)
<LI>3.  <A HREF="v2-toc2.html#ch3">Nonlocal Exit</A>
(<A HREF="pdf/v2ch03.pdf">PDF</A>)
(<A HREF="v2ch3/exit.html">HTML</A>)
<LI>4.  <A HREF="v2-toc2.html#ch4">Example: Solitaire</A>
(<A HREF="pdf/v2ch04.pdf">PDF</A>)
(<A HREF="v2ch4/solitaire.html">HTML</A>)
<LI>5.  <A HREF="v2-toc2.html#ch5">Program as Data</A>
(<A HREF="pdf/v2ch05.pdf">PDF</A>)
(<A HREF="v2ch5/prgdat.html">HTML</A>)
<LI>6.  <A HREF="v2-toc2.html#ch6">Example: BASIC Compiler</A>
(<A HREF="pdf/v2ch06.pdf">PDF</A>)
(<A HREF="v2ch6/basic.html">HTML</A>)
<LI>7.  <A HREF="v2-toc2.html#ch7">Pattern Matcher</A>
(<A HREF="pdf/v2ch07.pdf">PDF</A>)
(<A HREF="v2ch7/match.html">HTML</A>)
<LI>8.  <A HREF="v2-toc2.html#ch8">Property Lists</A>
(<A HREF="pdf/v2ch08.pdf">PDF</A>)
(<A HREF="v2ch8/plist.html">HTML</A>)
<LI>9.  <A HREF="v2-toc2.html#ch9">Example: Doctor</A>
(<A HREF="pdf/v2ch09.pdf">PDF</A>)
(<A HREF="v2ch9/doctor.html">HTML</A>)
<LI>10.  <A HREF="v2-toc2.html#ch10">Iteration, Control Structures, Extensibility</A>
(<A HREF="pdf/v2ch10.pdf">PDF</A>)
(<A HREF="v2ch10/iter.html">HTML</A>)
<LI>11.  <A HREF="v2-toc2.html#ch11">Example: Cryptographer's Helper</A>
(<A HREF="pdf/v2ch11.pdf">PDF</A>)
(<A HREF="v2ch11/crypto.html">HTML</A>)
<LI>12.  <A HREF="v2-toc2.html#ch12">Macros</A>
(<A HREF="pdf/v2ch12.pdf">PDF</A>)
(<A HREF="v2ch12/macro.html">HTML</A>)
<LI>13.  <A HREF="v2-toc2.html#ch13">Example: Fourier Series Plotter</A>
(<A HREF="pdf/v2ch13.pdf">PDF</A>)
(<A HREF="v2ch13/fourie.html">HTML</A>)
<LI><A HREF="v2-toc2.html#refman">Berkeley Logo Reference Manual</A>
(<A HREF="pdf/v2ch14.pdf">backmatter in PDF</A>)
(<A HREF="v2ch14/manual.html">HTML</A>)<BR>
&nbsp;&nbsp;&nbsp;&nbsp;<SMALL><SMALL>The PDF link is to the published book;
the HTML link is to the current Berkeley Logo manual (HTML and PDF).</SMALL></SMALL>
<LI>Index of Defined Procedures
(<A HREF="v2ch14/appuindex.html">HTML</A>)
<LI>General Index
(<A HREF="v2ch14/appindex.html">HTML</A>)
</UL>

<HR>

<TABLE><TR><TD><H3>Preface</H3><TD>
(<A HREF="pdf/v2ch00.pdf">frontmatter in PDF</A>)
(<A HREF="v2ch0/preface.html">HTML</A>)
</TABLE>

<UL>
<LI>About the projects
<LI>About this series
<LI>How to read this book.
</UL>

<TABLE><TR><TD><H3>Acknowledgments</H3><TD>
(<A HREF="v2ch0/ack.html">HTML</A>)
</TABLE>

<TABLE><TR><TD><H3><A name="ch1">1.  Data Files</A></H3><TD>
(<A HREF="pdf/v2ch01.pdf">PDF</A>)
(<A HREF="v2ch1/files.html">HTML</A>)
</TABLE>

<UL>
<LI>Reader and Writer
<LI>End of File
<LI>Case Sensitivity
<LI>Dribble Files
<LI>A Text Formatter
<LI>Page Geometry
<LI>The Program
<LI>Improving the Formatter
</UL>

<TABLE><TR><TD><H3><A name="ch2">2.  Example: Finding File Differences</A></H3><TD>
(<A HREF="pdf/v2ch02.pdf">PDF</A>)
(<A HREF="v2ch2/diff.html">HTML</A>)
</TABLE>

<P>
<I>This project is an implementation in Logo of the often-needed
utility program to find the changes between two versions of a file.</I>

<UL>
<LI>Program Overview
<LI>The File Information Block Abstract Data Type
<LI>Saving and Re-Reading Input Lines
<LI>Skipping Equal Lines
<LI>Comparing and Remembering Unequal Lines
<LI>Reporting a Difference
<LI>Program Listing
</UL>

<TABLE><TR><TD><H3><A name="ch3">3.  Nonlocal Exit</A></H3><TD>
(<A HREF="pdf/v2ch03.pdf">PDF</A>)
(<A HREF="v2ch3/exit.html">HTML</A>)
</TABLE>

<UL>
<LI>Quiz Program Revisited
<LI>Nonlocal Exit and Modularity
<LI>Nonlocal Output
<LI>Catching Errors
<LI>Ending It All
</UL>

<TABLE><TR><TD><H3><A name="ch4">4.  Example: Solitaire</A></H3><TD>
(<A HREF="pdf/v2ch04.pdf">PDF</A>)
(<A HREF="v2ch4/solitaire.html">HTML</A>)
</TABLE>

<P>
<I>This project deals a simulated deck of cards and allows the user to play a
game of solitaire.  The program checks for legal moves and displays the
board layout.</I>

<UL>
<LI>The User Interface
<LI>The Game of Solitaire
<LI>Running the Program
<LI>Program Structure
<LI>Initialization
<LI>Data Abstraction
<LI>Stacks
<LI>Program as Data
<LI>Multiple Branching
<LI>Further Explorations
<LI>Program Listing
</UL>

<TABLE><TR><TD><H3><A name="ch5">5.  Program as Data</A></H3><TD>
(<A HREF="pdf/v2ch05.pdf">PDF</A>)
(<A HREF="v2ch5/prgdat.html">HTML</A>)
</TABLE>

<UL>
<LI><CODE>Text</CODE> and <CODE>Define</CODE>
<LI>Automated Definition
<LI>A Single-Keystroke Program Generator
<LI>Procedure Cross-Reference Listings
</UL>

<TABLE><TR><TD><H3><A name="ch6">6.  Example: BASIC Compiler</A></H3><TD>
(<A HREF="pdf/v2ch06.pdf">PDF</A>)
(<A HREF="v2ch6/basic.html">HTML</A>)
</TABLE>

<P>
<I>This project is a first look at what it means to compile a program.
It's simplified because it translates BASIC programs into Logo,
rather than into machine language.  But it introduces the ideas that
will return in more realistic form in the third volume.</I>

<UL>
<LI>A Short Course in BASIC
<LI>Using the BASIC Translator
<LI>Overview of the Implementation
<LI>The Reader
<LI>The Parser
<LI>The Code Generator
<LI>The Runtime Library
<LI>Further Explorations
<LI>Program Listing
</UL>

<TABLE><TR><TD><H3><A name="ch7">7.  Pattern Matcher</A></H3><TD>
(<A HREF="pdf/v2ch07.pdf">PDF</A>)
(<A HREF="v2ch7/match.html">HTML</A>)
</TABLE>

<P>
<I>This program looks for patterns in a list.  It can be used,
for example, to recognize particular types of English sentences.</I>

<UL>
<LI>Reinventing <CODE>Equalp</CODE> for Lists
<LI>A Simple Pattern Matcher
<LI>Efficiency and Elegance
<LI>Logo's Evaluation of Inputs
<LI>Indirect Assignment
<LI>Defaults
<LI>Program as Data
<LI>Parsing Rules
<LI>Further Explorations
<LI>Program Listing
</UL>

<TABLE><TR><TD><H3><A name="ch8">8.  Property Lists</A></H3><TD>
(<A HREF="pdf/v2ch08.pdf">PDF</A>)
(<A HREF="v2ch8/plist.html">HTML</A>)
</TABLE>

<UL>
<LI>Naming Properties
<LI>Writing Property List Procedures in Logo
<LI>Property Lists Aren't Variables
<LI>How Language Designers Earn Their Pay
<LI>Fast Replacement
<LI>Defaults
<LI>An Example: Family Trees
</UL>

<TABLE><TR><TD><H3><A name="ch9">9.  Example: Doctor</A></H3><TD>
(<A HREF="pdf/v2ch09.pdf">PDF</A>)
(<A HREF="v2ch9/doctor.html">HTML</A>)
</TABLE>

<P>
<I>This project uses the pattern matcher to carry out a conversation with the
user, pretending to be a psychiatrist.  It is a Logo version of a program
originally written by Joseph Weizenbaum.</I>

<UL>
<LI>Eliza and Artificial Intelligence
<LI>Eliza's Linguistic Strategy
<LI>Stimulus-Response Psychology
<LI>Property Lists
<LI>Generated Symbols
<LI>Modification of List Structure
<LI>Linguistic Structure
<LI>Further Explorations
<LI>Program Listing
</UL>

<TABLE><TR><TD><H3><A name="ch10">10.  Iteration, Control Structures, Extensibility</A></H3><TD>
(<A HREF="pdf/v2ch10.pdf">PDF</A>)
(<A HREF="v2ch10/iter.html">HTML</A>)
</TABLE>

<UL>
<LI>Recursion as Iteration
<LI>Numeric Iteration
<LI>Logo: an Extensible Language
<LI>No Perfect Control Structures
<LI>Iteration Over a List
<LI>Implementing <CODE>Apply</CODE>
<LI>Mapping
<LI>Mapping as a Metaphor
<LI>Other Higher Order functions
<LI>Mapping Over Trees
<LI>Iteration and Tail Recursion
<LI>Multiple Inputs to <CODE>For</CODE>
<LI>The Evaluation Environment Bug
</UL>

<TABLE><TR><TD><H3><A name="ch11">11.  Example: Cryptographer's Helper</A></H3><TD>
(<A HREF="pdf/v2ch11.pdf">PDF</A>)
(<A HREF="v2ch11/crypto.html">HTML</A>)
</TABLE>

<P>
<I>This project is a tool to assist the user in solving cryptograms
(simple substitution ciphers).  It makes some guesses automatically, and
records other guesses made by the user.</I>

<UL>
<LI>Program Structure
<LI>Guided Tour of Global Variables
<LI>What's in a Name?
<LI>Flag Variables
<LI>Iteration Over Letters
<LI>Computed Variable Names
<LI>Further Explorations
<LI>Program Listing
</UL>

<TABLE><TR><TD><H3><A name="ch12">12.  Macros</A></H3><TD>
(<A HREF="pdf/v2ch12.pdf">PDF</A>)
(<A HREF="v2ch12/macro.html">HTML</A>)
</TABLE>

<UL>
<LI><CODE>Localmake</CODE>
<LI>Backquote
<LI>Implementing Iterative Commands
<LI>Debugging Macros
<LI>The Real Thing
</UL>

<TABLE><TR><TD><H3><A name="ch13">13.  Example: Fourier Series Plotter</A></H3><TD>
(<A HREF="pdf/v2ch13.pdf">PDF</A>)
(<A HREF="v2ch13/fourie.html">HTML</A>)
</TABLE>

<P>
<I>This program displays graphs of the Fourier (harmonics of sine waves)
approximation to a square wave.  It illustrates how harmonics are combined
to control the timbres of notes in computer-generated music.</I>

<UL>
<LI>Square Waves
<LI>Keyword Inputs
<LI>Making the Variables Local
<LI>Indirect Assignment
<LI>Numeric Precision
<LI>Dynamic Scope
<LI>Further Explorations
<LI>Program Listing
</UL>

<H2>Appendices</H2><TD>
(<A HREF="pdf/v2ch14.pdf">backmatter in PDF</A>)
</TABLE>

<TABLE><TR><TD><H3><A name="refman">Berkeley Logo Reference Manual</A></H3><TD>
(<A HREF="v2ch14/manual.html">HTML</A>)
</TABLE>

<UL>
<LI>Entering and Leaving Logo
<LI>Tokenization
<LI>Data Structure Primitives
<UL><LI>Constructors
<LI>Selectors
<LI>Mutators
<LI>Predicates
<LI>Queries
</UL>
<LI>Communication
<UL><LI>Transmitters
<LI>Receivers
<LI>File Access
<LI>Terminal Access
</UL>
<LI>Arithmetic
<UL><LI>Numeric Operations
<LI>Predicates
<LI>Random Numbers
<LI>Print Formatting
<LI>Bitwise Operations
</UL>
<LI>Logical operations.
<LI>Graphics
<UL><LI>Turtle Motion
<LI>Turtle Motion Queries
<LI>Turtle and Window Control
<LI>Turtle and Window Queries
<LI>Pen and Background Control
<LI>Pen Queries
</UL>
<LI>Workspace Management
<UL><LI>Procedure Definition
<LI>Variable Definition
<LI>Property Lists
<LI>Predicates
<LI>Queries
<LI>Inspection
<LI>Workspace Control
</UL>
<LI>Control Structures
<UL><LI>Template-Based Iteration
<LI>Macros
</UL>
<LI>Error Processing
<LI>Error Codes
<LI>Special variables
</UL>

<TABLE><TR><TD><H3>Index of Defined Procedures</H3><TD>
(<A HREF="v2ch14/appuindex.html">HTML</A>)
</TABLE>

<TABLE><TR><TD><H3>General Index</H3><TD>
(<A HREF="v2ch14/appindex.html">HTML</A>)
</TABLE>
<P><A HREF="https://mitpress.mit.edu/books/computer-science-logo-style-second-edition-volume-2">MIT
Press web page for <CITE>Computer Science Logo Style</CITE></A>

<P>
<ADDRESS>
<A HREF="index.html">Brian Harvey</A>, 
<CODE>bh@cs.berkeley.edu</CODE>
</ADDRESS>
</BODY>
</HTML>