Yes it “works”… but for the wrong reasons… try
(pp 🍔)
and you will see your code has no burger in it. That’s because when you entered a burger at the terminal Gambit saw that as a 4 character symbol, i.e. |\360\237\215\224| . To get a real burger (single Unicode character), you need the -:t8 .
Marc
On Jan 19, 2017, at 8:02 PM, Bradley Lucier lucier@math.purdue.edu wrote:
On Jan 19, 2017, at 7:57 PM, Marc Feeley feeley@iro.umontreal.ca wrote:
If you try this, make sure you start gsi with the -:t8 flag so that the terminal input/output is UTF-8 encoded. That way you can edit the lines more easily.
Really? This seems to work OK (in a Mac OS X Terminal window):
[Media-Mac-mini-3:~] lucier% cat hamburger.scm (define (🍔 x) (if (< x 2) 1 (+ (🍔 (- x 2)) (🍔 (- x 1))))) [Media-Mac-mini-3:~] lucier% emacs hamburger.scm [Media-Mac-mini-3:~] lucier% gsi Gambit v4.8.6
(load "hamburger")
"/Users/lucier/hamburger.scm"
(🍔 6)
13
(🍔 7)
21
(🍔 8)
34