Lessons

Tcl · Expert

Tcl · Expert. Ten lessons. Open-book quizzes. Lesson 1 free.

10 lessons · The Host · Lesson 1 free

Pass all ten lessons for the certificate. Sample · Claim

  1. TclOO metaprogramming: objdefine, next, metaclasses and mixins

    Lesson 1 · On the house

    TclOO metaprogramming: objdefine, next, metaclasses and mixins

    Change one object without touching its class, chain to the method you replaced, customise creation with a metaclass, and wrap methods with a mixin.

  2. Coroutines as generators and async waits

    Lesson 2

    Coroutines as generators and async waits

    Build generators that hand out values one at a time, feed values back in with yield, and pause a coroutine until a timer fires.

  3. Stacked channels: chan push transforms and zlib streams

    Lesson 3

    Stacked channels: chan push transforms and zlib streams

    Push a transform onto a channel so data changes as it is written and read, pop it off again, and compress data in memory or as a stream.

  4. Values and speed: Tcl_Obj representations, shimmering and big numbers

    Lesson 4

    Values and speed: Tcl_Obj representations, shimmering and big numbers

    See how Tcl stores a value as both a string and a parsed form, avoid needless conversions, build results the fast way, and use integers of any size.

  5. Extending the language: unknown, ensemble -unknown and math functions

    Lesson 5

    Extending the language: unknown, ensemble -unknown and math functions

    Catch unknown command names, add subcommands to an ensemble on the fly, and define your own expr functions and operators.

  6. Binary data: binary format, binary scan and encodings

    Lesson 6

    Binary data: binary format, binary scan and encodings

    Pack and unpack fixed byte layouts for file formats and network protocols, control byte order, and encode bytes as hex and base64.

  7. Errors as data: throw, -errorcode, try trap and return -options

    Lesson 7

    Errors as data: throw, -errorcode, try trap and return -options

    Raise errors that code can classify, catch them by error code, always run clean-up, and re-raise errors without losing their details.

  8. Event-driven design: coroutine state machines and timers

    Lesson 8

    Event-driven design: coroutine state machines and timers

    Write a state machine as a coroutine, run several timed tasks at once in one thread, and manage after, idle callbacks and update.

  9. Searching and sorting records: lsort and lsearch options

    Lesson 9

    Searching and sorting records: lsort and lsearch options

    Sort lists of records by any field, rely on stable sorting, sort with a custom comparison, and search sorted lists quickly.

  10. Debugging and introspection: execution traces and info frame

    Lesson 10

    Debugging and introspection: execution traces and info frame

    Watch a proc being entered and left, step through every command it runs, find out who called you, and read a proc's definition back.

Sample certificate

Certificate of completion

Sign in to claim your certificate of completion.

Certificate

Finish all ten lessons, then sign in

Pass every lesson on this device (quizzes and checks). Then sign in or create an account to type your name and download the JPG.

All lessons