SUGARLISP RUN EXAMPLE The sugar -r "run" option is meant as a convenient "compile-and-run" option that allows you to work with .slisp files alone much as if sugarlisp were an interpreter. This (boring) example is really just a test that this sugar -r command works in all situations. (i.e. with all permutations of ".slisp" and ".js" file types being "required" as modules) To run it you simply do: sugar -r run.slisp The different "require" scenarios can be tested by uncommenting some of the requires in the .slisp files here, along with using "sugar " to compile .js files when needed. RATIONALE a. "sugar" alone is the way to compile .slisp files to .js files one at a time. b. "sugar -r" is for running .slisp files directly without explicitly creating .js files. c. "sugar -w" is for "watching" .slisp file changes and automatically compiling to .js files. Note that b and c are really two different ways of thinking about how to use sugarlisp on the server. If you do "sugar -w" to generate .js files, you can simply run your main .js file with the node command. Alternatively with "sugar -r" you might never create .js files and use the .slisp files alone. Note when using using "sugar -r", if you've omitted a module's file extension like e.g.: (require "subtract") This will load "subtract.js" if it exists, even if it's older than "subtract.slisp". If this concerns you, you can explicitly specify the file extension: (require "subtract.slisp") This guarantees your latest "subtract.slisp" code is used, even if a "subtract.js" file exists. You might likewise want to add *.js in your .gitignore file if you're a "sugar -r" kind of person. Alternatively you might enjoy the flexibility using requires without the ".slisp" extension gives you to *deploy* just the generated .js files alone without the .slisp files. In that case sugar -w can be used to ensure your generated .js files stay up to date with recently modified .slisp files.