Tue Nov 30, 2021 3:42 pm
*features*
C:\Program Files\GIMP 2\share\gimp\2.0\scripts\script-fu.init
Wed Dec 01, 2021 3:17 pm
Copy *.scm "C:\Users\YourUserName\AppData\Roaming\GIMP\2.10\scripts\"
*features*
(cond-expand
(srfi-38 (displayln "srfi-38 is supported!"))
(else (displayln "srfi-38 is not supported!"))
)
Thu Dec 02, 2021 3:10 pm
#| Return Gimp version
(gimp-version)
|#
#| SRFI-30 #| nested |# multi-line comment
(gimp-version)
|#
(closure? multiline-comment)
Fri Dec 03, 2021 5:27 pm
(gimp-procedural-db-query ".*" ".*deprecated.*" ".*deprecated.*" ".*" ".*" ".*" ".*")
(car (gimp-procedural-db-query ".*" ".*deprecated.*" ".*deprecated.*" ".*" ".*" ".*" ".*"))
(cadr (gimp-procedural-db-query ".*" ".*deprecated.*" ".*deprecated.*" ".*" ".*" ".*" ".*"))
(car (cdr '(first second third etc)))
Fri Dec 03, 2021 5:34 pm
(let* ( (lstDeprecFnc (cadr (gimp-procedural-db-query ".*" ".*deprecated.*" ".*deprecated.*" ".*" ".*" ".*" ".*"))))
(display "Number of deprecated functions: ") (displayln (length lstDeprecFnc))
)
(let* ( (lstDeprecFnc (cadr (gimp-procedural-db-query ".*" ".*deprecated.*" ".*deprecated.*" ".*" ".*" ".*" ".*"))))
(show "Number of deprecated functions: " (length lstDeprecFnc))
)
Fri Dec 03, 2021 5:44 pm
(let* ( (lstDeprecFnc (cadr (gimp-procedural-db-query ".*" ".*deprecated.*" ".*deprecated.*" ".*" ".*" ".*" ".*"))))
(let loop ( (lstWord lstDeprecFnc) (count 0))
(if (pair? lstWord)
(loop (cdr lstWord) (+ count 1))
(begin (display "Number of deprecated functions: ") (displayln count))
) ) )
(let* ( (lstDeprecFnc (cadr (gimp-procedural-db-query ".*" ".*deprecated.*" ".*deprecated.*" ".*" ".*" ".*" ".*"))))
(let loop ( (lstWord lstDeprecFnc) (count 0))
(if (not-pair? lstWord) (show "Number of deprecated functions: " count)
(loop (cdr lstWord) (+ count 1))
) ) )
(let loop ( (lstWord (cadr (gimp-procedural-db-query ".*" ".*deprecated.*" ".*deprecated.*" ".*" ".*" ".*" ".*"))) (count 0))
(if (not-pair? lstWord) (show "Number of deprecated functions: " count) (loop (cdr lstWord) (+ count 1)))
) ; test then part is the result else part
Fri Dec 03, 2021 6:23 pm
(proc->list script-fu-aqua-button2)
(define (deprecated-list fnc)
(let* ( (lstDeprecFnc (cadr (gimp-procedural-db-query ".*" ".*deprecated.*" ".*deprecated.*" ".*" ".*" ".*" ".*"))))
(let loop ((lstBody (proc->list fnc)) (lstDeprecUsed nil))
(if (not-pair? lstBody) lstDeprecUsed
(let* ((item (car lstBody)))
(if (symbol? item)
(let* ( (strItem (symbol->string item))
(len (string-length strItem))
)
(if (and (> len 5) (not (member strItem lstDeprecUsed)) (member strItem lstDeprecFnc))
(loop (cdr lstBody) (cons strItem lstDeprecUsed))
(loop (cdr lstBody) lstDeprecUsed)
) )
(if (list? item)
(loop (cdr lstBody) (loop item lstDeprecUsed))
(loop (cdr lstBody) lstDeprecUsed)
) ) ) ) ) ) )
(deprecated-list script-fu-aqua-button2)
(let* ( (timeStart (gettimeofday)))
(deprecated-list script-fu-aqua-button2)
(time-stat timeStart (gettimeofday) 1)
)
Fri Dec 03, 2021 6:35 pm
(define (deprecated-list fnc)
(let* ( (vPdb (list->vector (cadr (gimp-procedural-db-query ".*" ".*deprecated.*" ".*deprecated.*" ".*" ".*" ".*" ".*"))))
(lstFnc (and (heap-sort! vPdb string<?) ; ascending sort of vPdb for binary research
(let loop ((lstBody (proc->list fnc)) (lstDeprecUsed nil))
(if (not-pair? lstBody) lstDeprecUsed
(let* ((item (car lstBody)))
(if (symbol? item)
(let* ( (strItem (symbol->string item))
(len (string-length strItem))
)
(if (and (> len 5) (not (member strItem lstDeprecUsed))
(vector-binary-search vPdb string<? (lambda (str) str) strItem) #t
)
(loop (cdr lstBody) (cons strItem lstDeprecUsed))
(loop (cdr lstBody) lstDeprecUsed)
) )
(if (list? item)
(loop (cdr lstBody) (loop item lstDeprecUsed))
(loop (cdr lstBody) lstDeprecUsed)
) ) ) ) ) ) ) )
(list-sort lstFnc string<?)
) )
(deprecated-list script-fu-aqua-button2)
(let* ( (timeStart (gettimeofday)))
(deprecated-list script-fu-aqua-button2)
(time-stat timeStart (gettimeofday) 1)
)
Sat Dec 04, 2021 4:07 pm
(define indent-general 2) ; line 244 of pp.scm
Sat Dec 04, 2021 4:23 pm
(proc->list pp-call)
(pp pp-call)
(define (pp-call expr colFrom extra pp-item)
(let* ( (colAfter (wr (car expr) (pp-par-open colFrom)))
(colMargin (- colAfter (remainder colAfter 4)))
)
(and colFrom (pp-down (cdr expr) colMargin (+ colMargin 4) extra pp-item))
) )
Sat Dec 04, 2021 5:32 pm
Sat Dec 04, 2021 10:38 pm
Sun Dec 05, 2021 5:09 am