From my recent postings in other newsgroups: A generator for
a Mandelbrot set image written in a LISP similar to the HG LISP I used
in 1981 on my Pet 2001 as I remember it.
[extract kept as example, rest snipped]
(SETQ MANDELBROT
(LAMBDA (X Y)
(PROGN
(SETQ C 126)
(SETQ Z (LIST X Y))
(SETQ A Z)
(SETQ ITERATE
(LAMBDA ()
(COND ((OR (< C 32) (> (CABS Z) 2))
(- 126 C))
(T
(PROGN
(SETQ TEMP-CMUL (CMUL Z Z))
(SETQ TEMP-CADD (CADD A TEMP-CMUL))
(SETQ Z TEMP-CADD)
(SETQ C (- C 1))
(ITERATE))))))
(ITERATE))))
I was never a fan of rCLparenthesis pileuprCY layout. Try this for comparison:
(SETQ MANDELBROT
(LAMBDA (X Y)
(PROGN
(SETQ C 126)
(SETQ Z (LIST X Y))
(SETQ A Z)
(SETQ ITERATE
(LAMBDA ()
(COND
((OR (< C 32) (> (CABS Z) 2))
(- 126 C)
)
(T
(PROGN
(SETQ TEMP-CMUL (CMUL Z Z))
(SETQ TEMP-CADD (CADD A TEMP-CMUL))
(SETQ Z TEMP-CADD)
(SETQ C (- C 1))
(ITERATE)
) ; PROGN
)
) ; COND
) ; LAMBDA
) ; ITERATE
(ITERATE)
) ; PROGN
) ; LAMBDA
) ; MANDELBROT
Eww!
Turns out itrCOs a bit strange: you have to position the cursor *on* an opening parenthesis in order for it to highlight the corresponding closer, but *after* the closing parenthesis for it to highlight the corresponding opener.
Turns out itrCOs a bit strange: you have to position the cursor *on* an
opening parenthesis in order for it to highlight the corresponding closer, >> but *after* the closing parenthesis for it to highlight the corresponding
opener.
Actually, "point" is never "on" a character, it's always between characters. So in both cases "point" needs to be outside of the parenthesis.
It's perfectly symmetrical.
It's just that the cursor by default is a block drawn on the character
that follows the actual placement of "point". Try to switch to a bar
cursor and that should be more clear.
Turns out itrCOs a bit strange: you have to position the cursor *on* an
opening parenthesis in order for it to highlight the corresponding
closer, but *after* the closing parenthesis for it to highlight the
corresponding opener.
Actually, "point" is never "on" a character, it's always between
characters. So in both cases "point" needs to be outside of the
parenthesis.
It's just that the cursor by default is a block drawn on the character
that follows the actual placement of "point". Try to switch to a bar
cursor and that should be more clear.
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 65 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 04:13:14 |
| Calls: | 862 |
| Files: | 1,311 |
| D/L today: |
921 files (14,318M bytes) |
| Messages: | 264,528 |