0

I am trying to brush up on Scheme by going through Dorai Sitaram's Teach Yourself Scheme in Fixnum Days. Problem is the syntax used by that tutorial deviates from current Scheme syntax, particularly with regards to macros and structs.

Is there a way to install libraries into Racket, or for that matter Chez Scheme to make it's syntax and behavior closer to the book? I did search for a Raco library to install into Racket to achieve this but I either missed it or it does not exist.

haziz
  • 12,994
  • 16
  • 54
  • 75

1 Answers1

2

In Racket #lang scheme will get you more-or-less the same language as MzScheme. That is use the program as-is in DrRacket, but use #lang scheme as the first line.

Note that using defmacro or define-macro are obsolete - they were obsolete even back in 2000. You can use (require compatibility/defmacro) to get a define-macro in Racket -- but I would advice against it. Find a better tutorial when you want to read up on macros.

soegaard
  • 30,661
  • 4
  • 57
  • 106
  • I intend to. However I thought I could skim through this tutorial quickly before diving into a more comprehensive resource. The first 30 pages (about a third of the whole tutorial) were great. Then I hit macros and structs and spent over a day wrestling through the next 8 or 10 pages, with significant frustration. I did go through parts of Dybvig's book (The Scheme Programming Language), but that was tough going and certainly can't be finished in a few days, at least for me. Sitaram's tutorial seemed like a good intro before diving in deeper. – haziz Dec 30 '18 at 15:41
  • See details here: http://docs.racket-lang.org/mzscheme/index.html?q=mzscheme – soegaard Dec 31 '18 at 14:53