Today's SICP book club

26 views
Skip to first unread message

Renzo Borgatti

unread,
Dec 13, 2012, 4:57:24 AM12/13/12
to sic...@googlegroups.com
Hello all,

just to confirm we are on for today. We'll meet at Ada Lovelace at 12:30 with a fallback on the BC4 D6 kitchen (or other kitchens) if that's not available.

Today's assignment was 1.1.7 example Newton square root and 1.6, 1.7, 1.8 exercises. Below is a summary of the content of that paragraph that we can use to verify our understanding. See you later.

- declarative knowledge VS imperative knowledge
- procedures should be effective
- definition of a procedural language

Cheers
Renzo

Renzo Borgatti

unread,
Dec 13, 2012, 7:12:01 AM12/13/12
to sic...@googlegroups.com
Ada Lovelace is not available. Let's go for the BC4 D6 kitchen. There are tables, a board and projector.

Cheers
Renzo

Umesh Telang

unread,
Dec 13, 2012, 8:12:35 AM12/13/12
to Renzo Borgatti, sic...@googlegroups.com

Sorry guys. Got pulled into the meeting in Ada Lovelace, so missed out again.

 

From my end, managed to do exercises 1.6 and 1.7 . Didn’t get around to 1.8.

 

I’m keen to see what comes out of the discussion on 1.7, particularly around the issue of very big numbers & precision.

 

Cheers,

Umesh

--
 
 

 

http://www.bbc.co.uk
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.

Rob Shield

unread,
Dec 13, 2012, 8:39:13 AM12/13/12
to Renzo Borgatti, sic...@googlegroups.com
Sorry I missed it due to planning meeting. Have actually done exercises in Scala previously.
> --
>
>

Renzo Borgatti

unread,
Dec 13, 2012, 9:11:09 AM12/13/12
to sic...@googlegroups.com, Renzo Borgatti, rob.c....@googlemail.com
Hi all, no worries.

Here's a summary for today's discussions:

declarative knowledge VS imperative knowledge:
- example of imperative languages languages
- SQL as a declarative language
- you can go declarative in any language
- map reduce describes a functional problem but doesn't say which topology should solve it
- ideally, the compiler should be able to deal with all the deatils of the computation and free the programmers mind for the business logic
- developer time VS compiler time: computer time is much cheaper than developer time
- was object orientation's goal to make procedural programming more declarative? Maybe yes, but probably the main goal was the "model the world" problem to reduce complexity.
- inheritance failed, now is everything delegation or mixin

definition of a procedural language:
- is assembler procedural? What about languages that allow jump instructions without functions/procedure.

Cheers
Renzo

Renzo Borgatti

unread,
Dec 13, 2012, 9:17:10 AM12/13/12
to sic...@googlegroups.com, Renzo Borgatti
Hi Umesh,

as for 1.7 big numbers, I personally couldn't find a solution that passed my test for a square root of 1e+50 (infinite loop). But today, Ian suggested to use a different approach to the good-enough? function:

(define (better-good-enough? guess x)
  (< (/ guess x) 0.9999)))

and Allan to make that ratio dependent on x to take into account for huge numbers:

(define (better-good-enough? guess x)
  (< (/ guess x) (/ x 1000))))

but after a quick attempt I couldn't make it work (again infinite loop). I'll put some more time to understand what's wrong. Anybody else with another solution? Disclaimer: I still have to look for the solution on the Internet :) As of 1.8 is quite simple. Have a look on github: https://github.com/reborg/sicpbbc/blob/master/sicp-scheme/1.8-cube-root.scm

Renzo

Renzo Borgatti

unread,
Dec 14, 2012, 3:13:22 AM12/14/12
to sic...@googlegroups.com, Umesh Telang
Replying to all to this question from Umesh.

I added you as repo collaborator, so you have now read write access after you git clone (git@ repo link). As you said is a good idea if you create a branch and then synch that with remote. Quick list of commands:

- git clone g...@github.com:reborg/sicpbbc.git
- git co -b umesh
- make your changes (maybe just delete my stuff so you have a clean dir)
- git push -u origin umesh

anybody else who wants to follow both me and Umesh:

- git clone https://github.com/reborg/sicpbbc.git
- git branch --track umesh origin/umesh

then git co to change to master/umesh.

Renzo

On 13 Dec 2012, at 17:03, Umesh Telang wrote:

> Thanks Renzo,
>
> You mentioned way back about write access to the github location.
> Could I get access? I could put code I write for the exercises on a branch(?)
> My github ID is
> elegantmush
>
> Cheers,
> Umesh
>

Reply all
Reply to author
Forward
0 new messages