Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

SICP

Name: Anonymous 2007-11-24 19:27

Hello /prog/
I am reading SICP, should i do all exercises of the book?
I can't wrap my head around the code.
I've even googled for solutions, but i have to write them down and follow/write each call with pencil.

Seriously, i wouldn't have problem with most of the algorithms given if i could use some other language.

Do i fail at maths?
help.

Name: Anonymous 2007-11-24 19:28

WHAT PART OF READ SICP DO YOU NOT UNDERSTAND?!

Name: Anonymous 2007-11-24 19:47

>>1
You are not ready for Scheme, you will never become an EXPERT PROGRAMMER.

Name: Anonymous 2007-11-24 20:32

Some of the exercises are very rigorous but yes you fail if you can't do most of them.

Name: Anonymous 2007-11-24 22:31

rigorous
That word does not mean what you think it does.

Name: 4 2007-11-24 23:19

>>5


rigorous
     adj 1: rigidly accurate; allowing no deviation from a standard;
            "rigorous application of the law"; "a strict
            vegetarian" [syn: strict]
     2: demanding strict attention to rules and procedures;
        "rigorous discipline"; "tight security"; "stringent safety
        measures" [syn: stringent, tight]
     3: (of circumstances; especially weather) causing suffering;
        "brutal weather"; "northern winters can be cruel"; "a
        cruel world"; "a harsh climate; "a rigorous climate";
        "unkind winters" [syn: brutal, cruel, harsh, unkind]


???

Name: Anonymous 2007-11-24 23:52

>>6
Well done, you can use a dictionary. Now can you also figure out why that adjective does not apply to the exercises in SICP?

Name: Anonymous 2007-11-25 0:04

((lambda (x) (x x) (lambda (x) (x x))

Name: Anonymous 2007-11-25 0:23

>>8
))

Name: Anonymous 2007-11-25 1:40

>>7
No, I cannot.

Name: Anonymous 2007-11-25 2:01

>>8-9
What's wrong, did you undershoot your ^c^v?

Name: Anonymous 2007-11-25 2:04

>>11
Protip: >>9 is not >>8.

Name: Anonymous 2007-11-25 2:06

>>8-9,12
Same person.

Name: Anonymous 2007-11-25 2:41

hey guys check out my YT account plz. k thanx

http://youtube.com/profile?user=thereturnofGE320

Name: Anonymous 2007-11-25 3:09

>>8
()((()()()((()))((())))(()()()(())))))))))())()))))())((())()(()())()(

Name: Anonymous 2007-11-25 3:20

>>15
VALID PERL CODE

Name: Anonymous 2007-11-25 7:06

I am reading SICP, should i do all exercises of the book?
Basically, yes. I skipped the HUEG ones.

I've even googled for solutions, but i have to write them down and follow/write each call with pencil.
You know, there're actual Scheme interpreters available. No need to use pencil and paper. Stop googling for solutions, though.

Seriously, i wouldn't have problem with most of the algorithms given if i could use some other language.
You're just too trapped in thinking in (what I assume to be) C-inspired languages.

Do i fail at maths?
I don't understand how math even enters the equation here. I'm no mathematican, and I encountered many of the mathematical concepts in the exercises for the first time. The concepts are explained well enough for them not to become an obstacle.

Name: Anonymous 2007-11-25 7:25

You're just too trapped in thinking in (what I assume to be) C-inspired languages.
Imperative vs Functional. Lern2paradigm.

Name: Anonymous 2007-11-25 7:29

Imperative vs Functional. Lern2paradigm.
I can't believe how dense you are.

Name: Anonymous 2007-11-25 7:42

>>19
lol u tk him 2da bar|?

Name: Anonymous 2007-11-25 20:33

OP here, so .. i am doing this exercise, write an iterative factorial.

Looking at the recursive one, we see

(define (f n) (* n (f (- n 1))))

There's only one call to itself, therefore writing it as an iterative function is easy.

however, then it asks me to write
A function f is defined by the rule that f(n) = n if n<3 and f(n) = f(n - 1) + 2f(n - 2) + 3f(n - 3) if n> 3. Write a procedure that computes f by means of a recursive process. Write a procedure that computes f by means of an iterative process.

I simply cannot come up with something, each function results to 3 calls to itself if n>2.

How the fuck?? ... how.

Can someone please explain?
I mean, just the logic, seriously.

Name: Anonymous 2007-11-25 20:46

>>21
In general, an iterative process is one whose state can be summarized by a fixed number of state variables, together with a fixed rule that describes how the state variables should be updated as the process moves from state to state and an (optional) end test that specifies conditions under which the process should terminate.

Think about it.

The state of the program can be summarized by four variables: i, f(i - 1), f(i - 2), and f(i - 3). Given these variables, it is trivial to compute f(i). The state transformation substitutes (i + 1) for i, f(i) for f(i - 1), f(i - 1) for f(i - 2), and f(i -2) for f(i - 3). For n > 3, f(n) can be computed by setting i := 3 and iterating; computation stops when i = n.

Name: Anonymous 2007-11-25 22:40

>>22
Cool, thanks for that
sage, not much to be discussed

Name: Anonymous 2007-11-25 23:24

DONT HELP HIM!!!!!!!!!

Name: Anonymous 2011-02-03 0:42

Don't change these.
Name: Email:
Entire Thread Thread List