just out of curiosity, how portable are libraries across implementations?

· brutaldon · 3 · 3 · 2

@grainloom there's the RNRS (where N is a number between 5 and 7, inclusive) standards, anything coded to those should be perfectly portable, though I've never bothered checking.

Semi-related, racket is being reworked to run on top of other scheme implementations (chez scheme in particular, with other runtimes being an option in the future) so that suggest high portability

@tfb @rain @grainloom yes, but there are about 7 module loading implementations, and don't forget that of each of those only 3 implementations, there's a non trivial number in use, each of which implements a subset of these loaders in a slightly differently broken way

@hirojin @tfb @rain

annnnnd this is why Lua is superior (well, another reason)

@grainloom @tfb @rain cuz everybody makes their own ad-hoc module loader, and they all look the same?

@hirojin @tfb @rain well, there is a standard one, so if your environment uses something non-standard (eg. MTA:SA) you always know what to target with your wrapper

but otherwise, it looks like all important libraries adhere to the standard

@hirojin @tfb @rain
and adding a new loader is easy, just add it to package.loaders

(or, if the rest of the module loading stuff is not present, it's easy to implement just by reading the manual. source: i've done it.)

@hirojin @rain @grainloom My point was, with only 3-4 implementations, you'd certainly hope it'd be better than Scheme in this way.

@tfb @rain yes, but i do like do drag on JavaScript, the scheme inspired programming language for the Browser (and now, everything) at least once a day

i also like it, but i do agree with @grainloom, we'd be better off with Lua.

@grainloom Schemes vary, with RnRS version and anything calling the OS.

But see SLIB which runs (ran?) on many schemes: "Bigloo, Chez, ELK 3.0, Gambit 4.0, Gauche, Guile, JScheme, Kawa, Larceny, MacScheme, MIT/GNU Scheme, Pocket Scheme, RScheme, scheme->C, Scheme48, SCM, SCM Mac, scsh, sisc, Stk, T3.1, umb-scheme, and VSCM. "

R7RS also leads to portable code: I have some libraries running on all of Chibi, Gauche, Kawa, Larceny and Sagittarius.

Sign in to participate in the conversation

Cybrespace is an instance of Mastodon, a social network based on open web protocols and free, open-source software. It is decentralized like e-mail.