L4Ka – a New Methodology for System Construction

May 7, 2011

L4Ka – L4Ka Project
Don’t have much interest in OSes or OS research, but this is an interesting project.


May 7, 2011

Activating this Blog again.


Use cases vs functional specs

January 29, 2010

I’ve come to the firm belief that writing detailed functional specs upfront for software projects is a total waste of time. Software is meant oto be used and in order to find out what it’s use is going to be software architects need use cases. writing specs is just moronic when you have no idea on how it’s going to be used


Ex 1.8 – Structure and Interpretation of Computer Programs

January 25, 2010

; Ex 1.8
(define improve-cube-root
  (lambda (x y)
    (/ (+ (/ x (* y y)) (* 2 y))
       3)))

(define cube-root-iter
  (lambda (guess x )
    (define next-guess ( / ( + (/ x (* guess guess)) (* 2 guess))
                           3))
    (if (good-enough-2? next-guess guess)
        next-guess
        (cube-root-iter next-guess x))))

(define cube-root
  (lambda (x)
    (cube-root-iter 1.0 x)))


Ex 1.7 – Structure and Interpretation of Computer Programs

January 25, 2010

; Ex 1.7
(define (good-enough-2? guess prev-guess)
  (< (abs (- guess prev-guess)) 0.0001))

(define sqrt-iter-2
  (lambda (guess x)
    (define next-guess (improve guess x))
    (if (good-enough-2? next-guess guess)
        next-guess
        (sqrt-iter-2 next-guess x))))


Ex 1.6 – Structure and Interpretation of Computer Programs

January 25, 2010

; Ex 1.6
; The function will run forever, because Scheme is applicative order
; so the argument for the else clause will be evaluated causing the
; to routine to run forever.


Ex 1.13 – Structure and Interpretation of Computer Programs

January 23, 2010

Exercise 1.13 – SICP

We already know that

clip_image002[4](1)

We also know that

clip_image004[4] where clip_image006[4]

From the hint clip_image008[5] where clip_image010[5]

So clip_image012[5]

So according to the finonacci definition (1)

clip_image014[4]

Using wolfram alpha we can compute

clip_image016[9]

If you plugin the values in the wolfram alpha , you can see that that both expansions at clip_image018[4]are also the same

Edit hmmm, looks like I missed the point of the problem. The real problem was to prove that Fib(n) approx= phi^n / 2 where phi = (1+sqrt(5))/2. I think I’ll have to redo this proof.


Follow

Get every new post delivered to your Inbox.