Jump to content
  • Advertisement
Sign in to follow this  
Way Walker

Scheme Programming

This topic is 4875 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

So I've gone through a couple tutorials, read most of R5RS (Not Section 7, but that seems more important to implementors), am working on making DrScheme do some basic tricks, and am intrigued. My question is, what's a good resource to get a feel for how things are done in Scheme? For instance, are there any tutorials that will walk you through a basic program, or even the starting framework of a program? The nearest C++ example I can think of is something like the Enginuity series of articles. Practical C++ with rationales for why things are done the way they are. Also, where do most Schemers stand on language extensions, SRFIs, etc.? Or, how much emphasis is placed on inter-implementation portability? There seems a lot of emphasis on inter-implementation portability among C/C++ programmers, not so much among Smalltalkers, and it's not a problem for those who use Python. Just curious where Schemers stand so I don't make any faux pas.

Share this post


Link to post
Share on other sites
Advertisement
I don't know what your reason for learning Scheme is, so I don't know how useful my reply will be, but anyway...

If you don't mind doing Lisp instead, then I would recommend reading through the Practical Common Lisp site/book (there's a print copy, or you can read the whole book online for free). I'm only about a third of the way through, but so far it's done exactly what you were asking for (only with Lisp rather than Scheme). From the introduction

"I cover not only the syntax and semantics of the language but also how you can use it to write software that does useful stuff."

I don't have any good sites for Scheme sorry, but if you decide to have a look at Lisp instead, I hope that helps [smile]

Share this post


Link to post
Share on other sites
I believe books are your best bet.

After you are done learning the language, and are interested in techniques and approaches to thinking in scheme, then Lisp books are just as valid, and there are quite a few good books on lisp (I found scheme has better introductory material ie for teaching the language, lisp has better advanced material ie for using the language).

I am roughly in the same position as you I believe, and asked a very similar question about two days ago here, thread title: "Scheme books", if you can be bothered going back a few pages (i know its anoying without the search feature).

With regards to SRFI's, I think if your implementation supports them, why not use them. Some of them can be implemented via macros anyway, so unless you think you might be changing your scheme implementation soon, then i dont see why not. I am a new schemer myself, so dont take this answer as representative of other schemers.

Share this post


Link to post
Share on other sites
Quote:
Original post by simb
I don't know what your reason for learning Scheme is, so I don't know how useful my reply will be, but anyway...

If you don't mind doing Lisp instead, then I would recommend reading through the Practical Common Lisp site/book (there's a print copy, or you can read the whole book online for free). I'm only about a third of the way through, but so far it's done exactly what you were asking for (only with Lisp rather than Scheme). From the introduction

"I cover not only the syntax and semantics of the language but also how you can use it to write software that does useful stuff."

I don't have any good sites for Scheme sorry, but if you decide to have a look at Lisp instead, I hope that helps [smile]
Both Common Lisp and Scheme are Lisp dialects.

Share this post


Link to post
Share on other sites
Quote:
Original post by Roboguy
Both Common Lisp and Scheme are Lisp dialects.


Yes, in a manner of speaking, but usually saying "Lisp" doesn't refer to Scheme but to Common Lisp. There's a good reason why Scheme is called Scheme, and that is so that it is not confused with Lisp ("Lisp dialect" as opposed to "Lisp" includes Scheme and Dylan as well as the various Lisps).

Share this post


Link to post
Share on other sites
Quote:
Original post by simb
I don't know what your reason for learning Scheme is, so I don't know how useful my reply will be, but anyway...

If you don't mind doing Lisp instead, then I would recommend reading through the Practical Common Lisp site/book (there's a print copy, or you can read the whole book online for free). I'm only about a third of the way through, but so far it's done exactly what you were asking for (only with Lisp rather than Scheme). From the introduction

"I cover not only the syntax and semantics of the language but also how you can use it to write software that does useful stuff."

I don't have any good sites for Scheme sorry, but if you decide to have a look at Lisp instead, I hope that helps [smile]


My reason for learning Scheme instead of Common Lisp isn't a very good one: I don't like to use a language until I can wrap my brain around it. Otherwise I feel that I'm missing out on some abstraction offered by the language (or its libraries) that could help. Common Lisp seems too large at this point, whereas I've already read R5RS and think I could make a basic implementation in C (I just might).

Really, I didn't know how much the more extensive nature of Common Lisp, when compared to Scheme, affected programming practices. If common practice is still similar enough between the two, I'll have a broader search field.

Quote:
Original post by Tylon
I believe books are your best bet.

After you are done learning the language, and are interested in techniques and approaches to thinking in scheme, then Lisp books are just as valid, and there are quite a few good books on lisp (I found scheme has better introductory material ie for teaching the language, lisp has better advanced material ie for using the language).

I am roughly in the same position as you I believe, and asked a very similar question about two days ago here, thread title: "Scheme books", if you can be bothered going back a few pages (i know its anoying without the search feature).

With regards to SRFI's, I think if your implementation supports them, why not use them. Some of them can be implemented via macros anyway, so unless you think you might be changing your scheme implementation soon, then i dont see why not. I am a new schemer myself, so dont take this answer as representative of other schemers.


Wasn't so hard finding your post now that you pointed it out: I just checked your profile for posts. Looks like that's just what I needed. Still a pain that there isn't a proper searching facility. It's not always good at picking up the posts you want.

By the way, any reason for the difference in focus between Scheme and Common Lisp? Is Scheme seen as a toy by the Lisp community? A place to cut your teeth, but not for any serious work (i.e. Now that you know Scheme, it's time to graduate on to Common Lisp)? It seems Scheme can hold its own against other languages, so I just wonder "Why not Common Lisp?".

As for why not to SRFI's, I suppose it would be an attempt to remain neutral among Scheme dialects. Like I said, the emphasis on this seems to vary by language, so I thought I'd ask. I usually like to stick to what the standard guarantees, possibly venturing into de facto standards. What it comes down to is that I get annoyed when some program looks intriguing, but then asks me to download and install five libraries and a specific compiler before I can run it. At that point I usually say it's not worth it and move on.

Share this post


Link to post
Share on other sites
scheme is something you usually embed or extend in your app, whereas clisp is something I usually script in.

a good example might be scripting the bots in a fps using scheme scripts.

good luck.

Share this post


Link to post
Share on other sites
My programming languages class was in scheme. We wrote a lot of programs, mainly leading up to writing an interpreter. Unfortunately, with the end of the school year, the notes from the class were taken off the web and are replaced with lisp notes instead. However, our text book, Essentials of Programming Languages follows along fairly well with the course material, and it is done in Scheme.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!