Questions tagged [scheme]

Scheme is a functional programming language in the Lisp family, closely modelled on lambda calculus with eager (applicative-order) evaluation.

Scheme is a functional programming language. It is designed to provide a mathematically well-founded language based on lambda calculus (with eager evaluation).

It follows a minimalist design philosophy specifying a small standard core with powerful tools for language extension. Its compactness and elegance have made it popular with educators, language designers, programmers, implementors, and hobbyists.

The Scheme language belongs to the Lisp Family. Since Scheme uses a single namespace for naming functions and other values, it is called a lisp-1.

Free Scheme Programming Books

Implementations

Community Websites

32 questions
9
votes
1 answer

How to make Geiser send the output to REPL buffer instead of echo area?

I am running Emacs25 with Geiser (latest version from MELPA, 20180128.1821) and Guile (version 2.2, Debian package). So far it works fine, but when I evaluate a sexp, it will print the result to Emacs' echo area instead of in the REPL buffer. Is…
Jay
  • 233
  • 1
  • 7
8
votes
2 answers

How to integrate SLIME with MIT Scheme?

I know basics of Common Lisp. I've learned it using Emacs + SLIME, and I must say that without these two I wouldn't learn too much - using bare REPL is tough job. However, SLIME makes a great job at turning REPL into great environment for…
MatthewRock
  • 1,453
  • 13
  • 27
7
votes
0 answers

How to properly indent application in scheme-mode?

The scheme-mode indents application in this way: (define (x) (x 1 2)) But when the function to apply is the result of another application scheme-mode indents the code this way: (define (f) ((f) 1 2)) But I would like to indent this in…
ceving
  • 1,308
  • 1
  • 14
  • 28
5
votes
2 answers

defun in defun is not local?

I am reading SICP to learn Lisp, the book uses Scheme dialect. I want accommodate it to emacs lisp, I find something weird in 3.1.1 and cannot figure it out, say I have a test.el file: (defun make-account () (defun withdraw (amount) (print "in…
Alaneuler
  • 277
  • 1
  • 8
5
votes
0 answers

How to make racket the default implementation for geiser mode

The geiser documentation suggests that setting geiser-default-implementation is one way to prevent run-geiser from prompting for a scheme implementation. Another approach suggested by the geiser docs is to set the geiser-implementations-alist to the…
BPS
  • 193
  • 4
5
votes
1 answer

How do I set org-mode to use racket instead of Guile?

How do I set org-mode to use racket instead of Guile? I want to use emacs,org-mode and racket to go through the SICP. I can start Geiser, choosing Racket in the Start Geiser for scheme implementation menu. But when I execute C-c C-c on a src block…
Jenia Ivanov
  • 427
  • 4
  • 14
4
votes
1 answer

executing scheme in org-mode babel

I want to write a scheme program in an org file. I want to be able to execute the #+SRC blcoks and see the result in #+RESULT: block. However, when I execute the #+SRC_BEGIN/END I get no output. Instead I get a guile REPL and that's it. These are…
Jenia Ivanov
  • 427
  • 4
  • 14
3
votes
1 answer

emacs, geiser, chiken scheme on windows setup help

I want to go through SICP. I installed Geiser and Chiken scheme I set the scheme interpreter to be chiken (setq scheme-program-name "C:/Program Files\ (x86)/Chicken Scheme/bin/csi.exe") Then I run M-x geiser and choose chicken in the Start Geiser…
Jenia Ivanov
  • 427
  • 4
  • 14
2
votes
3 answers

Converting a Scheme function to Emacs Lisp

I am taking efforts to rephrase an example from SICP #+BEGIN_SRC scheme (define (average-damp f) (lambda (x) (average x (f x)))) (define (average x y) (/ (+ x y) 2)) (define (square x) (* x x)) ((average-damp square)…
AbstProcDo
  • 1,231
  • 5
  • 15
2
votes
1 answer

Executing programs the efficient way with Spacemacs

I'm a Vim user trying to learn Spacemacs. In Vim, I execute a Scheme program by typing :mit-scheme < xxx.scm. After the program exits, I can continue editing simply by press Enter. However, doing this in Spacemacs (in evil mode, of course) would…
nalzok
  • 665
  • 6
  • 18
2
votes
0 answers

How to tell scheme-send-last-sexp to echo the expression?

Is it possible to tell scheme-send-last-sexp to echo the expression in the *scheme* buffer?
ceving
  • 1,308
  • 1
  • 14
  • 28
2
votes
2 answers

mode hooks and eval-after-load

I am trying to set up some keybindings for working with scheme. I have these two mode hooks which contain the bindings I want: (add-hook 'scheme-mode-hook (lambda () (local-set-key (kbd "C-j")…
bitops
  • 333
  • 1
  • 12
1
vote
1 answer

Executing mit-scheme blocks in org-mode

Using doom emacs in my packages.el: (package! slime) (package! geiser) (package! geiser-mit) (package! scheme) in my config.el: (setq geiser-active-implementations '(mit)) (org-babel-do-load-languages ' org-babel-load-languages …
Abel
  • 11
  • 1
1
vote
2 answers

Capturing output scheme when executing a code block in org-mode

I cannot find a way to intercept the output when I evaluate a scheme code block as below (I'm trying with Geiser): #+NAME: test #+BEGIN_SRC scheme :session sicp :lexical t :results output verbatim replace (define a (list 2 3 4)) (set-car! a…
pfmaggi
  • 113
  • 4
1
vote
0 answers

Trying to run Scheme in org mode

I installed geiser, set my default scheme to guile, and enabled scheme support but I can't seem to get it to work. I am getting this output and am not sure what to make of it. #+begin_src scheme :results output (define test (lambda (v) v)) (test…
Doomer1999
  • 23
  • 2
1
2 3