Tutorials

November 05 - 08, 2019

Crowne Plaza Houston River Oaks
Houston, Texas, USA
2712 Southwest Freeway, 77098
Phone: 1-713-5238448
Fax: 1-713-5771273


One of the best reasons to attend the Tcl conference is the tutorial track. These sessions are presented by Tcl experts - people who write the packages, write the books, and develop applications on a daily basis. They share their knowledge of Tcl/Tk and the practical experience in developing large, robust applications. Whether you're new to Tcl or experienced, these sessions will help you develop your projects more quickly.

Tutorial schedule

Morning Afternoon Evening
Wednesday A Hacker-Friendly Tour Of The Internals Of SQLite, Part I A Hacker-Friendly Tour Of The Internals Of SQLite, Part II
Advanced TclOO and Coroutine Techniques The Future of Tcl/Tk Package Management

Tutorial Information

The Future of Tcl/Tk Package Management — Joe Mistachkin

This course will be a technical deep-dive into the usage and implementation of various parts of the (somewhat poorly named) "Package Repository" ecosystem. This includes, but is not limited to: its integration with other major projects (e.g., Tcl/Tk, Eagle, SQLite, and Fossil), initial setup, basic usage, authoring and uploading packages, managing metadata, security and trust model, access control, extensibility, decentralized operation, and possible future directions.

Advanced knowledge of Tcl is assumed.

Knowledge of Fossil and OpenPGP will be very useful.

A Hacker-Friendly Tour Of The Internals Of SQLite, Part I — Richard Hipp

Extended Title

How SQLite works, how it is implemented, and how you can take it apart, work on it, extend it, and optimize its performance and memory usage.

This is an all-day tutorial in two parts.

Objective

Equip the attendee to:

  • Design and implement custom SQL functions, in C or in TCL.

  • Design and implement custom virtual tables and table-valued functions in C.

  • Step into SQLite routines while debugging an application that is linked against SQLite, or view stack traces that involve SQLite, and understand what is going on.

  • Quickly locate the parts of the SQLite code that are responsible for some particular behavior, perhaps because you think the behavior contains a bug, because you want to extend or enhance the behavior, or just so that you can better understand why SQLite is doing what it is doing.

  • Perform forensic analysis on SQLite database files in order to extract information accidentally deleted, or to recover data from a database that was corrupted by a hardware fault.

  • Analyze and understand query planner results in order to better optimize complex and expensive queries.

  • Make informed decisions about schema and query design in applications that use SQLite and about appropriate uses for the SQLite technology.

Prerequisites

  • Fluent in ANSI-C. We will be looking at lots of C code.

  • Basic knowledge of SQL and SQLite, but no need to be an expert. Indeed, the point of this tutorial is to take you from being an SQLite novice and launch you on a trajectory toward SQLite guru status.

  • Familiar with TCL (This is a TCL conference after all). The TCL/SQLite interface will be used and discussed but the focus will be more on the low-level ANSI-C aspects of SQLite, and so even TCL novices should be able to fully participate.

  • Bring a laptop with a C compiler and symbolic debugger and a recent version of Tcl (8.6 or 8.7) including development libraries, and know how to use them in order to follow along with the examples given in the tutorial. A linux machine is probably best, but you can also use a Windows or Mac machine if you are more comfortable on those platforms and know how to use the tools.

Tentative List Of Topics To Be Covered

  • How to obtain the SQLite source code and build both the SQLite library and associated user and developer tools.

  • A quick introduction to the official "sqlite3" command line interface (CLI) for SQLite, including power-user tricks that not many people seem to know about.

  • An overview of the SQLite database file format, and a survey of tools available for analyzing the byte-level content of SQLite database files.

  • An overview of the major subcomponents of SQLite, how those subcomponents interact with each other, and which source code files that implement each subcomponent.

  • An in-depth look at individual subcomponents of SQLite, including memory management, the SQL parser, the query planner, the code generator, the byte-code engine, the b-tree algorithm, and the page cache.

  • A review of the major data structures used internally by SQLite. There are not too many - we will review about 10 distinct object classes - but understanding those objects and what they mean is a important part of understanding the internals of SQLite.

  • How transactions work: how SQLite creates the illusion of performing atomic updates to the database, even following a power loss or system crash.

  • How the query planner works: how SQLite chooses and implements an algorithm for performing an SQL statement.

  • Undocumented SQLite: a survey of the many developer-only interfaces and tools in SQLite that are useful (some would say "essential") for debugging, analysis, and just generally understanding what is going on inside of the system.

  • A step by step walk-through of creating new custom SQL functions, virtual tables, and table-valued functions for SQLite, and linking them into an application. Attendees are invited to arrive with suggestions or proposals for one or more extensions that we can work through during the tutorial.

