commit: ffcc1b4636c13a05a915ffc6ee3dfe7d3d9d9e78
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 2 15:31:51 2022 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sat Apr 2 15:31:51 2022 +0000
URL: https://gitweb.gentoo.org/proj/lisp.git/commit/?id=ffcc1b46
misc: Remove unused directory
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
misc/interpret | 122 ----------------------------------------------------
misc/interpret-slib | 1 -
misc/scheme.scm | 50 ---------------------
3 files changed, 173 deletions(-)
diff --git a/misc/interpret b/misc/interpret
deleted file mode 100755
index 30cfea8a..00000000
--- a/misc/interpret
+++ /dev/null
@@ -1,122 +0,0 @@
-#!/bin/bash
-#set -x
-# Usage:
-# interpret a file: ./interpret mzscheme < scheme.scm
-# interpret code: ./interpret <<< "(display \"hello\nworld\")(newline)"
-# use SLIB: ./interpret-slib <<< "(slib:report)"
-
-# tricky examples:
-# ./interpret bigloo <<< "(display (eq? (string->symbol \"\`\")
'|\`|)))(newline)"
-# ./interpret bigloo <<< '(display (eq? (string->symbol "`")
'\''|`|)))(newline)'
-
-# LOAD_SLIB=$(if [[ $0 == *slib* ]]; then echo "slib"; else echo ""; fi)
-if [[ $0 = *slib* ]]; then LOAD_SLIB="slib"; fi
-
-#echo "${LOAD_SLIB}"
-
-read -r -d "" PROGRAM
-echo "PROGRAM = ${PROGRAM}"
-PROGRAM="(begin ${PROGRAM} (newline))"
-
-IMPLEMENTATION="${1:-all}"
-
-make_load_expression() {
- echo "(load \"/usr/share/slib/$1.init\")"
-}
-
-run_bigloo() {
- SLIB_INIT="bigloo"
- echo "bigloo:"
-# bigloo -s -eval "$([[ -z ${LOAD_SLIB} ]] && echo "${PROGRAM}" || echo
"$(make_load_expression ${SLIB_INIT}) ${PROGRAM}") (exit)"
- if [[ $LOAD_SLIB ]]; then bigloo -s -eval "$(make_load_expression
$SLIB_INIT) $PROGRAM (exit)"; else bigloo -s -eval "$PROGRAM (exit)"; fi
-}
-
-run_chicken() {
- SLIB_INIT="chicken"
- echo "chicken:"
-# csi -require-extension syntax-case -eval \
- csi -eval "$([[ -z ${LOAD_SLIB} ]] && echo "${PROGRAM}" || echo
"$(make_load_expression ${SLIB_INIT}) ${PROGRAM}")"
-}
-
-run_gambit() {
- SLIB_INIT="gambit"
- echo "gambit:"
- gambit-interpreter -e "(load \"~~/lib/syntax-case\") $([[ -z ${LOAD_SLIB}
]] && echo "${PROGRAM}" || echo "$(make_load_expression ${SLIB_INIT})
${PROGRAM}")"
-}
-
-run_gauche() {
- SLIB_INIT="gauche"
- echo "gauche:"
- gosh -e "$([[ -z ${LOAD_SLIB} ]] && echo "${PROGRAM}" || echo
"$(make_load_expression ${SLIB_INIT}) ${PROGRAM}")"
-}
-
-run_guile() {
- SLIB_INIT="guile"
- echo "guile:"
- guile -c "(use-modules (ice-9 syncase)) $([[ -z ${LOAD_SLIB} ]] && echo
"${PROGRAM}" || echo "$(make_load_expression ${SLIB_INIT}) ${PROGRAM}")"
-}
-
-run_mit-scheme() {
- SLIB_INIT="mitscheme"
- echo "mit-scheme:"
-#mit-scheme --batch-mode --eval "(set! load-noisily? #t) (load \"$1\")"
-#echo "(set! load-noisily? #t) (load \"$1\")" | mit-scheme --batch-mode
-#mit-scheme --batch-mode --eval "(set! load/suppress-loading-message? #t)" #
(load \"$1\")"
- echo "(set! load/suppress-loading-message? #t) $([[ -z ${LOAD_SLIB} ]] &&
echo "${PROGRAM}" || echo "$(make_load_expression ${SLIB_INIT}) ${PROGRAM}")" |
mit-scheme --batch-mode
-#echo "(load \"$1\")" | mit-scheme --batch-mode
-}
-
-run_mzscheme() {
- SLIB_INIT="DrScheme"
- echo "mzscheme:"
- mzscheme -vme "$([[ -z ${LOAD_SLIB} ]] && echo "${PROGRAM}" || echo
"(begin $(make_load_expression ${SLIB_INIT}) ${PROGRAM})")"
-}
-
-run_scm() {
- SLIB_INIT="scm"
- echo "scm:"
- scm -e "$([[ -z ${LOAD_SLIB} ]] && echo "${PROGRAM}" || echo
"$(make_load_expression ${SLIB_INIT}) ${PROGRAM}")"
-}
-
-run_stklos() {
- SLIB_INIT="STk"
- [[ -z ${LOAD_SLIB} ]] || PROGRAM="$(make_load_expression STk) ${PROGRAM}"
- echo "stklos with full-syntax:"
- stklos -e "(begin (require \"full-syntax\") $([[ -z ${LOAD_SLIB} ]] &&
echo "${PROGRAM}" || echo "$(make_load_expression ${SLIB_INIT}) ${PROGRAM}"))"
- echo "stklos:"
- stklos -e "$([[ -z ${LOAD_SLIB} ]] && echo "${PROGRAM}" || echo
"$(make_load_expression ${SLIB_INIT}) ${PROGRAM}")"
-}
-
-run_elk() {
- SLIB_INIT="elk"
- echo "elk:"
-# echo "$([[ -z ${LOAD_SLIB} ]] && echo "${PROGRAM}" || echo
"$(make_load_expression ${SLIB_INIT}) ${PROGRAM}")" | elk -l -
- { [[ -z $LOAD_SLIB ]] && echo "$PROGRAM" || echo "$(make_load_expression
"$SLIB_INIT" "$PROGRAM")"; } | elk -l -
-}
-
-run_all() {
- run_bigloo
- [[ -z ${LOAD_SLIB} ]] && run_chicken
- [[ -z ${LOAD_SLIB} ]] && run_elk
- run_gambit
- [[ -z ${LOAD_SLIB} ]] && run_gauche
- run_guile
- [[ -z ${LOAD_SLIB} ]] && run_mit-scheme
- run_mzscheme
- run_scm
- [[ -z ${LOAD_SLIB} ]] && run_stklos
-}
-
-case ${IMPLEMENTATION} in
- bigloo) run_bigloo;;
- chicken) run_chicken;;
- elk) run_elk;;
- gambit) run_gambit;;
- gauche) run_gauche;;
- guile) run_guile;;
- mit-scheme) run_mit-scheme;;
- mzscheme) run_mzscheme;;
- scm) run_scm;;
- stklos) run_stklos;;
- all) run_all;;
-esac
diff --git a/misc/interpret-slib b/misc/interpret-slib
deleted file mode 120000
index f483b4f0..00000000
--- a/misc/interpret-slib
+++ /dev/null
@@ -1 +0,0 @@
-interpret
\ No newline at end of file
diff --git a/misc/scheme.scm b/misc/scheme.scm
deleted file mode 100644
index e219bd70..00000000
--- a/misc/scheme.scm
+++ /dev/null
@@ -1,50 +0,0 @@
-(require (lib "43.ss" "srfi"))(require (lib "69.ss" "srfi"))(require (lib
"process.ss"))
-;(require-extension srfi-43)
-
-;(use-modules (ice-9 srfi-43)(ice-9 syncase))
-
-(define database (make-hash-table))
-
-(define-syntax (define-implementation x)
- (syntax-case x ()
- ((_ implementation evaluate-command interpret-command compile-command
run-compiled-command)
- (syntax (hash-table-set! database 'implementation
- (vector evaluate-command interpret-command
compile-command run-compiled-command))))))
-
-(define-syntax (define-accessor x)
- (syntax-case x ()
- ((_ name position)
- (syntax (define (name implementation)
- (let ((entry (hash-table-ref/default database implementation
#f)))
- (if entry (vector-ref entry position) (error "no such
implementation known!"))))))))
-
-(define-accessor implementation->evaluate-command 0)
-(define-accessor implementation->interpret-command 1)
-(define-accessor implementation->compile-command 2)
-(define-accessor implementation->run-compiled-command 3)
-
-(define-implementation bigloo
- (lambda (x) (string-append "echo '" x "' | bigloo -s"))
- (lambda (x) (string-append "bigloo -i" x))
- (lambda (x) (string-append "bigloo -native" x " -o ." x "_bigloo"))
- (lambda (x) (string-append "./." x "_bigloo")))
-
-(define-implementation mzscheme
- (lambda (x) (string-append "echo '" x "' | mzscheme --mute-banner"))
- (lambda (x) (string-append "mzscheme --script" x))
- (lambda (x) (string-append "mzc --extension --autodir" x))
- (lambda (x) (implementation->evaluate-command mzscheme (append-string
"(load/use-compiled \"" x "\")"))))
-
-(define-syntax (define-command x)
- (syntax-case x ()
- ((_ name implementation->command)
- (syntax (define (name implementation program)
- (system ((implementation->command implementation) program)))))))
-
-(define-command evaluate implementation->evaluate-command)
-(define-command interpret implementation->interpret-command)
-(define-command compile implementation->compile-command)
-(define-command run-compiled implementation->run-compiled-command)
-
-(evaluate 'mzscheme "(+ 1 2)")
-(evaluate 'bigloo '"(+ 5 2)")