-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathTHOUGHTS
executable file
·141 lines (112 loc) · 2.82 KB
/
THOUGHTS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
* This is actually the first time I realised how a mixin might be what I need:
You have an interactive, console-like buffer, and multiple source
buffers in which to edit text. There is a plethora of commands,
functions and variables that you'd like to make available in both
modes. Say we want some keys to perform certain actions in both
modes, but the console mode is derived from - say - comint-mode and
the text buffer mode is derived from lisp-mode.
; (modify-coding-system-alist 'process "ypsilon" '(utf-8 . utf-8))
the text buffer mode is derived from lisp-mode.
add constants to font-locking
step inside for breakpoints ...
need pattern matching I guess...
lambda
define
let
let*
letrec
letrec*
define-macro
do
dolist
(lambda ()
.....)
==>
(db
(lambda ()
(db-recurse ....)))
(define (fun args*)
body*)
==>
(db (define (fun args*)
(db-recurse body*)))
(let loop? (())
...)
==>
(db (let loop (())
(db-recurse body*)))
(letrec (())
body*)
==>
(db (letrec (())
(db-recurse body*)))
(do ((var init step)*)
(test)
(body))
==>
(db (do ((var (db-recurse init) (db-recurse step)) *)
((db-recurse test) (db result))
(db-recurse body*)))
Actually, I do not think instructing beforehand is good, better do it
lazily: let fud-break give you the option to step inside, upon which
all immediate subforms that can handle it are instructed with a
fud-break spec.
So, on fud-break + step-inside:
(fud-break ""
(let ((behold 1))
1 (mapcar (lambda () ..) '(129 304)))) =>
(let ((behold (fud-break "" 1)))
(fud-break 1)
(fud-break (mapcar (lambda () ..) '(129 304)))) ;lazy
(define (fud-instruct sxp)
(mapcar
(lambda (sxp)
)))
thus:
(let ((in-let #f))
(mapcar (lambda (th)
(cond ((memq th '(let))
(begin
(set! in-let #t)
th))
(in-let
(if (symbol? th) th
(begin
(set! in-let #f)
(mapcar (lambda (th)
(list (car th)
(fud-breakify (cadr th)))) th))))
(else
(fud-breakify th))))
'(let loop ((behold 4))
1
(mapcar (lambda (b) (+ n 19)) '(129 304)))))
(define (fud-instruct-1 thunk)
(let ((in-let #f)
(in-lambda #f)
(num 0))
(mapcar (lambda (th)
(set! num (+ 1 num))
(cond ((and (= num 1)
(memq th '(let)))
(set! in-let #t)
th)
(in-let ;special let rule
(if (symbol? th) th
(begin
(set! in-let #f)
(mapcar (lambda (th)
(list (car th)
(fud-breakify (cadr th)))) th))))
((and (= num 1)
(memq th '(lambda)))
(set! in-lambda #t)
'lambda)
(in-lambda ;simple lambda rule
(set! in-lambda #f)
th)
(else
(fud-breakify th))))
thunk)))
ranking system for completions according to number of times chosen/being part of the
language.