A Hacker-Friendly Tour Of The Internals Of SQLite, Part II — Richard Hipp

Extended Title

How SQLite works, how it is implemented, and how you can take it apart, work on it, extend it, and optimize its performance and memory usage.

This is an all-day tutorial in two parts.

Objective

Equip the attendee to:

  • Design and implement custom SQL functions, in C or in TCL.

  • Design and implement custom virtual tables and table-valued functions in C.

  • Step into SQLite routines while debugging an application that is linked against SQLite, or view stack traces that involve SQLite, and understand what is going on.

  • Quickly locate the parts of the SQLite code that are responsible for some particular behavior, perhaps because you think the behavior contains a bug, because you want to extend or enhance the behavior, or just so that you can better understand why SQLite is doing what it is doing.

  • Perform forensic analysis on SQLite database files in order to extract information accidentally deleted, or to recover data from a database that was corrupted by a hardware fault.

  • Analyze and understand query planner results in order to better optimize complex and expensive queries.

  • Make informed decisions about schema and query design in applications that use SQLite and about appropriate uses for the SQLite technology.

Prerequisites

  • Fluent in ANSI-C. We will be looking at lots of C code.

  • Basic knowledge of SQL and SQLite, but no need to be an expert. Indeed, the point of this tutorial is to take you from being an SQLite novice and launch you on a trajectory toward SQLite guru status.

  • Familiar with TCL (This is a TCL conference after all). The TCL/SQLite interface will be used and discussed but the focus will be more on the low-level ANSI-C aspects of SQLite, and so even TCL novices should be able to fully participate.

  • Bring a laptop with a C compiler and symbolic debugger and a recent version of Tcl (8.6 or 8.7) including development libraries, and know how to use them in order to follow along with the examples given in the tutorial. A linux machine is probably best, but you can also use a Windows or Mac machine if you are more comfortable on those platforms and know how to use the tools.

Tentative List Of Topics To Be Covered

  • How to obtain the SQLite source code and build both the SQLite library and associated user and developer tools.

  • A quick introduction to the official "sqlite3" command line interface (CLI) for SQLite, including power-user tricks that not many people seem to know about.

  • An overview of the SQLite database file format, and a survey of tools available for analyzing the byte-level content of SQLite database files.

  • An overview of the major subcomponents of SQLite, how those subcomponents interact with each other, and which source code files that implement each subcomponent.

  • An in-depth look at individual subcomponents of SQLite, including memory management, the SQL parser, the query planner, the code generator, the byte-code engine, the b-tree algorithm, and the page cache.

  • A review of the major data structures used internally by SQLite. There are not too many - we will review about 10 distinct object classes - but understanding those objects and what they mean is a important part of understanding the internals of SQLite.

  • How transactions work: how SQLite creates the illusion of performing atomic updates to the database, even following a power loss or system crash.

  • How the query planner works: how SQLite chooses and implements an algorithm for performing an SQL statement.

  • Undocumented SQLite: a survey of the many developer-only interfaces and tools in SQLite that are useful (some would say "essential") for debugging, analysis, and just generally understanding what is going on inside of the system.

  • A step by step walk-through of creating new custom SQL functions, virtual tables, and table-valued functions for SQLite, and linking them into an application. Attendees are invited to arrive with suggestions or proposals for one or more extensions that we can work through during the tutorial.

Advanced TclOO and Coroutine Techniques — Sean Woods

This course will use the Httpd module in Tcllib as a concrete example for how to utilize the advanced design patterns made possible by Tcl 8.6.

This course will cover: managing socket communications with coroutines, prototype-based programming with TclOO, and building frameworks.

Contact information

[email protected]