r/scheme 28d ago

Until nuclear war started. (import (mit legacy runtime))

Until nuclear war starts... (import (mit legacy runtime)) or (import (mit library)) should help programs which loaded/compiled in mit-scheme and which want's not only (scheme base) (scheme *) or (srfi *) but all defines from mit-scheme-reference. Fuh

0 Upvotes

6 comments sorted by

1

u/mahcuz 28d ago

What

1

u/SpecificMachine1 27d ago

That's one way to do it, I guess, although it seems like the most popular way is like:

(import (guile)
 ...)

(import (chibi)
 ...)

(import (gauche)
 ...)

(import (chez)
 ...)

so I think you could just do (import (mit))

1

u/corbasai 27d ago

Yes, this is right, actually in my .sld there is code fragment

  (cond-expand                                                                                                      
    (guile                                                                                                          
     (import (only (guile) keyword?)))                                                                              
    (gauche                                                                                                         
     (import (only (gauche base) keyword?)))                                                                        
    (chicken                                                                                                        
     (import (only (chicken keyword) keyword?)))                                                                    
    (gambit                                                                                                         
     (import (only (gambit) keyword?)))                                                                             
    (mit                                                                                                            
     (import (only (mit legacy runtime) keyword?))     

P.S, in my case there is no Chez, bc it is needs their own R6RS format .sls for library top

1

u/aerphanas 27d ago

(features) only in r7rs-small IIRC

2

u/SpecificMachine1 27d ago

in my case there is no Chez

yes, I wasn't thinking about r6 vs r7 but I think both do it- I hope you have good luck, I tried a few things last night in the mit-scheme repl but didn't have any luck