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

It's official: SICP sucks now

Name: Anonymous 2011-05-19 10:12

Name: VIPPER 2011-05-19 10:20

>>1
http://www.reddit.com
Please go away and never come back.

Name: Anonymous 2011-05-19 10:26

Not OP, but regardless, as was mentioned in one of the comments via the link, there is a reason why the Sussman dropped Scheme in favor of Python.

I'll leave the inference up to you, /prog/.

Name: Anonymous 2011-05-19 10:33

I tried reading HtDP but stopped after a little while because it was so boring. It feels like it's written for stupid people where everything is spoon fed. Does it get better later on?

SICP on the other hand is great.

Name: Anonymous 2011-05-19 10:35

>>3
Most accurate definition of the only problem SICP has:
tl;dr: n00bs can't handle SICP.
Python, unlike Scheme, unlike SICP, is idiot-proof.

Name: Anonymous 2011-05-19 10:35

    Costanza asked Sussman why MIT had switched away from Scheme for their introductory programming course, 6.001. This was a gem. He said that the reason that happened was because engineering in 1980 was not what it was in the mid-90s or in 2000. In 1980, good programmers spent a lot of time thinking, and then produced spare code that they thought should work. Code ran close to the metal, even Scheme — it was understandable all the way down. Like a resistor, where you could read the bands and know the power rating and the tolerance and the resistance and V=IR and that’s all there was to know. 6.001 had been conceived to teach engineers how to take small parts that they understood entirely and use simple techniques to compose them into larger things that do what you want.

    But programming now isn’t so much like that, said Sussman. Nowadays you muck around with incomprehensible or nonexistent man pages for software you don’t know who wrote. You have to do basic science on your libraries to see how they work, trying out different inputs and seeing how the code reacts. This is a fundamentally different job, and it needed a different course.

    So the good thing about the new 6.001 was that it was robot-centered — you had to program a little robot to move around. And robots are not like resistors, behaving according to ideal functions. Wheels slip, the environment changes, etc — you have to build in robustness to the system, in a different way than the one SICP discusses.

    And why Python, then? Well, said Sussman, it probably just had a library already implemented for the robotics interface, that was all.

Name: >>4 2011-05-19 10:49

I checked a chapter 17 to see what was up with that.

Exercise 17.6.1.   Develop the function merge. It consumes two lists of numbers, sorted in ascending order. It produces a single sorted list of numbers that contains all the numbers on both inputs lists (and nothing else). A number occurs in the output as many times as it occurs on the two input lists together.

Really, after seventeen chapters I thought the book would get to something more complicated than merging two ordered lists. The other exercises in the chapter aren't much harder. This is almost halfway through the book.

Name: Anonymous 2011-05-19 10:54

>>4
I don't know, I never read HtDP, I just looked at the content table and dropped it. I mean, it's long, and I don't really want to read something on things I already know/I can just look up in the docs/figure out myself by putting a little of brain power in it.

SICP, on the other hand, is shorter but teaches you more than ``functions and structures''.
SICP is a comprehensive book on the basics of CS, covering recursion, interpreters, compilers, non-determinism and logic programming.

Now, just like the paper says, SICP is much more what-oriented, and HtDP how-oriented. HtDP does what it was meant to do, and does it well: it teaches you how to design programs, but it's not at the same level of SICP.

Name: Anonymous 2011-05-19 11:22

SICP is an invaluable timeless piece, every programmer should read it. HtDP can go fuck off back to the ether of generic programming texts whence it came.

Name: Anonymous 2011-05-19 12:03

No, the bottleneck is not just the verbosity. I am learning new, interesting things. But they are buried in so much verbiage that at times you don't feel safe rushing through it... you don't know what interesting nugget you might have missed. So, I have to read the whole blessed thing to realize that I did or did not miss it.

So he wants to just blast through the book and not think about a single thing he has read? Is this representative of the average Reddit user?

Name: Anonymous 2011-05-19 12:44

SICP for dummies

Name: Anonymous 2011-05-19 13:35

Still, the htdp curriculum has had an interesting measurable effect concerning female students. Several instructors reported that female students like the HtDP curriculum exceptionally well. In a controlled experiment, an htdp-trained instructor taught a conventional AP curriculum and the Scheme curriculum to the same three classes of students. Together the three classes consisted of over 70 students. While all students preferred our approach to programming, the preference among females was a stunning factor of four.

Bitches and whores.

Name: Anonymous 2011-05-19 16:32

I wish there was an 'outline version' of SICP that would quickly walk you through the main paradigms, idioms, etc with not more than a few sentences on how each was arrived at, its rationale, etc.

Name: Anonymous 2011-05-19 18:32

