Add text to the Scheme Programming section

This commit is contained in:
Gerard Vermeulen 2023-05-13 16:23:17 +02:00
parent b7068fbc7c
commit 24771b982a

View File

@ -5494,8 +5494,17 @@ configures =code-cells=.
:CUSTOM_ID: sec:scheme-programming
:END:
- [[https://wiki.call-cc.org/emacs#using-chicken-with-emacs][Using Chicken Scheme with Emacs]]
In case you install [[https://cisco.github.io/ChezScheme/][Chez Scheme]], [[https://call-cc.org/][Chicken Scheme]], [[https://www.gnu.org/software/guile/][GNU Guile]], and [[https://www.gnu.org/software/mit-scheme/][MIT/GNU Scheme]]
with [[https://brew.sh/][Homebrew]], you have to execute the [[https://wiki.call-cc.org/emacs#using-chicken-with-emacs][Using Chicken Scheme with Emacs]] steps or
listing [[lst:finish-chicken-install][Finish Chicken Scheme install]] to access the [[https://wiki.call-cc.org/man/5/The%20User%27s%20Manual][Chicken Scheme Manual]]
locally.
Listing [[lst:setup-geiser][Ensure Geiser installation]] installs the support for those four Scheme
implementations and configures Geiser with a preference for [[https://cisco.github.io/ChezScheme/][Chez Scheme]].
#+caption[Finish Chicken Scheme install]:
#+caption: Finish Chicken Scheme install.
#+name: lst:finish-chicken-install
#+begin_src shell -n
# https://gitlab.com/emacs-geiser/chicken
# Install the necessary support eggs:
@ -5505,6 +5514,9 @@ cd $(csi -R chicken.platform -p '(chicken-home)')
curl https://3e8.org/pub/chicken-doc/chicken-doc-repo-5.tgz | sudo tar zx
#+end_src
#+caption[Ensure =geiser= installation]:
#+caption: Ensure =geiser= installation.
#+name: lst:setup-geiser
#+begin_src emacs-lisp -n
(when (ensure-package-installation
'geiser 'geiser-chez 'geiser-chicken 'geiser-guile 'geiser-mit)
@ -5512,6 +5524,35 @@ curl https://3e8.org/pub/chicken-doc/chicken-doc-repo-5.tgz | sudo tar zx
geiser-scheme-implementation 'chez))
#+end_src
*** Org Babel Scheme test
:PROPERTIES:
:CUSTOM_ID: sec:ob-scheme-test
:END:
Listing [[lst:test-ob-scheme][minimal Org Babel Scheme test]] allows to check whether the setup works
for [[https://cisco.github.io/ChezScheme/][Chez Scheme]]. To test [[https://call-cc.org/][Chicken Scheme]], [[https://www.gnu.org/software/guile/][GNU Guile]], or [[https://www.gnu.org/software/mit-scheme/][MIT/GNU Scheme]], evaluate
one of the following expressions before the [[lst:test-ob-scheme][minimal Org Babel Scheme test]]:
1. src_emacs-lisp{(setopt scheme-default-implementation 'chicken)},
2. src_emacs-lisp{(setopt scheme-default-implementation 'guile)},
3. src_emacs-lisp{(setopt scheme-default-implementation 'mit)}.
Sofar, the test fails for [[https://www.gnu.org/software/mit-scheme/][MIT/GNU Scheme]].
#+caption[Minimal Org Babel Scheme test]:
#+caption: Minimal Org Babel Scheme test.
#+name: lst:test-ob-scheme
#+header: :wrap "src text -n"
#+begin_src scheme -n :eval never-export :exports both
(* 1 2 3 4 5)
#+end_src
#+caption[Minimal Org Babel Scheme test result]:
#+caption: Minimal Org Babel Scheme test result.
#+name: lst:test-ob-scheme-result
#+RESULTS: lst:test-ob-scheme
#+begin_src text -n
120
#+end_src
* [[https://github.com/emacs-tw/awesome-emacs#library][Libraries]]
:PROPERTIES:
:CUSTOM_ID: sec:libraries