If you click the link above you'll see a movie of a program written in tinyC that randomly displays hello all! for a while. This program uses a Windows-dependent plugin that positions the cursor and displays a message. If you click the QR Code above this link you'll see the source code of this tinyC program.

1. What characterizes a well-written computer program?

2. A Programmer's Guide to the Meaning of Life

3. Table Of Contents

I have built a "Table Of Contents" for what I feel are the best examples of things we've talked about here in the last couple of years. I hope you find this useful and interesting.

Windows (tc.exe) and Linux (tc) executables of the tiny-C interpreter

Libraries and other files used by tinyC that need to be in a directory named pps

4. library.tc, lrblib.tc, tc.prop, version.prop, mathLib.tc, pigra_lib.tc pyGraphicsLib.tc lineLib.tc

Build scripts

5. buildPlugIn.bat, buildPlugIn.sh

tiny-C documentation and the machineCall.c source code module of the interpreter

6. The new classical tiny-C.doc , machineCall.c

tiny-C and C programs (and Pascal and BASIC and Mouse and ...)

Click or press Muzzy (below) to see LEE, a text to handwriting program, in action.


8. 17-point-stars.html

9. totient.html, totient.6.11.22.tc


11. series.php, series.php.txt

12. tiny.c, tin.html, dr_dobbs_journal_vol_05.29-37.pdf

13. amort.tc, amortpi.c, (1/2), (2/2), amort.png, kelsey.c

14. testPigra.tc, permalink.html, pigra.c, libpigra.windows.so, libpigra.linux.so, libpospi.so, pospi.c, pigra.h, pigra_lib.tc, devil.txt

15. fibpi.tc, pifib.c, libpifib.windows.so, libpifib.linux.so fibpi.tc.out, phi.html, phis.html, fib.tc, fib.c

16. may.2020.challenge.c, (1/2), (2/2) may 2020 challenge

17. spirala.tc, spiralpi.c, spirala.png

18. concen.tc, concen.txt concentration

19. ssort.tc, ssort.out

20. tree-128.tc, animals.tr

The above is from an early issue of Dr. Dobb's. I modified the code to support 128 records (it used to support only 16).


21. knapsack.lrb.c, knapsack.lrb.out, knapsack.c

pbs.tc, pbs.out, pbsinput

22. md.tc

23. cliffsnotes.html, entropya.c, entropya.c.out, bulls_and_cows_solver.py

24. integration.amy.try.c, integration.png

25. double.html, double.tc, double.out cristian.double.c, cristian.new.double.tc

26. next_c.tc, next_c_doc.html

27. compress.tc, dompress.tc, compressor.html

28. xmas.tc, xmas.png

29. nemo.tc, nemo.karel.html, karel.html nemo.pc.tc, pospi.c, nemo.kw maze.html, maze.tc, maze.kw karel_2.html sampler.tc, sampler.windows.again.tc, sampler.kw, foobar.tc randwalk.tc, rand13.kw

30. rdump.tc, rdump.png

31. slr.tc, slr.png

32. ver.amy.tc

33. hrun.tc, hasm.tc, nedanted.hbs, nedanted.hbo, HARBRAD.TXT


34. chas.tc, chas.tc.png

35. matched_pair.tc, tchelp.matched_pair.txt

36. cairopy.py

37. roman.2.12.22.tc

Click the image below to see the source code of the tinyC program that generated the image (that was converted into an .ico file and then viewed w/ IconEditPro)


39. chapter.8.2.1.c, chapter.8.2.1.png

JavaScript Toby Speak translator

40. jspeek.html, jspeek.png, all.dic.html

41. singlyLinkedList.c

42. 6.4.13.html, html.png

43. steinhaus.tc, rees.sum.square.c

44. nostalgebra.c, nostalgebra.jpg, nostalgebra.desmos.jpg

45. Dakota Rauls 1.18 #48 (boat problem)

46. amoeba.linux.tc, amoeba.c, amoeba.html

47. choc.tc, van.tc, choc.html, candy.tc candy.c, candy.c.out.html

48. What color was/were the dragon/s with six heads?

Election 2020, Election 2020 output

49. imagine.c

48. mandel.tc, mandel.area.tc, mandel.jpg, mandel.mp4, fractals_no_oo_v3.py, MANDEL42.BAS MANDEL32.DOC, DOSPrinter.exe benoit.html

49. simple_plotter.py, simple_plotter.jpg

