HN user

skenney26

209 karma
Posts8
Comments15
View on HN

Learning to program now is easier than ever before.

Last week my partner was in Spanish class and the teacher told her that the most important languages to know in the future will be English, Spanish, and a programming language. Programming is the new literacy. She decided she wanted to learn to program. We opened up Terminal on her Mac laptop, typed "python", and used Mark Pilgrim's Dive Into Python as a guide. Done.

With a PC you at least have access to JavaScript (and Marijn Haverbeke's Eloquent JavaScript tutorial) which is more than suitable for a first language.

Perhaps it would be simpler to pass the interval modifiers as functional arguments:

  (def mapr (f x y . fs)
    (let r (range x y)
      (map f r
             (apply map + (map [map _ r] fs)))))

  arc> (mapr (fn (x y) (prn x " " y)) 1 3 [+ _ 10])
  1 11
  2 12
  3 13
  (1 2 3)

  arc> (mapr (fn (x y) (prn x " " y)) 1 3 [expt _ 2])
  1 1
  2 4
  3 9
  (1 2 3)

  arc> (mapr (fn (x y) (prn x " " y)) 1 3 [+ _ 10] [expt _ 2])
  1 12
  2 16
  3 22
 (1 2 3)
I'm out, baby 18 years ago

Pretty amusing experiment. The site doesn't seem to like pg's informal writing style.

Very cool website though. I need to use this on my blog posts.

> "...they all screwed up lexical scoping."

I have read a number of comments like this recently. I am very curious about what this implies but the person making the statement never gives an explanation.

Actually, Facebook has a very sophisticated infrustructure. Take a look at Thrift, http://developers.facebook.com/thrift/, the open-source project for cross-language development they released earlier this year. Even Google is trapped using about four programming languages (C++, Java, Python, and JavaScript). The latest version of Thrift has interfaces for 10 languages (Cocoa, C++, Erlang, Haskell, Java, OCaml, Perl, PHP, Python, and Ruby).