My favorite C project is Picol - a toy model of Tcl in ~1700 lines of C code. Download: http://wiki.tcl.tk/_repo/wiki_images/files/picol0-1-22.zip - or, it was. In Oct 2007 my favorite use for C is with tcltcc/Odyce - tcc with a Critcl-emulating front end.
Never getting my act together to write a "real" book on Tcl, I've now seriously started with an unreal one: http://en.wikibooks.org/wiki/Programming%3ATcl . It's a Wiki, so everybody can edit - please contribute!RLH 2006-02-19: I have finally gotten all the wiki "if 0{" stuff out of it. "And there was much rejoicing!"
All code I post is free as air. Do what you want with it, just don't blame me. (In general, I think [01]+ is common possession of all humankind - it's all binary integers (with possible leading zeroes), and who can claim to own an integer?). Also, engineering is where minimal overengineering and minimal underengineering converge.
Besides Tcl, I'm also very interested in movies (some Wiki pages may show that :^). See
Since 2003-08-03, I stack links to latest new pages (except for Sepp - see there) here on top, so they're sooner found (in reverse chronological order, newest on top):
- A little Nasdaq retriever
- German income tax
- Lorem ipsum
- Visual TAL - dis2asm - dis2asm does macros - dis2asm gets better - dis2asm learns to catch
- string geometry
- iTube
- Pi cryptography
- subsequences
- Vampire numbers
- vgrep: a visual grep
- rphoto
- A tiny Tcl server
- Profiling with execution traces - A pocket Wiki
- checkvar - line numbers in text widget - Playing with parsing
- filewait - autoreplace - webchain
- select - simplified grid - A little tcl.js console
- quickio - Remote debugging via socket - minibot
- Playing with TclOO - Windows 95 - Webdings animation
- photo image equality in Critcl
- If we had no proc - xlistbox - A graphical timetable
- Another Tcl module maker - fallingrain
- Yin-yang - atoms - Linear regression toy
- Everything is a dict - A little pie chart
- cal - getputs - crosstab - Rolling credits
- tk_optionCascade - getopt - base128
- A tiny notebook - Searching in a text widget - Canvas dials
- Playing CGI - Playing with obfuscation
- m+ - Deterministic finite state machine - Pocket Soccer
- editRecord - Controlled environment
- Self-rewriting code - Resizable rectangles
- Tiny timing - encodiff - Playing VFS - Disabling listbox items
- Simple search and replace - A little client-server example
- Visual cd - myPIE - Time-stamp
- auto-indent - ucatch - A tiny version control
- Sepp - corp - add - If we had no variables
- A little Web kiosk - strimj to XBM - more as eTcl plugin
- encoview as eTcl plugin - IDE: from cathedral to patchwork bazaar
- htext as eTcl plugin - Serializing an array
- Restricted variables - e: a tiny editor plugin for eTcl
- Intelligent Design - text line coloring
- Canvas undo and redo - Xmas tree - Drawing lines in photo images
- use_refs - e.g. - multi-argument set
- tricolore - gethostbyname as Windows DLL - namespace size
- Shaded text on canvas - Boxed text - Encoding table generator
- Collation - Ellipsis - Steppin' out again - Talk to me, Tcl
- Playing SHARK - Canvas balloon help
- ASCII animation - Authentication by formula
- Dynamic call graph - Jittering toplevel
- Lotto - Playing sudoku - counterclock - A minimal starfield
- Iris animation - Playing with matches
- A little Deterministic Turing Machine - The Montana, Utah & Texas
- Disjunctive Normal Form - tcl2tex
- Vector arithmetics - Tacit programming - Integers as Boolean functions
- Laws of Form - Fibonacci numbers - Multiplication tables
- Complex math with TOOT - A little IO stack - Playing with rationals
- The Einstein puzzle - Jimulation - Tiny OO with Jim
- Pocket Joy 2005 - Random name generator
- The house of Santa Claus - A little bar chart - Parenthetcl
- A little NNTP reader - A little RSS reaper
- RS's RSS - Big bitstring operations - Collapse (iPaq) - Chemical arithmetics
- A tiny drawing program - An arc clock - A base-5 clock
- Cursor demo - File watch - keysyms for Tcl
- Polygon order - Functional programming (Backus 1977)
- Assertions - A size-bounded cache
- Domino - Flashing light simulation - Postcodes
- Playing with recursion - LemonTree - icoview - A balance toy
- A little XML Schema validator - Polygon clipping
- Elevator simulation - Animated cyclist
- moon phase - Kaleidoscope - A little reaction tester
- Elias coding - Binary image compression challenge
- Face control - lsort index vector
- Toy car workshop - Toy cars - Playing with circuits - Small caps
- Image filtering - Image composition - Rainbow Tunnel
- Brute force meets Goedel - timeliner - lquery
- Playing WIMP - Brute force again - Text widget elision
- Polygon intersection - Polygon area
- Remainder orbits - subSQL - spiral - comb
- simplicite (my first page in French ;-) [4]
- Finding a sublist - Depth of a list - bitarray - Toot as toot can
- Playing bytecode - A little translation tool - quoted-printable
- func - Simple proc tracing - canvashelp - Tangram - Full-adders
- Playing TRAC - Branching with 'set' alone - half-lambda
- Mapping words to floats - A little drawing tool
- Playing C4.5 - Another simple database
- Matrix determinant - Tuple generator
- Playing Lisp again - A minimal Tk program - Playing SIR
- A little doxygen converter - St John's chapel
- Playing HTTP - Mapping words to integers
- Factorial - Narrow formatting - Tcl/Tk: Programmieren auf dem PocketPC
- Steganography - TkPhotoLab - Unavailable appearance
- Elegance vs. performance - Triangulation - A minimal editor
- A minimal doodler explained
- A little slide-rule - Scissors, stone, paper - buggy Pinball :(
- Revello - Shuffled words - A crossword game
- TclTrain - fsub: in-place substitution
- Language identification - Playing machine translation
- Animated Kanji - Skeleton OO
- Paragraphing - Tree nodes in motion - Shifting maze
- Minimal RPN- Named arguments - Recursive curves
- A little man page viewer - docstring - gets workaround
- Integer range generator - RPN again
Some pages missing above, but proposed by other readers, include
- 7-segment ASCII graphics
- A Dilbert reformatter - An error experiment
- A graph generator
- a little code page browser
- A little concordance
- A little database API
- A little demon
- A little file searcher (iPaq)
- A little file searcher
- A little fortune teller
- A little login dialog
- A little multiplication toy
- A little proving engine
- A little value dialog
- A little XML browser - A little XML parser - starDOM
- A matrix gadget
- A Mini Database Manager
- A minimal console
- A minimal debugger
- A minimal editor explained
- A minimally extended minimal editor
- A parser's monolog
- A partial APL parser
- A simple Arabic renderer
- A simple database
- A symmetric doodler
- A tiny state machine - Traffic lights - Regular polygons
- A toy piano - TclMusic
- An anomaly in case conversion
- An APL playstation - Playing Assembler - RPN in Tcl - Turtleshell
- An entry with a history
- Arrays of function pointers - Type checking
- Arts and Crafts of Tcl-Tk Programming
- Based numbers
- Binary representation of numbers
- Block-local variables
- C code generators
- Cantor's plait - How big is A4? - Big integer routines
- Canvas presentation graphics
- Canvas rectangle marking
- Chaining things
- Check digits - Procs as variables - Tcl in comparison - Primes
- Chess in Tcl
- Code 39 generation
- Command completion
- Comparing relations
- Complex math made simple
- Composite fields megawidgets
- Constraining variables
- Cryptography: transposition
- Dangers of creative writing
- Data structures: from the bit to the Web
- Decision trees as expressions
- Deferred evaluation
- Degree histograms
- Describing and rendering flags in Tcl
- Design patterns in Tcl
- Doing things in namespaces
- Doing things
- Drawing and editing polygons - Playing 3D
- Dumping interpreter state
- Dynamic variable scoping - Custom curry - Generic operations - Streams
- Einfach Tcl - A little A-D clock
- English number reader
- English plurals
- Entities - Characters - Nested-loop join
- Euro converter
- expr problems with int
- Frequency calculation
- Fun with functions - A little calculator
- Fuzzy string search
- Generating random strings
- Goto in Tcl
- Graph theory in Tcl
- Graylevel subsampling - Median filtering
- Guarded proc
- Hebrew numbers
- Horseracing in Tcl - Car racing in Tcl
- Hot curry - KISS - Lightweight Lambda - Mixed math
- How to change a running system
- htext3
- i18n - Tcl for the world
- i18n - Writing for the world - little Tcl, much Unicode/UTF-8
- iDict: a multilingual dictionary - iKnow: a pocket quiz
- If we had no if
- iFile: a little file system browser - Image scaling
- iFly - Palindromes - TkSoroban
- iMap: an indexed map viewer - iRead: a Gutenberg eBook reader
- Importing expr functions
- inspect
- iPAQ as signal lamp
- Is Tcl Different!
- iShow - Indexed file reading - Word reaper
- Language/Country name servers
- Let unknown know
- Local procedures
- Matrix multiplication and encryption
- Model railroading with Tcl - trains3.tcl - Postcard from Switzerland
- Modeling COND with expr
- More graph theory
- Moving dots
- Multilingual menu
- Notes on a canvas
- Numbered arrays
- One Liners
- owh - a fileless tclsh
- Parsing Polish notation
- Partcl physics as retold by a layman
- paths and cycles
- Persistent arrays
- Photo image rotation - A little image viewer
- Playing APL
- Playing Bourne shell
- Playing COBOL
- Playing Haskell
- Playing LISP
- Playing Python
- PocketPC - A little Ferris Wheel - Visual menus
- Procs as data structures
- Procs as objects
- puts workaround
- Qualified geographic names
- Recursive list searching
- Result caching
- Right-to-left entry widget
- Splitting strings with embedded strings
- Stacks and queues
- Steppin' out - Tcl 2.1
- Stress testing
- strimj - string image routines - Mongolian in Tcl strimjes
- strimj animation
- strimj segmentation
- Symbolic links in Windows/CE
- Syntax parsing in Tcl - Simple tree layout - Decision trees
- Tables - Playing with bits
- taiku goes multilingual
- taiku: a little Chinese editor
- tally: a string counter gadget
- Tcl and LISP
- Tcl Heritage
- TclWorld Gazetteer
- Tclworld
- The filter idiom
- The i18n package: data
- The i18n package - A little primes toy - A funny cookbook
- The Lish family - converters from 7bit ASCII to all kinds of languages
- The Q function
- The world of ToolCommand
- Things British
- Time-dependent greetings
- Titoo: a thought experiment
- Tk image Dos and Don'ts
- TkSnake - TkAlign4
- Toasters and things
- Transliteration - Arithmetics with strings
- Transposing a matrix
- Trees as nested lists - Multiple comparisons
- UIC vehicle number validator
- Unicode and UTF-8
- upvar sugar
- UTF-8 bit by bit
- Widget tags
- Wiki format to HTML
- Word Reaper
- Writing PPM files
- XML Graph to canvas - Slow text
- XPM to photo image
- Yet another object system
- Tools: A triangle toy - imEdit - iRule
- Games: Alphabet Wheel - The Gallows game - MasterMind 2 - Memory 2 - Over and Out
- My oldest source code still on the Net (back from 1986, but in BASIC): [5]
"C is like a lump of coal, useful but dirty. Tcl is like a diamond - both have the same amount of carbon, but Tcl is compressed, brillant, sharp, and extremely valuable" ;-)
"Doctor, it hurts when I write in C..." - "So don't."
"Code re-use? Of course do I reuse code! There's two libs that I reuse almost every day, just reconfigure with different scripts. (The libs are tcl.lib and tk.lib, of course.)"
"I grant you three wishes", the fairy said, "or even better - one wish and one tclsh...""... or one tclkit that does both!", said the troll in response
In C, errors are killers. In Tcl, they are helpful little friends, that you can play catch with ;)