]> code.delx.au - gnu-emacs-elpa/blob - packages/gnugo/HACKING
Merge easy-kill as packages/easy-kill
[gnu-emacs-elpa] / packages / gnugo / HACKING
1 HACKING gnugo -*- org -*-
2
3 This file is both a guide for newcomers and a todo list for oldstayers.
4
5 * next
6 * fix bugs
7 *** {next,previous}-line weirdness in the presence of images
8 *** ‘-l FILENAME’ lossage
9 ***** silently clobbers other options (PEBKAC, strictly speaking)
10 ***** game tree incomplete (doing ‘C-x C-s’ immediately writes empty tree)
11 *** [[file:gnugo.el::defun.gnugo-toggle-dead-group][gnugo-toggle-dead-group]] only half-complete
12 *** no error-handling in SGF parsing
13 *** performance -- ‘compare-strings’ approach too clever/slow :-/
14 * debugging aids
15 *** swizzling branches for frolicking fun
16 (defun SWIZ (a b)
17 (let* ((tree (gnugo-get :sgf-gametree))
18 (monkey (gnugo-get :monkey))
19 (bidx (aref monkey 1)))
20 (rotatef (aref tree a)
21 (aref tree b))
22 (cond ((= a bidx) (aset monkey 1 b))
23 ((= b bidx) (aset monkey 1 a)))))
24
25 (defun SWIZ-RANDOM ()
26 (interactive)
27 (let* ((n (length (gnugo-get :sgf-gametree)))
28 (one (random n))
29 (two (if (= 1 n)
30 one
31 (loop with try
32 while (= one (setq try (random n)))
33 finally return try))))
34 (SWIZ one two)
35 (message "%d <-> %d" one two)))
36
37 (defun UNSWIZ ()
38 (interactive)
39 (let* ((monkey (gnugo-get :monkey))
40 (cur (aref monkey 1)))
41 (if (zerop cur)
42 (message "(nothing to do)")
43 (SWIZ 0 cur)
44 (message "0 <-> %d" cur))))
45 * ideas / wishlist
46 *** set ‘lexical-binding’ (if possible!)
47 Hmm, lots of symbol trickery going on; initial attempts FAIL.
48 *** add a few screenshots to package
49 *** revamp image support
50 *** talk GTP over the network
51 *** "assist minor mode" (see gnugo-extra.el for work in progress)
52 *** using assist minor mode, gnugo-v-gnugo (ibid)
53 *** make gnugo (the external program) support query (read-only) thread
54 *** extend GNUGO Board mode to manage another subprocess for analysis only
55 *** command ‘C’ to add a comment to the SGF tree
56 *** command ‘C-u =’ to label a position
57 *** SGF tree display, traversal (belongs in sgf.el)
58 *** review game history in another buffer
59 *** branch subgame tree at arbitrary point
60 *** subgame branch matriculation (maturity: child leaves the family)
61 *** dribble the SGF tree
62 *** "undo undo undoing"; integrate Emacs undo, GTP undo, subgame branching
63 *** make buffer name format configurable (but enforce uniqueness)
64 *** more tilde escapes for [[file:gnugo.el::defvar.gnugo-mode-line][gnugo-mode-line]]
65 *** make veneration configurable
66 *** make animation more configurable; lift same-color-stones-only
67 *** restriction; allow sequencing rather than lock-step; include sound
68 *** [your hacking ideas here!]
69 * tested with (newest first)
70 | Emacs | GNU Go |
71 |-----------+--------|
72 | 24.3.50.3 | 3.8 |
73 | ? | 3.6 |
74 | ? | 3.4 |
75 | ? | 3.3.15 |
76 | 22.0.50 | ? |
77 | 21.3 | ? |
78 |-----------+--------|
79 | <l> | <l> |
80 * ChangeLog discipline
81 *** based on [[info:standards#Change%20Logs][GNU Coding Standards]]
82 *** commit-message format
83 ***** basic: TITLE LF LF [DISCUSSION...] LF LF CLASSIC
84 ***** short: TITLE-FRAGMENT "; nfc." [LF LF DISCUSSION...]
85 *** don't bother w/ ChangeLog for "short" commit-message format
86 * other conventions: see [[file:.dir-locals.el][.dir-locals.el]]
87 * NEWS nostalgia
88 (with-current-buffer (find-file "NEWS")
89 (highlight-phrase "[0-9][.][0-9][.][0-9]+\\|[0-9]+[.][.][0-9]+"
90 'hi-red-b))
91 * etc
92 #+odd
93
94 \f
95 Copyright (C) 2014 Free Software Foundation, Inc.
96
97 Copying and distribution of this file, with or without modification,
98 are permitted provided the copyright notice and this notice are preserved.