Hex Artifact Content
Not logged in

Artifact 54118c0e4931fe124fe39287fda8f965d954cb6b:

Wiki page [Thunderchez] by aldo 2016-09-04 20:06:29.
0000: 44 20 32 30 31 36 2d 30 39 2d 30 34 54 32 30 3a  D 2016-09-04T20:
0010: 30 36 3a 32 39 2e 30 35 36 0a 4c 20 54 68 75 6e  06:29.056.L Thun
0020: 64 65 72 63 68 65 7a 0a 50 20 61 62 65 38 65 65  derchez.P abe8ee
0030: 36 34 35 36 34 33 62 34 35 31 63 35 30 61 38 39  645643b451c50a89
0040: 35 35 64 39 39 30 31 35 64 65 65 30 65 33 36 33  55d99015dee0e363
0050: 38 32 0a 55 20 61 6c 64 6f 0a 57 20 32 39 35 39  82.U aldo.W 2959
0060: 0a 3c 68 31 3e 74 68 75 6e 64 65 72 63 68 65 7a  .<h1>thunderchez
0070: 3c 2f 68 31 3e 0d 0a 4c 69 62 72 61 72 69 65 73  </h1>..Libraries
0080: 20 66 6f 72 20 5b 68 74 74 70 73 3a 2f 2f 67 69   for [https://gi
0090: 74 68 75 62 2e 63 6f 6d 2f 63 69 73 63 6f 2f 43  thub.com/cisco/C
00a0: 68 65 7a 53 63 68 65 6d 65 7c 43 68 65 7a 20 53  hezScheme|Chez S
00b0: 63 68 65 6d 65 5d 20 70 72 6f 64 75 63 74 69 76  cheme] productiv
00c0: 69 74 79 0d 0a 0d 0a 42 65 20 73 75 72 65 20 74  ity....Be sure t
00d0: 6f 20 70 75 74 20 74 68 75 6e 64 65 72 63 68 65  o put thunderche
00e0: 7a 20 70 61 74 68 20 6f 6e 20 79 6f 75 72 20 6c  z path on your l
00f0: 69 62 72 61 72 79 20 70 61 74 68 2c 0d 0a 0d 0a  ibrary path,....
0100: 42 79 20 65 78 61 6d 70 6c 65 3a 0d 0a 0d 0a 3c  By example:....<
0110: 76 65 72 62 61 74 69 6d 3e 0d 0a 28 6c 69 62 72  verbatim>..(libr
0120: 61 72 79 2d 64 69 72 65 63 74 6f 72 69 65 73 20  ary-directories 
0130: 22 2f 70 61 74 68 2f 74 6f 2f 74 68 75 6e 64 65  "/path/to/thunde
0140: 72 63 68 65 7a 22 29 0d 0a 3c 2f 76 65 72 62 61  rchez")..</verba
0150: 74 69 6d 3e 0d 0a 0d 0a 6f 72 20 73 65 74 20 74  tim>....or set t
0160: 68 65 20 60 43 48 45 5a 53 43 48 45 4d 45 4c 49  he `CHEZSCHEMELI
0170: 42 44 49 52 53 60 20 65 6e 76 69 72 6f 6e 6d 65  BDIRS` environme
0180: 6e 74 20 76 61 72 69 61 62 6c 65 3a 0d 0a 0d 0a  nt variable:....
0190: 3c 76 65 72 62 61 74 69 6d 3e 0d 0a 20 20 20 20  <verbatim>..    
01a0: 43 48 45 5a 53 43 48 45 4d 45 4c 49 42 44 49 52  CHEZSCHEMELIBDIR
01b0: 53 3d 2f 70 61 74 68 2f 74 6f 2f 74 68 75 6e 64  S=/path/to/thund
01c0: 65 72 63 68 65 7a 0d 0a 3c 2f 76 65 72 62 61 74  erchez..</verbat
01d0: 69 6d 3e 0d 0a 0d 0a 43 68 65 63 6b 6f 75 74 3a  im>....Checkout:
01e0: 20 59 6f 75 27 6c 6c 20 6e 65 65 64 20 5b 68 74   You'll need [ht
01f0: 74 70 73 3a 2f 2f 77 77 77 2e 66 6f 73 73 69 6c  tps://www.fossil
0200: 2d 73 63 6d 2e 6f 72 67 7c 66 6f 73 73 69 6c 5d  -scm.org|fossil]
0210: 0d 0a 0d 0a 3c 76 65 72 62 61 74 69 6d 3e 0d 0a  ....<verbatim>..
0220: 66 6f 73 73 69 6c 20 63 6c 6f 6e 65 20 68 74 74  fossil clone htt
0230: 70 73 3a 2f 2f 70 69 7a 7a 61 68 61 63 6b 2e 65  ps://pizzahack.e
0240: 75 2f 66 6f 73 73 69 6c 2f 74 68 75 6e 64 65 72  u/fossil/thunder
0250: 63 68 65 7a 20 74 68 75 6e 64 65 72 63 68 65 7a  chez thunderchez
0260: 2e 66 6f 73 73 69 6c 0d 0a 6d 6b 64 69 72 20 74  .fossil..mkdir t
0270: 68 75 6e 64 65 72 63 68 65 7a 20 26 26 20 63 64  hunderchez && cd
0280: 20 74 68 75 6e 64 65 72 63 68 65 7a 20 26 26 20   thunderchez && 
0290: 66 6f 73 73 69 6c 20 6f 70 65 6e 20 2e 2e 2f 74  fossil open ../t
02a0: 68 75 6e 64 65 72 63 68 65 7a 2e 66 6f 73 73 69  hunderchez.fossi
02b0: 6c 0d 0a 3c 2f 76 65 72 62 61 74 69 6d 3e 0d 0a  l..</verbatim>..
02c0: 0d 0a 0d 0a 0d 0a 59 6f 75 20 63 61 6e 20 61 6c  ......You can al
02d0: 73 6f 20 64 6f 77 6e 6c 6f 61 64 20 74 68 65 20  so download the 
02e0: 6c 61 74 65 73 74 20 63 6f 64 65 20 61 73 20 61  latest code as a
02f0: 20 74 61 72 62 61 6c 6c 3a 20 5b 68 74 74 70 73   tarball: [https
0300: 3a 2f 2f 70 69 7a 7a 61 68 61 63 6b 2e 65 75 2f  ://pizzahack.eu/
0310: 66 6f 73 73 69 6c 2f 6d 69 6f 67 75 69 2f 74 61  fossil/miogui/ta
0320: 72 62 61 6c 6c 2f 74 68 75 6e 64 65 72 63 68 65  rball/thunderche
0330: 7a 2d 6c 61 74 65 73 74 2e 74 61 72 2e 67 7a 7c  z-latest.tar.gz|
0340: 74 68 75 6e 64 65 72 63 68 65 7a 2d 6c 61 74 65  thunderchez-late
0350: 73 74 2e 74 61 72 2e 67 7a 5d 0d 0a 0d 0a 54 6f  st.tar.gz]....To
0360: 20 66 6f 6c 6c 6f 77 20 6e 65 77 73 20 73 75 62   follow news sub
0370: 73 63 72 69 62 65 20 74 6f 20 5b 68 74 74 70 73  scribe to [https
0380: 3a 2f 2f 70 69 7a 7a 61 68 61 63 6b 2e 65 75 2f  ://pizzahack.eu/
0390: 66 6f 73 73 69 6c 2f 74 68 75 6e 64 65 72 63 68  fossil/thunderch
03a0: 65 7a 2f 74 69 6d 65 6c 69 6e 65 2e 72 73 73 7c  ez/timeline.rss|
03b0: 52 53 53 20 66 65 65 64 5d 0d 0a 0d 0a 0d 0a 3c  RSS feed]......<
03c0: 68 32 3e 53 52 46 49 3c 2f 68 32 3e 0d 0a 0d 0a  h2>SRFI</h2>....
03d0: 5b 68 74 74 70 73 3a 2f 2f 67 69 74 68 75 62 2e  [https://github.
03e0: 63 6f 6d 2f 64 68 61 72 6d 61 74 65 63 68 2f 73  com/dharmatech/s
03f0: 75 72 66 61 67 65 2f 7c 42 61 73 65 64 20 6f 6e  urfage/|Based on
0400: 20 73 75 72 66 61 67 65 5d 20 77 69 74 68 20 6d   surfage] with m
0410: 69 6e 6f 72 20 63 68 61 6e 67 65 73 0d 0a 3c 76  inor changes..<v
0420: 65 72 62 61 74 69 6d 3e 0d 0a 20 20 20 20 28 69  erbatim>..    (i
0430: 6d 70 6f 72 74 20 28 73 72 66 69 20 73 31 20 6c  mport (srfi s1 l
0440: 69 73 74 73 29 29 0d 0a 20 20 20 20 28 69 6d 70  ists))..    (imp
0450: 6f 72 74 20 28 73 72 66 69 20 73 31 33 20 73 74  ort (srfi s13 st
0460: 72 69 6e 67 73 29 29 0d 0a 20 20 20 20 28 69 6d  rings))..    (im
0470: 70 6f 72 74 20 28 73 72 66 69 20 73 31 34 20 63  port (srfi s14 c
0480: 68 61 72 2d 73 65 74 73 29 29 0d 0a 20 20 20 20  har-sets))..    
0490: 65 74 63 2e 2e 2e 0d 0a 3c 2f 76 65 72 62 61 74  etc.....</verbat
04a0: 69 6d 3e 0d 0a 0d 0a 3c 68 32 3e 46 6d 74 3c 2f  im>....<h2>Fmt</
04b0: 68 32 3e 0d 0a 4f 72 69 67 69 6e 61 6c 20 73 69  h2>..Original si
04c0: 74 65 28 68 74 74 70 3a 2f 2f 73 79 6e 74 68 63  te(http://synthc
04d0: 6f 64 65 2e 63 6f 6d 2f 73 63 68 65 6d 65 2f 66  ode.com/scheme/f
04e0: 6d 74 2f 29 0d 0a 3c 76 65 72 62 61 74 69 6d 3e  mt/)..<verbatim>
04f0: 0d 0a 20 20 20 20 28 69 6d 70 6f 72 74 20 28 66  ..    (import (f
0500: 6d 74 20 66 6d 74 29 29 20 0d 0a 20 20 20 20 28  mt fmt)) ..    (
0510: 69 6d 70 6f 72 74 20 28 66 6d 74 20 66 6d 74 2d  import (fmt fmt-
0520: 63 29 29 20 0d 0a 20 20 20 20 28 69 6d 70 6f 72  c)) ..    (impor
0530: 74 20 28 66 6d 74 20 66 6d 74 2d 6a 73 29 29 20  t (fmt fmt-js)) 
0540: 0d 0a 3c 2f 76 65 72 62 61 74 69 6d 3e 0d 0a 0d  ..</verbatim>...
0550: 0a 3c 68 32 3e 4d 61 74 63 68 61 62 6c 65 3c 2f  .<h2>Matchable</
0560: 68 32 3e 0d 0a 42 61 73 65 64 20 6f 6e 20 5b 68  h2>..Based on [h
0570: 74 74 70 3a 2f 2f 77 69 6b 69 2e 63 61 6c 6c 2d  ttp://wiki.call-
0580: 63 63 2e 6f 72 67 2f 65 67 67 72 65 66 2f 34 2f  cc.org/eggref/4/
0590: 6d 61 74 63 68 61 62 6c 65 7c 6d 61 74 63 68 61  matchable|matcha
05a0: 62 6c 65 20 65 67 67 5d 0d 0a 3c 76 65 72 62 61  ble egg]..<verba
05b0: 74 69 6d 3e 0d 0a 20 20 20 20 28 69 6d 70 6f 72  tim>..    (impor
05c0: 74 20 28 6d 61 74 63 68 61 62 6c 65 29 29 0d 0a  t (matchable))..
05d0: 3c 2f 76 65 72 62 61 74 69 6d 3e 0d 0a 0d 0a 3c  </verbatim>....<
05e0: 68 32 3e 53 71 6c 69 74 65 33 3c 2f 68 32 3e 0d  h2>Sqlite3</h2>.
05f0: 0a 42 61 73 65 64 20 70 61 72 74 69 61 6c 6c 79  .Based partially
0600: 20 6f 6e 20 63 68 69 63 6b 65 6e 20 5b 68 74 74   on chicken [htt
0610: 70 3a 2f 2f 77 69 6b 69 2e 63 61 6c 6c 2d 63 63  p://wiki.call-cc
0620: 2e 6f 72 67 2f 65 67 67 72 65 66 2f 34 2f 73 71  .org/eggref/4/sq
0630: 6c 69 74 65 33 7c 73 71 6c 69 74 65 33 20 65 67  lite3|sqlite3 eg
0640: 67 5d 20 62 75 74 20 73 6c 69 67 68 74 6c 79 20  g] but slightly 
0650: 64 69 66 66 65 72 65 6e 74 2e 20 4e 65 65 64 73  different. Needs
0660: 20 73 6f 6d 65 20 74 65 73 74 69 6e 67 2e 0d 0a   some testing...
0670: 3c 76 65 72 62 61 74 69 6d 3e 0d 0a 20 20 20 20  <verbatim>..    
0680: 28 69 6d 70 6f 72 74 20 28 73 71 6c 69 74 65 33  (import (sqlite3
0690: 29 29 0d 0a 3c 2f 76 65 72 62 61 74 69 6d 3e 0d  ))..</verbatim>.
06a0: 0a 0d 0a 3c 68 32 3e 55 53 42 3c 2f 68 32 3e 0d  ...<h2>USB</h2>.
06b0: 0a 5b 68 74 74 70 3a 2f 2f 6c 69 62 75 73 62 2e  .[http://libusb.
06c0: 69 6e 66 6f 7c 4c 69 62 72 61 72 79 20 77 65 62  info|Library web
06d0: 73 69 74 65 5d 0d 0a 3c 76 65 72 62 61 74 69 6d  site]..<verbatim
06e0: 3e 0d 0a 20 20 20 20 28 69 6d 70 6f 72 74 20 28  >..    (import (
06f0: 75 73 62 29 29 0d 0a 3c 2f 76 65 72 62 61 74 69  usb))..</verbati
0700: 6d 3e 0d 0a 0d 0a 0d 0a 3c 68 32 3e 53 44 4c 32  m>......<h2>SDL2
0710: 3c 2f 68 32 3e 0d 0a 0d 0a 5b 68 74 74 70 3a 2f  </h2>....[http:/
0720: 2f 77 77 77 2e 6c 69 62 73 64 6c 2e 6f 72 67 7c  /www.libsdl.org|
0730: 4c 69 62 72 61 72 79 20 77 65 62 73 69 74 65 5d  Library website]
0740: 0d 0a 3c 76 65 72 62 61 74 69 6d 3e 0d 0a 20 20  ..<verbatim>..  
0750: 20 20 28 69 6d 70 6f 72 74 20 28 73 64 6c 32 29    (import (sdl2)
0760: 29 09 0d 0a 3c 2f 76 65 72 62 61 74 69 6d 3e 0d  )...</verbatim>.
0770: 0a 0d 0a 3c 68 32 3e 43 61 69 72 6f 3c 2f 68 32  ...<h2>Cairo</h2
0780: 3e 0d 0a 5b 68 74 74 70 3a 2f 2f 77 77 77 2e 63  >..[http://www.c
0790: 61 69 72 6f 67 72 61 70 68 69 63 73 2e 6f 72 67  airographics.org
07a0: 7c 4c 69 62 72 61 72 79 20 77 65 62 73 69 74 65  |Library website
07b0: 5d 0d 0a 3c 76 65 72 62 61 74 69 6d 3e 0d 0a 20  ]..<verbatim>.. 
07c0: 20 20 20 28 69 6d 70 6f 72 74 20 28 63 61 69 72     (import (cair
07d0: 6f 29 29 0d 0a 3c 2f 76 65 72 62 61 74 69 6d 3e  o))..</verbatim>
07e0: 0d 0a 0d 0a 53 65 65 20 5b 2f 64 6f 63 2f 74 69  ....See [/doc/ti
07f0: 70 2f 63 61 69 72 6f 2f 74 65 73 74 2e 73 73 7c  p/cairo/test.ss|
0800: 74 65 73 74 2e 73 73 5d 20 66 6f 72 20 65 78 61  test.ss] for exa
0810: 6d 70 6c 65 73 0d 0a 0d 0a 3c 68 32 3e 4a 73 6f  mples....<h2>Jso
0820: 6e 20 70 61 72 73 65 72 3c 2f 68 32 3e 0d 0a 55  n parser</h2>..U
0830: 73 65 73 20 5b 2f 64 6f 63 2f 74 69 70 2f 6c 61  ses [/doc/tip/la
0840: 6c 72 2f 6c 61 6c 72 2e 73 73 7c 6c 61 6c 72 2e  lr/lalr.ss|lalr.
0850: 73 73 5d 0d 0a 3c 76 65 72 62 61 74 69 6d 3e 0d  ss]..<verbatim>.
0860: 0a 20 20 20 20 28 69 6d 70 6f 72 74 20 28 6a 73  .    (import (js
0870: 6f 6e 29 29 0d 0a 0d 0a 0d 0a 20 20 20 20 28 73  on))......    (s
0880: 74 72 69 6e 67 2d 3e 6a 73 6f 6e 20 22 5b 7b 20  tring->json "[{ 
0890: 5c 22 6e 61 6d 65 5c 22 20 3a 20 5c 22 6d 79 2d  \"name\" : \"my-
08a0: 6e 61 6d 65 5c 22 20 2c 20 5c 22 61 67 65 5c 22  name\" , \"age\"
08b0: 20 3a 20 31 32 30 20 2c 20 5c 22 63 68 69 6c 64   : 120 , \"child
08c0: 72 65 6e 5c 22 20 3a 20 5b 7b 20 5c 22 6e 61 6d  ren\" : [{ \"nam
08d0: 65 5c 22 20 3a 20 5c 22 6d 79 2d 73 6f 6e 5c 22  e\" : \"my-son\"
08e0: 2c 20 5c 22 61 67 65 5c 22 20 3a 20 31 20 7d 2c  , \"age\" : 1 },
08f0: 20 7b 20 5c 22 6e 61 6d 65 5c 22 20 3a 20 5c 22   { \"name\" : \"
0900: 6d 79 2d 73 6f 6e 32 5c 22 2c 20 5c 22 61 67 65  my-son2\", \"age
0910: 5c 22 20 3a 20 32 20 7d 5d 20 7d 5d 22 20 29 0d  \" : 2 }] }]" ).
0920: 0a 20 20 20 20 09 3d 3e 20 23 28 28 6e 61 6d 65  .    .=> #((name
0930: 20 2e 20 22 6d 79 2d 6e 61 6d 65 22 29 0d 0a 20   . "my-name").. 
0940: 20 20 20 09 20 20 20 20 28 61 67 65 20 2e 20 31     .    (age . 1
0950: 32 30 29 0d 0a 20 20 20 20 09 20 20 20 20 28 63  20)..    .    (c
0960: 68 69 6c 64 72 65 6e 20 2e 0d 0a 20 20 20 20 20  hildren ...     
0970: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0980: 20 20 20 23 28 28 28 6e 61 6d 65 20 2e 20 22 6d     #(((name . "m
0990: 79 2d 73 6f 6e 22 29 20 28 61 67 65 20 2e 20 31  y-son") (age . 1
09a0: 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20  ))..            
09b0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 28 28                ((
09c0: 6e 61 6d 65 20 2e 20 22 6d 79 2d 73 6f 6e 32 22  name . "my-son2"
09d0: 29 20 28 61 67 65 20 2e 20 32 29 29 29 29 29 0d  ) (age . 2))))).
09e0: 0a 0d 0a 3c 2f 76 65 72 62 61 74 69 6d 3e 0d 0a  ...</verbatim>..
09f0: 3c 68 32 3e 4e 61 6e 6f 4d 73 67 3c 2f 68 32 3e  <h2>NanoMsg</h2>
0a00: 0d 0a 5b 68 74 74 70 3a 2f 2f 77 77 77 2e 6e 61  ..[http://www.na
0a10: 6e 6f 6d 73 67 2e 6f 72 67 7c 4c 69 62 72 61 72  nomsg.org|Librar
0a20: 79 20 77 65 62 73 69 74 65 5d 0d 0a 3c 76 65 72  y website]..<ver
0a30: 62 61 74 69 6d 3e 0d 0a 20 28 69 6d 70 6f 72 74  batim>.. (import
0a40: 20 28 6e 61 6e 6f 6d 73 67 29 29 0d 0a 3c 2f 76   (nanomsg))..</v
0a50: 65 72 62 61 74 69 6d 3e 0d 0a 0d 0a 3c 68 33 3e  erbatim>....<h3>
0a60: 53 6f 6d 65 20 74 65 73 74 73 20 66 72 6f 6d 20  Some tests from 
0a70: 5b 68 74 74 70 73 3a 2f 2f 67 69 74 68 75 62 2e  [https://github.
0a80: 63 6f 6d 2f 64 79 73 69 6e 67 65 72 2f 6e 61 6e  com/dysinger/nan
0a90: 6f 6d 73 67 2d 65 78 61 6d 70 6c 65 73 5d 3c 2f  omsg-examples]</
0aa0: 68 33 3e 0d 0a 20 20 2a 20 20 5b 2f 64 6f 63 2f  h3>..  *  [/doc/
0ab0: 74 69 70 2f 6e 61 6e 6f 6d 73 67 2f 62 75 73 7c  tip/nanomsg/bus|
0ac0: 62 75 73 5d 0d 0a 20 20 2a 20 20 5b 2f 64 6f 63  bus]..  *  [/doc
0ad0: 2f 74 69 70 2f 6e 61 6e 6f 6d 73 67 2f 70 61 69  /tip/nanomsg/pai
0ae0: 72 7c 70 61 69 72 5d 0d 0a 20 20 2a 20 20 5b 2f  r|pair]..  *  [/
0af0: 64 6f 63 2f 74 69 70 2f 6e 61 6e 6f 6d 73 67 2f  doc/tip/nanomsg/
0b00: 70 69 70 65 6c 69 6e 65 7c 70 69 70 65 6c 69 6e  pipeline|pipelin
0b10: 65 5d 0d 0a 20 20 2a 20 20 5b 2f 64 6f 63 2f 74  e]..  *  [/doc/t
0b20: 69 70 2f 6e 61 6e 6f 6d 73 67 2f 70 75 62 73 75  ip/nanomsg/pubsu
0b30: 62 7c 70 75 62 73 75 62 5d 0d 0a 20 20 2a 20 20  b|pubsub]..  *  
0b40: 5b 2f 64 6f 63 2f 74 69 70 2f 6e 61 6e 6f 6d 73  [/doc/tip/nanoms
0b50: 67 2f 72 65 71 72 65 70 7c 72 65 71 72 65 70 5d  g/reqrep|reqrep]
0b60: 0d 0a 20 20 2a 20 20 5b 2f 64 6f 63 2f 74 69 70  ..  *  [/doc/tip
0b70: 2f 6e 61 6e 6f 6d 73 67 2f 73 75 72 76 65 79 7c  /nanomsg/survey|
0b80: 73 75 72 76 65 79 5d 20 0d 0a 0d 0a 20 20 2a 20  survey] ....  * 
0b90: 20 5b 2f 64 6f 63 2f 74 69 70 2f 6e 61 6e 6f 6d   [/doc/tip/nanom
0ba0: 73 67 2f 72 65 6d 6f 74 65 2d 72 65 70 6c 7c 72  sg/remote-repl|r
0bb0: 65 6d 6f 74 65 2d 72 65 70 6c 5d 0d 0a 20 20 2a  emote-repl]..  *
0bc0: 20 20 5b 2f 64 6f 63 2f 74 69 70 2f 6e 61 6e 6f    [/doc/tip/nano
0bd0: 6d 73 67 2f 6c 6f 63 61 6c 2d 72 65 70 6c 7c 6c  msg/local-repl|l
0be0: 6f 63 61 6c 2d 72 65 70 6c 5d 0d 0a 0d 0a 0d 0a  ocal-repl]......
0bf0: 0a 5a 20 33 37 34 39 62 35 63 61 33 32 32 32 61  .Z 3749b5ca3222a
0c00: 30 64 66 30 34 39 65 31 65 37 36 32 31 32 38 66  0df049e1e762128f
0c10: 35 35 64 0a                                      55d.