The definition of sum-list at the end is not correct. You either use the lambda form or the short form, but what he did is an ill-formed define (two expressions after the identifier).
@selfdealloc Lecture 8, 9 in this series starts on assembly programming. It's not about a real language, but it teaches the method and mindset you need, which is arguably more important.
Good stuff. He's the one who got me interested in Scheme and the functional paradigm. Remember the 1st lecture? This is what I was looking forward to.
Great lecture ... but somehow surprisingly simple. Is this a beginner's course or is it simplified for youtube? Would it be equally simple ... say at MIT? Excuse me for I didn't study computer science. But in any math or logics lecture I can imagine most of the little facts he shows wouldn't have been dealt with but presupposed. The students would be expected to work this out for themselves. But he's repeatedly speaking of "just math" ...
@flexibartrampolin It isn't about learning students the logic. It is about learning them to think differently about programming, differently then they have been for the last 2 and a half courses.
They are not teaching lisp here, they are teaching Scheme. So, you gotta be careful with subtle differences. It is 'defun' not 'define'. If you're using Linux, you could install 'clisp' and that works great with common lisp, which you should be learning and is more fun. :)
@nsakic : he stated a couple times that scheme "is lisp". Although he was wrong on the exact details, but the actual intuit knowledge between the two are almost seamless. You are right that lisp should have been done with "defun" and not "define"....and the first time he wrote the function of define in scheme should have been let and not define add (x y) because define in scheme is 2 arguments. He's skewing both languages unfortunately, but he's only introing it for the class
What a great lecture!... I love how he explains things. Does any other university teaches scheme/lisp these days. This is one of the most important lectures in this course.
I'm surprised no one asked him about the unquoted list of parameters in the definition of a function. I looked it up and apparently this is not a problem because "define" is a special type of function called a "macro." Google it if you want more information.
This has been flagged as spam show
I believe this is a class that aims to teach students how to write code .
grunder20 1 month ago
This has been flagged as spam show
very complex syntax!
grunder20 2 months ago
The definition of sum-list at the end is not correct. You either use the lambda form or the short form, but what he did is an ill-formed define (two expressions after the identifier).
This would be correct:
(define sum-of (lambda (numlist) (if (null? numlist) 0 (+ (car numlist) (sum-of (cdr numlist))))))
or:
(define (sum-of numlist) ; ... etc
which is a syntactic short-cut.
muyuu 11 months ago
Comment removed
CalgaryAlpineStyle 11 months ago
Comment removed
CalgaryAlpineStyle 11 months ago
I am looking for a lecture that is just about assembly coding ?
Does anybody know some kind like that .
Thx
selfdealloc 1 year ago
@selfdealloc Lecture 8, 9 in this series starts on assembly programming. It's not about a real language, but it teaches the method and mindset you need, which is arguably more important.
TreacleMary 7 months ago
As stated in the lecture, I tried: (define add (x y) (+ x y))
but this gave me an error, the correct way to define is: (define (add x y) (+ x y))
Thanks for all great lectures!
InternetFrame 1 year ago 5
Good stuff. He's the one who got me interested in Scheme and the functional paradigm. Remember the 1st lecture? This is what I was looking forward to.
intj1 1 year ago
Great lecture ... but somehow surprisingly simple. Is this a beginner's course or is it simplified for youtube? Would it be equally simple ... say at MIT? Excuse me for I didn't study computer science. But in any math or logics lecture I can imagine most of the little facts he shows wouldn't have been dealt with but presupposed. The students would be expected to work this out for themselves. But he's repeatedly speaking of "just math" ...
flexibartrampolin 1 year ago
@flexibartrampolin It isn't about learning students the logic. It is about learning them to think differently about programming, differently then they have been for the last 2 and a half courses.
imorio 1 year ago
I highly recommend the PLT Scheme environment for learning, instead of Kawa.
PLT Scheme has been designed from the ground up for teaching Scheme and it's a pretty powerful environment.
InXLsisDeo 2 years ago
This doesn't make sense :-(
I've installed kawa 1.9.1 and tried some examples out. The "define" syntax doesn't seem to be correct. Could anyone help?
#|kawa:1|# (define cels-far (temp)
#|(---:2|# (+ 32 (* 1.8 temp)))
/dev/stdin:1:1: no matching syntax-rule for define
B0nchBruevich 2 years ago
Try this:
(define (celsfar temp) (+ 32 (* 1.8 temp)))
ErkcanOzcan 2 years ago 2
The below works for me in clisp interpreter:
[1]> (defun cels-far(temp)
(+ 32 (* 1.8 temp)))
CELS-FAR
[2]> (cels-far 10)
50.0
They are not teaching lisp here, they are teaching Scheme. So, you gotta be careful with subtle differences. It is 'defun' not 'define'. If you're using Linux, you could install 'clisp' and that works great with common lisp, which you should be learning and is more fun. :)
nsakic 2 years ago
@nsakic : he stated a couple times that scheme "is lisp". Although he was wrong on the exact details, but the actual intuit knowledge between the two are almost seamless. You are right that lisp should have been done with "defun" and not "define"....and the first time he wrote the function of define in scheme should have been let and not define add (x y) because define in scheme is 2 arguments. He's skewing both languages unfortunately, but he's only introing it for the class
sabriath 1 year ago
Mmmk
chjustin69 2 years ago
What a great lecture!... I love how he explains things. Does any other university teaches scheme/lisp these days. This is one of the most important lectures in this course.
nsakic 2 years ago 5
waterloo
sumitpsp1234 2 years ago
CAU Kiel, Germany ; )
Daxten 2 years ago
@nsakic The intro to CS course at IU teaches Scheme. Kent Dybvig usually teaches the course.
LoserMaster 1 year ago
@nsakic Berkeley, Indiana and Montreal off the top of my head, I'm sure there are more. Too bad the MIT switched...
muyuu 11 months ago
I'm surprised no one asked him about the unquoted list of parameters in the definition of a function. I looked it up and apparently this is not a problem because "define" is a special type of function called a "macro." Google it if you want more information.
xhnpohugafsd 2 years ago 8
"Does this make sense?"
madhockeygoon 3 years ago 2
car = contents of the address register
cdr = contents of the decrement register
tokinonagare27 3 years ago 3