LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Scheme programming (https://www.linuxquestions.org/questions/programming-9/scheme-programming-204365/)

poeta_boy 07-13-2004 12:36 AM

Scheme programming
 
Hello there:

I will be programming in scheme next semester so I'd like to start studiying something about it....... I have a tutorial now explaining sintaxis and all but I need something even more basic:

is there a compiler for it? where can I download it?
the source files.... what extension should I use?? as you can see I really have no idea of what scheme is.... just it's name and people says it's quite difficult so I'd better start right now!!


Thanks a lot!

poeta

arvind_sv 07-13-2004 04:53 AM

Er, have you tried googling for scheme? How about the first link?

http://www.catb.org/~esr/faqs/smart-...ns.html#before

Everybody on these forums should read the above link. It'd help the people actually in trouble and want answers they might not be able to get by other means.

Arvind

poeta_boy 07-13-2004 10:36 AM

hehe now I feel bad... :(

jbstew32 07-13-2004 10:44 AM

what school do you go to?

most schools use a program called drscheme for programming. Scheme is a horrible horrible language! I had to learn it inside and out...it is the worst language i've ever tried.

so if you download drscheme, it's a full featured gui that should get you started. It's more like a scripting language...it doesn't actually compile into binary executables, it just kind of executes, heh.

anyway goodluck with that

Strike 07-13-2004 10:59 AM

Good Scheme textbook:

http://www.htdp.org/

poeta_boy 07-13-2004 02:50 PM

hello:

I study in Mexico at Tecnológico de Monterrey www.itesm.mx hehe yeah I?ve heard people complaining and well.... I don't really know why should I learn it but at school they say I have to....

Thanks thanks a lot! I promise I'll google for it before bugging here hehe

Thanks I?ll check out that book too!

jbstew32 07-13-2004 06:53 PM

hey they learn it at MIT too, so I guess it must be the thing to do, heh.www.htdp.org is the book we used.

R00ts 07-13-2004 07:16 PM

They also teach it at Purdue if you take Artificial Intelligence. It sucks though because a lot of the time for that class is spent learning scheme rather than AI, which pisses me off. I dropped it about 2-3 weeks into last semester because the professor was a god damn asshole and I didn't want to put up with him. I took an OO Design course instead. I don't think scheme is necessarily a bad language though (doesn't GIMP use it for script-fu?). It is just a lot more abstract to comprehend than a language like C++/Java. Oh by the way jbstew, that professor I was talking about used to teach AI and MIT, so you are lucky :p

jbstew32 07-13-2004 07:30 PM

yea GIMP is the first real application i've seen for it. Scheme is a dumbed down version of LISP (which the AI people here a GaTech tell me is the standard)

oh i don't go to MIT i just know that they learn it there hah. I go to georgia tech (about 6 ranks below MIT in the CS/ECE departments and a bit easier on the freshman programmers) but FYI they have since replaced our Scheme course with MATLAB/Java...they are just a LOT more practical.

poeta_boy 07-14-2004 11:42 AM

hello:
I've checking scheme but I kinda don't get it.... I have this little program

(define hello-world
(begin
(lambda () (display "Hello, world!")
(newline))))

on DrScheme and it says it doesn't have any sintax mistakes... but I press Execute and nothing happens..... Gosh It's a really abstract language!!
I'm at University and I?d love going to MIT or some school like that... is it really that difficult?

Thanks for your replies!

jbstew32 07-14-2004 11:48 AM

um, start simple.

(define (positive-even? x)
(cond [(and (= (remainder x 2) 0) (> x 0)) true]
[else false]))

(positive-even? 23)
(positive-even? 44)


put that into the top window of drscheme, then hit exectute. It checks to see if the given number is greater than zero and even, very simple. The use of things like begin and lambda were topics learned MUCH later in the semester. After you get the basics like what i have above, you can start looking at define-struct, and working with structures. Set drscheme to beginner.

poeta_boy 07-14-2004 12:05 PM

I did put it into beginner and execute and I've got this:

Welcome to DrScheme, version 207.
Language: ProfessorJ: Beginner.
Expected class definition, found ( which may not be written here
>

and It points to the firs parentesis before the "define" word...

why does it talks about classes? I kinda undertand the sintax.... but having trouble with DrScheme, I've read the help but it doesn't say anything about it :(

jbstew32 07-14-2004 01:40 PM

i think you put the code into the bottom pane of the program. you should put it in the top part. The bottom part is just the interpreter.

like in the bottom window you can do things like
(+ 3 3)
(/ 9 3)

the top window is where you actually define the functions you want to have access to.

jbstew32 07-14-2004 01:41 PM

scheme is horrible btw. it uses prefix notation, so you can't just say 3+3 or if ( x == 3) then ..... you have to do (+ 3 3) and (equal? x 3) or whatever

i haven't done scheme in a year, but i think everything i said is accurate

poeta_boy 07-14-2004 02:17 PM

hehehe I did write it in the top part hehehe........ since I can't copy and paste in the bottom one... but it keeps saying something about class definitions :(


All times are GMT -5. The time now is 04:35 PM.