Comp Sci 61A Question about Scheme

<p>So I downloaded DrScheme to my home computer and when I do:
(load “C:\Users\Diivanand\Documents\SchemeFiles\simply.scm”)
I get the error code:
…\Users\Diivanand\Documents\SchemeFiles\simply.scm:20:12: set!: cannot mutate module-required identifier in: number->string</p>

<p>How do I fix this. Why won’t it load simply.scm</p>

<p>(load “C:\Users\Diivanand\Documents\SchemeFiles\simply.scm”) it’s that the simply without the spaces that was a typo in my forum post. Ugh what do I do. I have this class coming Fall as a freshman. Why isn’t this class in Java…oh well</p>

<p>Woot I found the UC Berkeley Scheme interpreter and that works just fine. Thanks for reading anyway though bye!</p>

<p>

</p>

<p>That’s percisely the point. They want you to learn how to deal with a variety of programming languages, paradigms, and environments.</p>

<p>Scheme has its own niche in a few environments, most notably Emacs. Its functional nature may make it more useful in the future as it scales really well in parallel.</p>

<p>By the time you’re done with your lower division courses, the expectation is that you’ll be able to learn any programming language and be able to use it within a day.</p>

<p>Welcome to CS/EECS. :)</p>

<p>If you want to get an idea of why Scheme is important, read this essay, keeping in mind that Scheme is a dialect of Lisp:
[Beating</a> the Averages](<a href=“Paul Graham”>Beating the Averages) by Paul Graham</p>

<p>I got the command line from [UCB</a> Scheme](<a href=“http://www-inst.eecs.berkeley.edu/~scheme/]UCB”>UCB Scheme)</p>

<p>working, but I can’t seem to get it working (load is a command not found, etc…). What else would I need to set up?.</p>

<p>Also emacs isn’t working (I usually use vim, which works, but I still can’t load anything).</p>

<p>I can type fine in it, but C-h, backspaces instead of bringing up help (I’ve been trying to do the tutorial that is done in the first week for practice).</p>

<p>Does anyone know how to get that working? I don’t really want to use DrScheme, I really prefer just using a command line.</p>

<p>I’m used to Java and I got that all set up on my windows command line, and I really want to get this set up so I can practice over the summer.</p>

<p>Thank you.</p>

<p>I followed these instructions perfectly and things worked fine: [UCB</a> Scheme - binary distribution for Windows](<a href=“http://www-inst.eecs.berkeley.edu/~scheme/precompiled/MS-Windows/]UCB”>UCB Scheme - binary distribution for Windows).</p>

<p>so if you got the command line (the one with the $ next to each input) then type in emacs and this new program will pop up. When it does press the esc and s keys together and you’ll get the Scheme input line prompter and then you can start programming in Scheme.</p>

<p>I’m going to try reinstalling it (Have done that a few times). If that doesn’t work I’ll redownload everything and start from there.</p>

<p>When I got to emacs it didn’t work right. It seemed like all of the commands were off, everything in the beginning did something that it wasn’t supposed to do. C-h was backspace, most things did nothing. C-x and C-c didn’t work.</p>

<p>I guess I’ll just have to keep trying.</p>

<p>Also what is it like? I’m used to editing .java programs in vim then compiling and running them. This Stk environment for scheme seems to be a lot different.</p>

<p>Thanks</p>

<p>Thanks I got that working (using the startx.bat instead of the Cgywin Command Line).</p>

<p>I’m still trying to figure out how to write .scm files and then compile or open them though (I’m still trying to take this from a Java approach).</p>

<p>yeah hmm I haven’t tried this yet but an easy way is to write in notepad++ and save it as .scm, and there’s a certain place in the Cgywin folder where if you put your .scm files there, you just have to say (load "filename.scm) as your Scheme prompt and press return or enter and it’ll load the file and you won’t have to write the entire file location. Here I think it’s this one: C:\cygwin\usr\local\lib\stk\slib and put your .scm files in there and do (load “filename.scm”) and it should work.</p>

<p>OH and when writing .scm files you don’t need to put the > in your .text</p>

<p>(define (square x)
(* x x)) is good enough in your .scm text file</p>

<p>you don’t need to do:</p>

<br>

<br>

<p>PS: lol yeah I’m used to Java too but if you use that Simply Scheme book before going into the Structure and Interpretation of Computer Programs, you’ll essentially be fluent in basic Scheme so you can just focus on the concepts being thought in SICP rather than syntax.</p>

<p>Wow thanks! What I think I will do is just write programs in my windows command line and put them in that directory (in vim). Thanks.</p>

<p>Wow thanks! What I think I will do is just write programs in my windows command line and put them in that directory (in vim). Thanks.</p>

<p>Edit: Now I’m getting </p>

<p>bash: load: command not found</p>

<p>Are you using the command line with the $ (or the one with larger font and the large “X” on the top)?</p>

<p>Why can’t I edit my posts? </p>

<p>I figured it out, I completely forgot to type in stk. I think I am just going to bypass Emacs entirely, write stuff out in vim, and then just use the stk.</p>

<p>Thanks for all the help.</p>