50. factor.tc, factor_doc.html

51. http://primepuzzle.com/dancing/ipl.try.html

52. https://scratch.mit.edu/projects/2886014/

53. paper.puzzle.reader.html

54. Conjunction!

55. If you're 30' above the surface of the earth how far can you see to the horizon?

56. amend.tc, amend.2.tc, af.txt, saf.txt, amend.html Foxtrot_two-way_translator.html

57. words.2.tc, pip.html, words.doc.html the sentence notes, mywordsearch.png, words.1.txt, board.1.txt

58. un-psychic.tc, recursion.html

59. scacalos.tc runit.tc decbin.c kerouac.txt kerouac.enc

60. Ed Davis's Tiny integer calculator (icalc.tc) Joel Rees's blog post involving bc and pi jmr.bc Ed Davis's Toy byte-code compiler/interpreter (toy.o2bas), toy.exe, primes.toy

70. four_way.tc A video of this is at four_way.tc.mp4 Tom Gibson wrote a much more ambitious solution in Python. 4way-9-16-18.py A video of this is at 4way.mp4

71. chutes_and_ladders.html

72. ferry_solution.html ferry video

73. morse.tc, demorse.tc, morse.py, morse.to.letters.qr.2.html

The code below supports a Windows dependent way to compare a local and a remote file

74. url.1.tc, urldownloadpi.c, urldownload.c

Here's another way you can download a remote file url.9.10.21.py

75. connect_the_dots.py

76. Three quines SELFGEN.BAS SELFGEN.MSE selfgen.py


77. Ruth-Aaron pairs in BASIC, Ruth-Aaron pairs in C, Ruth-Aaron pairs in tinyC

78. Amicable numbers in tinyC, Amicable numbers in C

79. gennorm.sample.means.c christian.tc means.txt https://statscharts.com/bar/histogram?status=edit

weblite.try.c, weblite.html

Click Euler's identity, below, for its proof


Infix to Postfix translator and Proposition evaluator

81. in2po.c, proposition.c, !jtc post, propositional.logic.html

Remote Desktop



Where it all began ...

81.1 altair.html


82. pnut.1.time.jslinux.c pnt.htm

83. ANIMALS.BAS animals.c animalgame.c MightyPork Animal Game


84. vinod.pillai.c (example of add, delete, modify etc. Employee "database")


86. easter.tc


87. SNAKE.PAS snake.aaron.2.c SnakePas.c



90. TCAP24.BAS

91. ASCII.MSE Z80.MSE, z80.mp4

MULTSEQ.TC, multseq.c, multseq.html

92. RYEMASH.BAS, ryemash.txt, fortran_coloring_book.html

PILOT/80, VANDC.PIL, PILOT80.DOC, waduzitdo.html Rob Linwood's RPilot, documentation, guess1.p, menu.p


For the above link, login with vflogin tinyC, password is tiny-C You will find a collection of C programs that cover some of the basics here. Also, in the rpilot directory there are several example programs. The software in the next line is also in JSLinux. It's in the directory source/tiny-c-master/Projects/Project_millipede/

93. millipede.html, millie.c, millie.tc, millipede_millie.txt, chomsky.html

94. pentence.tc.jslinux.txt, pentence.tc.jslinux.txt.out, pentence.1.py

95. triangular.prism.tc

96. Two Trains and a Fly

97. hazel.tc

98. Ferris Wheel

99. pangram.4.1.tc, https://ideone.com/roz1Wc, pangram.5.tc, pangram.pl

Finding the equation of a line tangent to a curve using implicit differentiation https://www.desmos.com/calculator/hfsbqkjpau