>>7
Wasn't there a similar exercise somewhere in the first 3 chapters of SICP?

Name: Anonymous 2011-05-19 20:53

>>10
Is this representative of the average Reddit user?
Yes.

Name: Anonymous 2011-05-19 21:57

Why read SICP when you could read a watered down "SICP for dummies" version that women like?

OKAY YOU JUST FUQIN ANGERED AN EXPERT PROGRAMMER

Name: Anonymous 2011-05-20 1:42

>>14
By the end of chapter 2 they showed you how to implement a numerical tower. Surely not the most challenging of exercises but still plenty to think about and much better than ``merge two lists''.

Name: >>17 2011-05-20 2:19

>>14
I misread your question. There probably was something similar but then it showed something more complex and interesting. HtDP doesn't seem to do this.

Name: Anonymous 2011-05-20 2:50

Scheme as dead as Lisp and last fights among remainers ensue...

Name: Anonymous 2011-05-20 2:56

>>19
that's just a notepad for programmers. If you want a full text editor for programmers, go with vim. :)

Look at his comment history, he surely knows what he's doing not.

Name: Anonymous 2011-05-20 3:13

>>,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

[sub][code]Learn Haskell. Who needs silly things like macros anyway?[code][/sub]

Name: Anonymous 2011-05-20 3:21

>>21
People that can BBCode.

Name: Anonymous 2011-05-21 6:46

>>12
So HtDP is the Twilight of computer science books?

Name: Anonymous 2011-05-21 11:59

Learn Haskell.


Lisp

sieve N -> Sum:0 Items:(vec N+1)
        -> for Index on [2..N,sqrt,int]
           (Items,Index,n? |> for (I:Index^2; I<=N; !I+Index) aset I y Items)
        -> for Index on [2..N] (Items,Index,n? |> !Sum+Index)
        -> Sum


F#

let sieve n = let mutable sum = 0L
              let items = Array.zeroCreate <| n + 1
 
              for index in 2 .. n |> float |> sqrt |> int do
                if not items.[index] then
                    for i in index * index .. index .. n do                   
                        items.[i] <- true
 
              for index in 2 .. n do                
                if not items.[index] then             
                    sum <- sum + (int64 index)
 
              sum

Haskell

import Control.Monad
 
import Data.IORef
import Data.Array.IO
 
sieve n = do sum   <- newIORef  0
             items <- newArray (2, n) True :: IO (IOUArray Integer Bool)                         
             forM_ [2..truncate $ sqrt $ fromIntegral n]            
                $ \index -> readArray items index >>= flip when (forM_ [index * index, index * index + index .. n] (flip (writeArray items) False))
 
             forM_ [2..n]            
                $ \index -> readArray items index >>= flip when (modifyIORef sum (+ index))
 
             readIORef sum
 
main = sieve 1000000 >>= print

Name: Anonymous 2011-05-21 12:07


Lisp

sieve N -> Items:(vec N+1) for Index on [2..N,sqrt,int]
           (Items,Index,n? |> for (I:Index^2; I<=N; !I+Index) aset I y Items)
        -> strip Items,? [2..N] | sum


F#

let sieve n = let mutable sum = 0L
              let items = Array.zeroCreate <| n + 1
 
              for index in 2 .. n |> float |> sqrt |> int do
                if not items.[index] then
                    for i in index * index .. index .. n do                   
                        items.[i] <- true
 
              for index in 2 .. n do                
                if not items.[index] then             
                    sum <- sum + (int64 index)
 
              sum

Haskell

import Control.Monad
 
import Data.IORef
import Data.Array.IO
 
sieve n = do sum   <- newIORef  0
             items <- newArray (2, n) True :: IO (IOUArray Integer Bool)                         
             forM_ [2..truncate $ sqrt $ fromIntegral n]            
                $ \index -> readArray items index >>= flip when (forM_ [index * index, index * index + index .. n] (flip (writeArray items) False))
 
             forM_ [2..n]            
                $ \index -> readArray items index >>= flip when (modifyIORef sum (+ index))
 
             readIORef sum
 
main = sieve 1000000 >>= print

Name: Anonymous 2011-05-21 12:24

Array.zeroCreate
(from F# example)

Object-oriented function naming conventions and unnecessary verbiage are the cancer that's killing programming. This shit is so horrible.

Name: Anonymous 2011-05-21 13:10

>>26
Object-oriented function naming conventions and unnecessary verbiage are the cancer that's killing programming.

Don't like meaningful and self-descriptive names, then Brainfuck was made for you:


++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.

Name: Anonymous 2011-05-21 14:36

>>27
Turing tarpits are a little extreme. I'm more of the "well-formatted ANSI C is just right" kind-of-person.

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