Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to record scheme session in a file?

Tags:

scheme

racket

I'm trying to record my session while writing some scheme code, But I don't know which is the correct code to record my session while doing some expression.

like image 368
Luis Garcia Avatar asked Feb 04 '26 12:02

Luis Garcia


1 Answers

R5RS

R5RS has an optional procedure transcript-on that takes a file name and it will output the interaction until transcript-off` is called. (Thanks @molbdnilo for pointing this out in a comment)

R6RS and R7RS

This is not supported in the report. Even (scheme-report-environment 5)‌ is specified not to contain the optional procedures load, interaction-environment, transcript-on, transcript-off, and char-ready?.

Implementation lock-ins

The individual implementations might have such features included and if you just need it for you chosen implementation you must read its documentation to find it. I guess this is for tooling rather than production code so using implementation specific features isn't as bad as using non scheme standard forms.

roll your own

You can make your own repl that does what you want with the file output of you chosing that would be the same across all implementations.

like image 74
Sylwester Avatar answered Feb 06 '26 07:02

Sylwester