Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!usc!snorkelwacker.mit.edu!bloom-beacon!dont-send-mail-to-path-lines From: gjc@mitech.COM Newsgroups: comp.lang.scheme Subject: (none) Message-ID: <9103051902.AA09664@schizo> Date: 5 Mar 91 19:02:56 GMT Sender: daemon@athena.mit.edu (Mr Background) Reply-To: gjc@mitech.com Organization: The Internet Lines: 38 >I plan to use Scheme as the embedded language in my application. >...something like the followings: Scheme = create_scheme_interpreter(); scheme_value = eval_scheme(Scheme, things_to_be_evaluated); print_scheme(Scheme, scheme_value); destroy_scheme(Scheme); >I am prepared to write a Scheme like this, only if none has been done before. Another alternative would be to modify an existing scheme interpreter. (Question: Do you want to be able to pass data from one scheme "interpreter environment" into another? That could be nasty from the point of view of the GC. Actually, I'm finding it hard to imagine why you need to do this. Unless you are talking about some kind of multi-user environment). The smallest one around is probably SIOD: Anonymous FTP to BU.EDU (128.197.2.6), cd to users/gjc and get siod-v2.4-shar Copyright? Has MIT/X-WINDOWS style copyright notice. Free for any purpose, including commercial use. Suggested technique: Encapsulate all global variables into a data structure. There are 53 global variables, which I identified when making SIOD into a VMS SHARABLE LIBRARY: CATCH_FRAMEP EOF_VAL ERRJMP ERRJMP_OK FREELIST GC_CELLS_ALLOCATED GC_CELLS_COLLECTED GC_KIND_COPYING GC_RT GC_STATUS_FLAG GC_TIME_TAKEN HEAP HEAP_1 HEAP_2 HEAP_END HEAP_ORG HEAP_SIZE INIT_FILE INTERRUPT_DIFFERED MY_ONE MY_TWO NOINTERRUPT OBARRAY OBARRAY_DIM OBLISTVAR OLD_HEAP_USED OPEN_FILES PROTECTED_REGISTERS REPL_EVAL REPL_PRINT REPL_PUTS REPL_READ SAVE_REGS_GC_MARK STACK_START_PTR SYM_DOT SYM_ERROBJ SYM_LAMBDA SYM_PROGN SYM_QUOTE TKBUFFER TRUTH UNBOUND_MARKER USER_CH_READM USER_GC_FREE USER_GC_MARK USER_GC_RELOCATE USER_GC_SCAN USER_LEVAL USER_PRIN1 USER_READM USER_READT USER_TE_READM WHICH_HEAP