7 ms·
Programming and Programming Languages
- yzzxy 12y agoAt first glance this book appears in many ways to be a spiritual successor to SICP... does this hold up for anyone who has read it more throughly?
- acbart 12y agoThe author is one of the big people in the Racket curriculum.
- moron4hire 12y agoSo that is why this looks like PLT's documentation format.
- shriramkmurthi 12y agoYep, it's written in Scribble [http://docs.racket-lang.org/scribble/ http://docs.racket-lang.org/scribble/]. Which is magical for writing substantial documents. You notice the build time for your book has crept up to 30 seconds because you've forgotten to run the separate compiler in a while. You do it — which compiles all the chapters (taking a little over 30 seconds) — after which subsequent compiles are back down to 4 seconds. Good luck getting that with most other writing tools.
- pgbovine 12y agoMore like a spiritual successor to HtDP, which is somewhat opposed to the SICP philosophy, even though both use Scheme variants: http://cs.brown.edu/~sk/Publications/Papers/Published/fffk-htdp-vs-sicp-journal/ http://cs.brown.edu/~sk/Publications/Papers/Published/fffk-h...
- krat0sprakhar 12y agoHow is HtDP opposed to the SICP philosophy? From my reading both come off as espousing the more or less same ideas for building programs.
- pgbovine 12y agoread the linked paper :)
- deleted 12y ago[deleted]
- shriramkmurthi 12y agoWhat @pgbovine said. (-:
- wtbob 12y agoThe paper describes it; it's only 14 pages and is quite readable.
- nhjk 12y agoHere's a good quote from the paper "... sicp suffers from a serious flaw. While the course briefly explains programming as the definition of some recursive procedures, it does not discuss how programmers determine which procedures are needed or how to organize these procedures. While it explains that programs benefit from functions as first-class values, it does not show how programmers discover the need for this power. While SICP introduces the idea that programs should use abstraction layers, it never mentions how or when programmers should introduce such layers of abstraction. Finally, while the book discusses the pros and cons of stateful modularity versus stream-based modularity, it does so without explaining how to recognize situations in which one is more useful than the other."
- agumonkey 12y agoTrue, having discovered SICP while deep in college, I already went through many languages, paradigms and such, giving ground to SICP ideas. For a newcomer it might be pure fluff.
- shriramkmurthi 12y agoWith all due respect to @pgbovine, it is intended as a spiritual successor to both, but is also its own thing. It is being built atop the design methodology of HtDP, which SICP sorely lacks. It has some topical overlap with SICP. But it has an entire second textbook contained in there about the study of programming languages, which neither SICP nor HtDP has. Hence the title: P _and_ PL. It's two books in one, but (increasingly) intertwined.
- makmanalp 12y agoHis other book was PLAI which was pretty cool: http://cs.brown.edu/courses/cs173/2012/book/ http://cs.brown.edu/courses/cs173/2012/book/ I worked through it for a class, and I distinctly remember a moment where I thought "what the fuck - did I just write a working type inferencer?". It has a great way of simplifying things to the point where adding a complex new language feature isn't a distant theoretical proposition, it seems like a simple and straightforward next step. Of course, it helped that I had a great instructor. I can't speak for this new book, but it seems like an interesting combo of intro to programming and programming languages. And it's in pyret, which is like the bastard child of python and plt-scheme: http://www.pyret.org/ http://www.pyret.org/
- shriramkmurthi 12y agoPLAI is almost completely subsumed into PAPL. With each revision, though, the PLAI material gets reorganized and distributed across PAPL, so at some point it will no longer be an identifiable subset. The idea is that programming inspires new programming languages, while programming languages help us make sense of programs. Therefore, the two should be tightly intertwined. The first edition of PLAI tried one way to achieve this synthesis (but didn't really succeed as much as I'd have liked); PAPL is a fresh attempt at getting there.
- zura 12y agoShriram, thank you for the PLAI and I'm looking forward to take a look on PAPL as well. But one thing I don't like - types (static typing) for the implementation language is an afterthought in your books. This happened to PLAI, and later it switched to "plai-typed" language (which was a good move). Now we have PAPL, but again using a dynamic language. Although, as I can see, static typing is a planned feature for Pyret. So I suppose PAPL will switch to static typing in the future, but I think it would be better (for readers/learners, novice programmers) to start with (static) types in the first place. EDIT: just skimmed through the text, you seem to be using "type-like annotations" mentioned in Pyret docs. Another thing to note - Pyret is much more readable/enjoyable (and I guess writable :)) than the previous lisp languages you've used. Thanks!
- zodiac 12y ago@shriramkmurthi may I know what license PLAI and PAPL are released under? I couldn't find it on the linked page.
- shriramkmurthi 12y agoPLAI's license is CC BY-NC-SA (3.0 US). I have not yet decided for sure with PAPL. At any rate, I'm committed to having a full copy of the book available for free to all, as is also true of HtDP (we were one of the pioneers in this space) and PLAI (which has even more free/commercial options than HtDP). You may assume at least a CC BY-NC-ND, which lets typical users have at it right away.
- Curmudgel 12y agoCould you please change the body text color to something closer to #000, if not #000 itself? The current contrast ratio fails WAG AA and AAA standards for normal sized text.
- ralmidani 12y agoI have my own odd way of rewarding CC-licensed content: If it has no DRM but is 'all rights reserved', and I really want a copy, I wait for a chance to buy it at a deep discount. If it is released under a CC 'non-commercial' license, I buy a copy at full price. If it is released under a CC license which allows commercial use, I pay extra for a copy (at sites like www.leanpub.com) or buy 2 copies. At any rate, I would gladly pay for a copy (or two) of PAPL if the option were available and a CC license declared. BTW, thanks for this resource!
- shriramkmurthi 12y agoWith PLAI 1/e, I did something much simpler. I made a pay version of the PDF available, making clear it was also available for free, so people would only be buying it to reward the author. I'm pleased to say some number of people have done so with regularity. Search for "Electronic Version" on http://cs.brown.edu/~sk/Publications/Books/ProgLangs/2007-04-26/ http://cs.brown.edu/~sk/Publications/Books/ProgLangs/2007-04....
- discreteevent 12y agoI like their definition of an object: "The simplest notion of an object—pretty much the only thing everyone who talks about objects agrees about—is that an object is: a value, that maps names to stuff: either other values or “methods”." (I don't want to start a debate or anything, just thought it was a practical, minimal definition)
- CmonDev 12y agoMinimal definition: "behaviour and state".
- chton 12y agoIt's surprising to me how few developers, even hardcore OO developers, are able to just give this minimal definition. It's the core of the entire paradigm, that an object is state and behaviour on that state, and yet everybody always gives some convoluted, hardly understandable-to-a-beginner definition. If you're going to be teaching people, "behaviour and state" should be your starting point, not "a value that maps names to stuff". Seeing how the latter maps to an OO language is not trivial, something it should absolutely be.
- shriramkmurthi 12y agoYou should read the chapter. Apparently even Alan Kay doesn't quite agree with your view. Also please note that I did not offer this as a _definition_. What I wrote, quite carefully, was: “pretty much the only thing everyone who talks about objects agrees about”. I stand by that, because there are people who don't agree with what you say.
- chton 12y agoAlan Kay disagrees that objects exist to 'encapsulate state'. I agree with him. They also encapulsate behaviour. While it's difficult to get a precise overview of Kay's definition (he never gave them explicitly), this page does a good job of collecting the various bits: http://c2.com/cgi/wiki?AlanKaysDefinitionOfObjectOriented http://c2.com/cgi/wiki?AlanKaysDefinitionOfObjectOriented Notable for the "behaviour and state": 3. Objects have their own memory (in terms of objects). 4. Every object is an instance of a class (which must be an object). 5. The class holds the shared behavior for its instances (in the form of objects in a program list) But my point is that I don't agree that an object is "a value that maps names to stuff". I bet even Alan Kay would disagree, seeing as he was a proponent of the Actor model style of working, where objects exchange messages instead of method calls or values. In that case, there are no names to map, there is incoming data that matches a protocol. The object itself determines what behaviour to enact on its own state. Seeing an object as just values and methods is too simplistic, and at the same time too vague to mean anything. And more importantly, as a first sentence to explain what an object is, it's misleading and will raise a lot more questions later.
- saweel 12y agoLove to do programming and love to learn programming languages what ever language is weather c , c++ or c# i just love it :* Regards http://lovecoverphotos.com/category/quote-facebook-cover-photos/ http://lovecoverphotos.com/category/quote-facebook-cover-pho...
- mamcx 12y agoThis is great. I'm building a interpreter in F# and the clear explanation of things have solved several of small-questions I have before.
- deleted 12y ago[deleted]
- Pyret 12y agoI'd like to learn from this book. > If you ask Pyret for the value of this program, it will unsurprisingly tell you that it’s 3. I am not sure how to do that. In [this tutorial](http://www.pyret.org/docs/latest/A_Tour_of_Pyret.html#%28part._.Testing_and_.Assertions%29 http://www.pyret.org/docs/latest/A_Tour_of_Pyret.html#%28par...) everything is a test. Is the program 3 supposed to be run as a test as well? Just running 3 in the editor does nothing. Where can I read up on Pyret syntax so i can follow this book?
- shriramkmurthi 12y agoSorry about the confusion. Looks like you've already found https://code.pyret.org/editor https://code.pyret.org/editor (but the link is here for the information of others). You can run programs by typing them in the interactions area (a.k.a. REPL), which is the area on the right. To wit: > 3 3 > 1 + 2 3
- Pyret 12y agoI see. I was typing my code on the left half of the window and expecting the result show up on the right half. It works now. Thank you.
- Anthony-G 12y agoI read the introduction and I really liked the following excerpt from The Structure of This Book: We will often build up programs incrementally, just as a pair of programmers would. We will include mistakes, not because I don’t know the answer, but because *this is the best way for you to learn*. Including mistakes makes it impossible for you to read passively: you must instead engage with the material, because you can never be sure of the veracity of what you’re reading. I really like this idea as any techniques that help the learner to actively think about what they’re reading work better than books which don’t employ such technique. It’s for the same reasons that I recommend the Head First series – even though for some books, the pace can be too slow for my liking. I’d also agree with the author that a good book for readers to learn from does not make a good reference book (and vice-versa).
- journeeman 12y agoI know the answer to the following question is probably scattered in the comments below but, to get a concise/precise version of it in one place, I am going to ask it anyway - How does PAPL compare to SICP, HtDP, PLAI & EOPL considering there is quite some commonality amongst them? What does each book offer, what is the intended audience for each book, where do they overlap, which would be a good idea to read first for a novice? Thanks in advance. :-)