libcwal  Hex Artifact Content

Artifact e3f8882b79250ddff4ee0da86ff27087fdb3731c:

Wiki page [th1ish] by stephan 2016-02-16 11:40:52.
0000: 44 20 32 30 31 36 2d 30 32 2d 31 36 54 31 31 3a  D 2016-02-16T11:
0010: 34 30 3a 35 32 2e 33 34 36 0a 4c 20 74 68 31 69  40:52.346.L th1i
0020: 73 68 0a 50 20 37 64 31 66 36 32 31 32 65 37 38  sh.P 7d1f6212e78
0030: 33 65 63 31 36 30 38 65 61 63 32 31 30 65 66 37  3ec1608eac210ef7
0040: 31 33 38 32 38 34 32 63 36 62 34 63 37 0a 55 20  1382842c6b4c7.U 
0050: 73 74 65 70 68 61 6e 0a 57 20 35 36 32 31 0a 3c  stephan.W 5621.<
0060: 73 74 72 6f 6e 67 3e 41 43 48 54 55 4e 47 3a 3c  strong>ACHTUNG:<
0070: 2f 73 74 72 6f 6e 67 3e 20 6f 6e 20 32 30 31 36  /strong> on 2016
0080: 30 32 30 31 36 2c 20 74 68 31 69 73 68 20 77 61  02016, th1ish wa
0090: 73 20 72 65 6d 6f 76 65 20 66 72 6f 6d 20 74 68  s remove from th
00a0: 65 20 74 72 75 6e 6b 2c 20 70 6c 61 63 65 64 20  e trunk, placed 
00b0: 69 6e 74 6f 20 74 68 65 20 5b 2f 69 6e 66 6f 2f  into the [/info/
00c0: 74 68 31 69 73 68 2d 52 2e 49 2e 50 2e 7c 74 68  th1ish-R.I.P.|th
00d0: 31 69 73 68 2d 52 2e 49 2e 50 2e 20 62 72 61 6e  1ish-R.I.P. bran
00e0: 63 68 5d 2c 20 6b 65 70 74 20 6f 6e 6c 79 20 66  ch], kept only f
00f0: 6f 72 20 68 69 73 74 6f 72 69 63 61 6c 20 69 6e  or historical in
0100: 74 65 72 65 73 74 2e 20 49 74 20 69 73 20 68 6f  terest. It is ho
0110: 6c 64 69 6e 67 20 63 77 61 6c 20 62 61 63 6b 20  lding cwal back 
0120: 66 72 6f 6d 20 73 65 76 65 72 61 6c 20 69 6d 70  from several imp
0130: 72 6f 76 65 6d 65 6e 74 73 20 61 6e 64 20 69 73  rovements and is
0140: 20 6e 6f 74 20 77 6f 72 74 68 20 74 68 65 20 65   not worth the e
0150: 66 66 6f 72 74 20 74 6f 20 6d 61 69 6e 74 61 69  ffort to maintai
0160: 6e 2e 20 5b 73 32 5d 20 69 73 20 69 74 73 20 72  n. [s2] is its r
0170: 65 70 6c 61 63 65 6d 65 6e 74 20 28 61 6e 64 20  eplacement (and 
0180: 74 68 65 20 74 77 6f 20 61 72 65 20 67 65 6e 65  the two are gene
0190: 72 61 6c 6c 79 20 61 62 6f 75 74 20 39 38 25 20  rally about 98% 
01a0: 63 6f 64 65 2d 63 6f 6d 70 61 74 69 62 6c 65 20  code-compatible 
01b0: 77 68 65 6e 20 69 74 20 63 6f 6d 65 73 20 74 6f  when it comes to
01c0: 20 63 6c 69 65 6e 74 2d 73 69 64 65 20 63 77 61   client-side cwa
01d0: 6c 20 62 69 6e 64 69 6e 67 73 29 2e 0d 0a 0d 0a  l bindings).....
01e0: 3c 68 31 3e 74 68 31 69 73 68 20 2d 20 61 20 63  <h1>th1ish - a c
01f0: 77 61 6c 2d 62 61 73 65 64 20 53 63 72 69 70 74  wal-based Script
0200: 69 6e 67 20 4c 61 6e 67 75 61 67 65 3c 2f 68 31  ing Language</h1
0210: 3e 0d 0a 0d 0a 3c 6e 6f 77 69 6b 69 3e 3c 70 72  >....<nowiki><pr
0220: 65 3e 0d 0a 5b 70 72 69 6e 74 20 22 48 65 6c 6c  e>..[print "Hell
0230: 6f 2c 20 77 6f 72 6c 64 21 22 5d 0d 0a 24 70 72  o, world!"]..$pr
0240: 69 6e 74 20 27 48 65 6c 6c 6f 2c 20 77 6f 72 6c  int 'Hello, worl
0250: 64 21 27 0d 0a 70 72 69 6e 74 28 7b 48 65 6c 6c  d!'..print({Hell
0260: 6f 2c 20 77 6f 72 6c 64 21 7d 29 0d 0a 24 70 72  o, world!})..$pr
0270: 69 6e 74 20 3c 3c 3c 45 4f 46 0d 0a 48 65 6c 6c  int <<<EOF..Hell
0280: 6f 2c 20 77 6f 72 6c 64 21 0d 0a 45 4f 46 0d 0a  o, world!..EOF..
0290: 61 70 69 2e 69 6f 2e 6f 75 74 70 75 74 28 22 48  api.io.output("H
02a0: 65 6c 6c 6f 2c 20 77 6f 72 6c 64 21 5c 6e 22 29  ello, world!\n")
02b0: 0d 0a 3c 2f 70 72 65 3e 3c 2f 6e 6f 77 69 6b 69  ..</pre></nowiki
02c0: 3e 0d 0a 0d 0a 74 68 31 69 73 68 20 69 73 20 61  >....th1ish is a
02d0: 6e 20 65 78 70 65 72 69 6d 65 6e 74 61 6c 2f 74  n experimental/t
02e0: 6f 79 20 73 63 72 69 70 74 69 6e 67 20 6c 61 6e  oy scripting lan
02f0: 67 75 61 67 65 20 69 6e 69 74 69 61 6c 6c 79 20  guage initially 
0300: 28 63 6f 6e 63 65 70 74 75 61 6c 6c 79 29 20 62  (conceptually) b
0310: 61 73 65 64 20 6f 66 66 20 6f 66 20 54 48 31 2c  ased off of TH1,
0320: 20 61 20 6c 65 73 73 65 72 20 28 61 6e 64 20 6c   a lesser (and l
0330: 65 73 73 65 72 2d 6b 6e 6f 77 6e 29 20 64 69 61  esser-known) dia
0340: 6c 65 63 74 20 6f 66 20 54 43 4c 2e 20 74 68 31  lect of TCL. th1
0350: 69 73 68 20 69 6e 68 65 72 69 74 73 20 6d 75 63  ish inherits muc
0360: 68 20 6f 66 20 54 48 31 27 73 20 73 79 6e 74 61  h of TH1's synta
0370: 78 20 62 75 74 20 69 73 20 65 78 70 72 65 73 73  x but is express
0380: 69 6f 6e 2d 63 65 6e 74 72 69 63 20 28 6e 6f 74  ion-centric (not
0390: 20 63 6f 6d 6d 61 6e 64 2d 63 65 6e 74 72 69 63   command-centric
03a0: 29 2c 20 61 64 64 73 20 74 68 65 20 72 69 63 68  ), adds the rich
03b0: 65 72 20 74 79 70 65 73 20 73 75 70 70 6f 72 74  er types support
03c0: 65 64 20 62 79 20 63 77 61 6c 20 28 77 68 69 63  ed by cwal (whic
03d0: 68 20 63 6c 6f 73 65 6c 79 20 6d 69 6d 69 63 73  h closely mimics
03e0: 20 4a 61 76 61 53 63 72 69 70 74 29 2c 20 61 6e   JavaScript), an
03f0: 64 20 73 63 6f 70 69 6e 67 2f 6c 69 66 65 74 69  d scoping/lifeti
0400: 6d 65 20 72 75 6c 65 73 20 73 69 6d 69 6c 61 72  me rules similar
0410: 20 28 62 75 74 20 6e 6f 74 20 69 64 65 6e 74 69   (but not identi
0420: 63 61 6c 29 20 74 6f 20 43 2b 2b 2e 20 57 68 69  cal) to C++. Whi
0430: 6c 65 20 74 68 65 72 65 20 69 73 20 73 74 69 6c  le there is stil
0440: 6c 20 74 77 65 61 6b 69 6e 67 20 61 6e 64 20 65  l tweaking and e
0450: 78 70 65 72 69 6d 65 6e 74 61 74 69 6f 6e 20 74  xperimentation t
0460: 6f 20 62 65 20 64 6f 6e 65 2c 20 74 68 31 69 73  o be done, th1is
0470: 68 20 69 73 20 63 75 72 72 65 6e 74 6c 79 20 66  h is currently f
0480: 75 6e 63 74 69 6f 6e 61 6c 20 61 6e 64 20 72 65  unctional and re
0490: 61 64 79 20 74 6f 20 75 73 65 20 69 6e 20 69 74  ady to use in it
04a0: 73 20 6f 72 69 67 69 6e 61 6c 20 69 6e 74 65 6e  s original inten
04b0: 64 65 64 20 72 6f 6c 65 3a 20 61 20 73 69 6d 70  ded role: a simp
04c0: 6c 65 2d 74 6f 2d 75 73 65 20 70 6c 61 74 66 6f  le-to-use platfo
04d0: 72 6d 20 77 69 74 68 20 77 68 69 63 68 20 74 6f  rm with which to
04e0: 20 77 72 69 74 65 20 73 63 72 69 70 74 61 62 6c   write scriptabl
04f0: 65 20 74 65 73 74 20 68 61 72 6e 65 73 73 65 73  e test harnesses
0500: 20 66 6f 72 20 43 2f 43 2b 2b 20 6c 69 62 72 61   for C/C++ libra
0510: 72 69 65 73 20 61 6e 64 20 61 70 70 73 2c 20 61  ries and apps, a
0520: 6e 64 20 73 69 6d 69 6c 61 72 20 22 6c 69 67 68  nd similar "ligh
0530: 74 22 20 73 63 72 69 70 74 69 6e 67 20 74 61 73  t" scripting tas
0540: 6b 73 2e 20 42 69 6e 64 69 6e 67 20 63 6c 69 65  ks. Binding clie
0550: 6e 74 2d 73 69 64 65 20 66 75 6e 63 74 69 6f 6e  nt-side function
0560: 61 6c 69 74 79 20 74 6f 20 73 63 72 69 70 74 73  ality to scripts
0570: 20 69 73 20 65 61 73 79 20 74 6f 20 64 6f 2c 20   is easy to do, 
0580: 69 6e 63 6c 75 64 69 6e 67 20 62 69 6e 64 69 6e  including bindin
0590: 67 20 63 75 73 74 6f 6d 20 6e 61 74 69 76 65 20  g custom native 
05a0: 74 79 70 65 73 20 69 6e 20 73 75 63 68 20 61 20  types in such a 
05b0: 77 61 79 20 74 68 61 74 20 74 68 31 69 73 68 20  way that th1ish 
05c0: 63 61 6e 20 74 72 61 63 6b 20 74 68 65 69 72 20  can track their 
05d0: 6c 69 66 65 74 69 6d 65 73 20 61 6e 64 20 64 65  lifetimes and de
05e0: 73 74 72 6f 79 20 74 68 65 6d 20 28 75 73 69 6e  stroy them (usin
05f0: 67 20 61 20 63 6c 69 65 6e 74 2d 70 72 6f 76 69  g a client-provi
0600: 64 65 64 20 66 69 6e 61 6c 69 7a 65 72 29 20 77  ded finalizer) w
0610: 68 65 6e 20 74 68 65 20 70 72 6f 70 65 72 20 74  hen the proper t
0620: 69 6d 65 20 63 6f 6d 65 73 2e 0d 0a 0d 0a 74 68  ime comes.....th
0630: 31 69 73 68 20 69 73 20 65 78 70 65 72 69 6d 65  1ish is experime
0640: 6e 74 61 6c 20 61 6e 64 20 61 20 74 6f 79 2c 20  ntal and a toy, 
0650: 62 75 74 20 63 61 6e 20 64 6f 20 66 61 72 2c 20  but can do far, 
0660: 66 61 72 20 6d 6f 72 65 20 74 68 61 6e 20 77 61  far more than wa
0670: 73 20 6f 72 69 67 69 6e 61 6c 6c 79 20 65 6e 76  s originally env
0680: 69 73 69 6f 6e 65 64 2f 70 6c 61 6e 6e 65 64 20  isioned/planned 
0690: 66 6f 72 20 69 74 2e 20 28 49 66 20 6e 6f 74 68  for it. (If noth
06a0: 69 6e 67 20 65 6c 73 65 2c 20 74 68 31 69 73 68  ing else, th1ish
06b0: 20 68 61 73 20 70 72 6f 76 65 6e 20 74 6f 20 62   has proven to b
06c0: 65 20 61 6e 20 69 6e 76 61 6c 75 61 62 6c 65 20  e an invaluable 
06d0: 74 65 73 74 2d 62 65 64 20 66 6f 72 20 74 68 65  test-bed for the
06e0: 20 63 6f 72 65 20 63 77 61 6c 20 6c 69 62 72 61   core cwal libra
06f0: 72 79 2e 29 20 74 68 31 69 73 68 20 69 73 20 65  ry.) th1ish is e
0700: 73 73 65 6e 74 69 61 6c 6c 79 20 66 65 61 74 75  ssentially featu
0710: 72 65 2d 63 6f 6d 70 6c 65 74 65 2c 20 62 75 74  re-complete, but
0720: 20 69 74 20 69 73 20 63 6f 6e 74 69 6e 75 61 6c   it is continual
0730: 6c 79 20 62 65 69 6e 67 20 74 77 65 61 6b 65 64  ly being tweaked
0740: 2e 0d 0a 0d 0a 53 65 65 20 3c 74 74 3e 5b 2f 64  .....See <tt>[/d
0750: 69 72 3f 63 69 3d 74 69 70 26 6e 61 6d 65 3d 74  ir?ci=tip&name=t
0760: 68 31 69 73 68 7c 74 68 31 69 73 68 2f 74 68 31  h1ish|th1ish/th1
0770: 69 73 68 2a 2e 63 5d 3c 2f 74 74 3e 20 66 6f 72  ish*.c]</tt> for
0780: 20 74 68 65 20 63 75 72 72 65 6e 74 20 63 6f 64   the current cod
0790: 65 2c 20 3c 74 74 3e 5b 2f 64 69 72 3f 63 69 3d  e, <tt>[/dir?ci=
07a0: 74 69 70 26 6e 61 6d 65 3d 74 68 31 69 73 68 7c  tip&name=th1ish|
07b0: 74 68 31 69 73 68 2f 73 68 65 6c 6c 2e 63 5d 3c  th1ish/shell.c]<
07c0: 2f 74 74 3e 20 66 6f 72 20 74 68 65 20 74 65 73  /tt> for the tes
07d0: 74 20 61 70 70 2c 20 61 6e 64 20 3c 74 74 3e 5b  t app, and <tt>[
07e0: 2f 64 69 72 3f 63 69 3d 74 69 70 26 6e 61 6d 65  /dir?ci=tip&name
07f0: 3d 74 68 31 69 73 68 2f 75 6e 69 74 7c 74 68 31  =th1ish/unit|th1
0800: 69 73 68 2f 75 6e 69 74 2f 2a 2e 74 68 31 69 73  ish/unit/*.th1is
0810: 68 5d 3c 2f 74 74 3e 20 66 6f 72 20 76 61 72 69  h]</tt> for vari
0820: 6f 75 73 20 74 65 73 74 20 73 63 72 69 70 74 73  ous test scripts
0830: 2e 20 74 68 31 69 73 68 20 69 73 20 62 65 69 6e  . th1ish is bein
0840: 67 20 64 6f 63 75 6d 65 6e 74 65 64 20 69 6e 20  g documented in 
0850: 64 65 74 61 69 6c 20 69 6e 20 61 20 70 61 69 72  detail in a pair
0860: 20 6f 66 20 70 75 62 6c 69 63 20 47 6f 6f 67 6c   of public Googl
0870: 65 20 44 6f 63 75 6d 65 6e 74 73 3a 0d 0a 0d 0a  e Documents:....
0880: 20 20 20 2a 20 20 5b 68 74 74 70 73 3a 2f 2f 64     *  [https://d
0890: 6f 63 73 2e 67 6f 6f 67 6c 65 2e 63 6f 6d 2f 64  ocs.google.com/d
08a0: 6f 63 75 6d 65 6e 74 2f 64 2f 31 50 44 69 37 6c  ocument/d/1PDi7l
08b0: 77 75 66 6f 6e 64 48 34 47 47 52 75 6e 68 31 6b  wufondH4GGRunh1k
08c0: 46 53 4f 59 6b 72 6c 31 78 71 4c 39 63 58 65 61  FSOYkrl1xqL9cXea
08d0: 38 6d 56 43 4c 6b 2f 76 69 65 77 7c 4d 61 69 6e  8mVCLk/view|Main
08e0: 20 64 6f 63 73 5d 0d 0a 20 20 20 2a 20 20 5b 68   docs]..   *  [h
08f0: 74 74 70 73 3a 2f 2f 64 6f 63 73 2e 67 6f 6f 67  ttps://docs.goog
0900: 6c 65 2e 63 6f 6d 2f 64 6f 63 75 6d 65 6e 74 2f  le.com/document/
0910: 64 2f 31 36 5f 53 41 67 49 59 73 51 56 45 44 4c  d/16_SAgIYsQVEDL
0920: 59 41 50 4c 34 68 65 6a 63 49 4c 77 52 67 6a 77  YAPL4hejcILwRgjw
0930: 38 30 6b 72 50 6a 70 65 37 41 71 37 59 73 2f 76  80krPjpe7Aq7Ys/v
0940: 69 65 77 7c 4c 6f 61 64 61 62 6c 65 20 6d 6f 64  iew|Loadable mod
0950: 75 6c 65 73 20 64 6f 63 73 5d 2e 20 73 71 6c 69  ules docs]. sqli
0960: 74 65 33 2f 4d 79 53 51 4c 20 64 62 20 61 63 63  te3/MySQL db acc
0970: 65 73 73 2c 20 62 61 73 69 63 20 72 65 67 65 78  ess, basic regex
0980: 20 73 75 70 70 6f 72 74 2c 20 67 6c 6f 62 20 6d   support, glob m
0990: 61 74 63 68 69 6e 67 2c 20 53 48 41 31 20 68 61  atching, SHA1 ha
09a0: 73 68 69 6e 67 2c 20 55 55 49 44 20 67 65 6e 65  shing, UUID gene
09b0: 72 61 74 69 6f 6e 2c 20 61 6e 64 20 43 47 49 20  ration, and CGI 
09c0: 73 75 70 70 6f 72 74 20 61 6c 6c 20 61 77 61 69  support all awai
09d0: 74 20 69 6e 20 74 68 65 20 6c 6f 61 64 61 62 6c  t in the loadabl
09e0: 65 20 6d 6f 64 75 6c 65 73 2e 0d 0a 0d 0a 41 73  e modules.....As
09f0: 20 6f 66 20 74 68 69 73 20 77 72 69 74 69 6e 67   of this writing
0a00: 20 28 4d 61 79 20 32 30 31 34 29 2c 20 74 68 6f   (May 2014), tho
0a10: 73 65 20 74 77 6f 20 64 6f 63 73 20 77 65 69 67  se two docs weig
0a20: 68 73 20 69 6e 20 61 74 20 32 36 35 20 6b 62 20  hs in at 265 kb 
0a30: 6f 66 20 74 65 78 74 2c 20 6a 75 73 74 20 6f 76  of text, just ov
0a40: 65 72 20 31 30 30 20 70 61 67 65 73 2c 20 6d 6f  er 100 pages, mo
0a50: 73 74 6c 79 20 61 62 6f 75 74 20 68 6f 77 20 74  stly about how t
0a60: 6f 20 75 73 65 20 69 74 20 73 63 72 69 70 74 2d  o use it script-
0a70: 73 69 64 65 2c 20 62 75 74 20 61 6c 73 6f 20 68  side, but also h
0a80: 6f 77 20 74 6f 20 75 73 65 20 69 74 20 66 72 6f  ow to use it fro
0a90: 6d 20 43 2e 20 54 68 65 20 64 6f 63 73 20 67 65  m C. The docs ge
0aa0: 74 20 75 70 64 61 74 65 64 20 61 73 20 74 68 65  t updated as the
0ab0: 20 63 6f 64 65 20 69 73 20 77 72 69 74 74 65 6e   code is written
0ac0: 2c 20 73 6f 20 74 68 65 79 20 61 6c 77 61 79 73  , so they always
0ad0: 20 72 65 66 6c 65 63 74 73 20 74 68 65 20 5b 2f   reflects the [/
0ae0: 74 69 6d 65 6c 69 6e 65 3f 72 3d 74 72 75 6e 6b  timeline?r=trunk
0af0: 7c 63 75 72 72 65 6e 74 20 74 72 75 6e 6b 20 73  |current trunk s
0b00: 74 61 74 65 5d 20 6f 72 20 77 68 61 74 20 77 69  tate] or what wi
0b10: 6c 6c 20 62 65 20 63 68 65 63 6b 65 64 20 69 6e  ll be checked in
0b20: 74 6f 20 74 68 65 20 74 72 75 6e 6b 20 73 68 6f  to the trunk sho
0b30: 72 74 6c 79 2e 0d 0a 0d 0a 0d 0a 3c 68 31 3e 4e  rtly.......<h1>N
0b40: 65 77 73 3c 2f 68 31 3e 0d 0a 0d 0a 4e 65 77 65  ews</h1>....Newe
0b50: 73 74 20 69 74 65 6d 73 20 61 74 20 74 68 65 20  st items at the 
0b60: 74 6f 70 2e 0d 0a 20 20 20 2a 20 20 32 30 31 34  top...   *  2014
0b70: 30 35 3a 20 6f 6e 67 6f 69 6e 67 20 65 78 70 65  05: ongoing expe
0b80: 72 69 6d 65 6e 74 61 74 69 6f 6e 20 77 69 74 68  rimentation with
0b90: 20 5b 2f 65 76 65 6e 74 2f 34 35 63 37 35 36 63   [/event/45c756c
0ba0: 33 35 31 39 37 39 39 31 62 30 33 31 32 31 34 36  35197991b0312146
0bb0: 62 66 62 65 35 33 33 32 38 61 61 33 37 35 39 65  bfbe53328aa3759e
0bc0: 37 7c 74 68 65 20 76 61 63 75 75 6d 20 61 6c 67  7|the vacuum alg
0bd0: 6f 72 69 74 68 6d 5d 20 68 61 73 20 79 69 65 6c  orithm] has yiel
0be0: 64 65 64 20 67 6f 6f 64 20 72 65 73 75 6c 74 73  ded good results
0bf0: 2e 20 74 68 31 69 73 68 20 6e 6f 77 20 76 61 63  . th1ish now vac
0c00: 75 75 6d 73 20 61 6c 6c 20 73 63 6f 70 65 73 20  uums all scopes 
0c10: 72 65 67 75 6c 61 72 6c 79 20 65 78 63 65 70 74  regularly except
0c20: 20 66 6f 72 20 74 68 65 20 67 6c 6f 62 61 6c 20   for the global 
0c30: 6f 6e 65 20 28 77 68 65 72 65 20 76 61 63 75 75  one (where vacuu
0c40: 6d 69 6e 67 20 62 72 65 61 6b 73 2c 20 61 70 70  ming breaks, app
0c50: 61 72 65 6e 74 6c 79 20 64 75 65 20 74 6f 20 28  arently due to (
0c60: 61 73 20 64 65 73 69 67 6e 65 64 29 20 6e 6f 6e  as designed) non
0c70: 2d 73 63 72 69 70 74 2d 76 69 73 69 62 6c 65 20  -script-visible 
0c80: 76 61 6c 75 65 73 20 62 65 69 6e 67 20 63 6c 65  values being cle
0c90: 61 6e 65 64 20 75 70 29 2e 0d 0a 20 20 20 2a 20  aned up)...   * 
0ca0: 20 32 30 31 34 30 34 30 37 3a 20 74 68 31 69 73   20140407: th1is
0cb0: 68 20 69 73 20 6e 6f 77 20 62 65 69 6e 67 20 75  h is now being u
0cc0: 73 65 64 20 74 6f 20 77 72 69 74 65 20 43 47 49  sed to write CGI
0cd0: 20 61 70 70 6c 69 63 61 74 69 6f 6e 73 2e 20 5b   applications. [
0ce0: 68 74 74 70 3a 2f 2f 66 6f 73 73 69 6c 2e 77 61  http://fossil.wa
0cf0: 6e 64 65 72 69 6e 67 68 6f 72 73 65 2e 6e 65 74  nderinghorse.net
0d00: 2f 72 65 70 6f 73 2f 63 77 61 6c 2f 75 69 32 2f  /repos/cwal/ui2/
0d10: 7c 54 68 69 73 20 64 65 6d 6f 20 73 69 74 65 5d  |This demo site]
0d20: 20 69 73 20 69 6d 70 6c 65 6d 65 6e 74 65 64 20   is implemented 
0d30: 65 6e 74 69 72 65 6c 79 20 69 6e 20 74 68 31 69  entirely in th1i
0d40: 73 68 2e 0d 0a 20 20 20 2a 20 20 32 30 31 33 30  sh...   *  20130
0d50: 37 32 32 3a 20 41 64 64 65 64 20 3c 74 74 3e 69  722: Added <tt>i
0d60: 6e 68 65 72 69 74 73 3c 2f 74 74 3e 20 6b 65 79  nherits</tt> key
0d70: 77 6f 72 64 2c 20 77 68 69 63 68 20 62 65 68 61  word, which beha
0d80: 76 65 73 20 61 6c 6d 6f 73 74 20 74 68 65 20 73  ves almost the s
0d90: 61 6d 65 20 61 73 20 4a 61 76 61 53 63 72 69 70  ame as JavaScrip
0da0: 74 27 73 20 3c 74 74 3e 69 6e 73 74 61 6e 63 65  t's <tt>instance
0db0: 6f 66 3c 2f 74 74 3e 2e 20 41 64 64 65 64 20 3c  of</tt>. Added <
0dc0: 74 74 3e 2d 49 3c 2f 74 74 3e 20 66 6c 61 67 20  tt>-I</tt> flag 
0dd0: 74 6f 20 74 68 31 69 73 68 20 73 68 65 6c 6c 20  to th1ish shell 
0de0: 74 6f 20 64 75 6d 70 20 74 68 65 20 63 77 61 6c  to dump the cwal
0df0: 20 73 74 72 69 6e 67 2d 69 6e 74 65 72 6e 69 6e   string-internin
0e00: 67 20 74 61 62 6c 65 20 62 65 66 6f 72 65 20 63  g table before c
0e10: 6c 65 61 6e 69 6e 67 20 75 70 2e 0d 0a 20 20 20  leaning up...   
0e20: 2a 20 20 32 30 31 33 30 37 32 30 3a 20 41 64 64  *  20130720: Add
0e30: 65 64 20 3c 74 74 3e 74 6f 73 73 3c 2f 74 74 3e  ed <tt>toss</tt>
0e40: 20 6b 65 79 77 6f 72 64 20 74 6f 20 72 65 70 6c   keyword to repl
0e50: 61 63 65 20 75 73 65 20 6f 66 20 3c 74 74 3e 72  ace use of <tt>r
0e60: 65 74 75 72 6e 3c 2f 74 74 3e 20 66 72 6f 6d 20  eturn</tt> from 
0e70: 69 6e 73 69 64 65 20 3c 74 74 3e 63 61 74 63 68  inside <tt>catch
0e80: 3c 2f 74 74 3e 20 62 6c 6f 63 6b 73 2e 20 4f 70  </tt> blocks. Op
0e90: 74 69 6d 69 7a 61 74 69 6f 6e 73 20 74 6f 20 68  timizations to h
0ea0: 6f 77 20 73 74 72 69 6e 67 20 6d 65 6d 6f 72 79  ow string memory
0eb0: 20 69 73 20 72 65 63 79 63 6c 65 64 20 63 75 74   is recycled cut
0ec0: 20 74 68 65 20 74 6f 74 61 6c 20 6d 65 6d 6f 72   the total memor
0ed0: 79 20 61 6c 6c 6f 63 61 74 69 6f 6e 20 63 6f 75  y allocation cou
0ee0: 6e 74 20 61 6e 79 77 68 65 72 65 20 66 72 6f 6d  nt anywhere from
0ef0: 20 61 20 66 65 77 20 70 65 72 63 65 6e 74 20 74   a few percent t
0f00: 6f 20 33 36 25 28 21 21 21 29 20 69 6e 20 74 68  o 36%(!!!) in th
0f10: 65 20 74 65 73 74 20 73 63 72 69 70 74 73 2e 0d  e test scripts..
0f20: 0a 20 20 20 2a 20 20 32 30 31 33 30 37 31 33 3a  .   *  20130713:
0f30: 20 41 64 64 65 64 20 22 70 6f 70 65 6e 69 73 68   Added "popenish
0f40: 22 20 6c 6f 61 64 61 62 6c 65 20 6d 6f 64 75 6c  " loadable modul
0f50: 65 2c 20 77 68 69 63 68 20 6f 70 65 6e 73 20 61  e, which opens a
0f60: 20 62 69 2d 64 69 72 65 63 74 69 6f 6e 61 6c 20   bi-directional 
0f70: 72 65 61 64 2f 77 72 69 74 65 20 73 74 72 65 61  read/write strea
0f80: 6d 20 74 6f 20 61 20 63 68 69 6c 64 20 70 72 6f  m to a child pro
0f90: 63 65 73 73 2e 20 41 64 64 65 64 20 22 67 6c 6f  cess. Added "glo
0fa0: 62 69 73 68 22 20 6d 6f 64 75 6c 65 20 77 68 69  bish" module whi
0fb0: 63 68 20 70 72 6f 76 69 64 65 73 20 74 77 6f 20  ch provides two 
0fc0: 66 6f 72 6d 73 20 6f 66 20 67 6c 6f 62 2d 6c 69  forms of glob-li
0fd0: 6b 65 20 73 74 72 69 6e 67 20 6d 61 74 63 68 69  ke string matchi
0fe0: 6e 67 20 66 75 6e 63 74 69 6f 6e 73 2e 20 53 70  ng functions. Sp
0ff0: 6c 69 74 20 6c 6f 61 64 61 62 6c 65 20 6d 6f 64  lit loadable mod
1000: 75 6c 65 20 64 6f 63 73 20 69 6e 74 6f 20 5b 68  ule docs into [h
1010: 74 74 70 73 3a 2f 2f 64 6f 63 73 2e 67 6f 6f 67  ttps://docs.goog
1020: 6c 65 2e 63 6f 6d 2f 64 6f 63 75 6d 65 6e 74 2f  le.com/document/
1030: 64 2f 31 36 5f 53 41 67 49 59 73 51 56 45 44 4c  d/16_SAgIYsQVEDL
1040: 59 41 50 4c 34 68 65 6a 63 49 4c 77 52 67 6a 77  YAPL4hejcILwRgjw
1050: 38 30 6b 72 50 6a 70 65 37 41 71 37 59 73 2f 76  80krPjpe7Aq7Ys/v
1060: 69 65 77 7c 61 20 73 65 70 61 72 61 74 65 20 64  iew|a separate d
1070: 6f 63 75 6d 65 6e 74 5d 2e 20 53 74 61 72 74 65  ocument]. Starte
1080: 64 20 77 6f 72 6b 20 6f 6e 20 61 20 43 47 49 20  d work on a CGI 
1090: 70 6c 75 67 69 6e 2c 20 77 68 69 63 68 20 73 65  plugin, which se
10a0: 74 73 20 75 70 20 74 68 65 20 65 6e 76 69 72 6f  ts up the enviro
10b0: 6e 6d 65 6e 74 20 62 61 73 65 64 20 6f 6e 20 43  nment based on C
10c0: 47 49 2d 72 65 6c 61 74 65 64 20 64 61 74 61 2e  GI-related data.
10d0: 20 54 68 65 20 62 61 73 69 63 73 20 61 72 65 20   The basics are 
10e0: 69 6e 20 70 6c 61 63 65 2c 20 62 75 74 20 73 74  in place, but st
10f0: 69 6c 6c 20 64 65 63 69 64 69 6e 67 20 6f 6e 20  ill deciding on 
1100: 74 68 65 20 65 78 61 63 74 20 73 65 6d 61 6e 74  the exact semant
1110: 69 63 73 20 6f 66 20 69 74 73 20 6f 75 74 70 75  ics of its outpu
1120: 74 20 6d 6f 64 65 6c 2e 0d 0a 20 20 20 2a 20 20  t model...   *  
1130: 32 30 31 33 30 37 31 32 3a 20 41 64 64 65 64 20  20130712: Added 
1140: 3c 74 74 3e 61 70 69 2e 6a 73 6f 6e 2e 70 61 72  <tt>api.json.par
1150: 73 65 28 29 3c 2f 74 74 3e 2c 20 77 68 69 63 68  se()</tt>, which
1160: 20 63 6f 6e 76 65 72 74 73 20 4a 53 4f 4e 20 73   converts JSON s
1170: 74 72 69 6e 67 73 20 74 6f 20 61 6e 20 4f 62 6a  trings to an Obj
1180: 65 63 74 20 6f 72 20 41 72 72 61 79 2e 0d 0a 20  ect or Array... 
1190: 20 20 2a 20 20 32 30 31 33 30 37 31 31 3a 20 41    *  20130711: A
11a0: 64 64 65 64 20 22 75 75 69 64 69 73 68 22 20 6c  dded "uuidish" l
11b0: 6f 61 64 61 62 6c 65 20 6d 6f 64 75 6c 65 20 28  oadable module (
11c0: 61 64 64 73 20 61 20 3c 74 74 3e 75 75 69 64 28  adds a <tt>uuid(
11d0: 29 3c 2f 74 74 3e 20 66 75 6e 63 74 69 6f 6e 29  )</tt> function)
11e0: 2e 0d 0a 20 20 20 2a 20 20 32 30 31 33 30 37 31  ...   *  2013071
11f0: 30 3a 20 61 64 64 65 64 20 22 73 68 61 31 69 73  0: added "sha1is
1200: 68 22 20 6c 6f 61 64 61 62 6c 65 20 6d 6f 64 75  h" loadable modu
1210: 6c 65 20 28 61 64 64 73 20 61 20 3c 74 74 3e 73  le (adds a <tt>s
1220: 68 61 31 28 29 3c 2f 74 74 3e 20 66 75 6e 63 74  ha1()</tt> funct
1230: 69 6f 6e 29 2e 20 41 64 64 65 64 20 68 61 6e 64  ion). Added hand
1240: 6c 69 6e 67 20 6f 66 20 3c 74 74 3e 5c 75 58 58  ling of <tt>\uXX
1250: 58 58 3c 2f 74 74 3e 20 55 6e 69 63 6f 64 65 20  XX</tt> Unicode 
1260: 63 68 61 72 61 63 74 65 72 20 65 73 63 61 70 69  character escapi
1270: 6e 67 20 28 77 69 74 68 20 32 2c 20 34 2c 20 36  ng (with 2, 4, 6
1280: 2c 20 6f 72 20 38 20 68 65 78 20 64 69 67 69 74  , or 8 hex digit
1290: 73 29 20 69 6e 20 3c 65 6d 3e 71 75 6f 74 65 64  s) in <em>quoted
12a0: 3c 2f 65 6d 3e 20 73 74 72 69 6e 67 20 6c 69 74  </em> string lit
12b0: 65 72 61 6c 73 20 28 6e 6f 74 20 69 64 65 6e 74  erals (not ident
12c0: 69 66 69 65 72 73 2c 20 74 68 6f 75 67 68 20 74  ifiers, though t
12d0: 68 61 74 27 73 20 6e 6f 77 20 70 6f 73 73 69 62  hat's now possib
12e0: 6c 65 20 77 69 74 68 20 61 20 74 69 6e 79 20 62  le with a tiny b
12f0: 69 74 20 6f 66 20 72 65 66 61 63 74 6f 72 69 6e  it of refactorin
1300: 67 29 2e 0d 0a 20 20 20 2a 20 20 32 30 31 33 30  g)...   *  20130
1310: 37 30 36 3a 20 6e 6f 77 20 73 6b 69 70 73 20 6f  706: now skips o
1320: 76 65 72 20 3c 74 74 3e 23 21 73 68 65 62 61 6e  ver <tt>#!sheban
1330: 67 3c 2f 74 74 3e 20 61 74 20 74 68 65 20 73 74  g</tt> at the st
1340: 61 72 74 20 6f 66 20 73 63 72 69 70 74 20 74 6f  art of script to
1350: 20 73 75 70 70 6f 72 74 20 6d 61 6b 69 6e 67 20   support making 
1360: 73 63 72 69 70 74 73 20 65 78 65 63 75 74 61 62  scripts executab
1370: 6c 65 20 76 69 61 20 74 68 65 20 55 6e 69 78 2d  le via the Unix-
1380: 63 6f 6e 76 65 6e 74 69 6f 6e 61 6c 20 6d 65 63  conventional mec
1390: 68 61 6e 69 73 6d 2e 20 53 74 61 63 6b 20 74 72  hanism. Stack tr
13a0: 61 63 65 20 6f 70 74 69 6d 69 7a 61 74 69 6f 6e  ace optimization
13b0: 73 3a 20 28 31 29 20 64 65 66 65 72 20 63 61 6c  s: (1) defer cal
13c0: 63 75 6c 61 74 69 6f 6e 20 6f 66 20 73 63 72 69  culation of scri
13d0: 70 74 20 6c 6f 63 61 74 69 6f 6e 20 69 6e 66 6f  pt location info
13e0: 72 6d 61 74 69 6f 6e 20 75 6e 74 69 6c 20 61 6e  rmation until an
13f0: 20 65 78 63 65 70 74 69 6f 6e 20 69 73 20 74 68   exception is th
1400: 72 6f 77 6e 20 61 6e 64 20 28 32 29 20 6e 6f 20  rown and (2) no 
1410: 6c 6f 6e 67 65 72 20 61 6c 6c 6f 63 61 74 65 20  longer allocate 
1420: 73 74 61 63 6b 20 65 6e 74 72 69 65 73 20 6f 6e  stack entries on
1430: 20 74 68 65 20 68 65 61 70 20 28 74 68 65 79 27   the heap (they'
1440: 72 65 20 6f 6e 20 74 68 65 20 73 74 61 63 6b 2c  re on the stack,
1450: 20 6f 66 20 63 6f 75 72 73 65 21 29 2e 20 41 64   of course!). Ad
1460: 64 65 64 20 62 69 74 77 69 73 65 20 6e 65 67 61  ded bitwise nega
1470: 74 69 6f 6e 20 6f 70 65 72 61 74 6f 72 2e 20 41  tion operator. A
1480: 64 64 65 64 20 3c 74 74 3e 2d 65 20 53 43 52 49  dded <tt>-e SCRI
1490: 50 54 5f 43 4f 44 45 3c 2f 74 74 3e 20 6f 70 74  PT_CODE</tt> opt
14a0: 69 6f 6e 20 74 6f 20 74 68 65 20 73 68 65 6c 6c  ion to the shell
14b0: 20 61 70 70 2e 20 4d 6f 76 65 64 20 50 43 52 45   app. Moved PCRE
14c0: 20 63 6f 64 65 20 69 6e 74 6f 20 61 20 6c 6f 61   code into a loa
14d0: 64 61 62 6c 65 20 6d 6f 64 75 6c 65 2e 20 53 74  dable module. St
14e0: 69 6c 6c 20 73 65 65 69 6e 67 20 74 68 65 20 6c  ill seeing the l
14f0: 75 72 6b 65 72 20 69 6e 20 74 68 65 20 47 6f 6f  urker in the Goo
1500: 67 6c 65 20 44 6f 63 2e 0d 0a 20 20 20 2a 20 20  gle Doc...   *  
1510: 32 30 31 33 30 37 30 35 3a 20 41 64 64 65 64 20  20130705: Added 
1520: 27 64 69 72 65 6e 74 27 20 70 6c 75 67 69 6e 20  'dirent' plugin 
1530: 77 68 69 63 68 20 61 64 64 73 20 61 6e 20 3c 74  which adds an <t
1540: 74 3e 6f 70 65 6e 64 69 72 28 33 29 3c 2f 74 74  t>opendir(3)</tt
1550: 3e 20 77 72 61 70 70 65 72 2e 0d 0a 20 20 20 2a  > wrapper...   *
1560: 20 20 32 30 31 33 30 37 30 34 3a 20 61 64 64 65    20130704: adde
1570: 64 20 22 68 65 72 65 64 6f 63 73 22 20 61 6e 64  d "heredocs" and
1580: 20 61 6e 20 22 61 75 74 6f 2d 73 77 65 65 70 22   an "auto-sweep"
1590: 20 6f 70 74 69 6f 6e 20 28 6f 6e 20 62 79 20 64   option (on by d
15a0: 65 66 61 75 6c 74 29 20 77 68 69 63 68 20 63 6c  efault) which cl
15b0: 65 61 6e 73 20 74 65 6d 70 6f 72 61 72 69 65 73  eans temporaries
15c0: 20 75 70 20 65 76 65 72 79 20 66 65 77 20 65 78   up every few ex
15d0: 70 72 65 73 73 69 6f 6e 73 2e 20 53 74 61 72 74  pressions. Start
15e0: 65 64 20 74 68 69 73 20 6e 65 77 73 20 6c 69 73  ed this news lis
15f0: 74 2e 20 53 6f 6d 65 6f 6e 65 20 6f 74 68 65 72  t. Someone other
1600: 20 74 68 61 6e 20 6d 65 20 28 6e 6f 20 69 64 65   than me (no ide
1610: 61 20 77 68 6f 29 20 68 61 73 20 62 65 65 6e 20  a who) has been 
1620: 68 61 6e 67 69 6e 67 20 6f 75 74 20 69 6e 20 74  hanging out in t
1630: 68 65 20 47 6f 6f 67 6c 65 20 44 6f 63 20 66 6f  he Google Doc fo
1640: 72 20 74 68 65 20 70 61 73 74 20 74 77 6f 20 64  r the past two d
1650: 61 79 73 2e 0a 5a 20 36 62 38 33 64 61 38 61 33  ays..Z 6b83da8a3
1660: 63 36 35 38 31 66 66 34 36 37 39 61 65 35 36 61  c6581ff4679ae56a
1670: 65 65 31 66 62 35 39 0a                          ee1fb59.