100. Cryptarithms (http://www.cryptarithms.com/) math.c, laz.c


101. despooner.1.tc

102. caesar01.c Why did Caesar cross the Rubicon? Gb trg gb gur bgure fvqr. 103. greet05.c, .bash_profile, pithy05.c, pithy.txt


104. dandy.html, dandelion.4.16.22.c, dandelion.1.c

!jtc.tc, !jtc.html

105. june.22.c, june.22.data.c june.22b.c, june.22c.c


pf.tc, pf.html

106. therefore.tc

107. minarr.tc, minarr.c, minarr.bas



108. http://primepuzzle.com/poe/poe-4-90/poe-4-90.txt, BUZZ.BAS

109. give.a.dollar.try.2.tc




give a dollar in Julia by Aaron West Jim McClanahan's give a dollar in Python and Julia

110. RCV123.org

ranked.choice.voting.c choices.txt subjects.txt ranked.choice.voting.out ranked.choice.voting.exe (Windows executable) ranked.choice.voting (Linux executable)

IDEONE.CBL - https://ideone.com/s8zCC4
gus.c grade.py

111. color2new.aw.c colorbuf.c color.tc

112. section.formula.c centroid.py

113. socks.try.tc.2 std.dev.c graph.try.tc graph.inp.txt freq.tc freq.txt

114. fri13.tc nextfri.c

115. resistor.2.3d.c

116. deathrow.101b.tc rand.c







117. http://primepuzzle.com/runlog/february.24.html


chapter.8.c library.h library.c pace.txt

118. dan.gookin.2.11.23.html


119. calculator.2.1.c

120. apr.

121. hexencode.html

122. skier.py skier.mp4

123. bambi.no.plugin.tc, BAMBI.DAT, GODZILLA.DAT




124. flateval.c - an expression evaluator

flateval.exe - Windows executable

flateval - Linux executable

24.07.2023_08.55.52_REC.mp4 - flateval video

125. hangman.py

126. pypong.zip, Listing_19-5.py

127. find_sine_try.simple_plotter.c

128. http://primepuzzle.com/linux/ECHO.BAS, http://primepuzzle.com/linux/GOTCHA.MAC, http://primepuzzle.com/linux/TEST.BAS

http://primepuzzle.com/linux/MOTYLNEW.BAS, http://primepuzzle.com/linux/CMD.MAC

http://primepuzzle.com/not.just.tiny.c/pagoda.rle, https://qomph.com/lee/csrle/www/csrle.html, http://primepuzzle.com/not.just.tiny.c/rle.c

spoiler alert: you need calculus to do this.

determine the x coordinate such that the area under the red graph to the
left of the green line = 1/2 the area under the red graph to the right
of the green line. The red graph's function is y=-x(x-1).

You may use a calculator. Your answer should be accurate to 3 decimal digits.

Determine the value of the x-coordinate of the vertical black line that
splits the trapezoidal area defined by x-axis, the red line whose
equation is y= (1/2)x +1 and the two blue lines at x=2 and x=4 into two
trapezoids such that the area of the left trapezoid = 1/2 the area of
the right trapezoid. Show a 3-decimal digit accuracy in the answer.

http://primepuzzle.com/not.just.tiny.c/nic.1.jpg, http://primepuzzle.com/not.just.tiny.c/nic.2.jpg

129. http://primepuzzle.com/not.just.tiny.c/JIM~2.BAS, http://primepuzzle.com/not.just.tiny.c/jim.try.c

Here's a problem I recently worked on w/ a calculus student. Rotate the area defined by the two curves about the line y=2 and figure out the volume of the object. I find visualizing such things difficult. The idea here is to see the problem as summing a bunch of hollow cylinders (or "washers"). The volume of a cylinder is the area of the base times the height.

find a function whose derivative is equal to its inverse


A program to compute the dollar value of the pennies that go from the top of the Empire State Building to the top of the spire.

130. pennies.c

How to tile a square with 5 rectangles with edges in [1,10]

131. tile.html

What is the height (in cm) of a solid rectangular cube with base having a perimeter of 18 cm and which is made up of 42 square unit cubes (i.e. 1x1x1 cm^3)?

The "volume" of the cube = 42 = 2*7*3. If w,l,h stand for width, length, height, we get volume= w*l*h so volume/(w*l) = h. The perimeter is 2*(w+l)=18 so w+l=9 or w=9-l. volume/((9-l)*l) = 2*7*3/((9-l)*l). The only way the right hand side will be a whole number is if l = 2 which means h=3.

How many cards would you have to draw to get at least 1 card from each suit (Club, Diamond, Heart, Spade) and at least 1 card from each rank (Ace, 2, 3, 4, ... 10, Jack, Queen, King).

132. cards.1.c  cards.py  cards.cpp  card.h  deck.h
replit C  replit Python  replit C++

A runner sprints around a circular track of radius 100 m at a constant speed of 7 m/s. The runner s friend is standing at a distance 200 m from the center of the track. How fast is the distance between the friends changing when the distance between them is 200 m?


A difficult integral

133. https://www.desmos.com/calculator/6yytgtodu3

Venn diagram approach to solving question #16 on a Math Contest

134. venn.html

135. readdir_new.c, dir_try.tc


137. monster.c